diff --git a/.classpath b/.classpath index e63998445c7289bb4d8316f6cfedd3e67cb690a7..7b2a2d2a91e1de8b1382861fbaa8efe63a6b4806 100644 --- a/.classpath +++ b/.classpath @@ -1,14 +1,32 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 3b55ea54f160a0d06d5824a6c626b7d5d93dfa3f..16a2e4feeb32d5a98d5d26c9bab6c71301984670 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,2 +1,3 @@ eclipse.preferences.version=1 -encoding/=GBK +encoding//src/dataOperator/BasicOperation.java=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index abc627204240929e275c22ce2404168510b87404..0358baa00626af6c53a207241814488798888bcd 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,9 +1,10 @@ + - + diff --git a/WebContent/WEB-INF/lib/activation-1.1.1.jar b/WebContent/WEB-INF/lib/activation-1.1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b703ab283e0cddabf9c1b5e28658f9198c0def4 Binary files /dev/null and b/WebContent/WEB-INF/lib/activation-1.1.1.jar differ diff --git a/WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar b/WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..6728154e56eeca9f12edd7194b51c6220813971f Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar differ diff --git a/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar b/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..fa5df82a63062c040eefcef947827c4ea4ae9e6b Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-collections-3.2.2.jar differ diff --git a/WebContent/WEB-INF/lib/commons-dbutils-1.7.jar b/WebContent/WEB-INF/lib/commons-dbutils-1.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..b30458ee54084ec6133c83e3e98df638da06a96b Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-dbutils-1.7.jar differ diff --git a/WebContent/WEB-INF/lib/commons-lang-2.6.jar b/WebContent/WEB-INF/lib/commons-lang-2.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..98467d3a653ebad776ffa3542efeb9732fe0b482 Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-lang-2.6.jar differ diff --git a/WebContent/WEB-INF/lib/commons-logging-1.2.jar b/WebContent/WEB-INF/lib/commons-logging-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..93a3b9f6db406c84e270e19b9a5e70f2e27ca513 Binary files /dev/null and b/WebContent/WEB-INF/lib/commons-logging-1.2.jar differ diff --git a/WebContent/WEB-INF/lib/ezmorph-1.0.6.jar b/WebContent/WEB-INF/lib/ezmorph-1.0.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..30fad12d8f1e375d17522402fdd40c3e4acc5c85 Binary files /dev/null and b/WebContent/WEB-INF/lib/ezmorph-1.0.6.jar differ diff --git a/WebContent/WEB-INF/lib/javax.mail.jar b/WebContent/WEB-INF/lib/javax.mail.jar new file mode 100644 index 0000000000000000000000000000000000000000..09222952eca85801a9ab78763e7ef652c6f8ad45 Binary files /dev/null and b/WebContent/WEB-INF/lib/javax.mail.jar differ diff --git a/WebContent/WEB-INF/lib/javax.servlet-api-3.1.0.jar b/WebContent/WEB-INF/lib/javax.servlet-api-3.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..6b14c3d267867e76c04948bb31b3de18e01412ee Binary files /dev/null and b/WebContent/WEB-INF/lib/javax.servlet-api-3.1.0.jar differ diff --git a/WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar b/WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar new file mode 100644 index 0000000000000000000000000000000000000000..68d4f3b09c7632b30280980f22704e13212c743a Binary files /dev/null and b/WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar differ diff --git a/WebContent/WEB-INF/lib/jstl-1.2.jar b/WebContent/WEB-INF/lib/jstl-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..333f0abe6e9bc3b5fcaab5585505f1bfce741d6a Binary files /dev/null and b/WebContent/WEB-INF/lib/jstl-1.2.jar differ diff --git a/WebContent/WEB-INF/lib/mailapi.jar b/WebContent/WEB-INF/lib/mailapi.jar new file mode 100644 index 0000000000000000000000000000000000000000..ab6365c72e95f0a64781a3166262da9c9ead2db0 Binary files /dev/null and b/WebContent/WEB-INF/lib/mailapi.jar differ diff --git a/WebContent/WEB-INF/lib/smtp.jar b/WebContent/WEB-INF/lib/smtp.jar new file mode 100644 index 0000000000000000000000000000000000000000..35be889026a317eb237a27f83d8187230bc6be23 Binary files /dev/null and b/WebContent/WEB-INF/lib/smtp.jar differ diff --git a/WebContent/WEB-INF/lib/standard.jar b/WebContent/WEB-INF/lib/standard.jar new file mode 100644 index 0000000000000000000000000000000000000000..bc528acb949096eeb2e3048de1ff5b9ab12a66c5 Binary files /dev/null and b/WebContent/WEB-INF/lib/standard.jar differ diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 7daa4e052ac8b951ceca7cfd66be133471d153a4..047bb21d0705354ac0f827c8567fc72194c7f2fb 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -2,7 +2,7 @@ library - index.html + reader/search.jsp index.htm index.jsp default.html @@ -19,31 +19,4 @@ Launch /launch - - - Book - servlet.Book - - - Book - /book - - - - Reader - servlet.Reader - - - Reader - /reader - - - - ISBN - servlet.ISBN - - - ISBN - /ISBN.do - \ No newline at end of file diff --git a/WebContent/css/book.css b/WebContent/css/book.css new file mode 100644 index 0000000000000000000000000000000000000000..c65cc3078cb7fd81669c06a55d5d1b57f617994d --- /dev/null +++ b/WebContent/css/book.css @@ -0,0 +1,44 @@ +.layui-container-box { + width: 100%; + margin: 0 auto; + border:1px solid #E6E6E6; + margin: 50px auto 0; + position: relative; +} +.layui-form { + position: relative; +} +.layui-container-form-box { + width: 500px; + height: 500px; + margin: 50px auto 0; + position: relative; + border: 1px solid #E6E6E6; +} +fieldset { + height: 30px; + line-height: 50px; + border: 1px solid #E6E6E6; +} +legend { + /*margin-bottom: 20px;*/ + position: absolute; + left: 50%; + transform: translate(-50%,0); +} +.layui-input-block input { + width: 300px; +} +.layui-form-item .layui-btn { + margin-left: 150px; + width: 200px; +} +.layui-input-block select { + width: 500px; +} +.layui-form-select dl { + min-width: 81.3%; +} +.layui-form-select .layui-edge { + right: 80px; +} \ No newline at end of file diff --git a/WebContent/css/login.css b/WebContent/css/login.css new file mode 100644 index 0000000000000000000000000000000000000000..6d2021ee8a0e5fe4ead577a588a1826eb87eb059 --- /dev/null +++ b/WebContent/css/login.css @@ -0,0 +1,188 @@ +@charset "utf-8"; +/* CSS Document */ + +/*登录界面整体风格*/ +html { + overflow-y:scroll; + vertical-align:baseline; +} +body { + font-family:Microsoft YaHei, Segoe UI, Tahoma, Arial, Verdana, sans-serif, "新宋体"; + font-size:12px; + color:#000000; + height:100%; + line-height:1; + background:#999; +} +* { + margin:0 auto; + padding:0px; +} +ul, li { + list-style:none +} +/*tab登录选项卡*/ +#tab { + width:600px; + position:relative; + margin:300px auto 0px auto; + text-align:center; + padding:1px; +} +#tab .tab_menu { + width:100%; + float:left; + position:absolute; + z-index:1; +} +#tab .tab_menu li { + float:left; + width:33%; + height:50px; + line-height:50px; + border-bottom:0px; + cursor:pointer; + text-align:center; + margin:0 1px 0 0; + background-color:#000000; + color:#FFFFFF; + font-size:16px; + filter:alpha(opacity:80); + opacity:0.8; +} +#tab .tab_box { + width:600px; + clear:both; + top:50px; + position:relative; + background-color:#FFFFFF; + color:#000000; + font-size:16px; + filter:alpha(opacity:80); + opacity:0.8; +} +#tab .tab_box input{font-size:12px;} +#tab .tab_menu .selected { + cursor:pointer; + background-color:#FFFFFF; + color:#000000; + font-size:16px; + filter:alpha(opacity:80); + opacity:0.8; +} +.hide { + display:none; +} +.tab_box div { + padding:10px; +} +input[type=text], input[type=password] { + width:300px; + height:40px; + margin-top:10px; + padding:0px 15px; + border:1px solid rgba(0, 0, 0, .15); + border-radius:6px; + color:#000000; + letter-spacing:2px; + font-size:16px; + background:transparent; +} +#code input { + width:195px; +} +#code img { + width:100px; + height:40px; + border:none; +} +button { + cursor:pointer; + width:100%; + height:45px; + padding:0; + background:#ef4300; + border:1px solid #ff730e; + border-radius:6px; + font-weight:700; + color:#fff; + font-size:24px; + letter-spacing:15px; + text-shadow:0 1px 2px rgba(0, 0, 0, .1) +} +input:focus { + outline:none; + box-shadow:0 2px 3px 0 rgba(0, 0, 0, .1) inset, 0 2px 7px 0 rgba(0, 0, 0, .2) +} +button:hover { + box-shadow:0 15px 30px 0 rgba(240, 70, 0, .15) inset, 0 2px 7px 0 rgba(0, 0, 0, .2) +} +/*背景图片*/ +.screenbg { + position:fixed; + bottom:0; + left:0; + z-index:-999; + overflow:hidden; + width:100%; + height:100%; + min-height:100%; +} +.screenbg ul li { + display:block; + list-style:none; + position:fixed; + overflow:hidden; + top:0; + left:0; + width:100%; + height:100%; + z-index:-1000; + float:right; +} +.screenbg ul a { + left:0; + top:0; + width:100%; + height:100%; + display:inline-block; + margin:0; + padding:0; + cursor:default; +} +.screenbg a img { + vertical-align:middle; + display:inline; + border:none; + display:block; + list-style:none; + position:fixed; + overflow:hidden; + top:0; + left:0; + width:100%; + height:100%; + z-index:-1000; + float:right; +} +/*底部bottom*/ +.bottom { + margin:8px auto 0 auto; + width:100%; + position:fixed; + text-align:center; + bottom:0; + left:0; + overflow:hidden; + padding-bottom:8px; + color:#ccc; + word-spacing:3px; + zoom:1; +} +.bottom a { + color:#FFF; + text-decoration:none; +} +.bottom a:hover { + text-decoration:underline; +} diff --git a/WebContent/css/reader.css b/WebContent/css/reader.css new file mode 100644 index 0000000000000000000000000000000000000000..b69e187896153b2dc2b3bed52fa2c1ae2dacc07e --- /dev/null +++ b/WebContent/css/reader.css @@ -0,0 +1,5 @@ +.layui-container-box { + width: 80%; + margin: 50px auto 0; + border: 1px solid #E6E6E6; +} \ No newline at end of file diff --git a/WebContent/images/0.jpg b/WebContent/images/0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/0.jpg differ diff --git a/WebContent/images/1.jpg b/WebContent/images/1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/1.jpg differ diff --git a/WebContent/images/111.png b/WebContent/images/111.png new file mode 100644 index 0000000000000000000000000000000000000000..6b8ffcd4f66c0d299ea2b2d76a40b33cbbd73c71 Binary files /dev/null and b/WebContent/images/111.png differ diff --git a/WebContent/images/2.jpg b/WebContent/images/2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/2.jpg differ diff --git a/WebContent/images/bg-1.jpg b/WebContent/images/bg-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/bg-1.jpg differ diff --git a/WebContent/images/bg-2.jpg b/WebContent/images/bg-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/bg-2.jpg differ diff --git a/WebContent/images/bg-3.jpg b/WebContent/images/bg-3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/bg-3.jpg differ diff --git a/WebContent/images/bg-4.jpg b/WebContent/images/bg-4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/bg-4.jpg differ diff --git a/WebContent/images/bg-5.jpg b/WebContent/images/bg-5.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a719548f85d7276f1748f0e2105e8750cbc6dc2 Binary files /dev/null and b/WebContent/images/bg-5.jpg differ diff --git a/WebContent/images/bg.jpg b/WebContent/images/bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..657be61622851c667c027e2e45baf4a5744ce50b Binary files /dev/null and b/WebContent/images/bg.jpg differ diff --git a/WebContent/images/captcha.jpg b/WebContent/images/captcha.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8f52c9926312ebeb477672608cdf9f024ddd945f Binary files /dev/null and b/WebContent/images/captcha.jpg differ diff --git a/WebContent/images/copy_rignt_24.png b/WebContent/images/copy_rignt_24.png new file mode 100644 index 0000000000000000000000000000000000000000..4738f8f58fc3c58e45238b819361f8da560172b1 Binary files /dev/null and b/WebContent/images/copy_rignt_24.png differ diff --git a/WebContent/images/img.jpeg b/WebContent/images/img.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5349ce3ae615cc359966993ff63e66a5245826df Binary files /dev/null and b/WebContent/images/img.jpeg differ diff --git a/WebContent/js/GetProperties.js b/WebContent/js/GetProperties.js new file mode 100644 index 0000000000000000000000000000000000000000..44b6a425661fae0badfe190d7f38b38c3b3e76a8 --- /dev/null +++ b/WebContent/js/GetProperties.js @@ -0,0 +1,3 @@ +function createFormat(o) { + return o; +} \ No newline at end of file diff --git a/WebContent/js/Validform_v5.3.2.js b/WebContent/js/Validform_v5.3.2.js new file mode 100644 index 0000000000000000000000000000000000000000..2f8350100aeda52e25de12c8d7e1538385f8121b --- /dev/null +++ b/WebContent/js/Validform_v5.3.2.js @@ -0,0 +1,1331 @@ +/* + 通用表单验证方法 + Validform version 5.3.2 + By sean during April 7, 2010 - March 26, 2013 + For more information, please visit http://validform.rjboy.cn + Validform is available under the terms of the MIT license. + + Demo: + $(".demoform").Validform({//$(".demoform")指明是哪一表单需要验证,名称需加在form表单上; + btnSubmit:"#btn_sub", //#btn_sub是该表单下要绑定点击提交表单事件的按钮;如果form内含有submit按钮该参数可省略; + btnReset:".btn_reset",//可选项 .btn_reset是该表单下要绑定点击重置表单事件的按钮; + tiptype:1, //可选项 1=>pop box,2=>side tip(parent.next.find; with default pop),3=>side tip(siblings; with default pop),4=>side tip(siblings; none pop),默认为1,也可以传入一个function函数,自定义提示信息的显示方式(可以实现你想要的任何效果,具体参见demo页); + ignoreHidden:false,//可选项 true | false 默认为false,当为true时对:hidden的表单元素将不做验证; + dragonfly:false,//可选项 true | false 默认false,当为true时,值为空时不做验证; + tipSweep:true,//可选项 true | false 默认为false,只在表单提交时触发检测,blur事件将不会触发检测(实时验证会在后台进行,不会显示检测结果); + label:".label",//可选项 选择符,在没有绑定nullmsg时查找要显示的提示文字,默认查找".Validform_label"下的文字; + showAllError:false,//可选项 true | false,true:提交表单时所有错误提示信息都会显示,false:一碰到验证不通过的就停止检测后面的元素,只显示该元素的错误信息; + postonce:true, //可选项 表单是否只能提交一次,true开启,不填则默认关闭; + ajaxPost:true, //使用ajax方式提交表单数据,默认false,提交地址就是action指定地址; + datatype:{//传入自定义datatype类型,可以是正则,也可以是函数(函数内会传入一个参数); + "*6-20": /^[^\s]{6,20}$/, + "z2-4" : /^[\u4E00-\u9FA5\uf900-\ufa2d]{2,4}$/, + "username":function(gets,obj,curform,regxp){ + //参数gets是获取到的表单元素值,obj为当前表单元素,curform为当前验证的表单,regxp为内置的一些正则表达式的引用; + var reg1=/^[\w\.]{4,16}$/, + reg2=/^[\u4E00-\u9FA5\uf900-\ufa2d]{2,8}$/; + + if(reg1.test(gets)){return true;} + if(reg2.test(gets)){return true;} + return false; + + //注意return可以返回true 或 false 或 字符串文字,true表示验证通过,返回字符串表示验证失败,字符串作为错误提示显示,返回false则用errmsg或默认的错误提示; + }, + "phone":function(){ + // 5.0 版本之后,要实现二选一的验证效果,datatype 的名称 不 需要以 "option_" 开头; + } + }, + usePlugin:{ + swfupload:{}, + datepicker:{}, + passwordstrength:{}, + jqtransform:{ + selector:"select,input" + } + }, + beforeCheck:function(curform){ + //在表单提交执行验证之前执行的函数,curform参数是当前表单对象。 + //这里明确return false的话将不会继续执行验证操作; + }, + beforeSubmit:function(curform){ + //在验证成功后,表单提交前执行的函数,curform参数是当前表单对象。 + //这里明确return false的话表单将不会提交; + }, + callback:function(data){ + //返回数据data是json格式,{"info":"demo info","status":"y"} + //info: 输出提示信息; + //status: 返回提交数据的状态,是否提交成功。如可以用"y"表示提交成功,"n"表示提交失败,在ajax_post.php文件返回数据里自定字符,主要用在callback函数里根据该值执行相应的回调操作; + //你也可以在ajax_post.php文件返回更多信息在这里获取,进行相应操作; + //ajax遇到服务端错误时也会执行回调,这时的data是{ status:**, statusText:**, readyState:**, responseText:** }; + + //这里执行回调操作; + //注意:如果不是ajax方式提交表单,传入callback,这时data参数是当前表单对象,回调函数会在表单验证全部通过后执行,然后判断是否提交表单,如果callback里明确return false,则表单不会提交,如果return true或没有return,则会提交表单。 + } + }); + + Validform对象的方法和属性: + tipmsg:自定义提示信息,通过修改Validform对象的这个属性值来让同一个页面的不同表单使用不同的提示文字; + dataType:获取内置的一些正则; + eq(n):获取Validform对象的第n个元素; + ajaxPost(flag,sync,url):以ajax方式提交表单。flag为true时,跳过验证直接提交,sync为true时将以同步的方式进行ajax提交,传入了url地址时,表单会提交到这个地址; + abort():终止ajax的提交; + submitForm(flag,url):以参数里设置的方式提交表单,flag为true时,跳过验证直接提交,传入了url地址时,表单会提交到这个地址; + resetForm():重置表单; + resetStatus():重置表单的提交状态。传入了postonce参数的话,表单成功提交后状态会设置为"posted",重置提交状态可以让表单继续可以提交; + getStatus():获取表单的提交状态,normal:未提交,posting:正在提交,posted:已成功提交过; + setStatus(status):设置表单的提交状态,可以设置normal,posting,posted三种状态,不传参则设置状态为posting,这个状态表单可以验证,但不能提交; + ignore(selector):忽略对所选择对象的验证; + unignore(selector):将ignore方法所忽略验证的对象重新获取验证效果; + addRule(rule):可以通过Validform对象的这个方法来给表单元素绑定验证规则; + check(bool,selector):对指定对象进行验证(默认验证当前整个表单),通过返回true,否则返回false(绑定实时验证的对象,格式符合要求时返回true,而不会等ajax的返回结果),bool为true时则只验证不显示提示信息; + config(setup):可以通过这个方法来修改初始化参数,指定表单的提交地址,给表单ajax和实时验证的ajax里设置参数; +*/ + +(function($,win,undef){ + var errorobj=null,//指示当前验证失败的表单元素; + msgobj=null,//pop box object + msghidden=true;//msgbox hidden? + + var tipmsg={//默认提示文字; + tit:"提示信息", + w:{ + "*":"不能为空!", + "*6-16":"请填写6到16位任意字符!", + "n":"请填写数字!", + "n6-16":"请填写6到16位数字!", + "s":"不能输入特殊字符!", + "s6-18":"请填写6到18位字符!", + "p":"请填写邮政编码!", + "m":"请填写手机号码!", + "e":"邮箱地址格式不对!", + "url":"请填写网址!" + }, + def:"请填写正确信息!", + undef:"datatype未定义!", + reck:"两次输入的内容不一致!", + r:"通过信息验证!", + c:"正在检测信息…", + s:"请{填写|选择}{0|信息}!", + v:"所填信息没有经过验证,请稍后…", + p:"正在提交数据…" + } + $.Tipmsg=tipmsg; + + var Validform=function(forms,settings,inited){ + var settings=$.extend({},Validform.defaults,settings); + settings.datatype && $.extend(Validform.util.dataType,settings.datatype); + + var brothers=this; + brothers.tipmsg={w:{}}; + brothers.forms=forms; + brothers.objects=[]; + + //创建子对象时不再绑定事件; + if(inited===true){ + return false; + } + + forms.each(function(){ + //已经绑定事件时跳过,避免事件重复绑定; + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + var curform=this; + curform.settings=$.extend({},settings); + + var $this=$(curform); + + //防止表单按钮双击提交两次; + curform.validform_status="normal"; //normal | posting | posted; + + //让每个Validform对象都能自定义tipmsg; + $this.data("tipmsg",brothers.tipmsg); + + //bind the blur event; + $this.delegate("[datatype]","blur",function(){ + //判断是否是在提交表单操作时触发的验证请求; + var subpost=arguments[1]; + Validform.util.check.call(this,$this,subpost); + }); + + $this.delegate(":text","keypress",function(event){ + if(event.keyCode==13 && $this.find(":submit").length==0){ + $this.submit(); + } + }); + + //点击表单元素,默认文字消失效果; + //表单元素值比较时的信息提示增强; + //radio、checkbox提示信息增强; + //外调插件初始化; + Validform.util.enhance.call($this,curform.settings.tiptype,curform.settings.usePlugin,curform.settings.tipSweep); + + curform.settings.btnSubmit && $this.find(curform.settings.btnSubmit).bind("click",function(){ + $this.trigger("submit"); + return false; + }); + + $this.submit(function(){ + var subflag=Validform.util.submitForm.call($this,curform.settings); + subflag === undef && (subflag=true); + return subflag; + }); + + $this.find("[type='reset']").add($this.find(curform.settings.btnReset)).bind("click",function(){ + Validform.util.resetForm.call($this); + }); + + }); + + //预创建pop box; + if( settings.tiptype==1 || (settings.tiptype==2 || settings.tiptype==3) && settings.ajaxPost ){ + creatMsgbox(); + } + } + + Validform.defaults={ + tiptype:1, + tipSweep:false, + showAllError:false, + postonce:false, + ajaxPost:false + } + + Validform.util={ + dataType:{ + "*":/[\w\W]+/, + "*6-16":/^[\w\W]{6,16}$/, + "n":/^\d+$/, + "n6-16":/^\d{6,16}$/, + "s":/^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]+$/, + "s6-18":/^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]{6,18}$/, + "p":/^[0-9]{6}$/, + "m":/^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/, + "e":/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, + "url":/^(\w+:\/\/)?\w+(\.\w+)+.*$/ + }, + + toString:Object.prototype.toString, + + isEmpty:function(val){ + return val==="" || val===$.trim(this.attr("tip")); + }, + + getValue:function(obj){ + var inputval, + curform=this; + + if(obj.is(":radio")){ + inputval=curform.find(":radio[name='"+obj.attr("name")+"']:checked").val(); + inputval= inputval===undef ? "" : inputval; + }else if(obj.is(":checkbox")){ + inputval=""; + curform.find(":checkbox[name='"+obj.attr("name")+"']:checked").each(function(){ + inputval +=$(this).val()+','; + }) + inputval= inputval===undef ? "" : inputval; + }else{ + inputval=obj.val(); + } + inputval=$.trim(inputval); + + return Validform.util.isEmpty.call(obj,inputval) ? "" : inputval; + }, + + enhance:function(tiptype,usePlugin,tipSweep,addRule){ + var curform=this; + + //页面上不存在提示信息的标签时,自动创建; + curform.find("[datatype]").each(function(){ + if(tiptype==2){ + if($(this).parent().next().find(".Validform_checktip").length==0){ + $(this).parent().next().append(""); + $(this).siblings(".Validform_checktip").remove(); + } + }else if(tiptype==3 || tiptype==4){ + if($(this).siblings(".Validform_checktip").length==0){ + $(this).parent().append(""); + $(this).parent().next().find(".Validform_checktip").remove(); + } + } + }) + + //表单元素值比较时的信息提示增强; + curform.find("input[recheck]").each(function(){ + //已经绑定事件时跳过; + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + var _this=$(this); + var recheckinput=curform.find("input[name='"+$(this).attr("recheck")+"']"); + recheckinput.bind("keyup",function(){ + if(recheckinput.val()==_this.val() && recheckinput.val() != ""){ + if(recheckinput.attr("tip")){ + if(recheckinput.attr("tip") == recheckinput.val()){return false;} + } + _this.trigger("blur"); + } + }).bind("blur",function(){ + if(recheckinput.val()!=_this.val() && _this.val()!=""){ + if(_this.attr("tip")){ + if(_this.attr("tip") == _this.val()){return false;} + } + _this.trigger("blur"); + } + }); + }); + + //hasDefaultText; + curform.find("[tip]").each(function(){//tip是表单元素的默认提示信息,这是点击清空效果; + //已经绑定事件时跳过; + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + var defaultvalue=$(this).attr("tip"); + var altercss=$(this).attr("altercss"); + $(this).focus(function(){ + if($(this).val()==defaultvalue){ + $(this).val(''); + if(altercss){$(this).removeClass(altercss);} + } + }).blur(function(){ + if($.trim($(this).val())===''){ + $(this).val(defaultvalue); + if(altercss){$(this).addClass(altercss);} + } + }); + }); + + //enhance info feedback for checkbox & radio; + curform.find(":checkbox[datatype],:radio[datatype]").each(function(){ + //已经绑定事件时跳过; + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + var _this=$(this); + var name=_this.attr("name"); + curform.find("[name='"+name+"']").filter(":checkbox,:radio").bind("click",function(){ + //避免多个事件绑定时的取值滞后问题; + setTimeout(function(){ + _this.trigger("blur"); + },0); + }); + + }); + + //select multiple; + curform.find("select[datatype][multiple]").bind("click",function(){ + var _this=$(this); + setTimeout(function(){ + _this.trigger("blur"); + },0); + }); + + //plugins here to start; + Validform.util.usePlugin.call(curform,usePlugin,tiptype,tipSweep,addRule); + }, + + usePlugin:function(plugin,tiptype,tipSweep,addRule){ + /* + plugin:settings.usePlugin; + tiptype:settings.tiptype; + tipSweep:settings.tipSweep; + addRule:是否在addRule时触发; + */ + + var curform=this, + plugin=plugin || {}; + //swfupload; + if(curform.find("input[plugin='swfupload']").length && typeof(swfuploadhandler) != "undefined"){ + + var custom={ + custom_settings:{ + form:curform, + showmsg:function(msg,type,obj){ + Validform.util.showmsg.call(curform,msg,tiptype,{obj:curform.find("input[plugin='swfupload']"),type:type,sweep:tipSweep}); + } + } + }; + + custom=$.extend(true,{},plugin.swfupload,custom); + + curform.find("input[plugin='swfupload']").each(function(n){ + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + $(this).val(""); + swfuploadhandler.init(custom,n); + }); + + } + + //datepicker; + if(curform.find("input[plugin='datepicker']").length && $.fn.datePicker){ + plugin.datepicker=plugin.datepicker || {}; + + if(plugin.datepicker.format){ + Date.format=plugin.datepicker.format; + delete plugin.datepicker.format; + } + if(plugin.datepicker.firstDayOfWeek){ + Date.firstDayOfWeek=plugin.datepicker.firstDayOfWeek; + delete plugin.datepicker.firstDayOfWeek; + } + + curform.find("input[plugin='datepicker']").each(function(n){ + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + plugin.datepicker.callback && $(this).bind("dateSelected",function(){ + var d=new Date( $.event._dpCache[this._dpId].getSelected()[0] ).asString(Date.format); + plugin.datepicker.callback(d,this); + }); + $(this).datePicker(plugin.datepicker); + }); + } + + //passwordstrength; + if(curform.find("input[plugin*='passwordStrength']").length && $.fn.passwordStrength){ + plugin.passwordstrength=plugin.passwordstrength || {}; + plugin.passwordstrength.showmsg=function(obj,msg,type){ + Validform.util.showmsg.call(curform,msg,tiptype,{obj:obj,type:type,sweep:tipSweep}); + }; + + curform.find("input[plugin='passwordStrength']").each(function(n){ + if(this.validform_inited=="inited"){return true;} + this.validform_inited="inited"; + + $(this).passwordStrength(plugin.passwordstrength); + }); + } + + //jqtransform; + if(addRule!="addRule" && plugin.jqtransform && $.fn.jqTransSelect){ + if(curform[0].jqTransSelected=="true"){return;}; + curform[0].jqTransSelected="true"; + + var jqTransformHideSelect = function(oTarget){ + var ulVisible = $('.jqTransformSelectWrapper ul:visible'); + ulVisible.each(function(){ + var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0); + //do not hide if click on the label object associated to the select + if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();} + }); + }; + + /* Check for an external click */ + var jqTransformCheckExternalClick = function(event) { + if ($(event.target).parents('.jqTransformSelectWrapper').length === 0) { jqTransformHideSelect($(event.target)); } + }; + + var jqTransformAddDocumentListener = function (){ + $(document).mousedown(jqTransformCheckExternalClick); + }; + + if(plugin.jqtransform.selector){ + curform.find(plugin.jqtransform.selector).filter('input:submit, input:reset, input[type="button"]').jqTransInputButton(); + curform.find(plugin.jqtransform.selector).filter('input:text, input:password').jqTransInputText(); + curform.find(plugin.jqtransform.selector).filter('input:checkbox').jqTransCheckBox(); + curform.find(plugin.jqtransform.selector).filter('input:radio').jqTransRadio(); + curform.find(plugin.jqtransform.selector).filter('textarea').jqTransTextarea(); + if(curform.find(plugin.jqtransform.selector).filter("select").length > 0 ){ + curform.find(plugin.jqtransform.selector).filter("select").jqTransSelect(); + jqTransformAddDocumentListener(); + } + + }else{ + curform.jqTransform(); + } + + curform.find(".jqTransformSelectWrapper").find("li a").click(function(){ + $(this).parents(".jqTransformSelectWrapper").find("select").trigger("blur"); + }); + } + + }, + + getNullmsg:function(curform){ + var obj=this; + var reg=/[\u4E00-\u9FA5\uf900-\ufa2da-zA-Z\s]+/g; + var nullmsg; + + var label=curform[0].settings.label || ".Validform_label"; + label=obj.siblings(label).eq(0).text() || obj.siblings().find(label).eq(0).text() || obj.parent().siblings(label).eq(0).text() || obj.parent().siblings().find(label).eq(0).text(); + label=label.replace(/\s(?![a-zA-Z])/g,"").match(reg); + label=label? label.join("") : [""]; + + reg=/\{(.+)\|(.+)\}/; + nullmsg=curform.data("tipmsg").s || tipmsg.s; + + if(label != ""){ + nullmsg=nullmsg.replace(/\{0\|(.+)\}/,label); + if(obj.attr("recheck")){ + nullmsg=nullmsg.replace(/\{(.+)\}/,""); + obj.attr("nullmsg",nullmsg); + return nullmsg; + } + }else{ + nullmsg=obj.is(":checkbox,:radio,select") ? nullmsg.replace(/\{0\|(.+)\}/,"") : nullmsg.replace(/\{0\|(.+)\}/,"$1"); + } + nullmsg=obj.is(":checkbox,:radio,select") ? nullmsg.replace(reg,"$2") : nullmsg.replace(reg,"$1"); + + obj.attr("nullmsg",nullmsg); + return nullmsg; + }, + + getErrormsg:function(curform,datatype,recheck){ + var regxp=/^(.+?)((\d+)-(\d+))?$/, + regxp2=/^(.+?)(\d+)-(\d+)$/, + regxp3=/(.*?)\d+(.+?)\d+(.*)/, + mac=datatype.match(regxp), + temp,str; + + //如果是值不一样而报错; + if(recheck=="recheck"){ + str=curform.data("tipmsg").reck || tipmsg.reck; + return str; + } + + var tipmsg_w_ex=$.extend({},tipmsg.w,curform.data("tipmsg").w); + + //如果原来就有,直接显示该项的提示信息; + if(mac[0] in tipmsg_w_ex){ + return curform.data("tipmsg").w[mac[0]] || tipmsg.w[mac[0]]; + } + + //没有的话在提示对象里查找相似; + for(var name in tipmsg_w_ex){ + if(name.indexOf(mac[1])!=-1 && regxp2.test(name)){ + str=(curform.data("tipmsg").w[name] || tipmsg.w[name]).replace(regxp3,"$1"+mac[3]+"$2"+mac[4]+"$3"); + curform.data("tipmsg").w[mac[0]]=str; + + return str; + } + + } + + return curform.data("tipmsg").def || tipmsg.def; + }, + + _regcheck:function(datatype,gets,obj,curform){ + var curform=curform, + info=null, + passed=false, + reg=/\/.+\//g, + regex=/^(.+?)(\d+)-(\d+)$/, + type=3;//default set to wrong type, 2,3,4; + + //datatype有三种情况:正则,函数和直接绑定的正则; + + //直接是正则; + if(reg.test(datatype)){ + var regstr=datatype.match(reg)[0].slice(1,-1); + var param=datatype.replace(reg,""); + var rexp=RegExp(regstr,param); + + passed=rexp.test(gets); + + //function; + }else if(Validform.util.toString.call(Validform.util.dataType[datatype])=="[object Function]"){ + passed=Validform.util.dataType[datatype](gets,obj,curform,Validform.util.dataType); + if(passed === true || passed===undef){ + passed = true; + }else{ + info= passed; + passed=false; + } + + //自定义正则; + }else{ + //自动扩展datatype; + if(!(datatype in Validform.util.dataType)){ + var mac=datatype.match(regex), + temp; + + if(!mac){ + passed=false; + info=curform.data("tipmsg").undef||tipmsg.undef; + }else{ + for(var name in Validform.util.dataType){ + temp=name.match(regex); + if(!temp){continue;} + if(mac[1]===temp[1]){ + var str=Validform.util.dataType[name].toString(), + param=str.match(/\/[mgi]*/g)[1].replace("\/",""), + regxp=new RegExp("\\{"+temp[2]+","+temp[3]+"\\}","g"); + str=str.replace(/\/[mgi]*/g,"\/").replace(regxp,"{"+mac[2]+","+mac[3]+"}").replace(/^\//,"").replace(/\/$/,""); + Validform.util.dataType[datatype]=new RegExp(str,param); + break; + } + } + } + } + + if(Validform.util.toString.call(Validform.util.dataType[datatype])=="[object RegExp]"){ + passed=Validform.util.dataType[datatype].test(gets); + } + + } + + + if(passed){ + type=2; + info=obj.attr("sucmsg") || curform.data("tipmsg").r||tipmsg.r; + + //规则验证通过后,还需要对绑定recheck的对象进行值比较; + if(obj.attr("recheck")){ + var theother=curform.find("input[name='"+obj.attr("recheck")+"']:first"); + if(gets!=theother.val()){ + passed=false; + type=3; + info=obj.attr("errormsg") || Validform.util.getErrormsg.call(obj,curform,datatype,"recheck"); + } + } + }else{ + info=info || obj.attr("errormsg") || Validform.util.getErrormsg.call(obj,curform,datatype); + + //验证不通过且为空时; + if(Validform.util.isEmpty.call(obj,gets)){ + info=obj.attr("nullmsg") || Validform.util.getNullmsg.call(obj,curform); + } + } + + return{ + passed:passed, + type:type, + info:info + }; + + }, + + regcheck:function(datatype,gets,obj){ + /* + datatype:datatype; + gets:inputvalue; + obj:input object; + */ + var curform=this, + info=null, + passed=false, + type=3;//default set to wrong type, 2,3,4; + + //ignore; + if(obj.attr("ignore")==="ignore" && Validform.util.isEmpty.call(obj,gets)){ + if(obj.data("cked")){ + info=""; + } + + return { + passed:true, + type:4, + info:info + }; + } + + obj.data("cked","cked");//do nothing if is the first time validation triggered; + + var dtype=Validform.util.parseDatatype(datatype); + var res; + for(var eithor=0; eithor[["/regexp/"],["phone"],["tel","s","e"],["f","e"]]; + */ + + var reg=/\/.+?\/[mgi]*(?=(,|$|\||\s))|[\w\*-]+/g, + dtype=datatype.match(reg), + sepor=datatype.replace(reg,"").replace(/\s*/g,"").split(""), + arr=[], + m=0; + + arr[0]=[]; + arr[0].push(dtype[0]); + for(var n=0;n正在检测 | 2=>通过, sweep:true | false}, + triggered:在blur或提交表单触发的验证中,有些情况不需要显示提示文字,如自定义弹出提示框的显示方式,不需要每次blur时就马上弹出提示; + + tiptype:1\2\3时都有坑能会弹出自定义提示框 + tiptype:1时在triggered bycheck时不弹框 + tiptype:2\3时在ajax时弹框 + tipSweep为true时在triggered bycheck时不触发showmsg,但ajax出错的情况下要提示 + */ + + //如果msg为undefined,那么就没必要执行后面的操作,ignore有可能会出现这情况; + if(msg==undef){return;} + + //tipSweep为true,且当前不是处于错误状态时,blur事件不触发信息显示; + if(triggered=="bycheck" && o.sweep && (o.obj && !o.obj.is(".Validform_error") || typeof type == "function")){return;} + + $.extend(o,{curform:this}); + + if(typeof type == "function"){ + type(msg,o,Validform.util.cssctl); + return; + } + + if(type==1 || triggered=="byajax" && type!=4){ + msgobj.find(".Validform_info").html(msg); + } + + //tiptypt=1时,blur触发showmsg,验证是否通过都不弹框,提交表单触发的话,只要验证出错,就弹框; + if(type==1 && triggered!="bycheck" && o.type!=2 || triggered=="byajax" && type!=4){ + msghidden=false; + msgobj.find(".iframe").css("height",msgobj.outerHeight()); + msgobj.show(); + setCenter(msgobj,100); + } + + if(type==2 && o.obj){ + o.obj.parent().next().find(".Validform_checktip").html(msg); + Validform.util.cssctl(o.obj.parent().next().find(".Validform_checktip"),o.type); + } + + if((type==3 || type==4) && o.obj){ + o.obj.siblings(".Validform_checktip").html(msg); + Validform.util.cssctl(o.obj.siblings(".Validform_checktip"),o.type); + } + + }, + + cssctl:function(obj,status){ + switch(status){ + case 1: + obj.removeClass("Validform_right Validform_wrong").addClass("Validform_checktip Validform_loading");//checking; + break; + case 2: + obj.removeClass("Validform_wrong Validform_loading").addClass("Validform_checktip Validform_right");//passed; + break; + case 4: + obj.removeClass("Validform_right Validform_wrong Validform_loading").addClass("Validform_checktip");//for ignore; + break; + default: + obj.removeClass("Validform_right Validform_loading").addClass("Validform_checktip Validform_wrong");//wrong; + } + }, + + check:function(curform,subpost,bool){ + /* + 检测单个表单元素; + 验证通过返回true,否则返回false、实时验证返回值为ajax; + bool,传入true则只检测不显示提示信息; + */ + var settings=curform[0].settings; + var subpost=subpost || ""; + var inputval=Validform.util.getValue.call(curform,$(this)); + + //隐藏或绑定dataIgnore的表单对象不做验证; + if(settings.ignoreHidden && $(this).is(":hidden") || $(this).data("dataIgnore")==="dataIgnore"){ + return true; + } + + //dragonfly=true时,没有绑定ignore,值为空不做验证,但验证不通过; + if(settings.dragonfly && !$(this).data("cked") && Validform.util.isEmpty.call($(this),inputval) && $(this).attr("ignore")!="ignore"){ + return false; + } + + var flag=Validform.util.regcheck.call(curform,$(this).attr("datatype"),inputval,$(this)); + + //值没变化不做检测,这时要考虑recheck情况; + //不是在提交表单时触发的ajax验证; + if(inputval==this.validform_lastval && !$(this).attr("recheck") && subpost==""){ + return flag.passed ? true : false; + } + + this.validform_lastval=inputval;//存储当前值; + + var _this; + errorobj=_this=$(this); + + if(!flag.passed){ + //取消正在进行的ajax验证; + Validform.util.abort.call(_this[0]); + + if(!bool){ + //传入"bycheck",指示当前是check方法里调用的,当tiptype=1时,blur事件不让触发错误信息显示; + Validform.util.showmsg.call(curform,flag.info,settings.tiptype,{obj:$(this),type:flag.type,sweep:settings.tipSweep},"bycheck"); + + !settings.tipSweep && _this.addClass("Validform_error"); + } + return false; + } + + //验证通过的话,如果绑定有ajaxurl,要执行ajax检测; + //当ignore="ignore"时,为空值可以通过验证,这时不需要ajax检测; + var ajaxurl=$(this).attr("ajaxurl"); + if(ajaxurl && !Validform.util.isEmpty.call($(this),inputval) && !bool){ + var inputobj=$(this); + + //当提交表单时,表单中的某项已经在执行ajax检测,这时需要让该项ajax结束后继续提交表单; + if(subpost=="postform"){ + inputobj[0].validform_subpost="postform"; + }else{ + inputobj[0].validform_subpost=""; + } + + if(inputobj[0].validform_valid==="posting" && inputval==inputobj[0].validform_ckvalue){return "ajax";} + + inputobj[0].validform_valid="posting"; + inputobj[0].validform_ckvalue=inputval; + Validform.util.showmsg.call(curform,curform.data("tipmsg").c||tipmsg.c,settings.tiptype,{obj:inputobj,type:1,sweep:settings.tipSweep},"bycheck"); + + Validform.util.abort.call(_this[0]); + + var ajaxsetup=$.extend(true,{},settings.ajaxurl || {}); + + var localconfig={ + type: "POST", + cache:false, + url: ajaxurl, + data: "param="+encodeURIComponent(inputval)+"&name="+encodeURIComponent($(this).attr("name")), + success: function(data){ + if($.trim(data.status)==="y"){ + inputobj[0].validform_valid="true"; + data.info && inputobj.attr("sucmsg",data.info); + Validform.util.showmsg.call(curform,inputobj.attr("sucmsg") || curform.data("tipmsg").r||tipmsg.r,settings.tiptype,{obj:inputobj,type:2,sweep:settings.tipSweep},"bycheck"); + _this.removeClass("Validform_error"); + errorobj=null; + if(inputobj[0].validform_subpost=="postform"){ + curform.trigger("submit"); + } + }else{ + inputobj[0].validform_valid=data.info; + Validform.util.showmsg.call(curform,data.info,settings.tiptype,{obj:inputobj,type:3,sweep:settings.tipSweep}); + _this.addClass("Validform_error"); + } + _this[0].validform_ajax=null; + }, + error: function(data){ + if(data.status=="200"){ + if(data.responseText=="y"){ + ajaxsetup.success({"status":"y"}); + }else{ + ajaxsetup.success({"status":"n","info":data.responseText}); + } + return false; + } + + //正在检测时,要检测的数据发生改变,这时要终止当前的ajax。不是这种情况引起的ajax错误,那么显示相关错误信息; + if(data.statusText!=="abort"){ + var msg="status: "+data.status+"; statusText: "+data.statusText; + + Validform.util.showmsg.call(curform,msg,settings.tiptype,{obj:inputobj,type:3,sweep:settings.tipSweep}); + _this.addClass("Validform_error"); + } + + inputobj[0].validform_valid=data.statusText; + _this[0].validform_ajax=null; + + //localconfig.error返回true表示还需要执行temp_err; + return true; + } + } + + if(ajaxsetup.success){ + var temp_suc=ajaxsetup.success; + ajaxsetup.success=function(data){ + localconfig.success(data); + temp_suc(data,inputobj); + } + } + + if(ajaxsetup.error){ + var temp_err=ajaxsetup.error; + ajaxsetup.error=function(data){ + //localconfig.error返回false表示不需要执行temp_err; + localconfig.error(data) && temp_err(data,inputobj); + } + } + + ajaxsetup=$.extend({},localconfig,ajaxsetup,{dataType:"json"}); + _this[0].validform_ajax=$.ajax(ajaxsetup); + + return "ajax"; + }else if(ajaxurl && Validform.util.isEmpty.call($(this),inputval)){ + Validform.util.abort.call(_this[0]); + _this[0].validform_valid="true"; + } + + if(!bool){ + Validform.util.showmsg.call(curform,flag.info,settings.tiptype,{obj:$(this),type:flag.type,sweep:settings.tipSweep},"bycheck"); + _this.removeClass("Validform_error"); + } + errorobj=null; + + return true; + + }, + + submitForm:function(settings,flg,url,ajaxPost,sync){ + /* + flg===true时跳过验证直接提交; + ajaxPost==="ajaxPost"指示当前表单以ajax方式提交; + */ + var curform=this; + + //表单正在提交时点击提交按钮不做反应; + if(curform[0].validform_status==="posting"){return false;} + + //要求只能提交一次时; + if(settings.postonce && curform[0].validform_status==="posted"){return false;} + + var beforeCheck=settings.beforeCheck && settings.beforeCheck(curform); + if(beforeCheck===false){return false;} + + var flag=true, + inflag; + + curform.find("[datatype]").each(function(){ + //跳过验证; + if(flg){ + return false; + } + + //隐藏或绑定dataIgnore的表单对象不做验证; + if(settings.ignoreHidden && $(this).is(":hidden") || $(this).data("dataIgnore")==="dataIgnore"){ + return true; + } + + var inputval=Validform.util.getValue.call(curform,$(this)), + _this; + errorobj=_this=$(this); + + inflag=Validform.util.regcheck.call(curform,$(this).attr("datatype"),inputval,$(this)); + + if(!inflag.passed){ + Validform.util.showmsg.call(curform,inflag.info,settings.tiptype,{obj:$(this),type:inflag.type,sweep:settings.tipSweep}); + _this.addClass("Validform_error"); + + if(!settings.showAllError){ + _this.focus(); + flag=false; + return false; + } + + flag && (flag=false); + return true; + } + + //当ignore="ignore"时,为空值可以通过验证,这时不需要ajax检测; + if($(this).attr("ajaxurl") && !Validform.util.isEmpty.call($(this),inputval)){ + if(this.validform_valid!=="true"){ + var thisobj=$(this); + Validform.util.showmsg.call(curform,curform.data("tipmsg").v||tipmsg.v,settings.tiptype,{obj:thisobj,type:3,sweep:settings.tipSweep}); + _this.addClass("Validform_error"); + + thisobj.trigger("blur",["postform"]);//continue the form post; + + if(!settings.showAllError){ + flag=false; + return false; + } + + flag && (flag=false); + return true; + } + }else if($(this).attr("ajaxurl") && Validform.util.isEmpty.call($(this),inputval)){ + Validform.util.abort.call(this); + this.validform_valid="true"; + } + + Validform.util.showmsg.call(curform,inflag.info,settings.tiptype,{obj:$(this),type:inflag.type,sweep:settings.tipSweep}); + _this.removeClass("Validform_error"); + errorobj=null; + }); + + if(settings.showAllError){ + curform.find(".Validform_error:first").focus(); + } + + if(flag){ + var beforeSubmit=settings.beforeSubmit && settings.beforeSubmit(curform); + if(beforeSubmit===false){return false;} + + curform[0].validform_status="posting"; + + if(settings.ajaxPost || ajaxPost==="ajaxPost"){ + //获取配置参数; + var ajaxsetup=$.extend(true,{},settings.ajaxpost || {}); + //有可能需要动态的改变提交地址,所以把action所指定的url层级设为最低; + ajaxsetup.url=url || ajaxsetup.url || settings.url || curform.attr("action"); + + //byajax:ajax时,tiptye为1、2或3需要弹出提示框; + Validform.util.showmsg.call(curform,curform.data("tipmsg").p||tipmsg.p,settings.tiptype,{obj:curform,type:1,sweep:settings.tipSweep},"byajax"); + + //方法里的优先级要高; + //有undefined情况; + if(sync){ + ajaxsetup.async=false; + }else if(sync===false){ + ajaxsetup.async=true; + } + + if(ajaxsetup.success){ + var temp_suc=ajaxsetup.success; + ajaxsetup.success=function(data){ + settings.callback && settings.callback(data); + curform[0].validform_ajax=null; + if($.trim(data.status)==="y"){ + curform[0].validform_status="posted"; + }else{ + curform[0].validform_status="normal"; + } + + temp_suc(data,curform); + } + } + + if(ajaxsetup.error){ + var temp_err=ajaxsetup.error; + ajaxsetup.error=function(data){ + settings.callback && settings.callback(data); + curform[0].validform_status="normal"; + curform[0].validform_ajax=null; + + temp_err(data,curform); + } + } + + var localconfig={ + type: "POST", + async:true, + data: curform.serializeArray(), + success: function(data){ + if($.trim(data.status)==="y"){ + //成功提交; + curform[0].validform_status="posted"; + Validform.util.showmsg.call(curform,data.info,settings.tiptype,{obj:curform,type:2,sweep:settings.tipSweep},"byajax"); + }else{ + //提交出错; + curform[0].validform_status="normal"; + Validform.util.showmsg.call(curform,data.info,settings.tiptype,{obj:curform,type:3,sweep:settings.tipSweep},"byajax"); + } + + settings.callback && settings.callback(data); + curform[0].validform_ajax=null; + }, + error: function(data){ + var msg="status: "+data.status+"; statusText: "+data.statusText; + + Validform.util.showmsg.call(curform,msg,settings.tiptype,{obj:curform,type:3,sweep:settings.tipSweep},"byajax"); + + settings.callback && settings.callback(data); + curform[0].validform_status="normal"; + curform[0].validform_ajax=null; + } + } + + ajaxsetup=$.extend({},localconfig,ajaxsetup,{dataType:"json"}); + + curform[0].validform_ajax=$.ajax(ajaxsetup); + + }else{ + if(!settings.postonce){ + curform[0].validform_status="normal"; + } + + var url=url || settings.url; + if(url){ + curform.attr("action",url); + } + + return settings.callback && settings.callback(curform); + } + } + + return false; + + }, + + resetForm:function(){ + var brothers=this; + brothers.each(function(){ + this.reset && this.reset(); + this.validform_status="normal"; + }); + + brothers.find(".Validform_right").text(""); + brothers.find(".passwordStrength").children().removeClass("bgStrength"); + brothers.find(".Validform_checktip").removeClass("Validform_wrong Validform_right Validform_loading"); + brothers.find(".Validform_error").removeClass("Validform_error"); + brothers.find("[datatype]").removeData("cked").removeData("dataIgnore").each(function(){ + this.validform_lastval=null; + }); + brothers.eq(0).find("input:first").focus(); + }, + + abort:function(){ + if(this.validform_ajax){ + this.validform_ajax.abort(); + } + } + + } + + $.Datatype=Validform.util.dataType; + + Validform.prototype={ + dataType:Validform.util.dataType, + + eq:function(n){ + var obj=this; + + if(n>=obj.forms.length){ + return null; + } + + if(!(n in obj.objects)){ + obj.objects[n]=new Validform($(obj.forms[n]).get(),{},true); + } + + return obj.objects[n]; + + }, + + resetStatus:function(){ + var obj=this; + $(obj.forms).each(function(){ + this.validform_status="normal"; + }); + + return this; + }, + + setStatus:function(status){ + var obj=this; + $(obj.forms).each(function(){ + this.validform_status=status || "posting"; + }); + + return this; + }, + + getStatus:function(){ + var obj=this; + var status=$(obj.forms)[0].validform_status; + + return status; + }, + + ignore:function(selector){ + var obj=this; + var selector=selector || "[datatype]" + + $(obj.forms).find(selector).each(function(){ + $(this).data("dataIgnore","dataIgnore").removeClass("Validform_error"); + }); + + return this; + }, + + unignore:function(selector){ + var obj=this; + var selector=selector || "[datatype]" + + $(obj.forms).find(selector).each(function(){ + $(this).removeData("dataIgnore"); + }); + + return this; + }, + + addRule:function(rule){ + /* + rule => [{ + ele:"#id", + datatype:"*", + errormsg:"出错提示文字!", + nullmsg:"为空时的提示文字!", + tip:"默认显示的提示文字", + altercss:"gray", + ignore:"ignore", + ajaxurl:"valid.php", + recheck:"password", + plugin:"passwordStrength" + },{},{},...] + */ + var obj=this; + var rule=rule || []; + + for(var index=0; index0?top:0); + + obj.css({ + left:left + }).animate({ + top : top + },{ duration:time , queue:false }); + } + + function creatMsgbox(){ + if($("#Validform_msg").length!==0){return false;} + msgobj=$('
'+tipmsg.tit+'χ
').appendTo("body");//提示信息框; + msgobj.find("a.Validform_close").click(function(){ + msgobj.hide(); + msghidden=true; + if(errorobj){ + errorobj.focus().addClass("Validform_error"); + } + return false; + }).focus(function(){this.blur();}); + + $(window).bind("scroll resize",function(){ + !msghidden && setCenter(msgobj,400); + }); + }; + + //公用方法显示&关闭信息提示框; + $.Showmsg=function(msg){ + creatMsgbox(); + Validform.util.showmsg.call(win,msg,1,{}); + }; + + $.Hidemsg=function(){ + msgobj.hide(); + msghidden=true; + }; + +})(jQuery,window); \ No newline at end of file diff --git a/WebContent/js/Validform_v5.3.2_min.js b/WebContent/js/Validform_v5.3.2_min.js new file mode 100644 index 0000000000000000000000000000000000000000..e01a373fcdcab6f957c62da1f5b917ac13a91aa9 --- /dev/null +++ b/WebContent/js/Validform_v5.3.2_min.js @@ -0,0 +1,8 @@ +/* + Validform version 5.3.2 + By sean during April 7, 2010 - March 26, 2013 + For more information, please visit http://validform.rjboy.cn + Validform is available under the terms of the MIT license. +*/ + +(function(d,f,b){var g=null,j=null,i=true;var e={tit:"提示信息",w:{"*":"不能为空!","*6-16":"请填写6到16位任意字符!","n":"请填写数字!","n6-16":"请填写6到16位数字!","s":"不能输入特殊字符!","s6-18":"请填写6到18位字符!","p":"请填写邮政编码!","m":"请填写手机号码!","e":"邮箱地址格式不对!","url":"请填写网址!"},def:"请填写正确信息!",undef:"datatype未定义!",reck:"两次输入的内容不一致!",r:"通过信息验证!",c:"正在检测信息…",s:"请{填写|选择}{0|信息}!",v:"所填信息没有经过验证,请稍后…",p:"正在提交数据…"};d.Tipmsg=e;var a=function(l,n,k){var n=d.extend({},a.defaults,n);n.datatype&&d.extend(a.util.dataType,n.datatype);var m=this;m.tipmsg={w:{}};m.forms=l;m.objects=[];if(k===true){return false}l.each(function(){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";var p=this;p.settings=d.extend({},n);var o=d(p);p.validform_status="normal";o.data("tipmsg",m.tipmsg);o.delegate("[datatype]","blur",function(){var q=arguments[1];a.util.check.call(this,o,q)});o.delegate(":text","keypress",function(q){if(q.keyCode==13&&o.find(":submit").length==0){o.submit()}});a.util.enhance.call(o,p.settings.tiptype,p.settings.usePlugin,p.settings.tipSweep);p.settings.btnSubmit&&o.find(p.settings.btnSubmit).bind("click",function(){o.trigger("submit");return false});o.submit(function(){var q=a.util.submitForm.call(o,p.settings);q===b&&(q=true);return q});o.find("[type='reset']").add(o.find(p.settings.btnReset)).bind("click",function(){a.util.resetForm.call(o)})});if(n.tiptype==1||(n.tiptype==2||n.tiptype==3)&&n.ajaxPost){c()}};a.defaults={tiptype:1,tipSweep:false,showAllError:false,postonce:false,ajaxPost:false};a.util={dataType:{"*":/[\w\W]+/,"*6-16":/^[\w\W]{6,16}$/,n:/^\d+$/,"n6-16":/^\d{6,16}$/,s:/^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]+$/,"s6-18":/^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]{6,18}$/,p:/^[0-9]{6}$/,m:/^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/,e:/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,url:/^(\w+:\/\/)?\w+(\.\w+)+.*$/},toString:Object.prototype.toString,isEmpty:function(k){return k===""||k===d.trim(this.attr("tip"))},getValue:function(m){var l,k=this;if(m.is(":radio")){l=k.find(":radio[name='"+m.attr("name")+"']:checked").val();l=l===b?"":l}else{if(m.is(":checkbox")){l="";k.find(":checkbox[name='"+m.attr("name")+"']:checked").each(function(){l+=d(this).val()+","});l=l===b?"":l}else{l=m.val()}}l=d.trim(l);return a.util.isEmpty.call(m,l)?"":l},enhance:function(l,m,n,k){var o=this;o.find("[datatype]").each(function(){if(l==2){if(d(this).parent().next().find(".Validform_checktip").length==0){d(this).parent().next().append("");d(this).siblings(".Validform_checktip").remove()}}else{if(l==3||l==4){if(d(this).siblings(".Validform_checktip").length==0){d(this).parent().append("");d(this).parent().next().find(".Validform_checktip").remove()}}}});o.find("input[recheck]").each(function(){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";var q=d(this);var p=o.find("input[name='"+d(this).attr("recheck")+"']");p.bind("keyup",function(){if(p.val()==q.val()&&p.val()!=""){if(p.attr("tip")){if(p.attr("tip")==p.val()){return false}}q.trigger("blur")}}).bind("blur",function(){if(p.val()!=q.val()&&q.val()!=""){if(q.attr("tip")){if(q.attr("tip")==q.val()){return false}}q.trigger("blur")}})});o.find("[tip]").each(function(){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";var q=d(this).attr("tip");var p=d(this).attr("altercss");d(this).focus(function(){if(d(this).val()==q){d(this).val("");if(p){d(this).removeClass(p)}}}).blur(function(){if(d.trim(d(this).val())===""){d(this).val(q);if(p){d(this).addClass(p)}}})});o.find(":checkbox[datatype],:radio[datatype]").each(function(){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";var q=d(this);var p=q.attr("name");o.find("[name='"+p+"']").filter(":checkbox,:radio").bind("click",function(){setTimeout(function(){q.trigger("blur")},0)})});o.find("select[datatype][multiple]").bind("click",function(){var p=d(this);setTimeout(function(){p.trigger("blur")},0)});a.util.usePlugin.call(o,m,l,n,k)},usePlugin:function(o,l,n,r){var s=this,o=o||{};if(s.find("input[plugin='swfupload']").length&&typeof(swfuploadhandler)!="undefined"){var k={custom_settings:{form:s,showmsg:function(v,t,u){a.util.showmsg.call(s,v,l,{obj:s.find("input[plugin='swfupload']"),type:t,sweep:n})}}};k=d.extend(true,{},o.swfupload,k);s.find("input[plugin='swfupload']").each(function(t){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";d(this).val("");swfuploadhandler.init(k,t)})}if(s.find("input[plugin='datepicker']").length&&d.fn.datePicker){o.datepicker=o.datepicker||{};if(o.datepicker.format){Date.format=o.datepicker.format;delete o.datepicker.format}if(o.datepicker.firstDayOfWeek){Date.firstDayOfWeek=o.datepicker.firstDayOfWeek;delete o.datepicker.firstDayOfWeek}s.find("input[plugin='datepicker']").each(function(t){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";o.datepicker.callback&&d(this).bind("dateSelected",function(){var u=new Date(d.event._dpCache[this._dpId].getSelected()[0]).asString(Date.format);o.datepicker.callback(u,this)});d(this).datePicker(o.datepicker)})}if(s.find("input[plugin*='passwordStrength']").length&&d.fn.passwordStrength){o.passwordstrength=o.passwordstrength||{};o.passwordstrength.showmsg=function(u,v,t){a.util.showmsg.call(s,v,l,{obj:u,type:t,sweep:n})};s.find("input[plugin='passwordStrength']").each(function(t){if(this.validform_inited=="inited"){return true}this.validform_inited="inited";d(this).passwordStrength(o.passwordstrength)})}if(r!="addRule"&&o.jqtransform&&d.fn.jqTransSelect){if(s[0].jqTransSelected=="true"){return}s[0].jqTransSelected="true";var m=function(t){var u=d(".jqTransformSelectWrapper ul:visible");u.each(function(){var v=d(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);if(!(t&&v.oLabel&&v.oLabel.get(0)==t.get(0))){d(this).hide()}})};var p=function(t){if(d(t.target).parents(".jqTransformSelectWrapper").length===0){m(d(t.target))}};var q=function(){d(document).mousedown(p)};if(o.jqtransform.selector){s.find(o.jqtransform.selector).filter('input:submit, input:reset, input[type="button"]').jqTransInputButton();s.find(o.jqtransform.selector).filter("input:text, input:password").jqTransInputText();s.find(o.jqtransform.selector).filter("input:checkbox").jqTransCheckBox();s.find(o.jqtransform.selector).filter("input:radio").jqTransRadio();s.find(o.jqtransform.selector).filter("textarea").jqTransTextarea();if(s.find(o.jqtransform.selector).filter("select").length>0){s.find(o.jqtransform.selector).filter("select").jqTransSelect();q()}}else{s.jqTransform()}s.find(".jqTransformSelectWrapper").find("li a").click(function(){d(this).parents(".jqTransformSelectWrapper").find("select").trigger("blur")})}},getNullmsg:function(o){var n=this;var m=/[\u4E00-\u9FA5\uf900-\ufa2da-zA-Z\s]+/g;var k;var l=o[0].settings.label||".Validform_label";l=n.siblings(l).eq(0).text()||n.siblings().find(l).eq(0).text()||n.parent().siblings(l).eq(0).text()||n.parent().siblings().find(l).eq(0).text();l=l.replace(/\s(?![a-zA-Z])/g,"").match(m);l=l?l.join(""):[""];m=/\{(.+)\|(.+)\}/;k=o.data("tipmsg").s||e.s;if(l!=""){k=k.replace(/\{0\|(.+)\}/,l);if(n.attr("recheck")){k=k.replace(/\{(.+)\}/,"");n.attr("nullmsg",k);return k}}else{k=n.is(":checkbox,:radio,select")?k.replace(/\{0\|(.+)\}/,""):k.replace(/\{0\|(.+)\}/,"$1")}k=n.is(":checkbox,:radio,select")?k.replace(m,"$2"):k.replace(m,"$1");n.attr("nullmsg",k);return k},getErrormsg:function(s,n,u){var o=/^(.+?)((\d+)-(\d+))?$/,m=/^(.+?)(\d+)-(\d+)$/,l=/(.*?)\d+(.+?)\d+(.*)/,q=n.match(o),t,r;if(u=="recheck"){r=s.data("tipmsg").reck||e.reck;return r}var p=d.extend({},e.w,s.data("tipmsg").w);if(q[0] in p){return s.data("tipmsg").w[q[0]]||e.w[q[0]]}for(var k in p){if(k.indexOf(q[1])!=-1&&m.test(k)){r=(s.data("tipmsg").w[k]||e.w[k]).replace(l,"$1"+q[3]+"$2"+q[4]+"$3");s.data("tipmsg").w[q[0]]=r;return r}}return s.data("tipmsg").def||e.def},_regcheck:function(t,n,u,A){var A=A,y=null,v=false,o=/\/.+\//g,k=/^(.+?)(\d+)-(\d+)$/,l=3;if(o.test(t)){var s=t.match(o)[0].slice(1,-1);var r=t.replace(o,"");var q=RegExp(s,r);v=q.test(n)}else{if(a.util.toString.call(a.util.dataType[t])=="[object Function]"){v=a.util.dataType[t](n,u,A,a.util.dataType);if(v===true||v===b){v=true}else{y=v;v=false}}else{if(!(t in a.util.dataType)){var m=t.match(k),z;if(!m){v=false;y=A.data("tipmsg").undef||e.undef}else{for(var B in a.util.dataType){z=B.match(k);if(!z){continue}if(m[1]===z[1]){var w=a.util.dataType[B].toString(),r=w.match(/\/[mgi]*/g)[1].replace("/",""),x=new RegExp("\\{"+z[2]+","+z[3]+"\\}","g");w=w.replace(/\/[mgi]*/g,"/").replace(x,"{"+m[2]+","+m[3]+"}").replace(/^\//,"").replace(/\/$/,"");a.util.dataType[t]=new RegExp(w,r);break}}}}if(a.util.toString.call(a.util.dataType[t])=="[object RegExp]"){v=a.util.dataType[t].test(n)}}}if(v){l=2;y=u.attr("sucmsg")||A.data("tipmsg").r||e.r;if(u.attr("recheck")){var p=A.find("input[name='"+u.attr("recheck")+"']:first");if(n!=p.val()){v=false;l=3;y=u.attr("errormsg")||a.util.getErrormsg.call(u,A,t,"recheck")}}}else{y=y||u.attr("errormsg")||a.util.getErrormsg.call(u,A,t);if(a.util.isEmpty.call(u,n)){y=u.attr("nullmsg")||a.util.getNullmsg.call(u,A)}}return{passed:v,type:l,info:y}},regcheck:function(n,s,m){var t=this,k=null,l=false,r=3;if(m.attr("ignore")==="ignore"&&a.util.isEmpty.call(m,s)){if(m.data("cked")){k=""}return{passed:true,type:4,info:k}}m.data("cked","cked");var u=a.util.parseDatatype(n);var q;for(var p=0;p=k.forms.length){return null}if(!(l in k.objects)){k.objects[l]=new a(d(k.forms[l]).get(),{},true)}return k.objects[l]},resetStatus:function(){var k=this;d(k.forms).each(function(){this.validform_status="normal"});return this},setStatus:function(k){var l=this;d(l.forms).each(function(){this.validform_status=k||"posting"});return this},getStatus:function(){var l=this;var k=d(l.forms)[0].validform_status;return k},ignore:function(k){var l=this;var k=k||"[datatype]";d(l.forms).find(k).each(function(){d(this).data("dataIgnore","dataIgnore").removeClass("Validform_error")});return this},unignore:function(k){var l=this;var k=k||"[datatype]";d(l.forms).find(k).each(function(){d(this).removeData("dataIgnore")});return this},addRule:function(n){var m=this;var n=n||[];for(var l=0;l0?k:0);n.css({left:l}).animate({top:k},{duration:m,queue:false})}function c(){if(d("#Validform_msg").length!==0){return false}j=d('
'+e.tit+'χ
').appendTo("body");j.find("a.Validform_close").click(function(){j.hide();i=true;if(g){g.focus().addClass("Validform_error")}return false}).focus(function(){this.blur()});d(window).bind("scroll resize",function(){!i&&h(j,400)})}d.Showmsg=function(k){c();a.util.showmsg.call(f,k,1,{})};d.Hidemsg=function(){j.hide();i=true}})(jQuery,window); diff --git a/WebContent/js/echarts.common.min.js b/WebContent/js/echarts.common.min.js new file mode 100644 index 0000000000000000000000000000000000000000..0c83363a8eb6207e7a20d61bdb70c9f36df2c31a --- /dev/null +++ b/WebContent/js/echarts.common.min.js @@ -0,0 +1,22 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(rg=null),ng[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=qp.call(t);if("[object Array]"===i){if(!z(t)){e=[];for(var r=0,o=t.length;r=0){var r="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];r&&it(t,r,e,n)}else it(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&mg.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function at(t,e,n){gg?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function st(t,e,n){gg?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function lt(t){return t.which>1}function ut(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ht}}function ht(t){vg(this.event)}function ct(){}function dt(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||yg}return!1}function ft(){var t=new wg(6);return pt(t),t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function mt(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function vt(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function yt(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function xt(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function _t(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function wt(t){return t>Mg||t<-Mg}function bt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function St(t){return(t=Math.round(t))<0?0:t>255?255:t}function Mt(t){return(t=Math.round(t))<0?0:t>360?360:t}function It(t){return t<0?0:t>1?1:t}function Tt(t){return St(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ct(t){return It(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function At(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Dt(t,e,n){return t+(e-t)*n}function kt(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Pt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Lt(t,e){Bg&&Pt(Bg,e),Bg=Rg.put(t,Bg||e.slice())}function Ot(t,e){if(t){e=e||[];var n=Rg.get(t);if(n)return Pt(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Ng)return Pt(e,Ng[i]),Lt(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),o=i.indexOf(")");if(-1!==r&&o+1===i.length){var a=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void kt(e,0,0,0,1);l=Ct(s.pop());case"rgb":return 3!==s.length?void kt(e,0,0,0,1):(kt(e,Tt(s[0]),Tt(s[1]),Tt(s[2]),l),Lt(t,e),e);case"hsla":return 4!==s.length?void kt(e,0,0,0,1):(s[3]=Ct(s[3]),zt(s,e),Lt(t,e),e);case"hsl":return 3!==s.length?void kt(e,0,0,0,1):(zt(s,e),Lt(t,e),e);default:return}}kt(e,0,0,0,1)}else{if(4===i.length)return(u=parseInt(i.substr(1),16))>=0&&u<=4095?(kt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Lt(t,e),e):void kt(e,0,0,0,1);if(7===i.length){var u=parseInt(i.substr(1),16);return u>=0&&u<=16777215?(kt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Lt(t,e),e):void kt(e,0,0,0,1)}}}}function zt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ct(t[1]),r=Ct(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],kt(e,St(255*At(a,o,n+1/3)),St(255*At(a,o,n)),St(255*At(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Et(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function Nt(t,e){var n=Ot(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return Wt(n,4===n.length?"rgba":"rgb")}}function Rt(t){var e=Ot(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Bt(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=St(Dt(a[0],s[0],l)),n[1]=St(Dt(a[1],s[1],l)),n[2]=St(Dt(a[2],s[2],l)),n[3]=It(Dt(a[3],s[3],l)),n}}function Ft(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Ot(e[r]),s=Ot(e[o]),l=i-r,u=Wt([St(Dt(a[0],s[0],l)),St(Dt(a[1],s[1],l)),St(Dt(a[2],s[2],l)),It(Dt(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function Vt(t,e){if((t=Ot(t))&&null!=e)return t[3]=It(e),Wt(t,"rgba")}function Wt(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ht(t,e){return t[e]}function Gt(t,e,n){t[e]=n}function Zt(t,e,n){return(e-t)*n+t}function Ut(t,e,n){return n>.5?e:t}function Xt(t,e,n,i,r){var o=t.length;if(1==r)for(s=0;sr)t.length=r;else for(a=i;a=0&&!(m[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=k;ne);n++);n=Math.min(n-1,u-2)}k=n,P=e;var i=m[n+1]-m[n];if(0!==i)if(I=(e-m[n])/i,l)if(C=v[n],T=v[0===n?n:n-1],A=v[n>u-2?u-1:n+1],D=v[n>u-3?u-1:n+2],d)qt(T,C,A,D,I,I*I,I*I*I,a(t,r),g);else{if(f)o=qt(T,C,A,D,I,I*I,I*I*I,L,1),o=Qt(L);else{if(p)return Ut(C,A,I);o=$t(T,C,A,D,I,I*I,I*I*I)}s(t,r,o)}else if(d)Xt(v[n],v[n+1],I,a(t,r),g);else{var o;if(f)Xt(v[n],v[n+1],I,L,1),o=Qt(L);else{if(p)return Ut(v[n],v[n+1],I);o=Zt(v[n],v[n+1],I)}s(t,r,o)}},ondestroy:n});return e&&"spline"!==e&&(O.easing=e),O}}}function ee(t,e,n,i,r,o,a,s){_(i)?(o=r,r=i,i=0):x(r)?(o=r,r="linear",i=0):x(i)?(o=i,i=0):x(n)?(o=n,n=500):n||(n=500),t.stopAnimation(),ne(t,"",t,e,n,i,s);var l=t.animators.slice(),u=l.length;u||o&&o();for(var h=0;h0&&t.animate(e,!1).when(null==r?500:r,s).delay(o||0)}function ie(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function re(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function oe(t){for(var e=0;t>=tm;)e|=1&t,t>>=1;return t+e}function ae(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function se(t,e,n){for(n--;e>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function ue(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function he(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function ce(t,e){function n(n){var s=o[n],u=a[n],h=o[n+1],c=a[n+1];a[n]=u+c,n===l-3&&(o[n+1]=o[n+2],a[n+1]=a[n+2]),l--;var d=he(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ue(t[s+u-1],t,h,c,c-1,e))&&(u<=c?i(s,u,h,c):r(s,u,h,c))}function i(n,i,r,o){var a=0;for(a=0;a=em||f>=em);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===i){for(a=0;a=0;a--)t[f+a]=t[d+a];if(0===i){v=!0;break}}if(t[c--]=u[h--],1==--o){v=!0;break}if(0!=(m=o-ue(t[l],u,0,o,o-1,e))){for(o-=m,f=(c-=m)+1,d=(h-=m)+1,a=0;a=em||m>=em);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===o){for(f=(c-=i)+1,d=(l-=i)+1,a=i-1;a>=0;a--)t[f+a]=t[d+a];t[c]=u[h]}else{if(0===o)throw new Error;for(d=c-(o-1),a=0;a=0;a--)t[f+a]=t[d+a];t[c]=u[h]}else for(d=c-(o-1),a=0;a1;){var t=l-2;if(t>=1&&a[t-1]<=a[t]+a[t+1]||t>=2&&a[t-2]<=a[t]+a[t-1])a[t-1]a[t+1])break;n(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&a[t-1]s&&(l=s),le(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}function fe(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function pe(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(i,o,r,a)}function ge(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}function me(){return!1}function ve(t,e,n){var i=ig(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}function ye(t){if("string"==typeof t){var e=fm.get(t);return e&&e.image}return t}function xe(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=fm.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!we(e=o.image)&&o.pending.push(a):(!e&&(e=new Image),e.onload=e.onerror=_e,fm.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function _e(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;emm&&(gm=0,pm={}),gm++,pm[n]=r,r}function Se(t,e,n,i,r,o,a){return o?Ie(t,e,n,i,r,o,a):Me(t,e,n,i,r,a)}function Me(t,e,n,i,r,o){var a=Ee(t,e,r,o),s=be(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,u=new re(Te(0,s,n),Ce(0,l,i),s,l);return u.lineHeight=a.lineHeight,u}function Ie(t,e,n,i,r,o,a){var s=Ne(t,{rich:o,truncate:a,font:e,textAlign:n,textPadding:r}),l=s.outerWidth,u=s.outerHeight;return new re(Te(0,l,n),Ce(0,u,i),l,u)}function Te(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Ce(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Ae(t,e,n){var i=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",u="top";switch(t){case"left":i-=n,r+=s,l="right",u="middle";break;case"right":i+=n+a,r+=s,u="middle";break;case"top":i+=a/2,r-=n,l="center",u="bottom";break;case"bottom":i+=a/2,r+=o+n,l="center";break;case"inside":i+=a/2,r+=s,l="center",u="middle";break;case"insideLeft":i+=n,r+=s,u="middle";break;case"insideRight":i+=a-n,r+=s,l="right",u="middle";break;case"insideTop":i+=a/2,r+=n,l="center";break;case"insideBottom":i+=a/2,r+=o-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=a-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=o-n,u="bottom";break;case"insideBottomRight":i+=a-n,r+=o-n,l="right",u="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:u}}function De(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=ke(e,n,i,r);for(var a=0,s=o.length;a=a;l++)s-=a;var u=be(n);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function Pe(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=be(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Le(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=be(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Le(t,e,n,i){for(var r=0,o=0,a=t.length;ol)t="",o=[];else if(null!=u)for(var h=ke(u-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=o.length;cr&&Re(n,t.substring(r,o)),Re(n,i[2],i[1]),r=vm.lastIndex}rf)return{lines:[],width:0,height:0};P.textWidth=be(P.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))P.percentWidth=b,u.push(P),b=0;else{if(S){b=P.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&we(I=ye(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var D=null!=d?d-m:null;null!=D&&Dl&&(n*=l/(c=n+i),i*=l/c),r+o>l&&(r*=l/(c=r+o),o*=l/c),i+r>u&&(i*=u/(c=i+r),r*=u/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),t.moveTo(a+n,s),t.lineTo(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-Math.PI/2,0),t.lineTo(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(a,s+n),0!==n&&t.arc(a+n,s+n,n,Math.PI,1.5*Math.PI)}function Ve(t){return We(t),d(t.rich,We),t}function We(t){if(t){t.font=Be(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||_m[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||wm[n]?n:"top",t.textPadding&&(t.textPadding=k(t.textPadding))}}function He(t,e,n,i,r,o){i.rich?Ze(t,e,n,i,r):Ge(t,e,n,i,r,o)}function Ge(t,e,n,i,r,o){var a=o&&o.style,s=a&&"text"===o.type,l=i.font||ym;s&&l===(a.font||ym)||(e.font=l);var u=t.__computedFont;t.__styleFont!==l&&(t.__styleFont=l,u=t.__computedFont=e.font);var h=i.textPadding,c=t.__textCotentBlock;c&&!t.__dirtyText||(c=t.__textCotentBlock=Ee(n,u,h,i.truncate));var d=c.outerHeight,f=c.lines,p=c.lineHeight,g=Ke(d,i,r),m=g.baseX,v=g.baseY,y=g.textAlign||"left",x=g.textVerticalAlign;Xe(e,i,r,m,v);var _=Ce(v,d,x),w=m,b=_,S=je(i);if(S||h){var M=be(n,u);h&&(M+=h[1]+h[3]);var I=Te(m,M,y);S&&qe(t,e,i,I,_,M,d),h&&(w=nn(m,y,h),b+=h[0])}e.textAlign=y,e.textBaseline="middle";for(N=0;N=0&&"right"===(_=b[D]).textAlign;)Ye(t,e,_,i,M,v,A,"right"),I-=_.width,A-=_.width,D--;for(C+=(o-(C-m)-(y-A)-I)/2;T<=D;)Ye(t,e,_=b[T],i,M,v,C+_.width/2,"center"),C+=_.width,T++;v+=M}}function Xe(t,e,n,i,r){if(n&&e.textRotation){var o=e.textOrigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Ye(t,e,n,i,r,o,a,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=o+r/2;"top"===u?h=o+n.height/2:"bottom"===u&&(h=o+r-n.height/2),!n.isLineHolder&&je(l)&&qe(t,e,l,"right"===s?a-n.width:"center"===s?a-n.width/2:a,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(a=nn(a,s,c),h-=n.height/2-c[2]-n.textHeight/2),Qe(e,"shadowBlur",A(l.textShadowBlur,i.textShadowBlur,0)),Qe(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Qe(e,"shadowOffsetX",A(l.textShadowOffsetX,i.textShadowOffsetX,0)),Qe(e,"shadowOffsetY",A(l.textShadowOffsetY,i.textShadowOffsetY,0)),Qe(e,"textAlign",s),Qe(e,"textBaseline","middle"),Qe(e,"font",n.font||ym);var d=Je(l.textStroke||i.textStroke,p),f=tn(l.textFill||i.textFill),p=C(l.textStrokeWidth,i.textStrokeWidth);d&&(Qe(e,"lineWidth",p),Qe(e,"strokeStyle",d),e.strokeText(n.text,a,h)),f&&(Qe(e,"fillStyle",f),e.fillText(n.text,a,h))}function je(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function qe(t,e,n,i,r,o,a){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=_(s);if(Qe(e,"shadowBlur",n.textBoxShadowBlur||0),Qe(e,"shadowColor",n.textBoxShadowColor||"transparent"),Qe(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Qe(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?Fe(e,{x:i,y:r,width:o,height:a,r:c}):e.rect(i,r,o,a),e.closePath()}if(h)if(Qe(e,"fillStyle",s),null!=n.fillOpacity){f=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(x(s))Qe(e,"fillStyle",s(n)),e.fill();else if(w(s)){var d=s.image;(d=xe(d,null,t,$e,s))&&we(d)&&e.drawImage(d,i,r,o,a)}if(l&&u)if(Qe(e,"lineWidth",l),Qe(e,"strokeStyle",u),null!=n.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function $e(t,e){e.image=t}function Ke(t,e,n){var i=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+en(s[0],n.width),r=n.y+en(s[1],n.height);else{var l=Ae(s,n,e.textDistance);i=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var u=e.textOffset;u&&(i+=u[0],r+=u[1])}return{baseX:i,baseY:r,textAlign:o,textVerticalAlign:a}}function Qe(t,e,n){return t[e]=rm(t,e,n),t[e]}function Je(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function tn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function en(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function nn(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function rn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function on(t){t=t||{},qg.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new am(t.style,this),this._rect=null,this.__clipPaths=[]}function an(t){on.call(this,t)}function sn(t){return parseInt(t,10)}function ln(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function un(t,e,n){return Im.copy(t.getBoundingRect()),t.transform&&Im.applyTransform(t.transform),Tm.width=e,Tm.height=n,!Im.intersect(Tm)}function hn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n=n.length&&n.push({option:t})}}),n}function Dn(t){var e=N();Hm(t,function(t,n){var i=t.exist;i&&e.set(i.id,t)}),Hm(t,function(t,n){var i=t.option;P(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),Hm(t,function(t,n){var i=t.exist,r=t.option,o=t.keyInfo;if(Gm(r)){if(o.name=null!=r.name?r.name+"":i?i.name:Um+n,i)o.id=i.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(e.get(o.id))}e.set(o.id,t)}})}function kn(t){var e=t.name;return!(!e||!e.indexOf(Um))}function Pn(t){return Gm(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ln(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function On(){var t="__\0ec_inner_"+Ym+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function zn(t,e,n){if(_(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||En(e,r+"Index")||En(e,r+"Id")||En(e,r+"Name")||(e[r+"Index"]=0);var o={};return Hm(e,function(i,r){var i=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],u=(a[2]||"").toLowerCase();if(!(!s||!u||null==i||"index"===u&&"none"===i||n&&n.includeMainTypes&&l(n.includeMainTypes,s)<0)){var h={mainType:s};"index"===u&&"all"===i||(h[u]=i);var c=t.queryComponents(h);o[s+"Models"]=c,o[s+"Model"]=c[0]}}else o[r]=i}),o}function En(t,e){return t&&t.hasOwnProperty(e)}function Nn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Rn(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Bn(t){return"auto"===t?Xp.domSupported?"html":"richText":t||"html"}function Fn(t){var e={main:"",sub:""};return t&&(t=t.split(jm),e.main=t[0]||"",e.sub=t[1]||""),e}function Vn(t){P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Wn(t,e){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=Gn,n.superApply=Zn,u(n,this),n.superClass=e,n}}function Hn(t){var e=["__\0is_clz",$m++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Gn(t,e){var n=D(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Zn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Un(t,e){function n(t){var e=i[t.main];return e&&e[qm]||((e=i[t.main]={})[qm]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(Vn(e),(e=Fn(e)).sub?e.sub!==qm&&(n(e)[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[qm]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=Fn(t);var e=[],n=i[t.main];return n&&n[qm]?d(n,function(t,n){n!==qm&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=Fn(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=Fn(t);var e=i[t.main];return e&&e[qm]},t.parseClassType=Fn,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function Xn(t){return t>-rv&&trv||t<-rv}function jn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function qn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function $n(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,f=0;if(Xn(h)&&Xn(c))Xn(s)?o[0]=0:(M=-l/s)>=0&&M<=1&&(o[f++]=M);else{var p=c*c-4*h*d;if(Xn(p)){var g=c/h,m=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=iv(p),y=h*s+1.5*a*(-c+v),x=h*s+1.5*a*(-c-v);(M=(-s-((y=y<0?-nv(-y,sv):nv(y,sv))+(x=x<0?-nv(-x,sv):nv(x,sv))))/(3*a))>=0&&M<=1&&(o[f++]=M)}else{var _=(2*h*s-3*a*c)/(2*iv(h*h*h)),w=Math.acos(_)/3,b=iv(h),S=Math.cos(w),M=(-s-2*b*S)/(3*a),m=(-s+b*(S+av*Math.sin(w)))/(3*a),I=(-s+b*(S-av*Math.sin(w)))/(3*a);M>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m),I>=0&&I<=1&&(o[f++]=I)}}return f}function Kn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Xn(a))Yn(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var u=o*o-4*a*s;if(Xn(u))r[0]=-o/(2*a);else if(u>0){var h=iv(u),c=(-o+h)/(2*a),d=(-o-h)/(2*a);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function Qn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Jn(t,e,n,i,r,o,a,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;lv[0]=l,lv[1]=u;for(var y=0;y<1;y+=.05)uv[0]=jn(t,n,r,a,y),uv[1]=jn(e,i,o,s,y),(p=cg(lv,uv))=0&&p=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if(Xn(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var h=iv(u),c=(-a+h)/(2*o),d=(-a-h)/(2*o);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function ii(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function ri(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function oi(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;lv[0]=a,lv[1]=s;for(var d=0;d<1;d+=.05)uv[0]=ti(t,n,r,d),uv[1]=ti(e,i,o,d),(m=cg(lv,uv))=0&&m1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(mv[0]=pv(r)*n+t,mv[1]=fv(r)*i+e,vv[0]=pv(o)*n+t,vv[1]=fv(o)*i+e,u(s,mv,vv),h(l,mv,vv),(r%=gv)<0&&(r+=gv),(o%=gv)<0&&(o+=gv),r>o&&!a?o+=gv:rr&&(yv[0]=pv(f)*n+t,yv[1]=fv(f)*i+e,u(s,yv,s),h(l,yv,l))}function ci(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=Ev);var d=Math.atan2(l,s);return d<0&&(d+=Ev),d>=i&&d<=r||d+Ev>=i&&d+Ev<=r}function mi(t,e,n,i,r,o){if(o>e&&o>i||or?a:0}function vi(t,e){return Math.abs(t-e)e&&u>i&&u>o&&u>s||u1&&yi(),c=jn(e,i,o,s,Vv[0]),p>1&&(d=jn(e,i,o,s,Vv[1]))),2==p?me&&s>i&&s>o||s=0&&u<=1){for(var h=0,c=ti(e,i,o,u),d=0;dn||s<-n)return 0;u=Math.sqrt(n*n-s*s);Fv[0]=-u,Fv[1]=u;var l=Math.abs(i-r);if(l<1e-4)return 0;if(l%Rv<1e-4){i=0,r=Rv;p=o?1:-1;return a>=Fv[0]+t&&a<=Fv[1]+t?p:0}if(o){var u=i;i=pi(r),r=pi(u)}else i=pi(i),r=pi(r);i>r&&(r+=Rv);for(var h=0,c=0;c<2;c++){var d=Fv[c];if(d+t>a){var f=Math.atan2(s,d),p=o?1:-1;f<0&&(f=Rv+f),(f>=i&&f<=r||f+Rv>=i&&f+Rv<=r)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function bi(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;h1&&(n||(o+=mi(a,s,l,u,i,r))),1==h&&(l=a=t[h],u=s=t[h+1]),c){case Nv.M:a=l=t[h++],s=u=t[h++];break;case Nv.L:if(n){if(ci(a,s,t[h],t[h+1],e,i,r))return!0}else o+=mi(a,s,t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Nv.C:if(n){if(di(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=xi(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Nv.Q:if(n){if(fi(a,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=_i(a,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Nv.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++],y=(t[h++],1-t[h++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?o+=mi(a,s,x,_,i,r):(l=x,u=_);var w=(i-d)*g/p+d;if(n){if(gi(d,f,g,m,m+v,y,e,w,r))return!0}else o+=wi(d,f,g,m,m+v,y,w,r);a=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case Nv.R:l=a=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(n){if(ci(l,u,x,u,e,i,r)||ci(x,u,x,_,e,i,r)||ci(x,_,l,_,e,i,r)||ci(l,_,l,u,e,i,r))return!0}else o+=mi(x,u,x,_,i,r),o+=mi(l,_,l,u,i,r);break;case Nv.Z:if(n){if(ci(a,s,l,u,e,i,r))return!0}else o+=mi(a,s,l,u,i,r);a=l,s=u}}return n||vi(s,u)||(o+=mi(a,s,l,u,i,r)||0),0!==o}function Si(t,e,n){return bi(t,0,!1,e,n)}function Mi(t,e,n,i){return bi(t,e,!0,n,i)}function Ii(t){on.call(this,t),this.path=null}function Ti(t,e,n,i,r,o,a,s,l,u,h){var c=l*(Qv/180),d=Kv(c)*(t-n)/2+$v(c)*(e-i)/2,f=-1*$v(c)*(t-n)/2+Kv(c)*(e-i)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=qv(p),s*=qv(p));var g=(r===o?-1:1)*qv((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+n)/2+Kv(c)*m-$v(c)*v,x=(e+i)/2+$v(c)*m+Kv(c)*v,_=ey([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],b=[(-1*d-m)/a,(-1*f-v)/s],S=ey(w,b);ty(w,b)<=-1&&(S=Qv),ty(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*Qv),1===o&&S<0&&(S+=2*Qv),h.addData(u,y,x,a,s,_,S,c,o)}function Ci(t){if(!t)return new Ov;for(var e,n=0,i=0,r=n,o=i,a=new Ov,s=Ov.CMD,l=t.match(ny),u=0;u=2){if(r&&"spline"!==r){var o=cy(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],h=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=hy(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s=0)?(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=o&&(n={textFill:null},t.textFill=o),n&&(t.insideRollback=n)}}function dr(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function fr(t,e){var n=e||e.getModel("textStyle");return L([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function pr(t,e,n,i,r,o){if("function"==typeof r&&(o=r,r=null),i&&i.isAnimationEnabled()){var a=t?"Update":"",s=i.getShallow("animationDuration"+a),l=i.getShallow("animationEasing"+a),u=i.getShallow("animationDelay"+a);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(n,s,u||0,l,o,!!o):(e.stopAnimation(),e.attr(n),o&&o())}else e.stopAnimation(),e.attr(n),o&&o()}function gr(t,e,n,i,r){pr(!0,t,e,n,i,r)}function mr(t,e,n,i,r){pr(!1,t,e,n,i,r)}function vr(t,e){for(var n=pt([]);t&&t!==e;)mt(n,t.getLocalTransform(),n),t=t.parent;return n}function yr(t,e,n){return e&&!c(e)&&(e=Ig.getLocalTransform(e)),n&&(e=_t([],e)),$([],t,e)}function xr(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=yr(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function _r(t,e,n,i){function r(t){var e={position:V(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),gr(t,i,n,t.dataIndex)}}})}}function wr(t,e){return f(t,function(t){var n=t[0];n=Iy(n,e.x),n=Ty(n,e.x+e.width);var i=t[1];return i=Iy(i,e.y),i=Ty(i,e.y+e.height),[n,i]})}function br(t,e,n){var i=(e=o({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),a(i,n),new an(e)):Ni(t.replace("path://",""),e,n,"center")}function Sr(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Mr(t,e,n){for(var i=0;i0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Dr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?Cr(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function kr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Pr(t){return t.sort(function(t,e){return t-e}),t}function Lr(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Or(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function zr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Er(t,e,n){if(!t[e])return 0;var i=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=f(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=f(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(o,function(t,e){return t-s[e]});lh&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function Nr(t){var e=2*Math.PI;return(t%e+e)%e}function Rr(t){return t>-By&&t=-20?+t.toFixed(i<0?-i:0):t}function Hr(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Gr(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Zr(t){return null==t?"":(t+"").replace(Hy,function(t,e){return Gy[e]})}function Ur(t,e,n){y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o
':'':{renderMode:r,content:"{marker"+o+"|} ",style:{color:n}}:""}function Yr(t,e){return t+="","0000".substr(0,e-t.length)+t}function jr(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Br(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Yr(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Yr(s,2)).replace("d",s).replace("hh",Yr(l,2)).replace("h",l).replace("mm",Yr(u,2)).replace("m",u).replace("ss",Yr(h,2)).replace("s",h).replace("SSS",Yr(c,3))}function qr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function $r(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=o+m)>i||l.newline?(o=0,h=m,a+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=a+v)>r||l.newline?(o+=s+n,a=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+n:a=c+n)})}function Kr(t,e,n){n=Wy(n||0);var i=e.width,r=e.height,o=Dr(t.left,i),a=Dr(t.top,r),s=Dr(t.right,i),l=Dr(t.bottom,r),u=Dr(t.width,i),h=Dr(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=f&&(isNaN(u)&&isNaN(h)&&(f>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var p=new re(o+n[3],a+n[0],u,h);return p.margin=n,p}function Qr(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||s){var u;if("raw"===l)u="group"===t.type?new re(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=Kr(a({width:u.width,height:u.height},e),n,i);var c=t.position,d=o?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Jr(t,e,n){function i(n,i){var a={},l=0,u={},h=0;if(qy(n,function(e){u[e]=t[e]}),qy(n,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[i])return o(e,n[1])?u[n[2]]=null:o(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&l){if(l>=2)return a;for(var c=0;ce)return t[i];return t[n-1]}function io(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},i=ax[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}function ro(t){return"category"===t.get("type")}function oo(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===hx?{}:[]),this.sourceFormat=t.sourceFormat||cx,this.seriesLayoutBy=t.seriesLayoutBy||fx,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function ao(t){var e=t.option.source,n=cx;if(S(e))n=dx;else if(y(e)){0===e.length&&(n=lx);for(var i=0,r=e.length;i=e:"max"===n?t<=e:t===e}function Lo(t,e){return t.join(",")===e.join(",")}function Oo(t,e){_x(e=e||{},function(e,n){if(null!=e){var i=t[n];if(ex.hasClass(n)){e=Mn(e);var r=An(i=Mn(i),e);t[n]=Sx(r,function(t){return t.option&&t.exist?Mx(t.exist,t.option,!0):t.exist||t.option})}else t[n]=Mx(i,e,!0)}})}function zo(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=Ax.length;n=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return i[0]=h,i[1]=f,i});a.hostModel.setData(l),e.data=l})}function Xo(t,e){oo.isInstance(t)||(t=oo.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===dx&&(this._offset=0,this._dimSize=e,this._data=n),o(this,zx[i===lx?i+"_"+t.seriesLayoutBy:i])}function Yo(){return this._data.length}function jo(t){return this._data[t]}function qo(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ha(t,e){d(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,v(ca,e))})}function ca(t){var e=da(t);e&&e.setOutputEnd(this.count())}function da(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function fa(){this.group=new Jg,this.uid=Tr("viewChart"),this.renderTask=ea({plan:ma,reset:va}),this.renderTask.context={view:this}}function pa(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=setTimeout(i,-o),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function xa(t,e,n,i){var r=t[e];if(r){var o=r[$x]||r,a=r[Qx];if(r[Kx]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=ya(o,n,"debounce"===i))[$x]=o,r[Qx]=i,r[Kx]=n}return r}}function _a(t,e){var n=t[e];n&&n[$x]&&(t[e]=n[$x])}function wa(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=N()}function ba(t,e,n,i,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var a;d(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){o(r,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),r_(h,i);var f=t.getPerformArgs(h,r.block);d.each(function(t){t.perform(f)}),a|=h.perform(f)}else u&&u.each(function(s,l){o(r,s)&&s.dirty();var u=t.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),r_(s,i),a|=s.perform(u)})}}),t.unfinished|=a}function Sa(t,e,n,i,r){function o(n){var o=n.uid,s=a.get(o)||a.set(o,ea({plan:Da,reset:ka,count:La}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Oa(t,n,s)}var a=n.seriesTaskMap||(n.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(o):s?i.eachRawSeriesByType(s,o):l&&l(i,r).each(o);var u=t._pipelineMap;a.each(function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))})}function Ma(t,e,n,i,r){function o(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,ea({reset:Ta,onDirty:Aa})),a.dirty()),i.context={model:e,overallProgress:h,modifyOutputEnd:c},i.agent=a,i.__block=h,Oa(t,e,i)}var a=n.overallTask=n.overallTask||ea({reset:Ia});a.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||N(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,o):u?u(i,r).each(o):(h=!1,d(i.getSeries(),o));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),a.dirty(),s.removeKey(e))})}function Ia(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ta(t,e){return t.overallProgress&&Ca}function Ca(){this.agent.dirty(),this.getDownstream().dirty()}function Aa(){this.agent&&this.agent.dirty()}function Da(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function ka(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Mn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Pa(e)}):o_}function Pa(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function Fa(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),a(e.__inheritedStyle,t.__inheritedStyle))}function Va(t){for(var e=L(t).split(p_),n=[],i=0;i0;o-=2){var a=r[o],s=r[o-1];switch(i=i||ft(),s){case"translate":a=L(a).split(p_),vt(i,i,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=L(a).split(p_),xt(i,i,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=L(a).split(p_),yt(i,i,parseFloat(a[0]));break;case"skew":a=L(a).split(p_),console.warn("Skew transform is not supported yet");break;case"matrix":a=L(a).split(p_);i[0]=parseFloat(a[0]),i[1]=parseFloat(a[1]),i[2]=parseFloat(a[2]),i[3]=parseFloat(a[3]),i[4]=parseFloat(a[4]),i[5]=parseFloat(a[5])}}}e.setLocalTransform(i)}function Za(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i={};__.lastIndex=0;for(var r;null!=(r=__.exec(e));)i[r[1]]=r[2];for(var o in v_)v_.hasOwnProperty(o)&&null!=i[o]&&(n[v_[o]]=i[o]);return n}function Ua(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:[o,o],position:[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+n/2]}}function Xa(t){return function(e,n,i){e=e&&e.toLowerCase(),pg.prototype[t].call(this,e,n,i)}}function Ya(){pg.call(this)}function ja(t,e,i){function r(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=X_[e]),this.id,this.group,this._dom=t;var o=this._zr=wn(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=ya(m(o.flush,o),17),(e=n(e))&&Lx(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Co;var a=this._api=ds(this);de(U_,r),de(H_,r),this._scheduler=new wa(this,a,H_,U_),pg.call(this,this._ecEventProcessor=new fs),this._messageCenter=new Ya,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),ns(o,this),O(this)}function qa(t,e,n){var i,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=zn(r,e);for(var a=0;ae.get("hoverLayerThreshold")&&!Xp.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function hs(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function cs(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function ds(t){var e=t._coordSysMgr;return o(new To(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function fs(){this.eventInfo}function ps(t){function e(t,e){for(var i=0;i65535?ow:aw}function Ns(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Rs(t,e){d(sw.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,d(lw,function(i){t[i]=n(e[i])}),t._calculationInfo=o(e._calculationInfo)}function Bs(t){var e=t._invertedIndicesMap;d(e,function(n,i){var r=t._dimensionInfos[i].ordinalMeta;if(r){n=e[i]=new ow(r.categories.length);for(o=0;o=0?this._indices[t]:-1}function Hs(t,e){var n=t._idList[e];return null==n&&(n=Fs(t,t._idDimIdx,e)),null==n&&(n=iw+e),n}function Gs(t){return y(t)||(t=[t]),t}function Zs(t,e){var n=t.dimensions,i=new uw(f(n,t.getDimensionInfo,t),t.hostModel);Rs(i,t);for(var r=i._storage={},o=t._storage,a=0;a=0?(r[s]=Us(o[s]),i._rawExtent[s]=Xs(),i._extent[s]=null):r[s]=o[s])}return i}function Us(t){for(var e=new Array(t.length),n=0;ni&&(a=r.interval=i);var s=r.intervalPrecision=sl(a);return ul(r.niceTickExtent=[mw(Math.ceil(t[0]/a)*a,s),mw(Math.floor(t[1]/a)*a,s)],t),r}function sl(t){return Or(t)+2}function ll(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ul(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ll(t,0,e),ll(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function hl(t,e,n,i){var r=[];if(!t)return r;e[0]1e4)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function cl(t){return t.get("stack")||xw+t.seriesIndex}function dl(t){return t.dim+t.index}function fl(t,e){var n=[];return e.eachSeriesByType(t,function(t){vl(t)&&!yl(t)&&n.push(t)}),n}function pl(t){var e=[];return d(t,function(t){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),r=i.getExtent(),o="category"===i.type?i.getBandWidth():Math.abs(r[1]-r[0])/n.count(),a=Dr(t.get("barWidth"),o),s=Dr(t.get("barMaxWidth"),o),l=t.get("barGap"),u=t.get("barCategoryGap");e.push({bandWidth:o,barWidth:a,barMaxWidth:s,barGap:l,barCategoryGap:u,axisKey:dl(i),stackId:cl(t)})}),gl(e)}function gl(t){var e={};d(t,function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barGap;null!=h&&(o.gap=h);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var n={};return d(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=Dr(t.categoryGap,r),a=Dr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),d(i,function(t,e){var n=t.maxWidth;n&&no[1]?(i=o[1],r=o[0]):(i=o[0],r=o[1]);var a=e.toGlobalCoord(e.dataToCoord(0));return ar&&(a=r),a}function _l(t,e){return Pw(t,kw(e))}function wl(t,e){var n,i,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,u=null!=s,h=t.getExtent();"ordinal"===o?n=e.getCategories().length:(y(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Dr(i[0],1),i[1]=Dr(i[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==a&&(a="ordinal"===o?n?0:NaN:h[0]-i[0]*r),null==s&&(s="ordinal"===o?n?n-1:NaN:h[1]+i[1]*r),"dataMin"===a?a=h[0]:"function"==typeof a&&(a=a({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(a)||I(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===o){var f,p=fl("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=pl(p),m=bl(a,s,e,g);a=m.min,s=m.max}}return[a,s]}function bl(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=ml(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;d(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Sl(t,e){var n=wl(t,e),i=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Ml(t,e){if(e=e||t.get("type"))switch(e){case"category":return new gw(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new yw;default:return(nl.getClass(e)||yw).create(t)}}function Il(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function Tl(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(Cl(t,i),r)}:function(e){return t.scale.getLabel(e)}}function Cl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Al(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,o="category"===t.type,a=n.getExtent();r=o?n.count():(i=n.getTicks()).length;var s,l=t.getLabelModel(),u=Tl(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;c>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function Rl(t){return"category"===t.type?Fl(t):Hl(t)}function Bl(t,e){return"category"===t.type?Wl(t,e):{ticks:t.scale.getTicks()}}function Fl(t){var e=t.getLabelModel(),n=Vl(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Vl(t,e){var n=Gl(t,"labels"),i=Kl(e),r=Zl(n,i);if(r)return r;var o,a;return o=x(i)?$l(t,i):ql(t,a="auto"===i?Xl(t):i),Ul(n,i,{labels:o,labelCategoryInterval:a})}function Wl(t,e){var n=Gl(t,"ticks"),i=Kl(e),r=Zl(n,i);if(r)return r;var o,a;if(e.get("show")&&!t.scale.isBlank()||(o=[]),x(i))o=$l(t,i,!0);else if("auto"===i){var s=Vl(t,t.getLabelModel());a=s.labelCategoryInterval,o=f(s.labels,function(t){return t.tickValue})}else o=ql(t,a=i,!0);return Ul(n,i,{ticks:o,tickCategoryInterval:a})}function Hl(t){var e=t.scale.getTicks(),n=Tl(t);return{labels:f(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function Gl(t,e){return qw(t)[e]||(qw(t)[e]=[])}function Zl(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=Se(n(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=qw(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-a)<=1&&w>x?x=w:(_.lastTickCount=a,_.lastAutoInterval=x),x}function jl(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function ql(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:t})}var r=Tl(t),o=t.scale,a=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d={min:s.get("showMinLabel"),max:s.get("showMaxLabel")};d.min&&h!==a[0]&&i(a[0]);for(var f=h;f<=a[1];f+=u)i(f);return d.max&&f!==a[1]&&i(a[1]),l}function $l(t,e,n){var i=t.scale,r=Tl(t),o=[];return d(i.getTicks(),function(t){var a=i.getLabel(t);e(t,a)&&o.push(n?t:{formattedLabel:r(t),rawLabel:a,tickValue:t})}),o}function Kl(t){var e=t.get("interval");return null==e?"auto":e}function Ql(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function Jl(t,e,n,i,r){function o(t,e){return h?t>e:t0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[a-1].coord+u},e.push(s)}var h=l[0]>l[1];o(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&o(l[0],e[0].coord)&&e.unshift({coord:l[0]}),o(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&o(s.coord,l[1])&&e.push({coord:l[1]})}}function tu(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Jo(t,e,n[0]);if(i){for(var r=[],o=0;o0?n=i[0]:i[1]<0&&(n=i[1]),n}function pu(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}function gu(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function mu(t){return isNaN(t[0])||isNaN(t[1])}function vu(t,e,n,i,r,o,a,s,l,u,h){return"none"!==u&&u?yu.apply(this,arguments):xu.apply(this,arguments)}function yu(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;f=r||d<0)break;if(mu(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;db(pb,g),pb[m]=g[m]+v,db(gb,p),gb[m]=p[m]-v,t.bezierCurveTo(pb[0],pb[1],gb[0],gb[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function xu(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;f=r||d<0)break;if(mu(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveTo":"lineTo"](p[0],p[1]),db(pb,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&mu(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||mu(m))db(gb,p);else{mu(m)&&!h&&(m=p),G(fb,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=hg(p,y),_=hg(p,m);cb(gb,p,fb,-l*(1-(v=_/(_+x))))}ub(pb,pb,s),hb(pb,pb,a),ub(gb,gb,s),hb(gb,gb,a),t.bezierCurveTo(pb[0],pb[1],gb[0],gb[1],p[0],p[1]),cb(pb,p,fb,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function _u(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}function wu(t,e){if(t.length===e.length){for(var n=0;ne[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function Mu(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,o=e.count();ro[1]&&o.reverse();var a=r.getExtent(),s=Math.PI/180;n&&(o[0]-=.5,o[1]+=.5);var l=new ly({shape:{cx:kr(t.cx,1),cy:kr(t.cy,1),r0:kr(o[0],1),r:kr(o[1],1),startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:r.inverse}});return e&&(l.shape.endAngle=-a[0]*s,mr(l,{shape:{endAngle:-a[1]*s}},i)),l}function Cu(t,e,n,i){return"polar"===t.type?Tu(t,e,n,i):Iu(t,e,n,i)}function Au(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0;a=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=f(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new wy(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=m,y}}}function ku(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!Pu(o,e))){var a=e.mapDimension(o.dim),s={};return d(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Pu(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}function Lu(t){return this._axes[t]}function Ou(t){bb.call(this,t)}function zu(t,e){return e.type||(e.data?"category":"value")}function Eu(t,e,n){return t.getCoordSysModel()===e}function Nu(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function Ru(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Bu(a[u])&&(o=a[u]);else for(var h in a)if(a.hasOwnProperty(h)&&Bu(a[h])&&!i[r(a[h])]){o=a[h];break}o&&(i[r(o)]=!0)}}function Bu(t){return t&&"category"!==t.type&&"time"!==t.type&&Il(t)}function Fu(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function Vu(t,e){return f(Pb,function(e){return t.getReferringComponents(e)[0]})}function Wu(t){return"cartesian2d"===t.get("coordinateSystem")}function Hu(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function Gu(t,e,n,i){var r,o,a=Nr(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Rr(a-Lb/2)?(o=l?"bottom":"top",r="center"):Rr(a-1.5*Lb)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*Lb&&a>Lb/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Zu(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Uu(t,e,n){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(Xu(o),Xu(u)):Yu(o,a)&&(i?(Xu(a),Xu(h)):(Xu(o),Xu(u))),!1===r?(Xu(s),Xu(c)):Yu(l,s)&&(r?(Xu(l),Xu(d)):(Xu(s),Xu(c)))}function Xu(t){t&&(t.ignore=!0)}function Yu(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var o=pt([]);return yt(o,o,-t.rotation),i.applyTransform(mt([],o,t.getLocalTransform())),r.applyTransform(mt([],o,e.getLocalTransform())),i.intersect(r)}}function ju(t){return"middle"===t||"center"===t}function qu(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),s=r.get("length"),l=i.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function ih(t){var e=rh(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=ah(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0?"bottom":"top":r.width>0?"left":"right";l||ch(t.style,d,i,u,o,n,p),ir(t,d)}function mh(t,e){var n=t.get(Ub)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function vh(t,e,n){var i=t.getData(),r=[],o=i.getLayout("valueAxisHorizontal")?1:0;r[1-o]=i.getLayout("valueAxisStart");var a=new jb({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__valueIdx:o});e.add(a),yh(a,t,i)}function yh(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function xh(t,e,n,i){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){_h(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function _h(t,e,n,i,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=n?i:0,u=[a*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function wh(t,e){function n(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function i(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}Jg.call(this);var r=new ly({z2:2}),o=new fy,a=new ry;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function bh(t,e,n,i,r,o,a){function s(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function l(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=a&&(d=a-10),!e&&d<=a&&(d=a+10),t[s].x=n+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;pe&&o+1t[o].y+t[o].height)return void s(o,i/2);s(n-1,i/2)}(p,c,-u),h=t[p].y+t[p].height;a-h<0&&s(c-1,h-a);for(p=0;p=n?f.push(t[p]):d.push(t[p]);l(d,!1,e,n,i,r),l(f,!0,e,n,i,r)}function Sh(t,e,n,i,r,o){for(var a=[],s=[],l=0;l=0&&s<0)&&(a=p,s=f,r=u,o.length=0),aS(h,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function Eh(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Nh(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=sh(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Rh(t,e,n){var i=n.axesInfo=[];aS(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Bh(t,e,n,i){if(!Hh(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}function Fh(t,e,n){var i=n.getZr(),r=lS(i).axisPointerLastHighlights||{},o=lS(i).axisPointerLastHighlights={};aS(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&aS(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],s=[];d(r,function(t,e){!o[e]&&s.push(t)}),d(o,function(t,e){!r[e]&&a.push(t)}),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),a.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}function Vh(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Wh(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Hh(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Gh(t,e,n){if(!Xp.node){var i=e.getZr();uS(i).records||(uS(i).records={}),Zh(i,e),(uS(i).records[t]||(uS(i).records[t]={})).handler=n}}function Zh(t,e){function n(n,i){t.on(n,function(n){var r=jh(e);hS(uS(t).records,function(t){t&&i(t,n,r.dispatchAction)}),Uh(r.pendings,e)})}uS(t).initialized||(uS(t).initialized=!0,n("click",v(Yh,"click")),n("mousemove",v(Yh,"mousemove")),n("globalout",Xh))}function Uh(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Xh(t,e,n){t.handler("leave",null,n)}function Yh(t,e,n,i){e.handler(t,n,i)}function jh(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function qh(t,e){if(!Xp.node){var n=e.getZr();(uS(n).records||{})[t]&&(uS(n).records[t]=null)}}function $h(){}function Kh(t,e,n,i){Qh(dS(n).lastProp,i)||(dS(n).lastProp=i,e?gr(n,i,t):(n.stopAnimation(),n.attr(i)))}function Qh(t,e){if(w(t)&&w(e)){var n=!0;return d(e,function(e,i){n=n&&Qh(t[i],e)}),!!n}return t===e}function Jh(t,e){t[e.get("label.show")?"show":"hide"]()}function tc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function ec(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function nc(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function ic(t,e,n,i,r){var o=oc(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),a=n.getModel("label"),s=Wy(a.get("padding")||0),l=a.getFont(),u=Se(o,l),h=r.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=r.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),rc(h,c,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:a.get("borderRadius")},position:h.slice(),style:{text:o,textFont:l,textFill:a.getTextColor(),textPosition:"inside",fill:g,stroke:a.get("borderColor")||"transparent",lineWidth:a.get("borderWidth")||0,shadowBlur:a.get("shadowBlur"),shadowColor:a.get("shadowColor"),shadowOffsetX:a.get("shadowOffsetX"),shadowOffsetY:a.get("shadowOffsetY")},z2:10}}function rc(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function oc(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:Cl(e,t),seriesData:[]};d(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),_(a)?o=a.replace("{value}",o):x(a)&&(o=a(s))}return o}function ac(t,e,n){var i=ft();return yt(i,i,n.rotation),vt(i,i,n.position),yr([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function sc(t,e,n,i,r,o){var a=Ob.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),ic(e,i,r,o,{position:ac(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function lc(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function uc(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function hc(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function cc(t){return"x"===t.dim?0:1}function dc(t){var e="left "+t+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)";return f(xS,function(t){return t+"transition:"+e}).join(";")}function fc(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),vS(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function pc(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return n&&e.push(dc(n)),i&&(Xp.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+Rt(i)),e.push("filter:alpha(opacity=70)"))),vS(["width","color","radius"],function(n){var i="border-"+n,r=yS(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(fc(r)),null!=o&&e.push("padding:"+Wy(o).join("px ")+"px"),e.join(";")+";"}function gc(t,e){if(Xp.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;ot(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function mc(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function vc(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Sr.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Sr(n,e,e.ecModel))}return e}function yc(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function xc(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function _c(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function wc(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+5;break;case"left":o=e.x-i-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}function bc(t){return"center"===t||"middle"===t}function Sc(t,e,n){var i,r={},o="toggleSelected"===t;return n.eachComponent("legend",function(n){o&&null!=i?n[i?"select":"unSelect"](e.name):(n[t](e.name),i=n.isSelected(e.name)),d(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&i:r[e]=i}})}),{name:e.name,selected:r}}function Mc(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Kr(i,o,r);Qy(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Qr(t,i,o,r)}function Ic(t,e){var n=Wy(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new py({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}function Tc(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Cc(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Ac(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function Dc(t,e,n){var i=[1,1];i[t.getOrient().index]=0,Jr(e,n,{type:"box",ignoreSize:i})}function kc(t){In(t,"label",["show"])}function Pc(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Lc(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Oc(t,e,n,i,r,o){var a=[],s=Ks(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=Fc(e,s,t),u=e.indicesOfNearest(s,l)[0];a[r]=e.get(n,u),a[o]=e.get(i,u);var h=Lr(e.get(i,u));return(h=Math.min(h,20))>=0&&(a[o]=+a[o].toFixed(h)),a}function zc(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!Lc(e)&&!y(e.coord)&&r){var o=r.dimensions,a=Ec(e,i,r,t);if((e=n(e)).type&&FS[e.type]&&a.baseAxis&&a.valueAxis){var s=RS(o,a.baseAxis.dim),l=RS(o,a.valueAxis.dim);e.coord=FS[e.type](i,a.baseDataDim,a.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)FS[u[h]]&&(u[h]=Fc(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function Ec(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(Nc(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function Nc(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0}function cd(t,e,n){function i(t,e){return l(e.nodes,t)>=0}function r(t,i){var r=!1;return e(function(e){d(n(t,e)||[],function(t){i.records[e.name][t]&&(r=!0)})}),r}function o(t,i){i.nodes.push(t),e(function(e){d(n(t,e)||[],function(t){i.records[e.name][t]=!0})})}return function(n){var a={nodes:[],records:{}};if(e(function(t){a.records[t.name]={}}),!n)return a;o(n,a);var s;do{s=!1,t(function(t){!i(t,a)&&r(t,a)&&(o(t,a),s=!0)})}while(s);return a}}function dd(t,e,n){var i=[1/0,-1/0];return QS(n,function(t){var n=t.getData();n&&QS(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]i[1]&&(i[1]=e[1])})}),i[1]0?0:NaN);var a=n.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:NaN),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function pd(t,e){var n=t.getAxisModel(),i=t._percentWindow,r=t._valueWindow;if(i){var o=zr(r,[0,500]);o=Math.min(o,20);var a=e||0===i[0]&&100===i[1];n.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function gd(t){var e=t._minMaxSpan={},n=t._dataZoomModel;QS(["min","max"],function(i){e[i+"Span"]=n.get(i+"Span");var r=n.get(i+"ValueSpan");if(null!=r&&(e[i+"ValueSpan"]=r,null!=(r=t.getAxisModel().axis.scale.parse(r)))){var o=t._dataExtent;e[i+"Span"]=Ar(o[0]+r,o,[0,100],!0)}})}function md(t){var e={};return eM(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}function vd(t,e){var n=t._rangePropMode,i=t.get("rangeMode");eM([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?n[r]="percent":!o&&a?n[r]="value":i?n[r]=i[r]:o&&(n[r]="percent")})}function yd(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function xd(t,e){return Math.min(e[1],Math.max(e[0],t))}function _d(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function wd(t){return"vertical"===t?"ns-resize":"ew-resize"}function bd(t,e,n){Id(t)[e]=n}function Sd(t,e,n){var i=Id(t);i[e]===n&&(i[e]=null)}function Md(t,e){return!!Id(t)[e]}function Id(t){return t[gM]||(t[gM]={})}function Td(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,i=e(Cd,this),r=e(Ad,this),o=e(Dd,this),s=e(kd,this),l=e(Pd,this);pg.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=a(n(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Cd(t){if(!(lt(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function Ad(t){if(!lt(t)&&zd("moveOnMouseMove",t,this._opt)&&this._dragging&&"pinch"!==t.gestureEvent&&!Md(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&vg(t.event),Od(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n})}}function Dd(t){lt(t)||(this._dragging=!1)}function kd(t){var e=zd("zoomOnMouseWheel",t,this._opt),n=zd("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;Ld(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a})}if(n){var l=Math.abs(i);Ld(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a})}}}function Pd(t){Md(this._zr,"globalPan")||Ld(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Ld(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(vg(i.event),Od(t,e,n,i,r))}function Od(t,e,n,i,r){r.isAvailableBehavior=m(zd,null,n,i),t.trigger(e,r)}function zd(t,e,n){var i=n[t];return!t||i&&(!_(i)||e.event[i+"Key"])}function Ed(t,e){var n=Bd(t),i=e.dataZoomId,r=e.coordId;d(n,function(t,n){var o=t.dataZoomInfos;o[i]&&l(e.allCoordIds,r)<0&&(delete o[i],t.count--)}),Vd(n);var o=n[r];o||((o=n[r]={coordId:r,dataZoomInfos:{},count:0}).controller=Fd(t,o),o.dispatchAction=v(Wd,t)),!o.dataZoomInfos[i]&&o.count++,o.dataZoomInfos[i]=e;var a=Hd(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(e.containsPoint),xa(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Nd(t,e){var n=Bd(t);d(n,function(t){t.controller.dispose();var n=t.dataZoomInfos;n[e]&&(delete n[e],t.count--)}),Vd(n)}function Rd(t){return t.type+"\0_"+t.id}function Bd(t){var e=t.getZr();return e[mM]||(e[mM]={})}function Fd(t,e){var n=new Td(t.getZr());return d(["pan","zoom","scrollMove"],function(t){n.on(t,function(n){var i=[];d(e.dataZoomInfos,function(r){if(n.isAvailableBehavior(r.dataZoomModel.option)){var o=(r.getRange||{})[t],a=o&&o(e.controller,n);!r.dataZoomModel.get("disabled",!0)&&a&&i.push({dataZoomId:r.dataZoomId,start:a[0],end:a[1]})}}),i.length&&e.dispatchAction(i)})}),n}function Vd(t){d(t,function(e,n){e.count||(e.controller.dispose(),delete t[n])})}function Wd(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Hd(t){var e,n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return d(t,function(t){var r=t.dataZoomModel,o=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");n["type_"+o]>n["type_"+e]&&(e=o),i&=r.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function Gd(t){return function(e,n,i,r){var o=this._range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return oM(l,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function Zd(t,e){wM[t]=e}function Ud(t){return wM[t]}function Xd(t){return 0===t.indexOf("my")}function Yd(t){this.model=t}function jd(t){this.model=t}function qd(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function $d(t){var e=[];return d(t,function(t,n){var i=t.categoryAxis,r=t.valueAxis.dim,o=[" "].concat(f(t.series,function(t){return t.name})),a=[i.model.getCategories()];d(t.series,function(t){a.push(t.getRawData().mapArray(r,function(t){return t}))});for(var s=[o.join(kM)],l=0;l=0)return!0}function ef(t){for(var e=t.split(/\n+/g),n=[],i=f(Jd(e.shift()).split(PM),function(t){return{name:t,data:[]}}),r=0;rFM}function wf(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function bf(t,e,n,i){var r=new Jg;return r.add(new py({name:"main",style:Tf(n),silent:!0,draggable:!0,cursor:"move",drift:LM(t,e,r,"nswe"),ondragend:LM(xf,e,{isEnd:!0})})),OM(i,function(n){r.add(new py({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:LM(t,e,r,n),ondragend:LM(xf,e,{isEnd:!0})}))}),r}function Sf(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=NM(r,VM),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,f=c-o+r/2,p=h-a,g=c-s,m=p+r,v=g+r;If(t,e,"main",a,s,p,g),i.transformable&&(If(t,e,"w",l,u,o,v),If(t,e,"e",d,u,o,v),If(t,e,"n",l,u,m,o),If(t,e,"s",l,f,m,o),If(t,e,"nw",l,u,o,o),If(t,e,"ne",d,u,o,o),If(t,e,"sw",l,f,o,o),If(t,e,"se",d,f,o,o))}function Mf(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(Tf(n)),r.attr({silent:!i,cursor:i?"move":"default"}),OM(["w","e","n","s","se","sw","ne","nw"],function(n){var r=e.childOfName(n),o=Df(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?GM[o]+"-resize":null})})}function If(t,e,n,i,r,o,a){var s=e.childOfName(n);s&&s.setShape(zf(Of(t,e,[[i,r],[i+o,r+a]])))}function Tf(t){return a({strokeNoScale:!0},t.brushStyle)}function Cf(t,e,n,i){var r=[EM(t,n),EM(e,i)],o=[NM(t,n),NM(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function Af(t){return vr(t.group)}function Df(t,e){if(e.length>1)return("e"===(i=[Df(t,(e=e.split(""))[0]),Df(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var n={left:"w",right:"e",top:"n",bottom:"s"},i=xr({w:"left",e:"right",n:"top",s:"bottom"}[e],Af(t));return n[i]}function kf(t,e,n,i,r,o,a,s){var l=i.__brushOption,u=t(l.range),h=Lf(n,o,a);OM(r.split(""),function(t){var e=HM[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Cf(u[0][0],u[1][0],u[0][1],u[1][1])),pf(n,i),xf(n,{isEnd:!1})}function Pf(t,e,n,i,r){var o=e.__brushOption.range,a=Lf(t,n,i);OM(o,function(t){t[0]+=a[0],t[1]+=a[1]}),pf(t,e),xf(t,{isEnd:!1})}function Lf(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function Of(t,e,i){var r=vf(t,e);return r&&!0!==r?r.clipPath(i,t._transform):n(i)}function zf(t){var e=EM(t[0][0],t[1][0]),n=EM(t[0][1],t[1][1]);return{x:e,y:n,width:NM(t[0][0],t[1][0])-e,height:NM(t[0][1],t[1][1])-n}}function Ef(t,e,n){if(t._brushType){var i=t._zr,r=t._covers,o=mf(t,e,n);if(!t._dragging)for(var a=0;a=0)&&t(o,i,r)})}function jf(t){return t[0]>t[1]&&t.reverse(),t}function qf(t,e){return zn(t,e,{includeMainTypes:JM})}function $f(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=jf(f([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}function Kf(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Qf(t,e){var n=Jf(t),i=Jf(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Jf(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function tp(t,e){var n=rp(t);aI(e,function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(e)}function ep(t){var e=rp(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return aI(n,function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}}),i}function np(t){t[sI]=null}function ip(t){return rp(t).length}function rp(t){var e=t[sI];return e||(e=t[sI]=[{}]),e}function op(t,e,n){(this._brushController=new sf(n.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function ap(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(n){e[n]=t[n],null==e[n]&&(e[n]="all"),(!1===e[n]||"none"===e[n])&&(e[n]=[])}),e}function sp(t,e){t.setIconStatus("back",ip(e)>1?"emphasis":"normal")}function lp(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Yf(ap(t.option),e,{include:["grid"]});n._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function up(t){this.model=t}function hp(t){return pI(t)}function cp(){if(!vI&&yI){vI=!0;var t=yI.styleSheets;t.length<31?yI.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function dp(t){return parseInt(t,10)}function fp(t,e){cp(),this.root=t,this.storage=e;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",t.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(i)},e.addToStorage=function(t){t.onAdd&&t.onAdd(i),o.call(e,t)},this._firstPaint=!0}function pp(t){return function(){Yg('In IE8.0 VML mode painter not support method "'+t+'"')}}function gp(t){return document.createElementNS(QI,t)}function mp(t){return nT(1e4*t)/1e4}function vp(t){return t-lT}function yp(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==eT}function xp(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==eT}function _p(t,e){e&&wp(t,"transform","matrix("+tT.call(e,",")+")")}function wp(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&("string"==typeof n&&n.indexOf("NaN")>-1&&console.log(n),t.setAttribute(e,n))}function bp(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function Sp(t,e,n,i){if(yp(e,n)){var r=n?e.textFill:e.fill;r="transparent"===r?eT:r,"none"!==t.getAttribute("clip-path")&&r===eT&&(r="rgba(0, 0, 0, 0.002)"),wp(t,"fill",r),wp(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else wp(t,"fill",eT);if(xp(e,n)){var o=n?e.textStroke:e.stroke;wp(t,"stroke",o="transparent"===o?eT:o),wp(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?i.getLineScale():1)),wp(t,"paint-order",n?"stroke":"fill"),wp(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(wp(t,"stroke-dasharray",e.lineDash.join(",")),wp(t,"stroke-dashoffset",nT(e.lineDashOffset||0))):wp(t,"stroke-dasharray",""),e.lineCap&&wp(t,"stroke-linecap",e.lineCap),e.lineJoin&&wp(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&wp(t,"stroke-miterlimit",e.miterLimit)}else wp(t,"stroke",eT)}function Mp(t){for(var e=[],n=t.data,i=t.len(),r=0;r=aT||!vp(g)&&(d>-oT&&d<0||d>oT)==!!p;var y=mp(s+u*rT(c)),x=mp(l+h*iT(c));m&&(d=p?aT-1e-4:1e-4-aT,v=!0,9===r&&e.push("M",y,x));var _=mp(s+u*rT(c+d)),w=mp(l+h*iT(c+d));e.push("A",mp(u),mp(h),nT(f*sT),+v,+p,_,w);break;case JI.Z:o="Z";break;case JI.R:var _=mp(n[r++]),w=mp(n[r++]),b=mp(n[r++]),S=mp(n[r++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}o&&e.push(o);for(var M=0;M=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),Yp={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},jp={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},qp=Object.prototype.toString,$p=Array.prototype,Kp=$p.forEach,Qp=$p.filter,Jp=$p.slice,tg=$p.map,eg=$p.reduce,ng={},ig=function(){return ng.createCanvas()};ng.createCanvas=function(){return document.createElement("canvas")};var rg,og="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var n in this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var ag=(Object.freeze||Object)({$override:e,clone:n,merge:i,mergeAll:r,extend:o,defaults:a,createCanvas:ig,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,n){if(t&&e)for(var i=0,r=t.length;i3&&(i=fg.call(i,1));for(var o=e.length,a=0;a4&&(i=fg.call(i,1,i.length-1));for(var o=i[i.length-1],a=e.length,s=0;s=0;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=dt(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==yg)){r.target=i[o];break}}return r}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){_g.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||hg(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),h(_g,pg),h(_g,J);var wg="undefined"==typeof Float32Array?Array:Float32Array,bg=(Object.freeze||Object)({create:ft,identity:pt,copy:gt,mul:mt,translate:vt,rotate:yt,scale:xt,invert:_t,clone:function(t){var e=ft();return gt(e,t),e}}),Sg=pt,Mg=5e-5,Ig=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Tg=Ig.prototype;Tg.transform=null,Tg.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)};var Cg=[];Tg.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(n||e){i=i||ft(),n?this.getLocalTransform(i):Sg(i),e&&(n?mt(i,t.transform,i):gt(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(Cg);var o=Cg[0]<0?-1:1,a=Cg[1]<0?-1:1,s=((Cg[0]-o)*r+o)/Cg[0]||0,l=((Cg[1]-a)*r+a)/Cg[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||ft(),_t(this.invTransform,i)}else i&&Sg(i)},Tg.getLocalTransform=function(t){return Ig.getLocalTransform(this,t)},Tg.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},Tg.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Ag=[],Dg=ft();Tg.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;wt(e-1)&&(e=Math.sqrt(e)),wt(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},Tg.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(mt(Ag,t.invTransform,e),e=Ag);var n=this.origin;n&&(n[0]||n[1])&&(Dg[4]=n[0],Dg[5]=n[1],mt(Ag,e,Dg),Ag[4]-=n[0],Ag[5]-=n[1],e=Ag),this.setLocalTransform(e)}},Tg.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},Tg.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&$(n,n,i),n},Tg.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&$(n,n,i),n},Ig.getLocalTransform=function(t,e){Sg(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),xt(e,e,i),r&&yt(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e};var kg={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kg.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*kg.bounceIn(2*t):.5*kg.bounceOut(2*t-1)+.5}};bt.prototype={constructor:bt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?kg[i]:i,o="function"==typeof r?r(n):n;return this.fire("frame",o),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Pg=function(){this.head=null,this.tail=null,this._len=0},Lg=Pg.prototype;Lg.insert=function(t){var e=new Og(t);return this.insertEntry(e),e},Lg.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Lg.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Lg.len=function(){return this._len},Lg.clear=function(){this.head=this.tail=null,this._len=0};var Og=function(t){this.value=t,this.next,this.prev},zg=function(t){this._list=new Pg,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Eg=zg.prototype;Eg.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Og(e),a.key=t,n.insertEntry(a),i[t]=a}return r},Eg.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},Eg.clear=function(){this._list.clear(),this._map={}};var Ng={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},Rg=new zg(20),Bg=null,Fg=Bt,Vg=Ft,Wg=(Object.freeze||Object)({parse:Ot,lift:Nt,toHex:Rt,fastLerp:Bt,fastMapToColor:Fg,lerp:Ft,mapToColor:Vg,modifyHSL:function(t,e,n,i){if(t=Ot(t))return t=Et(t),null!=e&&(t[0]=Mt(e)),null!=n&&(t[1]=Ct(n)),null!=i&&(t[2]=Ct(i)),Wt(zt(t),"rgba")},modifyAlpha:Vt,stringify:Wt}),Hg=Array.prototype.slice,Gg=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Ht,this._setter=i||Gt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Gg.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Kt(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new re(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},re.create=function(t){return new re(t.x,t.y,t.width,t.height)};var Jg=function(t){t=t||{},qg.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Jg.prototype={constructor:Jg,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Jg&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=l(i,t);return r<0?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Jg&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Jg&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fe};var im={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},rm=function(t,e,n){return im.hasOwnProperty(e)?n*=t.dpr:n},om=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],am=function(t){this.extendFrom(t,!1)};am.prototype={constructor:am,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i=this,r=n&&n.style,o=!r,a=0;a0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?ge:pe)(t,e,n),r=e.colorStops,o=0;o=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n15)break}s.__drawIndex=m,s.__drawIndex0&&t>i[0]){for(a=0;at);a++);o=n[i[a]]}if(i.splice(a+1,0,t),n[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Yg("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i0?.01:0),this._needsManuallyCompositing),o.__builtin__||Yg("ZLevel "+s+" has been used by unkown layer "+o.id),o!==n&&(o.__used=!0,o.__startIndex!==r&&(o.__dirty=!0),o.__startIndex=r,o.incremental?o.__drawIndex=-1:o.__drawIndex=r,e(r),n=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?i(n[t],e,!0):n[t]=e;for(var r=0;r=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n1&&i&&i.length>1){var o=fn(i)/fn(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=pn(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},Pm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Lm=["touchstart","touchend","touchmove"],Om={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},zm=f(Pm,function(t){var e=t.replace("mouse","pointer");return Om[e]?e:t}),Em={mousemove:function(t){t=ot(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=ot(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=ot(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,mn(this,t,"start"),Em.mousemove.call(this,t),Em.mousedown.call(this,t),vn(this)},touchmove:function(t){(t=ot(this.dom,t)).zrByTouch=!0,mn(this,t,"change"),Em.mousemove.call(this,t),vn(this)},touchend:function(t){(t=ot(this.dom,t)).zrByTouch=!0,mn(this,t,"end"),Em.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Em.click.call(this,t),vn(this)},pointerdown:function(t){Em.mousedown.call(this,t)},pointermove:function(t){yn(t)||Em.mousemove.call(this,t)},pointerup:function(t){Em.mouseup.call(this,t)},pointerout:function(t){yn(t)||Em.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Em[t]=function(e){e=ot(this.dom,e),this.trigger(t,e)}});var Nm=_n.prototype;Nm.dispose=function(){for(var t=Pm.concat(Lm),e=0;e=0||i&&l(i,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},Qm=Km([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Jm={getLineStyle:function(t){var e=Qm(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},tv=Km([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ev={getAreaStyle:function(t,e){return tv(this,t,e)}},nv=Math.pow,iv=Math.sqrt,rv=1e-8,ov=1e-4,av=iv(3),sv=1/3,lv=B(),uv=B(),hv=B(),cv=Math.min,dv=Math.max,fv=Math.sin,pv=Math.cos,gv=2*Math.PI,mv=B(),vv=B(),yv=B(),xv=[],_v=[],wv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bv=[],Sv=[],Mv=[],Iv=[],Tv=Math.min,Cv=Math.max,Av=Math.cos,Dv=Math.sin,kv=Math.sqrt,Pv=Math.abs,Lv="undefined"!=typeof Float32Array,Ov=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Ov.prototype={constructor:Ov,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Pv(1/Ug/t)||0,this._uy=Pv(1/Ug/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(wv.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Pv(t-this._xi)>this._ux||Pv(e-this._yi)>this._uy||this._len<5;return this.addData(wv.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,o){return this.addData(wv.C,t,e,n,i,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,n,i){return this.addData(wv.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.addData(wv.A,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Av(r)*n+t,this._yi=Dv(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(wv.R,t,e,n,i),this},closePath:function(){this.addData(wv.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;n0&&f<=t||h<0&&f>=t||0==h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(n=a[i=this._dashIdx]),p+=c*n,this._dashIdx=(i+1)%g,h>0&&fl||c>0&&pu||s[i%2?"moveTo":"lineTo"](h>=0?Tv(f,t):Cv(f,t),c>=0?Tv(p,e):Cv(p,e));h=f-t,c=p-e,this._dashOffset=-kv(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,o){var a,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=jn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,a=0;a<1;a+=.1)s=v(g,t,n,r,a+.1)-v(g,t,n,r,a),l=v(m,e,i,o,a+.1)-v(m,e,i,o,a),y+=kv(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(a=(w-d)/y;a<=1;)u=v(g,t,n,r,a),h=v(m,e,i,o,a),x%2?p.moveTo(u,h):p.lineTo(u,h),a+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-kv(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Lv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){bv[0]=bv[1]=Mv[0]=Mv[1]=Number.MAX_VALUE,Sv[0]=Sv[1]=Iv[0]=Iv[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,o=0;ol||Pv(a-r)>u||c===h-1)&&(t.lineTo(o,a),i=o,r=a);break;case wv.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case wv.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case wv.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=Av(v)*g+f,n=Dv(v)*m+p),i=Av(M)*g+f,r=Dv(M)*m+p;break;case wv.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case wv.Z:t.closePath(),i=e,r=n}}}},Ov.CMD=wv;var zv=2*Math.PI,Ev=2*Math.PI,Nv=Ov.CMD,Rv=2*Math.PI,Bv=1e-4,Fv=[-1,-1,-1],Vv=[-1,-1],Wv=hm.prototype.getCanvasPattern,Hv=Math.abs,Gv=new Ov(!0);Ii.prototype={constructor:Ii,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n=this.style,i=this.path||Gv,r=n.hasStroke(),o=n.hasFill(),a=n.fill,s=n.stroke,l=o&&!!a.colorStops,u=r&&!!s.colorStops,h=o&&!!a.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,a,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=Wv.call(a,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Wv.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(i.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=v}else i.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=n.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=v}else i.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new Ov},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Ov),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Mi(o,a/s,t,e)))return!0}if(r.hasFill())return Si(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):on.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(w(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Hv(t[0]-1)>1e-10&&Hv(t[3]-1)>1e-10?Math.sqrt(Hv(t[0]*t[3]-t[2]*t[1])):1}},Ii.extend=function(t){var e=function(e){Ii.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};u(e,Ii);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},u(Ii,on);var Zv=Ov.CMD,Uv=[[],[],[]],Xv=Math.sqrt,Yv=Math.atan2,jv=function(t,e){var n,i,r,o,a,s,l=t.data,u=Zv.M,h=Zv.C,c=Zv.L,d=Zv.R,f=Zv.A,p=Zv.Q;for(r=0,o=0;r=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;rn-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Pi(s[0],f[0],l[0],u[0],d,p,g),Pi(s[1],f[1],l[1],u[1],d,p,g)])}return i},cy=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}},createIcon:br,Group:Jg,Image:an,Text:ry,Circle:oy,Sector:ly,Ring:uy,Polygon:dy,Polyline:fy,Rect:py,Line:gy,BezierCurve:vy,Arc:yy,IncrementalDisplayable:zi,CompoundPath:xy,LinearGradient:wy,RadialGradient:by,BoundingRect:re}),Py=["textStyle","color"],Ly={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Py):null)},getFont:function(){return fr({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Se(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Oy=Km([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),zy={getItemStyle:function(t,e){var n=Oy(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Ey=h,Ny=On();Sr.prototype={constructor:Sr,init:null,mergeOption:function(t){i(this.option,t,!0)},get:function(t,e){return null==t?this.option:Mr(this.option,this.parsePath(t),!e&&Ir(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&Ir(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:Mr(this.option,t=this.parsePath(t));return e=e||(n=Ir(this,t))&&n.getModel(t),new Sr(i,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(n(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Ny(this).getParent=t},isAnimationEnabled:function(){if(!Xp.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Wn(Sr),Hn(Sr),Ey(Sr,Jm),Ey(Sr,ev),Ey(Sr,Ly),Ey(Sr,zy);var Ry=0,By=1e-4,Fy=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Vy=(Object.freeze||Object)({linearMap:Ar,parsePercent:Dr,round:kr,asc:Pr,getPrecision:Lr,getPrecisionSafe:Or,getPixelPrecision:zr,getPercentWithPrecision:Er,MAX_SAFE_INTEGER:9007199254740991,remRadian:Nr,isRadianAroundZero:Rr,parseDate:Br,quantity:Fr,nice:Wr,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},reformIntervals:function(t){function e(t,n,i){return t.interval[i]=0}}),Wy=k,Hy=/([&<>"'])/g,Gy={"&":"&","<":"<",">":">",'"':""","'":"'"},Zy=["a","b","c","d","e","f","g"],Uy=function(t,e){return"{"+t+(null==e?"":e)+"}"},Xy=De,Yy=Se,jy=(Object.freeze||Object)({addCommas:Hr,toCamelCase:Gr,normalizeCssArray:Wy,encodeHTML:Zr,formatTpl:Ur,formatTplSimple:function(t,e,n){return d(e,function(e,i){t=t.replace("{"+i+"}",n?Zr(e):e)}),t},getTooltipMarker:Xr,formatTime:jr,capitalFirst:qr,truncateText:Xy,getTextRect:Yy}),qy=d,$y=["left","right","top","bottom","width","height"],Ky=[["width","left","right"],["height","top","bottom"]],Qy=$r,Jy=(v($r,"vertical"),v($r,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),tx=On(),ex=Sr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Sr.call(this,t,e,n,i),this.uid=Tr("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,r=n?to(t):{};i(t,e.getTheme().get(this.mainType)),i(t,this.getDefaultOption()),n&&Jr(t,r,n)},mergeOption:function(t,e){i(this.option,t,!0);var n=this.layoutMode;n&&Jr(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=tx(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var r=n.prototype.defaultOption;r&&e.push(r),n=n.superClass}for(var o={},a=e.length-1;a>=0;a--)o=i(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Un(ex,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){t=Fn(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Fn(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(ex),function(t,e){function n(t){var n={},o=[];return d(t,function(a){var s=i(n,a),u=r(s.originalDeps=e(a),t);s.entryCount=u.length,0===s.entryCount&&o.push(a),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(n,t);l(e.successor,t)<0&&e.successor.push(a)})}),{graph:n,noEntryList:o}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return d(t,function(t){l(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function o(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var a=n(e),s=a.graph,l=a.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(i.call(r,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,o(t)}:o)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(ex,function(t){var e=[];return d(ex.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Fn(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(ex,Jy);var nx="";"undefined"!=typeof navigator&&(nx=navigator.platform||"");var ix={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:nx.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},rx=On(),ox={clearColorPalette:function(){rx(this).colorIdx=0,rx(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=rx(e=e||this),r=i.colorIdx||0,o=i.colorNameMap=i.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=Mn(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?no(s,n):a;if((l=l||a)&&l.length){var u=l[r];return t&&(o[t]=u),i.colorIdx=(r+1)%l.length,u}}},ax={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),ro(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),ro(o)&&(i.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),ro(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),ro(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),ro(a)&&(i.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();d(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),ro(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=o)})}},sx="original",lx="arrayRows",ux="objectRows",hx="keyedColumns",cx="unknown",dx="typedArray",fx="column",px="row";oo.seriesDataToSource=function(t){return new oo({data:t,sourceFormat:S(t)?dx:sx,fromDataset:!1})},Hn(oo);var gx=On(),mx="\0_ec_inner",vx=Sr.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Sr(n),this._optionManager=i},setOption:function(t,e){P(!(mx in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):wo.call(this,i),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this,this._api);o.length&&d(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];lo(this),d(t,function(t,r){null!=t&&(ex.hasClass(r)?r&&a.push(r):e[r]=null==e[r]?n(t):i(e[r],t,!0))}),ex.topologicalTravel(a,ex.getAllClassMainTypes(),function(n,i){var a=Mn(t[n]),s=An(r.get(n),a);Dn(s),d(s,function(t,e){var i=t.option;w(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=So(n,i,t.exist))});var l=bo(r,i);e[n]=[],r.set(n,[]),d(s,function(t,i){var a=t.exist,s=t.option;if(P(w(s)||a,"Empty component definition"),s){var u=ex.getClass(n,t.keyInfo.subType,!0);if(a&&a instanceof u)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var h=o({dependentModels:l,componentIndex:i},t.keyInfo);o(a=new u(s,this,this,h),h),a.init(s,this,this,h),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);r.get(n)[i]=a,e[n][i]=a.option},this),"series"===n&&Mo(this,r.get("series"))},this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return d(t,function(e,n){if(ex.hasClass(n)){for(var i=(e=Mn(e)).length-1;i>=0;i--)Pn(e[i])&&e.splice(i,1);t[n]=e}}),delete t[mx],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=n)y(n)||(n=[n]),a=g(f(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=y(i);a=g(o,function(t){return s&&l(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var u=y(r);a=g(o,function(t){return u&&l(r,t.name)>=0||!u&&t.name===r})}else a=o.slice();return Io(a,t)},findComponents:function(t){var e=t.query,n=t.mainType,i=function(t){var e=n+"Index",i=n+"Id",r=n+"Name";return!t||null==t[e]&&null==t[i]&&null==t[r]?null:{mainType:n,index:t[e],id:t[i],name:t[r]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Io(i?this.queryComponents(i):this._componentsMap.get(n),t))},eachComponent:function(t,e,n){var i=this._componentsMap;"function"==typeof t?(n=e,e=t,i.each(function(t,i){d(t,function(t,r){e.call(n,i,t,r)})})):_(t)?d(i.get(t),e,n):w(t)&&d(this.findComponents(t),e,n)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){d(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return d(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Mo(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Mo(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),ex.topologicalTravel(n,ex.getAllClassMainTypes(),function(n,i){d(e.get(n),function(e){("series"!==n||!xo(e,t))&&e.restoreData()})})}});h(vx,ox);var yx=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],xx={};Co.prototype={constructor:Co,create:function(t,e){var n=[];d(xx,function(i,r){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},update:function(t,e){d(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Co.register=function(t,e){xx[t]=e},Co.get=function(t){return xx[t]};var _x=d,bx=n,Sx=f,Mx=i,Ix=/^(min|max)?(.+)$/;Ao.prototype={constructor:Ao,setOption:function(t,e){t&&d(Mn(t.series),function(t){t&&t.data&&S(t.data)&&O(t.data)}),t=bx(t,!0);var n=this._optionBackup,i=Do.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(Oo(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Sx(e.timelineOptions,bx),this._mediaList=Sx(e.mediaList,bx),this._mediaDefault=bx(e.mediaDefault),this._currentMediaIndices=[],bx(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=bx(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,o=[],a=[];if(!i.length&&!r)return a;for(var s=0,l=i.length;s=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;a===l&&s===u||(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=ra(this,i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||d=n?null:t1&&o>0?e:t}};return s}();Fx.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Fx.unfinished=function(){return this._progress&&this._dueIndex":"\n",s="richText"===i,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(n){function r(t,n){var r=h.getDimensionInfo(n);if(r&&!1!==r.otherDims.tooltip){var c=r.type,d="sub"+o.seriesIndex+"at"+u,p=Xr({color:v,type:"subItem",renderMode:i,markerId:d}),g="string"==typeof p?p:p.content,m=(a?g+Zr(r.displayName||"-")+": ":"")+Zr("ordinal"===c?t+"":"time"===c?e?"":jr("yyyy/MM/dd hh:mm:ss",t):Hr(t));m&&f.push(m),s&&(l[d]=v,++u)}}var a=p(n,function(t,e,n){var i=h.getDimensionInfo(n);return t|=i&&!1!==i.tooltip&&null!=i.displayName},0),f=[];c.length?d(c,function(e){r(Jo(h,t,e),e)}):d(n,r);var g=a?s?"\n":"
":"",m=g+f.join(g||", ");return{renderMode:i,content:m,style:l}}(g):r(f?Jo(h,t,c[0]):m?g[0]:g)).content,_=o.seriesIndex+"at"+u,b=Xr({color:v,type:"item",renderMode:i,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;kn(this)||(M=""),M=M?Zr(M)+(e?": ":a):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?Zr(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(Xp.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=ox.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});h(Hx,Bx),h(Hx,ox);var Gx=function(){this.group=new Jg,this.uid=Tr("viewComponent")};Gx.prototype={constructor:Gx,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var Zx=Gx.prototype;Zx.updateView=Zx.updateLayout=Zx.updateVisual=function(t,e,n,i){},Wn(Gx),Un(Gx,{registerWhenExtend:!0});var Ux=function(){var t=On();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,o=n.progressiveRender,a=n.large=i.large,s=n.progressiveRender=i.progressiveRender;return!!(r^a||o^s)&&"reset"}},Xx=On(),Yx=Ux();fa.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){ga(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){ga(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var jx=fa.prototype;jx.updateView=jx.updateLayout=jx.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Wn(fa),Un(fa,{registerWhenExtend:!0}),fa.markUpdateMethod=function(t,e){Xx(t).updateMethod=e};var qx={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},$x="\0__throttleOriginMethod",Kx="\0__throttleRate",Qx="\0__throttleType",Jx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof _y||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}}},t_={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},e_=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return d(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=t_.aria,r=0;r1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:a}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";o=n(o=i(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:r(t.subType)});var c=t.getData();window.data=c,c.count()>l?o+=n(i("data.partialData"),{displayCnt:l}):o+=i("data.allData");for(var d=[],p=0;pn.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},i_.getPipeline=function(t){return this._pipelineMap.get(t)},i_.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},i_.restorePipelines=function(t){var e=this,n=e._pipelineMap=N();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Oa(e,t,t.dataTask)})},i_.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;d(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&Sa(this,i,r,e,n),i.overallReset&&Ma(this,i,r,e,n)},this)},i_.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,Oa(this,e,r)},i_.performDataProcessorTasks=function(t,e){ba(this,this._dataProcessorHandlers,t,e,{block:!0})},i_.performVisualTasks=function(t,e,n){ba(this,this._visualHandlers,t,e,n)},i_.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},i_.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var r_=i_.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},o_=Pa(0);wa.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:za(t)}),t.uid=Tr("stageHandler"),e&&(t.visualType=e),t};var a_,s_={},l_={};Ea(s_,vx),Ea(l_,To),s_.eachSeriesByType=s_.eachRawSeriesByType=function(t){a_=t},s_.eachComponent=function(t){"series"===t.mainType&&t.subType&&(a_=t.subType)};var u_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],h_={color:u_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],u_]},c_=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],d_={color:c_,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:c_[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:c_},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};d_.categoryAxis.splitLine.show=!1,ex.extend({type:"dataset",defaultOption:{seriesLayoutBy:fx,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){ao(this)}}),Gx.extend({type:"dataset"});var f_=Ii.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()}}),p_=/[\s,]+/;Ra.prototype.parse=function(t,e){e=e||{};var n=Na(t);if(!n)throw new Error("Illegal svg");var i=new Jg;this._root=i;var r=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||e.width),a=parseFloat(n.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(a)&&(a=null),Wa(n,i,null,!0);for(var s=n.firstChild;s;)this._parseNode(s,i),s=s.nextSibling;var l,u;if(r){var h=L(r).split(p_);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=o&&null!=a&&(u=Ua(l,o,a),!e.ignoreViewBox)){var c=i;(i=new Jg).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==a||i.setClipPath(new py({shape:{x:0,y:0,width:o,height:a}})),{root:i,width:o,height:a,viewBoxRect:l,viewBoxTransform:u}},Ra.prototype._parseNode=function(t,e){var n=t.nodeName.toLowerCase();"defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0);var i;if(this._isDefine){if(a=m_[n]){var r=a.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=r)}}else{var a=g_[n];a&&(i=a.call(this,t,e),e.add(i))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},Ra.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new ry({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Fa(e,r),Wa(t,r,this._defs);var o=r.style.fontSize;o&&o<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var a=r.getBoundingRect();return this._textX+=a.width,e.add(r),r};var g_={g:function(t,e){var n=new Jg;return Fa(e,n),Wa(t,n,this._defs),n},rect:function(t,e){var n=new py;return Fa(e,n),Wa(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new oy;return Fa(e,n),Wa(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new gy;return Fa(e,n),Wa(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new f_;return Fa(e,n),Wa(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=Va(n));var i=new dy({shape:{points:n||[]}});return Fa(e,i),Wa(t,i,this._defs),i},polyline:function(t,e){var n=new Ii;Fa(e,n),Wa(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=Va(i)),new fy({shape:{points:i||[]}})},image:function(t,e){var n=new an;return Fa(e,n),Wa(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Jg;return Fa(e,a),Wa(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new Jg;return Fa(e,a),Wa(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=Di(t.getAttribute("d")||"");return Fa(e,n),Wa(t,n,this._defs),n}},m_={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),o=new wy(e,n,i,r);return Ba(t,o),o},radialgradient:function(t){}},v_={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},y_=/url\(\s*#(.*?)\)/,x_=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,__=/([^\s:;]+)\s*:\s*([^:;]+)/g,w_=N(),b_={registerMap:function(t,e,n){var i;return y(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),d(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,S_[e])(t)}),w_.set(t,i)},retrieveMap:function(t){return w_.get(t)}},S_={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Na(t.source)}},M_=P,I_=d,T_=x,C_=w,A_=ex.parseClassType,D_={zrender:"4.0.5"},k_=1e3,P_=1e3,L_=3e3,O_={PROCESSOR:{FILTER:k_,STATISTIC:5e3},VISUAL:{LAYOUT:P_,GLOBAL:2e3,CHART:L_,COMPONENT:4e3,BRUSH:5e3}},z_="__flagInMainProcess",E_="__optionUpdated",N_=/^[a-zA-Z0-9_]+$/;Ya.prototype.on=Xa("on"),Ya.prototype.off=Xa("off"),Ya.prototype.one=Xa("one"),h(Ya,pg);var R_=ja.prototype;R_._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[E_]){var e=this[E_].silent;this[z_]=!0,$a(this),B_.update.call(this),this[z_]=!1,this[E_]=!1,ts.call(this,e),es.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Qa(this,i),t.performVisualTasks(i),ss(this,this._model,0,"remain"),n-=+new Date-r}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},R_.getDom=function(){return this._dom},R_.getZr=function(){return this._zr},R_.setOption=function(t,e,n){var i;if(C_(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[z_]=!0,!this._model||e){var r=new Ao(this._api),o=this._theme,a=this._model=new vx(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,G_),n?(this[E_]={silent:i},this[z_]=!1):($a(this),B_.update.call(this),this._zr.flush(),this[E_]=!1,this[z_]=!1,ts.call(this,i),es.call(this,i))},R_.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},R_.getModel=function(){return this._model},R_.getOption=function(){return this._model&&this._model.getOption()},R_.getWidth=function(){return this._zr.getWidth()},R_.getHeight=function(){return this._zr.getHeight()},R_.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},R_.getRenderedCanvas=function(t){if(Xp.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},R_.getSvgDataUrl=function(){if(Xp.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},R_.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;I_(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return I_(i,function(t){t.group.ignore=!1}),o},R_.getConnectedDataURL=function(t){if(Xp.canvasSupported){var e=this.group,i=Math.min,r=Math.max;if(q_[e]){var o=1/0,a=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(j_,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(n(t)),f=h.getDom().getBoundingClientRect();o=i(f.left,o),a=i(f.top,a),s=r(f.right,s),l=r(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(o*=h),f=(l*=h)-(a*=h),p=ig();p.width=c,p.height=f;var g=wn(p);return I_(u,function(t){var e=new an({style:{x:t.left*h-o,y:t.top*h-a,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},R_.convertToPixel=v(qa,"convertToPixel"),R_.convertFromPixel=v(qa,"convertFromPixel"),R_.containPixel=function(t,e){var n;return t=zn(this._model,t),d(t,function(t,i){i.indexOf("Models")>=0&&d(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n|=o.containPoint(e,t))}},this)},this),!!n},R_.getVisual=function(t,e){var n=(t=zn(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=i?n.getItemVisual(i,e):n.getVisual(e)},R_.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},R_.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var B_={prepareAndUpdate:function(t){$a(this),B_.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,n),o.performDataProcessorTasks(e,t),Qa(this,e),r.update(e,n),rs(e),o.performVisualTasks(e,t),os(this,e,n,t);var a=e.get("backgroundColor")||"transparent";if(Xp.canvasSupported)i.setBackgroundColor(a);else{var s=Ot(a);a=Wt(s,"rgb"),0===s[3]&&(a="transparent")}ls(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var o=N();e.eachSeries(function(r){var a=n._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),rs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),ss(n,e,0,t,o),ls(e,this._api)}},updateView:function(t){var e=this._model;e&&(fa.markUpdateMethod(t,"updateView"),rs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),os(this,this._model,this._api,t),ls(e,this._api))},updateVisual:function(t){B_.update.call(this,t)},updateLayout:function(t){B_.update.call(this,t)}};R_.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[z_]=!0,n&&$a(this),B_.update.call(this),this[z_]=!1,ts.call(this,i),es.call(this,i)}},R_.showLoading=function(t,e){if(C_(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Y_[t]){var n=Y_[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},R_.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},R_.makeActionFromEvent=function(t){var e=o({},t);return e.type=W_[t.type],e},R_.dispatchAction=function(t,e){C_(e)||(e={silent:!!e}),V_[t.type]&&this._model&&(this[z_]?this._pendingActions.push(t):(Ja.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&Xp.browser.weChat&&this._throttledZrFlush(),ts.call(this,e.silent),es.call(this,e.silent)))},R_.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},R_.on=Xa("on"),R_.off=Xa("off"),R_.one=Xa("one");var F_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];R_._initEvents=function(){I_(F_,function(t){this._zr.on(t,function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=o({},r.eventData));if(n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&i.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:u,view:h},this.trigger(t,n)}},this)},this),I_(W_,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},R_.isDisposed=function(){return this._disposed},R_.clear=function(){this.setOption({series:[]},!0)},R_.dispose=function(){if(!this._disposed){this._disposed=!0,Nn(this.getDom(),Q_,"");var t=this._api,e=this._model;I_(this._componentsViews,function(n){n.dispose(e,t)}),I_(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete j_[this.id]}},h(ja,pg),fs.prototype={constructor:fs,normalizeQuery:function(t){var e={},n={},i={};if(_(t)){var r=A_(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};d(t,function(t,r){for(var s=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e,n){function i(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var r=this.eventInfo;if(!r)return!0;var o=r.targetEl,a=r.packedEvent,s=r.model,l=r.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return i(u,s,"mainType")&&i(u,s,"subType")&&i(u,s,"index","componentIndex")&&i(u,s,"name")&&i(u,s,"id")&&i(h,a,"name")&&i(h,a,"dataIndex")&&i(h,a,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,o,a))},afterTrigger:function(){this.eventInfo=null}};var V_={},W_={},H_=[],G_=[],Z_=[],U_=[],X_={},Y_={},j_={},q_={},$_=new Date-0,K_=new Date-0,Q_="_echarts_instance_",J_=gs;bs(2e3,Jx),ys(Lx),xs(5e3,function(t){var e=N();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(Uo)}),Ms("default",function(t,e){a(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new py({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new yy({shape:{startAngle:-n_/2,endAngle:-n_/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new py({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*n_/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*n_/2}).delay(300).start("circularInOut");var o=new Jg;return o.add(i),o.add(r),o.add(n),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;i.setShape({cx:e,cy:o});var a=i.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o}),_s({type:"highlight",event:"highlight",update:"highlight"},R),_s({type:"downplay",event:"downplay",update:"downplay"},R),vs("light",h_),vs("dark",d_);var tw={};ks.prototype={constructor:ks,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],r=[];for(Ps(t,{},i,"_oldKeyGetter",this),Ps(e,n,r,"_newKeyGetter",this),o=0;o=e)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;gD[1]&&(D[1]=A)}if(!r.pure){var k=u[b];if(w&&null==k)if(null!=w.name)u[b]=k=w.name;else if(null!=n){var P=a[n],L=o[P][S];if(L){k=L[M];var O=l[P].ordinalMeta;O&&O.categories.length&&(k=O.categories[k])}}var z=null==w?null:w.id;null==z&&null!=k&&(d[k]=d[k]||0,z=k,d[k]>0&&(z+="__ec__"+d[k]),d[k]++),null!=z&&(h[b]=z)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Bs(this)}},hw.count=function(){return this._count},hw.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){i=new e(n);for(r=0;r=0&&e=0&&eo&&(o=s)}return n=[r,o],this._extent[t]=n,n},hw.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},hw.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},hw.getCalculationInfo=function(t){return this._calculationInfo[t]},hw.setCalculationInfo=function(t,e){nw(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},hw.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},hw.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=Number.MAX_VALUE,o=-1,a=0,s=this.count();a=0&&o<0)&&(r=u,o=l,i.length=0),i.push(a))}return i},hw.getRawIndex=Vs,hw.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=l&&w<=u||isNaN(w))&&(o[a++]=c),c++;h=!0}else if(2===i){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(o[a++]=c),c++}h=!0}}if(!h)if(1===i)for(m=0;m=l&&w<=u||isNaN(w))&&(o[a++]=M)}else for(m=0;mt[I][1])&&(S=!1)}S&&(o[a++]=this.getRawIndex(m))}return ab[1]&&(b[1]=w)}}}return r},hw.downSample=function(t,e,n,i){for(var r=Zs(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Es(this))(u),f=0,p=0;pu-p&&(s=u-p,a.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=Ws,r},hw.getItemModel=function(t){var e=this.hostModel;return new Sr(this.getRawDataItem(t),e,e&&e.ecModel)},hw.diff=function(t){var e=this;return new ks(t?t.getIndices():[],this.getIndices(),function(e){return Hs(t,e)},function(t){return Hs(e,t)})},hw.getVisual=function(t){var e=this._visual;return e&&e[t]},hw.setVisual=function(t,e){if(nw(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},hw.setLayout=function(t,e){if(nw(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},hw.getLayout=function(t){return this._layout[t]},hw.getItemLayout=function(t){return this._itemLayouts[t]},hw.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?o(this._itemLayouts[t]||{},e):e},hw.clearItemLayouts=function(){this._itemLayouts.length=0},hw.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},hw.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,nw(e))for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},hw.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var cw=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};hw.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(cw,e)),this._graphicEls[t]=e},hw.getItemGraphicEl=function(t){return this._graphicEls[t]},hw.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},hw.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new uw(e,this.hostModel)}if(t._storage=this._storage,Rs(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Ws:Vs,t},hw.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(D(arguments)))})},hw.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],hw.CHANGABLE_METHODS=["filterSelf","selectRange"];var dw=function(t,e){return e=e||{},Ys(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};nl.prototype.parse=function(t){return t},nl.prototype.getSetting=function(t){return this._setting[t]},nl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},nl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},nl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},nl.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},nl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},nl.prototype.getExtent=function(){return this._extent.slice()},nl.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},nl.prototype.isBlank=function(){return this._isBlank},nl.prototype.setBlank=function(t){this._isBlank=t},nl.prototype.getLabel=null,Wn(nl),Un(nl,{registerWhenExtend:!0}),il.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&f(n,ol);return new il({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var fw=il.prototype;fw.getOrdinal=function(t){return rl(this).get(t)},fw.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=rl(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var pw=nl.prototype,gw=nl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new il({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),pw.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return pw.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(pw.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:R,niceExtent:R});gw.create=function(){return new gw};var mw=kr,vw=kr,yw=nl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),yw.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=sl(t)},getTicks:function(){return hl(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Or(t)||0:"auto"===n&&(n=this._intervalPrecision),t=vw(t,n,!0),Hr(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var o=al(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=vw(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=vw(Math.ceil(e[1]/r)*r))}});yw.create=function(){return new yw};var xw="__ec_stack_",_w="undefined"!=typeof Float32Array?Float32Array:Array,ww={seriesType:"bar",plan:Ux(),reset:function(t){if(vl(t)&&yl(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.mapDimension(r.dim),a=e.mapDimension(i.dim),s=r.isHorizontal(),l=s?0:1,u=ml(pl([t]),i,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var i,h=new _w(2*t.count),c=[],d=[],f=0;null!=(i=t.next());)d[l]=e.get(o,i),d[1-l]=e.get(a,i),c=n.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:xl(0,r),valueAxisHorizontal:s})}}}}},bw=yw.prototype,Sw=Math.ceil,Mw=Math.floor,Iw=function(t,e,n,i){for(;n>>1;t[r][1]n&&(o=n);var a=Cw.length,s=Iw(Cw,o,0,a),l=Cw[Math.min(s,a-1)],u=l[1];"year"===l[0]&&(u*=Wr(r/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Sw((i[0]-h)/u)*u+h),Math.round(Mw((i[1]-h)/u)*u+h)];ul(c,i),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Br(t)}});d(["contain","normalize"],function(t){Tw.prototype[t]=function(e){return bw[t].call(this,this.parse(e))}});var Cw=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];Tw.create=function(t){return new Tw({useUTC:t.ecModel.get("useUTC")})};var Aw=nl.prototype,Dw=yw.prototype,kw=Or,Pw=kr,Lw=Math.floor,Ow=Math.ceil,zw=Math.pow,Ew=Math.log,Nw=nl.extend({type:"log",base:10,$constructor:function(){nl.apply(this,arguments),this._originalScale=new yw},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return f(Dw.getTicks.call(this),function(i){var r=kr(zw(this.base,i));return r=i===e[0]&&t.__fixMin?_l(r,n[0]):r,r=i===e[1]&&t.__fixMax?_l(r,n[1]):r},this)},getLabel:Dw.getLabel,scale:function(t){return t=Aw.scale.call(this,t),zw(this.base,t)},setExtent:function(t,e){var n=this.base;t=Ew(t)/Ew(n),e=Ew(e)/Ew(n),Dw.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Aw.getExtent.call(this);e[0]=zw(t,e[0]),e[1]=zw(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=_l(e[0],i[0])),n.__fixMax&&(e[1]=_l(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Ew(t[0])/Ew(e),t[1]=Ew(t[1])/Ew(e),Aw.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=Fr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[kr(Ow(e[0]/i)*i),kr(Lw(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){Dw.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){Nw.prototype[t]=function(e){return e=Ew(e)/Ew(this.base),Aw[t].call(this,e)}}),Nw.create=function(){return new Nw};var Rw={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:R,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Bw=Ei({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),Fw=Ei({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),Vw=Ei({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),f=.6*a,p=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),Ww=Ei({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),Hw={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},Gw={};d({line:gy,rect:py,roundRect:py,square:py,circle:oy,diamond:Fw,pin:Vw,arrow:Ww,triangle:Bw},function(t,e){Gw[e]=new t});var Zw=Ei({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,r=Gw[i];"none"!==e.symbolType&&(r||(r=Gw[i="rect"]),Hw[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),Uw={isDimensionStacked:Ks,enableDataStack:$s,getStackedDimension:Qs},Xw=(Object.freeze||Object)({createList:function(t){return Js(t.getSource(),t)},getLayoutRect:Kr,dataStack:Uw,createScale:function(t,e){var n=e;Sr.isInstance(e)||h(n=new Sr(e),Rw);var i=Ml(n);return i.setExtent(t[0],t[1]),Sl(i,n),i},mixinAxisModelCommonMethods:function(t){h(t,Rw)},completeDimensions:Ys,createDimensions:dw,createSymbol:Pl}),Yw=1e-8;zl.prototype={constructor:zl,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;s0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&d(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new zl(e.name,r,e.cp);return o.properties=e,o})},qw=On(),$w=[0,1],Kw=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};Kw.prototype={constructor:Kw,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return zr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Ql(n=n.slice(),i.count()),Ar(t,$w,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Ql(n=n.slice(),i.count());var r=Ar(t,n,$w,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=Bl(this,e),i=f(n.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=e.get("alignWithLabel");return Jl(this,i,n.tickCategoryInterval,r,t.clamp),i},getViewLabels:function(){return Rl(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Yl(this)}};var Qw=jw,Jw={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Jw[t]=ag[t]});var tb={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){tb[t]=ky[t]}),Hx.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return Js(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var eb=eu.prototype,nb=eu.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};eb._createSymbol=function(t,e,n,i,r){this.removeAll();var o=Pl(t,-1,-1,2,2,e.getItemVisual(n,"color"),r);o.attr({z2:100,culling:!0,scale:nu(i)}),o.drift=iu,this._symbolType=t,this.add(o)},eb.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},eb.getSymbolPath=function(){return this.childAt(0)},eb.getScale=function(){return this.childAt(0).scale},eb.highlight=function(){this.childAt(0).trigger("emphasis")},eb.downplay=function(){this.childAt(0).trigger("normal")},eb.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},eb.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},eb.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,o=nb(t,e),a=i!==this._symbolType;if(a){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,o,s)}else(l=this.childAt(0)).silent=!1,gr(l,{scale:nu(o)},r,e);if(this._updateCommon(t,e,o,n),a){var l=this.childAt(0),u=n&&n.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),mr(l,h,r,e)}this._seriesModel=r};var ib=["itemStyle"],rb=["emphasis","itemStyle"],ob=["label"],ab=["emphasis","label"];eb._updateCommon=function(t,e,n,i){var r=this.childAt(0),a=t.hostModel,s=t.getItemVisual(e,"color");"image"!==r.type&&r.useStyle({strokeNoScale:!0});var l=i&&i.itemStyle,u=i&&i.hoverItemStyle,h=i&&i.symbolRotate,c=i&&i.symbolOffset,d=i&&i.labelModel,f=i&&i.hoverLabelModel,p=i&&i.hoverAnimation,g=i&&i.cursorStyle;if(!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e);l=m.getModel(ib).getItemStyle(["color"]),u=m.getModel(rb).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(ob),f=m.getModel(ab),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=o({},u);var v=r.style;r.attr("rotation",(h||0)*Math.PI/180||0),c&&r.attr("position",[Dr(c[0],n[0]),Dr(c[1],n[1])]),g&&r.attr("cursor",g),r.setColor(s,i&&i.symbolInnerColor),r.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=r.__z2Origin;null!=x?null==_&&(r.__z2Origin=r.z2,r.z2+=x):null!=_&&(r.z2=_,r.__z2Origin=null);var w=i&&i.useNameLabel;or(v,u,d,f,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,n){return w?t.getName(e):tu(t,e)},isRectText:!0,autoColor:s}),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),r.hoverStyle=u,ir(r),r.__symbolOriginalScale=nu(n),p&&a.isAnimationEnabled()&&r.on("mouseover",ru).on("mouseout",ou).on("emphasis",au).on("normal",su)},eb.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),gr(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(eu,Jg);var sb=lu.prototype;sb.updateData=function(t,e){e=hu(e);var n=this.group,i=t.hostModel,r=this._data,o=this._symbolCtor,a=cu(t);r||n.removeAll(),t.diff(r).add(function(i){var r=t.getItemLayout(i);if(uu(t,r,i,e)){var s=new o(t,i,a);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}}).update(function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);uu(t,h,s,e)?(u?(u.updateData(t,s,a),gr(u,{position:h},i)):(u=new o(t,s)).attr("position",h),n.add(u),t.setItemGraphicEl(s,u)):n.remove(u)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},sb.isPersistent=function(){return!0},sb.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var i=t.getItemLayout(n);e.attr("position",i)})},sb.incrementalPrepareUpdate=function(t){this._seriesScope=cu(t),this._data=null,this.group.removeAll()},sb.incrementalUpdate=function(t,e,n){n=hu(n);for(var i=t.start;i0&&mu(n[r-1]);r--);for(;i0&&mu(n[o-1]);o--);for(;r=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;(a=new eu(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else fa.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=Ln(r,i);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else fa.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new mb({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new vb({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=lb(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=Au(u.current,n,r),c=Au(u.stackedOnCurrent,n,r),d=Au(u.next,n,r),f=Au(u.stackedOnNext,n,r)),a.shape.__points=u.current,a.shape.points=h,gr(a,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),gr(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(Sb,Kw);var Mb={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Ib={};Ib.categoryAxis=i({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Mb),Ib.valueAxis=i({boundaryGap:[0,0],splitNumber:5},Mb),Ib.timeAxis=a({scale:!0,min:"dataMin",max:"dataMax"},Ib.valueAxis),Ib.logAxis=a({scale:!0,logBase:10},Ib.valueAxis);var Tb=["value","category","time","log"],Cb=function(t,e,n,o){d(Tb,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,r){var o=this.layoutMode,s=o?to(e):{};i(e,r.getTheme().get(a+"Axis")),i(e,this.getDefaultOption()),e.type=n(t,e),o&&Jr(e,s,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=il.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r([{},Ib[a+"Axis"],o],!0)})}),ex.registerSubTypeDefaulter(t+"Axis",v(n,t))},Ab=ex.extend({type:"cartesian2dAxis",axis:null,init:function(){Ab.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Ab.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Ab.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});i(Ab.prototype,Rw);var Db={offset:0};Cb("x",Ab,zu,Db),Cb("y",Ab,zu,Db),ex.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var kb=Nu.prototype;kb.type="grid",kb.axisPointerEnabled=!0,kb.getRect=function(){return this._rect},kb.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),d(n.x,function(t){Sl(t.scale,t.model)}),d(n.y,function(t){Sl(t.scale,t.model)});var i={};d(n.x,function(t){Ru(n,"y",t,i)}),d(n.y,function(t){Ru(n,"x",t,i)}),this.resize(this.model,e)},kb.resize=function(t,e,n){function i(){d(o,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),Fu(t,e?r.x:r.y)})}var r=Kr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;i(),!n&&t.get("containLabel")&&(d(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Al(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},kb.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},kb.getAxes=function(){return this._axesList.slice()},kb.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;iu[1]?-1:1,c=["start"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,ju(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*Lb/180);var f;ju(r)?i=Eb(t.rotation,null!=d?d:t.rotation,a):(i=Gu(t,r,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?Xy(n,v,p,m,{minChar:2,placeholder:g.placeholder}):n,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:n,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new ry({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:Zu(e),z2:1,tooltip:x&&x.show?o({content:n,formatter:function(){return n},formatterParams:w},x):null});ar(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Hu(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Eb=Ob.innerTextLayout=function(t,e,n){var i,r,o=Nr(e-t);return Rr(o)?(r=n>0?"top":"bottom",i="center"):Rr(o-Lb)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},Nb=d,Rb=v,Bb=Ts({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&ih(t),Bb.superApply(this,"render",arguments),lh(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,r){lh(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),Bb.superApply(this,"remove",arguments)},dispose:function(t,e){uh(this,e),Bb.superApply(this,"dispose",arguments)}}),Fb=[];Bb.registerAxisPointerClass=function(t,e){Fb[t]=e},Bb.getAxisPointerClass=function(t){return t&&Fb[t]};var Vb=["axisLine","axisTickLabel","axisName"],Wb=["splitArea","splitLine"],Hb=Bb.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Jg,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=hh(o,t),s=new Ob(t,a);d(Vb,s.add,s),this._axisGroup.add(s.getGroup()),d(Wb,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),_r(r,this._axisGroup,t),Hb.superCall(this,"render",t,e,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),o=r.get("color");o=y(o)?o:[o];for(var s=e.coordinateSystem.getRect(),l=n.isHorizontal(),u=0,h=n.getTicksCoords({tickModel:i}),c=[],d=[],f=r.getLineStyle(),p=0;p1){var c;"string"==typeof r?c=_b[r]:"function"==typeof r&&(c=r),c&&t.setData(i.downSample(i.mapDimension(s.dim),1/h,c,wb))}}}}}("line")),Hx.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Js(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var Gb=Km([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Zb={getBarItemStyle:function(t){var e=Gb(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},Ub=["itemStyle","barBorderWidth"];o(Sr.prototype,Zb),As({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,n){var i,r=this.group,o=t.getData(),a=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;o.diff(a).add(function(e){if(o.hasValue(e)){var n=o.getItemModel(e),a=Yb[s.type](o,e,n),l=Xb[s.type](o,e,n,a,i,u);o.setItemGraphicEl(e,l),r.add(l),gh(l,o,e,n,a,t,i,"polar"===s.type)}}).update(function(e,n){var l=a.getItemGraphicEl(n);if(o.hasValue(e)){var h=o.getItemModel(e),c=Yb[s.type](o,e,h);l?gr(l,{shape:c},u,e):l=Xb[s.type](o,e,h,c,i,u,!0),o.setItemGraphicEl(e,l),r.add(l),gh(l,o,e,h,c,t,i,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===s.type?e&&fh(t,u,e):e&&ph(t,u,e)}).execute(),this._data=o},_renderLarge:function(t,e,n){this._clear(),vh(t,this.group)},_incrementalRenderLarge:function(t,e){vh(e,this.group,!0)},dispose:R,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?ph(e.dataIndex,t,e):fh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var Xb={cartesian2d:function(t,e,n,i,r,a,s){var l=new py({shape:o({},i)});if(a){var u=l.shape,h=r?"height":"width",c={};u[h]=0,c[h]=i[h],ky[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,n,i,r,o,s){var l=i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},jb=Ii.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__valueIdx,o=0;o=0?"p":"n",b=m;p&&(r[a][_]||(r[a][_]={p:m,n:m}),b=r[a][_][w]);var S,M,I,T;if(g)S=b,M=(C=n.dataToPoint([x,_]))[1]+l,I=C[0]-m,T=u,Math.abs(I)0&&"scale"!==u){var d=r.getItemLayout(0),f=Math.max(n.getWidth(),n.getHeight())/2,p=m(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else a.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,o,a){var s=new ly({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return mr(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}}});var Jb=function(t,e,n,i){var r,o,a=t.getData(),s=[],l=!1;a.each(function(n){var i,u,h,c,d=a.getItemLayout(n),f=a.getItemModel(n),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);r=d.cx,o=d.cy;var b="inside"===g||"inner"===g;if("center"===g)i=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+o;if(i=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),C=I+(_<0?-1:1)*y,A=T;i=C+(_<0?-5:5),u=A,h=[[S,M],[I,T],[C,A]]}c=b?"center":_>0?"left":"right"}var D=p.getFont(),k=p.get("rotate")?_<0?-x+Math.PI:-x:0,P=Se(t.getFormattedLabel(n,"normal")||a.getName(n),D,c,"top");l=!!k,d.label={x:i,y:u,position:g,height:P.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:k,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Sh(s,r,o,e,n,i)},tS=2*Math.PI,eS=Math.PI/180;!function(t,e){d(e,function(e){e.update="updateView",_s(e,function(n,i){var r={};return i.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var i=t.getData();i.each(function(e){var n=i.getName(e);r[n]=t.isSelected(n)||!1})}),{name:n.name,selected:r}})})}("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),bs(function(t){return{getTargetSeries:function(e){var n={},i=N();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t,e){var n=t.getRawData(),i={},r=t.getData();r.each(function(t){var e=r.getRawIndex(t);i[e]=t}),n.each(function(e){var o=i[e],a=null!=o&&r.getItemVisual(o,"color",!0);if(a)n.setItemVisual(e,"color",a);else{var s=n.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(n.getName(e)||e+"",t.__paletteScope,n.count());n.setItemVisual(e,"color",s),null!=o&&r.setItemVisual(o,"color",s)}})}}}("pie")),ws(v(function(t,e,n,i){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),o=t.get("radius");y(o)||(o=[0,o]),y(r)||(r=[r,r]);var a=n.getWidth(),s=n.getHeight(),l=Math.min(a,s),u=Dr(r[0],a),h=Dr(r[1],s),c=Dr(o[0],l/2),d=Dr(o[1],l/2),f=-t.get("startAngle")*eS,p=t.get("minAngle")*eS,g=0;e.each(i,function(t){!isNaN(t)&&g++});var m=e.getSum(i),v=Math.PI/(m||g)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(i);b[0]=0;var S=tS,M=0,I=f,T=x?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:u,cy:h,r0:c,r:_?NaN:d});else{(i="area"!==_?0===m&&w?v:t*v:tS/g)=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1}}),iS=Mh.prototype;iS.isPersistent=function(){return!this._incremental},iS.updateData=function(t){this.group.removeAll();var e=new nS({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},iS.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)})}},iS.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new zi({silent:!0})),this.group.add(this._incremental)):this._incremental=null},iS.incrementalUpdate=function(t,e){var n;this._incremental?(n=new nS,this._incremental.addDisplayable(n,!0)):((n=new nS({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},iS._setCommon=function(t,e,n){var i=e.hostModel,r=e.getVisual("symbolSize");t.setShape("size",r instanceof Array?r:[r,r]),t.symbolProxy=Pl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("color");a&&t.setColor(a),n||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(t.dataIndex=n+(t.startIndex||0))}))},iS.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},iS._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},As({type:"scatter",render:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i),this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=xb().reset(t);r.progress&&r.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Mh:new lu,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),bs(yb("scatter","circle")),ws(xb("scatter")),ys(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var rS=Is({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,rS.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o);var a=An(r,o);Dn(a);var s=this._elOptionsToUpdate=[];d(a,function(t,e){var n=t.option;n&&(s.push(n),Dh(t,n),kh(r,e,n),Ph(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,n){d(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ts({type:"graphic",init:function(t,e){this._elMap=N(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;d(e,function(e){var r=e.$action,o=e.id,a=n.get(o),s=e.parentId,l=null!=s?n.get(s):i,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Ch(e);r&&"merge"!==r?"replace"===r?(Th(a,n),Ih(o,l,h,n)):"remove"===r&&Th(a,n):a?a.attr(h):Ih(o,l,h,n);var c=n.get(o);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,Lh(c,t))})}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=n.length-1;o>=0;o--){var a=n[o],s=r.get(a.id);if(s){var l=s.parent;Qr(s,a,l===i?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Th(e,t)}),this._elMap=N()},dispose:function(){this._clear()}});var oS=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Ln(o,t);if(null==a||a<0||y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(o.getValues(f(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},aS=d,sS=v,lS=On(),uS=(Is({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),On()),hS=d,cS=Ts({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Gh("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){qh(e.getZr(),"axisPointer"),cS.superApply(this._model,"remove",arguments)},dispose:function(t,e){qh("axisPointer",e),cS.superApply(this._model,"dispose",arguments)}}),dS=On(),fS=n,pS=m;($h.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=v(Kh,e,h);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new Jg,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);ec(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=rh(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,n,i){var r=e.pointer;if(r){var o=dS(t).pointerEl=new ky[r.type](fS(e.pointer));t.add(o)}},createLabelEl:function(t,e,n,i){if(e.label){var r=dS(t).labelEl=new py(fS(e.label));t.add(r),Jh(r,i)}},updatePointerEl:function(t,e,n){var i=dS(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=dS(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Jh(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=br(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){vg(t.event)},onmousedown:pS(this._onHandleDragMove,this,0,0),drift:pS(this._onHandleDragMove,this),ondragend:pS(this._onHandleDragEnd,this)}),n.add(i)),ec(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");y(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),xa(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){Kh(this._axisPointerModel,!e&&this._moveAnimation,this._handle,tc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(tc(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(tc(i)),dS(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=$h,Wn($h);var gS=$h.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=hc(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=nc(i),c=mS[s](o,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}sc(e,t,hh(a.model,n),n,i,r)},getHandleTransform:function(t,e,n){var i=hh(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:ac(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=hc(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),mS={line:function(t,e,n,i){var r=lc([e,n[0]],[e,n[1]],cc(t));return Vi({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:uc([e-r/2,n[0]],[r,o],cc(t))}}};Bb.registerAxisPointerClass("CartesianAxisPointer",gS),ys(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),xs(O_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Ku(t,e)}),_s({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||m(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Hh(r)&&(r=oS({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=Hh(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||Hh(r),d={},f={},p={list:[],map:{}},g={showPointer:sS(Eh,f),showTooltip:sS(Nh,p)};aS(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);aS(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=Vh(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&Oh(t,a,g,!1,d)}})});var v={};return aS(h,function(t,e){var n=t.linkGroup;n&&!f[e]&&aS(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,Wh(e),Wh(t)))),v[t.key]=o}})}),aS(v,function(t,e){Oh(h[e],t,g,!0,d)}),Rh(f,h,d),Bh(p,r,t,a),Fh(h,0,n),d}}),Is({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var vS=d,yS=Gr,xS=["","-webkit-","-moz-","-o-"];gc.prototype={constructor:gc,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+pc(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},mc.prototype={constructor:mc,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,o=r.indexOf("{marker");o>=0;){var a=r.indexOf("|}"),s=r.substr(o+"{marker".length,a-o-"{marker".length);s.indexOf("sub")>-1?i["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:i["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},o=(r=r.substr(a+1)).indexOf("{marker")}this.el=new ry({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var _S=m,wS=d,bS=Dr,SS=new py({shape:{x:-1,y:-1,width:2,height:2}});Ts({type:"tooltip",init:function(t,e){if(!Xp.node){var n=t.getComponent("tooltip").get("renderMode");this._renderMode=Bn(n);var i;"html"===this._renderMode?(i=new gc(e.getDom(),e),this._newLine="
"):(i=new mc(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,n){if(!Xp.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");Gh("itemTooltip",this._api,_S(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!Xp.node){var r=yc(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=SS;a.position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=oS(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(yc(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===(t=vc([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,r=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],s=[],l=vc([e.tooltipOption,r]),u=this._renderMode,h=this._newLine,c={};wS(t,function(t){wS(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value,o=[];if(e&&null!=r){var l=oc(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(a){var h=n.getSeriesByIndex(a.seriesIndex),d=a.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Cl(e.axis,r),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;i(c,m)}else p=g;o.push(p)}});var f=l;"html"!==u?a.push(o.join(h)):a.push((f?Zr(f)+h:"")+o.join(h))}})},this),a.reverse(),a=a.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,a,s,Math.random(),o[0],o[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,o=i.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=a.getData(),h=vc([u.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=a.getDataParams(s,l),g=a.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+a.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var o=new Sr(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e;if(h&&"string"==typeof h)c=Ur(h,n,!0);else if("function"==typeof h){var d=_S(function(e,i){e===this._ticket&&(u.setContent(i,l,t),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,a,r,o,u,n,s)}},_updatePosition:function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))n=bS(e[0],s),i=bS(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=Kr(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else"string"==typeof e&&a?(n=(p=wc(e,d,u))[0],i=p[1]):(n=(p=xc(n,i,r,s,l,h?null:20,c?null:20))[0],i=p[1]);if(h&&(n-=bc(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=bc(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=_c(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&wS(e,function(e,i){var r=e.dataByAxis||{},o=(t[i]||{}).dataByAxis||[];(n&=r.length===o.length)&&wS(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&wS(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Xp.node||(this._tooltipContent.hide(),qh("itemTooltip",e))}}),_s({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),_s({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var MS=Is({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){MS.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});_s("legendToggleSelect","legendselectchanged",v(Sc,"toggleSelected")),_s("legendSelect","legendselected",v(Sc,"select")),_s("legendUnSelect","legendunselected",v(Sc,"unSelect"));var IS=v,TS=d,CS=Jg,AS=Ts({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new CS),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){if(this.resetInner(),t.get("show",!0)){var i=t.get("align");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n);var r=t.getBoxLayoutParams(),o={width:n.getWidth(),height:n.getHeight()},s=t.get("padding"),l=Kr(r,o,s),u=this.layoutInner(t,i,l),h=Kr(a({width:u.width,height:u.height},r),o,s);this.group.attr("position",[h.x-u.x,h.y-u.y]),this.group.add(this._backgroundEl=Ic(u,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,i){var r=this.getContentGroup(),o=N(),a=e.get("selectedMode"),s=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),TS(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=n.getSeriesByName(h)[0];if(!o.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,a).on("click",IS(Tc,h,i)).on("mouseover",IS(Cc,c.name,null,i,s)).on("mouseout",IS(Ac,c.name,null,i,s)),o.set(h,!0)}else n.eachRawSeries(function(n){if(!o.get(h)&&n.legendDataProvider){var r=n.legendDataProvider(),c=r.indexOfName(h);if(c<0)return;var d=r.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,a).on("click",IS(Tc,h,i)).on("mouseover",IS(Cc,null,h,i,s)).on("mouseout",IS(Ac,null,h,i,s)),o.set(h,!0)}},this)}else r.add(new CS({newline:!0}))},this)},_createItem:function(t,e,n,i,r,a,s,l,u){var h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("symbolKeepAspect"),p=i.isSelected(t),g=new CS,m=n.getModel("textStyle"),v=n.get("icon"),y=n.getModel("tooltip"),x=y.parentModel;if(r=v||r,g.add(Pl(r,0,0,h,c,p?l:d,null==f||f)),!v&&a&&(a!==r||"none"===a)){var _=.8*c;"none"===a&&(a="circle"),g.add(Pl(a,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=i.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new ry({style:ar({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new py({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?o({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),ir(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup();Qy(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}});xs(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[s],f=[-h.x,-h.y];f[a]=i.position[a];var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[a]+=n[s]-c[s]:p[a]+=c[s]+m),g[1-a]+=h[l]/2-c[l]/2,i.attr("position",f),r.attr("position",p),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?n[s]:h[s],v[l]=Math.max(h[l],c[l]),v[u]=Math.min(0,c[u]+g[1-a]),r.__rectSize=n[s],d){var y={x:0,y:0};y[s]=Math.max(n[s]-c[s]-m,0),y[l]=v[l],r.setClipPath(new py({shape:y})),r.__rectSize=y[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&gr(i,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;d(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",_(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[h],e}var n,i,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),u=this._containerGroup.__rectSize,h=t.getOrient().index,c=PS[h],d=PS[1-h],f=LS[h],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var g=u?Math.ceil(l[c]/u):0;if(o){var m=o.getBoundingRect(),v=o.position[h]+m[f];p[h]=-v-l[f],n=Math.floor(g*(v+m[f]+u/2)/l[c]),n=l[c]&&g?Math.max(0,Math.min(g-1,n)):-1;var y={x:0,y:0};y[c]=u,y[d]=l[d],y[f]=-p[h]-l[f];var x,_=s.children();if(s.eachChild(function(t,n){var i=e(t);i.intersect(y)&&(null==x&&(x=n),r=t.__legendDataIndex),n===_.length-1&&i[f]+i[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])i=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;i=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:n,pageCount:g,pagePrevDataIndex:i,pageNextDataIndex:r}}});_s("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),Is({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Ts({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new ry({style:ar({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ry({style:ar({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Kr(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:a,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=i.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new py({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0});Wi(w),i.add(w)}}});var zS=Hr,ES=Zr,NS=Is({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(Xp.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,n,i){var r=this.constructor,a=this.mainType+"Model";n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),s=t[a];n&&n.data?(s?s.mergeOption(n,e,!0):(i&&kc(n),d(n.data,function(t){t instanceof Array?(kc(t[0]),kc(t[1])):kc(t)}),o(s=new r(n,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[a]=s):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=y(n)?f(n,zS).join(", "):zS(n),r=e.getName(t),o=ES(this.name);return(null!=n||r)&&(o+="
"),r&&(o+=ES(r),null!=n&&(o+=" : ")),null!=n&&(o+=ES(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});h(NS,Bx),NS.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var RS=l,BS=v,FS={min:BS(Oc,"min"),max:BS(Oc,"max"),average:BS(Oc,"average")},VS=Ts({type:"marker",init:function(){this.markerGroupMap=N()},render:function(t,e,n){var i=this.markerGroupMap;i.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});VS.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Vc(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new lu),u=Wc(r,t,e);e.setData(u),Vc(e.getData(),t,i),u.each(function(t){var n=u.getItemModel(t),i=n.getShallow("symbolSize");"function"==typeof i&&(i=i(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:i,color:n.get("itemStyle.color")||a.getVisual("color"),symbol:n.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markPoint=t.markPoint||{}}),NS.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var WS=gy.prototype,HS=vy.prototype,GS=Ei({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Hc(e)?WS:HS).buildPath(t,e)},pointAt:function(t){return Hc(this.shape)?WS.pointAt.call(this,t):HS.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Hc(e)?[e.x2-e.x1,e.y2-e.y1]:HS.tangentAt.call(this,t);return Y(n,n)}}),ZS=["fromSymbol","toSymbol"],US=Yc.prototype;US.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.childOfName("label");if(e||n||!i.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),h=G([],u,l);if(Y(h,h),e&&(e.attr("position",l),c=a.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])),n){n.attr("position",u);var c=a.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),n.attr("scale",[r*s,r*s])}if(!i.ignore){i.attr("position",u);var d,f,p,g=5*r;if("end"===i.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var m=s/2,v=[(c=a.tangentAt(m))[1],-c[0]],y=a.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[r,r]})}}}},US._createLine=function(t,e,n){var i=t.hostModel,r=Uc(t.getItemLayout(e));r.shape.percent=0,mr(r,{shape:{percent:1}},i,e),this.add(r);var o=new ry({name:"label"});this.add(o),d(ZS,function(n){var i=Zc(n,t,e);this.add(i),this[Gc(n)]=t.getItemVisual(e,n)},this),this._updateCommonStl(t,e,n)},US.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};Xc(a.shape,o),gr(r,a,i,e),d(ZS,function(n){var i=t.getItemVisual(e,n),r=Gc(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=Zc(n,t,e);this.add(o)}this[r]=i},this),this._updateCommonStl(t,e,n)},US._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle,l=n&&n.labelModel,u=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=A(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(a({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},o)),r.hoverStyle=s,d(ZS,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=i.getFormattedLabel(e,"normal",t.dataType)))){var x=i.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?kr(x):x}var _=m?g:null,w=v?C(i.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(ar(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,ir(this)},US.highlight=function(){this.trigger("emphasis")},US.downplay=function(){this.trigger("normal")},US.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},US.setLinePoints=function(t){var e=this.childOfName("line");Xc(e.shape,t),e.dirty()},u(Yc,Jg);var XS=jc.prototype;XS.isPersistent=function(){return!0},XS.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var r=Kc(t);t.diff(i).add(function(n){qc(e,t,n,r)}).update(function(n,o){$c(e,i,t,o,n,r)}).remove(function(t){n.remove(i.getItemGraphicEl(t))}).execute()},XS.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},XS.incrementalPrepareUpdate=function(t){this._seriesScope=Kc(t),this._lineData=null,this.group.removeAll()},XS.incrementalUpdate=function(t,e){for(var n=t.start;n=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,a=[p,g,{type:l,valueIndex:a.valueIndex,value:h}]}return a=[zc(t,a[0]),zc(t,a[1]),o({},a[2])],a[2].type=a[2].type||"",i(a[2],a[0]),i(a[2],a[1]),a};VS.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markLineModel;if(e){var i=e.getData(),r=e.__from,o=e.__to;r.each(function(e){id(r,e,!0,t,n),id(o,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,n,i){function r(e,n,r){var o=e.getItemModel(n);id(e,n,r,t,i),e.setItemVisual(n,{symbolSize:o.get("symbolSize")||g[r?0:1],symbol:o.get("symbol",!0)||p[r?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new jc);this.group.add(u.group);var h=rd(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){r(c,t,!0),r(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,n){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markLine=t.markLine||{}}),NS.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var jS=function(t,e,n,i){var o=zc(t,i[0]),a=zc(t,i[1]),s=T,l=o.coord,u=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=r([{},o,a]);return h.coord=[o.coord,a.coord],h.x0=o.x,h.y0=o.y,h.x1=a.x,h.y1=a.y,h},qS=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];VS.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var i=e.getData();i.each(function(e){var r=f(qS,function(r){return ld(i,e,r,t,n)});i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)})}},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,o=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new Jg});this.group.add(u.group),u.__keep=!0;var h=ud(r,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(qS,function(n){return ld(h,e,n,t,i)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new dy({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,n){var i=u.__data.getItemGraphicEl(n);gr(i,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(i),h.setItemGraphicEl(t,i)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,n){var i=h.getItemModel(n),r=i.getModel("label"),o=i.getModel("emphasis.label"),s=h.getItemVisual(n,"color");t.useStyle(a(i.getModel("itemStyle").getItemStyle(),{fill:Vt(s,.4),stroke:s})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),or(t.style,t.hoverStyle,r,o,{labelFetcher:e,labelDataIndex:n,defaultText:h.getName(n)||"",isRectText:!0,autoColor:s}),ir(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markArea=t.markArea||{}}),ex.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var $S=["cartesian2d","polar","singleAxis"],KS=function(t,e){var n=f(t=t.slice(),qr),i=f(e=(e||[]).slice(),qr);return function(r,o){d(t,function(t,a){for(var s={name:t,capital:n[a]},l=0;l=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&QS(r,function(t){var e=t.getData(),r=e.mapDimension(i,!0);r.length&&("weakFilter"===o?e.filterSelf(function(t){for(var n,i,o,s=0;sa[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(n=!0),c&&(i=!0)}return o&&n&&i}):QS(r,function(i){if("empty"===o)t.setData(e.map(i,function(t){return n(t)?t:NaN}));else{var r={};r[i]=a,e.selectRange(r)}}),QS(r,function(t){e.setApproximateExtent(a,t)}))})}}};var eM=d,nM=KS,iM=Is({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=md(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=md(t);i(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;Xp.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),vd(this,t),eM([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,n,i,r){var o=this.dependentModels[e.axis][n],a=o.__dzAxisProxy||(o.__dzAxisProxy=new tM(e.name,n,this,r));t[e.name+"_"+n]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();nM(function(e){var n=e.axisIndex;t[n]=Mn(t[n])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;nM(function(n){null!=t[n.axisIndex]&&(e=!0)},this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),n=this.option,i=this.dependentModels;if(t){var r="vertical"===e?"y":"x";i[r+"Axis"].length?(n[r+"AxisIndex"]=[0],t=!1):eM(i.singleAxis,function(i){t&&i.get("orient",!0)===e&&(n.singleAxisIndex=[i.componentIndex],t=!1)})}t&&nM(function(e){if(t){var i=[],r=this.dependentModels[e.axis];if(r.length&&!i.length)for(var o=0,a=r.length;o0?100:20}},getFirstTargetAxisModel:function(){var t;return nM(function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}},this),t},eachTargetAxis:function(t,e){var n=this.ecModel;nM(function(i){eM(this.get(i.axisIndex),function(r){t.call(e,i,r,this,n)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t,e){var n=this.option;eM([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(n[e[0]]=t[e[0]],n[e[1]]=t[e[1]])},this),!e&&vd(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),rM=Gx.extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){function t(t,e,n,i){for(var r,o=0;oo&&(e[1-i]=e[i]+h.sign*o),e}),aM=py,sM=Ar,lM=Pr,uM=m,hM=d,cM="horizontal",dM=5,fM=["line","bar","candlestick","scatter"],pM=rM.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){pM.superApply(this,"render",arguments),xa(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){pM.superApply(this,"remove",arguments),_a(this,"_dispatchZoomAction")},dispose:function(){pM.superApply(this,"dispose",arguments),_a(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Jg;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},r=this._orient===cM?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},o=to(t.option);d(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=Kr(o,i,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==cM||r?n===cM&&r?{scale:a?[-1,1]:[-1,-1]}:"vertical"!==n||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new aM({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new aM({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),s=.3*(o[1]-o[0]);o=[o[0]-s,o[1]+s];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(i.count()-1),p=0,g=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(g>0&&e%g)p+=f;else{var n=null==t||isNaN(t)||""===t,i=n?0:sM(t,o,u,!0);n&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!n&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,i]),d.push([p,i]),p+=f,l=n}});var m=this.dataZoomModel;this._displayables.barGroup.add(new dy({shape:{points:c},style:a({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new fy({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis(function(r,o){d(t.getAxisProxy(r.name,o).getTargetSeriesModels(),function(t){if(!(n||!0!==e&&l(fM,t.get("type"))<0)){var a,s=i.getComponent(r.axis,o).axis,u=_d(r.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(a=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),n={thisAxis:s,series:t,thisDim:r.name,otherDim:u,otherAxisInverse:a}}},this)},this),n}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],n=t.handleLabels=[],i=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;i.add(t.filler=new aM({draggable:!0,cursor:wd(this._orient),drift:uM(this._onDragMove,this,"all"),onmousemove:function(t){vg(t.event)},ondragstart:uM(this._showDataInfo,this,!0),ondragend:uM(this._onDragEnd,this),onmouseover:uM(this._showDataInfo,this,!0),onmouseout:uM(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),i.add(new aM(Wi({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),hM([0,1],function(t){var r=br(o.get("handleIcon"),{cursor:wd(this._orient),draggable:!0,drift:uM(this._onDragMove,this,t),onmousemove:function(t){vg(t.event)},ondragend:uM(this._onDragEnd,this),onmouseover:uM(this._showDataInfo,this,!0),onmouseout:uM(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=Dr(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),i.add(e[t]=r);var l=o.textStyleModel;this.group.add(n[t]=new ry({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[sM(t[0],[0,100],e,!0),sM(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];oM(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?sM(o.minSpan,a,r,!0):null,null!=o.maxSpan?sM(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=lM([sM(i[0],r,a,!0),sM(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,n=this._handleEnds,i=lM(n.slice()),r=this._size;hM([0,1],function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scale:[o/2,o/2],position:[n[t],r[1]/2-o/2]})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=vr(i.handles[t].parent,this.group),n=xr(0===t?"right":"left",e),s=this._handleWidth/2+dM,l=yr([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===cM?"middle":n,textAlign:o===cM?n:"center",text:a[t]})}var n=this.dataZoomModel,i=this._displayables,r=i.handleLabels,o=this._orient,a=["",""];if(n.get("showDetail")){var s=n.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=lM(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),r=n.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return x(i)?i(t,o):_(i)?i.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;var i=yr([e,n],this._displayables.barGroup.getLocalTransform(),!0),r=this._updateInterval(t,i[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),r&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(hM(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}}),!t){var e=this.api.getWidth(),n=this.api.getHeight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});iM.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var gM="\0_ec_interaction_mutex";_s({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(Td,pg);var mM="\0_ec_dataZoom_roams",vM=m,yM=rM.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,n,i){yM.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,i){var r=f(e,function(t){return Rd(t.model)});d(e,function(e){var o=e.model,a={};d(["pan","zoom","scrollMove"],function(t){a[t]=vM(xM[t],this,e,i)},this),Ed(n,{coordId:Rd(o),allCoordIds:r,containsPoint:function(t,e,n){return o.coordinateSystem.containPoint([e,n])},dataZoomId:t.id,dataZoomModel:t,getRange:a})},this)},this)},dispose:function(){Nd(this.api,this.dataZoomModel.id),yM.superApply(this,"dispose",arguments),this._range=null}}),xM={zoom:function(t,e,n,i){var r=this._range,o=r.slice(),a=t.axisModels[0];if(a){var s=_M[e](null,[i.originX,i.originY],a,n,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return oM(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Gd(function(t,e,n,i,r,o){var a=_M[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:Gd(function(t,e,n,i,r,o){return _M[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta})},_M={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};xs({getTargetSeries:function(t){var e=N();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){d(i.getAxisProxy(t.name,n).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).reset(i,e)}),t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).filterData(i,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]},!0)})}}),_s("dataZoom",function(t,e){var n=cd(m(e.eachComponent,e,"dataZoom"),KS,function(t,e){return t.get(e.axisIndex)}),i=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){i.push.apply(i,n(t).nodes)}),d(i,function(e,n){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var wM={},bM=Is({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){bM.superApply(this,"optionUpdated",arguments),d(this.option.feature,function(t,e){var n=Ud(e);n&&i(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});Ts({type:"toolbox",render:function(t,e,n,i){function r(r,a){var s,c=h[r],d=h[a],f=new Sr(l[c],t,t.ecModel);if(c&&!d){if(Xd(c))s={model:f,onclick:f.option.onclick,featureName:c};else{var p=Ud(c);if(!p)return;s=new p(f,e,n)}u[c]=s}else{if(!(s=u[d]))return;s.model=f,s.ecModel=e,s.api=n}c||!d?f.get("show")&&!s.unusable?(o(f,s,c),f.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},s.render&&s.render(f,e,n,i)):s.remove&&s.remove(e,n):s.dispose&&s.dispose(e,n)}function o(i,r,o){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),h=r.getIcons?r.getIcons():i.get("icon"),c=i.get("title")||{};if("string"==typeof h){var f=h,p=c;c={},(h={})[o]=f,c[o]=p}var g=i.iconPaths={};d(h,function(o,h){var d=br(o,{},{x:-s/2,y:-s/2,width:s,height:s});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),ir(d),t.get("showTitle")&&(d.__title=c[h],d.on("mouseover",function(){var t=u.getItemStyle();d.setStyle({text:c[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){d.setStyle({textFill:null})})),d.trigger(i.get("iconStatus."+h)||"normal"),a.add(d),d.on("click",m(r.onclick,r,e,n,h)),g[h]=d})}var a=this.group;if(a.removeAll(),t.get("show")){var s=+t.get("itemSize"),l=t.get("feature")||{},u=this._features||(this._features={}),h=[];d(l,function(t,e){h.push(e)}),new ks(this._featureNames||[],h).add(r).update(r).remove(v(r,null)).execute(),this._featureNames=h,Mc(a,t,n),a.add(Ic(a.getBoundingRect(),t)),a.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=Se(e,Be(i)),o=t.position[0]+a.position[0],l=!1;t.position[1]+a.position[1]+s+r.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-r.height:s+8;o+r.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):o-r.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}})}},updateView:function(t,e,n,i){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(t,e){d(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(n){n.dispose&&n.dispose(t,e)})}});var SM=t_.toolbox.saveAsImage;Yd.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:SM.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:SM.lang.slice()},Yd.prototype.unusable=!Xp.canvasSupported,Yd.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=n.get("type",!0)||"png";r.download=i+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(r.href=a,"function"!=typeof MouseEvent||Xp.browser.ie||Xp.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,i+"."+o)}else{var c=n.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(f)}},Zd("saveAsImage",Yd);var MM=t_.toolbox.magicType;jd.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:n(MM.title),option:{},seriesIndex:{}};var IM=jd.prototype;IM.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return d(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var TM={line:function(t,e,n,r){if("bar"===t)return i({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,e,n,r){if("line"===t)return i({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,e,n,r){if("line"===t||"bar"===t)return i({id:e,stack:"__ec_magicType_stack__"},r.get("option.stack")||{},!0)},tiled:function(t,e,n,r){if("line"===t||"bar"===t)return i({id:e,stack:""},r.get("option.tiled")||{},!0)}},CM=[["line","bar"],["stack","tiled"]];IM.onclick=function(t,e,n){var i=this.model,r=i.get("seriesIndex."+n);if(TM[n]){var o={series:[]};d(CM,function(t){l(t,n)>=0&&d(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(e){var r=e.subType,s=e.id,l=TM[n](r,s,e,i);l&&(a(l,e.option),o.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===n||"bar"===n)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var f=0;f<=d;f++)o[c][d]=o[c][d]||{};o[c][d].boundaryGap="bar"===n}}}),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:o})}},_s({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Zd("magicType",jd);var AM=t_.toolbox.dataView,DM=new Array(60).join("-"),kM="\t",PM=new RegExp("["+kM+"]+","g");of.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n(AM.title),lang:n(AM.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},of.prototype.onclick=function(t,e){function n(){i.removeChild(o),x._dom=null}var i=e.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=r.get("optionToContent"),c=r.get("contentToOption"),d=Qd(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;at(v,"click",n),at(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):rf(u.value,p)}catch(t){throw n(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),at(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,n=this.selectionStart,i=this.selectionEnd;this.value=e.substring(0,n)+kM+e.substring(i),this.selectionStart=this.selectionEnd=n+1,vg(t)}}),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},of.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},of.prototype.dispose=function(t,e){this.remove(t,e)},Zd("dataView",of),_s({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];d(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var r=i.get("data");n.push({name:t.name,data:af(t.data,r)})}else n.push(o({type:"scatter"},t))}),e.mergeOption(a({series:n},t.newOption))});var LM=v,OM=d,zM=f,EM=Math.min,NM=Math.max,RM=Math.pow,BM=1e4,FM=6,VM=6,WM="globalPan",HM={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},GM={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},ZM={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},UM=0;sf.prototype={constructor:sf,enableBrush:function(t){return this._brushType&&uf(this),t.brushType&&lf(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){OM(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function r(e,n){var i=t[e];if(null!=n&&a[n]===u)s[e]=a[n];else{var r=s[e]=null!=n?(a[n].__brushOption=i,a[n]):cf(l,hf(l,i));pf(l,r)}}t=f(t,function(t){return i(n(ZM),t,!0)});var o="\0-brush-index-",a=this._covers,s=this._covers=[],l=this,u=this._creatingCover;return new ks(a,t,function(t,n){return e(t.__brushOption,n)},e).add(r).update(r).remove(function(t){a[t]!==u&&l.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),yf(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},h(sf,pg);var XM={mousedown:function(t){if(this._dragging)Vf.call(this,t);else if(!t.target||!t.target.draggable){Nf(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=mf(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(Ef(this,t,e),this._dragging){Nf(t);var n=Bf(this,t,e,!1);n&&xf(this,n)}},mouseup:Vf},YM={lineX:Wf(0),lineY:Wf(1),rect:{createCover:function(t,e){return bf(LM(kf,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=wf(t);return Cf(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){Sf(t,e,n,i)},updateCommon:Mf,contain:Rf},polygon:{createCover:function(t,e){var n=new Jg;return n.add(new fy({name:"main",style:Tf(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new dy({name:"main",draggable:!0,drift:LM(Pf,t,e),ondragend:LM(xf,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:Of(t,e,n)})},updateCommon:Mf,contain:Rf}},jM={axisPointer:1,tooltip:1,brush:1},qM=d,$M=l,KM=v,QM=["dataToPoint","pointToData"],JM=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],tI=Yf.prototype;tI.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=rI[t.brushType](0,n,e);t.__rangeOffset={offset:oI[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},tI.matchOutputRanges=function(t,e,n){qM(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&d(i.coordSyses,function(i){var r=rI[t.brushType](1,i,t.range);n(t,r.values,i,e)})},this)},tI.setInputRanges=function(t,e){qM(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&!0!==n){t.panelId=n.panelId;var i=rI[t.brushType](0,n.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?oI[t.brushType](i.values,r.offset,Qf(i.xyMinMax,r.xyMinMax)):i.values}},this)},tI.makePanelOpts=function(t,e){return f(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e&&e(n),clipPath:Gf(i),isTargetByCursor:Uf(i,t,n.coordSysModel),getLinearBrushOtherExtent:Zf(i)}})},tI.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&$M(i.coordSyses,e.coordinateSystem)>=0},tI.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=qf(e,t),r=0;r=0||$M(i,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:iI.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){qM(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:iI.geo})})}},nI=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],iI={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(vr(t)),e}},rI={lineX:KM($f,0),lineY:KM($f,1),rect:function(t,e,n){var i=e[QM[t]]([n[0][0],n[1][0]]),r=e[QM[t]]([n[0][1],n[1][1]]),o=[jf([i[0],r[0]]),jf([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:f(n,function(n){var r=e[QM[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}},oI={lineX:KM(Kf,0),lineY:KM(Kf,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return f(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}},aI=d,sI="\0_ec_hist_store";iM.extend({type:"dataZoom.select"}),rM.extend({type:"dataZoom.select"});var lI=t_.toolbox.dataZoom,uI=d,hI="\0_ec_\0toolbox-dataZoom_";op.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(lI.title)};var cI=op.prototype;cI.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,lp(t,e,this,i,n),sp(t,e)},cI.onclick=function(t,e,n){dI[n].call(this)},cI.remove=function(t,e){this._brushController.unmount()},cI.dispose=function(t,e){this._brushController.dispose()};var dI={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(ep(this.ecModel))}};cI._onBrush=function(t,e){function n(t,e,n){var a=e.getAxis(t),s=a.model,l=i(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(n=oM(0,n.slice(),a.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}function i(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)}),i}if(e.isEnd&&t.length){var r={},o=this.ecModel;this._brushController.updateCovers([]),new Yf(ap(this.model.option),o,{include:["grid"]}).matchOutputRanges(t,o,function(t,e,i){if("cartesian2d"===i.type){var r=t.brushType;"rect"===r?(n("x",i,e[0]),n("y",i,e[1])):n({lineX:"x",lineY:"y"}[r],i,e)}}),tp(o,r),this._dispatchZoomAction(r)}},cI._dispatchZoomAction=function(t){var e=[];uI(t,function(t,i){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Zd("dataZoom",op),ys(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||"all"===o||y(o)||(o=!1===o||"none"===o?[]:[o]),n(t,function(e,n){if(null==o||"all"===o||-1!==l(o,n)){var a={type:"select",$fromToolbox:!0,id:hI+t+n};a[r]=n,i.push(a)}})}}function n(e,n){var i=t[e];y(i)||(i=i?[i]:[]),uI(i,n)}if(t){var i=t.dataZoom||(t.dataZoom=[]);y(i)||(t.dataZoom=i=[i]);var r=t.toolbox;if(r&&(y(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var fI=t_.toolbox.restore;up.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:fI.title},up.prototype.onclick=function(t,e,n){np(t),e.dispatchAction({type:"restore",from:this.uid})},Zd("restore",up),_s({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var pI,gI="urn:schemas-microsoft-com:vml",mI="undefined"==typeof window?null:window,vI=!1,yI=mI&&mI.document;if(yI&&!Xp.canvasSupported)try{!yI.namespaces.zrvml&&yI.namespaces.add("zrvml",gI),pI=function(t){return yI.createElement("')}}catch(t){pI=function(t){return yI.createElement("<"+t+' xmlns="'+gI+'" class="zrvml">')}}var xI=Ov.CMD,_I=Math.round,wI=Math.sqrt,bI=Math.abs,SI=Math.cos,MI=Math.sin,II=Math.max;if(!Xp.canvasSupported){var TI=21600,CI=TI/2,AI=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=TI+","+TI,t.coordorigin="0,0"},DI=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},kI=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},PI=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},LI=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},OI=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},zI=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},EI=function(t,e,n){var i=Ot(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=kI(i[0],i[1],i[2]),t.opacity=n*i[3])},NI=function(t){var e=Ot(t);return[kI(e[0],e[1],e[2]),e[3]]},RI=function(t,e,n){var i=e.fill;if(null!=i)if(i instanceof _y){var r,o=0,a=[0,0],s=0,l=1,u=n.getBoundingRect(),h=u.width,c=u.height;if("linear"===i.type){r="gradient";var d=n.transform,f=[i.x*h,i.y*c],p=[i.x2*h,i.y2*c];d&&($(f,f,d),$(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(o=180*Math.atan2(g,m)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{r="gradientradial";var f=[i.x*h,i.y*c],d=n.transform,v=n.scale,y=h,x=c;a=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&$(f,f,d),y/=v[0]*TI,x/=v[1]*TI;var _=II(y,x);s=0/_,l=2*i.r/_-s}var w=i.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I=2){var A=S[0][0],D=S[1][0],k=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=A,t.color2=D,t.colors=M.join(","),t.opacity=P,t.opacity2=k}"radial"===r&&(t.focusposition=a.join(","))}else EI(t,i,e.opacity)},BI=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof _y||EI(t,e.stroke,e.opacity)},FI=function(t,e,n,i){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof _y&&LI(t,o),o||(o=hp(e)),r?RI(o,n,i):BI(o,n),PI(t,o)):(t[r?"filled":"stroked"]="false",LI(t,o))},VI=[[],[],[]],WI=function(t,e){var n,i,r,o,a,s,l=xI.M,u=xI.C,h=xI.L,c=xI.A,d=xI.Q,f=[],p=t.data,g=t.len();for(o=0;o.01?O&&(z+=.0125):Math.abs(E-A)<1e-4?O&&zC?x-=.0125:x+=.0125:O&&EA?y+=.0125:y-=.0125),f.push(N,_I(((C-D)*M+b)*TI-CI),",",_I(((A-k)*I+S)*TI-CI),",",_I(((C+D)*M+b)*TI-CI),",",_I(((A+k)*I+S)*TI-CI),",",_I((z*M+b)*TI-CI),",",_I((E*I+S)*TI-CI),",",_I((y*M+b)*TI-CI),",",_I((x*I+S)*TI-CI)),a=y,s=x;break;case xI.R:var R=VI[0],B=VI[1];R[0]=p[o++],R[1]=p[o++],B[0]=R[0]+p[o++],B[1]=R[1]+p[o++],e&&($(R,R,e),$(B,B,e)),R[0]=_I(R[0]*TI-CI),B[0]=_I(B[0]*TI-CI),R[1]=_I(R[1]*TI-CI),B[1]=_I(B[1]*TI-CI),f.push(" m ",R[0],",",R[1]," l ",B[0],",",R[1]," l ",B[0],",",B[1]," l ",R[0],",",B[1]);break;case xI.Z:f.push(" x ")}if(n>0){f.push(i);for(var F=0;F100&&(UI=0,ZI={});var n,i=XI.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(t){}e={style:i.fontStyle||"normal",variant:i.fontVariant||"normal",weight:i.fontWeight||"normal",size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},ZI[t]=e,UI++}return e};!function(t,e){xm[t]=e}("measureText",function(t,e){var n=yI;GI||((GI=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",yI.body.appendChild(GI));try{GI.style.font=e}catch(t){}return GI.innerHTML="",GI.appendChild(n.createTextNode(t)),{width:GI.offsetWidth}});for(var jI=new re,qI=[Mm,on,an,Ii,ry],$I=0;$I=r&&u+1>=o){for(var h=[],c=0;c=r&&c+1>=o)return Cp(0,s.components);l[n]=s}else l[n]=void 0}a++}();if(d)return d}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,o=n.length,a=t.newPos,s=a-i,l=0;a+1=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},Dp.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},Dp.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Dp.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Dp.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(n){var i=t.getElementsByTagName(n);e=e.concat([].slice.call(i))}),e},Dp.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},Dp.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Dp.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(n){"1"!==n[e._markLabel]&&t.removeChild(n)})}},Dp.prototype.getSvgProxy=function(t){return t instanceof Ii?uT:t instanceof an?hT:t instanceof ry?cT:uT},Dp.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Dp.prototype.getSvgElement=function(t){return t.__svgEl},u(kp,Dp),kp.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;d(["fill","stroke"],function(i){if(e.style[i]&&("linear"===e.style[i].type||"radial"===e.style[i].type)){var r,o=e.style[i],a=n.getDefs(!0);o._dom?(r=o._dom,a.contains(o._dom)||n.addDom(r)):r=n.add(o),n.markUsed(e);var s=r.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},kp.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Yg("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},kp.prototype.update=function(t){var e=this;Dp.prototype.update.call(this,t,function(){var n=t.type,i=t._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},kp.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Yg("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,r=n.length;i0){var i,r,o=this.getDefs(!0),a=e[0],s=n?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),i=a[s],o.contains(i)||o.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(i),a[s]=i);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!n){var u=Array.prototype.slice.call(a.transform);mt(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=u}else l.brush(a);var h=this.getSvgElement(a);i.innerHTML="",i.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},Pp.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&Dp.prototype.markUsed.call(e,t._dom),t._textDom&&Dp.prototype.markUsed.call(e,t._textDom)})},u(Lp,Dp),Lp.prototype.addWithoutUpdate=function(t,e){if(e&&Op(e.style)){var n,i=e.style;i._shadowDom?(n=i._shadowDom,this.getDefs(!0).contains(i._shadowDom)||this.addDom(n)):n=this.add(e),this.markUsed(e);var r=n.getAttribute("id");t.style.filter="url(#"+r+")"}},Lp.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Lp.prototype.update=function(t,e){var n=e.style;if(Op(n)){var i=this;Dp.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},Lp.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},Lp.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,o,a,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/u),n.setAttribute("flood-color",a);var h=o/2/l+" "+o/2/u;n.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(n),s._shadowDom=e},Lp.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&Dp.prototype.markUsed.call(this,e._shadowDom)};var mT=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=o({},n||{});var r=gp("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new kp(i,r),this.clipPathManager=new Pp(i,r),this.shadowManager=new Lp(i,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]};mT.prototype={constructor:mT,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n=this._svgRoot,i=this._visibleList,r=t.length,o=[];for(e=0;e=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||zp(s[n])||zp(a.style[n]))-(zp(s[r])||0)-(zp(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){mT.prototype[t]=Hp(t)}),bn("svg",mT),t.version="4.2.0",t.dependencies=D_,t.PRIORITY=O_,t.init=function(t,e,n){var i=ms(t);if(i)return i;var r=new ja(t,e,n);return r.id="ec_"+$_++,j_[r.id]=r,Nn(t,Q_,r.id),ps(r),r},t.connect=function(t){if(y(t)){var e=t;t=null,I_(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+K_++,I_(e,function(e){e.group=t})}return q_[t]=!0,t},t.disConnect=gs,t.disconnect=J_,t.dispose=function(t){"string"==typeof t?t=j_[t]:t instanceof ja||(t=ms(t)),t instanceof ja&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ms,t.getInstanceById=function(t){return j_[t]},t.registerTheme=vs,t.registerPreprocessor=ys,t.registerProcessor=xs,t.registerPostUpdate=function(t){Z_.push(t)},t.registerAction=_s,t.registerCoordinateSystem=function(t,e){Co.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=Co.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=ws,t.registerVisual=bs,t.registerLoading=Ms,t.extendComponentModel=Is,t.extendComponentView=Ts,t.extendSeriesModel=Cs,t.extendChartView=As,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,n){b_.registerMap(t,e,n)},t.getMap=function(t){var e=b_.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=tw,t.zrender=Wm,t.number=Vy,t.format=jy,t.throttle=ya,t.helper=Xw,t.matrix=bg,t.vector=dg,t.color=Wg,t.parseGeoJSON=jw,t.parseGeoJson=Qw,t.util=Jw,t.graphic=tb,t.List=uw,t.Model=Sr,t.Axis=Kw,t.env=Xp}); diff --git a/WebContent/js/echarts.min.js b/WebContent/js/echarts.min.js new file mode 100644 index 0000000000000000000000000000000000000000..93c11b3f5459014d4ebb4b7bf955de3292557d77 --- /dev/null +++ b/WebContent/js/echarts.min.js @@ -0,0 +1,22 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(q_=null),j_[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=G_.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o=0){var o="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];o&&rt(t,o,e,i)}else rt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&sw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ut(t,e,i){rw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ht(t,e,i){rw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function ct(t){return t.which>1}function dt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:ft}}function ft(t){lw(this.event)}function pt(){}function gt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||uw}return!1}function mt(){var t=new dw(6);return vt(t),t}function vt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function yt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function xt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function _t(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function wt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function bt(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function St(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function Mt(t){var e=mt();return yt(e,t),e}function It(t){return t>gw||t<-gw}function Tt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function At(t){return(t=Math.round(t))<0?0:t>255?255:t}function Dt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Ct(t){return t<0?0:t>1?1:t}function Lt(t){return At(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function kt(t){return Ct(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Pt(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Nt(t,e,i){return t+(e-t)*i}function Ot(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Et(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Rt(t,e){Cw&&Et(Cw,e),Cw=Dw.put(t,Cw||e.slice())}function zt(t,e){if(t){e=e||[];var i=Dw.get(t);if(i)return Et(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in Aw)return Et(e,Aw[n]),Rt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void Ot(e,0,0,0,1);l=kt(s.pop());case"rgb":return 3!==s.length?void Ot(e,0,0,0,1):(Ot(e,Lt(s[0]),Lt(s[1]),Lt(s[2]),l),Rt(t,e),e);case"hsla":return 4!==s.length?void Ot(e,0,0,0,1):(s[3]=kt(s[3]),Bt(s,e),Rt(t,e),e);case"hsl":return 3!==s.length?void Ot(e,0,0,0,1):(Bt(s,e),Rt(t,e),e);default:return}}Ot(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(Ot(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Rt(t,e),e):void Ot(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(Ot(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Rt(t,e),e):void Ot(e,0,0,0,1)}}}}function Bt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=kt(t[1]),o=kt(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],Ot(e,At(255*Pt(r,a,i+1/3)),At(255*Pt(r,a,i)),At(255*Pt(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Vt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Gt(t,e){var i=zt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return Xt(i,4===i.length?"rgba":"rgb")}}function Ft(t){var e=zt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Wt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=At(Nt(r[0],s[0],l)),i[1]=At(Nt(r[1],s[1],l)),i[2]=At(Nt(r[2],s[2],l)),i[3]=Ct(Nt(r[3],s[3],l)),i}}function Ht(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=zt(e[o]),s=zt(e[a]),l=n-o,u=Xt([At(Nt(r[0],s[0],l)),At(Nt(r[1],s[1],l)),At(Nt(r[2],s[2],l)),Ct(Nt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function Zt(t,e,i,n){if(t=zt(t))return t=Vt(t),null!=e&&(t[0]=Dt(e)),null!=i&&(t[1]=kt(i)),null!=n&&(t[2]=kt(n)),Xt(Bt(t),"rgba")}function Ut(t,e){if((t=zt(t))&&null!=e)return t[3]=Ct(e),Xt(t,"rgba")}function Xt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function jt(t,e){return t[e]}function Yt(t,e,i){t[e]=i}function qt(t,e,i){return(e-t)*i+t}function Kt(t,e,i){return i>.5?e:t}function $t(t,e,i,n,o){var a=t.length;if(1==o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;ie);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)te(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=te(T,A,D,C,I,I*I,I*I*I,P,1),a=ne(P);else{if(p)return Kt(A,D,I);a=ee(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)$t(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)$t(v[i],v[i+1],I,P,1),a=ne(P);else{if(p)return Kt(v[i],v[i+1],I);a=qt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function re(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),se(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function le(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function ue(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function he(t){for(var e=0;t>=Uw;)e|=1&t,t>>=1;return t+e}function ce(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function de(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function pe(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ge(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function me(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ge(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=pe(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r=Xw||f>=Xw);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-pe(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r=Xw||m>=Xw);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),fe(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function ye(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function xe(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function _e(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function we(){return!1}function be(t,e,i){var n=Y_(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Se(t){if("string"==typeof t){var e=ob.get(t);return e&&e.image}return t}function Me(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=ob.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Te(e=a.image)&&a.pending.push(r):(!e&&(e=new Image),e.onload=e.onerror=Ie,ob.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Ie(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;esb&&(rb=0,ab={}),rb++,ab[i]=o,o}function De(t,e,i,n,o,a,r){return a?Le(t,e,i,n,o,a,r):Ce(t,e,i,n,o,r)}function Ce(t,e,i,n,o,a){var r=Ge(t,e,o,a),s=Ae(t,e);o&&(s+=o[1]+o[3]);var l=r.outerHeight,u=new ue(ke(0,s,i),Pe(0,l,n),s,l);return u.lineHeight=r.lineHeight,u}function Le(t,e,i,n,o,a,r){var s=Fe(t,{rich:a,truncate:r,font:e,textAlign:i,textPadding:o}),l=s.outerWidth,u=s.outerHeight;return new ue(ke(0,l,i),Pe(0,u,n),l,u)}function ke(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Pe(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ne(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function Oe(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Ee(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var u=Ae(i);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Re(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Ae(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?ze(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Ae(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ze(t,e,i,n){for(var o=0,a=0,r=t.length;al)t="",a=[];else if(null!=u)for(var h=Ee(u-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;co&&We(i,t.substring(o,a)),We(i,n[2],n[1]),o=lb.lastIndex}of)return{lines:[],width:0,height:0};k.textWidth=Ae(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Te(I=Se(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&Cl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ue(t){return Xe(t),d(t.rich,Xe),t}function Xe(t){if(t){t.font=He(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||cb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||db[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function je(t,e,i,n,o,a){n.rich?qe(t,e,i,n,o):Ye(t,e,i,n,o,a)}function Ye(t,e,i,n,o,a){var r=a&&a.style,s=r&&"text"===a.type,l=n.font||ub;s&&l===(r.font||ub)||(e.font=l);var u=t.__computedFont;t.__styleFont!==l&&(t.__styleFont=l,u=t.__computedFont=e.font);var h=n.textPadding,c=t.__textCotentBlock;c&&!t.__dirtyText||(c=t.__textCotentBlock=Ge(i,u,h,n.truncate));var d=c.outerHeight,f=c.lines,p=c.lineHeight,g=ii(d,n,o),m=g.baseX,v=g.baseY,y=g.textAlign||"left",x=g.textVerticalAlign;$e(e,n,o,m,v);var _=Pe(v,d,x),w=m,b=_,S=Qe(n);if(S||h){var M=Ae(i,u);h&&(M+=h[1]+h[3]);var I=ke(m,M,y);S&&ti(t,e,n,I,_,M,d),h&&(w=si(m,y,h),b+=h[0])}e.textAlign=y,e.textBaseline="middle";for(R=0;R=0&&"right"===(_=b[C]).textAlign;)Je(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)Je(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function $e(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Je(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&Qe(l)&&ti(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=si(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ni(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ni(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ni(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ni(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ni(e,"textAlign",s),ni(e,"textBaseline","middle"),ni(e,"font",i.font||ub);var d=oi(l.textStroke||n.textStroke,p),f=ai(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ni(e,"lineWidth",p),ni(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ni(e,"fillStyle",f),e.fillText(i.text,r,h))}function Qe(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function ti(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ni(e,"shadowBlur",i.textBoxShadowBlur||0),ni(e,"shadowColor",i.textBoxShadowColor||"transparent"),ni(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ni(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Ze(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ni(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(x(s))ni(e,"fillStyle",s(i)),e.fill();else if(w(s)){var d=s.image;(d=Me(d,null,t,ei,s))&&Te(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ni(e,"lineWidth",l),ni(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function ei(t,e){e.image=t}function ii(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ri(s[0],i.width),o=i.y+ri(s[1],i.height);else{var l=Ne(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ni(t,e,i){return t[e]=qw(t,e,i),t[e]}function oi(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ai(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ri(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function si(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function li(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function ui(t){t=t||{},Gw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new $w(t.style,this),this._rect=null,this.__clipPaths=[]}function hi(t){ui.call(this,t)}function ci(t){return parseInt(t,10)}function di(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function fi(t,e,i){return mb.copy(t.getBoundingRect()),t.transform&&mb.applyTransform(t.transform),vb.width=e,vb.height=i,!mb.intersect(vb)}function pi(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=i.length&&i.push({option:t})}}),i}function Ni(t){var e=R();Nb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Nb(t,function(t,i){var n=t.option;k(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Nb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ob(o)){if(a.name=null!=o.name?o.name+"":n?n.name:Rb+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Oi(t){var e=t.name;return!(!e||!e.indexOf(Rb))}function Ei(t){return Ob(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ri(t,e){function i(t,e,i){for(var n=0,o=t.length;n-qb&&tqb||t<-qb}function Qi(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function tn(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function en(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if($i(h)&&$i(c))$i(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if($i(p)){var g=c/h,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=Yb(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-jb(-y,Jb):jb(y,Jb))+(x=x<0?-jb(-x,Jb):jb(x,Jb))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*Yb(h*h*h)),w=Math.acos(_)/3,b=Yb(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),m=(-s+b*(S+$b*Math.sin(w)))/(3*r),I=(-s+b*(S-$b*Math.sin(w)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function nn(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if($i(r))Ji(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if($i(u))o[0]=-a/(2*r);else if(u>0){var h=Yb(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function on(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function an(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;Qb[0]=l,Qb[1]=u;for(var y=0;y<1;y+=.05)tS[0]=Qi(t,i,o,r,y),tS[1]=Qi(e,n,a,s,y),(p=iw(Qb,tS))=0&&p=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if($i(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=Yb(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function un(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function hn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function cn(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;Qb[0]=r,Qb[1]=s;for(var d=0;d<1;d+=.05)tS[0]=rn(t,i,o,d),tS[1]=rn(e,n,a,d),(m=iw(Qb,tS))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(sS[0]=aS(o)*i+t,sS[1]=oS(o)*n+e,lS[0]=aS(a)*i+t,lS[1]=oS(a)*n+e,u(s,sS,lS),h(l,sS,lS),(o%=rS)<0&&(o+=rS),(a%=rS)<0&&(a+=rS),o>a&&!r?a+=rS:oo&&(uS[0]=aS(f)*i+t,uS[1]=oS(f)*n+e,u(s,uS,s),h(l,uS,l))}function vn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>o+c&&u>r+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>o+u||si||h+uo&&(o+=TS);var d=Math.atan2(l,s);return d<0&&(d+=TS),d>=n&&d<=o||d+TS>=n&&d+TS<=o}function bn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function Sn(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&Mn(),c=Qi(e,n,a,s,kS[0]),p>1&&(d=Qi(e,n,a,s,kS[1]))),2==p?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=rn(e,n,a,u),d=0;di||s<-i)return 0;u=Math.sqrt(i*i-s*s);LS[0]=-u,LS[1]=u;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%DS<1e-4){n=0,o=DS;p=a?1:-1;return r>=LS[0]+t&&r<=LS[1]+t?p:0}if(a){var u=n;n=_n(o),o=_n(u)}else n=_n(n),o=_n(o);n>o&&(o+=DS);for(var h=0,c=0;c<2;c++){var d=LS[c];if(d+t>r){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=DS+f),(f>=n&&f<=o||f+DS>=n&&f+DS<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function Dn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(a+=bn(r,s,l,u,n,o))),1==h&&(l=r=t[h],u=s=t[h+1]),c){case AS.M:r=l=t[h++],s=u=t[h++];break;case AS.L:if(i){if(vn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=bn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case AS.C:if(i){if(yn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=In(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case AS.Q:if(i){if(xn(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Tn(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case AS.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++],y=(t[h++],1-t[h++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?a+=bn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(wn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=An(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case AS.R:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(vn(l,u,x,u,e,n,o)||vn(x,u,x,_,e,n,o)||vn(x,_,l,_,e,n,o)||vn(l,_,l,u,e,n,o))return!0}else a+=bn(x,u,x,_,n,o),a+=bn(l,_,l,u,n,o);break;case AS.Z:if(i){if(vn(r,s,l,u,e,n,o))return!0}else a+=bn(r,s,l,u,n,o);r=l,s=u}}return i||Sn(s,u)||(a+=bn(r,s,l,u,n,o)||0),0!==a}function Cn(t,e,i){return Dn(t,0,!1,e,i)}function Ln(t,e,i,n){return Dn(t,e,!0,i,n)}function kn(t){ui.call(this,t),this.path=null}function Pn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(HS/180),d=WS(c)*(t-i)/2+FS(c)*(e-n)/2,f=-1*FS(c)*(t-i)/2+WS(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=GS(p),s*=GS(p));var g=(o===a?-1:1)*GS((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+WS(c)*m-FS(c)*v,x=(e+n)/2+FS(c)*m+WS(c)*v,_=XS([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=XS(w,b);US(w,b)<=-1&&(S=HS),US(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*HS),1===a&&S<0&&(S+=2*HS),h.addData(u,y,x,r,s,_,S,c,a)}function Nn(t){if(!t)return new MS;for(var e,i=0,n=0,o=i,a=n,r=new MS,s=MS.CMD,l=t.match(jS),u=0;u=2){if(o&&"spline"!==o){var a=iM(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=eM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function xo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function _o(t,e){var i=e||e.getModel("textStyle");return P([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function wo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function bo(t,e,i,n,o){wo(!0,t,e,i,n,o)}function So(t,e,i,n,o){wo(!1,t,e,i,n,o)}function Mo(t,e){for(var i=vt([]);t&&t!==e;)xt(i,t.getLocalTransform(),i),t=t.parent;return i}function Io(t,e,i){return e&&!c(e)&&(e=mw.getLocalTransform(e)),i&&(e=St([],e)),Q([],t,e)}function To(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Io(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ao(t,e,i,n){function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),bo(t,n,i,t.dataIndex)}}})}}function Do(t,e){return f(t,function(t){var i=t[0];i=mM(i,e.x),i=vM(i,e.x+e.width);var n=t[1];return n=mM(n,e.y),n=vM(n,e.y+e.height),[i,n]})}function Co(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new hi(e)):Wn(t.replace("path://",""),e,i,"center")}function Lo(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function ko(t,e,i){for(var n=0;n0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Ro(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?Oo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zo(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bo(t){return t.sort(function(t,e){return t-e}),t}function Vo(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Go(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Fo(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Wo(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});lh&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Ho(t){var e=2*Math.PI;return(t%e+e)%e}function Zo(t){return t>-LM&&t=-20?+t.toFixed(n<0?-n:0):t}function qo(t){function e(t,i,n){return t.interval[n]=0}function $o(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Jo(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Qo(t){return null==t?"":(t+"").replace(EM,function(t,e){return RM[e]})}function ta(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a
':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function na(t,e){return t+="","0000".substr(0,e-t.length)+t}function oa(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Uo(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",na(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",na(s,2)).replace("d",s).replace("hh",na(l,2)).replace("h",l).replace("mm",na(u,2)).replace("m",u).replace("ss",na(h,2)).replace("s",h).replace("SSS",na(c,3))}function aa(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ra(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function sa(t,e,i){var n=e.width,o=e.height,a=Ro(t.x,n),r=Ro(t.y,o),s=Ro(t.x2,n),l=Ro(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=OM(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function la(t,e,i){i=OM(i||0);var n=e.width,o=e.height,a=Ro(t.left,n),r=Ro(t.top,o),s=Ro(t.right,n),l=Ro(t.bottom,o),u=Ro(t.width,n),h=Ro(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/o?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new ue(a+i[3],r+i[0],u,h);return p.margin=i,p}function ua(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new ue(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=la(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function ha(t,e){return null!=t[ZM[e][0]]||null!=t[ZM[e][1]]&&null!=t[ZM[e][2]]}function ca(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(WM(i,function(e){u[e]=t[e]}),WM(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;ce)return t[n];return t[i-1]}function ga(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},n=QM[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function ma(t){return"category"===t.get("type")}function va(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===nI?{}:[]),this.sourceFormat=t.sourceFormat||oI,this.seriesLayoutBy=t.seriesLayoutBy||rI,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function ya(t){var e=t.option.source,i=oI;if(S(e))i=aI;else if(y(e)){0===e.length&&(i=eI);for(var n=0,o=e.length;n=e:"max"===i?t<=e:t===e}function Ha(t,e){return t.join(",")===e.join(",")}function Za(t,e){fI(e=e||{},function(e,i){if(null!=e){var n=t[i];if(YM.hasClass(i)){e=Di(e);var o=Pi(n=Di(n),e);t[i]=gI(o,function(t){return t.option&&t.exist?mI(t.exist,t.option,!0):t.exist||t.option})}else t[i]=mI(n,e,!0)}})}function Ua(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=_I.length;i=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function nr(t,e){va.isInstance(t)||(t=va.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===aI&&(this._offset=0,this._dimSize=e,this._data=i),a(this,TI[n===eI?n+"_"+t.seriesLayoutBy:n])}function or(){return this._data.length}function ar(t){return this._data[t]}function rr(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function wr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(br,e))})}function br(t){var e=Sr(t);e&&e.setOutputEnd(this.count())}function Sr(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}function Mr(){this.group=new Zw,this.uid=No("viewChart"),this.renderTask=dr({plan:Ar,reset:Dr}),this.renderTask.context={view:this}}function Ir(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?n():c=setTimeout(n,-a),u=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Lr(t,e,i,n){var o=t[e];if(o){var a=o[WI]||o,r=o[ZI];if(o[HI]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Cr(a,i,"debounce"===n))[WI]=a,o[ZI]=n,o[HI]=i}return o}}function kr(t,e){var i=t[e];i&&i[WI]&&(t[e]=i[WI])}function Pr(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=R()}function Nr(t,e,i,n,o){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),KI(h,n);var f=t.getPerformArgs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),KI(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function Or(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,dr({plan:Gr,reset:Fr,count:Hr}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Zr(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,o).each(a);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Er(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,dr({reset:zr,onDirty:Vr})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,Zr(t,e,n)}var r=i.overallTask=i.overallTask||dr({reset:Rr});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||R(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,d(n.getSeries(),a));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Rr(t){t.overallReset(t.ecModel,t.api,t.payload)}function zr(t,e){return t.overallProgress&&Br}function Br(){this.agent.dirty(),this.getDownstream().dirty()}function Vr(){this.agent&&this.agent.dirty()}function Gr(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Fr(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Di(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Wr(e)}):$I}function Wr(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a0?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}function Kr(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),r(e.__inheritedStyle,t.__inheritedStyle))}function $r(t){for(var e=P(t).split(rT),i=[],n=0;n0;a-=2){var r=o[a],s=o[a-1];switch(n=n||mt(),s){case"translate":r=P(r).split(rT),_t(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=P(r).split(rT),bt(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=P(r).split(rT),wt(n,n,parseFloat(r[0]));break;case"skew":r=P(r).split(rT),console.warn("Skew transform is not supported yet");break;case"matrix":r=P(r).split(rT);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}}e.setLocalTransform(n)}function es(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};dT.lastIndex=0;for(var o;null!=(o=dT.exec(e));)n[o[1]]=o[2];for(var a in uT)uT.hasOwnProperty(a)&&null!=n[a]&&(i[uT[a]]=n[a]);return i}function is(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function ns(t,e){return(new Yr).parse(t,e)}function os(t){return function(e,i,n){e=e&&e.toLowerCase(),aw.prototype[t].call(this,e,i,n)}}function as(){aw.call(this)}function rs(t,e,n){function o(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=BT[e]),this.id,this.group,this._dom=t;var a=this._zr=Ii(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Cr(m(a.flush,a),17),(e=i(e))&&MI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Ba;var r=this._api=Ms(this);ve(zT,o),ve(OT,o),this._scheduler=new Pr(this,r,OT,zT),aw.call(this,this._ecEventProcessor=new Is),this._messageCenter=new as,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),ps(a,this),N(this)}function ss(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Vi(o,e);for(var r=0;re.get("hoverLayerThreshold")&&!z_.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function bs(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function Ss(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Ms(t){var e=t._coordSysMgr;return a(new za(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Is(){this.eventInfo}function Ts(t){function e(t,e){for(var n=0;n65535?$T:JT}function qs(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Ks(t,e){d(QT.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,d(tA,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function $s(t){var e=t._invertedIndicesMap;d(e,function(i,n){var o=t._dimensionInfos[n].ordinalMeta;if(o){i=e[n]=new $T(o.categories.length);for(a=0;a=0?this._indices[t]:-1}function el(t,e){var i=t._idList[e];return null==i&&(i=Js(t,t._idDimIdx,e)),null==i&&(i=qT+e),i}function il(t){return y(t)||(t=[t]),t}function nl(t,e){var i=t.dimensions,n=new eA(f(i,t.getDimensionInfo,t),t.hostModel);Ks(n,t);for(var o=n._storage={},a=t._storage,r=0;r=0?(o[s]=ol(a[s]),n._rawExtent[s]=al(),n._extent[s]=null):o[s]=a[s])}return n}function ol(t){for(var e=new Array(t.length),i=0;in&&(r=o.interval=n);var s=o.intervalPrecision=_l(r);return bl(o.niceTickExtent=[lA(Math.ceil(t[0]/r)*r,s),lA(Math.floor(t[1]/r)*r,s)],t),o}function _l(t){return Go(t)+2}function wl(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function bl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),wl(t,0,e),wl(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Sl(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Ml(t){return t.get("stack")||cA+t.seriesIndex}function Il(t){return t.dim+t.index}function Tl(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o=0?"p":"n",b=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),b=o[r][_][w]);var S,M,I,T;if(g)S=b,M=(A=i.dataToPoint([x,_]))[1]+l,I=A[0]-m,T=u,Math.abs(I)a[1]?(n=a[1],o=a[0]):(n=a[0],o=a[1]);var r=e.toGlobalCoord(e.dataToCoord(0));return ro&&(r=o),r}function El(t,e){return SA(t,bA(e))}function Rl(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ro(n[0],1),n[1]=Ro(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(r)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var f,p=Al("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=Dl(p),m=zl(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function zl(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ll(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Bl(t,e){var i=Rl(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Vl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new sA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new hA;default:return(gl.getClass(e)||hA).create(t)}}function Gl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function Fl(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,o){return null!=i&&(o=n-i),e(Wl(t,n),o)}:function(e){return t.scale.getLabel(e)}}function Wl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Hl(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Fl(t),h=1;o>40&&(h=Math.ceil(o/40));for(var c=0;c>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function Jl(t){return"category"===t.type?tu(t):nu(t)}function Ql(t,e){return"category"===t.type?iu(t,e):{ticks:t.scale.getTicks()}}function tu(t){var e=t.getLabelModel(),i=eu(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function eu(t,e){var i=ou(t,"labels"),n=du(e),o=au(i,n);if(o)return o;var a,r;return a=x(n)?cu(t,n):hu(t,r="auto"===n?su(t):n),ru(i,n,{labels:a,labelCategoryInterval:r})}function iu(t,e){var i=ou(t,"ticks"),n=du(e),o=au(i,n);if(o)return o;var a,r;if(e.get("show")&&!t.scale.isBlank()||(a=[]),x(n))a=cu(t,n,!0);else if("auto"===n){var s=eu(t,t.getLabelModel());r=s.labelCategoryInterval,a=f(s.labels,function(t){return t.tickValue})}else a=hu(t,r=n,!0);return ru(i,n,{ticks:a,tickCategoryInterval:r})}function nu(t){var e=t.scale.getTicks(),i=Fl(t);return{labels:f(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function ou(t,e){return FA(t)[e]||(FA(t)[e]=[])}function au(t,e){for(var i=0;i40&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=De(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=FA(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-r)<=1&&w>x?x=w:(_.lastTickCount=r,_.lastAutoInterval=x),x}function uu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function hu(t,e,i){function n(t){l.push(i?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Fl(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d={min:s.get("showMinLabel"),max:s.get("showMaxLabel")};d.min&&h!==r[0]&&n(r[0]);for(var f=h;f<=r[1];f+=u)n(f);return d.max&&f!==r[1]&&n(r[1]),l}function cu(t,e,i){var n=t.scale,o=Fl(t),a=[];return d(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})}),a}function du(t){var e=t.get("interval");return null==e?"auto":e}function fu(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function pu(t,e,i,n,o){function a(t,e){return h?t>e:t0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(o?e[0].coord=l[0]:e.shift()),o&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(o?s.coord=l[1]:e.pop()),o&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function gu(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return hr(t,e,i[0]);if(n){for(var o=[],a=0;a0?i=n[0]:n[1]<0&&(i=n[1]),i}function Cu(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}function Lu(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function ku(t){return isNaN(t[0])||isNaN(t[1])}function Pu(t,e,i,n,o,a,r,s,l,u,h){return"none"!==u&&u?Nu.apply(this,arguments):Ou.apply(this,arguments)}function Nu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(ku(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;oD(rD,g),rD[m]=g[m]+v,oD(sD,p),sD[m]=p[m]-v,t.bezierCurveTo(rD[0],rD[1],sD[0],sD[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Ou(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(ku(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),oD(rD,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&ku(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||ku(m))oD(sD,p);else{ku(m)&&!h&&(m=p),U(aD,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=ew(p,y),_=ew(p,m);nD(sD,p,aD,-l*(1-(v=_/(_+x))))}eD(rD,rD,s),iD(rD,rD,r),eD(sD,sD,s),iD(sD,sD,r),t.bezierCurveTo(rD[0],rD[1],sD[0],sD[1],p[0],p[1]),nD(rD,p,aD,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Eu(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function Ru(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Vu(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oa[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;i&&(a[0]-=.5,a[1]+=.5);var l=new QS({shape:{cx:zo(t.cx,1),cy:zo(t.cy,1),r0:zo(a[0],1),r:zo(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,So(l,{shape:{endAngle:-r[1]*s}},n)),l}function Wu(t,e,i,n){return"polar"===t.type?Fu(t,e,i,n):Gu(t,e,i,n)}function Hu(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=f(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new dM(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function Uu(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!Xu(a,e))){var r=e.mapDimension(a.dim),s={};return d(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Xu(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;rn)return!1;return!0}function ju(t){return this._axes[t]}function Yu(t){pD.call(this,t)}function qu(t,e){return e.type||(e.data?"category":"value")}function Ku(t,e,i){return t.getCoordSysModel()===e}function $u(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Ju(t,e,i,n){function o(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Qu(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&Qu(r[h])&&!n[o(r[h])]){a=r[h];break}a&&(n[o(a)]=!0)}}function Qu(t){return t&&"category"!==t.type&&"time"!==t.type&&Gl(t)}function th(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function eh(t,e){return f(SD,function(e){return t.getReferringComponents(e)[0]})}function ih(t){return"cartesian2d"===t.get("coordinateSystem")}function nh(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function oh(t,e,i,n){var o,a,r=Ho(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Zo(r-MD/2)?(a=l?"bottom":"top",o="center"):Zo(r-1.5*MD)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*MD&&r>MD/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function ah(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function rh(t,e,i){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(sh(a),sh(u)):lh(a,r)&&(n?(sh(r),sh(h)):(sh(a),sh(u))),!1===o?(sh(s),sh(c)):lh(l,s)&&(o?(sh(l),sh(d)):(sh(s),sh(c)))}function sh(t){t&&(t.ignore=!0)}function lh(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=vt([]);return wt(a,a,-t.rotation),n.applyTransform(xt([],a,t.getLocalTransform())),o.applyTransform(xt([],a,e.getLocalTransform())),n.intersect(o)}}function uh(t){return"middle"===t||"center"===t}function hh(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function yh(t){var e=xh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=wh(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?"bottom":"top":o.width>0?"left":"right";l||Th(t.style,d,n,u,a,i,p),uo(t,d)}function kh(t,e){var i=t.get(BD)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function Ph(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new FD({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__valueIdx:a});e.add(r),Nh(r,t,n)}function Nh(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Oh(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Eh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Eh(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Rh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}Zw.call(this);var o=new QS({z2:2}),a=new oM,r=new qS;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function zh(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;pe&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function Bh(t,e,i,n,o,a){for(var r=[],s=[],l=0;l1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=la(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function tc(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function ec(t,e,i){oc(t)[e]=i}function ic(t,e,i){var n=oc(t);n[e]===i&&(n[e]=null)}function nc(t,e){return!!oc(t)[e]}function oc(t){return t[bC]||(t[bC]={})}function ac(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(rc,this),o=e(sc,this),a=e(lc,this),s=e(uc,this),l=e(hc,this);aw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=r(i(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function rc(t){if(!(ct(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function sc(t){if(!ct(t)&&fc("moveOnMouseMove",t,this._opt)&&this._dragging&&"pinch"!==t.gestureEvent&&!nc(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&lw(t.event),dc(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function lc(t){ct(t)||(this._dragging=!1)}function uc(t){var e=fc("zoomOnMouseWheel",t,this._opt),i=fc("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=o>3?1.4:o>1?1.2:1.1;cc(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);cc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:r})}}}function hc(t){nc(this._zr,"globalPan")||cc(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function cc(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(lw(n.event),dc(t,e,i,n,o))}function dc(t,e,i,n,o){o.isAvailableBehavior=m(fc,null,i,n),t.trigger(e,o)}function fc(t,e,i){var n=i[t];return!t||n&&(!_(n)||e.event[n+"Key"])}function pc(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function gc(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function mc(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!SC[n.mainType]&&o&&o.model!==i}function vc(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function yc(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),xc(e,i)}}}))}function xc(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function _c(t,e){var i=new Zw;this.uid=No("ec_map_draw"),this._controller=new ac(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new Zw),i.add(this._backgroundGroup=new Zw)}function wc(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function bc(t,e){var i={};return d(t,function(t){t.each(t.mapDimension("value"),function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function Oc(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){Vc(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=Gc(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Ec(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Rc(t){return arguments.length?t:Uc}function zc(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Bc(t,e){return la(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Vc(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function Gc(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Fc(s),a=Wc(a),s&&a;){o=Fc(o),r=Wc(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);d>0&&(Zc(Hc(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Fc(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Wc(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}return i}function Fc(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Wc(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Hc(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Zc(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Uc(t,e){return t.parentNode===e.parentNode?1:2}function Xc(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function jc(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function Yc(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=jc(l,l.getModel(),a),u=t.tree.root,h=l.parentNode===u?l:l.parentNode||l,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=l.getLayout();s?(i=new mu(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),bo(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===l.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.xx.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var S=i.__edge;S||(S=i.__edge=new lM({shape:Kc(a,f,f),style:r({opacity:0,strokeNoScale:!0},a.lineStyle)})),bo(S,{shape:Kc(a,d,p),style:{opacity:1}},o),n.add(S)}}function qc(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=jc(s,s.getModel(),a),u=s.parentNode===l?s:s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;bo(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var h=i.__edge;h&&bo(h,{shape:Kc(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function Kc(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=zc(s,u),f=zc(s,u+(h-u)*t.curvature),p=zc(l,h+(u-h)*t.curvature),g=zc(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function $c(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function Qc(t,e){var i=Bc(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=Rc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=Rc());var s=t.getData().tree.root,l=s.children[0];if(l){Nc(s),$c(l,Oc,r),s.hierNode.modifier=-l.hierNode.prelim,Jc(l,Ec);var u=l,h=l,c=l;Jc(l,function(t){var e=t.getLayout().x;eh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Jc(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=zc(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Jc(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Jc(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function td(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function ed(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function id(t,e){return l(ed(t),e)>=0}function nd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function od(t){var e=0;d(t.children,function(t){od(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function ad(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new Lo(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function rd(t){this.group=new Zw,t.add(this.group)}function sd(t,e,i,n,o,a){var r=[[o?t:t-DC,e],[t+i,e],[t+i,e+n],[o?t:t-DC,e+n]];return!a&&r.splice(2,0,[t+i+DC,e+n/2]),!o&&r.push([t,e+n/2]),r}function ld(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&nd(i,e)}}function ud(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function pd(t,e){var i=t.visual,n=[];w(i)?ZC(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),bd(t,n)}function gd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:_d([0,1])}}function md(t){var e=this.option.visual;return e[Math.round(Eo(t,[0,1],[0,e.length-1],!0))]||{}}function vd(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function yd(t){var e=this.option.visual;return e[this.option.loop&&t!==XC?t%e.length:t]}function xd(){return this.option.visual[0]}function _d(t){return{linear:function(e){return Eo(e,t,this.option.visual,!0)},category:yd,piecewise:function(e,i){var n=wd.call(this,i);return null==n&&(n=Eo(e,t,this.option.visual,!0)),n},fixed:xd}}function wd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[jC.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function bd(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return zt(t)})),e}function Sd(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&Md(t,kd(r,h,t,e,g,a),i,n,o,a)})}else l=Td(h),t.setVisual("color",l)}}function Id(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function Td(t){var e=Dd(t,"color");if(e){var i=Dd(t,"colorAlpha"),n=Dd(t,"colorSaturation");return n&&(e=Zt(e,null,null,n)),i&&(e=Ut(e,i)),e}}function Ad(t,e){return null!=e?Zt(e,null,null,t):null}function Dd(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function Cd(t,e,i,n,o,a){if(a&&a.length){var r=Ld(e,"color")||null!=o.color&&"none"!==o.color&&(Ld(e,"colorAlpha")||Ld(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new jC(c);return d.__drColorMappingBy=h,d}}}function Ld(t,e){var i=t.get(e);return KC(i)&&i.length?{name:e,range:i}:null}function kd(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?n:"id"===u?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}function Pd(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(nL),l=f.get(oL)/2,u=Wd(f),h=Math.max(s,u),c=s-l,d=h-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var p=(o=QC(o-2*c,0))*(a=QC(a-c-d,0)),g=Nd(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=tL(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_=0;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*es[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function zd(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,u=e*e*i;return l?QC(u*o/l,l/(u*a)):1/0}function Bd(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;ckM&&(u=kM),a=s}u=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function rf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function sf(t,e,i){var n=t.getGraphicEl(),o=rf(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function lf(t,e){var i=rf(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function uf(t){return t instanceof Array||(t=[t,t]),t}function hf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),cf(i)}}function cf(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=F(t.node1.getLayout()),n=F(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function df(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([h*Math.cos(a)+l,h*Math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:u}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=F(t.node1.getLayout()),o=F(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setLayout([n,o,e])})}}function ff(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function Mf(t,e){return Math.min(e[1],Math.max(e[0],t))}function If(t,e,i){this._axesMap=R(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Tf(t,e){return zL(BL(t,e[0]),e[1])}function Af(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Df(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return tJL}function Hf(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Zf(t,e,i,n){var o=new Zw;return o.add(new aM({name:"main",style:Yf(i),silent:!0,draggable:!0,cursor:"move",drift:UL(t,e,o,"nswe"),ondragend:UL(Ff,e,{isEnd:!0})})),XL(n,function(i){o.add(new aM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:UL(t,e,o,i),ondragend:UL(Ff,e,{isEnd:!0})}))}),o}function Uf(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=qL(o,QL),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;jf(t,e,"main",r,s,p,g),n.transformable&&(jf(t,e,"w",l,u,a,v),jf(t,e,"e",d,u,a,v),jf(t,e,"n",l,u,m,a),jf(t,e,"s",l,f,m,a),jf(t,e,"nw",l,u,a,a),jf(t,e,"ne",d,u,a,a),jf(t,e,"sw",l,f,a,a),jf(t,e,"se",d,f,a,a))}function Xf(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(Yf(i)),o.attr({silent:!n,cursor:n?"move":"default"}),XL(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=$f(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?ik[a]+"-resize":null})})}function jf(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(ip(ep(t,e,[[n,o],[n+a,o+r]])))}function Yf(t){return r({strokeNoScale:!0},t.brushStyle)}function qf(t,e,i,n){var o=[YL(t,i),YL(e,n)],a=[qL(t,i),qL(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Kf(t){return Mo(t.group)}function $f(t,e){if(e.length>1)return("e"===(n=[$f(t,(e=e.split(""))[0]),$f(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=To({w:"left",e:"right",n:"top",s:"bottom"}[e],Kf(t));return i[n]}function Jf(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=tp(i,a,r);XL(o.split(""),function(t){var e=ek[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(qf(u[0][0],u[1][0],u[0][1],u[1][1])),Rf(i,n),Ff(i,{isEnd:!1})}function Qf(t,e,i,n,o){var a=e.__brushOption.range,r=tp(t,i,n);XL(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Rf(t,e),Ff(t,{isEnd:!1})}function tp(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function ep(t,e,n){var o=Vf(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function ip(t){var e=YL(t[0][0],t[1][0]),i=YL(t[0][1],t[1][1]);return{x:e,y:i,width:qL(t[0][0],t[1][0])-e,height:qL(t[0][1],t[1][1])-i}}function np(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Bf(t,e,i);if(!t._dragging)for(var r=0;r=i.length)return e;for(var o=-1,a=e.length,r=i[n++],s={},l={};++o=i.length)return t;var a=[],r=n[o++];return d(t,function(t,i){a.push({key:i,values:e(t,o)})}),r?a.sort(function(t,e){return r(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortKeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}function kp(t,e){return la(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Pp(t,e,i,n,o,a,r,s){Op(t,e,i,o,a,s),zp(t,e,a,o,n,r,s),Yp(t,s)}function Np(t){d(t,function(t){var e=Xp(t.outEdges,Up),i=Xp(t.inEdges,Up),n=Math.max(e,i);t.setLayout({value:n},!0)})}function Op(t,e,i,n,o,a){for(var r=[],s=[],l=[],u=[],h=0,c=0;c0;a--)Fp(s,l*=.99,r),Gp(s,o,i,n,r),jp(s,l,r),Gp(s,o,i,n,r)}function Bp(t){return"vertical"===t?function(t){return t.getLayout().y}:function(t){return t.getLayout().x}}function Vp(t,e,i,n,o,a,r){var s=[];d(e,function(t){var e=t.length,i=0,l=0;d(t,function(t){i+=t.getLayout().value}),l="vertical"===r?(o-(e-1)*a)/i:(n-(e-1)*a)/i,s.push(l)}),s.sort(function(t,e){return t-e});var l=s[0];d(e,function(t){d(t,function(t,e){var i=t.getLayout().value*l;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),d(i,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})}function Gp(t,e,i,n,o){d(t,function(t){var a,r,s,l=0,u=t.length;if("vertical"===o){var h;for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),s=0;s0&&(h=a.getLayout().x+r,a.setLayout({x:h},!0)),l=a.getLayout().x+a.getLayout().dx+e;if((r=l-e-n)>0)for(h=a.getLayout().x-r,a.setLayout({x:h},!0),l=h,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().x+a.getLayout().dx+e-l)>0&&(h=a.getLayout().x-r,a.setLayout({x:h},!0)),l=a.getLayout().x}else{var c;for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),s=0;s0&&(c=a.getLayout().y+r,a.setLayout({y:c},!0)),l=a.getLayout().y+a.getLayout().dy+e;if((r=l-e-i)>0)for(c=a.getLayout().y-r,a.setLayout({y:c},!0),l=c,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().y+a.getLayout().dy+e-l)>0&&(c=a.getLayout().y-r,a.setLayout({y:c},!0)),l=a.getLayout().y}})}function Fp(t,e,i){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var n=Xp(t.outEdges,Wp,i)/Xp(t.outEdges,Up,i);if("vertical"===i){var o=t.getLayout().x+(n-Zp(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-Zp(t,i))*e;t.setLayout({y:a},!0)}}})})}function Wp(t,e){return Zp(t.node2,e)*t.getValue()}function Hp(t,e){return Zp(t.node1,e)*t.getValue()}function Zp(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Up(t){return t.getValue()}function Xp(t,e,i){for(var n=0,o=t.length,a=-1;++a0?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(bk).getItemStyle(Mk);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function rg(t,e,i,n,o){return i>n?-1:i0?t.get(o,e-1)<=n?1:-1:1}function sg(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Ro(A(t.get("barMaxWidth"),o),o),r=Ro(A(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Ro(s,o):Math.max(Math.min(o/2,a),r)}function lg(t){return y(t)||(t=[+t,+t]),t}function ug(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function hg(t,e){Zw.call(this);var i=new mu(t,e),n=new Zw;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function cg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function dg(t,e,i){Zw.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function fg(t,e,i){Zw.call(this),this._createPolyline(t,e,i)}function pg(t,e,i){dg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function gg(){this.group=new Zw}function mg(t){return t instanceof Array||(t=[t,t]),t}function vg(){var t=Y_();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function yg(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function _g(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function wg(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};bg(i,a,o,n,c),Mg(t,e,o,a,r,c.boundingLength,c.pxSign,u,n,c),Ig(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Ro(f[0],d[0]),Ro(f[1],d[1])]),Tg(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function bg(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[Sg(l,s[0])-u,Sg(l,s[1])-u];c[1]0?1:a<0?-1:0}function Sg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Mg(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Ro(f[c.index],d),f[h.index]=Ro(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}function Ig(t,e,i,n,o){var a=t.get(jk)||0;a&&(qk.attr({scale:e.slice(),rotation:i}),qk.updateTransform(),a/=qk.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Tg(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=T(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Ro(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Ko(n),M=S?n:Hg((y+b)/w);w=m+2*(x=(y-M*m)/2/(_?M:M-1)),b=_?0:2*x,S||"fixed"===n||(M=h?Hg((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var I=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?I:"end"===s?u-I:u/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[f.index]=i[f.xy],D[p.index]=i[p.xy];var C=d.barRectShape=a({},i);C[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+I)),C[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[p.xy]=0,L[p.wh]=i[p.wh]}function Ag(t){var e=t.symbolPatternSize,i=Xl(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Dg(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,u=e.valueDim,h=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(Gg(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c0)],d=t.__pictorialBarRect;Th(d.style,h,a,n,e.seriesModel,o,c),uo(d,h)}function Hg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function Zg(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Ug(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.z2=1,o}function Xg(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=jg(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,o),i.showTooltip(t,s,u)}else i.showPointer(t,e)}function jg(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return iP(e.seriesModels,function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p=0&&s<0)&&(r=p,s=f,o=u,a.length=0),iP(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function Yg(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function qg(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=bh(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function Kg(t,e,i){var n=i.axesInfo=[];iP(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function $g(t,e,i,n){if(!em(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function Jg(t,e,i){var n=i.getZr(),o=oP(n).axisPointerLastHighlights||{},a=oP(n).axisPointerLastHighlights={};iP(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&iP(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function Qg(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function tm(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function em(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function im(t,e,i){if(!z_.node){var n=e.getZr();aP(n).records||(aP(n).records={}),nm(n,e),(aP(n).records[t]||(aP(n).records[t]={})).handler=i}}function nm(t,e){function i(i,n){t.on(i,function(i){var o=sm(e);rP(aP(t).records,function(t){t&&n(t,i,o.dispatchAction)}),om(o.pendings,e)})}aP(t).initialized||(aP(t).initialized=!0,i("click",v(rm,"click")),i("mousemove",v(rm,"mousemove")),i("globalout",am))}function om(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function am(t,e,i){t.handler("leave",null,i)}function rm(t,e,i,n){e.handler(t,i,n)}function sm(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function lm(t,e){if(!z_.node){var i=e.getZr();(aP(i).records||{})[t]&&(aP(i).records[t]=null)}}function um(){}function hm(t,e,i,n){cm(lP(i).lastProp,n)||(lP(i).lastProp=n,e?bo(i,n,t):(i.stopAnimation(),i.attr(n)))}function cm(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&cm(t[n],e)}),!!i}return t===e}function dm(t,e){t[e.get("label.show")?"show":"hide"]()}function fm(t){return{position:t.position.slice(),rotation:t.rotation||0}}function pm(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function gm(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function mm(t,e,i,n,o){var a=ym(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=OM(r.get("padding")||0),l=r.getFont(),u=De(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),vm(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function vm(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function ym(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Wl(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function xm(t,e,i){var n=mt();return wt(n,n,i.rotation),_t(n,n,i.position),Io([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function _m(t,e,i,n,o,a){var r=ID.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),mm(e,n,o,a,{position:xm(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function wm(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function bm(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Sm(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function Mm(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Im(t){return"x"===t.dim?0:1}function Tm(t){return t.isHorizontal()?0:1}function Am(t,e){var i=t.getRect();return[i[fP[e]],i[fP[e]]+i[pP[e]]]}function Dm(t,e,i){var n=new aM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return So(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Cm(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=Lm(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;ga&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return r.y0=o,r.max=a,r}function km(t){var e=0;d(t.children,function(t){km(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Pm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}Zw.call(this);var a=new QS({z2:xP});a.seriesIndex=e.seriesIndex;var r=new qS({z2:_P,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Nm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Om(t)%r]}function Om(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Em(t,e,i){return i!==yP.NONE&&(i===yP.SELF?t===e:i===yP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Rm(t,e){var i=t.children||[];t.children=zm(i,e),i.length&&d(t.children,function(t){Rm(t,e)})}function zm(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Bm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function Vm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Gm(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function Fm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Wm(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=tv(n);(e=Wn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new hi({})).__customImagePath=t.style.image:"text"===i?(e=new qS({})).__customText=t.style.text:e=new(0,bM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function Hm(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Zm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Zm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),So(t,{style:{opacity:c}},o,e)}r?t.attr(l):bo(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(no(t,f),t.__cusHasEmphStl=!p),s&&ho(t,!p)}function Zm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Um(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(AP),f=c.getModel(DP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():LP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(IP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),fo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),gu(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(TP).getItemStyle();return fo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),gu(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Tl(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return _o(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:Xm(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function Xm(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function jm(t,e,i,n,o,a){return(t=Ym(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function Ym(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&ev(u)&&tv(u)!==t.__customPathData||"image"===l&&iv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&iv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Wm(i)),Hm(t,e,i,n,a,c,r),"group"===l&&qm(t,e,i,n,a),o.add(t),t}}function qm(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)Km({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;hn?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function Tv(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Av(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function Dv(t){return"center"===t||"middle"===t}function Cv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Lv(t){return t.dim}function kv(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Lv(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Lv(o)]=s;var u=Cv(t);l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=Ro(t.get("barWidth"),r),c=Ro(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");h&&!l[u].width&&(h=Math.min(s.remainedWidth,h),l[u].width=h,s.remainedWidth-=h),c&&(l[u].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Ro(t.categoryGap,o),r=Ro(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(i,function(t,e){var i=t.maxWidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function Vv(t){return t.getRadiusAxis().inverse?0:1}function Gv(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function Fv(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Wv(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=mt();wt(d,d,s),_t(d,d,[n.cx,n.cy]),l=Io([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=ID.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function Hv(t,e){e.update="updateView",Ps(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Zv(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function Uv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Xv(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return rN(e,function(e){var r=a[e]=o();rN(t[e],function(t,o){if(jC.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new jC(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new jC(a))}})}),a}function jv(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&Uv(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&Uv(e[n])?t[n]=i(e[n]):delete t[n]})}function Yv(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g1)return!1;var h=ey(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function ty(t){return t<=1e-6&&t>=-1e-6}function ey(t,e,i,n){return t*n-e*i}function iy(t,e,i){var n=this._targetInfoList=[],o={},a=oy(e,t);lN(pN,function(t,e){(!i||!i.include||uN(i.include,e)>=0)&&t(a,n,o)})}function ny(t){return t[0]>t[1]&&t.reverse(),t}function oy(t,e){return Vi(t,e,{includeMainTypes:dN})}function ay(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=ny(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function ry(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function sy(t,e){var i=ly(t),n=ly(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function ly(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function uy(t,e,i,n,o){if(o){var a=t.getZr();a[wN]||(a[_N]||(a[_N]=hy),Lr(a,_N,i,e)(t,n))}}function hy(t,e){if(!t.isDisposed()){var i=t.getZr();i[wN]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[wN]=!1}}function cy(t,e,i,n){for(var o=0,a=e.length;o=0}function Iy(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Ty(t,e,i){var n=[1/0,-1/0];return NN(i,function(t){var i=t.getData();i&&NN(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Dy(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Fo(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function Cy(t){var e=t._minMaxSpan={},i=t._dataZoomModel;NN(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=Eo(a[0]+o,a,[0,100],!0)}})}function Ly(t){var e={};return RN(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function ky(t,e){var i=t._rangePropMode,n=t.get("rangeMode");RN([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Py(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Ny(t){return"vertical"===t?"ns-resize":"ew-resize"}function Oy(t,e){var i=zy(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),Vy(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=By(t,a),a.dispatchAction=v(Gy,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=Fy(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Lr(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Ey(t,e){var i=zy(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Vy(i)}function Ry(t){return t.type+"\0_"+t.id}function zy(t){var e=t.getZr();return e[qN]||(e[qN]={})}function By(t,e){var i=new ac(t.getZr());return d(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];d(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function Vy(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Gy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Fy(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return d(t,function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+a]>i["type_"+e]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Wy(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return EL(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function Hy(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Zy(t,e,i,n){for(var o=e.targetVisuals[n],a=jC.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].toFixed(h)),r}function ax(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!nx(e)&&!y(e.coord)&&o){var a=o.dimensions,r=rx(e,n,o,t);if((e=i(e)).type&&LO[e.type]&&r.baseAxis&&r.valueAxis){var s=DO(a,r.baseAxis.dim),l=DO(a,r.valueAxis.dim);e.coord=LO[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)LO[u[h]]&&(u[h]=hx(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function rx(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(sx(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function sx(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o=0)return!0}function Gx(t){for(var e=t.split(/\n+/g),i=[],n=f(Bx(e.shift()).split(KO),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function Xx(t){var e=qx(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return $O(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function jx(t){t[JO]=null}function Yx(t){return qx(t).length}function qx(t){var e=t[JO];return e||(e=t[JO]=[{}]),e}function Kx(t,e,i){(this._brushController=new Cf(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function $x(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function Jx(t,e){t.setIconStatus("back",Yx(e)>1?"emphasis":"normal")}function Qx(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new iy($x(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function t_(t){this.model=t}function e_(t){return aE(t)}function i_(){if(!lE&&uE){lE=!0;var t=uE.styleSheets;t.length<31?uE.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function n_(t){return parseInt(t,10)}function o_(t,e){i_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function a_(t){return function(){Bw('In IE8.0 VML mode painter not support method "'+t+'"')}}function r_(t){return document.createElementNS(HE,t)}function s_(t){return jE(1e4*t)/1e4}function l_(t){return t-QE}function u_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==XE}function h_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==XE}function c_(t,e){e&&d_(t,"transform","matrix("+UE.call(e,",")+")")}function d_(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&("string"==typeof i&&i.indexOf("NaN")>-1&&console.log(i),t.setAttribute(e,i))}function f_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function p_(t,e,i,n){if(u_(e,i)){var o=i?e.textFill:e.fill;o="transparent"===o?XE:o,"none"!==t.getAttribute("clip-path")&&o===XE&&(o="rgba(0, 0, 0, 0.002)"),d_(t,"fill",o),d_(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else d_(t,"fill",XE);if(h_(e,i)){var a=i?e.textStroke:e.stroke;d_(t,"stroke",a="transparent"===a?XE:a),d_(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),d_(t,"paint-order",i?"stroke":"fill"),d_(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(d_(t,"stroke-dasharray",e.lineDash.join(",")),d_(t,"stroke-dashoffset",jE(e.lineDashOffset||0))):d_(t,"stroke-dasharray",""),e.lineCap&&d_(t,"stroke-linecap",e.lineCap),e.lineJoin&&d_(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&d_(t,"stroke-miterlimit",e.miterLimit)}else d_(t,"stroke",XE)}function g_(t){for(var e=[],i=t.data,n=t.len(),o=0;o=$E||!l_(g)&&(d>-KE&&d<0||d>KE)==!!p;var y=s_(s+u*qE(c)),x=s_(l+h*YE(c));m&&(d=p?$E-1e-4:1e-4-$E,v=!0,9===o&&e.push("M",y,x));var _=s_(s+u*qE(c+d)),w=s_(l+h*YE(c+d));e.push("A",s_(u),s_(h),jE(f*JE),+v,+p,_,w);break;case ZE.Z:a="Z";break;case ZE.R:var _=s_(i[o++]),w=s_(i[o++]),b=s_(i[o++]),S=s_(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),B_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},V_={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},G_=Object.prototype.toString,F_=Array.prototype,W_=F_.forEach,H_=F_.filter,Z_=F_.slice,U_=F_.map,X_=F_.reduce,j_={},Y_=function(){return j_.createCanvas()};j_.createCanvas=function(){return document.createElement("canvas")};var q_,K_="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var $_=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:Y_,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(n=ow.call(n,1));for(var a=e.length,r=0;r4&&(n=ow.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=gt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==uw)){o.target=n[a];break}}return o}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){cw.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||ew(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(cw,aw),h(cw,it);var dw="undefined"==typeof Float32Array?Array:Float32Array,fw=(Object.freeze||Object)({create:mt,identity:vt,copy:yt,mul:xt,translate:_t,rotate:wt,scale:bt,invert:St,clone:Mt}),pw=vt,gw=5e-5,mw=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},vw=mw.prototype;vw.transform=null,vw.needLocalTransform=function(){return It(this.rotation)||It(this.position[0])||It(this.position[1])||It(this.scale[0]-1)||It(this.scale[1]-1)};var yw=[];vw.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||mt(),i?this.getLocalTransform(n):pw(n),e&&(i?xt(n,t.transform,n):yt(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(yw);var a=yw[0]<0?-1:1,r=yw[1]<0?-1:1,s=((yw[0]-a)*o+a)/yw[0]||0,l=((yw[1]-r)*o+r)/yw[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||mt(),St(this.invTransform,n)}else n&&pw(n)},vw.getLocalTransform=function(t){return mw.getLocalTransform(this,t)},vw.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},vw.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var xw=[],_w=mt();vw.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;It(e-1)&&(e=Math.sqrt(e)),It(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},vw.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(xt(xw,t.invTransform,e),e=xw);var i=this.origin;i&&(i[0]||i[1])&&(_w[4]=i[0],_w[5]=i[1],xt(xw,e,_w),xw[4]-=i[0],xw[5]-=i[1],e=xw),this.setLocalTransform(e)}},vw.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},vw.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},vw.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},mw.getLocalTransform=function(t,e){pw(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),bt(e,e,n),o&&wt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var ww={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-ww.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*ww.bounceIn(2*t):.5*ww.bounceOut(2*t-1)+.5}};Tt.prototype={constructor:Tt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?ww[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var bw=function(){this.head=null,this.tail=null,this._len=0},Sw=bw.prototype;Sw.insert=function(t){var e=new Mw(t);return this.insertEntry(e),e},Sw.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Sw.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Sw.len=function(){return this._len},Sw.clear=function(){this.head=this.tail=null,this._len=0};var Mw=function(t){this.value=t,this.next,this.prev},Iw=function(t){this._list=new bw,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Tw=Iw.prototype;Tw.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Mw(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Tw.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Tw.clear=function(){this._list.clear(),this._map={}};var Aw={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},Dw=new Iw(20),Cw=null,Lw=Wt,kw=Ht,Pw=(Object.freeze||Object)({parse:zt,lift:Gt,toHex:Ft,fastLerp:Wt,fastMapToColor:Lw,lerp:Ht,mapToColor:kw,modifyHSL:Zt,modifyAlpha:Ut,stringify:Xt}),Nw=Array.prototype.slice,Ow=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||jt,this._setter=n||Yt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Ow.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ie(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new ue(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},ue.create=function(t){return new ue(t.x,t.y,t.width,t.height)};var Zw=function(t){t=t||{},Gw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Zw.prototype={constructor:Zw,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Zw&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Zw&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof Zw&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:ye};var Yw={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},qw=function(t,e,i){return Yw.hasOwnProperty(e)?i*=t.dpr:i},Kw=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],$w=function(t){this.extendFrom(t,!1)};$w.prototype={constructor:$w,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,o=i&&i.style,a=!o,r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?_e:xe)(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}s.__drawIndex=m,s.__drawIndex0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Bw("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),a.__builtin__||Bw("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&n&&n.length>1){var a=vi(n)/vi(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=yi(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},bb=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Sb=["touchstart","touchend","touchmove"],Mb={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Ib=f(bb,function(t){var e=t.replace("mouse","pointer");return Mb[e]?e:t}),Tb={mousemove:function(t){t=lt(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=lt(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=lt(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,_i(this,t,"start"),Tb.mousemove.call(this,t),Tb.mousedown.call(this,t),wi(this)},touchmove:function(t){(t=lt(this.dom,t)).zrByTouch=!0,_i(this,t,"change"),Tb.mousemove.call(this,t),wi(this)},touchend:function(t){(t=lt(this.dom,t)).zrByTouch=!0,_i(this,t,"end"),Tb.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Tb.click.call(this,t),wi(this)},pointerdown:function(t){Tb.mousedown.call(this,t)},pointermove:function(t){bi(t)||Tb.mousemove.call(this,t)},pointerup:function(t){Tb.mouseup.call(this,t)},pointerout:function(t){bi(t)||Tb.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Tb[t]=function(e){e=lt(this.dom,e),this.trigger(t,e)}});var Ab=Mi.prototype;Ab.dispose=function(){for(var t=bb.concat(Sb),e=0;e=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},Hb=Wb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Zb={getLineStyle:function(t){var e=Hb(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},Ub=Wb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Xb={getAreaStyle:function(t,e){return Ub(this,t,e)}},jb=Math.pow,Yb=Math.sqrt,qb=1e-8,Kb=1e-4,$b=Yb(3),Jb=1/3,Qb=V(),tS=V(),eS=V(),iS=Math.min,nS=Math.max,oS=Math.sin,aS=Math.cos,rS=2*Math.PI,sS=V(),lS=V(),uS=V(),hS=[],cS=[],dS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fS=[],pS=[],gS=[],mS=[],vS=Math.min,yS=Math.max,xS=Math.cos,_S=Math.sin,wS=Math.sqrt,bS=Math.abs,SS="undefined"!=typeof Float32Array,MS=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};MS.prototype={constructor:MS,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=bS(1/Rw/t)||0,this._uy=bS(1/Rw/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(dS.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=bS(t-this._xi)>this._ux||bS(e-this._yi)>this._uy||this._len<5;return this.addData(dS.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(dS.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(dS.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(dS.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=xS(o)*i+t,this._yi=_S(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(dS.R,t,e,i,n),this},closePath:function(){this.addData(dS.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&f<=t||h<0&&f>=t||0==h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&fl||c>0&&pu||s[n%2?"moveTo":"lineTo"](h>=0?vS(f,t):yS(f,t),c>=0?vS(p,e):yS(p,e));h=f-t,c=p-e,this._dashOffset=-wS(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Qi,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=wS(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-wS(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,SS&&(this.data=new Float32Array(t)))},getBoundingRect:function(){fS[0]=fS[1]=gS[0]=gS[1]=Number.MAX_VALUE,pS[0]=pS[1]=mS[0]=mS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||bS(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case dS.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case dS.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case dS.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=xS(v)*g+f,i=_S(v)*m+p),n=xS(M)*g+f,o=_S(M)*m+p;break;case dS.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case dS.Z:t.closePath(),n=e,o=i}}}},MS.CMD=dS;var IS=2*Math.PI,TS=2*Math.PI,AS=MS.CMD,DS=2*Math.PI,CS=1e-4,LS=[-1,-1,-1],kS=[-1,-1],PS=eb.prototype.getCanvasPattern,NS=Math.abs,OS=new MS(!0);kn.prototype={constructor:kn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path||OS,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=PS.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=PS.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new MS},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new MS),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),Ln(a,r/s,t,e)))return!0}if(o.hasFill())return Cn(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ui.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&NS(t[0]-1)>1e-10&&NS(t[3]-1)>1e-10?Math.sqrt(NS(t[0]*t[3]-t[2]*t[1])):1}},kn.extend=function(t){var e=function(e){kn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,kn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(kn,ui);var ES=MS.CMD,RS=[[],[],[]],zS=Math.sqrt,BS=Math.atan2,VS=function(t,e){var i,n,o,a,r,s,l=t.data,u=ES.M,h=ES.C,c=ES.L,d=ES.R,f=ES.A,p=ES.Q;for(o=0,a=0;o=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([zn(s[0],f[0],l[0],u[0],d,p,g),zn(s[1],f[1],l[1],u[1],d,p,g)])}return n},iM=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Co,Group:Zw,Image:hi,Text:qS,Circle:KS,Sector:QS,Ring:tM,Polygon:nM,Polyline:oM,Rect:aM,Line:rM,BezierCurve:lM,Arc:uM,IncrementalDisplayable:Gn,CompoundPath:hM,LinearGradient:dM,RadialGradient:fM,BoundingRect:ue}),SM=["textStyle","color"],MM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(SM):null)},getFont:function(){return _o({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return De(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},IM=Wb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),TM={getItemStyle:function(t,e){var i=IM(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},AM=h,DM=Bi();Lo.prototype={constructor:Lo,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:ko(this.option,this.parsePath(t),!e&&Po(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Po(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:ko(this.option,t=this.parsePath(t));return e=e||(i=Po(this,t))&&i.getModel(t),new Lo(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){DM(this).getParent=t},isAnimationEnabled:function(){if(!z_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Xi(Lo),ji(Lo),AM(Lo,Zb),AM(Lo,Xb),AM(Lo,MM),AM(Lo,TM);var CM=0,LM=1e-4,kM=9007199254740991,PM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,NM=(Object.freeze||Object)({linearMap:Eo,parsePercent:Ro,round:zo,asc:Bo,getPrecision:Vo,getPrecisionSafe:Go,getPixelPrecision:Fo,getPercentWithPrecision:Wo,MAX_SAFE_INTEGER:kM,remRadian:Ho,isRadianAroundZero:Zo,parseDate:Uo,quantity:Xo,nice:Yo,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:qo,isNumeric:Ko}),OM=L,EM=/([&<>"'])/g,RM={"&":"&","<":"<",">":">",'"':""","'":"'"},zM=["a","b","c","d","e","f","g"],BM=function(t,e){return"{"+t+(null==e?"":e)+"}"},VM=Oe,GM=De,FM=(Object.freeze||Object)({addCommas:$o,toCamelCase:Jo,normalizeCssArray:OM,encodeHTML:Qo,formatTpl:ta,formatTplSimple:ea,getTooltipMarker:ia,formatTime:oa,capitalFirst:aa,truncateText:VM,getTextRect:GM}),WM=d,HM=["left","right","top","bottom","width","height"],ZM=[["width","left","right"],["height","top","bottom"]],UM=ra,XM=(v(ra,"vertical"),v(ra,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),jM=Bi(),YM=Lo.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Lo.call(this,t,e,i,n),this.uid=No("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?da(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&ca(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&ca(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=jM(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultOption;o&&e.push(o),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Ki(YM,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Zi(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Zi(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(YM),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originalDeps=e(r),t);s.entryCount=u.length,0===s.entryCount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(YM,function(t){var e=[];return d(YM.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Zi(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(YM,XM);var qM="";"undefined"!=typeof navigator&&(qM=navigator.platform||"");var KM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:qM.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},$M=Bi(),JM={clearColorPalette:function(){$M(this).colorIdx=0,$M(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=$M(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Di(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?pa(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},QM={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),ma(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),ma(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),ma(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),ma(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),ma(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();d(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),ma(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}},tI="original",eI="arrayRows",iI="objectRows",nI="keyedColumns",oI="unknown",aI="typedArray",rI="column",sI="row";va.seriesDataToSource=function(t){return new va({data:t,sourceFormat:S(t)?aI:tI,fromDataset:!1})},ji(va);var lI=Bi(),uI="\0_ec_inner",hI=Lo.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Lo(i),this._optionManager=n},setOption:function(t,e){k(!(uI in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Pa.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&d(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];_a(this),d(t,function(t,o){null!=t&&(YM.hasClass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),YM.topologicalTravel(r,YM.getAllClassMainTypes(),function(i,n){var r=Di(t[i]),s=Pi(o.get(i),r);Ni(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=Oa(i,n,t.exist))});var l=Na(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"Empty component definition"),s){var u=YM.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&Ea(this,o.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(YM.hasClass(i)){for(var n=(e=Di(e)).length-1;n>=0;n--)Ei(e[n])&&e.splice(n,1);t[i]=e}}),delete t[uI],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return Ra(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Ra(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ea(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Ea(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),YM.topologicalTravel(i,YM.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!La(e,t))&&e.restoreData()})})}});h(hI,JM);var cI=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],dI={};Ba.prototype={constructor:Ba,create:function(t,e){var i=[];d(dI,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Ba.register=function(t,e){dI[t]=e},Ba.get=function(t){return dI[t]};var fI=d,pI=i,gI=f,mI=n,vI=/^(min|max)?(.+)$/;Va.prototype={constructor:Va,setOption:function(t,e){t&&d(Di(t.series),function(t){t&&t.data&&S(t.data)&&N(t.data)}),t=pI(t,!0);var i=this._optionBackup,n=Ga.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Za(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=gI(e.timelineOptions,pI),this._mediaList=gI(e.mediaList,pI),this._mediaDefault=pI(e.mediaDefault),this._currentMediaIndices=[],pI(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=pI(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;r===l&&s===u||(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=gr(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||d=i?null:t1&&a>0?e:t}};return s}();kI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},kI.unfinished=function(){return this._progress&&this._dueIndex":"\n",s="richText"===n,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(i){function o(t,i){var o=h.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var c=o.type,d="sub"+a.seriesIndex+"at"+u,p=ia({color:v,type:"subItem",renderMode:n,markerId:d}),g="string"==typeof p?p:p.content,m=(r?g+Qo(o.displayName||"-")+": ":"")+Qo("ordinal"===c?t+"":"time"===c?e?"":oa("yyyy/MM/dd hh:mm:ss",t):$o(t));m&&f.push(m),s&&(l[d]=v,++u)}}var r=p(i,function(t,e,i){var n=h.getDimensionInfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayName},0),f=[];c.length?d(c,function(e){o(hr(h,t,e),e)}):d(i,o);var g=r?s?"\n":"
":"",m=g+f.join(g||", ");return{renderMode:n,content:m,style:l}}(g):o(f?hr(h,t,c[0]):m?g[0]:g)).content,_=a.seriesIndex+"at"+u,b=ia({color:v,type:"item",renderMode:n,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;Oi(this)||(M=""),M=M?Qo(M)+(e?": ":r):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?Qo(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(z_.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=JM.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});h(OI,LI),h(OI,JM);var EI=function(){this.group=new Zw,this.uid=No("viewComponent")};EI.prototype={constructor:EI,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var RI=EI.prototype;RI.updateView=RI.updateLayout=RI.updateVisual=function(t,e,i,n){},Xi(EI),Ki(EI,{registerWhenExtend:!0});var zI=function(){var t=Bi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}},BI=Bi(),VI=zI();Mr.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Tr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Tr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var GI=Mr.prototype;GI.updateView=GI.updateLayout=GI.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Xi(Mr),Ki(Mr,{registerWhenExtend:!0}),Mr.markUpdateMethod=function(t,e){BI(t).updateMethod=e};var FI={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},WI="\0__throttleOriginMethod",HI="\0__throttleRate",ZI="\0__throttleType",UI={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof cM||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},XI={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},jI=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=XI.aria,o=0;o1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:r}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";a=i(a=n(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var c=t.getData();window.data=c,c.count()>l?a+=i(n("data.partialData"),{displayCnt:l}):a+=n("data.allData");for(var d=[],p=0;pi.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},qI.getPipeline=function(t){return this._pipelineMap.get(t)},qI.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},qI.restorePipelines=function(t){var e=this,i=e._pipelineMap=R();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Zr(e,t,t.dataTask)})},qI.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Or(this,n,o,e,i),n.overallReset&&Er(this,n,o,e,i)},this)},qI.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,Zr(this,e,o)},qI.performDataProcessorTasks=function(t,e){Nr(this,this._dataProcessorHandlers,t,e,{block:!0})},qI.performVisualTasks=function(t,e,i){Nr(this,this._visualHandlers,t,e,i)},qI.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},qI.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var KI=qI.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},$I=Wr(0);Pr.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:Ur(t)}),t.uid=No("stageHandler"),e&&(t.visualType=e),t};var JI,QI={},tT={};Xr(QI,hI),Xr(tT,za),QI.eachSeriesByType=QI.eachRawSeriesByType=function(t){JI=t},QI.eachComponent=function(t){"series"===t.mainType&&t.subType&&(JI=t.subType)};var eT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],iT={color:eT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],eT]},nT=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],oT={color:nT,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:nT[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:nT},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};oT.categoryAxis.splitLine.show=!1,YM.extend({type:"dataset",defaultOption:{seriesLayoutBy:rI,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){ya(this)}}),EI.extend({type:"dataset"});var aT=kn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),rT=/[\s,]+/;Yr.prototype.parse=function(t,e){e=e||{};var i=jr(t);if(!i)throw new Error("Illegal svg");var n=new Zw;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),Jr(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=P(o).split(rT);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=is(l,a,r),!e.ignoreViewBox)){var c=n;(n=new Zw).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new aM({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},Yr.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){if(r=lT[i]){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=sT[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Yr.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new qS({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Kr(e,o),Jr(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var sT={g:function(t,e){var i=new Zw;return Kr(e,i),Jr(t,i,this._defs),i},rect:function(t,e){var i=new aM;return Kr(e,i),Jr(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new KS;return Kr(e,i),Jr(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new rM;return Kr(e,i),Jr(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new aT;return Kr(e,i),Jr(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=$r(i));var n=new nM({shape:{points:i||[]}});return Kr(e,n),Jr(t,n,this._defs),n},polyline:function(t,e){var i=new kn;Kr(e,i),Jr(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=$r(n)),new oM({shape:{points:n||[]}})},image:function(t,e){var i=new hi;return Kr(e,i),Jr(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new Zw;return Kr(e,r),Jr(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new Zw;return Kr(e,r),Jr(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=En(t.getAttribute("d")||"");return Kr(e,i),Jr(t,i,this._defs),i}},lT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new dM(e,i,n,o);return qr(t,a),a},radialgradient:function(t){}},uT={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},hT=/url\(\s*#(.*?)\)/,cT=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,dT=/([^\s:;]+)\s*:\s*([^:;]+)/g,fT=R(),pT={registerMap:function(t,e,i){var n;return y(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),d(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,gT[e])(t)}),fT.set(t,n)},retrieveMap:function(t){return fT.get(t)}},gT={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=jr(t.source)}},mT=k,vT=d,yT=x,xT=w,_T=YM.parseClassType,wT={zrender:"4.0.5"},bT=1e3,ST=1e3,MT=3e3,IT={PROCESSOR:{FILTER:bT,STATISTIC:5e3},VISUAL:{LAYOUT:ST,GLOBAL:2e3,CHART:MT,COMPONENT:4e3,BRUSH:5e3}},TT="__flagInMainProcess",AT="__optionUpdated",DT=/^[a-zA-Z0-9_]+$/;as.prototype.on=os("on"),as.prototype.off=os("off"),as.prototype.one=os("one"),h(as,aw);var CT=rs.prototype;CT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[AT]){var e=this[AT].silent;this[TT]=!0,ls(this),LT.update.call(this),this[TT]=!1,this[AT]=!1,ds.call(this,e),fs.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),hs(this,n),t.performVisualTasks(n),xs(this,this._model,0,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},CT.getDom=function(){return this._dom},CT.getZr=function(){return this._zr},CT.setOption=function(t,e,i){var n;if(xT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[TT]=!0,!this._model||e){var o=new Va(this._api),a=this._theme,r=this._model=new hI(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,ET),i?(this[AT]={silent:n},this[TT]=!1):(ls(this),LT.update.call(this),this._zr.flush(),this[AT]=!1,this[TT]=!1,ds.call(this,n),fs.call(this,n))},CT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},CT.getModel=function(){return this._model},CT.getOption=function(){return this._model&&this._model.getOption()},CT.getWidth=function(){return this._zr.getWidth()},CT.getHeight=function(){return this._zr.getHeight()},CT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},CT.getRenderedCanvas=function(t){if(z_.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},CT.getSvgDataUrl=function(){if(z_.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},CT.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;vT(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return vT(n,function(t){t.group.ignore=!1}),a},CT.getConnectedDataURL=function(t){if(z_.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(FT[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(GT,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(i(t)),f=h.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=Y_();p.width=c,p.height=f;var g=Ii(p);return vT(u,function(t){var e=new hi({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},CT.convertToPixel=v(ss,"convertToPixel"),CT.convertFromPixel=v(ss,"convertFromPixel"),CT.containPixel=function(t,e){var i;return t=Vi(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},CT.getVisual=function(t,e){var i=(t=Vi(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},CT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},CT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var LT={prepareAndUpdate:function(t){ls(this),LT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),hs(this,e),o.update(e,i),ms(e),a.performVisualTasks(e,t),vs(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(z_.canvasSupported)n.setBackgroundColor(r);else{var s=zt(r);r=Xt(s,"rgb"),0===s[3]&&(r="transparent")}_s(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=R();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),ms(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),xs(i,e,0,t,a),_s(e,this._api)}},updateView:function(t){var e=this._model;e&&(Mr.markUpdateMethod(t,"updateView"),ms(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),vs(this,this._model,this._api,t),_s(e,this._api))},updateVisual:function(t){LT.update.call(this,t)},updateLayout:function(t){LT.update.call(this,t)}};CT.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[TT]=!0,i&&ls(this),LT.update.call(this),this[TT]=!1,ds.call(this,n),fs.call(this,n)}},CT.showLoading=function(t,e){if(xT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),VT[t]){var i=VT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},CT.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},CT.makeActionFromEvent=function(t){var e=a({},t);return e.type=NT[t.type],e},CT.dispatchAction=function(t,e){xT(e)||(e={silent:!!e}),PT[t.type]&&this._model&&(this[TT]?this._pendingActions.push(t):(cs.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&z_.browser.weChat&&this._throttledZrFlush(),ds.call(this,e.silent),fs.call(this,e.silent)))},CT.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},CT.on=os("on"),CT.off=os("off"),CT.one=os("one");var kT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];CT._initEvents=function(){vT(kT,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=a({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}},this)},this),vT(NT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},CT.isDisposed=function(){return this._disposed},CT.clear=function(){this.setOption({series:[]},!0)},CT.dispose=function(){if(!this._disposed){this._disposed=!0,Fi(this.getDom(),ZT,"");var t=this._api,e=this._model;vT(this._componentsViews,function(i){i.dispose(e,t)}),vT(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete GT[this.id]}},h(rs,aw),Is.prototype={constructor:Is,normalizeQuery:function(t){var e={},i={},n={};if(_(t)){var o=_T(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};d(t,function(t,o){for(var s=!1,l=0;l0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){function n(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var o=this.eventInfo;if(!o)return!0;var a=o.targetEl,r=o.packedEvent,s=o.model,l=o.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return n(u,s,"mainType")&&n(u,s,"subType")&&n(u,s,"index","componentIndex")&&n(u,s,"name")&&n(u,s,"id")&&n(h,r,"name")&&n(h,r,"dataIndex")&&n(h,r,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,r))},afterTrigger:function(){this.eventInfo=null}};var PT={},NT={},OT=[],ET=[],RT=[],zT=[],BT={},VT={},GT={},FT={},WT=new Date-0,HT=new Date-0,ZT="_echarts_instance_",UT=As;Es(2e3,UI),Ls(MI),ks(5e3,function(t){var e=R();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(ir)}),zs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new aM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new uM({shape:{startAngle:-YI/2,endAngle:-YI/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new aM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*YI/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*YI/2}).delay(300).start("circularInOut");var a=new Zw;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),Ps({type:"highlight",event:"highlight",update:"highlight"},B),Ps({type:"downplay",event:"downplay",update:"downplay"},B),Cs("light",iT),Cs("dark",oT);var XT={};Hs.prototype={constructor:Hs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(Zs(t,{},n,"_oldKeyGetter",this),Zs(e,i,o,"_newKeyGetter",this),a=0;a=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;gC[1]&&(C[1]=D)}if(!o.pure){var L=u[b];if(w&&null==L)if(null!=w.name)u[b]=L=w.name;else if(null!=i){var k=r[i],P=a[k][S];if(P){L=P[M];var N=l[k].ordinalMeta;N&&N.categories.length&&(L=N.categories[L])}}var O=null==w?null:w.id;null==O&&null!=L&&(d[L]=d[L]||0,O=L,d[L]>0&&(O+="__ec__"+d[L]),d[L]++),null!=O&&(h[b]=O)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},$s(this)}},iA.count=function(){return this._count},iA.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){n=new e(i);for(o=0;o=0&&e=0&&ea&&(a=s)}return i=[o,a],this._extent[t]=i,i},iA.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},iA.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},iA.getCalculationInfo=function(t){return this._calculationInfo[t]},iA.setCalculationInfo=function(t,e){YT(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},iA.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},iA.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},iA.getRawIndex=Qs,iA.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m=l&&w<=u||isNaN(w))&&(a[r++]=M)}else for(m=0;mt[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return rb[1]&&(b[1]=w)}}}return o},iA.downSample=function(t,e,i,n){for(var o=nl(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Ys(this))(u),f=0,p=0;pu-p&&(s=u-p,r.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=tl,o},iA.getItemModel=function(t){var e=this.hostModel;return new Lo(this.getRawDataItem(t),e,e&&e.ecModel)},iA.diff=function(t){var e=this;return new Hs(t?t.getIndices():[],this.getIndices(),function(e){return el(t,e)},function(t){return el(e,t)})},iA.getVisual=function(t){var e=this._visual;return e&&e[t]},iA.setVisual=function(t,e){if(YT(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},iA.setLayout=function(t,e){if(YT(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},iA.getLayout=function(t){return this._layout[t]},iA.getItemLayout=function(t){return this._itemLayouts[t]},iA.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},iA.clearItemLayouts=function(){this._itemLayouts.length=0},iA.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},iA.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,YT(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},iA.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var nA=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};iA.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(nA,e)),this._graphicEls[t]=e},iA.getItemGraphicEl=function(t){return this._graphicEls[t]},iA.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},iA.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new eA(e,this.hostModel)}if(t._storage=this._storage,Ks(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?tl:Qs,t},iA.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},iA.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],iA.CHANGABLE_METHODS=["filterSelf","selectRange"];var oA=function(t,e){return e=e||{},rl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};gl.prototype.parse=function(t){return t},gl.prototype.getSetting=function(t){return this._setting[t]},gl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},gl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},gl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},gl.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},gl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},gl.prototype.getExtent=function(){return this._extent.slice()},gl.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},gl.prototype.isBlank=function(){return this._isBlank},gl.prototype.setBlank=function(t){this._isBlank=t},gl.prototype.getLabel=null,Xi(gl),Ki(gl,{registerWhenExtend:!0}),ml.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,yl);return new ml({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var aA=ml.prototype;aA.getOrdinal=function(t){return vl(this).get(t)},aA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=vl(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var rA=gl.prototype,sA=gl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new ml({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),rA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return rA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(rA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:B,niceExtent:B});sA.create=function(){return new sA};var lA=zo,uA=zo,hA=gl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),hA.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=_l(t)},getTicks:function(){return Sl(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Go(t)||0:"auto"===i&&(i=this._intervalPrecision),t=uA(t,i,!0),$o(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=xl(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=uA(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=uA(Math.ceil(e[1]/o)*o))}});hA.create=function(){return new hA};var cA="__ec_stack_",dA="undefined"!=typeof Float32Array?Float32Array:Array,fA={seriesType:"bar",plan:zI(),reset:function(t){if(Pl(t)&&Nl(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=Ll(Dl([t]),n,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var n,h=new dA(2*t.count),c=[],d=[],f=0;null!=(n=t.next());)d[l]=e.get(a,n),d[1-l]=e.get(r,n),c=i.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:Ol(0,o),valueAxisHorizontal:s})}}}}},pA=hA.prototype,gA=Math.ceil,mA=Math.floor,vA=function(t,e,i,n){for(;i>>1;t[o][1]i&&(a=i);var r=xA.length,s=vA(xA,a,0,r),l=xA[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Yo(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(gA((n[0]-h)/u)*u+h),Math.round(mA((n[1]-h)/u)*u+h)];bl(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Uo(t)}});d(["contain","normalize"],function(t){yA.prototype[t]=function(e){return pA[t].call(this,this.parse(e))}});var xA=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];yA.create=function(t){return new yA({useUTC:t.ecModel.get("useUTC")})};var _A=gl.prototype,wA=hA.prototype,bA=Go,SA=zo,MA=Math.floor,IA=Math.ceil,TA=Math.pow,AA=Math.log,DA=gl.extend({type:"log",base:10,$constructor:function(){gl.apply(this,arguments),this._originalScale=new hA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(wA.getTicks.call(this),function(n){var o=zo(TA(this.base,n));return o=n===e[0]&&t.__fixMin?El(o,i[0]):o,o=n===e[1]&&t.__fixMax?El(o,i[1]):o},this)},getLabel:wA.getLabel,scale:function(t){return t=_A.scale.call(this,t),TA(this.base,t)},setExtent:function(t,e){var i=this.base;t=AA(t)/AA(i),e=AA(e)/AA(i),wA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=_A.getExtent.call(this);e[0]=TA(t,e[0]),e[1]=TA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=El(e[0],n[0])),i.__fixMax&&(e[1]=El(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=AA(t[0])/AA(e),t[1]=AA(t[1])/AA(e),_A.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=Xo(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[zo(IA(e[0]/n)*n),zo(MA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){wA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){DA.prototype[t]=function(e){return e=AA(e)/AA(this.base),_A[t].call(this,e)}}),DA.create=function(){return new DA};var CA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},LA=Fn({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),kA=Fn({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),PA=Fn({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),NA=Fn({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),OA={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},EA={};d({line:rM,rect:aM,roundRect:aM,square:aM,circle:KS,diamond:kA,pin:PA,arrow:NA,triangle:LA},function(t,e){EA[e]=new t});var RA=Fn({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=EA[n];"none"!==e.symbolType&&(o||(o=EA[n="rect"]),OA[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),zA={isDimensionStacked:hl,enableDataStack:ul,getStackedDimension:cl},BA=(Object.freeze||Object)({createList:function(t){return dl(t.getSource(),t)},getLayoutRect:la,dataStack:zA,createScale:function(t,e){var i=e;Lo.isInstance(e)||h(i=new Lo(e),CA);var n=Vl(i);return n.setExtent(t[0],t[1]),Bl(n,i),n},mixinAxisModelCommonMethods:function(t){h(t,CA)},completeDimensions:rl,createDimensions:oA,createSymbol:Xl}),VA=1e-8;ql.prototype={constructor:ql,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new ql(e.name,o,e.cp);return a.properties=e,a})},FA=Bi(),WA=[0,1],HA=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};HA.prototype={constructor:HA,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&fu(i=i.slice(),n.count()),Eo(t,WA,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&fu(i=i.slice(),n.count());var o=Eo(t,i,WA,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=Ql(this,e),n=f(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return pu(this,n,i.tickCategoryInterval,o,t.clamp),n},getViewLabels:function(){return Jl(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return lu(this)}};var ZA=GA,UA={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){UA[t]=$_[t]});var XA={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){XA[t]=bM[t]}),OI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return dl(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var jA=mu.prototype,YA=mu.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};jA._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Xl(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:vu(n)}),a.drift=yu,this._symbolType=t,this.add(a)},jA.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},jA.getSymbolPath=function(){return this.childAt(0)},jA.getScale=function(){return this.childAt(0).scale},jA.highlight=function(){this.childAt(0).trigger("emphasis")},jA.downplay=function(){this.childAt(0).trigger("normal")},jA.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},jA.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},jA.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=YA(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,bo(l,{scale:vu(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),So(l,h,o,e)}this._seriesModel=o};var qA=["itemStyle"],KA=["emphasis","itemStyle"],$A=["label"],JA=["emphasis","label"];jA._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,u=n&&n.hoverItemStyle,h=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(qA).getItemStyle(["color"]),u=m.getModel(KA).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel($A),f=m.getModel(JA),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=a({},u);var v=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Ro(c[0],i[0]),Ro(c[1],i[1])]),g&&o.attr("cursor",g),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=x?null==_&&(o.__z2Origin=o.z2,o.z2+=x):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;co(v,u,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):gu(t,e)},isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,uo(o),o.__symbolOriginalScale=vu(i),p&&r.isAnimationEnabled()&&o.on("mouseover",xu).on("mouseout",_u).on("emphasis",wu).on("normal",bu)},jA.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),bo(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(mu,Zw);var QA=Su.prototype;QA.updateData=function(t,e){e=Iu(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=Tu(t);o||i.removeAll(),t.diff(o).add(function(n){var o=t.getItemLayout(n);if(Mu(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);Mu(t,h,s,e)?(u?(u.updateData(t,s,r),bo(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},QA.isPersistent=function(){return!0},QA.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},QA.incrementalPrepareUpdate=function(t){this._seriesScope=Tu(t),this._data=null,this.group.removeAll()},QA.incrementalUpdate=function(t,e,i){i=Iu(i);for(var n=t.start;n0&&ku(i[o-1]);o--);for(;n0&&ku(i[a-1]);a--);for(;o=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new mu(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Mr.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Mr.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new lD({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new uD({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=tD(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Hu(u.current,i,o),c=Hu(u.stackedOnCurrent,i,o),d=Hu(u.next,i,o),f=Hu(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,bo(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),bo(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(gD,HA);var mD={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},vD={};vD.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},mD),vD.valueAxis=n({boundaryGap:[0,0],splitNumber:5},mD),vD.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},vD.valueAxis),vD.logAxis=r({scale:!0,logBase:10},vD.valueAxis);var yD=["value","category","time","log"],xD=function(t,e,i,a){d(yD,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?da(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&ca(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=ml.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},vD[r+"Axis"],a],!0)})}),YM.registerSubTypeDefaulter(t+"Axis",v(i,t))},_D=YM.extend({type:"cartesian2dAxis",axis:null,init:function(){_D.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){_D.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){_D.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(_D.prototype,CA);var wD={offset:0};xD("x",_D,qu,wD),xD("y",_D,qu,wD),YM.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var bD=$u.prototype;bD.type="grid",bD.axisPointerEnabled=!0,bD.getRect=function(){return this._rect},bD.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),d(i.x,function(t){Bl(t.scale,t.model)}),d(i.y,function(t){Bl(t.scale,t.model)});var n={};d(i.x,function(t){Ju(i,"y",t,n)}),d(i.y,function(t){Ju(i,"x",t,n)}),this.resize(this.model,e)},bD.resize=function(t,e,i){function n(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),th(t,e?o.x:o.y)})}var o=la(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Hl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},bD.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},bD.getAxes=function(){return this._axesList.slice()},bD.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;nu[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,uh(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*MD/180);var f;uh(o)?n=AD(t.rotation,null!=d?d:t.rotation,r):(n=oh(t,o,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?VM(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new qS({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:ah(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});fo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=nh(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},AD=ID.innerTextLayout=function(t,e,i){var n,o,a=Ho(e-t);return Zo(a)?(o=i>0?"top":"bottom",n="center"):Zo(a-MD)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},DD=d,CD=v,LD=Vs({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&yh(t),LD.superApply(this,"render",arguments),Sh(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Sh(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),LD.superApply(this,"remove",arguments)},dispose:function(t,e){Mh(this,e),LD.superApply(this,"dispose",arguments)}}),kD=[];LD.registerAxisPointerClass=function(t,e){kD[t]=e},LD.getAxisPointerClass=function(t){return t&&kD[t]};var PD=["axisLine","axisTickLabel","axisName"],ND=["splitArea","splitLine"],OD=LD.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Zw,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Ih(a,t),s=new ID(t,r);d(PD,s.add,s),this._axisGroup.add(s.getGroup()),d(ND,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Ao(o,this._axisGroup,t),OD.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p1){var c;"string"==typeof o?c=dD[o]:"function"==typeof o&&(c=o),c&&t.setData(n.downSample(n.mapDimension(s.dim),1/h,c,fD))}}}}}("line"));var ED=OI.extend({type:"series.__base_bar__",getInitialData:function(t,e){return dl(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});ED.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var RD=Wb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),zD={getBarItemStyle:function(t){var e=RD(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},BD=["itemStyle","barBorderWidth"];a(Lo.prototype,zD),Fs({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;a.diff(r).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=GD[s.type](a,e,i),l=VD[s.type](a,e,i,r,n,u);a.setItemGraphicEl(e,l),o.add(l),Lh(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var h=a.getItemModel(e),c=GD[s.type](a,e,h);l?bo(l,{shape:c},u,e):l=VD[s.type](a,e,h,c,n,u,!0),a.setItemGraphicEl(e,l),o.add(l),Lh(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Dh(t,u,e):e&&Ch(t,u,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),Ph(t,this.group)},_incrementalRenderLarge:function(t,e){Ph(e,this.group,!0)},dispose:B,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Ch(e.dataIndex,t,e):Dh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var VD={cartesian2d:function(t,e,i,n,o,r,s){var l=new aM({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],bM[s?"updateProps":"initProps"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},FD=kn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__valueIdx,a=0;a0&&"scale"!==u){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new QS({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return So(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var XD=function(t,e){d(e,function(e){e.update="updateView",Ps(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},jD=function(t){return{getTargetSeries:function(e){var i={},n=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each(function(t){var e=o.getRawIndex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getItemVisual(a,"color",!0);if(r)i.setItemVisual(e,"color",r);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=a&&o.setItemVisual(a,"color",s)}})}}},YD=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getItemLayout(i),f=r.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),A=I+(_<0?-1:1)*y,D=T;n=A+(_<0?-5:5),u=D,h=[[S,M],[I,T],[A,D]]}c=b?"center":_>0?"left":"right"}var C=p.getFont(),L=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=De(t.getFormattedLabel(i,"normal")||r.getName(i),C,c,"top");l=!!L,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Bh(s,o,a,e,i,n)},qD=2*Math.PI,KD=Math.PI/180,$D=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),QD=Vh.prototype;QD.isPersistent=function(){return!this._incremental},QD.updateData=function(t){this.group.removeAll();var e=new JD({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},QD.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},QD.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Gn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},QD.incrementalUpdate=function(t,e){var i;this._incremental?(i=new JD,this._incremental.addDisplayable(i,!0)):((i=new JD({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},QD._setCommon=function(t,e,i){var n=e.hostModel,o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.symbolProxy=Xl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=e.getVisual("color");r&&t.setColor(r),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},QD.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},QD._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Fs({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=cD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Vh:new Su,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Es(hD("scatter","circle")),Os(cD("scatter")),u(Gh,HA),Fh.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Fh.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},Fh.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},Fh.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(u=i(u));var d=Math.round((n[0]+n[1])/2/u)*u,f=Math.round(a/2);r.setExtent(zo(d-f*u),zo(d+(a-f)*u)),r.setInterval(u)}})},Fh.dimensions=[],Fh.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new Fh(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Ba.register("radar",Fh);var tC=vD.valueAxis,eC=(Bs({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:f.text,nameLocation:"end",nameGap:p,nameTextStyle:m,triggerEvent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new Lo(f,null,this.ecModel),CA);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},tC.axisLine),axisLabel:Wh(tC.axisLabel,!1),axisTick:Wh(tC.axisTick,!1),splitLine:Wh(tC.splitLine,!0),splitArea:Wh(tC.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Vs({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new ID(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(eC,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,w=i.cy,b=0;b"+f(i,function(i,n){var o=e.get(e.mapDimension(i.dim),t);return Qo(i.name+" : "+o)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Fs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=Hh(t.getItemVisual(e,"symbolSize")),a=Xl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l"+Qo(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});h(wC,HD);var bC="\0_ec_interaction_mutex";Ps({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(ac,aw);var SC={axisPointer:1,tooltip:1,brush:1};_c.prototype={constructor:_c,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.scale,c={position:s.position,scale:h};!l.childAt(0)||o?u.attr(c):bo(u,c,t),l.removeAll();var f=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=R();d(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new Zw),n=new hM({shape:{paths:[]}});i.add(n);var o,s=(C=t.getRegionModel(e.name)||t).getModel(f),u=C.getModel(p),c=vc(s),y=vc(u),x=C.getModel(g),_=C.getModel(m);if(r){o=r.indexOfName(e.name);var w=r.getItemVisual(o,"color",!0);w&&(c.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new nM({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new nM({shape:{points:t.interiors[e]}}))}}),n.setStyle(c),n.style.strokeNoScale=!0,n.culling=!0;var b=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get(r.mapDimension("value"),o)),I=r&&r.getItemLayout(o);if(a||M&&(b||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var D=new qS({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});co(D.style,D.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(r)r.setItemGraphicEl(o,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),uo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),yc(this,t,l,i,n),xc(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&xC.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&d(xC.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t){this._mouseDownFlag=!1,pc(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),r.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,gc(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!mc(e,i,t)})}},Fs({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new _c(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(e,i){if(!isNaN(e)){var a=n.getItemLayout(i);if(a&&a.point){var r=a.point,s=a.offset,l=new KS({style:{fill:t.getData().getVisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var u=t.mainSeries.getData(),h=n.getName(i),c=u.indexOfName(h),d=n.getItemModel(i),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=u.getItemGraphicEl(c),m=A(t.getFormattedLabel(i,"normal"),h),v=A(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=fo({},p,{text:p.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){fo(l.style,f,{text:f.get("show")?m:null,textPosition:f.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}o.add(l)}}})}}),Ps({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=wc(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});Os(function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};d(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),function(t,e){var a=n.getName(e),r=i.getRegion(a);if(r&&!isNaN(t)){var s=o[a]||0,l=i.dataToPoint(r.center);o[a]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var a=i.getData();a.each(function(t){var e=a.getName(t),i=a.getItemLayout(t)||{};i.showLabel=!o[e],a.setItemLayout(t,i)}),e[n]=!0}})}),Es(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),ks(IT.PROCESSOR.STATISTIC,function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=bc(f(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;ne&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},kc.prototype={constructor:kc,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return Qo(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Fs({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Zw,this._controller=new ac(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){Xc(o,e)&&Yc(o,e,null,r,t,u)}).update(function(e,i){var n=l.getItemGraphicEl(i);Xc(o,e)?Yc(o,e,n,r,t,u):n&&qc(l,i,n,r,t,u)}).remove(function(e){var i=l.getItemGraphicEl(e);i&&qc(l,e,i,r,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];dn(i,n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=t.coordinateSystem=new Uh;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!mc(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){pc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){gc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Ps({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Ps({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=wc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});Es(hD("tree","circle")),Os(function(t,e){t.eachSeriesByType("tree",function(t){Qc(t,e)})}),OI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};od(i);var n=t.levels||[];n=t.levels=ad(n,e);var o={};return o.levels=n,kc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=$o(y(i)?i[0]:i);return Qo(e.getName(t)+": "+n)},getDataParams:function(t){var e=OI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=nd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=R(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var DC=5;rd.prototype={constructor:rd,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),ua(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=sa(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new nM({shape:{points:sd(a,0,g,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,p)});this.group.add(y),ld(y,t,p),a+=g+8}},remove:function(){this.group.removeAll()}};var CC=m,LC=Zw,kC=aM,PC=d,NC=["label"],OC=["emphasis","label"],EC=["upperLabel"],RC=["emphasis","upperLabel"],zC=10,BC=1,VC=2,GC=Wb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),FC=function(t){var e=GC(t);return e.stroke=e.fill=e.lineWidth=null,e};Fs({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=td(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,u=this._storage,h="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new LC,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,a+1)}o?(e=t,PC(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Hs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,u=[],h=v(hd,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&PC(t,function(t,i){var n=e[i];PC(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){PC(c,function(t){PC(t,function(t){t.parent&&t.parent.remove(t)})}),PC(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=ud();PC(e.willDeleteEls,function(t,e){PC(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),PC(this._storage,function(t,i){PC(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(CC(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new ac(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",CC(this._onPan,this)),e.on("zoom",CC(this._onZoom,this)));var i=new ue(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new ue(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=mt();_t(s,s,[-e,-i]),bt(s,s,[t.scale,t.scale]),_t(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new rd(this.group))).render(t,e,i.node,CC(function(e){"animating"!==this._state&&(id(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var WC=["treemapZoomToNode","treemapRender","treemapMove"],HC=0;HC=0&&t.call(e,i[o],o)},uL.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},uL.breadthFirstTraverse=function(t,e,i,n){if(Zd.isInstance(e)||(e=this._nodesMap[Hd(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};h(Zd,hL("hostGraph","data")),h(Ud,hL("hostGraph","edgeData")),lL.Node=Zd,lL.Edge=Ud,ji(Zd),ji(Ud);var cL=function(t,e,i,n,o){for(var a=new lL(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=dl(t,i);else{var m=Ba.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];l(v,"value")<0&&v.concat(["value"]);var y=oA(t,{coordDimensions:v});(p=new eA(y,i)).initData(t)}var x=new eA(["value"],i);return x.initData(u,s),o&&o(p,x),Sc({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},dL=Gs({type:"series.graph",init:function(t){dL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){dL.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){dL.superApply(this,"mergeDefaultAndTheme",arguments),Ci(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return cL(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new Lo({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new Lo({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Qo(l.join(" > ")),o.value&&(l+=" : "+Qo(o.value)),l}return dL.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new eA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return dL.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),fL=rM.prototype,pL=lM.prototype,gL=Fn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Xd(e)?fL:pL).buildPath(t,e)},pointAt:function(t){return Xd(this.shape)?fL.pointAt.call(this,t):pL.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=Xd(e)?[e.x2-e.x1,e.y2-e.y1]:pL.tangentAt.call(this,t);return q(i,i)}}),mL=["fromSymbol","toSymbol"],vL=$d.prototype;vL.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=U([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},vL._createLine=function(t,e,i){var n=t.hostModel,o=qd(t.getItemLayout(e));o.shape.percent=0,So(o,{shape:{percent:1}},n,e),this.add(o);var a=new qS({name:"label"});this.add(a),d(mL,function(i){var n=Yd(i,t,e);this.add(n),this[jd(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},vL.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};Kd(r.shape,a),bo(o,r,n,e),d(mL,function(i){var n=t.getItemVisual(e,i),o=jd(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=Yd(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},vL._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(mL,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType)))){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?zo(x):x}var _=m?g:null,w=v?A(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(fo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,uo(this)},vL.highlight=function(){this.trigger("emphasis")},vL.downplay=function(){this.trigger("normal")},vL.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},vL.setLinePoints=function(t){var e=this.childOfName("line");Kd(e.shape,t),e.dirty()},u($d,Zw);var yL=Jd.prototype;yL.isPersistent=function(){return!0},yL.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=ef(t);t.diff(n).add(function(i){Qd(e,t,i,o)}).update(function(i,a){tf(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},yL.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},yL.incrementalPrepareUpdate=function(t){this._seriesScope=ef(t),this._lineData=null,this.group.removeAll()},yL.incrementalUpdate=function(t,e){for(var i=t.start;i=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),LL=2*Math.PI,kL=(Mr.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=gf(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%LL,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){var A=Math.cos(w),D=Math.sin(w),O=new rM({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add(function(e){var i=new CL({shape:{angle:a}});So(i,{shape:{angle:Eo(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=u.getItemGraphicEl(i);bo(n,{shape:{angle:Eo(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Ro(a.get("width"),o.r),r:Ro(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Eo(d.get(f,e),h,[0,1],!0))),uo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Ro(l[0],o.r),h=o.cy+Ro(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(Eo(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new qS({silent:!0,style:fo({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Ro(l[0],o.r),h=o.cy+Ro(l[1],o.r),c=Ro(a.get("width"),o.r),d=Ro(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Eo(p,[r,s],[0,1],!0));this.group.add(new qS({silent:!0,style:fo({},a,{x:u,y:h,text:mf(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Gs({type:"series.funnel",init:function(t){kL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return WD(this,["value"])},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=kL.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),PL=vf.prototype,NL=["itemStyle","opacity"];PL.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get(NL);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),So(n,{style:{opacity:l}},o,e)):bo(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),uo(this)},PL._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");bo(i,{shape:{points:r.linePoints||r.linePoints}},o,e),bo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");co(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},u(vf,Zw);Mr.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new vf(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Es(jD("funnel")),Os(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=yf(t,e),r=xf(i,o),s=[Ro(t.get("minSize"),a.width),Ro(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=Eo(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;ma&&(e[1-n]=e[n]+h.sign*a),e},RL=d,zL=Math.min,BL=Math.max,VL=Math.floor,GL=Math.ceil,FL=zo,WL=Math.PI;If.prototype={type:"parallel",constructor:If,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;RL(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new OL(t,Vl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();RL(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Bl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=la(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Tf(e.get("axisExpandWidth"),l),c=Tf(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=Tf(f[1]-f[0],l),f[1]=f[0]+t):(t=Tf(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||VL(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[VL(FL(f[0]/h,1))+1,GL(FL(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),RL(i,function(e,i){var a=(n.axisExpandable?Df:Af)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:WL/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=mt();wt(h,h,u),_t(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];d(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;uo*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?EL(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[BL(0,a[1]*s/o-o/2)])[1]=zL(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},Ba.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new If(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var HL=YM.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Wb([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Bo(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&vp(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};Ls(function(t){wf(t),bf(t)}),OI.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return yp(i,this),dl(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var hk=.3,ck=(Mr.extend({type:"parallel",init:function(){this._dataGroup=new Zw,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=Sp(t);if(a.diff(r).add(function(t){Mp(bp(a,o,t,l,s),a,t,u)}).update(function(e,i){var o=r.getItemGraphicEl(i),h=wp(a,e,l,s);a.setItemGraphicEl(e,o),bo(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),Mp(o,a,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var h=_p(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=Sp(e),s=t.start;sn&&(n=e)}),d(e,function(e){var o=new jC({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.color");null!=a&&e.setVisual("color",a)})}})});var mk={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],f=[o,a],p=f[u].get("type"),g=f[1-u].get("type"),m=t.data;if(m&&n){var v=[];d(m,function(t,e){var i;t.value&&y(t.value)?(i=t.value.slice(),t.value.unshift(e)):y(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var x=this.defaultValueDimensions;return WD(this,{coordDimensions:[{name:h,type:Xs(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Xs(g),dimsDef:x.slice()}],dimensionsCount:x.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};h(OI.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),mk,!0);var vk=["itemStyle"],yk=["emphasis","itemStyle"],xk=(Mr.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add(function(t){if(n.hasValue(t)){var e=qp(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?Kp(s,i,n,t):i=qp(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:B}),kn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n0?Ck:Lk)}function n(t,e){return e.get(t>0?Ak:Dk)}var o=t.getData(),a=t.pipelineContext.large;if(o.setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!a&&{progress:function(t,e){for(var o;null!=(o=t.next());){var a=e.getItemModel(o),r=e.getItemLayout(o).sign;e.setItemVisual(o,{color:i(r,a),borderColor:n(r,a)})}}}}},Pk="undefined"!=typeof Float32Array?Float32Array:Array,Nk={seriesType:"candlestick",plan:zI(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=sg(t,i),o=0,a=1,r=["x","y"],s=i.mapDimension(r[o]),l=i.mapDimension(r[a],!0),u=l[0],h=l[1],c=l[2],d=l[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==s||l.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,r,l=new Pk(5*t.count),f=0,p=[],g=[];null!=(r=t.next());){var m=i.get(s,r),v=i.get(u,r),y=i.get(h,r),x=i.get(c,r),_=i.get(d,r);isNaN(m)||isNaN(x)||isNaN(_)?(l[f++]=NaN,f+=4):(l[f++]=rg(i,r,v,y,h),p[o]=m,p[a]=x,n=e.dataToPoint(p,null,g),l[f++]=n?n[0]:NaN,l[f++]=n?n[1]:NaN,p[a]=_,n=e.dataToPoint(p,null,g),l[f++]=n?n[1]:NaN)}i.setLayout("largePoints",l)}:function(t,i){function r(t,i){var n=[];return n[o]=i,n[a]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function l(t,e,i){var a=e.slice(),r=e.slice();a[o]=Yn(a[o]+n/2,1,!1),r[o]=Yn(r[o]-n/2,1,!0),i?t.push(a,r):t.push(r,a)}function f(t){return t[o]=Yn(t[o],1),t}for(var p;null!=(p=t.next());){var g=i.get(s,p),m=i.get(u,p),v=i.get(h,p),y=i.get(c,p),x=i.get(d,p),_=Math.min(m,v),w=Math.max(m,v),b=r(_,g),S=r(w,g),M=r(y,g),I=r(x,g),T=[];l(T,S,0),l(T,b,1),T.push(f(I),f(S),f(M),f(b)),i.setItemLayout(p,{sign:rg(i,p,m,v,h),initBaseline:m>v?S[a]:b[a],ends:T,brushRect:function(t,e,i){var s=r(t,i),l=r(e,i);return s[o]-=n/2,l[o]-=n/2,{x:s[0],y:s[1],width:a?n:l[0]-s[0],height:a?l[1]-s[1]:n}}(y,x,g)})}}}}};Ls(function(t){t&&y(t.series)&&d(t.series,function(t){w(t)&&"k"===t.type&&(t.type="candlestick")})}),Es(kk),Os(Nk),OI.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return dl(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Ok=hg.prototype;Ok.stopEffectAnimation=function(){this.childAt(1).removeAll()},Ok.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Xl(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}ug(n,t)},Ok.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),Bk=dg.prototype;Bk.createLine=function(t,e,i){return new $d(t,e,i)},Bk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Xl(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},Bk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=T(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},Bk.getLineLength=function(t){return ew(t.__p1,t.__cp1)+ew(t.__cp1,t.__p2)},Bk.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Bk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},Bk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=rn,s=sn;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},Bk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(dg,Zw);var Vk=fg.prototype;Vk._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new oM({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},Vk.updateData=function(t,e,i){var n=t.hostModel;bo(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},Vk._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle").getLineStyle(),l=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,uo(this)},Vk.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},u(fg,Zw);var Gk=pg.prototype;Gk.createLine=function(t,e,i){return new fg(t,e,i)},Gk.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;re);r++);r=Math.min(r-1,o-2)}J(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(pg,dg);var Fk=Fn({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r0){t.moveTo(i[r++],i[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r0)for(var l=n[r++],u=n[r++],h=1;h0){if(xn(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(vn(l,u,c,d))return a;a++}return-1}}),Wk=gg.prototype;Wk.isPersistent=function(){return!this._incremental},Wk.updateData=function(t){this.group.removeAll();var e=new Fk({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Wk.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Gn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Wk.incrementalUpdate=function(t,e){var i=new Fk;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},Wk.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Wk._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},Wk._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Hk={seriesType:"lines",plan:zI(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h0){var I=a(v)?s:l;v>0&&(v=v*S+b),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=Y_()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Fs({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):_g(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var r,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");r=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),m=t.getModel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],x=i;x=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},Ba.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new Zg(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:Zg.prototype.dimensions});var $k=["axisLine","axisTickLabel","axisName"],Jk=LD.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=Ug(t),r=new ID(t,a);d($k,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),Jk.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){lm(e.getZr(),"axisPointer"),sP.superApply(this._model,"remove",arguments)},dispose:function(t,e){lm("axisPointer",e),sP.superApply(this._model,"dispose",arguments)}}),lP=Bi(),uP=i,hP=m;(um.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(hm,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new Zw,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);pm(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=xh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=lP(t).pointerEl=new bM[o.type](uP(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=lP(t).labelEl=new aM(uP(e.label));t.add(o),dm(o,n)}},updatePointerEl:function(t,e,i){var n=lP(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=lP(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),dm(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Co(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){lw(t.event)},onmousedown:hP(this._onHandleDragMove,this,0,0),drift:hP(this._onHandleDragMove,this),ondragend:hP(this._onHandleDragEnd,this)}),i.add(n)),pm(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Lr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){hm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fm(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(fm(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(fm(n)),lP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=um,Xi(um);var cP=um.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=Mm(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=gm(n),c=dP[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}_m(e,t,Ih(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Ih(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:xm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=Mm(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),dP={line:function(t,e,i,n){var o=wm([e,i[0]],[e,i[1]],Im(t));return Xn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:bm([e-o/2,i[0]],[o,a],Im(t))}}};LD.registerAxisPointerClass("CartesianAxisPointer",cP),Ls(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),ks(IT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=dh(t,e)}),Ps({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){em(o)&&(o=eP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=em(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||em(o),d={},f={},p={list:[],map:{}},g={showPointer:nP(Yg,f),showTooltip:nP(qg,p)};iP(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);iP(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=Qg(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&Xg(t,r,g,!1,d)}})});var v={};return iP(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&iP(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,tm(e),tm(t)))),v[t.key]=a}})}),iP(v,function(t,e){Xg(h[e],t,g,!0,d)}),Kg(f,h,d),$g(p,o,t,r),Jg(h,0,i),d}});var fP=["x","y"],pP=["width","height"],gP=um.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Am(r,1-Tm(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=gm(n),c=mP[u](a,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}_m(e,t,Ug(i),i,n,o)},getHandleTransform:function(t,e,i){var n=Ug(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:xm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Tm(o),s=Am(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=Am(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),mP={line:function(t,e,i,n){var o=wm([e,i[0]],[e,i[1]],Tm(t));return Xn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:bm([e-o/2,i[0]],[o,a],Tm(t))}}};LD.registerAxisPointerClass("SingleAxisPointer",gP),Vs({type:"single"});var vP=OI.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){vP.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=f(Lp().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;lMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},wP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},u(Pm,Zw);Mr.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getValue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),s.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var o=new Pm(i,t,e);h.add(o),s.setItemGraphicEl(i.dataIndex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesModel=t,this.api=i,this.ecModel=e;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,c=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(t){d.push(t)});var f=this._oldChildren||[];if(function(t,e){function i(t){return t.getId()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new Hs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",t,e):(r.virtualPiece=new Pm(i,t,e),h.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(t){r._rootToNode(n.parentNode)};n.piece._onclickEvent=o,r.virtualPiece.on("click",o)}else r.virtualPiece&&(h.remove(r.virtualPiece),r.virtualPiece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(p)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var bP="sunburstRootToNode";Ps({type:bP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=td(t,[bP],e);if(n){var o=e.getViewRoot();o&&(t.direction=id(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var SP="sunburstHighlight";Ps({type:SP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=td(t,[SP],e);n&&(t.highlight=n.node)})});Ps({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var MP=Math.PI/180;Es(v(jD,"sunburst")),Os(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Ro(e[0],o),l=Ro(e[1],a),u=Ro(n[0],r/2),h=Ro(n[1],r/2),c=-t.get("startAngle")*MP,f=t.get("minAngle")*MP,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Rm(g,v);var x=0;d(g.children,function(t){!isNaN(t.getValue())&&x++});var _=g.getValue(),w=Math.PI/(_||x)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===_&&T?w:n*w;on[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(Fm,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};OI.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return dl(this.getSource(),this)},getDataParams:function(t,e,i){var n=OI.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Mr.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Um(t,a,e,i);a.diff(o).add(function(e){jm(null,e,s(e,n),t,r,a)}).update(function(e,i){jm(o.getItemGraphicEl(i),e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){for(var a=e.getData(),r=Um(e,a,i,n),s=t.start;s=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Vs({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;d(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=av(e);o&&"merge"!==o?"replace"===o?(ov(r,i),nv(a,l,h,i)):"remove"===o&&ov(r,i):r?r.attr(h):nv(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,hv(c,t))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;ua(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){ov(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var PP=Bs({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){PP.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Ps("legendToggleSelect","legendselectchanged",v(cv,"toggleSelected")),Ps("legendSelect","legendselected",v(cv,"select")),Ps("legendUnSelect","legendunselected",v(cv,"unSelect"));var NP=v,OP=d,EP=Zw,RP=Vs({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new EP),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var o=t.getBoxLayoutParams(),a={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=la(o,a,s),u=this.layoutInner(t,n,l),h=la(r({width:u.width,height:u.height},o),a,s);this.group.attr("position",[h.x-u.x,h.y-u.y]),this.group.add(this._backgroundEl=fv(u,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=R(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),OP(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=i.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,r).on("click",NP(pv,h,n)).on("mouseover",NP(gv,c.name,null,n,s)).on("mouseout",NP(mv,c.name,null,n,s)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),c=o.indexOfName(h);if(c<0)return;var d=o.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,r).on("click",NP(pv,h,n)).on("mouseover",NP(gv,null,h,n,s)).on("mouseout",NP(mv,null,h,n,s)),a.set(h,!0)}},this)}else o.add(new EP({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("symbolKeepAspect"),p=n.isSelected(t),g=new EP,m=i.getModel("textStyle"),v=i.get("icon"),y=i.getModel("tooltip"),x=y.parentModel;if(o=v||o,g.add(Xl(o,0,0,h,c,p?l:d,null==f||f)),!v&&r&&(r!==o||"none"===r)){var _=.8*c;"none"===r&&(r="circle"),g.add(Xl(r,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=n.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new qS({style:fo({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new aM({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),uo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();UM(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}});ks(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[s],f=[-h.x,-h.y];f[r]=n.position[r];var p=[0,0],g=[-c.x,-c.y],m=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=i[s]-c[s]:p[r]+=c[s]+m),g[1-r]+=h[l]/2-c[l]/2,n.attr("position",f),o.attr("position",p),a.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:h[s],v[l]=Math.max(h[l],c[l]),v[u]=Math.min(0,c[u]+g[1-r]),o.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],o.setClipPath(new aM({shape:y})),o.__rectSize=y[s]}else a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&bo(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[h],e}var i,n,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),u=this._containerGroup.__rectSize,h=t.getOrient().index,c=VP[h],d=VP[1-h],f=GP[h],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var g=u?Math.ceil(l[c]/u):0;if(a){var m=a.getBoundingRect(),v=a.position[h]+m[f];p[h]=-v-l[f],i=Math.floor(g*(v+m[f]+u/2)/l[c]),i=l[c]&&g?Math.max(0,Math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=u,y[d]=l[d],y[f]=-p[h]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:i,pageCount:g,pagePrevDataIndex:n,pageNextDataIndex:o}}});Ps("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Bs({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var WP=d,HP=Jo,ZP=["","-webkit-","-moz-","-o-"];wv.prototype={constructor:wv,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+_v(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},bv.prototype={constructor:bv,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a=o.indexOf("{marker");a>=0;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new qS({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var UP=m,XP=d,jP=Ro,YP=new aM({shape:{x:-1,y:-1,width:2,height:2}});Vs({type:"tooltip",init:function(t,e){if(!z_.node){var i=t.getComponent("tooltip").get("renderMode");this._renderMode=Hi(i);var n;"html"===this._renderMode?(n=new wv(e.getDom(),e),this._newLine="
"):(n=new bv(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,i){if(!z_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");im("itemTooltip",this._api,UP(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!z_.node){var o=Mv(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=YP;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=eP(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Mv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=Sv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,o=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=Sv([e.tooltipOption,o]),u=this._renderMode,h=this._newLine,c={};XP(t,function(t){XP(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value,a=[];if(e&&null!=o){var l=ym(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Wl(e.axis,o),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;n(c,m)}else p=g;a.push(p)}});var f=l;"html"!==u?r.push(a.join(h)):r.push((f?Qo(f)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=Sv([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new Lo(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=ta(h,i,!0);else if("function"==typeof h){var d=UP(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))i=jP(e[0],s),n=jP(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=la(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=Av(e,d,u))[0],n=p[1]):(i=(p=Iv(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=Dv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Dv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Tv(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&XP(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&XP(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&XP(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){z_.node||(this._tooltipContent.hide(),lm("itemTooltip",e))}}),Ps({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Ps({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Pv.prototype={constructor:Pv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:HA.prototype.dataToCoord,radiusToData:HA.prototype.coordToData},u(Pv,HA);var qP=Bi();Nv.prototype={constructor:Nv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:HA.prototype.dataToCoord,angleToData:HA.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(r),l=De(a,e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=qP(t.model),d=c.lastAutoInterval,f=c.lastTickCount;return null!=d&&null!=f&&Math.abs(d-h)<=1&&Math.abs(f-o)<=1&&d>h?h=d:(c.lastTickCount=o,c.lastAutoInterval=h),h}},u(Nv,HA);var KP=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Pv,this._angleAxis=new Nv,this._radiusAxis.polar=this._angleAxis.polar=this};KP.prototype={type:"polar",axisPointerEnabled:!0,constructor:KP,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=lr;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var $P=YM.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n($P.prototype,CA);var JP={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};xD("angle",$P,Ov,JP.angle),xD("radius",$P,Ov,JP.radius),Bs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var QP={dimensions:KP.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new KP(n);o.update=Rv;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");zv(a,s),zv(r,l),Ev(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Ba.register("polar",QP);var tN=["axisLine","axisLabel","axisTick","splitLine","splitArea"];LD.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,a=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),s=f(n.getViewLabels(),function(t){return(t=i(t)).coord=n.dataToCoord(t.tickValue),t});Gv(s),Gv(r),d(tN,function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,o,r,a,s)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new KS({shape:{cx:e.cx,cy:e.cy,r:n[Vv(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[Vv(e)],l=f(i,function(t){return new rM({shape:Bv(e,[s,s+a],t.coord)})});this.group.add(xM(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,o){var a=t.getCategories(!0),r=t.getModel("axisLabel"),s=r.get("margin");d(o,function(i,o){var l=r,u=i.tickValue,h=n[Vv(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";a&&a[u]&&a[u].textStyle&&(l=new Lo(a[u].textStyle,r,r.ecModel));var m=new qS({silent:!0});this.group.add(m),fo(m.style,l,{x:c[0],y:c[1],textFill:l.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g})},this)},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u=0?"p":"n",M=y;v&&(n[r][b]||(n[r][b]={p:y,n:y}),M=n[r][b][S]);var I,T,A,D;if("radius"===h.dim){var C=h.dataToRadius(w)-y,L=a.dataToAngle(b);Math.abs(C)=0},fN.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=oy(e,t),o=0;o=0||uN(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:mN.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){lN(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:mN.geo})})}},gN=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],mN={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Mo(t)),e}},vN={lineX:hN(ay,0),lineY:hN(ay,1),rect:function(t,e,i){var n=e[cN[t]]([i[0][0],i[1][0]]),o=e[cN[t]]([i[0][1],i[1][1]]),a=[ny([n[0],o[0]]),ny([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[cN[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},yN={lineX:hN(ry,0),lineY:hN(ry,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},xN=["inBrush","outOfBrush"],_N="__ecBrushSelect",wN="__ecInBrushSelectEvent",bN=IT.VISUAL.BRUSH;Os(bN,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new iy(e.option,t)).setInputRanges(e.areas,t)})}),Es(bN,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=dy(i);if(a&&!fy(e,n)&&(d(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){cy(a,o,r,t)&&(x[t]=1)})}}var p={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushLink,v=[],x=[],_=[],w=0;n||(o=g.throttleType,a=g.throttleDelay);var b=f(e.areas,function(t){return py(r({boundingRect:SN[t.brushType](t)},t))}),S=Xv(e.option,xN,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};p.selected.push(i);var n=dy(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return cy(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&Yv(xN,S,a,r)})}),uy(e,o,a,s,n)});var SN={lineX:B,lineY:B,rect:function(t){return gy(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&gy(e)}},MN=["#ddd"];Bs({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&jv(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:MN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=f(t,function(t){return my(this.option,t)},this))},setBrushOption:function(t){this.brushOption=my(this.option,t),this.brushType=this.brushOption.brushType}});Vs({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Cf(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,vy.apply(this,arguments)},updateTransform:vy,updateView:vy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),Ps({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Ps({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var IN={},TN=XI.toolbox.brush;_y.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:i(TN.title)};var AN=_y.prototype;AN.render=AN.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},AN.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},AN.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},yy("brush",_y),Ls(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Zv(s),e&&!s.length&&s.push.apply(s,aN)}});wy.prototype={constructor:wy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Uo(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=la(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},wy.dimensions=wy.prototype.dimensions,wy.getDimensionsInfo=wy.prototype.getDimensionsInfo,wy.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new wy(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Ba.register("calendar",wy);var DN=YM.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=da(t);DN.superApply(this,"init",arguments),Sy(t,o)},mergeOption:function(t,e){DN.superApply(this,"mergeOption",arguments),Sy(this.option,t)}}),CN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},LN={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Vs({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new aM({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new oM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?ea(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new qS({z2:30});fo(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=CN[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),r=this._valueWindow;"none"!==a&&NN(o,function(t){var e=t.getData(),o=e.mapDimension(n,!0);o.length&&("weakFilter"===a?e.filterSelf(function(t){for(var i,n,a,s=0;sr[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):NN(o,function(n){if("empty"===a)t.setData(e.map(n,function(t){return i(t)?t:NaN}));else{var o={};o[n]=r,e.selectRange(o)}}),NN(o,function(t){e.setApproximateExtent(r,t)}))})}}};var RN=d,zN=PN,BN=Bs({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Ly(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Ly(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;z_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),ky(this,t),RN([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new EN(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();zN(function(e){var i=e.axisIndex;t[i]=Di(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;zN(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):RN(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&zN(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return zN(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;zN(function(n){RN(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;RN([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&ky(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),VN=EI.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:FN(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new nM({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new oM({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(jN,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,u=Py(o.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:o.name,otherDim:u,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new GN({draggable:!0,cursor:Ny(this._orient),drift:HN(this._onDragMove,this,"all"),onmousemove:function(t){lw(t.event)},ondragstart:HN(this._showDataInfo,this,!0),ondragend:HN(this._onDragEnd,this),onmouseover:HN(this._showDataInfo,this,!0),onmouseout:HN(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new GN(jn({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),ZN([0,1],function(t){var o=Co(a.get("handleIcon"),{cursor:Ny(this._orient),draggable:!0,drift:HN(this._onDragMove,this,t),onmousemove:function(t){lw(t.event)},ondragend:HN(this._onDragEnd,this),onmouseover:HN(this._showDataInfo,this,!0),onmouseout:HN(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Ro(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new qS({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[FN(t[0],[0,100],e,!0),FN(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];EL(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?FN(a.minSpan,r,o,!0):null,null!=a.maxSpan?FN(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=WN([FN(n[0],o,r,!0),FN(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=WN(i.slice()),o=this._size;ZN([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Mo(n.handles[t].parent,this.group),i=To(0===t?"right":"left",e),s=this._handleWidth/2+XN,l=Io([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===UN?"middle":i,textAlign:a===UN?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=WN(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Io([e,i],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(ZN(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});BN.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var qN="\0_ec_dataZoom_roams",KN=m,$N=VN.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){$N.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Ry(t.model)});d(e,function(e){var a=e.model,r={};d(["pan","zoom","scrollMove"],function(t){r[t]=KN(JN[t],this,e,n)},this),Oy(i,{coordId:Ry(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Ey(this.api,this.dataZoomModel.id),$N.superApply(this,"dispose",arguments),this._range=null}}),JN={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=QN[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return EL(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Wy(function(t,e,i,n,o,a){var r=QN[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Wy(function(t,e,i,n,o,a){return QN[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})},QN={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};ks({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),Ps("dataZoom",function(t,e){var i=Iy(m(e.eachComponent,e,"dataZoom"),PN,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var tO=d,eO=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),tO(e,function(t){if(t){Hy(t,"splitList")&&!Hy(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&tO(e,function(t){w(t)&&(Hy(t,"start")&&!Hy(t,"min")&&(t.min=t.start),Hy(t,"end")&&!Hy(t,"max")&&(t.max=t.end))})}})};YM.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var iO=IT.VISUAL.COMPONENT;Es(iO,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(qv(e.stateList,e.targetVisuals,m(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Es(iO,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(m(Zy,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var nO={get:function(t,e,n){var o=i((oO[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},oO={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},aO=jC.mapVisual,rO=jC.eachVisual,sO=y,lO=d,uO=Bo,hO=Eo,cO=B,dO=Bs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;z_.canvasSupported||(i.realtime=!1),!e&&jv(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=Xv(this.option.controller,e,t),this.targetVisuals=Xv(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Di(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=uO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){sO(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")},lO(this.stateList,function(e){var i=t[e];if(_(i)){var n=nO.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecModel,o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.isCategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},lO(n,function(t,e){if(jC.isValidType(e)){var i=nO.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");lO(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=aO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var u=s.symbolSize;if(null!=u){var h=-1/0;rO(u,function(t){t>h&&(h=t)}),s.symbolSize=aO(u,function(t){return hO(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:cO,getValueState:cO,getVisualMeta:cO}),fO=[20,140],pO=dO.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){pO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){pO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=fO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=fO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){dO.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=Uy(0,0,this.getExtent()),n=Uy(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Zw("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;vO([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Io(i.handleLabelPoints[r],Mo(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=mO(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",Ky(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Io(u.indicatorLabelPoint,Mo(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=yO(xO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=yO(xO(o[0],t),o[1]);var r=$y(i,a,o),s=[t-r,t+r],l=mO(t,o,a,!0),u=[mO(s[0],o,a,!0),mO(s[1],o,a,!0)];s[0]o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||Jy(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Ri(h,c);this._dispatchHighDown("downplay",jy(d[0])),this._dispatchHighDown("highlight",jy(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",jy(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Mo(e,n?null:this.group);return bM[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Ps({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Ls(eO);var SO=dO.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){SO.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();MO[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=jC.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=nO.get(n,"inRange"===t?"active":"inactive",o)})},this),dO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=jC.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){jC.findPieceIndex(e,this._pieceList)===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),MO={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};gO.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=T(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),d(l.viewPieceList,function(n){var l=n.piece,u=new Zw;u.onclick=m(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new qS({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,h,r),UM(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:jy(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Xy(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Zw,r=this.visualMapModel.textStyleModel;a.add(new qS({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Xl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});Ls(eO);var IO=$o,TO=Qo,AO=Bs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(z_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ex(i),d(i.data,function(t){t instanceof Array?(ex(t[0]),ex(t[1])):ex(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,IO).join(", "):IO(i),o=e.getName(t),a=TO(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=TO(o),null!=i&&(a+=" : ")),null!=i&&(a+=TO(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});h(AO,LI),AO.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var DO=l,CO=v,LO={min:CO(ox,"min"),max:CO(ox,"max"),average:CO(ox,"average")},kO=Vs({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});kO.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(cx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Su),u=dx(o,t,e);e.setData(u),cx(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ls(function(t){t.markPoint=t.markPoint||{}}),AO.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var PO=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis)){var u,h;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",e.getAxis(u),h=T(r.yAxis,r.xAxis);else{var c=rx(r,s,e,t);u=c.valueDataDim,c.valueAxis,h=hx(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueIndex:r.valueIndex,value:h}]}return r=[ax(t,r[0]),ax(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};kO.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){mx(o,e,!0,t,i),mx(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);mx(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new Jd);this.group.add(u.group);var h=vx(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Ls(function(t){t.markLine=t.markLine||{}}),AO.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var NO=function(t,e,i,n){var a=ax(t,n[0]),r=ax(t,n[1]),s=T,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},OO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];kO.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(OO,function(o){return bx(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new Zw});this.group.add(u.group),u.__keep=!0;var h=Sx(o,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(OO,function(i){return bx(h,e,i,t,n)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new nM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);bo(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=h.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:Ut(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),co(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:s}),uo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Ls(function(t){t.markArea=t.markArea||{}});YM.registerSubTypeDefaulter("timeline",function(){return"slider"}),Ps({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),Ps({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var EO=YM.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){EO.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Li(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new eA([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});h(EO.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),LI);var RO=EI.extend({type:"timeline"}),zO=function(t,e,i,n){HA.call(this,t,e,i),this.type=n||"value",this.model=null};zO.prototype={constructor:zO,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},u(zO,HA);var BO=m,VO=d,GO=Math.PI;RO.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return Qo(s.scale.getLabel(t))},VO(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=Ax(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:GO/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*GO/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=mt(),u=s.x,h=s.y+s.height;_t(l,l,[-u,-h]),wt(l,l,-GO/2),_t(l,l,[u,h]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Vl(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new zO("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new Zw;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new rM({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();VO(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:BO(this._changeTimeline,this,t)},h=Cx(r,s,e,u);uo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();VO(a,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new qS({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:BO(this._changeTimeline,this,a),silent:!1});fo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),uo(h,fo({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c=Dx(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),uo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",BO(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",BO(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),BO(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=BO(s._handlePointerDrag,s),t.ondragend=BO(s._handlePointerDragend,s),Lx(t,a,i,n,!0)},onUpdate:function(t){Lx(t,a,i,n)}};this._currentPointer=Cx(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Bo(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var WO=XI.toolbox.saveAsImage;Px.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:WO.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:WO.lang.slice()},Px.prototype.unusable=!z_.canvasSupported,Px.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||z_.browser.ie||z_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},yy("saveAsImage",Px);var HO=XI.toolbox.magicType;Nx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(HO.title),option:{},seriesIndex:{}};var ZO=Nx.prototype;ZO.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var UO={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},XO=[["line","bar"],["stack","tiled"]];ZO.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(UO[i]){var a={series:[]};d(XO,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=UO[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},Ps({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),yy("magicType",Nx);var jO=XI.toolbox.dataView,YO=new Array(60).join("-"),qO="\t",KO=new RegExp("["+qO+"]+","g");Hx.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(jO.title),lang:i(jO.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Hx.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=zx(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;ut(v,"click",i),ut(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Wx(u.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),ut(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+qO+e.substring(n),this.selectionStart=this.selectionEnd=i+1,lw(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Hx.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Hx.prototype.dispose=function(t,e){this.remove(t,e)},yy("dataView",Hx),Ps({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Zx(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var $O=d,JO="\0_ec_hist_store";BN.extend({type:"dataZoom.select"}),VN.extend({type:"dataZoom.select"});var QO=XI.toolbox.dataZoom,tE=d,eE="\0_ec_\0toolbox-dataZoom_";Kx.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(QO.title)};var iE=Kx.prototype;iE.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,Qx(t,e,this,n,i),Jx(t,e)},iE.onclick=function(t,e,i){nE[i].call(this)},iE.remove=function(t,e){this._brushController.unmount()},iE.dispose=function(t,e){this._brushController.dispose()};var nE={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Xx(this.ecModel))}};iE._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=EL(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new iy($x(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Ux(a,o),this._dispatchZoomAction(o)}},iE._dispatchZoomAction=function(t){var e=[];tE(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},yy("dataZoom",Kx),Ls(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"===a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:eE+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),tE(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var oE=XI.toolbox.restore;t_.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:oE.title},t_.prototype.onclick=function(t,e,i){jx(t),e.dispatchAction({type:"restore",from:this.uid})},yy("restore",t_),Ps({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var aE,rE="urn:schemas-microsoft-com:vml",sE="undefined"==typeof window?null:window,lE=!1,uE=sE&&sE.document;if(uE&&!z_.canvasSupported)try{!uE.namespaces.zrvml&&uE.namespaces.add("zrvml",rE),aE=function(t){return uE.createElement("')}}catch(t){aE=function(t){return uE.createElement("<"+t+' xmlns="'+rE+'" class="zrvml">')}}var hE=MS.CMD,cE=Math.round,dE=Math.sqrt,fE=Math.abs,pE=Math.cos,gE=Math.sin,mE=Math.max;if(!z_.canvasSupported){var vE=21600,yE=vE/2,xE=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=vE+","+vE,t.coordorigin="0,0"},_E=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},wE=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},bE=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},SE=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},ME=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},IE=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},TE=function(t,e,i){var n=zt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=wE(n[0],n[1],n[2]),t.opacity=i*n[3])},AE=function(t){var e=zt(t);return[wE(e[0],e[1],e[2]),e[3]]},DE=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof cM){var o,a=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(Q(f,f,d),Q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&Q(f,f,d),y/=v[0]*vE,x/=v[1]*vE;var _=mE(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else TE(t,n,e.opacity)},CE=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof cM||TE(t,e.stroke,e.opacity)},LE=function(t,e,i,n){var o="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cM&&SE(t,a),a||(a=e_(e)),o?DE(a,i,n):CE(a,i),bE(t,a)):(t[o?"filled":"stroked"]="false",SE(t,a))},kE=[[],[],[]],PE=function(t,e){var i,n,o,a,r,s,l=hE.M,u=hE.C,h=hE.L,c=hE.A,d=hE.Q,f=[],p=t.data,g=t.len();for(a=0;a.01?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&OA?x-=.0125:x+=.0125:N&&ED?y+=.0125:y-=.0125),f.push(R,cE(((A-C)*M+b)*vE-yE),",",cE(((D-L)*I+S)*vE-yE),",",cE(((A+C)*M+b)*vE-yE),",",cE(((D+L)*I+S)*vE-yE),",",cE((O*M+b)*vE-yE),",",cE((E*I+S)*vE-yE),",",cE((y*M+b)*vE-yE),",",cE((x*I+S)*vE-yE)),r=y,s=x;break;case hE.R:var z=kE[0],B=kE[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=cE(z[0]*vE-yE),B[0]=cE(B[0]*vE-yE),z[1]=cE(z[1]*vE-yE),B[1]=cE(B[1]*vE-yE),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case hE.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V100&&(RE=0,EE={});var i,n=zE.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},EE[t]=e,RE++}return e};!function(t,e){hb[t]=e}("measureText",function(t,e){var i=uE;OE||((OE=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",uE.body.appendChild(OE));try{OE.style.font=e}catch(t){}return OE.innerHTML="",OE.appendChild(i.createTextNode(t)),{width:OE.offsetWidth}});for(var VE=new ue,GE=[gb,ui,hi,kn,qS],FE=0;FE=o&&u+1>=a){for(var h=[],c=0;c=o&&c+1>=a)return y_(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},__.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},__.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},__.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},__.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},__.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},__.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},__.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},__.prototype.getSvgProxy=function(t){return t instanceof kn?tR:t instanceof hi?eR:t instanceof qS?iR:tR},__.prototype.getTextSvgElement=function(t){return t.__textSvgEl},__.prototype.getSvgElement=function(t){return t.__svgEl},u(w_,__),w_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},w_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Bw("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},w_.prototype.update=function(t){var e=this;__.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},w_.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Bw("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);xt(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},b_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&__.prototype.markUsed.call(e,t._dom),t._textDom&&__.prototype.markUsed.call(e,t._textDom)})},u(S_,__),S_.prototype.addWithoutUpdate=function(t,e){if(e&&M_(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},S_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},S_.prototype.update=function(t,e){var i=e.style;if(M_(i)){var n=this;__.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},S_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},S_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},S_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&__.prototype.markUsed.call(this,e._shadowDom)};var sR=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=r_("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new w_(n,o),this.clipPathManager=new b_(n,o),this.shadowManager=new S_(n,o);var r=document.createElement("div");r.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=r,t.appendChild(r),r.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};sR.prototype={constructor:sR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||I_(s[i])||I_(r.style[i]))-(I_(s[o])||0)-(I_(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){sR.prototype[t]=N_(t)}),Ti("svg",sR),t.version="4.2.0",t.dependencies=wT,t.PRIORITY=IT,t.init=function(t,e,i){var n=Ds(t);if(n)return n;var o=new rs(t,e,i);return o.id="ec_"+WT++,GT[o.id]=o,Fi(t,ZT,o.id),Ts(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,vT(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+HT++,vT(e,function(e){e.group=t})}return FT[t]=!0,t},t.disConnect=As,t.disconnect=UT,t.dispose=function(t){"string"==typeof t?t=GT[t]:t instanceof rs||(t=Ds(t)),t instanceof rs&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Ds,t.getInstanceById=function(t){return GT[t]},t.registerTheme=Cs,t.registerPreprocessor=Ls,t.registerProcessor=ks,t.registerPostUpdate=function(t){RT.push(t)},t.registerAction=Ps,t.registerCoordinateSystem=Ns,t.getCoordinateSystemDimensions=function(t){var e=Ba.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Os,t.registerVisual=Es,t.registerLoading=zs,t.extendComponentModel=Bs,t.extendComponentView=Vs,t.extendSeriesModel=Gs,t.extendChartView=Fs,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){pT.registerMap(t,e,i)},t.getMap=function(t){var e=pT.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=XT,t.zrender=Pb,t.number=NM,t.format=FM,t.throttle=Cr,t.helper=BA,t.matrix=fw,t.vector=nw,t.color=Pw,t.parseGeoJSON=GA,t.parseGeoJson=ZA,t.util=UA,t.graphic=XA,t.List=eA,t.Model=Lo,t.Axis=HA,t.env=z_}); diff --git a/WebContent/js/jQuery1.7.js b/WebContent/js/jQuery1.7.js new file mode 100644 index 0000000000000000000000000000000000000000..ee0233703da37c9cc42591620e0befa769cd6a2a --- /dev/null +++ b/WebContent/js/jQuery1.7.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/WebContent/js/jquery-1.8.2.min.js b/WebContent/js/jquery-1.8.2.min.js new file mode 100644 index 0000000000000000000000000000000000000000..dbf20558e2e16ac819cf26cb0c6f260e4d73956a --- /dev/null +++ b/WebContent/js/jquery-1.8.2.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.2 jquery.com | jquery.org/license */ +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
t
",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/WebContent/js/jquery.SuperSlide.js b/WebContent/js/jquery.SuperSlide.js new file mode 100644 index 0000000000000000000000000000000000000000..46399a5af8b17fe221aec9155cd5c43d7dd73235 --- /dev/null +++ b/WebContent/js/jquery.SuperSlide.js @@ -0,0 +1,11 @@ +/*! + * SuperSlide v2.1 + * 轻松解决网站大部分特效展示问题 + * 详尽信息请看官网:http://www.SuperSlide2.com/ + * + * Copyright 2011-2013, 大话主席 + * + * 请尊重原创,保留头部版权 + * 在保留版权的前提下可应用于个人或商业用途 + */ +(function(a){a.fn.slide=function(b){return a.fn.slide.defaults={type:"slide",effect:"fade",autoPlay:!1,delayTime:500,interTime:2500,triggerTime:150,defaultIndex:0,titCell:".hd li",mainCell:".bd",targetCell:null,trigger:"mouseover",scroll:1,vis:1,titOnClassName:"on",autoPage:!1,prevCell:".prev",nextCell:".next",pageStateCell:".pageState",opp:!1,pnLoop:!0,easing:"swing",startFun:null,endFun:null,switchLoad:null,playStateCell:".playState",mouseOverStop:!0,defaultPlay:!0,returnDefault:!1},this.each(function(){var c=a.extend({},a.fn.slide.defaults,b),d=a(this),e=c.effect,f=a(c.prevCell,d),g=a(c.nextCell,d),h=a(c.pageStateCell,d),i=a(c.playStateCell,d),j=a(c.titCell,d),k=j.size(),l=a(c.mainCell,d),m=l.children().size(),n=c.switchLoad,o=a(c.targetCell,d),p=parseInt(c.defaultIndex),q=parseInt(c.delayTime),r=parseInt(c.interTime);parseInt(c.triggerTime);var P,t=parseInt(c.scroll),u=parseInt(c.vis),v="false"==c.autoPlay||0==c.autoPlay?!1:!0,w="false"==c.opp||0==c.opp?!1:!0,x="false"==c.autoPage||0==c.autoPage?!1:!0,y="false"==c.pnLoop||0==c.pnLoop?!1:!0,z="false"==c.mouseOverStop||0==c.mouseOverStop?!1:!0,A="false"==c.defaultPlay||0==c.defaultPlay?!1:!0,B="false"==c.returnDefault||0==c.returnDefault?!1:!0,C=0,D=0,E=0,F=0,G=c.easing,H=null,I=null,J=null,K=c.titOnClassName,L=j.index(d.find("."+K)),M=p=defaultIndex=-1==L?p:L,N=p,O=m>=u?0!=m%t?m%t:t:0,Q="leftMarquee"==e||"topMarquee"==e?!0:!1,R=function(){a.isFunction(c.startFun)&&c.startFun(p,k,d,a(c.titCell,d),l,o,f,g)},S=function(){a.isFunction(c.endFun)&&c.endFun(p,k,d,a(c.titCell,d),l,o,f,g)},T=function(){j.removeClass(K),A&&j.eq(defaultIndex).addClass(K)};if("menu"==c.type)return A&&j.removeClass(K).eq(p).addClass(K),j.hover(function(){P=a(this).find(c.targetCell);var b=j.index(a(this));I=setTimeout(function(){switch(p=b,j.removeClass(K).eq(p).addClass(K),R(),e){case"fade":P.stop(!0,!0).animate({opacity:"show"},q,G,S);break;case"slideDown":P.stop(!0,!0).animate({height:"show"},q,G,S)}},c.triggerTime)},function(){switch(clearTimeout(I),e){case"fade":P.animate({opacity:"hide"},q,G);break;case"slideDown":P.animate({height:"hide"},q,G)}}),B&&d.hover(function(){clearTimeout(J)},function(){J=setTimeout(T,q)}),void 0;if(0==k&&(k=m),Q&&(k=2),x){if(m>=u)if("leftLoop"==e||"topLoop"==e)k=0!=m%t?(0^m/t)+1:m/t;else{var U=m-u;k=1+parseInt(0!=U%t?U/t+1:U/t),0>=k&&(k=1)}else k=1;j.html("");var V="";if(1==c.autoPage||"true"==c.autoPage)for(var W=0;k>W;W++)V+="
  • "+(W+1)+"
  • ";else for(var W=0;k>W;W++)V+=c.autoPage.replace("$",W+1);j.html(V);var j=j.children()}if(m>=u){l.children().each(function(){a(this).width()>E&&(E=a(this).width(),D=a(this).outerWidth(!0)),a(this).height()>F&&(F=a(this).height(),C=a(this).outerHeight(!0))});var X=l.children(),Y=function(){for(var a=0;u>a;a++)X.eq(a).clone().addClass("clone").appendTo(l);for(var a=0;O>a;a++)X.eq(m-a-1).clone().addClass("clone").prependTo(l)};switch(e){case"fold":l.css({position:"relative",width:D,height:C}).children().css({position:"absolute",width:E,left:0,top:0,display:"none"});break;case"top":l.wrap('
    ').css({top:-(p*t)*C,position:"relative",padding:"0",margin:"0"}).children().css({height:F});break;case"left":l.wrap('
    ').css({width:m*D,left:-(p*t)*D,position:"relative",overflow:"hidden",padding:"0",margin:"0"}).children().css({"float":"left",width:E});break;case"leftLoop":case"leftMarquee":Y(),l.wrap('
    ').css({width:(m+u+O)*D,position:"relative",overflow:"hidden",padding:"0",margin:"0",left:-(O+p*t)*D}).children().css({"float":"left",width:E});break;case"topLoop":case"topMarquee":Y(),l.wrap('
    ').css({height:(m+u+O)*C,position:"relative",padding:"0",margin:"0",top:-(O+p*t)*C}).children().css({height:F})}}var Z=function(a){var b=a*t;return a==k?b=m:-1==a&&0!=m%t&&(b=-m%t),b},$=function(b){var c=function(c){for(var d=c;u+c>d;d++)b.eq(d).find("img["+n+"]").each(function(){var b=a(this);if(b.attr("src",b.attr(n)).removeAttr(n),l.find(".clone")[0])for(var c=l.children(),d=0;c.size()>d;d++)c.eq(d).find("img["+n+"]").each(function(){a(this).attr(n)==b.attr("src")&&a(this).attr("src",a(this).attr(n)).removeAttr(n)})})};switch(e){case"fade":case"fold":case"top":case"left":case"slideDown":c(p*t);break;case"leftLoop":case"topLoop":c(O+Z(N));break;case"leftMarquee":case"topMarquee":var d="leftMarquee"==e?l.css("left").replace("px",""):l.css("top").replace("px",""),f="leftMarquee"==e?D:C,g=O;if(0!=d%f){var h=Math.abs(0^d/f);g=1==p?O+h:O+h-1}c(g)}},_=function(a){if(!A||M!=p||a||Q){if(Q?p>=1?p=1:0>=p&&(p=0):(N=p,p>=k?p=0:0>p&&(p=k-1)),R(),null!=n&&$(l.children()),o[0]&&(P=o.eq(p),null!=n&&$(o),"slideDown"==e?(o.not(P).stop(!0,!0).slideUp(q),P.slideDown(q,G,function(){l[0]||S()})):(o.not(P).stop(!0,!0).hide(),P.animate({opacity:"show"},q,function(){l[0]||S()}))),m>=u)switch(e){case"fade":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,G,function(){S()}).siblings().hide();break;case"fold":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,G,function(){S()}).siblings().animate({opacity:"hide"},q,G);break;case"top":l.stop(!0,!1).animate({top:-p*t*C},q,G,function(){S()});break;case"left":l.stop(!0,!1).animate({left:-p*t*D},q,G,function(){S()});break;case"leftLoop":var b=N;l.stop(!0,!0).animate({left:-(Z(N)+O)*D},q,G,function(){-1>=b?l.css("left",-(O+(k-1)*t)*D):b>=k&&l.css("left",-O*D),S()});break;case"topLoop":var b=N;l.stop(!0,!0).animate({top:-(Z(N)+O)*C},q,G,function(){-1>=b?l.css("top",-(O+(k-1)*t)*C):b>=k&&l.css("top",-O*C),S()});break;case"leftMarquee":var c=l.css("left").replace("px","");0==p?l.animate({left:++c},0,function(){l.css("left").replace("px","")>=0&&l.css("left",-m*D)}):l.animate({left:--c},0,function(){-(m+O)*D>=l.css("left").replace("px","")&&l.css("left",-O*D)});break;case"topMarquee":var d=l.css("top").replace("px","");0==p?l.animate({top:++d},0,function(){l.css("top").replace("px","")>=0&&l.css("top",-m*C)}):l.animate({top:--d},0,function(){-(m+O)*C>=l.css("top").replace("px","")&&l.css("top",-O*C)})}j.removeClass(K).eq(p).addClass(K),M=p,y||(g.removeClass("nextStop"),f.removeClass("prevStop"),0==p&&f.addClass("prevStop"),p==k-1&&g.addClass("nextStop")),h.html(""+(p+1)+"/"+k)}};A&&_(!0),B&&d.hover(function(){clearTimeout(J)},function(){J=setTimeout(function(){p=defaultIndex,A?_():"slideDown"==e?P.slideUp(q,T):P.animate({opacity:"hide"},q,T),M=p},300)});var ab=function(a){H=setInterval(function(){w?p--:p++,_()},a?a:r)},bb=function(a){H=setInterval(_,a?a:r)},cb=function(){z||(clearInterval(H),ab())},db=function(){(y||p!=k-1)&&(p++,_(),Q||cb())},eb=function(){(y||0!=p)&&(p--,_(),Q||cb())},fb=function(){clearInterval(H),Q?bb():ab(),i.removeClass("pauseState")},gb=function(){clearInterval(H),i.addClass("pauseState")};if(v?Q?(w?p--:p++,bb(),z&&l.hover(gb,fb)):(ab(),z&&d.hover(gb,fb)):(Q&&(w?p--:p++),i.addClass("pauseState")),i.click(function(){i.hasClass("pauseState")?fb():gb()}),"mouseover"==c.trigger?j.hover(function(){var a=j.index(this);I=setTimeout(function(){p=a,_(),cb()},c.triggerTime)},function(){clearTimeout(I)}):j.click(function(){p=j.index(this),_(),cb()}),Q){if(g.mousedown(db),f.mousedown(eb),y){var hb,ib=function(){hb=setTimeout(function(){clearInterval(H),bb(0^r/10)},150)},jb=function(){clearTimeout(hb),clearInterval(H),bb()};g.mousedown(ib),g.mouseup(jb),f.mousedown(ib),f.mouseup(jb)}"mouseover"==c.trigger&&(g.hover(db,function(){}),f.hover(eb,function(){}))}else g.click(db),f.click(eb)})}})(jQuery),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:1>(b/=e/2)?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return 1>(b/=e/2)?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),Math.abs(d)>h){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),Math.abs(d)>h){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(2==(b/=e/2))return c+d;if(g||(g=e*.3*1.5),Math.abs(d)>h){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return 1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:.5*h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),1>(b/=e/2)?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return 1/2.75>(b/=e)?d*7.5625*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}); \ No newline at end of file diff --git a/WebContent/js/jquery1.42.min.js b/WebContent/js/jquery1.42.min.js new file mode 100644 index 0000000000000000000000000000000000000000..48a88b8f48fa708223ff3c4f4c30ff62c9205d4e --- /dev/null +++ b/WebContent/js/jquery1.42.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
    ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
    "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); \ No newline at end of file diff --git a/WebContent/layui/css/layui.css b/WebContent/layui/css/layui.css new file mode 100644 index 0000000000000000000000000000000000000000..d2a04f44b3c6ac7526147fdb6f3fd463c342dae9 --- /dev/null +++ b/WebContent/layui/css/layui.css @@ -0,0 +1,5019 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ +.layui-inline, img { + display: inline-block; + vertical-align: middle +} + +h1, h2, h3, h4, h5, h6 { + font-weight: 400 +} + +.layui-edge, .layui-header, .layui-inline, .layui-main { + position: relative +} + +.layui-elip, .layui-form-checkbox span, .layui-form-pane .layui-form-label { + text-overflow: ellipsis; + white-space: nowrap +} + +.layui-btn, .layui-edge, .layui-inline, img { + vertical-align: middle +} + +.layui-btn, .layui-disabled, .layui-icon, .layui-unselect { + -webkit-user-select: none; + -ms-user-select: none; + -moz-user-select: none +} + +blockquote, body, button, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, pre, td, textarea, th, ul { + margin: 0; + padding: 0; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) +} + +a:active, a:hover { + outline: 0 +} + +img { + border: none +} + +li { + list-style: none +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +h4, h5, h6 { + font-size: 100% +} + +button, input, optgroup, option, select, textarea { + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; + outline: 0 +} + +pre { + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word +} + +body { + line-height: 24px; + font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif +} + +hr { + height: 1px; + margin: 10px 0; + border: 0; + clear: both +} + +a { + color: #333; + text-decoration: none +} + +a:hover { + color: #777 +} + +a cite { + font-style: normal; + *cursor: pointer +} + +.layui-border-box, .layui-border-box * { + box-sizing: border-box +} + +.layui-box, .layui-box * { + box-sizing: content-box +} + +.layui-clear { + clear: both; + *zoom: 1 +} + +.layui-clear:after { + content: '\20'; + clear: both; + *zoom: 1; + display: block; + height: 0 +} + +.layui-inline { + *display: inline; + *zoom: 1 +} + +.layui-edge { + display: inline-block; + width: 0; + height: 0; + border-width: 6px; + border-style: dashed; + border-color: transparent; + overflow: hidden +} + +.layui-edge-top { + top: -4px; + border-bottom-color: #999; + border-bottom-style: solid +} + +.layui-edge-right { + border-left-color: #999; + border-left-style: solid +} + +.layui-edge-bottom { + top: 2px; + border-top-color: #999; + border-top-style: solid +} + +.layui-edge-left { + border-right-color: #999; + border-right-style: solid +} + +.layui-elip { + overflow: hidden +} + +.layui-disabled, .layui-disabled:hover { + color: #d2d2d2 !important; + cursor: not-allowed !important +} + +.layui-circle { + border-radius: 100% +} + +.layui-show { + display: block !important +} + +.layui-hide { + display: none !important +} + +@font-face { + font-family: layui-icon; + src: url(../font/iconfont.eot?v=240); + src: url(../font/iconfont.eot?v=240#iefix) format('embedded-opentype'), url(../font/iconfont.svg?v=240#iconfont) format('svg'), url(../font/iconfont.woff?v=240) format('woff'), url(../font/iconfont.ttf?v=240) format('truetype') +} + +.layui-icon { + font-family: layui-icon !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.layui-icon-reply-fill:before { + content: "\e611" +} + +.layui-icon-set-fill:before { + content: "\e614" +} + +.layui-icon-menu-fill:before { + content: "\e60f" +} + +.layui-icon-search:before { + content: "\e615" +} + +.layui-icon-share:before { + content: "\e641" +} + +.layui-icon-set-sm:before { + content: "\e620" +} + +.layui-icon-engine:before { + content: "\e628" +} + +.layui-icon-close:before { + content: "\1006" +} + +.layui-icon-close-fill:before { + content: "\1007" +} + +.layui-icon-chart-screen:before { + content: "\e629" +} + +.layui-icon-star:before { + content: "\e600" +} + +.layui-icon-circle-dot:before { + content: "\e617" +} + +.layui-icon-chat:before { + content: "\e606" +} + +.layui-icon-release:before { + content: "\e609" +} + +.layui-icon-list:before { + content: "\e60a" +} + +.layui-icon-chart:before { + content: "\e62c" +} + +.layui-icon-ok-circle:before { + content: "\1005" +} + +.layui-icon-layim-theme:before { + content: "\e61b" +} + +.layui-icon-table:before { + content: "\e62d" +} + +.layui-icon-right:before { + content: "\e602" +} + +.layui-icon-left:before { + content: "\e603" +} + +.layui-icon-cart-simple:before { + content: "\e698" +} + +.layui-icon-face-cry:before { + content: "\e69c" +} + +.layui-icon-face-smile:before { + content: "\e6af" +} + +.layui-icon-survey:before { + content: "\e6b2" +} + +.layui-icon-tree:before { + content: "\e62e" +} + +.layui-icon-upload-circle:before { + content: "\e62f" +} + +.layui-icon-add-circle:before { + content: "\e61f" +} + +.layui-icon-download-circle:before { + content: "\e601" +} + +.layui-icon-templeate-1:before { + content: "\e630" +} + +.layui-icon-util:before { + content: "\e631" +} + +.layui-icon-face-surprised:before { + content: "\e664" +} + +.layui-icon-edit:before { + content: "\e642" +} + +.layui-icon-speaker:before { + content: "\e645" +} + +.layui-icon-down:before { + content: "\e61a" +} + +.layui-icon-file:before { + content: "\e621" +} + +.layui-icon-layouts:before { + content: "\e632" +} + +.layui-icon-rate-half:before { + content: "\e6c9" +} + +.layui-icon-add-circle-fine:before { + content: "\e608" +} + +.layui-icon-prev-circle:before { + content: "\e633" +} + +.layui-icon-read:before { + content: "\e705" +} + +.layui-icon-404:before { + content: "\e61c" +} + +.layui-icon-carousel:before { + content: "\e634" +} + +.layui-icon-help:before { + content: "\e607" +} + +.layui-icon-code-circle:before { + content: "\e635" +} + +.layui-icon-water:before { + content: "\e636" +} + +.layui-icon-username:before { + content: "\e66f" +} + +.layui-icon-find-fill:before { + content: "\e670" +} + +.layui-icon-about:before { + content: "\e60b" +} + +.layui-icon-location:before { + content: "\e715" +} + +.layui-icon-up:before { + content: "\e619" +} + +.layui-icon-pause:before { + content: "\e651" +} + +.layui-icon-date:before { + content: "\e637" +} + +.layui-icon-layim-uploadfile:before { + content: "\e61d" +} + +.layui-icon-delete:before { + content: "\e640" +} + +.layui-icon-play:before { + content: "\e652" +} + +.layui-icon-top:before { + content: "\e604" +} + +.layui-icon-friends:before { + content: "\e612" +} + +.layui-icon-refresh-3:before { + content: "\e9aa" +} + +.layui-icon-ok:before { + content: "\e605" +} + +.layui-icon-layer:before { + content: "\e638" +} + +.layui-icon-face-smile-fine:before { + content: "\e60c" +} + +.layui-icon-dollar:before { + content: "\e659" +} + +.layui-icon-group:before { + content: "\e613" +} + +.layui-icon-layim-download:before { + content: "\e61e" +} + +.layui-icon-picture-fine:before { + content: "\e60d" +} + +.layui-icon-link:before { + content: "\e64c" +} + +.layui-icon-diamond:before { + content: "\e735" +} + +.layui-icon-log:before { + content: "\e60e" +} + +.layui-icon-rate-solid:before { + content: "\e67a" +} + +.layui-icon-fonts-del:before { + content: "\e64f" +} + +.layui-icon-unlink:before { + content: "\e64d" +} + +.layui-icon-fonts-clear:before { + content: "\e639" +} + +.layui-icon-triangle-r:before { + content: "\e623" +} + +.layui-icon-circle:before { + content: "\e63f" +} + +.layui-icon-radio:before { + content: "\e643" +} + +.layui-icon-align-center:before { + content: "\e647" +} + +.layui-icon-align-right:before { + content: "\e648" +} + +.layui-icon-align-left:before { + content: "\e649" +} + +.layui-icon-loading-1:before { + content: "\e63e" +} + +.layui-icon-return:before { + content: "\e65c" +} + +.layui-icon-fonts-strong:before { + content: "\e62b" +} + +.layui-icon-upload:before { + content: "\e67c" +} + +.layui-icon-dialogue:before { + content: "\e63a" +} + +.layui-icon-video:before { + content: "\e6ed" +} + +.layui-icon-headset:before { + content: "\e6fc" +} + +.layui-icon-cellphone-fine:before { + content: "\e63b" +} + +.layui-icon-add-1:before { + content: "\e654" +} + +.layui-icon-face-smile-b:before { + content: "\e650" +} + +.layui-icon-fonts-html:before { + content: "\e64b" +} + +.layui-icon-form:before { + content: "\e63c" +} + +.layui-icon-cart:before { + content: "\e657" +} + +.layui-icon-camera-fill:before { + content: "\e65d" +} + +.layui-icon-tabs:before { + content: "\e62a" +} + +.layui-icon-fonts-code:before { + content: "\e64e" +} + +.layui-icon-fire:before { + content: "\e756" +} + +.layui-icon-set:before { + content: "\e716" +} + +.layui-icon-fonts-u:before { + content: "\e646" +} + +.layui-icon-triangle-d:before { + content: "\e625" +} + +.layui-icon-tips:before { + content: "\e702" +} + +.layui-icon-picture:before { + content: "\e64a" +} + +.layui-icon-more-vertical:before { + content: "\e671" +} + +.layui-icon-flag:before { + content: "\e66c" +} + +.layui-icon-loading:before { + content: "\e63d" +} + +.layui-icon-fonts-i:before { + content: "\e644" +} + +.layui-icon-refresh-1:before { + content: "\e666" +} + +.layui-icon-rmb:before { + content: "\e65e" +} + +.layui-icon-home:before { + content: "\e68e" +} + +.layui-icon-user:before { + content: "\e770" +} + +.layui-icon-notice:before { + content: "\e667" +} + +.layui-icon-login-weibo:before { + content: "\e675" +} + +.layui-icon-voice:before { + content: "\e688" +} + +.layui-icon-upload-drag:before { + content: "\e681" +} + +.layui-icon-login-qq:before { + content: "\e676" +} + +.layui-icon-snowflake:before { + content: "\e6b1" +} + +.layui-icon-file-b:before { + content: "\e655" +} + +.layui-icon-template:before { + content: "\e663" +} + +.layui-icon-auz:before { + content: "\e672" +} + +.layui-icon-console:before { + content: "\e665" +} + +.layui-icon-app:before { + content: "\e653" +} + +.layui-icon-prev:before { + content: "\e65a" +} + +.layui-icon-website:before { + content: "\e7ae" +} + +.layui-icon-next:before { + content: "\e65b" +} + +.layui-icon-component:before { + content: "\e857" +} + +.layui-icon-more:before { + content: "\e65f" +} + +.layui-icon-login-wechat:before { + content: "\e677" +} + +.layui-icon-shrink-right:before { + content: "\e668" +} + +.layui-icon-spread-left:before { + content: "\e66b" +} + +.layui-icon-camera:before { + content: "\e660" +} + +.layui-icon-note:before { + content: "\e66e" +} + +.layui-icon-refresh:before { + content: "\e669" +} + +.layui-icon-female:before { + content: "\e661" +} + +.layui-icon-male:before { + content: "\e662" +} + +.layui-icon-password:before { + content: "\e673" +} + +.layui-icon-senior:before { + content: "\e674" +} + +.layui-icon-theme:before { + content: "\e66a" +} + +.layui-icon-tread:before { + content: "\e6c5" +} + +.layui-icon-praise:before { + content: "\e6c6" +} + +.layui-icon-star-fill:before { + content: "\e658" +} + +.layui-icon-rate:before { + content: "\e67b" +} + +.layui-icon-template-1:before { + content: "\e656" +} + +.layui-icon-vercode:before { + content: "\e679" +} + +.layui-icon-cellphone:before { + content: "\e678" +} + +.layui-icon-screen-full:before { + content: "\e622" +} + +.layui-icon-screen-restore:before { + content: "\e758" +} + +.layui-icon-cols:before { + content: "\e610" +} + +.layui-icon-export:before { + content: "\e67d" +} + +.layui-icon-print:before { + content: "\e66d" +} + +.layui-icon-slider:before { + content: "\e714" +} + +.layui-main { + width: 1140px; + margin: 0 auto +} + +.layui-header { + z-index: 1000; + height: 60px +} + +.layui-header a:hover { + transition: all .5s; + -webkit-transition: all .5s +} + +.layui-side { + position: fixed; + left: 0; + top: 0; + bottom: 0; + z-index: 999; + width: 200px; + overflow-x: hidden +} + +.layui-side-scroll { + position: relative; + width: 220px; + height: 100%; + overflow-x: hidden +} + +.layui-body { + position: absolute; + left: 200px; + right: 0; + top: 0; + bottom: 0; + z-index: 998; + width: auto; + overflow: hidden; + overflow-y: auto; + box-sizing: border-box +} + +.layui-layout-body { + overflow: hidden +} + +.layui-layout-admin .layui-header { + background-color: #23262E +} + +.layui-layout-admin .layui-side { + top: 60px; + width: 200px; + overflow-x: hidden +} + +.layui-layout-admin .layui-body { + top: 60px; + bottom: 44px +} + +.layui-layout-admin .layui-main { + width: auto; + margin: 0 15px +} + +.layui-layout-admin .layui-footer { + position: fixed; + left: 200px; + right: 0; + bottom: 0; + height: 44px; + line-height: 44px; + padding: 0 15px; + background-color: #eee +} + +.layui-layout-admin .layui-logo { + position: absolute; + left: 0; + top: 0; + width: 200px; + height: 100%; + line-height: 60px; + text-align: center; + color: #009688; + font-size: 16px +} + +.layui-layout-admin .layui-header .layui-nav { + background: 0 0 +} + +.layui-layout-left { + position: absolute !important; + left: 200px; + top: 0 +} + +.layui-layout-right { + position: absolute !important; + right: 0; + top: 0 +} + +.layui-container { + position: relative; + margin: 0 auto; + padding: 0 15px; + box-sizing: border-box +} + +.layui-fluid { + position: relative; + margin: 0 auto; + padding: 0 15px +} + +.layui-row:after, .layui-row:before { + content: ''; + display: block; + clear: both +} + +.layui-col-lg1, .layui-col-lg10, .layui-col-lg11, .layui-col-lg12, .layui-col-lg2, .layui-col-lg3, .layui-col-lg4, .layui-col-lg5, .layui-col-lg6, .layui-col-lg7, .layui-col-lg8, .layui-col-lg9, .layui-col-md1, .layui-col-md10, .layui-col-md11, .layui-col-md12, .layui-col-md2, .layui-col-md3, .layui-col-md4, .layui-col-md5, .layui-col-md6, .layui-col-md7, .layui-col-md8, .layui-col-md9, .layui-col-sm1, .layui-col-sm10, .layui-col-sm11, .layui-col-sm12, .layui-col-sm2, .layui-col-sm3, .layui-col-sm4, .layui-col-sm5, .layui-col-sm6, .layui-col-sm7, .layui-col-sm8, .layui-col-sm9, .layui-col-xs1, .layui-col-xs10, .layui-col-xs11, .layui-col-xs12, .layui-col-xs2, .layui-col-xs3, .layui-col-xs4, .layui-col-xs5, .layui-col-xs6, .layui-col-xs7, .layui-col-xs8, .layui-col-xs9 { + position: relative; + display: block; + box-sizing: border-box +} + +.layui-col-xs1, .layui-col-xs10, .layui-col-xs11, .layui-col-xs12, .layui-col-xs2, .layui-col-xs3, .layui-col-xs4, .layui-col-xs5, .layui-col-xs6, .layui-col-xs7, .layui-col-xs8, .layui-col-xs9 { + float: left +} + +.layui-col-xs1 { + width: 8.33333333% +} + +.layui-col-xs2 { + width: 16.66666667% +} + +.layui-col-xs3 { + width: 25% +} + +.layui-col-xs4 { + width: 33.33333333% +} + +.layui-col-xs5 { + width: 41.66666667% +} + +.layui-col-xs6 { + width: 50% +} + +.layui-col-xs7 { + width: 58.33333333% +} + +.layui-col-xs8 { + width: 66.66666667% +} + +.layui-col-xs9 { + width: 75% +} + +.layui-col-xs10 { + width: 83.33333333% +} + +.layui-col-xs11 { + width: 91.66666667% +} + +.layui-col-xs12 { + width: 100% +} + +.layui-col-xs-offset1 { + margin-left: 8.33333333% +} + +.layui-col-xs-offset2 { + margin-left: 16.66666667% +} + +.layui-col-xs-offset3 { + margin-left: 25% +} + +.layui-col-xs-offset4 { + margin-left: 33.33333333% +} + +.layui-col-xs-offset5 { + margin-left: 41.66666667% +} + +.layui-col-xs-offset6 { + margin-left: 50% +} + +.layui-col-xs-offset7 { + margin-left: 58.33333333% +} + +.layui-col-xs-offset8 { + margin-left: 66.66666667% +} + +.layui-col-xs-offset9 { + margin-left: 75% +} + +.layui-col-xs-offset10 { + margin-left: 83.33333333% +} + +.layui-col-xs-offset11 { + margin-left: 91.66666667% +} + +.layui-col-xs-offset12 { + margin-left: 100% +} + +@media screen and (max-width: 768px) { + .layui-hide-xs { + display: none !important + } + + .layui-show-xs-block { + display: block !important + } + + .layui-show-xs-inline { + display: inline !important + } + + .layui-show-xs-inline-block { + display: inline-block !important + } +} + +@media screen and (min-width: 768px) { + .layui-container { + width: 750px + } + + .layui-hide-sm { + display: none !important + } + + .layui-show-sm-block { + display: block !important + } + + .layui-show-sm-inline { + display: inline !important + } + + .layui-show-sm-inline-block { + display: inline-block !important + } + + .layui-col-sm1, .layui-col-sm10, .layui-col-sm11, .layui-col-sm12, .layui-col-sm2, .layui-col-sm3, .layui-col-sm4, .layui-col-sm5, .layui-col-sm6, .layui-col-sm7, .layui-col-sm8, .layui-col-sm9 { + float: left + } + + .layui-col-sm1 { + width: 8.33333333% + } + + .layui-col-sm2 { + width: 16.66666667% + } + + .layui-col-sm3 { + width: 25% + } + + .layui-col-sm4 { + width: 33.33333333% + } + + .layui-col-sm5 { + width: 41.66666667% + } + + .layui-col-sm6 { + width: 50% + } + + .layui-col-sm7 { + width: 58.33333333% + } + + .layui-col-sm8 { + width: 66.66666667% + } + + .layui-col-sm9 { + width: 75% + } + + .layui-col-sm10 { + width: 83.33333333% + } + + .layui-col-sm11 { + width: 91.66666667% + } + + .layui-col-sm12 { + width: 100% + } + + .layui-col-sm-offset1 { + margin-left: 8.33333333% + } + + .layui-col-sm-offset2 { + margin-left: 16.66666667% + } + + .layui-col-sm-offset3 { + margin-left: 25% + } + + .layui-col-sm-offset4 { + margin-left: 33.33333333% + } + + .layui-col-sm-offset5 { + margin-left: 41.66666667% + } + + .layui-col-sm-offset6 { + margin-left: 50% + } + + .layui-col-sm-offset7 { + margin-left: 58.33333333% + } + + .layui-col-sm-offset8 { + margin-left: 66.66666667% + } + + .layui-col-sm-offset9 { + margin-left: 75% + } + + .layui-col-sm-offset10 { + margin-left: 83.33333333% + } + + .layui-col-sm-offset11 { + margin-left: 91.66666667% + } + + .layui-col-sm-offset12 { + margin-left: 100% + } +} + +@media screen and (min-width: 992px) { + .layui-container { + width: 970px + } + + .layui-hide-md { + display: none !important + } + + .layui-show-md-block { + display: block !important + } + + .layui-show-md-inline { + display: inline !important + } + + .layui-show-md-inline-block { + display: inline-block !important + } + + .layui-col-md1, .layui-col-md10, .layui-col-md11, .layui-col-md12, .layui-col-md2, .layui-col-md3, .layui-col-md4, .layui-col-md5, .layui-col-md6, .layui-col-md7, .layui-col-md8, .layui-col-md9 { + float: left + } + + .layui-col-md1 { + width: 8.33333333% + } + + .layui-col-md2 { + width: 16.66666667% + } + + .layui-col-md3 { + width: 25% + } + + .layui-col-md4 { + width: 33.33333333% + } + + .layui-col-md5 { + width: 41.66666667% + } + + .layui-col-md6 { + width: 50% + } + + .layui-col-md7 { + width: 58.33333333% + } + + .layui-col-md8 { + width: 66.66666667% + } + + .layui-col-md9 { + width: 75% + } + + .layui-col-md10 { + width: 83.33333333% + } + + .layui-col-md11 { + width: 91.66666667% + } + + .layui-col-md12 { + width: 100% + } + + .layui-col-md-offset1 { + margin-left: 8.33333333% + } + + .layui-col-md-offset2 { + margin-left: 16.66666667% + } + + .layui-col-md-offset3 { + margin-left: 25% + } + + .layui-col-md-offset4 { + margin-left: 33.33333333% + } + + .layui-col-md-offset5 { + margin-left: 41.66666667% + } + + .layui-col-md-offset6 { + margin-left: 50% + } + + .layui-col-md-offset7 { + margin-left: 58.33333333% + } + + .layui-col-md-offset8 { + margin-left: 66.66666667% + } + + .layui-col-md-offset9 { + margin-left: 75% + } + + .layui-col-md-offset10 { + margin-left: 83.33333333% + } + + .layui-col-md-offset11 { + margin-left: 91.66666667% + } + + .layui-col-md-offset12 { + margin-left: 100% + } +} + +@media screen and (min-width: 1200px) { + .layui-container { + width: 1170px + } + + .layui-hide-lg { + display: none !important + } + + .layui-show-lg-block { + display: block !important + } + + .layui-show-lg-inline { + display: inline !important + } + + .layui-show-lg-inline-block { + display: inline-block !important + } + + .layui-col-lg1, .layui-col-lg10, .layui-col-lg11, .layui-col-lg12, .layui-col-lg2, .layui-col-lg3, .layui-col-lg4, .layui-col-lg5, .layui-col-lg6, .layui-col-lg7, .layui-col-lg8, .layui-col-lg9 { + float: left + } + + .layui-col-lg1 { + width: 8.33333333% + } + + .layui-col-lg2 { + width: 16.66666667% + } + + .layui-col-lg3 { + width: 25% + } + + .layui-col-lg4 { + width: 33.33333333% + } + + .layui-col-lg5 { + width: 41.66666667% + } + + .layui-col-lg6 { + width: 50% + } + + .layui-col-lg7 { + width: 58.33333333% + } + + .layui-col-lg8 { + width: 66.66666667% + } + + .layui-col-lg9 { + width: 75% + } + + .layui-col-lg10 { + width: 83.33333333% + } + + .layui-col-lg11 { + width: 91.66666667% + } + + .layui-col-lg12 { + width: 100% + } + + .layui-col-lg-offset1 { + margin-left: 8.33333333% + } + + .layui-col-lg-offset2 { + margin-left: 16.66666667% + } + + .layui-col-lg-offset3 { + margin-left: 25% + } + + .layui-col-lg-offset4 { + margin-left: 33.33333333% + } + + .layui-col-lg-offset5 { + margin-left: 41.66666667% + } + + .layui-col-lg-offset6 { + margin-left: 50% + } + + .layui-col-lg-offset7 { + margin-left: 58.33333333% + } + + .layui-col-lg-offset8 { + margin-left: 66.66666667% + } + + .layui-col-lg-offset9 { + margin-left: 75% + } + + .layui-col-lg-offset10 { + margin-left: 83.33333333% + } + + .layui-col-lg-offset11 { + margin-left: 91.66666667% + } + + .layui-col-lg-offset12 { + margin-left: 100% + } +} + +.layui-col-space1 { + margin: -.5px +} + +.layui-col-space1 > * { + padding: .5px +} + +.layui-col-space3 { + margin: -1.5px +} + +.layui-col-space3 > * { + padding: 1.5px +} + +.layui-col-space5 { + margin: -2.5px +} + +.layui-col-space5 > * { + padding: 2.5px +} + +.layui-col-space8 { + margin: -3.5px +} + +.layui-col-space8 > * { + padding: 3.5px +} + +.layui-col-space10 { + margin: -5px +} + +.layui-col-space10 > * { + padding: 5px +} + +.layui-col-space12 { + margin: -6px +} + +.layui-col-space12 > * { + padding: 6px +} + +.layui-col-space15 { + margin: -7.5px +} + +.layui-col-space15 > * { + padding: 7.5px +} + +.layui-col-space18 { + margin: -9px +} + +.layui-col-space18 > * { + padding: 9px +} + +.layui-col-space20 { + margin: -10px +} + +.layui-col-space20 > * { + padding: 10px +} + +.layui-col-space22 { + margin: -11px +} + +.layui-col-space22 > * { + padding: 11px +} + +.layui-col-space25 { + margin: -12.5px +} + +.layui-col-space25 > * { + padding: 12.5px +} + +.layui-col-space30 { + margin: -15px +} + +.layui-col-space30 > * { + padding: 15px +} + +.layui-btn, .layui-input, .layui-select, .layui-textarea, .layui-upload-button { + outline: 0; + -webkit-appearance: none; + transition: all .3s; + -webkit-transition: all .3s; + box-sizing: border-box +} + +.layui-elem-quote { + margin-bottom: 10px; + padding: 15px; + line-height: 22px; + border-left: 5px solid #009688; + border-radius: 0 2px 2px 0; + background-color: #f2f2f2 +} + +.layui-quote-nm { + border-style: solid; + border-width: 1px 1px 1px 5px; + background: 0 0 +} + +.layui-elem-field { + margin-bottom: 10px; + padding: 0; + border-width: 1px; + border-style: solid +} + +.layui-elem-field legend { + margin-left: 20px; + padding: 0 10px; + font-size: 20px; + font-weight: 300 +} + +.layui-field-title { + margin: 10px 0 20px; + border-width: 1px 0 0 +} + +.layui-field-box { + padding: 10px 15px +} + +.layui-field-title .layui-field-box { + padding: 10px 0 +} + +.layui-progress { + position: relative; + height: 6px; + border-radius: 20px; + background-color: #e2e2e2 +} + +.layui-progress-bar { + position: absolute; + left: 0; + top: 0; + width: 0; + max-width: 100%; + height: 6px; + border-radius: 20px; + text-align: right; + background-color: #5FB878; + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-progress-big, .layui-progress-big .layui-progress-bar { + height: 18px; + line-height: 18px +} + +.layui-progress-text { + position: relative; + top: -20px; + line-height: 18px; + font-size: 12px; + color: #666 +} + +.layui-progress-big .layui-progress-text { + position: static; + padding: 0 10px; + color: #fff +} + +.layui-collapse { + border-width: 1px; + border-style: solid; + border-radius: 2px +} + +.layui-colla-content, .layui-colla-item { + border-top-width: 1px; + border-top-style: solid +} + +.layui-colla-item:first-child { + border-top: none +} + +.layui-colla-title { + position: relative; + height: 42px; + line-height: 42px; + padding: 0 15px 0 35px; + color: #333; + background-color: #f2f2f2; + cursor: pointer; + font-size: 14px; + overflow: hidden +} + +.layui-colla-content { + display: none; + padding: 10px 15px; + line-height: 22px; + color: #666 +} + +.layui-colla-icon { + position: absolute; + left: 15px; + top: 0; + font-size: 14px +} + +.layui-card { + margin-bottom: 15px; + border-radius: 2px; + background-color: #fff; + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05) +} + +.layui-card:last-child { + margin-bottom: 0 +} + +.layui-card-header { + position: relative; + height: 42px; + line-height: 42px; + padding: 0 15px; + border-bottom: 1px solid #f6f6f6; + color: #333; + border-radius: 2px 2px 0 0; + font-size: 14px +} + +.layui-bg-black, .layui-bg-blue, .layui-bg-cyan, .layui-bg-green, .layui-bg-orange, .layui-bg-red { + color: #fff !important +} + +.layui-card-body { + position: relative; + padding: 10px 15px; + line-height: 24px +} + +.layui-card-body[pad15] { + padding: 15px +} + +.layui-card-body[pad20] { + padding: 20px +} + +.layui-card-body .layui-table { + margin: 5px 0 +} + +.layui-card .layui-tab { + margin: 0 +} + +.layui-panel-window { + position: relative; + padding: 15px; + border-radius: 0; + border-top: 5px solid #E6E6E6; + background-color: #fff +} + +.layui-auxiliar-moving { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + width: 100%; + height: 100%; + background: 0 0; + z-index: 9999999999 +} + +.layui-form-label, .layui-form-mid, .layui-form-select, .layui-input-block, .layui-input-inline, .layui-textarea { + position: relative +} + +.layui-bg-red { + background-color: #FF5722 !important +} + +.layui-bg-orange { + background-color: #FFB800 !important +} + +.layui-bg-green { + background-color: #009688 !important +} + +.layui-bg-cyan { + background-color: #2F4056 !important +} + +.layui-bg-blue { + background-color: #1E9FFF !important +} + +.layui-bg-black { + background-color: #393D49 !important +} + +.layui-bg-gray { + background-color: #eee !important; + color: #666 !important +} + +.layui-badge-rim, .layui-colla-content, .layui-colla-item, .layui-collapse, .layui-elem-field, .layui-form-pane .layui-form-item[pane], .layui-form-pane .layui-form-label, .layui-input, .layui-layedit, .layui-layedit-tool, .layui-quote-nm, .layui-select, .layui-tab-bar, .layui-tab-card, .layui-tab-title, .layui-tab-title .layui-this:after, .layui-textarea { + border-color: #e6e6e6 +} + +.layui-timeline-item:before, hr { + background-color: #e6e6e6 +} + +.layui-text { + line-height: 22px; + font-size: 14px; + color: #666 +} + +.layui-text h1, .layui-text h2, .layui-text h3 { + font-weight: 500; + color: #333 +} + +.layui-text h1 { + font-size: 30px +} + +.layui-text h2 { + font-size: 24px +} + +.layui-text h3 { + font-size: 18px +} + +.layui-text a:not(.layui-btn) { + color: #01AAED +} + +.layui-text a:not(.layui-btn):hover { + text-decoration: underline +} + +.layui-text ul { + padding: 5px 0 5px 15px +} + +.layui-text ul li { + margin-top: 5px; + list-style-type: disc +} + +.layui-text em, .layui-word-aux { + color: #999 !important; + padding: 0 5px !important +} + +.layui-btn { + display: inline-block; + height: 38px; + line-height: 38px; + padding: 0 18px; + background-color: #009688; + color: #fff; + white-space: nowrap; + text-align: center; + font-size: 14px; + border: none; + border-radius: 2px; + cursor: pointer +} + +.layui-btn:hover { + opacity: .8; + filter: alpha(opacity=80); + color: #fff +} + +.layui-btn:active { + opacity: 1; + filter: alpha(opacity=100) +} + +.layui-btn + .layui-btn { + margin-left: 10px +} + +.layui-btn-container { + font-size: 0 +} + +.layui-btn-container .layui-btn { + margin-right: 10px; + margin-bottom: 10px +} + +.layui-btn-container .layui-btn + .layui-btn { + margin-left: 0 +} + +.layui-table .layui-btn-container .layui-btn { + margin-bottom: 9px +} + +.layui-btn-radius { + border-radius: 100px +} + +.layui-btn .layui-icon { + margin-right: 3px; + font-size: 18px; + vertical-align: bottom; + vertical-align: middle \9 +} + +.layui-btn-primary { + border: 1px solid #C9C9C9; + background-color: #fff; + color: #555 +} + +.layui-btn-primary:hover { + border-color: #009688; + color: #333 +} + +.layui-btn-normal { + background-color: #1E9FFF +} + +.layui-btn-warm { + background-color: #FFB800 +} + +.layui-btn-danger { + background-color: #FF5722 +} + +.layui-btn-disabled, .layui-btn-disabled:active, .layui-btn-disabled:hover { + border: 1px solid #e6e6e6; + background-color: #FBFBFB; + color: #C9C9C9; + cursor: not-allowed; + opacity: 1 +} + +.layui-btn-lg { + height: 44px; + line-height: 44px; + padding: 0 25px; + font-size: 16px +} + +.layui-btn-sm { + height: 30px; + line-height: 30px; + padding: 0 10px; + font-size: 12px +} + +.layui-btn-sm i { + font-size: 16px !important +} + +.layui-btn-xs { + height: 22px; + line-height: 22px; + padding: 0 5px; + font-size: 12px +} + +.layui-btn-xs i { + font-size: 14px !important +} + +.layui-btn-group { + display: inline-block; + vertical-align: middle; + font-size: 0 +} + +.layui-btn-group .layui-btn { + margin-left: 0 !important; + margin-right: 0 !important; + border-left: 1px solid rgba(255, 255, 255, .5); + border-radius: 0 +} + +.layui-btn-group .layui-btn-primary { + border-left: none +} + +.layui-btn-group .layui-btn-primary:hover { + border-color: #C9C9C9; + color: #009688 +} + +.layui-btn-group .layui-btn:first-child { + border-left: none; + border-radius: 2px 0 0 2px +} + +.layui-btn-group .layui-btn-primary:first-child { + border-left: 1px solid #c9c9c9 +} + +.layui-btn-group .layui-btn:last-child { + border-radius: 0 2px 2px 0 +} + +.layui-btn-group .layui-btn + .layui-btn { + margin-left: 0 +} + +.layui-btn-group + .layui-btn-group { + margin-left: 10px +} + +.layui-btn-fluid { + width: 100% +} + +.layui-input, .layui-select, .layui-textarea { + height: 38px; + line-height: 1.3; + line-height: 38px \9; + border-width: 1px; + border-style: solid; + background-color: #fff; + border-radius: 2px +} + +.layui-input::-webkit-input-placeholder, .layui-select::-webkit-input-placeholder, .layui-textarea::-webkit-input-placeholder { + line-height: 1.3 +} + +.layui-input, .layui-textarea { + display: block; + width: 100%; + padding-left: 10px +} + +.layui-input:hover, .layui-textarea:hover { + border-color: #D2D2D2 !important +} + +.layui-input:focus, .layui-textarea:focus { + border-color: #C9C9C9 !important +} + +.layui-textarea { + min-height: 100px; + height: auto; + line-height: 20px; + padding: 6px 10px; + resize: vertical +} + +.layui-select { + padding: 0 10px +} + +.layui-form input[type=checkbox], .layui-form input[type=radio], .layui-form select { + display: none +} + +.layui-form [lay-ignore] { + display: initial +} + +.layui-form-item { + margin-bottom: 15px; + clear: both; + *zoom: 1 +} + +.layui-form-item:after { + content: '\20'; + clear: both; + *zoom: 1; + display: block; + height: 0 +} + +.layui-form-label { + float: left; + display: block; + padding: 9px 15px; + width: 80px; + font-weight: 400; + line-height: 20px; + text-align: right +} + +.layui-form-label-col { + display: block; + float: none; + padding: 9px 0; + line-height: 20px; + text-align: left +} + +.layui-form-item .layui-inline { + margin-bottom: 5px; + margin-right: 10px +} + +.layui-input-block { + margin-left: 110px; + min-height: 36px +} + +.layui-input-inline { + display: inline-block; + vertical-align: middle +} + +.layui-form-item .layui-input-inline { + float: left; + width: 190px; + margin-right: 10px +} + +.layui-form-text .layui-input-inline { + width: auto +} + +.layui-form-mid { + float: left; + display: block; + padding: 9px 0 !important; + line-height: 20px; + margin-right: 10px +} + +.layui-form-danger + .layui-form-select .layui-input, .layui-form-danger:focus { + border-color: #FF5722 !important +} + +.layui-form-select .layui-input { + padding-right: 30px; + cursor: pointer +} + +.layui-form-select .layui-edge { + position: absolute; + right: 10px; + top: 50%; + margin-top: -3px; + cursor: pointer; + border-width: 6px; + border-top-color: #c2c2c2; + border-top-style: solid; + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-form-select dl { + display: none; + position: absolute; + left: 0; + top: 42px; + padding: 5px 0; + z-index: 899; + min-width: 100%; + border: 1px solid #d2d2d2; + max-height: 300px; + overflow-y: auto; + background-color: #fff; + border-radius: 2px; + box-shadow: 0 2px 4px rgba(0, 0, 0, .12); + box-sizing: border-box +} + +.layui-form-select dl dd, .layui-form-select dl dt { + padding: 0 10px; + line-height: 36px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.layui-form-select dl dt { + font-size: 12px; + color: #999 +} + +.layui-form-select dl dd { + cursor: pointer +} + +.layui-form-select dl dd:hover { + background-color: #f2f2f2; + -webkit-transition: .5s all; + transition: .5s all +} + +.layui-form-select .layui-select-group dd { + padding-left: 20px +} + +.layui-form-select dl dd.layui-select-tips { + padding-left: 10px !important; + color: #999 +} + +.layui-form-select dl dd.layui-this { + background-color: #5FB878; + color: #fff +} + +.layui-form-checkbox, .layui-form-select dl dd.layui-disabled { + background-color: #fff +} + +.layui-form-selected dl { + display: block +} + +.layui-form-checkbox, .layui-form-checkbox *, .layui-form-switch { + display: inline-block; + vertical-align: middle +} + +.layui-form-selected .layui-edge { + margin-top: -9px; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); + margin-top: -3px \9 +} + +:root .layui-form-selected .layui-edge { + margin-top: -9px \0/ IE9 +} + +.layui-form-selectup dl { + top: auto; + bottom: 42px +} + +.layui-select-none { + margin: 5px 0; + text-align: center; + color: #999 +} + +.layui-select-disabled .layui-disabled { + border-color: #eee !important +} + +.layui-select-disabled .layui-edge { + border-top-color: #d2d2d2 +} + +.layui-form-checkbox { + position: relative; + height: 30px; + line-height: 30px; + margin-right: 10px; + padding-right: 30px; + cursor: pointer; + font-size: 0; + -webkit-transition: .1s linear; + transition: .1s linear; + box-sizing: border-box +} + +.layui-form-checkbox span { + padding: 0 10px; + height: 100%; + font-size: 14px; + border-radius: 2px 0 0 2px; + background-color: #d2d2d2; + color: #fff; + overflow: hidden +} + +.layui-form-checkbox:hover span { + background-color: #c2c2c2 +} + +.layui-form-checkbox i { + position: absolute; + right: 0; + top: 0; + width: 30px; + height: 28px; + border: 1px solid #d2d2d2; + border-left: none; + border-radius: 0 2px 2px 0; + color: #fff; + font-size: 20px; + text-align: center +} + +.layui-form-checkbox:hover i { + border-color: #c2c2c2; + color: #c2c2c2 +} + +.layui-form-checked, .layui-form-checked:hover { + border-color: #5FB878 +} + +.layui-form-checked span, .layui-form-checked:hover span { + background-color: #5FB878 +} + +.layui-form-checked i, .layui-form-checked:hover i { + color: #5FB878 +} + +.layui-form-item .layui-form-checkbox { + margin-top: 4px +} + +.layui-form-checkbox[lay-skin=primary] { + height: auto !important; + line-height: normal !important; + min-width: 18px; + min-height: 18px; + border: none !important; + margin-right: 0; + padding-left: 28px; + padding-right: 0; + background: 0 0 +} + +.layui-form-checkbox[lay-skin=primary] span { + padding-left: 0; + padding-right: 15px; + line-height: 18px; + background: 0 0; + color: #666 +} + +.layui-form-checkbox[lay-skin=primary] i { + right: auto; + left: 0; + width: 16px; + height: 16px; + line-height: 16px; + border: 1px solid #d2d2d2; + font-size: 12px; + border-radius: 2px; + background-color: #fff; + -webkit-transition: .1s linear; + transition: .1s linear +} + +.layui-form-checkbox[lay-skin=primary]:hover i { + border-color: #5FB878; + color: #fff +} + +.layui-form-checked[lay-skin=primary] i { + border-color: #5FB878; + background-color: #5FB878; + color: #fff +} + +.layui-checkbox-disbaled[lay-skin=primary] span { + background: 0 0 !important; + color: #c2c2c2 +} + +.layui-checkbox-disbaled[lay-skin=primary]:hover i { + border-color: #d2d2d2 +} + +.layui-form-item .layui-form-checkbox[lay-skin=primary] { + margin-top: 10px +} + +.layui-form-switch { + position: relative; + height: 22px; + line-height: 22px; + min-width: 35px; + padding: 0 5px; + margin-top: 8px; + border: 1px solid #d2d2d2; + border-radius: 20px; + cursor: pointer; + background-color: #fff; + -webkit-transition: .1s linear; + transition: .1s linear +} + +.layui-form-switch i { + position: absolute; + left: 5px; + top: 3px; + width: 16px; + height: 16px; + border-radius: 20px; + background-color: #d2d2d2; + -webkit-transition: .1s linear; + transition: .1s linear +} + +.layui-form-switch em { + position: relative; + top: 0; + width: 25px; + margin-left: 21px; + padding: 0 !important; + text-align: center !important; + color: #999 !important; + font-style: normal !important; + font-size: 12px +} + +.layui-form-onswitch { + border-color: #5FB878; + background-color: #5FB878 +} + +.layui-checkbox-disbaled, .layui-checkbox-disbaled i { + border-color: #e2e2e2 !important +} + +.layui-form-onswitch i { + left: 100%; + margin-left: -21px; + background-color: #fff +} + +.layui-form-onswitch em { + margin-left: 5px; + margin-right: 21px; + color: #fff !important +} + +.layui-checkbox-disbaled span { + background-color: #e2e2e2 !important +} + +.layui-checkbox-disbaled:hover i { + color: #fff !important +} + +[lay-radio] { + display: none +} + +.layui-form-radio, .layui-form-radio * { + display: inline-block; + vertical-align: middle +} + +.layui-form-radio { + line-height: 28px; + margin: 6px 10px 0 0; + padding-right: 10px; + cursor: pointer; + font-size: 0 +} + +.layui-form-radio * { + font-size: 14px +} + +.layui-form-radio > i { + margin-right: 8px; + font-size: 22px; + color: #c2c2c2 +} + +.layui-form-radio > i:hover, .layui-form-radioed > i { + color: #5FB878 +} + +.layui-radio-disbaled > i { + color: #e2e2e2 !important +} + +.layui-form-pane .layui-form-label { + width: 110px; + padding: 8px 15px; + height: 38px; + line-height: 20px; + border-width: 1px; + border-style: solid; + border-radius: 2px 0 0 2px; + text-align: center; + background-color: #FBFBFB; + overflow: hidden; + box-sizing: border-box +} + +.layui-form-pane .layui-input-inline { + margin-left: -1px +} + +.layui-form-pane .layui-input-block { + margin-left: 110px; + left: -1px +} + +.layui-form-pane .layui-input { + border-radius: 0 2px 2px 0 +} + +.layui-form-pane .layui-form-text .layui-form-label { + float: none; + width: 100%; + border-radius: 2px; + box-sizing: border-box; + text-align: left +} + +.layui-form-pane .layui-form-text .layui-input-inline { + display: block; + margin: 0; + top: -1px; + clear: both +} + +.layui-form-pane .layui-form-text .layui-input-block { + margin: 0; + left: 0; + top: -1px +} + +.layui-form-pane .layui-form-text .layui-textarea { + min-height: 100px; + border-radius: 0 0 2px 2px +} + +.layui-form-pane .layui-form-checkbox { + margin: 4px 0 4px 10px +} + +.layui-form-pane .layui-form-radio, .layui-form-pane .layui-form-switch { + margin-top: 6px; + margin-left: 10px +} + +.layui-form-pane .layui-form-item[pane] { + position: relative; + border-width: 1px; + border-style: solid +} + +.layui-form-pane .layui-form-item[pane] .layui-form-label { + position: absolute; + left: 0; + top: 0; + height: 100%; + border-width: 0 1px 0 0 +} + +.layui-form-pane .layui-form-item[pane] .layui-input-inline { + margin-left: 110px +} + +@media screen and (max-width: 450px) { + .layui-form-item .layui-form-label { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap + } + + .layui-form-item .layui-inline { + display: block; + margin-right: 0; + margin-bottom: 20px; + clear: both + } + + .layui-form-item .layui-inline:after { + content: '\20'; + clear: both; + display: block; + height: 0 + } + + .layui-form-item .layui-input-inline { + display: block; + float: none; + left: -3px; + width: auto; + margin: 0 0 10px 112px + } + + .layui-form-item .layui-input-inline + .layui-form-mid { + margin-left: 110px; + top: -5px; + padding: 0 + } + + .layui-form-item .layui-form-checkbox { + margin-right: 5px; + margin-bottom: 5px + } +} + +.layui-layedit { + border-width: 1px; + border-style: solid; + border-radius: 2px +} + +.layui-layedit-tool { + padding: 3px 5px; + border-bottom-width: 1px; + border-bottom-style: solid; + font-size: 0 +} + +.layedit-tool-fixed { + position: fixed; + top: 0; + border-top: 1px solid #e2e2e2 +} + +.layui-layedit-tool .layedit-tool-mid, .layui-layedit-tool .layui-icon { + display: inline-block; + vertical-align: middle; + text-align: center; + font-size: 14px +} + +.layui-layedit-tool .layui-icon { + position: relative; + width: 32px; + height: 30px; + line-height: 30px; + margin: 3px 5px; + color: #777; + cursor: pointer; + border-radius: 2px +} + +.layui-layedit-tool .layui-icon:hover { + color: #393D49 +} + +.layui-layedit-tool .layui-icon:active { + color: #000 +} + +.layui-layedit-tool .layedit-tool-active { + background-color: #e2e2e2; + color: #000 +} + +.layui-layedit-tool .layui-disabled, .layui-layedit-tool .layui-disabled:hover { + color: #d2d2d2; + cursor: not-allowed +} + +.layui-layedit-tool .layedit-tool-mid { + width: 1px; + height: 18px; + margin: 0 10px; + background-color: #d2d2d2 +} + +.layedit-tool-html { + width: 50px !important; + font-size: 30px !important +} + +.layedit-tool-b, .layedit-tool-code, .layedit-tool-help { + font-size: 16px !important +} + +.layedit-tool-d, .layedit-tool-face, .layedit-tool-image, .layedit-tool-unlink { + font-size: 18px !important +} + +.layedit-tool-image input { + position: absolute; + font-size: 0; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: .01; + filter: Alpha(opacity=1); + cursor: pointer +} + +.layui-layedit-iframe iframe { + display: block; + width: 100% +} + +#LAY_layedit_code { + overflow: hidden +} + +.layui-laypage { + display: inline-block; + *display: inline; + *zoom: 1; + vertical-align: middle; + margin: 10px 0; + font-size: 0 +} + +.layui-laypage > a:first-child, .layui-laypage > a:first-child em { + border-radius: 2px 0 0 2px +} + +.layui-laypage > a:last-child, .layui-laypage > a:last-child em { + border-radius: 0 2px 2px 0 +} + +.layui-laypage > :first-child { + margin-left: 0 !important +} + +.layui-laypage > :last-child { + margin-right: 0 !important +} + +.layui-laypage a, .layui-laypage button, .layui-laypage input, .layui-laypage select, .layui-laypage span { + border: 1px solid #e2e2e2 +} + +.layui-laypage a, .layui-laypage span { + display: inline-block; + *display: inline; + *zoom: 1; + vertical-align: middle; + padding: 0 15px; + height: 28px; + line-height: 28px; + margin: 0 -1px 5px 0; + background-color: #fff; + color: #333; + font-size: 12px; + font-weight: bolder; +} + +.layui-flow-more a *, .layui-laypage input, .layui-table-view select[lay-ignore] { + display: inline-block +} + +.layui-laypage a:hover { + color: #009688 +} + +.layui-laypage em { + font-style: normal +} + +.layui-laypage .layui-laypage-spr { + color: #999; + font-weight: 700 +} + +.layui-laypage a { + text-decoration: none +} + +.layui-laypage .layui-laypage-curr { + position: relative +} + +.layui-laypage .layui-laypage-curr em { + position: relative; + color: #fff +} + +.layui-laypage .layui-laypage-curr .layui-laypage-em { + position: absolute; + left: -1px; + top: -1px; + padding: 1px; + width: 100%; + height: 100%; + background-color: #009688 +} + +.layui-laypage-em { + border-radius: 2px +} + +.layui-laypage-next em, .layui-laypage-prev em { + font-family: Sim sun; + font-size: 16px +} + +.layui-laypage .layui-laypage-count, .layui-laypage .layui-laypage-limits, .layui-laypage .layui-laypage-refresh, .layui-laypage .layui-laypage-skip { + margin-left: 10px; + margin-right: 10px; + padding: 0; + border: none +} + +.layui-laypage .layui-laypage-limits, .layui-laypage .layui-laypage-refresh { + vertical-align: top +} + +.layui-laypage .layui-laypage-refresh i { + font-size: 18px; + cursor: pointer +} + +.layui-laypage select { + height: 22px; + padding: 3px; + border-radius: 2px; + cursor: pointer +} + +.layui-laypage .layui-laypage-skip { + height: 30px; + line-height: 30px; + color: #999 +} + +.layui-laypage button, .layui-laypage input { + height: 30px; + line-height: 30px; + border-radius: 2px; + vertical-align: top; + background-color: #fff; + box-sizing: border-box +} + +.layui-laypage input { + width: 40px; + margin: 0 10px; + padding: 0 3px; + text-align: center +} + +.layui-laypage input:focus, .layui-laypage select:focus { + border-color: #009688 !important +} + +.layui-laypage button { + margin-left: 10px; + padding: 0 10px; + cursor: pointer +} + +.layui-table, .layui-table-view { + margin: 10px 0 +} + +.layui-flow-more { + margin: 10px 0; + text-align: center; + color: #999; + font-size: 14px +} + +.layui-flow-more a { + height: 32px; + line-height: 32px +} + +.layui-flow-more a * { + vertical-align: top +} + +.layui-flow-more a cite { + padding: 0 20px; + border-radius: 3px; + background-color: #eee; + color: #333; + font-style: normal +} + +.layui-flow-more a cite:hover { + opacity: .8 +} + +.layui-flow-more a i { + font-size: 30px; + color: #737383 +} + +.layui-table { + width: 100%; + background-color: #fff; + color: #666 +} + +.layui-table tr { + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-table th { + text-align: left; + font-weight: 400 +} + +.layui-table tbody tr:hover, .layui-table thead tr, .layui-table-click, .layui-table-header, .layui-table-hover, .layui-table-mend, .layui-table-patch, .layui-table-tool, .layui-table-total, .layui-table-total tr, .layui-table[lay-even] tr:nth-child(even) { + background-color: #f2f2f2 +} + +.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] { + border-width: 1px; + border-style: solid; + border-color: #e6e6e6 +} + +.layui-table td, .layui-table th { + position: relative; + padding: 9px 15px; + min-height: 20px; + line-height: 20px; + font-size: 14px +} + +.layui-table[lay-skin=line] td, .layui-table[lay-skin=line] th { + border-width: 0 0 1px +} + +.layui-table[lay-skin=row] td, .layui-table[lay-skin=row] th { + border-width: 0 1px 0 0 +} + +.layui-table[lay-skin=nob] td, .layui-table[lay-skin=nob] th { + border: none +} + +.layui-table img { + max-width: 100px +} + +.layui-table[lay-size=lg] td, .layui-table[lay-size=lg] th { + padding: 15px 30px +} + +.layui-table-view .layui-table[lay-size=lg] .layui-table-cell { + height: 40px; + line-height: 40px +} + +.layui-table[lay-size=sm] td, .layui-table[lay-size=sm] th { + font-size: 12px; + padding: 5px 10px +} + +.layui-table-view .layui-table[lay-size=sm] .layui-table-cell { + height: 20px; + line-height: 20px +} + +.layui-table[lay-data] { + display: none +} + +.layui-table-box { + position: relative; + overflow: hidden +} + +.layui-table-view .layui-table { + position: relative; + width: auto; + margin: 0 +} + +.layui-table-view .layui-table[lay-skin=line] { + border-width: 0 1px 0 0 +} + +.layui-table-view .layui-table[lay-skin=row] { + border-width: 0 0 1px +} + +.layui-table-view .layui-table td, .layui-table-view .layui-table th { + padding: 5px 0; + border-top: none; + border-left: none +} + +.layui-table-view .layui-table th.layui-unselect .layui-table-cell span { + cursor: pointer +} + +.layui-table-view .layui-table td { + cursor: default +} + +.layui-table-view .layui-form-checkbox[lay-skin=primary] i { + width: 18px; + height: 18px +} + +.layui-table-view .layui-form-radio { + line-height: 0; + padding: 0 +} + +.layui-table-view .layui-form-radio > i { + margin: 0; + font-size: 20px +} + +.layui-table-init { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + text-align: center; + z-index: 110 +} + +.layui-table-init .layui-icon { + position: absolute; + left: 50%; + top: 50%; + margin: -15px 0 0 -15px; + font-size: 30px; + color: #c2c2c2 +} + +.layui-table-header { + border-width: 0 0 1px; + overflow: hidden +} + +.layui-table-header .layui-table { + margin-bottom: -1px +} + +.layui-table-tool .layui-inline[lay-event] { + position: relative; + width: 26px; + height: 26px; + padding: 5px; + line-height: 16px; + margin-right: 10px; + text-align: center; + color: #333; + border: 1px solid #ccc; + cursor: pointer; + -webkit-transition: .5s all; + transition: .5s all +} + +.layui-table-tool .layui-inline[lay-event]:hover { + border: 1px solid #999 +} + +.layui-table-tool-temp { + padding-right: 120px +} + +.layui-table-tool-self { + position: absolute; + right: 17px; + top: 10px +} + +.layui-table-tool .layui-table-tool-self .layui-inline[lay-event] { + margin: 0 0 0 10px +} + +.layui-table-tool-panel { + position: absolute; + top: 29px; + left: -1px; + padding: 5px 0; + min-width: 150px; + min-height: 40px; + border: 1px solid #d2d2d2; + text-align: left; + overflow-y: auto; + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, .12) +} + +.layui-table-cell, .layui-table-tool-panel li { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +.layui-table-tool-panel li { + padding: 0 10px; + line-height: 30px; + -webkit-transition: .5s all; + transition: .5s all +} + +.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] { + width: 100%; + padding-left: 28px +} + +.layui-table-tool-panel li:hover { + background-color: #f2f2f2 +} + +.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] i { + position: absolute; + left: 0; + top: 0 +} + +.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] span { + padding: 0 +} + +.layui-table-tool .layui-table-tool-self .layui-table-tool-panel { + left: auto; + right: -1px +} + +.layui-table-col-set { + position: absolute; + right: 0; + top: 0; + width: 20px; + height: 100%; + border-width: 0 0 0 1px; + background-color: #fff +} + +.layui-table-sort { + width: 10px; + height: 20px; + margin-left: 5px; + cursor: pointer !important +} + +.layui-table-sort .layui-edge { + position: absolute; + left: 5px; + border-width: 5px +} + +.layui-table-sort .layui-table-sort-asc { + top: 3px; + border-top: none; + border-bottom-style: solid; + border-bottom-color: #b2b2b2 +} + +.layui-table-sort .layui-table-sort-asc:hover { + border-bottom-color: #666 +} + +.layui-table-sort .layui-table-sort-desc { + bottom: 5px; + border-bottom: none; + border-top-style: solid; + border-top-color: #b2b2b2 +} + +.layui-table-sort .layui-table-sort-desc:hover { + border-top-color: #666 +} + +.layui-table-sort[lay-sort=asc] .layui-table-sort-asc { + border-bottom-color: #000 +} + +.layui-table-sort[lay-sort=desc] .layui-table-sort-desc { + border-top-color: #000 +} + +.layui-table-cell { + height: 28px; + line-height: 28px; + padding: 0 15px; + position: relative; + box-sizing: border-box +} + +.layui-table-cell .layui-form-checkbox[lay-skin=primary] { + top: -1px; + padding: 0 +} + +.layui-table-cell .layui-table-link { + color: #01AAED +} + +.laytable-cell-checkbox, .laytable-cell-numbers, .laytable-cell-radio, .laytable-cell-space { + padding: 0; + text-align: center +} + +.layui-table-body { + position: relative; + overflow: auto; + margin-right: -1px; + margin-bottom: -1px +} + +.layui-table-body .layui-none { + line-height: 26px; + padding: 15px; + text-align: center; + color: #999 +} + +.layui-table-fixed { + position: absolute; + left: 0; + top: 0; + z-index: 101 +} + +.layui-table-fixed .layui-table-body { + overflow: hidden +} + +.layui-table-fixed-l { + box-shadow: 0 -1px 8px rgba(0, 0, 0, .08) +} + +.layui-table-fixed-r { + left: auto; + right: -1px; + border-width: 0 0 0 1px; + box-shadow: -1px 0 8px rgba(0, 0, 0, .08) +} + +.layui-table-fixed-r .layui-table-header { + position: relative; + overflow: visible +} + +.layui-table-mend { + position: absolute; + right: -49px; + top: 0; + height: 100%; + width: 50px +} + +.layui-table-tool { + position: relative; + z-index: 890; + width: 100%; + min-height: 50px; + line-height: 30px; + padding: 10px 15px; + border-width: 0 0 1px +} + +.layui-table-tool .layui-btn-container { + margin-bottom: -10px +} + +.layui-table-page, .layui-table-total { + border-width: 1px 0 0; + margin-bottom: -1px; + overflow: hidden +} + +.layui-table-page { + position: relative; + width: 100%; + padding: 7px 7px 0; + height: 41px; + font-size: 12px; + white-space: nowrap +} + +.layui-table-page > div { + height: 26px +} + +.layui-table-page .layui-laypage { + margin: 0 +} + +.layui-table-page .layui-laypage a, .layui-table-page .layui-laypage span { + height: 26px; + line-height: 26px; + margin-bottom: 10px; + border: none; + background: 0 0 +} + +.layui-table-page .layui-laypage a, .layui-table-page .layui-laypage span.layui-laypage-curr { + padding: 0 12px +} + +.layui-table-page .layui-laypage span { + margin-left: 0; + padding: 0 +} + +.layui-table-page .layui-laypage .layui-laypage-prev { + margin-left: -7px !important +} + +.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em { + left: 0; + top: 0; + padding: 0 +} + +.layui-table-page .layui-laypage button, .layui-table-page .layui-laypage input { + height: 26px; + line-height: 26px +} + +.layui-table-page .layui-laypage input { + width: 40px +} + +.layui-table-page .layui-laypage button { + padding: 0 10px +} + +.layui-table-page select { + height: 18px +} + +.layui-table-patch .layui-table-cell { + padding: 0; + width: 30px +} + +.layui-table-edit { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0 14px 1px; + border-radius: 0; + box-shadow: 1px 1px 20px rgba(0, 0, 0, .15) +} + +.layui-table-edit:focus { + border-color: #5FB878 !important +} + +select.layui-table-edit { + padding: 0 0 0 10px; + border-color: #C9C9C9 +} + +.layui-table-view .layui-form-checkbox, .layui-table-view .layui-form-radio, .layui-table-view .layui-form-switch { + top: 0; + margin: 0; + box-sizing: content-box +} + +.layui-table-view .layui-form-checkbox { + top: -1px; + height: 26px; + line-height: 26px +} + +.layui-table-view .layui-form-checkbox i { + height: 26px +} + +.layui-table-grid .layui-table-cell { + overflow: visible +} + +.layui-table-grid-down { + position: absolute; + top: 0; + right: 0; + width: 26px; + height: 100%; + padding: 5px 0; + border-width: 0 0 0 1px; + text-align: center; + background-color: #fff; + color: #999; + cursor: pointer +} + +.layui-table-grid-down .layui-icon { + position: absolute; + top: 50%; + left: 50%; + margin: -8px 0 0 -8px +} + +.layui-table-grid-down:hover { + background-color: #fbfbfb +} + +body .layui-table-tips .layui-layer-content { + background: 0 0; + padding: 0; + box-shadow: 0 1px 6px rgba(0, 0, 0, .12) +} + +.layui-table-tips-main { + margin: -44px 0 0 -1px; + max-height: 150px; + padding: 8px 15px; + font-size: 14px; + overflow-y: scroll; + background-color: #fff; + color: #666 +} + +.layui-table-tips-c { + position: absolute; + right: -3px; + top: -13px; + width: 20px; + height: 20px; + padding: 3px; + cursor: pointer; + background-color: #666; + border-radius: 50%; + color: #fff +} + +.layui-table-tips-c:hover { + background-color: #777 +} + +.layui-table-tips-c:before { + position: relative; + right: -2px +} + +.layui-upload-file { + display: none !important; + opacity: .01; + filter: Alpha(opacity=1) +} + +.layui-upload-drag, .layui-upload-form, .layui-upload-wrap { + display: inline-block +} + +.layui-upload-list { + margin: 10px 0 +} + +.layui-upload-choose { + padding: 0 10px; + color: #999 +} + +.layui-upload-drag { + position: relative; + padding: 30px; + border: 1px dashed #e2e2e2; + background-color: #fff; + text-align: center; + cursor: pointer; + color: #999 +} + +.layui-upload-drag .layui-icon { + font-size: 50px; + color: #009688 +} + +.layui-upload-drag[lay-over] { + border-color: #009688 +} + +.layui-upload-iframe { + position: absolute; + width: 0; + height: 0; + border: 0; + visibility: hidden +} + +.layui-upload-wrap { + position: relative; + vertical-align: middle +} + +.layui-upload-wrap .layui-upload-file { + display: block !important; + position: absolute; + left: 0; + top: 0; + z-index: 10; + font-size: 100px; + width: 100%; + height: 100%; + opacity: .01; + filter: Alpha(opacity=1); + cursor: pointer +} + +.layui-tree { + line-height: 26px +} + +.layui-tree li { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap +} + +.layui-tree li .layui-tree-spread, .layui-tree li a { + display: inline-block; + vertical-align: top; + height: 26px; + *display: inline; + *zoom: 1; + cursor: pointer +} + +.layui-tree li a { + font-size: 0 +} + +.layui-tree li a i { + font-size: 16px +} + +.layui-tree li a cite { + padding: 0 6px; + font-size: 14px; + font-style: normal +} + +.layui-tree li i { + padding-left: 6px; + color: #333; + -moz-user-select: none +} + +.layui-tree li .layui-tree-check { + font-size: 13px +} + +.layui-tree li .layui-tree-check:hover { + color: #009E94 +} + +.layui-tree li ul { + display: none; + margin-left: 20px +} + +.layui-tree li .layui-tree-enter { + line-height: 24px; + border: 1px dotted #000 +} + +.layui-tree-drag { + display: none; + position: absolute; + left: -666px; + top: -666px; + background-color: #f2f2f2; + padding: 5px 10px; + border: 1px dotted #000; + white-space: nowrap +} + +.layui-tree-drag i { + padding-right: 5px +} + +.layui-nav { + position: relative; + padding: 0 20px; + background-color: #393D49; + color: #fff; + border-radius: 2px; + font-size: 0; + box-sizing: border-box +} + +.layui-nav * { + font-size: 14px +} + +.layui-nav .layui-nav-item { + position: relative; + display: inline-block; + *display: inline; + *zoom: 1; + vertical-align: middle; + line-height: 60px +} + +.layui-nav .layui-nav-item a { + display: block; + padding: 0 20px; + color: #fff; + color: rgba(255, 255, 255, .7); + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { + position: absolute; + left: 0; + top: 0; + width: 0; + height: 5px; + background-color: #5FB878; + transition: all .2s; + -webkit-transition: all .2s +} + +.layui-nav-bar { + z-index: 1000 +} + +.layui-nav .layui-nav-item a:hover, .layui-nav .layui-this a { + color: #fff +} + +.layui-nav .layui-this:after { + content: ''; + top: auto; + bottom: 0; + width: 100% +} + +.layui-nav-img { + width: 30px; + height: 30px; + margin-right: 10px; + border-radius: 50% +} + +.layui-nav .layui-nav-more { + content: ''; + width: 0; + height: 0; + border-style: solid dashed dashed; + border-color: #fff transparent transparent; + overflow: hidden; + cursor: pointer; + transition: all .2s; + -webkit-transition: all .2s; + position: absolute; + top: 50%; + right: 3px; + margin-top: -3px; + border-width: 6px; + border-top-color: rgba(255, 255, 255, .7) +} + +.layui-nav .layui-nav-mored, .layui-nav-itemed > a .layui-nav-more { + margin-top: -9px; + border-style: dashed dashed solid; + border-color: transparent transparent #fff +} + +.layui-nav-child { + display: none; + position: absolute; + left: 0; + top: 65px; + min-width: 100%; + line-height: 36px; + padding: 5px 0; + box-shadow: 0 2px 4px rgba(0, 0, 0, .12); + border: 1px solid #d2d2d2; + background-color: #fff; + z-index: 100; + border-radius: 2px; + white-space: nowrap +} + +.layui-nav .layui-nav-child a { + color: #333 +} + +.layui-nav .layui-nav-child a:hover { + background-color: #f2f2f2; + color: #000 +} + +.layui-nav-child dd { + position: relative +} + +.layui-nav .layui-nav-child dd.layui-this a, .layui-nav-child dd.layui-this { + background-color: #5FB878; + color: #fff +} + +.layui-nav-child dd.layui-this:after { + display: none +} + +.layui-nav-tree { + width: 200px; + padding: 0 +} + +.layui-nav-tree .layui-nav-item { + display: block; + width: 100%; + line-height: 45px +} + +.layui-nav-tree .layui-nav-item a { + position: relative; + height: 45px; + line-height: 45px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap +} + +.layui-nav-tree .layui-nav-item a:hover { + background-color: #4E5465 +} + +.layui-nav-tree .layui-nav-bar { + width: 5px; + height: 0; + background-color: #009688 +} + +.layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this > a, .layui-nav-tree .layui-this > a:hover { + background-color: #009688; + color: #fff +} + +.layui-nav-tree .layui-this:after { + display: none +} + +.layui-nav-itemed > a, .layui-nav-tree .layui-nav-title a, .layui-nav-tree .layui-nav-title a:hover { + color: #fff !important +} + +.layui-nav-tree .layui-nav-child { + position: relative; + z-index: 0; + top: 0; + border: none; + box-shadow: none +} + +.layui-nav-tree .layui-nav-child a { + height: 40px; + line-height: 40px; + color: #fff; + color: rgba(255, 255, 255, .7) +} + +.layui-nav-tree .layui-nav-child, .layui-nav-tree .layui-nav-child a:hover { + background: 0 0; + color: #fff +} + +.layui-nav-tree .layui-nav-more { + right: 10px +} + +.layui-nav-itemed > .layui-nav-child { + display: block; + padding: 0; + background-color: rgba(0, 0, 0, .3) !important +} + +.layui-nav-itemed > .layui-nav-child > .layui-this > .layui-nav-child { + display: block +} + +.layui-nav-side { + position: fixed; + top: 0; + bottom: 0; + left: 0; + overflow-x: hidden; + z-index: 999 +} + +.layui-bg-blue .layui-nav-bar, .layui-bg-blue .layui-nav-itemed:after, .layui-bg-blue .layui-this:after { + background-color: #93D1FF +} + +.layui-bg-blue .layui-nav-child dd.layui-this { + background-color: #1E9FFF +} + +.layui-bg-blue .layui-nav-itemed > a, .layui-nav-tree.layui-bg-blue .layui-nav-title a, .layui-nav-tree.layui-bg-blue .layui-nav-title a:hover { + background-color: #007DDB !important +} + +.layui-breadcrumb { + visibility: hidden; + font-size: 0 +} + +.layui-breadcrumb > * { + font-size: 14px +} + +.layui-breadcrumb a { + color: #999 !important +} + +.layui-breadcrumb a:hover { + color: #5FB878 !important +} + +.layui-breadcrumb a cite { + color: #666; + font-style: normal +} + +.layui-breadcrumb span[lay-separator] { + margin: 0 10px; + color: #999 +} + +.layui-tab { + margin: 10px 0; + text-align: left !important +} + +.layui-tab[overflow] > .layui-tab-title { + overflow: hidden +} + +.layui-tab-title { + position: relative; + left: 0; + height: 40px; + white-space: nowrap; + font-size: 0; + border-bottom-width: 1px; + border-bottom-style: solid; + transition: all .2s; + -webkit-transition: all .2s +} + +.layui-tab-title li { + display: inline-block; + *display: inline; + *zoom: 1; + vertical-align: middle; + font-size: 14px; + transition: all .2s; + -webkit-transition: all .2s; + position: relative; + line-height: 40px; + min-width: 65px; + padding: 0 15px; + text-align: center; + cursor: pointer +} + +.layui-tab-title li a { + display: block +} + +.layui-tab-title .layui-this { + color: #000 +} + +.layui-tab-title .layui-this:after { + position: absolute; + left: 0; + top: 0; + content: ''; + width: 100%; + height: 41px; + border-width: 1px; + border-style: solid; + border-bottom-color: #fff; + border-radius: 2px 2px 0 0; + box-sizing: border-box; + pointer-events: none +} + +.layui-tab-bar { + position: absolute; + right: 0; + top: 0; + z-index: 10; + width: 30px; + height: 39px; + line-height: 39px; + border-width: 1px; + border-style: solid; + border-radius: 2px; + text-align: center; + background-color: #fff; + cursor: pointer +} + +.layui-tab-bar .layui-icon { + position: relative; + display: inline-block; + top: 3px; + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-tab-item { + display: none +} + +.layui-tab-more { + padding-right: 30px; + height: auto !important; + white-space: normal !important +} + +.layui-tab-more li.layui-this:after { + border-bottom-color: #e2e2e2; + border-radius: 2px +} + +.layui-tab-more .layui-tab-bar .layui-icon { + top: -2px; + top: 3px \9; + -webkit-transform: rotate(180deg); + transform: rotate(180deg) +} + +:root .layui-tab-more .layui-tab-bar .layui-icon { + top: -2px \0/ IE9 +} + +.layui-tab-content { + padding: 10px +} + +.layui-tab-title li .layui-tab-close { + position: relative; + display: inline-block; + width: 18px; + height: 18px; + line-height: 20px; + margin-left: 8px; + top: 1px; + text-align: center; + font-size: 14px; + color: #c2c2c2; + transition: all .2s; + -webkit-transition: all .2s +} + +.layui-tab-title li .layui-tab-close:hover { + border-radius: 2px; + background-color: #FF5722; + color: #fff +} + +.layui-tab-brief > .layui-tab-title .layui-this { + color: #009688 +} + +.layui-tab-brief > .layui-tab-more li.layui-this:after, .layui-tab-brief > .layui-tab-title .layui-this:after { + border: none; + border-radius: 0; + border-bottom: 2px solid #5FB878 +} + +.layui-tab-brief[overflow] > .layui-tab-title .layui-this:after { + top: -1px +} + +.layui-tab-card { + border-width: 1px; + border-style: solid; + border-radius: 2px; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) +} + +.layui-tab-card > .layui-tab-title { + background-color: #f2f2f2 +} + +.layui-tab-card > .layui-tab-title li { + margin-right: -1px; + margin-left: -1px +} + +.layui-tab-card > .layui-tab-title .layui-this { + background-color: #fff +} + +.layui-tab-card > .layui-tab-title .layui-this:after { + border-top: none; + border-width: 1px; + border-bottom-color: #fff +} + +.layui-tab-card > .layui-tab-title .layui-tab-bar { + height: 40px; + line-height: 40px; + border-radius: 0; + border-top: none; + border-right: none +} + +.layui-tab-card > .layui-tab-more .layui-this { + background: 0 0; + color: #5FB878 +} + +.layui-tab-card > .layui-tab-more .layui-this:after { + border: none +} + +.layui-timeline { + padding-left: 5px +} + +.layui-timeline-item { + position: relative; + padding-bottom: 20px +} + +.layui-timeline-axis { + position: absolute; + left: -5px; + top: 0; + z-index: 10; + width: 20px; + height: 20px; + line-height: 20px; + background-color: #fff; + color: #5FB878; + border-radius: 50%; + text-align: center; + cursor: pointer +} + +.layui-timeline-axis:hover { + color: #FF5722 +} + +.layui-timeline-item:before { + content: ''; + position: absolute; + left: 5px; + top: 0; + z-index: 0; + width: 1px; + height: 100% +} + +.layui-timeline-item:last-child:before { + display: none +} + +.layui-timeline-item:first-child:before { + display: block +} + +.layui-timeline-content { + padding-left: 25px +} + +.layui-timeline-title { + position: relative; + margin-bottom: 10px +} + +.layui-badge, .layui-badge-dot, .layui-badge-rim { + position: relative; + display: inline-block; + padding: 0 6px; + font-size: 12px; + text-align: center; + background-color: #FF5722; + color: #fff; + border-radius: 2px +} + +.layui-badge { + height: 18px; + line-height: 18px +} + +.layui-badge-dot { + width: 8px; + height: 8px; + padding: 0; + border-radius: 50% +} + +.layui-badge-rim { + height: 18px; + line-height: 18px; + border-width: 1px; + border-style: solid; + background-color: #fff; + color: #666 +} + +.layui-btn .layui-badge, .layui-btn .layui-badge-dot { + margin-left: 5px +} + +.layui-nav .layui-badge, .layui-nav .layui-badge-dot { + position: absolute; + top: 50%; + margin: -8px 6px 0 +} + +.layui-tab-title .layui-badge, .layui-tab-title .layui-badge-dot { + left: 5px; + top: -2px +} + +.layui-carousel { + position: relative; + left: 0; + top: 0; + background-color: #f8f8f8 +} + +.layui-carousel > [carousel-item] { + position: relative; + width: 100%; + height: 100%; + overflow: hidden +} + +.layui-carousel > [carousel-item]:before { + position: absolute; + content: '\e63d'; + left: 50%; + top: 50%; + width: 100px; + line-height: 20px; + margin: -10px 0 0 -50px; + text-align: center; + color: #c2c2c2; + font-family: layui-icon !important; + font-size: 30px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.layui-carousel > [carousel-item] > * { + display: none; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: #f8f8f8; + transition-duration: .3s; + -webkit-transition-duration: .3s +} + +.layui-carousel-updown > * { + -webkit-transition: .3s ease-in-out up; + transition: .3s ease-in-out up +} + +.layui-carousel-arrow { + display: none \9; + opacity: 0; + position: absolute; + left: 10px; + top: 50%; + margin-top: -18px; + width: 36px; + height: 36px; + line-height: 36px; + text-align: center; + font-size: 20px; + border: 0; + border-radius: 50%; + background-color: rgba(0, 0, 0, .2); + color: #fff; + -webkit-transition-duration: .3s; + transition-duration: .3s; + cursor: pointer +} + +.layui-carousel-arrow[lay-type=add] { + left: auto !important; + right: 10px +} + +.layui-carousel:hover .layui-carousel-arrow[lay-type=add], .layui-carousel[lay-arrow=always] .layui-carousel-arrow[lay-type=add] { + right: 20px +} + +.layui-carousel[lay-arrow=always] .layui-carousel-arrow { + opacity: 1; + left: 20px +} + +.layui-carousel[lay-arrow=none] .layui-carousel-arrow { + display: none +} + +.layui-carousel-arrow:hover, .layui-carousel-ind ul:hover { + background-color: rgba(0, 0, 0, .35) +} + +.layui-carousel:hover .layui-carousel-arrow { + display: block \9; + opacity: 1; + left: 20px +} + +.layui-carousel-ind { + position: relative; + top: -35px; + width: 100%; + line-height: 0 !important; + text-align: center; + font-size: 0 +} + +.layui-carousel[lay-indicator=outside] { + margin-bottom: 30px +} + +.layui-carousel[lay-indicator=outside] .layui-carousel-ind { + top: 10px +} + +.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul { + background-color: rgba(0, 0, 0, .5) +} + +.layui-carousel[lay-indicator=none] .layui-carousel-ind { + display: none +} + +.layui-carousel-ind ul { + display: inline-block; + padding: 5px; + background-color: rgba(0, 0, 0, .2); + border-radius: 10px; + -webkit-transition-duration: .3s; + transition-duration: .3s +} + +.layui-carousel-ind li { + display: inline-block; + width: 10px; + height: 10px; + margin: 0 3px; + font-size: 14px; + background-color: #e2e2e2; + background-color: rgba(255, 255, 255, .5); + border-radius: 50%; + cursor: pointer; + -webkit-transition-duration: .3s; + transition-duration: .3s +} + +.layui-carousel-ind li:hover { + background-color: rgba(255, 255, 255, .7) +} + +.layui-carousel-ind li.layui-this { + background-color: #fff +} + +.layui-carousel > [carousel-item] > .layui-carousel-next, .layui-carousel > [carousel-item] > .layui-carousel-prev, .layui-carousel > [carousel-item] > .layui-this { + display: block +} + +.layui-carousel > [carousel-item] > .layui-this { + left: 0 +} + +.layui-carousel > [carousel-item] > .layui-carousel-prev { + left: -100% +} + +.layui-carousel > [carousel-item] > .layui-carousel-next { + left: 100% +} + +.layui-carousel > [carousel-item] > .layui-carousel-next.layui-carousel-left, .layui-carousel > [carousel-item] > .layui-carousel-prev.layui-carousel-right { + left: 0 +} + +.layui-carousel > [carousel-item] > .layui-this.layui-carousel-left { + left: -100% +} + +.layui-carousel > [carousel-item] > .layui-this.layui-carousel-right { + left: 100% +} + +.layui-carousel[lay-anim=updown] .layui-carousel-arrow { + left: 50% !important; + top: 20px; + margin: 0 0 0 -18px +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > *, .layui-carousel[lay-anim=fade] > [carousel-item] > * { + left: 0 !important +} + +.layui-carousel[lay-anim=updown] .layui-carousel-arrow[lay-type=add] { + top: auto !important; + bottom: 20px +} + +.layui-carousel[lay-anim=updown] .layui-carousel-ind { + position: absolute; + top: 50%; + right: 20px; + width: auto; + height: auto +} + +.layui-carousel[lay-anim=updown] .layui-carousel-ind ul { + padding: 3px 5px +} + +.layui-carousel[lay-anim=updown] .layui-carousel-ind li { + display: block; + margin: 6px 0 +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-this { + top: 0 +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-carousel-prev { + top: -100% +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-carousel-next { + top: 100% +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-carousel-next.layui-carousel-left, .layui-carousel[lay-anim=updown] > [carousel-item] > .layui-carousel-prev.layui-carousel-right { + top: 0 +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-this.layui-carousel-left { + top: -100% +} + +.layui-carousel[lay-anim=updown] > [carousel-item] > .layui-this.layui-carousel-right { + top: 100% +} + +.layui-carousel[lay-anim=fade] > [carousel-item] > .layui-carousel-next, .layui-carousel[lay-anim=fade] > [carousel-item] > .layui-carousel-prev { + opacity: 0 +} + +.layui-carousel[lay-anim=fade] > [carousel-item] > .layui-carousel-next.layui-carousel-left, .layui-carousel[lay-anim=fade] > [carousel-item] > .layui-carousel-prev.layui-carousel-right { + opacity: 1 +} + +.layui-carousel[lay-anim=fade] > [carousel-item] > .layui-this.layui-carousel-left, .layui-carousel[lay-anim=fade] > [carousel-item] > .layui-this.layui-carousel-right { + opacity: 0 +} + +.layui-fixbar { + position: fixed; + right: 15px; + bottom: 15px; + z-index: 999999 +} + +.layui-fixbar li { + width: 50px; + height: 50px; + line-height: 50px; + margin-bottom: 1px; + text-align: center; + cursor: pointer; + font-size: 30px; + background-color: #9F9F9F; + color: #fff; + border-radius: 2px; + opacity: .95 +} + +.layui-fixbar li:hover { + opacity: .85 +} + +.layui-fixbar li:active { + opacity: 1 +} + +.layui-fixbar .layui-fixbar-top { + display: none; + font-size: 40px +} + +body .layui-util-face { + border: none; + background: 0 0 +} + +body .layui-util-face .layui-layer-content { + padding: 0; + background-color: #fff; + color: #666; + box-shadow: none +} + +.layui-util-face .layui-layer-TipsG { + display: none +} + +.layui-util-face ul { + position: relative; + width: 372px; + padding: 10px; + border: 1px solid #D9D9D9; + background-color: #fff; + box-shadow: 0 0 20px rgba(0, 0, 0, .2) +} + +.layui-util-face ul li { + cursor: pointer; + float: left; + border: 1px solid #e8e8e8; + height: 22px; + width: 26px; + overflow: hidden; + margin: -1px 0 0 -1px; + padding: 4px 2px; + text-align: center +} + +.layui-util-face ul li:hover { + position: relative; + z-index: 2; + border: 1px solid #eb7350; + background: #fff9ec +} + +.layui-code { + position: relative; + margin: 10px 0; + padding: 15px; + line-height: 20px; + border: 1px solid #ddd; + border-left-width: 6px; + background-color: #F2F2F2; + color: #333; + font-family: Courier New; + font-size: 12px +} + +.layui-rate, .layui-rate * { + display: inline-block; + vertical-align: middle +} + +.layui-rate { + padding: 10px 5px 10px 0; + font-size: 0 +} + +.layui-rate li i.layui-icon { + font-size: 20px; + color: #FFB800; + margin-right: 5px; + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-rate li i:hover { + cursor: pointer; + transform: scale(1.12); + -webkit-transform: scale(1.12) +} + +.layui-rate[readonly] li i:hover { + cursor: default; + transform: scale(1) +} + +.layui-colorpicker { + width: 26px; + height: 26px; + border: 1px solid #e6e6e6; + padding: 5px; + border-radius: 2px; + line-height: 24px; + display: inline-block; + cursor: pointer; + transition: all .3s; + -webkit-transition: all .3s +} + +.layui-colorpicker:hover { + border-color: #d2d2d2 +} + +.layui-colorpicker.layui-colorpicker-lg { + width: 34px; + height: 34px; + line-height: 32px +} + +.layui-colorpicker.layui-colorpicker-sm { + width: 24px; + height: 24px; + line-height: 22px +} + +.layui-colorpicker.layui-colorpicker-xs { + width: 22px; + height: 22px; + line-height: 20px +} + +.layui-colorpicker-trigger-bgcolor { + display: block; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); + border-radius: 2px +} + +.layui-colorpicker-trigger-span { + display: block; + height: 100%; + box-sizing: border-box; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 2px; + text-align: center +} + +.layui-colorpicker-trigger-i { + display: inline-block; + color: #FFF; + font-size: 12px +} + +.layui-colorpicker-trigger-i.layui-icon-close { + color: #999 +} + +.layui-colorpicker-main { + position: absolute; + z-index: 66666666; + width: 280px; + padding: 7px; + background: #FFF; + border: 1px solid #d2d2d2; + border-radius: 2px; + box-shadow: 0 2px 4px rgba(0, 0, 0, .12) +} + +.layui-colorpicker-main-wrapper { + height: 180px; + position: relative +} + +.layui-colorpicker-basis { + width: 260px; + height: 100%; + position: relative +} + +.layui-colorpicker-basis-white { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + background: linear-gradient(90deg, #FFF, hsla(0, 0%, 100%, 0)) +} + +.layui-colorpicker-basis-black { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + background: linear-gradient(0deg, #000, transparent) +} + +.layui-colorpicker-basis-cursor { + width: 10px; + height: 10px; + border: 1px solid #FFF; + border-radius: 50%; + position: absolute; + top: -3px; + right: -3px; + cursor: pointer +} + +.layui-colorpicker-side { + position: absolute; + top: 0; + right: 0; + width: 12px; + height: 100%; + background: linear-gradient(red, #FF0, #0F0, #0FF, #00F, #F0F, red) +} + +.layui-colorpicker-side-slider { + width: 100%; + height: 5px; + box-shadow: 0 0 1px #888; + box-sizing: border-box; + background: #FFF; + border-radius: 1px; + border: 1px solid #f0f0f0; + cursor: pointer; + position: absolute; + left: 0 +} + +.layui-colorpicker-main-alpha { + display: none; + height: 12px; + margin-top: 7px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==) +} + +.layui-colorpicker-alpha-bgcolor { + height: 100%; + position: relative +} + +.layui-colorpicker-alpha-slider { + width: 5px; + height: 100%; + box-shadow: 0 0 1px #888; + box-sizing: border-box; + background: #FFF; + border-radius: 1px; + border: 1px solid #f0f0f0; + cursor: pointer; + position: absolute; + top: 0 +} + +.layui-colorpicker-main-pre { + padding-top: 7px; + font-size: 0 +} + +.layui-colorpicker-pre { + width: 20px; + height: 20px; + border-radius: 2px; + display: inline-block; + margin-left: 6px; + margin-bottom: 7px; + cursor: pointer +} + +.layui-colorpicker-pre:nth-child(11n+1) { + margin-left: 0 +} + +.layui-colorpicker-pre-isalpha { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==) +} + +.layui-colorpicker-pre.layui-this { + box-shadow: 0 0 3px 2px rgba(0, 0, 0, .15) +} + +.layui-colorpicker-pre > div { + height: 100%; + border-radius: 2px +} + +.layui-colorpicker-main-input { + text-align: right; + padding-top: 7px +} + +.layui-colorpicker-main-input .layui-btn-container .layui-btn { + margin: 0 0 0 10px +} + +.layui-colorpicker-main-input div.layui-inline { + float: left; + margin-right: 10px; + font-size: 14px +} + +.layui-colorpicker-main-input input.layui-input { + width: 150px; + height: 30px; + color: #666 +} + +.layui-slider { + height: 4px; + background: #e2e2e2; + border-radius: 3px; + position: relative; + cursor: pointer +} + +.layui-slider-bar { + border-radius: 3px; + position: absolute; + height: 100% +} + +.layui-slider-step { + position: absolute; + top: 0; + width: 4px; + height: 4px; + border-radius: 50%; + background: #FFF; + -webkit-transform: translateX(-50%); + transform: translateX(-50%) +} + +.layui-slider-wrap { + width: 36px; + height: 36px; + position: absolute; + top: -16px; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + z-index: 10; + text-align: center +} + +.layui-slider-wrap-btn { + width: 12px; + height: 12px; + border-radius: 50%; + background: #FFF; + display: inline-block; + vertical-align: middle; + cursor: pointer; + transition: .3s +} + +.layui-slider-wrap:after { + content: ""; + height: 100%; + display: inline-block; + vertical-align: middle +} + +.layui-slider-wrap-btn.layui-slider-hover, .layui-slider-wrap-btn:hover { + transform: scale(1.2) +} + +.layui-slider-wrap-btn.layui-disabled:hover { + transform: scale(1) !important +} + +.layui-slider-tips { + position: absolute; + top: -42px; + z-index: 66666666; + white-space: nowrap; + display: none; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + color: #FFF; + background: #000; + border-radius: 3px; + height: 25px; + line-height: 25px; + padding: 0 10px +} + +.layui-slider-tips:after { + content: ''; + position: absolute; + bottom: -12px; + left: 50%; + margin-left: -6px; + width: 0; + height: 0; + border-width: 6px; + border-style: solid; + border-color: #000 transparent transparent +} + +.layui-slider-input { + width: 70px; + height: 32px; + border: 1px solid #e6e6e6; + border-radius: 3px; + font-size: 16px; + line-height: 32px; + position: absolute; + right: 0; + top: -15px +} + +.layui-slider-input-btn { + display: none; + position: absolute; + top: 0; + right: 0; + width: 20px; + height: 100%; + border-left: 1px solid #d2d2d2 +} + +.layui-slider-input-btn i { + cursor: pointer; + position: absolute; + right: 0; + bottom: 0; + width: 20px; + height: 50%; + font-size: 12px; + line-height: 16px; + text-align: center; + color: #999 +} + +.layui-slider-input-btn i:first-child { + top: 0; + border-bottom: 1px solid #d2d2d2 +} + +.layui-slider-input-txt { + height: 100%; + font-size: 14px +} + +.layui-slider-input-txt input { + height: 100%; + border: none +} + +.layui-slider-input-btn i:hover { + color: #009688 +} + +.layui-slider-vertical { + width: 4px; + margin-left: 34px +} + +.layui-slider-vertical .layui-slider-bar { + width: 4px +} + +.layui-slider-vertical .layui-slider-step { + top: auto; + left: 0; + -webkit-transform: translateY(50%); + transform: translateY(50%) +} + +.layui-slider-vertical .layui-slider-wrap { + top: auto; + left: -16px; + -webkit-transform: translateY(50%); + transform: translateY(50%) +} + +.layui-slider-vertical .layui-slider-tips { + top: auto; + left: 2px +} + +@media \0screen { + .layui-slider-wrap-btn { + margin-left: -20px + } + + .layui-slider-vertical .layui-slider-wrap-btn { + margin-left: 0; + margin-bottom: -20px + } + + .layui-slider-vertical .layui-slider-tips { + margin-left: -8px + } + + .layui-slider > span { + margin-left: 8px + } +} + +.layui-anim { + -webkit-animation-duration: .3s; + animation-duration: .3s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both +} + +.layui-anim.layui-icon { + display: inline-block +} + +.layui-anim-loop { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite +} + +.layui-trans, .layui-trans a { + transition: all .3s; + -webkit-transition: all .3s +} + +@-webkit-keyframes layui-rotate { + from { + -webkit-transform: rotate(0) + } + to { + -webkit-transform: rotate(360deg) + } +} + +@keyframes layui-rotate { + from { + transform: rotate(0) + } + to { + transform: rotate(360deg) + } +} + +.layui-anim-rotate { + -webkit-animation-name: layui-rotate; + animation-name: layui-rotate; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-timing-function: linear; + animation-timing-function: linear +} + +@-webkit-keyframes layui-up { + from { + -webkit-transform: translate3d(0, 100%, 0); + opacity: .3 + } + to { + -webkit-transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@keyframes layui-up { + from { + transform: translate3d(0, 100%, 0); + opacity: .3 + } + to { + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +.layui-anim-up { + -webkit-animation-name: layui-up; + animation-name: layui-up +} + +@-webkit-keyframes layui-upbit { + from { + -webkit-transform: translate3d(0, 30px, 0); + opacity: .3 + } + to { + -webkit-transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@keyframes layui-upbit { + from { + transform: translate3d(0, 30px, 0); + opacity: .3 + } + to { + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +.layui-anim-upbit { + -webkit-animation-name: layui-upbit; + animation-name: layui-upbit +} + +@-webkit-keyframes layui-scale { + 0% { + opacity: .3; + -webkit-transform: scale(.5) + } + 100% { + opacity: 1; + -webkit-transform: scale(1) + } +} + +@keyframes layui-scale { + 0% { + opacity: .3; + -ms-transform: scale(.5); + transform: scale(.5) + } + 100% { + opacity: 1; + -ms-transform: scale(1); + transform: scale(1) + } +} + +.layui-anim-scale { + -webkit-animation-name: layui-scale; + animation-name: layui-scale +} + +@-webkit-keyframes layui-scale-spring { + 0% { + opacity: .5; + -webkit-transform: scale(.5) + } + 80% { + opacity: .8; + -webkit-transform: scale(1.1) + } + 100% { + opacity: 1; + -webkit-transform: scale(1) + } +} + +@keyframes layui-scale-spring { + 0% { + opacity: .5; + transform: scale(.5) + } + 80% { + opacity: .8; + transform: scale(1.1) + } + 100% { + opacity: 1; + transform: scale(1) + } +} + +.layui-anim-scaleSpring { + -webkit-animation-name: layui-scale-spring; + animation-name: layui-scale-spring +} + +@-webkit-keyframes layui-fadein { + 0% { + opacity: 0 + } + 100% { + opacity: 1 + } +} + +@keyframes layui-fadein { + 0% { + opacity: 0 + } + 100% { + opacity: 1 + } +} + +.layui-anim-fadein { + -webkit-animation-name: layui-fadein; + animation-name: layui-fadein +} + +@-webkit-keyframes layui-fadeout { + 0% { + opacity: 1 + } + 100% { + opacity: 0 + } +} + +@keyframes layui-fadeout { + 0% { + opacity: 1 + } + 100% { + opacity: 0 + } +} + +.layui-anim-fadeout { + -webkit-animation-name: layui-fadeout; + animation-name: layui-fadeout +} \ No newline at end of file diff --git a/WebContent/layui/css/layui.mobile.css b/WebContent/layui/css/layui.mobile.css new file mode 100644 index 0000000000000000000000000000000000000000..6f7f0a144ca8536f7de28dd9bc6c967c229b11d4 --- /dev/null +++ b/WebContent/layui/css/layui.mobile.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/WebContent/layui/css/modules/code.css b/WebContent/layui/css/modules/code.css new file mode 100644 index 0000000000000000000000000000000000000000..25987f463849ecd1dd600f1272e31f0712ff5d41 --- /dev/null +++ b/WebContent/layui/css/modules/code.css @@ -0,0 +1,72 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ +html #layuicss-skincodecss { + display: none; + position: absolute; + width: 1989px +} + +.layui-code-h3, .layui-code-view { + position: relative; + font-size: 12px +} + +.layui-code-view { + display: block; + margin: 10px 0; + padding: 0; + border: 1px solid #e2e2e2; + border-left-width: 6px; + background-color: #F2F2F2; + color: #333; + font-family: Courier New +} + +.layui-code-h3 { + padding: 0 10px; + height: 32px; + line-height: 32px; + border-bottom: 1px solid #e2e2e2 +} + +.layui-code-h3 a { + position: absolute; + right: 10px; + top: 0; + color: #999 +} + +.layui-code-view .layui-code-ol { + position: relative; + overflow: auto +} + +.layui-code-view .layui-code-ol li { + position: relative; + margin-left: 45px; + line-height: 20px; + padding: 0 5px; + border-left: 1px solid #e2e2e2; + list-style-type: decimal-leading-zero; + *list-style-type: decimal; + background-color: #fff +} + +.layui-code-view pre { + margin: 0 +} + +.layui-code-notepad { + border: 1px solid #0C0C0C; + border-left-color: #3F3F3F; + background-color: #0C0C0C; + color: #C2BE9E +} + +.layui-code-notepad .layui-code-h3 { + border-bottom: none +} + +.layui-code-notepad .layui-code-ol li { + background-color: #3F3F3F; + border-left: none +} \ No newline at end of file diff --git a/WebContent/layui/css/modules/laydate/default/laydate.css b/WebContent/layui/css/modules/laydate/default/laydate.css new file mode 100644 index 0000000000000000000000000000000000000000..f7e690e523b69b435edcb4f13e0ac1edd04f2825 --- /dev/null +++ b/WebContent/layui/css/modules/laydate/default/laydate.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} \ No newline at end of file diff --git a/WebContent/layui/css/modules/layer/default/icon-ext.png b/WebContent/layui/css/modules/layer/default/icon-ext.png new file mode 100644 index 0000000000000000000000000000000000000000..bbbb669bb311514baa5db3a6a00b4644d0e280f1 Binary files /dev/null and b/WebContent/layui/css/modules/layer/default/icon-ext.png differ diff --git a/WebContent/layui/css/modules/layer/default/icon.png b/WebContent/layui/css/modules/layer/default/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3e17da8b1aaae2935e19ac97d9015f0fe24e8770 Binary files /dev/null and b/WebContent/layui/css/modules/layer/default/icon.png differ diff --git a/WebContent/layui/css/modules/layer/default/layer.css b/WebContent/layui/css/modules/layer/default/layer.css new file mode 100644 index 0000000000000000000000000000000000000000..157d537fed090a400ef73bedf9a1954379bafd5e --- /dev/null +++ b/WebContent/layui/css/modules/layer/default/layer.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} \ No newline at end of file diff --git a/WebContent/layui/css/modules/layer/default/loading-0.gif b/WebContent/layui/css/modules/layer/default/loading-0.gif new file mode 100644 index 0000000000000000000000000000000000000000..6f3c9539a22171cc2f12639492e346d97a9078e8 Binary files /dev/null and b/WebContent/layui/css/modules/layer/default/loading-0.gif differ diff --git a/WebContent/layui/css/modules/layer/default/loading-1.gif b/WebContent/layui/css/modules/layer/default/loading-1.gif new file mode 100644 index 0000000000000000000000000000000000000000..db3a483e4b74971fbfb1cc0fb6499852cedfe650 Binary files /dev/null and b/WebContent/layui/css/modules/layer/default/loading-1.gif differ diff --git a/WebContent/layui/css/modules/layer/default/loading-2.gif b/WebContent/layui/css/modules/layer/default/loading-2.gif new file mode 100644 index 0000000000000000000000000000000000000000..5bb90fd6a49107a321c35b9cee4a7b810314b51f Binary files /dev/null and b/WebContent/layui/css/modules/layer/default/loading-2.gif differ diff --git a/WebContent/layui/font/iconfont.eot b/WebContent/layui/font/iconfont.eot new file mode 100644 index 0000000000000000000000000000000000000000..93b3d5abc04e87eac6643c7ba27d62f94cdce4c6 Binary files /dev/null and b/WebContent/layui/font/iconfont.eot differ diff --git a/WebContent/layui/font/iconfont.svg b/WebContent/layui/font/iconfont.svg new file mode 100644 index 0000000000000000000000000000000000000000..1c7ffe97ad28a7972e9ea6236f0c5450b4b80281 --- /dev/null +++ b/WebContent/layui/font/iconfont.svg @@ -0,0 +1,473 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/layui/font/iconfont.ttf b/WebContent/layui/font/iconfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0c8b0a50f686021dd59dbd6c61d212406a8ad3ef Binary files /dev/null and b/WebContent/layui/font/iconfont.ttf differ diff --git a/WebContent/layui/font/iconfont.woff b/WebContent/layui/font/iconfont.woff new file mode 100644 index 0000000000000000000000000000000000000000..786bb2a8c4d1aaa7d3d80b3692b27d013815eae1 Binary files /dev/null and b/WebContent/layui/font/iconfont.woff differ diff --git a/WebContent/layui/lay/modules/carousel.js b/WebContent/layui/lay/modules/carousel.js new file mode 100644 index 0000000000000000000000000000000000000000..2be2c8ca05baa53a45da697da602962e777636a5 --- /dev/null +++ b/WebContent/layui/lay/modules/carousel.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
      ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
    "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
    1. '+o.replace(/[\r\t\n]+/g,"
    2. ")+"
    "),c.find(">.layui-code-h3")[0]||c.prepend('

    '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

    ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/colorpicker.js b/WebContent/layui/lay/modules/colorpicker.js new file mode 100644 index 0000000000000000000000000000000000000000..fd99bf88a28e93a4ef2aa7096de471acb84cfe6f --- /dev/null +++ b/WebContent/layui/lay/modules/colorpicker.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
    ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
    "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
    ','
    ','
    ','
    ','
    ','
    ',"
    ",'
    ','
    ',"
    ","
    ",'
    ','
    ','
    ',"
    ","
    ",function(){if(o.predefine){var e=['
    '];return layui.each(o.colors,function(i,o){e.push(['
    ','
    ',"
    "].join(""))}),e.push("
    "),e.join("")}return""}(),'
    ','
    ','',"
    ",'
    ','','',"","
    "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
    t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/element.js b/WebContent/layui/lay/modules/element.js new file mode 100644 index 0000000000000000000000000000000000000000..ac628df982b0bd70853d8c3c1d450330bcc4ddf6 --- /dev/null +++ b/WebContent/layui/lay/modules/element.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
  • "+(i.title||"unnaming")+"
  • ";return s[0]?s.before(r):n.append(r),o.append('
    '+(i.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/flow.js b/WebContent/layui/lay/modules/flow.js new file mode 100644 index 0000000000000000000000000000000000000000..8a80c05dc7aece83e24331a8e8fd29ee79c914a5 --- /dev/null +++ b/WebContent/layui/lay/modules/flow.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/form.js b/WebContent/layui/lay/modules/form.js new file mode 100644 index 0000000000000000000000000000000000000000..daa8ce5b503cc7b7fed5bcfbdeabde7f7feda23a --- /dev/null +++ b/WebContent/layui/lay/modules/form.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

    '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
    ','
    ','','
    ','
    ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
    "+a.label+"
    "):t.push('
    '+a.innerHTML+"
    "):t.push('
    '+(a.innerHTML||i)+"
    ")}),0===t.length&&t.push('
    没有选项
    '),t.join("")}(r.find("*"))+"
    ","
    "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
    ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
    "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
    ',''+i[l.checked?0:1]+"","
    "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
    ","
    "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/jquery.js b/WebContent/layui/lay/modules/jquery.js new file mode 100644 index 0000000000000000000000000000000000000000..242696a427f692fa914b6bacafc716f3cc9dd22e --- /dev/null +++ b/WebContent/layui/lay/modules/jquery.js @@ -0,0 +1,5 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
    a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
    a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.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 pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
    ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/laydate.js b/WebContent/layui/lay/modules/laydate.js new file mode 100644 index 0000000000000000000000000000000000000000..ae0a591def9355cef54255baa416e2d8e36467f2 --- /dev/null +++ b/WebContent/layui/lay/modules/laydate.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
    建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
    "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
    已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

    "+r.time[e]+"

      "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
    ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s','
    '+f+"
    ",'
    ','',"
    ","
    "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

      ','
    • ','','
      ','',"
      ","
    • ",'
    • ','','
      ','",'","
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/layer.js b/WebContent/layui/lay/modules/layer.js new file mode 100644 index 0000000000000000000000000000000000000000..c6d5378477edadcb841f2a922442e266e739c182 --- /dev/null +++ b/WebContent/layui/lay/modules/layer.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
    '+(f?r.title[0]:r.title)+"
    ":"";return r.zIndex=s,t([r.shade?'
    ':"",'
    '+(e&&2!=r.type?"":u)+'
    '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
    '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
    '+e+"
    "}():"")+(r.resize?'':"")+"
    "],u,i('
    ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
      '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
    • '+(t[0].content||"no content")+"
    • ";i'+(t[i].content||"no content")+"";return a}()+"
    ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
    '+(u.length>1?'':"")+'
    '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
    ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/laypage.js b/WebContent/layui/lay/modules/laypage.js new file mode 100644 index 0000000000000000000000000000000000000000..fd07fdaef8d453290119594e89eeec125d8f3968 --- /dev/null +++ b/WebContent/layui/lay/modules/laypage.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/laytpl.js b/WebContent/layui/lay/modules/laytpl.js new file mode 100644 index 0000000000000000000000000000000000000000..d482d4eb9cece83f365f79d30f0a90140859799e --- /dev/null +++ b/WebContent/layui/lay/modules/laytpl.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/mobile.js b/WebContent/layui/lay/modules/mobile.js new file mode 100644 index 0000000000000000000000000000000000000000..35cfdf0756097af3500a5d8efffdab7edbd4cd09 --- /dev/null +++ b/WebContent/layui/lay/modules/mobile.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

    '+(e?i.title[0]:i.title)+"

    ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
    '+e+"
    "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

    '+(i.content||"")+"

    "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
    ':"")+'
    "+l+'
    '+i.content+"
    "+d+"
    ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(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 l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.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=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.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},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=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 e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.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=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(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 e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?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(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"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(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[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),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
    ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,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(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["layer-mobile","zepto"],function(e){"use strict";var t=layui.zepto,a=layui["layer-mobile"],i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"};a.msg=function(e){return a.open({content:e||"",skin:"msg",time:2})};var s=function(e){this.options=e};s.prototype.init=function(){var e=this,a=e.options,r=t("body"),s=t(a.elem||".layui-upload-file"),u=t('');return t("#"+n)[0]||r.append(u),s.each(function(r,s){s=t(s);var u='
    ',l=s.attr("lay-type")||a.type;a.unwrap||(u='
    '+u+''+(s.attr("lay-title")||a.title||"上传"+(o[l]||"图片"))+"
    "),u=t(u),a.unwrap||u.on("dragover",function(e){e.preventDefault(),t(this).addClass(i)}).on("dragleave",function(){t(this).removeClass(i)}).on("drop",function(){t(this).removeClass(i)}),s.parent("form").attr("target")===n&&(a.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=t(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return a.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return a.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return a.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return a.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=t("#"+n),f=setInterval(function(){var t;try{t=c.contents().find("body").text()}catch(i){a.msg("上传接口存在跨域",r),clearInterval(f)}if(t){clearInterval(f),c.contents().find("body").html("");try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(t,e)}},30);e.value=""}},e("upload-mobile",function(e){var t=new s(e=e||{});t.init()})});layui.define(function(i){i("layim-mobile",layui.v)});layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/rate.js b/WebContent/layui/lay/modules/rate.js new file mode 100644 index 0000000000000000000000000000000000000000..762fb3a9f6e8c34fe3e15937e7488f0a342d9887 --- /dev/null +++ b/WebContent/layui/lay/modules/rate.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/slider.js b/WebContent/layui/lay/modules/slider.js new file mode 100644 index 0000000000000000000000000000000000000000..446378d99607d7444ccdd4486dd0eacef72702a6 --- /dev/null +++ b/WebContent/layui/lay/modules/slider.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
    ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
    f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/table.js b/WebContent/layui/lay/modules/table.js new file mode 100644 index 0000000000000000000000000000000000000000..e9217db674f6cd688b62f498b8409e79fc92239f --- /dev/null +++ b/WebContent/layui/lay/modules/table.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
    ','
    ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
    ","
    "].join("")},E=['',"","
    "].join(""),z=['
    ',"{{# if(d.data.toolbar){ }}",'
    ','
    ','
    ',"
    ","{{# } }}",'
    ',"{{# if(d.data.loading){ }}",'
    ','',"
    ","{{# } }}","{{# var left, right; }}",'
    ',_(),"
    ",'
    ',E,"
    ","{{# if(left){ }}",'
    ','
    ',_({fixed:!0}),"
    ",'
    ',E,"
    ","
    ","{{# }; }}","{{# if(right){ }}",'
    ','
    ',_({fixed:"right"}),'
    ',"
    ",'
    ',E,"
    ","
    ","{{# }; }}","
    ","{{# if(d.data.totalRow){ }}",'
    ','','',"
    ","
    ","{{# } }}","{{# if(d.data.page){ }}",'
    ','
    ',"
    ","{{# } }}","","
    "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
    ','
    ','
    '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
    ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
    '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
    ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
    数据接口请求异常:'+t+"
    "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
    '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
    "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
    '+s.text.none+"
    ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
    '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
    "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
    ','',"
    "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
    ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
      ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
    • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
    • 导出到 Csv 文件
    • ','
    • 导出到 Excel 文件
    • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
      ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
      ',d.html(),"
      ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/tree.js b/WebContent/layui/lay/modules/tree.js new file mode 100644 index 0000000000000000000000000000000000000000..e8c053d339143560ff3d5ce7c0050547e0e5b763 --- /dev/null +++ b/WebContent/layui/lay/modules/tree.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
        '),s=o(["
      • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
      • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
        '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/upload.js b/WebContent/layui/lay/modules/upload.js new file mode 100644 index 0000000000000000000000000000000000000000..404d534d9f408d63ad674d36073012df0e5d2b0f --- /dev/null +++ b/WebContent/layui/lay/modules/upload.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
        '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
        ',"
        "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); \ No newline at end of file diff --git a/WebContent/layui/lay/modules/util.js b/WebContent/layui/lay/modules/util.js new file mode 100644 index 0000000000000000000000000000000000000000..8d38508c4f649a531bfe725ad37fb2c12e1ef73e --- /dev/null +++ b/WebContent/layui/lay/modules/util.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
          ',t.bar1?'
        • '+c[0]+"
        • ":"",t.bar2?'
        • '+c[1]+"
        • ":"",'
        • '+c[2]+"
        • ","
        "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); \ No newline at end of file diff --git a/WebContent/layui/layui.all.js b/WebContent/layui/layui.all.js new file mode 100644 index 0000000000000000000000000000000000000000..b63179baf2f57814e8b5e1b5ec2aae84b52e1a9e --- /dev/null +++ b/WebContent/layui/layui.all.js @@ -0,0 +1,5 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={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":"<%=request.getContextPath()%>/layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href=""+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
        ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
        "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
        建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
        "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
        已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

        "+r.time[e]+"

          "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
        ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
        a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
        a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.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 pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
        ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
        '+(f?r.title[0]:r.title)+"
        ":"";return r.zIndex=s,t([r.shade?'
        ':"",'
        '+(e&&2!=r.type?"":u)+'
        '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
        '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
        '+e+"
        "}():"")+(r.resize?'':"")+"
        "],u,i('
        ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
          '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
        • '+(t[0].content||"no content")+"
        • ";i'+(t[i].content||"no content")+"";return a}()+"
        ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
        '+(u.length>1?'':"")+'
        '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
        ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
        是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
      • "+(i.title||"unnaming")+"
      • ";return s[0]?s.before(r):n.append(r),o.append('
        '+(i.content||"")+"
        "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
        '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
        ',"
        "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
        '+(t.tips?'
        ':"")+'
        '+(t.range?'
        ':"")+"
        ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
        ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
        ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
        f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
        ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
        "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
        ','
        ','
        ','
        ','
        ','
        ',"
        ",'
        ','
        ',"
        ","
        ",'
        ','
        ','
        ',"
        ","
        ",function(){if(o.predefine){var e=['
        '];return layui.each(o.colors,function(i,o){e.push(['
        ','
        ',"
        "].join(""))}),e.push("
        "),e.join("")}return""}(),'
        ','
        ','',"
        ",'
        ','','',"","
        "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
        t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

        '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
        ','
        ','','
        ','
        ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
        "+a.label+"
        "):t.push('
        '+a.innerHTML+"
        "):t.push('
        '+(a.innerHTML||i)+"
        ")}),0===t.length&&t.push('
        没有选项
        '),t.join("")}(r.find("*"))+"
        ","
        "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
        ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
        "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
        ',''+i[l.checked?0:1]+"","
        "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
        ","
        "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
          '),s=o(["
        • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
        • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
          '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
          ','
          ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
          ","
          "].join("")},E=['',"","
          "].join(""),z=['
          ',"{{# if(d.data.toolbar){ }}",'
          ','
          ','
          ',"
          ","{{# } }}",'
          ',"{{# if(d.data.loading){ }}",'
          ','',"
          ","{{# } }}","{{# var left, right; }}",'
          ',_(),"
          ",'
          ',E,"
          ","{{# if(left){ }}",'
          ','
          ',_({fixed:!0}),"
          ",'
          ',E,"
          ","
          ","{{# }; }}","{{# if(right){ }}",'
          ','
          ',_({fixed:"right"}),'
          ',"
          ",'
          ',E,"
          ","
          ","{{# }; }}","
          ","{{# if(d.data.totalRow){ }}",'
          ','','',"
          ","
          ","{{# } }}","{{# if(d.data.page){ }}",'
          ','
          ',"
          ","{{# } }}","","
          "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
          ','
          ','
          '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
          ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
          '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
          ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
          数据接口请求异常:'+t+"
          "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
          '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
          "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
          '+s.text.none+"
          ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
          '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
          "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
          ','',"
          "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
          ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
            ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
          • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
          • 导出到 Csv 文件
          • ','
          • 导出到 Excel 文件
          • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
            ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
            ',d.html(),"
            ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
              ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
            "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a",u=1;u<=i.length;u++){var r='
          • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
          • ":n+=r}n+=""+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
              ',t.bar1?'
            • '+c[0]+"
            • ":"",t.bar2?'
            • '+c[1]+"
            • ":"",'
            • '+c[2]+"
            • ","
            "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
            ','
            '+f+"
            ",'
            ','',"
            ","
            "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

            ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

            "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

            "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

              ','
            • ','','
              ','',"
              ","
            • ",'
            • ','','
              ','",'","
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
          • '+e+'
          • ')}),'
              '+t.join("")+"
            "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
              ','
            • ','','
              ','","
              ","
            • ",'
            • ','','
              ','',"
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
            1. '+o.replace(/[\r\t\n]+/g,"
            2. ")+"
            "),c.find(">.layui-code-h3")[0]||c.prepend('

            '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

            ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/WebContent/layui/layui.js b/WebContent/layui/layui.js new file mode 100644 index 0000000000000000000000000000000000000000..3f1d8a09de197518c7a9b2b7dee0baf134912cda --- /dev/null +++ b/WebContent/layui/layui.js @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={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":"<%=request.getContextPath()%>/layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href=""+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r + + + 图书馆图书借阅管理系统 + <%----%> + + + + + + + + + + +
            + +
              +
            • Login
            • +
            +
            + <%--读者登录开始--%> +
            +
            + +
            + <%--读者登录结束--%> + +
            +
            + +
            + + + + + diff --git a/WebContent/reader/books.jsp b/WebContent/reader/books.jsp new file mode 100644 index 0000000000000000000000000000000000000000..80f080a860906cd476fb5460867e1ae7848b7d64 --- /dev/null +++ b/WebContent/reader/books.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 图书馆图书借阅管理系统 + + + + + + + +
            + +
            +
            + + + + diff --git a/WebContent/reader/changePassword.jsp b/WebContent/reader/changePassword.jsp new file mode 100644 index 0000000000000000000000000000000000000000..c072a435849caa223b96a4b8b79d44a451b97191 --- /dev/null +++ b/WebContent/reader/changePassword.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java"%> + + +用户主页 + + + + + + + + + + + + + + + + + + +
            + +
              +
            • Personal Center
            • +
            +
            + <%--读者登录开始--%> +
            +
            + +
            + <%--读者登录结束--%> + +
            +
            +
            +
              +
            • +
            • +
            • +
            +
            + + + + diff --git a/WebContent/reader/index.jsp b/WebContent/reader/index.jsp new file mode 100644 index 0000000000000000000000000000000000000000..296597242a8d443ce8657092fae6c9c23800728c --- /dev/null +++ b/WebContent/reader/index.jsp @@ -0,0 +1,99 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java"%> + + +用户主页 + + + + + + + + + + + + + + + + + + + +
            + +
              +
            • Personal Center
            • +
            +
            + <%--读者登录开始--%> +
            +
            + +
            + <%--读者登录结束--%> + +
            +
            +
            +
              +
            • +
            • +
            • +
            +
            + + + diff --git a/WebContent/reader/reader.jsp b/WebContent/reader/reader.jsp new file mode 100644 index 0000000000000000000000000000000000000000..85d224de806f297e992457298aafa86006d5455f --- /dev/null +++ b/WebContent/reader/reader.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 图书馆图书借阅管理系统 + + + + + + + + + + + + diff --git a/WebContent/reader/return.jsp b/WebContent/reader/return.jsp new file mode 100644 index 0000000000000000000000000000000000000000..7def2aec9763f3f68356c5eec74690bec53b7ea1 --- /dev/null +++ b/WebContent/reader/return.jsp @@ -0,0 +1,53 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 图书馆图书借阅管理系统 + + + + + + + + + + + + diff --git a/WebContent/reader/search.jsp b/WebContent/reader/search.jsp new file mode 100644 index 0000000000000000000000000000000000000000..14154c159c59cdbacd93e9d2502deea05563df82 --- /dev/null +++ b/WebContent/reader/search.jsp @@ -0,0 +1,152 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java"%> + + +图书馆图书借阅管理系统 + + + + + + + + + + + + + + + + + +
            + +
            + <%--读者登录开始--%> +
            +
            + +
            + <%--读者登录结束--%> + +
            +
            + +
            + +
            +
            + + + + + + diff --git a/build/classes/dataOperator/BasicOperation.class b/build/classes/dataOperator/BasicOperation.class new file mode 100644 index 0000000000000000000000000000000000000000..880d09b8b8d081758028b5f6eadd4e474ed1fdc8 Binary files /dev/null and b/build/classes/dataOperator/BasicOperation.class differ diff --git a/build/classes/dataOperator/BrrowList.class b/build/classes/dataOperator/BrrowList.class new file mode 100644 index 0000000000000000000000000000000000000000..def84c3ff231abe081db6eea030830df48d20d7e Binary files /dev/null and b/build/classes/dataOperator/BrrowList.class differ diff --git a/build/classes/dataOperator/SBook.class b/build/classes/dataOperator/SBook.class new file mode 100644 index 0000000000000000000000000000000000000000..e2e0bb375e6caf29a7377a1215fa8b66f1fafdd9 Binary files /dev/null and b/build/classes/dataOperator/SBook.class differ diff --git a/build/classes/dbOperator/AdvancedOperation.class b/build/classes/dbOperator/AdvancedOperation.class new file mode 100644 index 0000000000000000000000000000000000000000..b4464fcdf9a7b3de06af1655ec696f3c9802ca2a Binary files /dev/null and b/build/classes/dbOperator/AdvancedOperation.class differ diff --git a/build/classes/dbOperator/BasicOperation.class b/build/classes/dbOperator/BasicOperation.class new file mode 100644 index 0000000000000000000000000000000000000000..b4614bcf33cf44ba5fb506e9453da692672e6cfa Binary files /dev/null and b/build/classes/dbOperator/BasicOperation.class differ diff --git a/build/classes/servlet/Login.class b/build/classes/servlet/Login.class new file mode 100644 index 0000000000000000000000000000000000000000..bcf57ef9c50651c6b92e39d94a0c201d1da34cb4 Binary files /dev/null and b/build/classes/servlet/Login.class differ diff --git a/build/classes/servlet/ReaderServlet.class b/build/classes/servlet/ReaderServlet.class new file mode 100644 index 0000000000000000000000000000000000000000..d3055de4ccdcf80be633732d333afbbb8e9b4956 Binary files /dev/null and b/build/classes/servlet/ReaderServlet.class differ diff --git a/build/classes/util/MailAuthenticator.class b/build/classes/util/MailAuthenticator.class new file mode 100644 index 0000000000000000000000000000000000000000..41d6381ea2aaf9f013997dc3fa70d63c30869301 Binary files /dev/null and b/build/classes/util/MailAuthenticator.class differ diff --git a/build/classes/util/MailOperation.class b/build/classes/util/MailOperation.class new file mode 100644 index 0000000000000000000000000000000000000000..de6d2fac31460d9f7bdebccbfb52031ddcd2c44d Binary files /dev/null and b/build/classes/util/MailOperation.class differ diff --git a/old/.classpath b/old/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..d03e1cdf3c50633d959e4d789f09f8da80ff1cb3 --- /dev/null +++ b/old/.classpath @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/.gitignore b/old/.gitignore similarity index 100% rename from .gitignore rename to old/.gitignore diff --git a/old/.project b/old/.project new file mode 100644 index 0000000000000000000000000000000000000000..35539376d804e72f95b4213eaf9f3f3f614c034c --- /dev/null +++ b/old/.project @@ -0,0 +1,31 @@ + + + library + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/old/.settings/.jsdtscope b/old/.settings/.jsdtscope new file mode 100644 index 0000000000000000000000000000000000000000..92e666d77dd95f33f7fc056a45049f2034b90ab8 --- /dev/null +++ b/old/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/old/.settings/org.eclipse.core.resources.prefs b/old/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..bb29a1d9496b9ae05f89536e7015c1e10dfdb598 --- /dev/null +++ b/old/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=GBK diff --git a/old/.settings/org.eclipse.jdt.core.prefs b/old/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..0c68a61dca867ceb49e79d2402935261ec3e3809 --- /dev/null +++ b/old/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/old/.settings/org.eclipse.wst.common.component b/old/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000000000000000000000000000000000..435fc3e8bd3cd4ec25530c5d5d49573fe7696028 --- /dev/null +++ b/old/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/old/.settings/org.eclipse.wst.common.project.facet.core.xml b/old/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000000000000000000000000000000000..06db4bbd8432d3e38c6ac07458f739c848172710 --- /dev/null +++ b/old/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/old/.settings/org.eclipse.wst.jsdt.ui.superType.container b/old/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000000000000000000000000000000000000..3bd5d0a4803967bc0bf72a7dd66d7e292ed2e586 --- /dev/null +++ b/old/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/old/.settings/org.eclipse.wst.jsdt.ui.superType.name b/old/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000000000000000000000000000000000000..05bd71b6ec2c1982d1e8a5653073281994564ae8 --- /dev/null +++ b/old/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/old/WebContent/META-INF/MANIFEST.MF b/old/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..254272e1c0740423e25eb40be9a98ce1556474b1 --- /dev/null +++ b/old/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/old/WebContent/WEB-INF/lib/mysql-connector-java-8.0.17.jar b/old/WebContent/WEB-INF/lib/mysql-connector-java-8.0.17.jar new file mode 100644 index 0000000000000000000000000000000000000000..3eb044b59eb5122030e3f2339b88c2ce8d571638 Binary files /dev/null and b/old/WebContent/WEB-INF/lib/mysql-connector-java-8.0.17.jar differ diff --git a/old/WebContent/WEB-INF/web.xml b/old/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000000000000000000000000000000000000..c58d097517702a1f8b87c3627f461e2e41da0c76 --- /dev/null +++ b/old/WebContent/WEB-INF/web.xml @@ -0,0 +1,49 @@ + + + library + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + + Launch + servlet.Login + + + + Launch + /launch + + + + Book + servlet.Book + + + Book + /book + + + + Reader + servlet.Reader + + + Reader + /reader + + + + ISBN + servlet.ISBN + + + ISBN + /ISBN.do + + \ No newline at end of file diff --git a/WebContent/index.html b/old/WebContent/index.html similarity index 96% rename from WebContent/index.html rename to old/WebContent/index.html index c03be2fbddcdf26773b0dbc1f6c079b3a40cd0ad..84ac829a71de32900dbd9899b68a1083a51d9746 100644 --- a/WebContent/index.html +++ b/old/WebContent/index.html @@ -1,15 +1,15 @@ - - - - - -
            - account: -
            - password: -
            - -      - -
            + + + + + +
            + account: +
            + password: +
            + +      + +
            \ No newline at end of file diff --git a/WebContent/librarian.jsp b/old/WebContent/librarian.jsp similarity index 97% rename from WebContent/librarian.jsp rename to old/WebContent/librarian.jsp index 431b47044655cf6f218802db2a2c86df4fa338bc..0075956d11e2051063989ba56653e80f6c47f97e 100644 --- a/WebContent/librarian.jsp +++ b/old/WebContent/librarian.jsp @@ -1,131 +1,131 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@page import="dbOperator.*,java.sql.*" %> - - - - - - - - -Librarian Main Page - - -
            - - -
            -
            -

            Your Information:

            - - <% - Cookie[] cookies = request.getCookies(); - if(cookies.equals(null))response.sendRedirect("index.html"); - for(int i = 0; i < cookies.length; i++){ - if(cookies[i].getName().equals("LoginInfo")){ - String currentCookie = cookies[i].getValue(); - Connection con = BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - String email = AdvancedOperation.getEmailByUid(con, uid); - String phoneNumber = AdvancedOperation.getPhoneNumberByUid(con, uid); - out.println("
              "); - out.println("
            • Your Uid:" + uid + "
            • "); - out.println("
            • Your Email:" + email + "
            • "); - out.println("
            • Your PhoneNumber:" + phoneNumber + "
            • "); - out.println("
            "); - con.close(); - } - } - %> -
            - -
            -
            - -
            -
            - +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="dbOperator.*,java.sql.*" %> + + + + + + + + +Librarian Main Page + + +
            + + +
            +
            +

            Your Information:

            + + <% + Cookie[] cookies = request.getCookies(); + if(cookies.equals(null))response.sendRedirect("index.html"); + for(int i = 0; i < cookies.length; i++){ + if(cookies[i].getName().equals("LoginInfo")){ + String currentCookie = cookies[i].getValue(); + Connection con = BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + String email = AdvancedOperation.getEmailByUid(con, uid); + String phoneNumber = AdvancedOperation.getPhoneNumberByUid(con, uid); + out.println("
              "); + out.println("
            • Your Uid:" + uid + "
            • "); + out.println("
            • Your Email:" + email + "
            • "); + out.println("
            • Your PhoneNumber:" + phoneNumber + "
            • "); + out.println("
            "); + con.close(); + } + } + %> +
            + +
            +
            + +
            +
            + \ No newline at end of file diff --git a/WebContent/manageBook.jsp b/old/WebContent/manageBook.jsp similarity index 97% rename from WebContent/manageBook.jsp rename to old/WebContent/manageBook.jsp index 8f07a3c1fb795006e63781b1ff43ce3d08d4722b..252f6db2954dd7f749fe5266773a34b8bc177cf4 100644 --- a/WebContent/manageBook.jsp +++ b/old/WebContent/manageBook.jsp @@ -1,304 +1,304 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@page import="dbOperator.*,java.sql.*"%> - - - - -图书大类管理 - - - - - - - <% - String searchtype = request.getParameter("types"); - String searchinfo = request.getParameter("searchinfo"); - int type = 0; - if (searchtype == null || searchtype.equals("name")) { - searchtype = "name"; - type = 0; - } else if (searchtype.equals("bid")) - type = 1; - else if (searchtype.equals("ISBN")) - type = 2; - else { - searchtype = "name"; - type = 0; - } - if (searchinfo == null) - searchinfo = ""; - session.setAttribute("type", type); - %> -

            Manage Books

            -
            -
            -
            -
            -
            - Search By: -
            -
            -
            - -
            -
            - -
            -
            -
            -
            - -
            - - - - - - - - - - - - - - - - <% - Connection con = BasicOperation.getConnection(); - ResultSet rs = AdvancedOperation.getBookInfo(con, searchinfo, searchtype); - while (rs.next()) { - %> - - <% - String bid = rs.getString(1); - out.println(""); - %> - - - <% - out.println(""); - out.println(""); - if(rs.getString(6)==null||rs.getString(6).equals("null")) out.println(""); - else out.println(""); - %> - - - - - <% - } - %> - -
            bidnamecategoryauthorpublisherISBNpriceoperationsee copy
            " + bid + "<%=rs.getString(2)%><%=rs.getString(3)%>" + rs.getString(4) + "" + rs.getString(5) + ""+ rs.getString(6) + "<%=rs.getString(7)%>
            - I want to add Book without ISBN   /   I want to add Book by - ISBN -
            - - - - - - - - - - - - - - - - +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@page import="dbOperator.*,java.sql.*"%> + + + + +图书大类管理 + + + + + + + <% + String searchtype = request.getParameter("types"); + String searchinfo = request.getParameter("searchinfo"); + int type = 0; + if (searchtype == null || searchtype.equals("name")) { + searchtype = "name"; + type = 0; + } else if (searchtype.equals("bid")) + type = 1; + else if (searchtype.equals("ISBN")) + type = 2; + else { + searchtype = "name"; + type = 0; + } + if (searchinfo == null) + searchinfo = ""; + session.setAttribute("type", type); + %> +

            Manage Books

            +
            +
            +
            +
            +
            + Search By: +
            +
            +
            + +
            +
            + +
            +
            +
            +
            + +
            + + + + + + + + + + + + + + + + <% + Connection con = BasicOperation.getConnection(); + ResultSet rs = AdvancedOperation.getBookInfo(con, searchinfo, searchtype); + while (rs.next()) { + %> + + <% + String bid = rs.getString(1); + out.println(""); + %> + + + <% + out.println(""); + out.println(""); + if(rs.getString(6)==null||rs.getString(6).equals("null")) out.println(""); + else out.println(""); + %> + + + + + <% + } + %> + +
            bidnamecategoryauthorpublisherISBNpriceoperationsee copy
            " + bid + "<%=rs.getString(2)%><%=rs.getString(3)%>" + rs.getString(4) + "" + rs.getString(5) + ""+ rs.getString(6) + "<%=rs.getString(7)%>
            + I want to add Book without ISBN   /   I want to add Book by + ISBN +
            + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/manageReader.jsp b/old/WebContent/manageReader.jsp similarity index 96% rename from WebContent/manageReader.jsp rename to old/WebContent/manageReader.jsp index ab194404e1056760d74a7f840071ec77ace6dbf9..032aa13b00c1b7c0538edffe0f36f15b85db76c4 100644 --- a/WebContent/manageReader.jsp +++ b/old/WebContent/manageReader.jsp @@ -1,255 +1,255 @@ - -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@page import="dbOperator.*,java.sql.*"%> - - - - -用户管理 - - - - - - - <% - String searchtype = request.getParameter("types"); - String searchinfo = request.getParameter("searchinfo"); - int type = 0; - if (searchtype == null || searchtype.equals("phoneNumber")) { - searchtype = "phoneNumber"; - type = 0; - } else if (searchtype.equals("Email")) - type = 1; - else if (searchtype.equals("uid")) - type = 2; - else { - searchtype = "phoneNumber"; - type = 0; - } - if (searchinfo == null) - searchinfo = ""; - session.setAttribute("type", type); - %> -

            Manage Readers

            -
            -
            -
            -
            -
            - Search By: -
            -
            -
            - -
            -
            - -
            -
            -
            -
            - -
            - - - - - - - - - - - <% - Connection con = BasicOperation.getConnection(); - ResultSet rs = AdvancedOperation.getReaderInfo(con, searchinfo, searchtype); - while (rs.next()) { - %> - - <% - String uid = rs.getString(1); - out.println(""); - %> - - - - - <% - } - %> - -
            uidEmailphoneNumberoperation
            " + uid + "<%=rs.getString(2)%><%=rs.getString(3)%>
            - I want to - add Reader - -
            - - - - - - - - - - - - - + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@page import="dbOperator.*,java.sql.*"%> + + + + +用户管理 + + + + + + + <% + String searchtype = request.getParameter("types"); + String searchinfo = request.getParameter("searchinfo"); + int type = 0; + if (searchtype == null || searchtype.equals("phoneNumber")) { + searchtype = "phoneNumber"; + type = 0; + } else if (searchtype.equals("Email")) + type = 1; + else if (searchtype.equals("uid")) + type = 2; + else { + searchtype = "phoneNumber"; + type = 0; + } + if (searchinfo == null) + searchinfo = ""; + session.setAttribute("type", type); + %> +

            Manage Readers

            +
            +
            +
            +
            +
            + Search By: +
            +
            +
            + +
            +
            + +
            +
            +
            +
            + +
            + + + + + + + + + + + <% + Connection con = BasicOperation.getConnection(); + ResultSet rs = AdvancedOperation.getReaderInfo(con, searchinfo, searchtype); + while (rs.next()) { + %> + + <% + String uid = rs.getString(1); + out.println(""); + %> + + + + + <% + } + %> + +
            uidEmailphoneNumberoperation
            " + uid + "<%=rs.getString(2)%><%=rs.getString(3)%>
            + I want to + add Reader + +
            + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/manageSpecificBook.jsp b/old/WebContent/manageSpecificBook.jsp similarity index 97% rename from WebContent/manageSpecificBook.jsp rename to old/WebContent/manageSpecificBook.jsp index b2425e52f1aed6e8a155777ac523082c49a62aae..123287f19165f95c9f9919f95ceb0cd5442aa88e 100644 --- a/WebContent/manageSpecificBook.jsp +++ b/old/WebContent/manageSpecificBook.jsp @@ -1,312 +1,312 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@page import="dbOperator.*,java.sql.*"%> - - - - -图书副本管理 - - - - - - - - <% - String searchtype = request.getParameter("types"); - String searchinfo = request.getParameter("searchinfo"); - int type = 0; - if (searchtype == null || searchtype.equals("status")) { - searchtype = "status"; - type = 0; - } else if (searchtype.equals("bookID")) - type = 1; - else if (searchtype.equals("bid")) - type = 2; - else { - searchtype = "status"; - type = 0; - } - if (searchinfo == null) - searchinfo = ""; - session.setAttribute("type", type); - %> -

            Manage SpecificBooks

            -
            -
            -
            -
            -
            - Search By: -
            -
            -
            - -
            -
            - -
            -
            -
            -
            - - - - -
            - - - - - - - - - - - - <% - Connection con = BasicOperation.getConnection(); - ResultSet rs = AdvancedOperation.getSpecificBookInfo(con, searchinfo, searchtype); - while (rs.next()) { - %> - - <% - out.println(""); - String bookID = rs.getString(1); - out.println( - ""); - %> - - - - - <% - } - %> - -
            bidbookIDlocationstatusoperation
            " + rs.getString(4) + "" - + bookID + "<%=rs.getString(2)%><%=rs.getString(3)%>
            - I want to - addSpecificBook -
            - - - - - - - - - - - - - - - - - - - +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@page import="dbOperator.*,java.sql.*"%> + + + + +图书副本管理 + + + + + + + + <% + String searchtype = request.getParameter("types"); + String searchinfo = request.getParameter("searchinfo"); + int type = 0; + if (searchtype == null || searchtype.equals("status")) { + searchtype = "status"; + type = 0; + } else if (searchtype.equals("bookID")) + type = 1; + else if (searchtype.equals("bid")) + type = 2; + else { + searchtype = "status"; + type = 0; + } + if (searchinfo == null) + searchinfo = ""; + session.setAttribute("type", type); + %> +

            Manage SpecificBooks

            +
            +
            +
            +
            +
            + Search By: +
            +
            +
            + +
            +
            + +
            +
            +
            +
            + + + + +
            + + + + + + + + + + + + <% + Connection con = BasicOperation.getConnection(); + ResultSet rs = AdvancedOperation.getSpecificBookInfo(con, searchinfo, searchtype); + while (rs.next()) { + %> + + <% + out.println(""); + String bookID = rs.getString(1); + out.println( + ""); + %> + + + + + <% + } + %> + +
            bidbookIDlocationstatusoperation
            " + rs.getString(4) + "" + + bookID + "<%=rs.getString(2)%><%=rs.getString(3)%>
            + I want to + addSpecificBook +
            + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/old/src/dataOperator/BasicOperation.java b/old/src/dataOperator/BasicOperation.java new file mode 100644 index 0000000000000000000000000000000000000000..26b32b4b6ee97d9762303cb0d6b20886dacf086a --- /dev/null +++ b/old/src/dataOperator/BasicOperation.java @@ -0,0 +1,98 @@ +package dataOperator; + +import java.security.MessageDigest; +import java.text.Format; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +public class BasicOperation { + /** + * ǰַMD5 + * @param dataStr Ҫַܵ + * @return ܽ + */ + public static String MD5(String dataStr){ + try { + MessageDigest m = MessageDigest.getInstance("MD5"); + m.update(dataStr.getBytes("UTF8")); + byte s[] = m.digest(); + String result = ""; + for (int i = 0; i < s.length; i++) { + result += Integer.toHexString((0x000000FF & s[i]) | 0xFFFFFF00).substring(6); + } + return result; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * ΪǰַϵţʹSQL + * @param str Ҫŵַ + * @return ŵַ + */ + public static String addQuotes(String str) { + if(str == null) return null; + return "'" + str + "'"; + } + /** + * ΪǰַȥţԱ + * @param str Ҫȥŵַ + * @return ȥŵַ + */ + public static String removeQuotes(String str) { + if(str == null) return null; + if(str.charAt(0)=='\'' && str.charAt(str.length()-1) == '\'') return str.substring(1, str.length()-1); + return str; + } + /** + * õ 2019-08-08 ʽַ(޵)SQLв + * @return ַ + */ + /*public static String getDateInString() { + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + return sdf.format(d); + }*/ + + /** + * õ 2019-08-08 09:32:15 ʽĴʱַ(޵)SQLв + * @return ʱַ + */ + public static String getDateWithTimeInString() { + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return sdf.format(d); + } + /** + * õ 2019-08-18 09:32:15 ʽĴʱַ()еIJƵ + * @param days Ƶ + * @return ʱַ + */ + public static String getDateWithTimeAfterDays(int days) { + Calendar c = Calendar.getInstance(); + c.setTime(new Date()); + c.add(Calendar.DAY_OF_MONTH, days);// ΪʱΪǰ + Format f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + //System.out.println(days + ":" + f.format(c.getTime())); + return f.format(c.getTime()); + } + /** + * õ 2019-08-08 12:32:15 ʽĴʱַ()еIJƵСʱ + * @param hours ƵСʱ + * @return ʱַ + */ + public static String getDateWithTimeAfterHours(int hours) { + Calendar c = Calendar.getInstance(); + c.setTime(new Date()); + c.add(Calendar.HOUR_OF_DAY, hours);// ΪʱΪǰСʱ + Format f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + //System.out.println(hours + "Сʱ:" + f.format(c.getTime())); + return f.format(c.getTime()); + } + public static void main(String[] args) { + System.out.println(getDateWithTimeAfterHours(0)); + } +} diff --git a/src/dbOperator/AdvancedOperation.bak b/old/src/dbOperator/AdvancedOperation.bak similarity index 97% rename from src/dbOperator/AdvancedOperation.bak rename to old/src/dbOperator/AdvancedOperation.bak index 13d736ba4e3d7416baa06b4416f28687ae7863d5..107198db26e714062dacc0174b2c5fa322856982 100644 --- a/src/dbOperator/AdvancedOperation.bak +++ b/old/src/dbOperator/AdvancedOperation.bak @@ -1,1084 +1,1084 @@ -package dbOperator; - -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.ResultSetMetaData; - -public class AdvancedOperation { - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); - if(rs.next()) { - int identity = rs.getInt(1); - con.close(); - return identity; - } - return 0; - } - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * @param con ݿ - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(Connection con, int uid) throws SQLException { - ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); - if(rs.next()) { - int identity = rs.getInt(1); - return identity; - } - return 0; - } - /** - * ǸûϢȡuidϢŻֻţԶж - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getUid(String information) throws SQLException { - int isEmail = information.indexOf("@"); - Connection con = BasicOperation.getConnection(); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select uid from User where Email = " + information; - } - else queryScript = "select uid from User where phoneNumber = " + information; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ǸûϢȡuidϢŻֻţԶж - * @param con ݿ - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getUid(Connection con, String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select uid from User where Email = " + information; - } - else queryScript = "select uid from User where phoneNumber = " + information; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 - */ - public static int getUidbyCookie(String cookie) throws SQLException { - Connection con = BasicOperation.getConnection(); - cookie = "'" + cookie + "'"; - String queryScript = ""; - queryScript = "select uid from User where recentCookie = " + cookie; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - con.close(); - return uid; - } - /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ - * @param con ݿ - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 - */ - public static int getUidbyCookie(Connection con, String cookie) throws SQLException { - cookie = "'" + cookie + "'"; - String queryScript = ""; - queryScript = "select uid from User where recentCookie = " + cookie; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - Connection con = BasicOperation.getConnection(); - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select recentCookie from User where Email = " + information; - } - else queryScript = "select recentCookie from User where phoneNumber = " + information; - System.out.println(queryScript); - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - con.close(); - return recentCookie; - } - /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж - * @param con ݿ - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(Connection con, String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select recentCookie from User where Email = " + information; - } - else queryScript = "select recentCookie from User where phoneNumber = " + information; - System.out.println(queryScript); - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - return recentCookie; - } - /** - * ǸûIDݿм¼һCookie - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - String queryScript = "select recentCookie from User where uid = " + uid; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - con.close(); - return recentCookie; - } - /** - * ǸûIDݿм¼һCookie - * @param con ݿ - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(Connection con, int uid) throws SQLException { - String queryScript = "select recentCookie from User where uid = " + uid; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - return recentCookie; - } - /** - * Ϊϵͳעû - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ - * ˵עߵ-ע = 1 ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 - */ - public static int registerNewUser(String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { - if(phoneNumber == null || Email == null) return -1; - if(registeredIdentity-registrantIdentity == 1) { - Email = "'" + Email + "'"; - phoneNumber = "'" + phoneNumber + "'"; - String defaultPassword = ""; - if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; - else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; - else return -1; - String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * Ϊϵͳעû - * @param con ݿ - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ - * ˵עߵ-ע = 1 ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 - */ - public static int registerNewUser(Connection con,String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { - if(registeredIdentity-registrantIdentity == 1) { - Email = "'" + Email + "'"; - phoneNumber = "'" + phoneNumber + "'"; - String defaultPassword = ""; - if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; - else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; - else return -1; - String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 - */ - public static String getLoginInfo(String information,String password) throws SQLException { - String type = "phoneNumber"; - if(information.indexOf('@') != -1) type = "Email"; - password = "'" + password + "'"; - String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; - Connection con = BasicOperation.getConnection(); - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; - BasicOperation.executeUpdateScript(con,updateScript); - con.close(); - return getUserCookie(information); - } - con.close(); - return null; - } - /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ - * @param con ݿ - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 - */ - public static String getLoginInfo(Connection con,String information,String password) throws SQLException { - String type = "phoneNumber"; - if(information.indexOf('@') != -1) type = "Email"; - password = "'" + password + "'"; - String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; - BasicOperation.executeUpdateScript(con,updateScript); - return getUserCookie(con,information); - } - return null; - } - - -// ºл - /** - * Ǹݻȡ鼮ϢݿISBNbookIDûʱҪѡһַʽңĬΪʱжؼԿոָ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param inputValue - * @param condition ҷʽ - * @return Book - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException{ - if(condition.equals("bookID")) { //鱾IDвѯ - ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where bid = (select bid from SpecificBook where bookID = '" + inputValue + "')"); - if(rs.next()) { - return rs; - } - } - else { //鱾ISBNвѯʵģѯ - inputValue.replaceAll(" ", "%"); - System.out.println("select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); - ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); - if(rs.next()) { - return rs; - } - } - return null; //δѯ - } - - /** - * Reader/Librarianѯ/黹¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID ѯߵuid conditionжϽ/黹 - * @param condition 趨ѯ/黹 - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { - int userIdentity = getIdentity(con,userID); - if(userIdentity == 2) { //identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - if(userIdentity == 3) { //identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + userID + "and status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * أLibrarianѯָreaderIDĽ/黹 - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID ѯߵuid - * @param condition 趨ѯ/黹 - * @param readerID LibrarianָIJѯ - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) throws SQLException { - if(getIdentity(con,userID) == 2) { //identity=2LibrarianִвѯָReaderĽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + readerID + "and status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * ˺Librarian/Readerѯ¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID жû - * @return FineList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { - int userIdentity = getIdentity(con,userID); - if(userIdentity == 2) { //identity=2,Librarianִв,ѯReaderFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList"); - if(rs.next()) { - return rs; - } - } - if(userIdentity == 3) { //identity=3,Readerִв,ѯԼFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid = " + userID); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * أLibrarianѯָReaderķ¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID readerIDLibrarianָIJѯ - * @return FineList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { - if(getIdentity(con,userID) == 2) { //identity=2,Librarianִв,ѯָReaderFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid =" + readerID); - if(rs.next()) { - return rs; - } - } - return null; - } - - - -//ºǺ -/** - * Ϊϵͳ - * - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param ISBN - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooksbyISBN(int uid, String ISBN, int num) throws SQLException { - Connection con = BasicOperation.getConnection(); - int identity = getIdentity(con, uid); - if (identity != 2) - return; - String sql = "select bid from Book where ISBN = '" + ISBN + "'"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - String bid = null; - if (res.next()) { - bid = res.getString("bid"); - addBooksBybid(con, uid, bid, num); - } - con.close(); - return; - } - - /** - * Ϊϵͳ - * - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param ISBN - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooksbyISBN(Connection con, int uid, String ISBN, int num) throws SQLException { - int identity = getIdentity(con, uid); - if (identity != 2) - return; - String sql = "select bid from Book where ISBN = '" + ISBN + "')"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - String bid = null; - if (res.next()) { - bid = res.getString("bid"); - addBooksBybid(con, uid, bid, num); - } - return; - } - - /** - * Ϊϵͳ - * - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param bid id - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooksBybid(Connection con, int uid, String bid, int num) throws SQLException { - int identity = getIdentity(uid); - String bookid = null; - if (identity != 2) - return; - while (num-- > 0) { - bookid = bid + System.currentTimeMillis() + Integer.toString(num); - bookid = "MD5('" + bookid + "')"; - String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,NULL,'"+bid+"')"; - BasicOperation.executeUpdateScript(con, sql); - } - con.close(); - return; - } - - /** - * Ϊϵͳ - * - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param bid id - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooksBybid(int uid, String bid, int num) throws SQLException { - int identity = getIdentity(uid); - String bookid = null; - if (identity != 2) - return; - Connection con = BasicOperation.getConnection(); - while (num-- > 0) { - bookid = bid + System.currentTimeMillis() + Integer.toString(num); - bookid = "MD5('" + bookid + "')"; - String sql = "insert into SpecificBook(bookID,position,status,ISBN) values(" + bookid + ",NULL,NULL)"; - BasicOperation.executeUpdateScript(con, sql); - } - con.close(); - return; - } - - /** - * λϢ - * - * @param uid עߵݣʵʹʱҪΪֵ ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param position λϢ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookposition(int uid, String bookid, String position) throws SQLException { - int identity = getIdentity(uid); - if (identity != 2) - return; - String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; - BasicOperation.executeUpdateScript(updateScript); - } - - /** - * λϢ - * - * @param con ݿ - * @param uid עߵݣʵʹʱҪΪֵ ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param position λϢ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookposition(Connection con, int uid, String bookid, String position) throws SQLException { - int identity = getIdentity(con, uid); - if (identity != 2) - return; - String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; - BasicOperation.executeUpdateScript(con, updateScript); - } - - /** - * ״̬Ϣ - * - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param status ״̬Ϣ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookstatus(int uid, String bookid, String status) throws SQLException { - int identity = getIdentity(uid); - if (identity != 2) - return; - String updateScript = "update SpecificBook set status= '" + status + "' where bookID = '" + bookid + "'"; - BasicOperation.executeUpdateScript(updateScript); - } - - /** - * ״̬Ϣ - * - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param status ״̬Ϣ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookstatus(Connection con, int uid, String bookid, String status) throws SQLException { - int identity = getIdentity(con, uid); - if (identity != 2) - return; - String updateScript = "update SpecificBook set status= '" + status + "' where bookID = '" + bookid + "'"; - BasicOperation.executeUpdateScript(con, updateScript); - } - -//ºǼ - /** - * û޸ĸϢ - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 - */ - public static int updateUserInfo(String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { - Connection con = BasicOperation.getConnection(); - int identity = getIdentity(con,updaterUid); - ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); - String originalEmail = null; - String originalPhoneNumber = null; - if(rs1.next()) { - originalEmail=rs1.getString(1); - originalPhoneNumber = rs1.getString(2); - } - if(newEmail == null) { - newEmail = originalEmail; - } - if(newPhoneNumber == null) { - newPhoneNumber = originalPhoneNumber; - } - if(identity == 3 || identity == 2) { - if(identity == 3) updatedUid = updaterUid; - newEmail = "'" + newEmail + "'"; - newPhoneNumber = "'" + newPhoneNumber + "'"; - String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; - return BasicOperation.executeUpdateScript(updateScript); - } - else if(identity == 1) { - System.out.println("Աֹ޸ĶϢ"); - return -1; - } - return -1; - } - /** - * û޸ĸϢ - * @param con ݿ - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 - */ - public static int updateUserInfo(Connection con,String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { - int identity = getIdentity(con,updaterUid); - ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); - String originalEmail = null; - String originalPhoneNumber = null; - if(rs1.next()) { - originalEmail=rs1.getString(1); - originalPhoneNumber = rs1.getString(2); - } - if(newEmail == null) { - newEmail = originalEmail; - } - if(newPhoneNumber == null) { - newPhoneNumber = originalPhoneNumber; - } - if(identity == 3 || identity == 2) { - if(identity == 3) updatedUid = updaterUid; - newEmail = "'" + newEmail + "'"; - newPhoneNumber = "'" + newPhoneNumber + "'"; - String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; - return BasicOperation.executeUpdateScript(con,updateScript); - } - else if(identity == 1) { - System.out.println("Աֹ޸ĶϢ"); - return -1; - } - return -1; - } - - /** - * ޸û - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ - * @throws SQLException - */ - public static int changePassword (int changerUid,int changedUid,String newPassword) throws SQLException { - int changerIdentity = getIdentity(changerUid); - int changedIdentity = getIdentity(changedUid); - if(changedIdentity - changerIdentity>=0) { - if(newPassword == null){ - System.out.println("޸ĺ룡"); - return -1; - } - if(changedIdentity == changerIdentity) changedUid = changerUid; - newPassword = "MD5('" + newPassword + "')"; - String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * ޸û - * @param con ݿ - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ - * @throws SQLException - */ - public static int changePassword (Connection con,int changerUid,int changedUid,String newPassword) throws SQLException { - int changerIdentity = getIdentity(con,changerUid); - int changedIdentity = getIdentity(con,changedUid); - if(changedIdentity - changerIdentity>=0) { - if(newPassword == null){ - System.out.println("޸ĺ룡"); - return -1; - } - if(changedIdentity == changerIdentity) changedUid = changerUid; - newPassword = "MD5('" + newPassword + "')"; - String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - /** - * ޸ɽ𣨷 - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateFineValue (int updaterUid,double fineValue) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(fineValue < 0){ - System.out.println("𲻵Ϊ"); - return -1; - } - else if(fineValue > 0){ - String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; - return BasicOperation.executeUpdateScript(updateScript); - } - else return -1; - } - return -1; - } - /** - * ޸ɽ𣨷 - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateFineValue (Connection con,int updaterUid,double fineValue) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(fineValue < 0){ - System.out.println("𲻵Ϊ"); - return -1; - } - else if(fineValue > 0){ - String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - else return -1; - } - return -1; - } - /** - * ޸Ĺ黹 - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateReturnPeriod (int updaterUid,int returnPeriod) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(returnPeriod <= 0){ - System.out.println("黹ڱΪ"); - return -1; - } - else { - String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; - return BasicOperation.executeUpdateScript(updateScript); - } - } - return -1; - } - /** - * ޸Ĺ黹 - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateReturnPeriod (Connection con,int updaterUid,int returnPeriod) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(returnPeriod <= 0){ - System.out.println("黹ڱΪ"); - return -1; - } - else { - String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - } - return -1; - } - /** - * ޸ı֤ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺֵ֤ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateSecurityDesposit (int updaterUid,double securityDesposit) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(securityDesposit < 0){ - System.out.println("֤Ϊ"); - return -1; - } - else{ - String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; - return BasicOperation.executeUpdateScript(updateScript); - } - } - return -1; - } - /** - * ޸ı֤ - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺֵ֤ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateSecurityDesposit (Connection con,int updaterUid,double securityDesposit) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(securityDesposit < 0){ - System.out.println("֤Ϊ"); - return -1; - } - else{ - String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - } - return -1; - } - /** - * DZ༭ͼϢ(ߡ硢۸) - * @param updaterUid ޸ߵUID - * @param bookID DZ޸ĵͼbid - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ - * @throws SQLException - */ - public static int updateBookInfo (int updaterUid,int bid,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { - int identity = getIdentity(updaterUid); - Connection con = BasicOperation.getConnection(); - String originalName = null; - String originalAuthor = null; - String originalPublisher = null; - double originalPrice = 0; - ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where bid =" + bid); - if(identity == 2) { - if(rs.next()) { - originalName = rs.getString(1); - originalAuthor = rs.getString(2); - originalPublisher = rs.getString(3); - originalPrice = rs.getDouble(4); - } - con.close(); - if(newName == null) { - newName = originalName; - } - if(newAuthor == null) { - newAuthor = originalAuthor; - } - if(newPublisher == null) { - newPublisher = originalPublisher; - } - if(newPrice <= 0.0) { - newPrice = originalPrice; - } - newName = "'" + newName + "'"; - newAuthor = "'" + newAuthor + "'"; - newPublisher = "'" + newPublisher + "'"; - String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where bid =" + bid; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * DZ༭ͼϢ(ߡ硢۸) - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param bookID DZ޸ĵͼbid - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ - * @throws SQLException - */ - public static int updateBookInfo (Connection con,int updaterUid, int bid,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { - int identity = getIdentity(con,updaterUid); - String originalName = null; - String originalAuthor = null; - String originalPublisher = null; - double originalPrice = 0; - ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where bid =" + bid); - if(identity == 2) { - if(rs.next()) { - originalName = rs.getString(1); - originalAuthor = rs.getString(2); - originalPublisher = rs.getString(3); - originalPrice = rs.getDouble(4); - } - if(newName == null) { - newName = originalName; - } - if(newAuthor == null) { - newAuthor = originalAuthor; - } - if(newPublisher == null) { - newPublisher = originalPublisher; - } - if(newPrice <= 0.0) { - newPrice = originalPrice; - } - newName = "'" + newName + "'"; - newAuthor = "'" + newAuthor + "'"; - newPublisher = "'" + newPublisher + "'"; - String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + " where bid =" + bid; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - - //º˼ - - /** - * гĿ鼮Ϣ - * @param Name Ŀ - * @param con ݿ - * @return ϸNameͼ - * @throws SQLException - */ - public static ResultSet getSearchedBookInfo(Connection con,String Name) throws SQLException{ - - String queryScript="select * from Book where name like'%" + Name + "%'"; - ResultSet rs=BasicOperation.getQueryResult(con,queryScript); - ResultSetMetaData rsmd=rs.getMetaData(); - int columns=rsmd.getColumnCount(); - while(rs.next()) - { - for(int i=1;i<=columns;i++){ - System.out.print(rs.getString(i)+"\t"); - } - System.out.println(); - } - //rsָƻصһеλ - rs.beforeFirst(); - rs.next(); - return rs; - } - - - /** - * гöĿ - * @param con ݿ - * @param uid ߵuid - * @return ض߽Ŀ - * @throws SQLException - */ - public static ResultSet getReaderBorrowList(Connection con,int uid) throws SQLException{ - String selectScript="select * from BorrowList where uid=" + uid; - ResultSet rs=BasicOperation.getQueryResult(con,selectScript); - ResultSetMetaData rsmd=rs.getMetaData(); - int columns=rsmd.getColumnCount(); - while(rs.next()) - { - for(int i=1;i<=columns;i++){ - System.out.print(rs.getString(i)+"\t"); - } - System.out.println(); - } - //rsָƻصһеλ - rs.beforeFirst(); - rs.next(); - return rs; - } - - /** - * - * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν - * @author kbtx - * @param bookID 鱾bookID - * @param readerUid ߵuid - * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ - * @throws SQLException - * - */ - public static int updateBorrowList(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ - if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; - if(!(status.equals("returned")||status.equals("borrowed"))) return -1; - if(status.equals("borrowed")){ - String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; - ResultSet rs = BasicOperation.getQueryResult(con,queryScript); - //ܽѾٴν - if(rs.next()) return -1; - String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bookID + "','" + dataOperator.BasicOperation.getDateInString() + "','borrowed')"; - return BasicOperation.executeUpdateScript(con, updateScript); - } - if(status.equals("returned")) { - String updateScript = "update BorrowList set status = 'returned (Date = " + dataOperator.BasicOperation.getDateInString() + ")' where bookID = '" + bookID + "' and uid = " + readerUid; - updateBookStatus(con, bookID, librarianUid, readerUid, "available"); - return BasicOperation.executeUpdateScript(con, updateScript); - } - return -1; - } - - - - /** - * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList - * @param con ݿ - * @param bookID ĿbookID - * @param librarianUid ͼԱuidҪΪֵ - * @param readerUid ߵuidҪΪֵ - * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) - * @throws SQLException - */ - public static int updateBookStatus(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ - //֤ - if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; - //ַȡֵ - if(!(status.equals("available")||status.equals("borrowed"))) return -1; - String updateScript="update SpecificBook set status = '" + status + "' where bookID ='" + bookID +"'"; - BasicOperation.executeUpdateScript(con,updateScript); - if(status.equals("borrowed")){ - return updateBorrowList(con, bookID, librarianUid, readerUid, status); - } - return -1; - } - - /** - * ṩbiduidԱԤԼ - * - * ̣ - * 1.ѯⱾǷѾԤԼˣǣֹظԤԼ - * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" - * 3.˲SpecificBookκӰ - * - * @param con ݿ - * @param bid 鱾ID - * @param readerUid ߵuid - * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) - * @throws SQLException - */ - public static int getBookReserved(Connection con,int bid,int readerUid) throws SQLException{ - //֤ - if(getIdentity(con,readerUid)!=3) return -1; - //ͬһ鲻ܶԤԼ - String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid; - ResultSet rs = BasicOperation.getQueryResult(con,queryScript); - if(rs.next()) return -1; - String updateScript = "insert into ReverseList values('" + readerUid + "','" + bid + "','" - + dataOperator.BasicOperation.getDateWithTimeAfterHours(10) + "','reserving'"; - return BasicOperation.executeUpdateScript(con, updateScript); - } - - /** - * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" - * @return - */ - public static int getExpiredReserveInvalidate() { - return 0; - } - - - /** - * ǽԤԼͼԱ - * ̣ - * 1.ж˵Ƿȷȷֱӷ - * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" - * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" - * @param con - * @param bid - * @param readerUid - * @param librarianUid - * @return - */ - public static String getReservedBookBorrowed(Connection con,int bid,int readerUid,int librarianUid) { - return null; - } - -/* - * ʹԲݿǷ - public static void main(String[] args) throws SQLException { - System.out.println(getIdentity(1)); - Date date=new Date(); - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - } -*/ - - -} +package dbOperator; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.ResultSetMetaData; + +public class AdvancedOperation { + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); + if(rs.next()) { + int identity = rs.getInt(1); + con.close(); + return identity; + } + return 0; + } + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * @param con ݿ + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(Connection con, int uid) throws SQLException { + ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); + if(rs.next()) { + int identity = rs.getInt(1); + return identity; + } + return 0; + } + /** + * ǸûϢȡuidϢŻֻţԶж + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(String information) throws SQLException { + int isEmail = information.indexOf("@"); + Connection con = BasicOperation.getConnection(); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select uid from User where Email = " + information; + } + else queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ǸûϢȡuidϢŻֻţԶж + * @param con ݿ + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select uid from User where Email = " + information; + } + else queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(String cookie) throws SQLException { + Connection con = BasicOperation.getConnection(); + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + con.close(); + return uid; + } + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * @param con ݿ + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(Connection con, String cookie) throws SQLException { + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + Connection con = BasicOperation.getConnection(); + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select recentCookie from User where Email = " + information; + } + else queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * @param con ݿ + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select recentCookie from User where Email = " + information; + } + else queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + return recentCookie; + } + /** + * ǸûIDݿм¼һCookie + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + /** + * ǸûIDݿм¼һCookie + * @param con ݿ + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, int uid) throws SQLException { + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + return recentCookie; + } + /** + * Ϊϵͳעû + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ + * ˵עߵ-ע = 1 ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { + if(phoneNumber == null || Email == null) return -1; + if(registeredIdentity-registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; + else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; + else return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * Ϊϵͳעû + * @param con ݿ + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ + * ˵עߵ-ע = 1 ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(Connection con,String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { + if(registeredIdentity-registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; + else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; + else return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(String information,String password) throws SQLException { + String type = "phoneNumber"; + if(information.indexOf('@') != -1) type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; + BasicOperation.executeUpdateScript(con,updateScript); + con.close(); + return getUserCookie(information); + } + con.close(); + return null; + } + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * @param con ݿ + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(Connection con,String information,String password) throws SQLException { + String type = "phoneNumber"; + if(information.indexOf('@') != -1) type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; + BasicOperation.executeUpdateScript(con,updateScript); + return getUserCookie(con,information); + } + return null; + } + + +// ºл + /** + * Ǹݻȡ鼮ϢݿISBNbookIDûʱҪѡһַʽңĬΪʱжؼԿոָ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param inputValue + * @param condition ҷʽ + * @return Book + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException{ + if(condition.equals("bookID")) { //鱾IDвѯ + ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where bid = (select bid from SpecificBook where bookID = '" + inputValue + "')"); + if(rs.next()) { + return rs; + } + } + else { //鱾ISBNвѯʵģѯ + inputValue.replaceAll(" ", "%"); + System.out.println("select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); + ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); + if(rs.next()) { + return rs; + } + } + return null; //δѯ + } + + /** + * Reader/Librarianѯ/黹¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID ѯߵuid conditionжϽ/黹 + * @param condition 趨ѯ/黹 + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { + int userIdentity = getIdentity(con,userID); + if(userIdentity == 2) { //identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + if(userIdentity == 3) { //identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + userID + "and status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָreaderIDĽ/黹 + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID ѯߵuid + * @param condition 趨ѯ/黹 + * @param readerID LibrarianָIJѯ + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) throws SQLException { + if(getIdentity(con,userID) == 2) { //identity=2LibrarianִвѯָReaderĽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + readerID + "and status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * ˺Librarian/Readerѯ¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID жû + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { + int userIdentity = getIdentity(con,userID); + if(userIdentity == 2) { //identity=2,Librarianִв,ѯReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList"); + if(rs.next()) { + return rs; + } + } + if(userIdentity == 3) { //identity=3,Readerִв,ѯԼFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid = " + userID); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָReaderķ¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID readerIDLibrarianָIJѯ + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { + if(getIdentity(con,userID) == 2) { //identity=2,Librarianִв,ѯָReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid =" + readerID); + if(rs.next()) { + return rs; + } + } + return null; + } + + + +//ºǺ +/** + * Ϊϵͳ + * + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param ISBN + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksbyISBN(int uid, String ISBN, int num) throws SQLException { + Connection con = BasicOperation.getConnection(); + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String sql = "select bid from Book where ISBN = '" + ISBN + "'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + String bid = null; + if (res.next()) { + bid = res.getString("bid"); + addBooksBybid(con, uid, bid, num); + } + con.close(); + return; + } + + /** + * Ϊϵͳ + * + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param ISBN + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksbyISBN(Connection con, int uid, String ISBN, int num) throws SQLException { + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String sql = "select bid from Book where ISBN = '" + ISBN + "')"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + String bid = null; + if (res.next()) { + bid = res.getString("bid"); + addBooksBybid(con, uid, bid, num); + } + return; + } + + /** + * Ϊϵͳ + * + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param bid id + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksBybid(Connection con, int uid, String bid, int num) throws SQLException { + int identity = getIdentity(uid); + String bookid = null; + if (identity != 2) + return; + while (num-- > 0) { + bookid = bid + System.currentTimeMillis() + Integer.toString(num); + bookid = "MD5('" + bookid + "')"; + String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,NULL,'"+bid+"')"; + BasicOperation.executeUpdateScript(con, sql); + } + con.close(); + return; + } + + /** + * Ϊϵͳ + * + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param bid id + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksBybid(int uid, String bid, int num) throws SQLException { + int identity = getIdentity(uid); + String bookid = null; + if (identity != 2) + return; + Connection con = BasicOperation.getConnection(); + while (num-- > 0) { + bookid = bid + System.currentTimeMillis() + Integer.toString(num); + bookid = "MD5('" + bookid + "')"; + String sql = "insert into SpecificBook(bookID,position,status,ISBN) values(" + bookid + ",NULL,NULL)"; + BasicOperation.executeUpdateScript(con, sql); + } + con.close(); + return; + } + + /** + * λϢ + * + * @param uid עߵݣʵʹʱҪΪֵ ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param position λϢ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookposition(int uid, String bookid, String position) throws SQLException { + int identity = getIdentity(uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(updateScript); + } + + /** + * λϢ + * + * @param con ݿ + * @param uid עߵݣʵʹʱҪΪֵ ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param position λϢ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookposition(Connection con, int uid, String bookid, String position) throws SQLException { + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(con, updateScript); + } + + /** + * ״̬Ϣ + * + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param status ״̬Ϣ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookstatus(int uid, String bookid, String status) throws SQLException { + int identity = getIdentity(uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set status= '" + status + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(updateScript); + } + + /** + * ״̬Ϣ + * + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param status ״̬Ϣ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookstatus(Connection con, int uid, String bookid, String status) throws SQLException { + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set status= '" + status + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(con, updateScript); + } + +//ºǼ + /** + * û޸ĸϢ + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { + Connection con = BasicOperation.getConnection(); + int identity = getIdentity(con,updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if(rs1.next()) { + originalEmail=rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + if(newEmail == null) { + newEmail = originalEmail; + } + if(newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if(identity == 3 || identity == 2) { + if(identity == 3) updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(updateScript); + } + else if(identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + /** + * û޸ĸϢ + * @param con ݿ + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(Connection con,String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { + int identity = getIdentity(con,updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if(rs1.next()) { + originalEmail=rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + if(newEmail == null) { + newEmail = originalEmail; + } + if(newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if(identity == 3 || identity == 2) { + if(identity == 3) updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(con,updateScript); + } + else if(identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + + /** + * ޸û + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword (int changerUid,int changedUid,String newPassword) throws SQLException { + int changerIdentity = getIdentity(changerUid); + int changedIdentity = getIdentity(changedUid); + if(changedIdentity - changerIdentity>=0) { + if(newPassword == null){ + System.out.println("޸ĺ룡"); + return -1; + } + if(changedIdentity == changerIdentity) changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * ޸û + * @param con ݿ + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword (Connection con,int changerUid,int changedUid,String newPassword) throws SQLException { + int changerIdentity = getIdentity(con,changerUid); + int changedIdentity = getIdentity(con,changedUid); + if(changedIdentity - changerIdentity>=0) { + if(newPassword == null){ + System.out.println("޸ĺ룡"); + return -1; + } + if(changedIdentity == changerIdentity) changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + /** + * ޸ɽ𣨷 + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue (int updaterUid,double fineValue) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(fineValue < 0){ + System.out.println("𲻵Ϊ"); + return -1; + } + else if(fineValue > 0){ + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; + return BasicOperation.executeUpdateScript(updateScript); + } + else return -1; + } + return -1; + } + /** + * ޸ɽ𣨷 + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue (Connection con,int updaterUid,double fineValue) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(fineValue < 0){ + System.out.println("𲻵Ϊ"); + return -1; + } + else if(fineValue > 0){ + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + else return -1; + } + return -1; + } + /** + * ޸Ĺ黹 + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod (int updaterUid,int returnPeriod) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(returnPeriod <= 0){ + System.out.println("黹ڱΪ"); + return -1; + } + else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + /** + * ޸Ĺ黹 + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod (Connection con,int updaterUid,int returnPeriod) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(returnPeriod <= 0){ + System.out.println("黹ڱΪ"); + return -1; + } + else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + } + return -1; + } + /** + * ޸ı֤ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit (int updaterUid,double securityDesposit) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(securityDesposit < 0){ + System.out.println("֤Ϊ"); + return -1; + } + else{ + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + /** + * ޸ı֤ + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit (Connection con,int updaterUid,double securityDesposit) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(securityDesposit < 0){ + System.out.println("֤Ϊ"); + return -1; + } + else{ + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + } + return -1; + } + /** + * DZ༭ͼϢ(ߡ硢۸) + * @param updaterUid ޸ߵUID + * @param bookID DZ޸ĵͼbid + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfo (int updaterUid,int bid,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { + int identity = getIdentity(updaterUid); + Connection con = BasicOperation.getConnection(); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where bid =" + bid); + if(identity == 2) { + if(rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + con.close(); + if(newName == null) { + newName = originalName; + } + if(newAuthor == null) { + newAuthor = originalAuthor; + } + if(newPublisher == null) { + newPublisher = originalPublisher; + } + if(newPrice <= 0.0) { + newPrice = originalPrice; + } + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where bid =" + bid; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * DZ༭ͼϢ(ߡ硢۸) + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param bookID DZ޸ĵͼbid + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfo (Connection con,int updaterUid, int bid,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { + int identity = getIdentity(con,updaterUid); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where bid =" + bid); + if(identity == 2) { + if(rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + if(newName == null) { + newName = originalName; + } + if(newAuthor == null) { + newAuthor = originalAuthor; + } + if(newPublisher == null) { + newPublisher = originalPublisher; + } + if(newPrice <= 0.0) { + newPrice = originalPrice; + } + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + " where bid =" + bid; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + + //º˼ + + /** + * гĿ鼮Ϣ + * @param Name Ŀ + * @param con ݿ + * @return ϸNameͼ + * @throws SQLException + */ + public static ResultSet getSearchedBookInfo(Connection con,String Name) throws SQLException{ + + String queryScript="select * from Book where name like'%" + Name + "%'"; + ResultSet rs=BasicOperation.getQueryResult(con,queryScript); + ResultSetMetaData rsmd=rs.getMetaData(); + int columns=rsmd.getColumnCount(); + while(rs.next()) + { + for(int i=1;i<=columns;i++){ + System.out.print(rs.getString(i)+"\t"); + } + System.out.println(); + } + //rsָƻصһеλ + rs.beforeFirst(); + rs.next(); + return rs; + } + + + /** + * гöĿ + * @param con ݿ + * @param uid ߵuid + * @return ض߽Ŀ + * @throws SQLException + */ + public static ResultSet getReaderBorrowList(Connection con,int uid) throws SQLException{ + String selectScript="select * from BorrowList where uid=" + uid; + ResultSet rs=BasicOperation.getQueryResult(con,selectScript); + ResultSetMetaData rsmd=rs.getMetaData(); + int columns=rsmd.getColumnCount(); + while(rs.next()) + { + for(int i=1;i<=columns;i++){ + System.out.print(rs.getString(i)+"\t"); + } + System.out.println(); + } + //rsָƻصһеλ + rs.beforeFirst(); + rs.next(); + return rs; + } + + /** + * + * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν + * @author kbtx + * @param bookID 鱾bookID + * @param readerUid ߵuid + * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ + * @throws SQLException + * + */ + public static int updateBorrowList(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ + if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; + if(!(status.equals("returned")||status.equals("borrowed"))) return -1; + if(status.equals("borrowed")){ + String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; + ResultSet rs = BasicOperation.getQueryResult(con,queryScript); + //ܽѾٴν + if(rs.next()) return -1; + String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bookID + "','" + dataOperator.BasicOperation.getDateInString() + "','borrowed')"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + if(status.equals("returned")) { + String updateScript = "update BorrowList set status = 'returned (Date = " + dataOperator.BasicOperation.getDateInString() + ")' where bookID = '" + bookID + "' and uid = " + readerUid; + updateBookStatus(con, bookID, librarianUid, readerUid, "available"); + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + + + /** + * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList + * @param con ݿ + * @param bookID ĿbookID + * @param librarianUid ͼԱuidҪΪֵ + * @param readerUid ߵuidҪΪֵ + * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) + * @throws SQLException + */ + public static int updateBookStatus(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ + //֤ + if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; + //ַȡֵ + if(!(status.equals("available")||status.equals("borrowed"))) return -1; + String updateScript="update SpecificBook set status = '" + status + "' where bookID ='" + bookID +"'"; + BasicOperation.executeUpdateScript(con,updateScript); + if(status.equals("borrowed")){ + return updateBorrowList(con, bookID, librarianUid, readerUid, status); + } + return -1; + } + + /** + * ṩbiduidԱԤԼ + * + * ̣ + * 1.ѯⱾǷѾԤԼˣǣֹظԤԼ + * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" + * 3.˲SpecificBookκӰ + * + * @param con ݿ + * @param bid 鱾ID + * @param readerUid ߵuid + * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) + * @throws SQLException + */ + public static int getBookReserved(Connection con,int bid,int readerUid) throws SQLException{ + //֤ + if(getIdentity(con,readerUid)!=3) return -1; + //ͬһ鲻ܶԤԼ + String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid; + ResultSet rs = BasicOperation.getQueryResult(con,queryScript); + if(rs.next()) return -1; + String updateScript = "insert into ReverseList values('" + readerUid + "','" + bid + "','" + + dataOperator.BasicOperation.getDateWithTimeAfterHours(10) + "','reserving'"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + + /** + * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" + * @return + */ + public static int getExpiredReserveInvalidate() { + return 0; + } + + + /** + * ǽԤԼͼԱ + * ̣ + * 1.ж˵Ƿȷȷֱӷ + * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" + * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" + * @param con + * @param bid + * @param readerUid + * @param librarianUid + * @return + */ + public static String getReservedBookBorrowed(Connection con,int bid,int readerUid,int librarianUid) { + return null; + } + +/* + * ʹԲݿǷ + public static void main(String[] args) throws SQLException { + System.out.println(getIdentity(1)); + Date date=new Date(); + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + } +*/ + + +} diff --git a/src/dbOperator/AdvancedOperation.bak.fake b/old/src/dbOperator/AdvancedOperation.bak.fake similarity index 97% rename from src/dbOperator/AdvancedOperation.bak.fake rename to old/src/dbOperator/AdvancedOperation.bak.fake index f64aacc9cdf4151508f4175b55950352668fc70f..65832a0c29755b1b465a74436bc015878ef7f42b 100644 --- a/src/dbOperator/AdvancedOperation.bak.fake +++ b/old/src/dbOperator/AdvancedOperation.bak.fake @@ -1,868 +1,868 @@ -package dbOperator; - -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; - -public class AdvancedOperation { - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); - if(rs.next()) { - int identity = rs.getInt(1); - con.close(); - return identity; - } - return 0; - } - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * @param con ݿ - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(Connection con, int uid) throws SQLException { - ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); - if(rs.next()) { - int identity = rs.getInt(1); - return identity; - } - return 0; - } - /** - * ǸûϢȡuidϢŻֻţԶж - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getUid(String information) throws SQLException { - int isEmail = information.indexOf("@"); - Connection con = BasicOperation.getConnection(); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select uid from User where Email = " + information; - } - else queryScript = "select uid from User where phoneNumber = " + information; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ǸûϢȡuidϢŻֻţԶж - * @param con ݿ - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getUid(Connection con, String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select uid from User where Email = " + information; - } - else queryScript = "select uid from User where phoneNumber = " + information; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 - */ - public static int getUidbyCookie(String cookie) throws SQLException { - Connection con = BasicOperation.getConnection(); - cookie = "'" + cookie + "'"; - String queryScript = ""; - queryScript = "select uid from User where recentCookie = " + cookie; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - con.close(); - return uid; - } - /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ - * @param con ݿ - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 - */ - public static int getUidbyCookie(Connection con, String cookie) throws SQLException { - cookie = "'" + cookie + "'"; - String queryScript = ""; - queryScript = "select uid from User where recentCookie = " + cookie; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - int uid = -1; - if(res.next()) uid = res.getInt(1); - return uid; - } - /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - Connection con = BasicOperation.getConnection(); - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select recentCookie from User where Email = " + information; - } - else queryScript = "select recentCookie from User where phoneNumber = " + information; - System.out.println(queryScript); - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - con.close(); - return recentCookie; - } - /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж - * @param con ݿ - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(Connection con, String information) throws SQLException { - int isEmail = information.indexOf("@"); - information = "'" + information + "'"; - String queryScript = ""; - if(isEmail!=-1) { - queryScript = "select recentCookie from User where Email = " + information; - } - else queryScript = "select recentCookie from User where phoneNumber = " + information; - System.out.println(queryScript); - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - return recentCookie; - } - /** - * ǸûIDݿм¼һCookie - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - String queryScript = "select recentCookie from User where uid = " + uid; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - con.close(); - return recentCookie; - } - /** - * ǸûIDݿм¼һCookie - * @param con ݿ - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static String getUserCookie(Connection con, int uid) throws SQLException { - String queryScript = "select recentCookie from User where uid = " + uid; - ResultSet res = BasicOperation.getQueryResult(con,queryScript); - String recentCookie = null; - if(res.next()) recentCookie = res.getString(1); - return recentCookie; - } - /** - * Ϊϵͳעû - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ - * ˵עߵ-ע = 1 ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 - */ - public static int registerNewUser(String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { - if(phoneNumber == null || Email == null) return -1; - if(registeredIdentity-registrantIdentity == 1) { - Email = "'" + Email + "'"; - phoneNumber = "'" + phoneNumber + "'"; - String defaultPassword = ""; - if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; - else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; - else return -1; - String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * Ϊϵͳעû - * @param con ݿ - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ - * ˵עߵ-ע = 1 ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 - */ - public static int registerNewUser(Connection con,String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { - if(registeredIdentity-registrantIdentity == 1) { - Email = "'" + Email + "'"; - phoneNumber = "'" + phoneNumber + "'"; - String defaultPassword = ""; - if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; - else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; - else return -1; - String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 - */ - public static String getLoginInfo(String information,String password) throws SQLException { - String type = "phoneNumber"; - if(information.indexOf('@') != -1) type = "Email"; - password = "'" + password + "'"; - String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; - Connection con = BasicOperation.getConnection(); - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; - BasicOperation.executeUpdateScript(con,updateScript); - con.close(); - return getUserCookie(information); - } - con.close(); - return null; - } - /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ - * @param con ݿ - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 - */ - public static String getLoginInfo(Connection con,String information,String password) throws SQLException { - String type = "phoneNumber"; - if(information.indexOf('@') != -1) type = "Email"; - password = "'" + password + "'"; - String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; - BasicOperation.executeUpdateScript(con,updateScript); - return getUserCookie(con,information); - } - return null; - } - - -// ºл - /** - * Ǹݻȡ鼮ϢݿISBNBookIDûʱҪѡһַʽңĬΪʱжؼԿոָ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param inputValue - * @param condition ҷʽ - * @return Book - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException{ - if(condition.equals("BookID")) { //鱾IDвѯ - ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where ISBN = (select ISBN from SpecificBook where BookID = '" + inputValue + "')"); - if(rs.next()) { - return rs; - } - } - else { //鱾ISBNвѯʵģѯ - inputValue.replaceAll(" ", "%"); - ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where " + condition + "like" + "'%" + inputValue + "%'"); - if(rs.next()) { - return rs; - } - } - return null; //δѯ - } - - /** - * Reader/Librarianѯ/黹¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID ѯߵuid conditionжϽ/黹 - * @param condition 趨ѯ/黹 - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { - int userIdentity = getIdentity(con,userID); - if(userIdentity == 2) { //identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - if(userIdentity == 3) { //identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + userID + "and status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * أLibrarianѯָreaderIDĽ/黹 - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID ѯߵuid - * @param condition 趨ѯ/黹 - * @param readerID LibrarianָIJѯ - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) throws SQLException { - if(getIdentity(con,userID) == 2) { //identity=2LibrarianִвѯָReaderĽ/黹 - ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + readerID + "and status like '%" + condition +"%'"); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * ˺Librarian/Readerѯ¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID жû - * @return FineList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { - int userIdentity = getIdentity(con,userID); - if(userIdentity == 2) { //identity=2,Librarianִв,ѯReaderFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList"); - if(rs.next()) { - return rs; - } - } - if(userIdentity == 3) { //identity=3,Readerִв,ѯԼFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid = " + userID); - if(rs.next()) { - return rs; - } - } - return null; - } - - /** - * أLibrarianѯָReaderķ¼ - * ע˺ؽΪҪṩݿ - * @param con ݿ - * @param userID readerIDLibrarianָIJѯ - * @return FineList - * @throws SQLException ִдʱ׳쳣 - */ - public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { - if(getIdentity(con,userID) == 2) { //identity=2,Librarianִв,ѯָReaderFineHistory - ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid =" + readerID); - if(rs.next()) { - return rs; - } - } - return null; - } - - - -//ºǺ - /** - * Ϊϵͳ - * @param uid עߵݣʵʹʱΪֵ - * ˵עߵ!= 2 ʱΪΪǷǷ - * @param ISBN - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooks(int uid,String ISBN,int num) throws SQLException{ - int identity = getIdentity(uid); - String bookid=null; - if(identity!=2) return; - Connection con = BasicOperation.getConnection(); - while(num-->0) { - bookid=ISBN+System.currentTimeMillis()+Integer.toString(num); - bookid="MD5('"+bookid+"')"; - String sql="insert into SpecificBook(bookID,position,status,ISBN) values("+bookid+",NULL,NULL,'"+ISBN+"')"; - BasicOperation.executeUpdateScript(con,sql); - } - con.close(); - return; - } - /** - * Ϊϵͳ - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ - * ˵עߵ!= 2 ʱΪΪǷǷ - * @param ISBN - * @param num - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void addBooks(Connection con,int uid,String ISBN,int num) throws SQLException{ - int identity = getIdentity(con,uid); - String bookid=null; - if(identity!=2) return; - while(num-->0) { - bookid=ISBN+System.currentTimeMillis()+Integer.toString(num); - bookid="MD5('"+bookid+"')"; - String updateScript="insert into SpecificBook(bookID,position,status,ISBN) values("+bookid+",NULL,NULL,'"+ISBN+"')"; - BasicOperation.executeUpdateScript(con,updateScript); - } - return; - } - - /** - * λϢ - * @param uid עߵݣʵʹʱҪΪֵ - * ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param position λϢ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookposition(int uid,String bookid,String position) throws SQLException{ - int identity = getIdentity(uid); - if(identity!=2) return; - String updateScript="update SpecificBook set position= '"+position+"' where bookID = '"+bookid+"'"; - BasicOperation.executeUpdateScript(updateScript); - } - - /** - * λϢ - * @param con ݿ - * @param uid עߵݣʵʹʱҪΪֵ - * ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param position λϢ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookposition(Connection con,int uid,String bookid,String position) throws SQLException{ - int identity = getIdentity(con,uid); - if(identity!=2) return; - String updateScript="update SpecificBook set position= '"+position+"' where bookID = '"+bookid+"'"; - BasicOperation.executeUpdateScript(con,updateScript); - } - - /** - * ״̬Ϣ - * @param uid עߵݣʵʹʱΪֵ - * ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param status ״̬Ϣ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookstatus(int uid,String bookid,String status) throws SQLException{ - int identity = getIdentity(uid); - if(identity!=2)return; - String updateScript="update SpecificBook set status= '"+status+"' where bookID = '"+bookid+"'"; - BasicOperation.executeUpdateScript(updateScript); - } - /** - * ״̬Ϣ - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ - * ˵עߵ!= 2 ʱϢΪǷǷ - * @param booid id - * @param status ״̬Ϣ - * @return void - * @throws SQLException ִдʱ׳쳣 - */ - public static void setBookstatus(Connection con,int uid,String bookid,String status) throws SQLException{ - int identity = getIdentity(con,uid); - if(identity!=2)return; - String updateScript="update SpecificBook set status= '"+status+"' where bookID = '"+bookid+"'"; - BasicOperation.executeUpdateScript(con,updateScript); - } - -//ºǼ - /** - * û޸ĸϢ - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 - */ - public static int updateUserInfo(String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { - Connection con = BasicOperation.getConnection(); - int identity = getIdentity(con,updaterUid); - ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); - String originalEmail = null; - String originalPhoneNumber = null; - if(rs1.next()) { - originalEmail=rs1.getString(1); - originalPhoneNumber = rs1.getString(2); - } - con.close(); - if(newEmail == null) { - newEmail = originalEmail; - } - if(newPhoneNumber == null) { - newPhoneNumber = originalPhoneNumber; - } - if(identity == 3 || identity == 2) { - if(identity == 3) updatedUid = updaterUid; - newEmail = "'" + newEmail + "'"; - newPhoneNumber = "'" + newPhoneNumber + "'"; - String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; - return BasicOperation.executeUpdateScript(updateScript); - } - else if(identity == 1) { - System.out.println("Աֹ޸ĶϢ"); - return -1; - } - return -1; - } - /** - * û޸ĸϢ - * @param con ݿ - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 - */ - public static int updateUserInfo(Connection con,String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { - int identity = getIdentity(con,updaterUid); - ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); - String originalEmail = null; - String originalPhoneNumber = null; - if(rs1.next()) { - originalEmail=rs1.getString(1); - originalPhoneNumber = rs1.getString(2); - } - con.close(); - if(newEmail == null) { - newEmail = originalEmail; - } - if(newPhoneNumber == null) { - newPhoneNumber = originalPhoneNumber; - } - if(identity == 3 || identity == 2) { - if(identity == 3) updatedUid = updaterUid; - newEmail = "'" + newEmail + "'"; - newPhoneNumber = "'" + newPhoneNumber + "'"; - String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; - return BasicOperation.executeUpdateScript(con,updateScript); - } - else if(identity == 1) { - System.out.println("Աֹ޸ĶϢ"); - return -1; - } - return -1; - } - - /** - * ޸û - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ - * @throws SQLException - */ - public static int changePassword (int changerUid,int changedUid,String newPassword) throws SQLException { - int changerIdentity = getIdentity(changerUid); - int changedIdentity = getIdentity(changedUid); - if(changedIdentity - changerIdentity>=0) { - if(newPassword == null){ - System.out.println("޸ĺ룡"); - return -1; - } - if(changedIdentity == changerIdentity) changedUid = changerUid; - newPassword = "MD5('" + newPassword + "')"; - String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * ޸û - * @param con ݿ - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ - * @throws SQLException - */ - public static int changePassword (Connection con,int changerUid,int changedUid,String newPassword) throws SQLException { - int changerIdentity = getIdentity(con,changerUid); - int changedIdentity = getIdentity(con,changedUid); - if(changedIdentity - changerIdentity>=0) { - if(newPassword == null){ - System.out.println("޸ĺ룡"); - return -1; - } - if(changedIdentity == changerIdentity) changedUid = changerUid; - newPassword = "MD5('" + newPassword + "')"; - String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - /** - * ޸ɽ𣨷 - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateFineValue (int updaterUid,double fineValue) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(fineValue < 0){ - System.out.println("𲻵Ϊ"); - return -1; - } - else if(fineValue > 0){ - String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; - return BasicOperation.executeUpdateScript(updateScript); - } - else return -1; - } - return -1; - } - /** - * ޸ɽ𣨷 - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateFineValue (Connection con,int updaterUid,double fineValue) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(fineValue < 0){ - System.out.println("𲻵Ϊ"); - return -1; - } - else if(fineValue > 0){ - String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - else return -1; - } - return -1; - } - /** - * ޸Ĺ黹 - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateReturnPeriod (int updaterUid,int returnPeriod) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(returnPeriod <= 0){ - System.out.println("黹ڱΪ"); - return -1; - } - else { - String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; - return BasicOperation.executeUpdateScript(updateScript); - } - } - return -1; - } - /** - * ޸Ĺ黹 - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateReturnPeriod (Connection con,int updaterUid,int returnPeriod) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(returnPeriod <= 0){ - System.out.println("黹ڱΪ"); - return -1; - } - else { - String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - } - return -1; - } - /** - * ޸ı֤ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺֵ֤ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateSecurityDesposit (int updaterUid,double securityDesposit) throws SQLException { - int identity = getIdentity(updaterUid); - if(identity == 1) { - if(securityDesposit < 0){ - System.out.println("֤Ϊ"); - return -1; - } - else{ - String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; - return BasicOperation.executeUpdateScript(updateScript); - } - } - return -1; - } - /** - * ޸ı֤ - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺֵ֤ - * @return update Դķֵ - * @throws SQLException - */ - public static int updateSecurityDesposit (Connection con,int updaterUid,double securityDesposit) throws SQLException { - int identity = getIdentity(con,updaterUid); - if(identity == 1) { - if(securityDesposit < 0){ - System.out.println("֤Ϊ"); - return -1; - } - else{ - String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; - return BasicOperation.executeUpdateScript(con,updateScript); - } - } - return -1; - } - /** - * DZ༭ͼϢ(ߡ硢۸) - * @param updaterUid ޸ߵUID - * @param bookISBN DZ޸ĵͼISBN - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ - * @throws SQLException - */ - public static int updateBookInfo (int updaterUid,int bookISBN,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { - int identity = getIdentity(updaterUid); - Connection con = BasicOperation.getConnection(); - String originalName = null; - String originalAuthor = null; - String originalPublisher = null; - double originalPrice = 0; - ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where ISBN =" + bookISBN); - if(rs.next()) { - originalName = rs.getString(1); - originalAuthor = rs.getString(2); - originalPublisher = rs.getString(3); - originalPrice = rs.getDouble(4); - } - con.close(); - if(newName == null) { - newName = originalName; - } - if(newAuthor == null) { - newAuthor = originalAuthor; - } - if(newPublisher == null) { - newPublisher = originalPublisher; - } - if(newPrice <= 0.0) { - newPrice = originalPrice; - } - if(identity == 2) { - newName = "'" + newName + "'"; - newAuthor = "'" + newAuthor + "'"; - newPublisher = "'" + newPublisher + "'"; - String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where ISBN =" + bookISBN; - return BasicOperation.executeUpdateScript(updateScript); - } - return -1; - } - /** - * DZ༭ͼϢ(ߡ硢۸) - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param bookISBN DZ޸ĵͼISBN - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ - * @throws SQLException - */ - public static int updateBookInfo (Connection con,int updaterUid,int bookISBN,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { - int identity = getIdentity(con,updaterUid); - String originalName = null; - String originalAuthor = null; - String originalPublisher = null; - double originalPrice = 0; - ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where ISBN =" + bookISBN); - if(rs.next()) { - originalName = rs.getString(1); - originalAuthor = rs.getString(2); - originalPublisher = rs.getString(3); - originalPrice = rs.getDouble(4); - } - if(newName == null) { - newName = originalName; - } - if(newAuthor == null) { - newAuthor = originalAuthor; - } - if(newPublisher == null) { - newPublisher = originalPublisher; - } - if(newPrice <= 0.0) { - newPrice = originalPrice; - } - if(identity == 2) { - newName = "'" + newName + "'"; - newAuthor = "'" + newAuthor + "'"; - newPublisher = "'" + newPublisher + "'"; - String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where ISBN =" + bookISBN; - return BasicOperation.executeUpdateScript(con,updateScript); - } - return -1; - } - - - -/* - * ʹԲݿǷ - public static void main(String[] args) throws SQLException { - System.out.println(getIdentity(1)); - } -*/ - - -} +package dbOperator; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class AdvancedOperation { + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); + if(rs.next()) { + int identity = rs.getInt(1); + con.close(); + return identity; + } + return 0; + } + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * @param con ݿ + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(Connection con, int uid) throws SQLException { + ResultSet rs = BasicOperation.getQueryResult(con,"select identity from User where uid = " + uid); + if(rs.next()) { + int identity = rs.getInt(1); + return identity; + } + return 0; + } + /** + * ǸûϢȡuidϢŻֻţԶж + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(String information) throws SQLException { + int isEmail = information.indexOf("@"); + Connection con = BasicOperation.getConnection(); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select uid from User where Email = " + information; + } + else queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ǸûϢȡuidϢŻֻţԶж + * @param con ݿ + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select uid from User where Email = " + information; + } + else queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(String cookie) throws SQLException { + Connection con = BasicOperation.getConnection(); + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + con.close(); + return uid; + } + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * @param con ݿ + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(Connection con, String cookie) throws SQLException { + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + int uid = -1; + if(res.next()) uid = res.getInt(1); + return uid; + } + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + Connection con = BasicOperation.getConnection(); + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select recentCookie from User where Email = " + information; + } + else queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * @param con ݿ + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if(isEmail!=-1) { + queryScript = "select recentCookie from User where Email = " + information; + } + else queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + return recentCookie; + } + /** + * ǸûIDݿм¼һCookie + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + /** + * ǸûIDݿм¼һCookie + * @param con ݿ + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, int uid) throws SQLException { + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con,queryScript); + String recentCookie = null; + if(res.next()) recentCookie = res.getString(1); + return recentCookie; + } + /** + * Ϊϵͳעû + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ + * ˵עߵ-ע = 1 ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { + if(phoneNumber == null || Email == null) return -1; + if(registeredIdentity-registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; + else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; + else return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * Ϊϵͳעû + * @param con ݿ + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ + * ˵עߵ-ע = 1 ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(Connection con,String Email,String phoneNumber,int registrantIdentity,int registeredIdentity) throws SQLException { + if(registeredIdentity-registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if(registeredIdentity == 3) defaultPassword = "MD5('12345678')"; + else if(registeredIdentity == 2) defaultPassword = "MD5('00010001')"; + else return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(String information,String password) throws SQLException { + String type = "phoneNumber"; + if(information.indexOf('@') != -1) type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; + BasicOperation.executeUpdateScript(con,updateScript); + con.close(); + return getUserCookie(information); + } + con.close(); + return null; + } + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * @param con ݿ + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(Connection con,String information,String password) throws SQLException { + String type = "phoneNumber"; + if(information.indexOf('@') != -1) type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password +""; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + "') where " + type + " = '" + information + "' and password = " + password +""; + BasicOperation.executeUpdateScript(con,updateScript); + return getUserCookie(con,information); + } + return null; + } + + +// ºл + /** + * Ǹݻȡ鼮ϢݿISBNBookIDûʱҪѡһַʽңĬΪʱжؼԿոָ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param inputValue + * @param condition ҷʽ + * @return Book + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException{ + if(condition.equals("BookID")) { //鱾IDвѯ + ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where ISBN = (select ISBN from SpecificBook where BookID = '" + inputValue + "')"); + if(rs.next()) { + return rs; + } + } + else { //鱾ISBNвѯʵģѯ + inputValue.replaceAll(" ", "%"); + ResultSet rs = BasicOperation.getQueryResult(con,"select * from Book where " + condition + "like" + "'%" + inputValue + "%'"); + if(rs.next()) { + return rs; + } + } + return null; //δѯ + } + + /** + * Reader/Librarianѯ/黹¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID ѯߵuid conditionжϽ/黹 + * @param condition 趨ѯ/黹 + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { + int userIdentity = getIdentity(con,userID); + if(userIdentity == 2) { //identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + if(userIdentity == 3) { //identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + userID + "and status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָreaderIDĽ/黹 + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID ѯߵuid + * @param condition 趨ѯ/黹 + * @param readerID LibrarianָIJѯ + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) throws SQLException { + if(getIdentity(con,userID) == 2) { //identity=2LibrarianִвѯָReaderĽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con,"select * from BorrowList where uid = " + readerID + "and status like '%" + condition +"%'"); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * ˺Librarian/Readerѯ¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID жû + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { + int userIdentity = getIdentity(con,userID); + if(userIdentity == 2) { //identity=2,Librarianִв,ѯReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList"); + if(rs.next()) { + return rs; + } + } + if(userIdentity == 3) { //identity=3,Readerִв,ѯԼFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid = " + userID); + if(rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָReaderķ¼ + * ע˺ؽΪҪṩݿ + * @param con ݿ + * @param userID readerIDLibrarianָIJѯ + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { + if(getIdentity(con,userID) == 2) { //identity=2,Librarianִв,ѯָReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con,"select * from FineList where uid =" + readerID); + if(rs.next()) { + return rs; + } + } + return null; + } + + + +//ºǺ + /** + * Ϊϵͳ + * @param uid עߵݣʵʹʱΪֵ + * ˵עߵ!= 2 ʱΪΪǷǷ + * @param ISBN + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooks(int uid,String ISBN,int num) throws SQLException{ + int identity = getIdentity(uid); + String bookid=null; + if(identity!=2) return; + Connection con = BasicOperation.getConnection(); + while(num-->0) { + bookid=ISBN+System.currentTimeMillis()+Integer.toString(num); + bookid="MD5('"+bookid+"')"; + String sql="insert into SpecificBook(bookID,position,status,ISBN) values("+bookid+",NULL,NULL,'"+ISBN+"')"; + BasicOperation.executeUpdateScript(con,sql); + } + con.close(); + return; + } + /** + * Ϊϵͳ + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ + * ˵עߵ!= 2 ʱΪΪǷǷ + * @param ISBN + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooks(Connection con,int uid,String ISBN,int num) throws SQLException{ + int identity = getIdentity(con,uid); + String bookid=null; + if(identity!=2) return; + while(num-->0) { + bookid=ISBN+System.currentTimeMillis()+Integer.toString(num); + bookid="MD5('"+bookid+"')"; + String updateScript="insert into SpecificBook(bookID,position,status,ISBN) values("+bookid+",NULL,NULL,'"+ISBN+"')"; + BasicOperation.executeUpdateScript(con,updateScript); + } + return; + } + + /** + * λϢ + * @param uid עߵݣʵʹʱҪΪֵ + * ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param position λϢ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookposition(int uid,String bookid,String position) throws SQLException{ + int identity = getIdentity(uid); + if(identity!=2) return; + String updateScript="update SpecificBook set position= '"+position+"' where bookID = '"+bookid+"'"; + BasicOperation.executeUpdateScript(updateScript); + } + + /** + * λϢ + * @param con ݿ + * @param uid עߵݣʵʹʱҪΪֵ + * ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param position λϢ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookposition(Connection con,int uid,String bookid,String position) throws SQLException{ + int identity = getIdentity(con,uid); + if(identity!=2) return; + String updateScript="update SpecificBook set position= '"+position+"' where bookID = '"+bookid+"'"; + BasicOperation.executeUpdateScript(con,updateScript); + } + + /** + * ״̬Ϣ + * @param uid עߵݣʵʹʱΪֵ + * ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param status ״̬Ϣ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookstatus(int uid,String bookid,String status) throws SQLException{ + int identity = getIdentity(uid); + if(identity!=2)return; + String updateScript="update SpecificBook set status= '"+status+"' where bookID = '"+bookid+"'"; + BasicOperation.executeUpdateScript(updateScript); + } + /** + * ״̬Ϣ + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ + * ˵עߵ!= 2 ʱϢΪǷǷ + * @param booid id + * @param status ״̬Ϣ + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void setBookstatus(Connection con,int uid,String bookid,String status) throws SQLException{ + int identity = getIdentity(con,uid); + if(identity!=2)return; + String updateScript="update SpecificBook set status= '"+status+"' where bookID = '"+bookid+"'"; + BasicOperation.executeUpdateScript(con,updateScript); + } + +//ºǼ + /** + * û޸ĸϢ + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { + Connection con = BasicOperation.getConnection(); + int identity = getIdentity(con,updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if(rs1.next()) { + originalEmail=rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + con.close(); + if(newEmail == null) { + newEmail = originalEmail; + } + if(newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if(identity == 3 || identity == 2) { + if(identity == 3) updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(updateScript); + } + else if(identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + /** + * û޸ĸϢ + * @param con ݿ + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(Connection con,String newEmail,String newPhoneNumber,int updaterUid,int updatedUid) throws SQLException { + int identity = getIdentity(con,updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con,"select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if(rs1.next()) { + originalEmail=rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + con.close(); + if(newEmail == null) { + newEmail = originalEmail; + } + if(newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if(identity == 3 || identity == 2) { + if(identity == 3) updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(con,updateScript); + } + else if(identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + + /** + * ޸û + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword (int changerUid,int changedUid,String newPassword) throws SQLException { + int changerIdentity = getIdentity(changerUid); + int changedIdentity = getIdentity(changedUid); + if(changedIdentity - changerIdentity>=0) { + if(newPassword == null){ + System.out.println("޸ĺ룡"); + return -1; + } + if(changedIdentity == changerIdentity) changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * ޸û + * @param con ݿ + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword (Connection con,int changerUid,int changedUid,String newPassword) throws SQLException { + int changerIdentity = getIdentity(con,changerUid); + int changedIdentity = getIdentity(con,changedUid); + if(changedIdentity - changerIdentity>=0) { + if(newPassword == null){ + System.out.println("޸ĺ룡"); + return -1; + } + if(changedIdentity == changerIdentity) changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + /** + * ޸ɽ𣨷 + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue (int updaterUid,double fineValue) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(fineValue < 0){ + System.out.println("𲻵Ϊ"); + return -1; + } + else if(fineValue > 0){ + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; + return BasicOperation.executeUpdateScript(updateScript); + } + else return -1; + } + return -1; + } + /** + * ޸ɽ𣨷 + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue (Connection con,int updaterUid,double fineValue) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(fineValue < 0){ + System.out.println("𲻵Ϊ"); + return -1; + } + else if(fineValue > 0){ + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + else return -1; + } + return -1; + } + /** + * ޸Ĺ黹 + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod (int updaterUid,int returnPeriod) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(returnPeriod <= 0){ + System.out.println("黹ڱΪ"); + return -1; + } + else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + /** + * ޸Ĺ黹 + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod (Connection con,int updaterUid,int returnPeriod) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(returnPeriod <= 0){ + System.out.println("黹ڱΪ"); + return -1; + } + else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + } + return -1; + } + /** + * ޸ı֤ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit (int updaterUid,double securityDesposit) throws SQLException { + int identity = getIdentity(updaterUid); + if(identity == 1) { + if(securityDesposit < 0){ + System.out.println("֤Ϊ"); + return -1; + } + else{ + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + /** + * ޸ı֤ + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit (Connection con,int updaterUid,double securityDesposit) throws SQLException { + int identity = getIdentity(con,updaterUid); + if(identity == 1) { + if(securityDesposit < 0){ + System.out.println("֤Ϊ"); + return -1; + } + else{ + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit ; + return BasicOperation.executeUpdateScript(con,updateScript); + } + } + return -1; + } + /** + * DZ༭ͼϢ(ߡ硢۸) + * @param updaterUid ޸ߵUID + * @param bookISBN DZ޸ĵͼISBN + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfo (int updaterUid,int bookISBN,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { + int identity = getIdentity(updaterUid); + Connection con = BasicOperation.getConnection(); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where ISBN =" + bookISBN); + if(rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + con.close(); + if(newName == null) { + newName = originalName; + } + if(newAuthor == null) { + newAuthor = originalAuthor; + } + if(newPublisher == null) { + newPublisher = originalPublisher; + } + if(newPrice <= 0.0) { + newPrice = originalPrice; + } + if(identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where ISBN =" + bookISBN; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + /** + * DZ༭ͼϢ(ߡ硢۸) + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param bookISBN DZ޸ĵͼISBN + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfo (Connection con,int updaterUid,int bookISBN,String newName,String newAuthor,String newPublisher,double newPrice) throws SQLException { + int identity = getIdentity(con,updaterUid); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, "select name,author,publisher,price from Book where ISBN =" + bookISBN); + if(rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + if(newName == null) { + newName = originalName; + } + if(newAuthor == null) { + newAuthor = originalAuthor; + } + if(newPublisher == null) { + newPublisher = originalPublisher; + } + if(newPrice <= 0.0) { + newPrice = originalPrice; + } + if(identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + newPublisher + ", price =" + newPrice + "where ISBN =" + bookISBN; + return BasicOperation.executeUpdateScript(con,updateScript); + } + return -1; + } + + + +/* + * ʹԲݿǷ + public static void main(String[] args) throws SQLException { + System.out.println(getIdentity(1)); + } +*/ + + +} diff --git a/old/src/dbOperator/AdvancedOperation.java b/old/src/dbOperator/AdvancedOperation.java new file mode 100644 index 0000000000000000000000000000000000000000..4208b2b1a5c08079c0092bbbe6dad4a6545a3e1c --- /dev/null +++ b/old/src/dbOperator/AdvancedOperation.java @@ -0,0 +1,1651 @@ +package dbOperator; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.ResultSetMetaData; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class AdvancedOperation { + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); + if (rs.next()) { + int identity = rs.getInt(1); + con.close(); + return identity; + } + return 0; + } + + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * + * @param con ݿ + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(Connection con, int uid) throws SQLException { + ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); + if (rs.next()) { + int identity = rs.getInt(1); + return identity; + } + return 0; + } + + /** + * ǸûϢȡuidϢŻֻţԶж + * + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(String information) throws SQLException { + int isEmail = information.indexOf("@"); + Connection con = BasicOperation.getConnection(); + information = "'" + information + "'"; + String queryScript = ""; + if (isEmail != -1) { + queryScript = "select uid from User where Email = " + information; + } else + queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + int uid = -1; + if (res.next()) + uid = res.getInt(1); + return uid; + } + + /** + * ǸûϢȡuidϢŻֻţԶж + * + * @param con ݿ + * @param information ϢֻŻ + * @return ûID + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getUid(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if (isEmail != -1) { + queryScript = "select uid from User where Email = " + information; + } else + queryScript = "select uid from User where phoneNumber = " + information; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + int uid = -1; + if (res.next()) + uid = res.getInt(1); + return uid; + } + + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(String cookie) throws SQLException { + Connection con = BasicOperation.getConnection(); + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + int uid = -1; + if (res.next()) + uid = res.getInt(1); + con.close(); + return uid; + } + + /** + * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * + * @param con ݿ + * @param cookie ûĹؼ¼Ϣ + * @return ûid + * @throws SQLException ѯִдʱ׳쳣 + */ + public static int getUidbyCookie(Connection con, String cookie) throws SQLException { + cookie = "'" + cookie + "'"; + String queryScript = ""; + queryScript = "select uid from User where recentCookie = " + cookie; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + int uid = -1; + if (res.next()) + uid = res.getInt(1); + return uid; + } + + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + Connection con = BasicOperation.getConnection(); + String queryScript = ""; + if (isEmail != -1) { + queryScript = "select recentCookie from User where Email = " + information; + } else + queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + String recentCookie = null; + if (res.next()) + recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + + /** + * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * + * @param con ݿ + * @param information ϢֻŻ + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, String information) throws SQLException { + int isEmail = information.indexOf("@"); + information = "'" + information + "'"; + String queryScript = ""; + if (isEmail != -1) { + queryScript = "select recentCookie from User where Email = " + information; + } else + queryScript = "select recentCookie from User where phoneNumber = " + information; + System.out.println(queryScript); + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + String recentCookie = null; + if (res.next()) + recentCookie = res.getString(1); + return recentCookie; + } + + /** + * ǸûIDݿм¼һCookie + * + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + String recentCookie = null; + if (res.next()) + recentCookie = res.getString(1); + con.close(); + return recentCookie; + } + + /** + * ǸûIDݿм¼һCookie + * + * @param con ݿ + * @param uid ûID + * @return ûһ(recent)Cookie + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static String getUserCookie(Connection con, int uid) throws SQLException { + String queryScript = "select recentCookie from User where uid = " + uid; + ResultSet res = BasicOperation.getQueryResult(con, queryScript); + String recentCookie = null; + if (res.next()) + recentCookie = res.getString(1); + return recentCookie; + } + + /** + * Ϊϵͳעû + * + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ ˵עߵ-ע = 1 + * ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(String Email, String phoneNumber, int registrantIdentity, int registeredIdentity) + throws SQLException { + if (phoneNumber == null || Email == null) + return -1; + if (registeredIdentity - registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if (registeredIdentity == 3) + defaultPassword = "MD5('12345678')"; + else if (registeredIdentity == 2) + defaultPassword = "MD5('00010001')"; + else + return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + + /** + * Ϊϵͳעû + * + * @param con ݿ + * @param Email ûĵ + * @param phoneNumber ûֻ + * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ + * @param registeredIdentity עߵݣʵʹʱΪֵ ˵עߵ-ע = 1 + * ʱעΪΪǺϷ + * @return updateԴĵķֵ + * @throws SQLException ִдʱ׳쳣 + */ + public static int registerNewUser(Connection con, String Email, String phoneNumber, int registrantIdentity, + int registeredIdentity) throws SQLException { + if (registeredIdentity - registrantIdentity == 1) { + Email = "'" + Email + "'"; + phoneNumber = "'" + phoneNumber + "'"; + String defaultPassword = ""; + if (registeredIdentity == 3) + defaultPassword = "MD5('12345678')"; + else if (registeredIdentity == 2) + defaultPassword = "MD5('00010001')"; + else + return -1; + String updateScript = "insert into User values(NULL," + Email + "," + phoneNumber + ",NULL," + + registeredIdentity + "," + defaultPassword + ")"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(String information, String password) throws SQLException { + String type = "phoneNumber"; + if (information.indexOf('@') != -1) + type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password + + ""; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + + "') where " + type + " = '" + information + "' and password = " + password + ""; + BasicOperation.executeUpdateScript(con, updateScript); + con.close(); + return getUserCookie(information); + } + con.close(); + return null; + } + + /** + * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * + * @param con ݿ + * @param information ûϢ + * @param password û + * @throws SQLException ѯִ쳣ʱ׳쳣 + */ + public static String getLoginInfo(Connection con, String information, String password) throws SQLException { + String type = "phoneNumber"; + if (information.indexOf('@') != -1) + type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password + + ""; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + String updateScript = "update User set recentCookie = MD5('" + information + System.currentTimeMillis() + + "') where " + type + " = '" + information + "' and password = " + password + ""; + BasicOperation.executeUpdateScript(con, updateScript); + return getUserCookie(con, information); + } + return null; + } + +// ºл + /** + * Ǹݻȡ鼮ϢݿISBNbookIDûʱҪѡһַʽңĬΪʱжؼԿոָ + * ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param inputValue + * @param condition ҷʽ + * @return Book + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException { + if (condition.equals("bid")) { // 鱾IDвѯ + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from Book where bid ='" + inputValue + + "'"); + return rs; + } else { // 鱾ISBNвѯʵģѯ + inputValue.replaceAll(" ", "%"); + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); + return rs; + } + } + + /** + * ǸݻȡһϢݿbid,bookID,statusûʱҪѡһַʽңĬΪʱжؼԿոָ + * ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param inputValue + * @param condition ҷʽ + * @return + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet getSpecificBookInfo(Connection con, String inputValue, String condition) throws SQLException { + if (condition.equals("bookID")) { // 鱾IDвѯ + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from SpecificBook where bookID = '" + inputValue + + "'"); + return rs; + } + if (condition.equals("bid")) { // вѯ + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from SpecificBook where bid = '" + inputValue + + "'"); + return rs; + } + else{ //ʵָ״̬ģѯ + inputValue.replaceAll(" ", "%"); + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from SpecificBook where " + condition + " like '%" + inputValue + "%'"); + return rs; + } + } + /** + * ǸݻȡһϢݿbid,bookID,statusûʱҪѡһַʽңĬΪʱжؼԿոָ + * ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param inputValue + * @param condition ҷʽ + * @return + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet getReaderInfo(Connection con, String inputValue, String condition) throws SQLException { + if (condition.equals("uid")) { // ݶIDвѯ + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from User where uid = '" + inputValue + + "' and identity = 3"); + return rs; + } + if (condition.equals("Email")) { // Emailвѯ + inputValue.replaceAll(" ", "%"); + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from User where Email like '%" + inputValue + "%' and identity = 3"); + return rs; + } + else{ //phoneNumberвѯ + inputValue.replaceAll(" ", "%"); + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from User where phoneNumber like '%" + inputValue + "%' and identity = 3"); + return rs; + } + } + + /** + * Reader/Librarianѯ/黹¼ ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param userID ѯߵuid conditionжϽ/黹 + * @param condition 趨ѯ/黹 + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { + int userIdentity = getIdentity(con, userID); + if (userIdentity == 2) { // identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from BorrowList where status like '%" + condition + "%'"); + if (rs.next()) { + return rs; + } + } + if (userIdentity == 3) { // identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from BorrowList where uid = " + userID + "and status like '%" + condition + "%'"); + if (rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָreaderIDĽ/黹 ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param userID ѯߵuid + * @param condition 趨ѯ/黹 + * @param readerID LibrarianָIJѯ + * @return BorrowList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) + throws SQLException { + if (getIdentity(con, userID) == 2) { // identity=2LibrarianִвѯָReaderĽ/黹 + ResultSet rs = BasicOperation.getQueryResult(con, + "select * from BorrowList where uid = " + readerID + "and status like '%" + condition + "%'"); + if (rs.next()) { + return rs; + } + } + return null; + } + + /** + * ˺Librarian/Readerѯ¼ ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param userID жû + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { + int userIdentity = getIdentity(con, userID); + if (userIdentity == 2) { // identity=2,Librarianִв,ѯReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList"); + if (rs.next()) { + return rs; + } + } + if (userIdentity == 3) { // identity=3,Readerִв,ѯԼFineHistory + ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList where uid = " + userID); + if (rs.next()) { + return rs; + } + } + return null; + } + + /** + * أLibrarianѯָReaderķ¼ ע˺ؽΪҪṩݿ + * + * @param con ݿ + * @param userID readerIDLibrarianָIJѯ + * @return FineList + * @throws SQLException ִдʱ׳쳣 + */ + public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { + if (getIdentity(con, userID) == 2) { // identity=2,Librarianִв,ѯָReaderFineHistory + ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList where uid =" + readerID); + if (rs.next()) { + return rs; + } + } + return null; + } + +// ºǺ + /** + * ǸbidΪϵͳ + * + * @param con ݿ + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param bid id + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksbybid(Connection con, int uid, int bid, int num) throws SQLException { + int identity = getIdentity(con, uid); + String bookid = null; + if (identity != 2) + return; + while (num-- > 0) { + bookid = bid + System.currentTimeMillis() + Integer.toString(num); + bookid = "MD5('" + bookid + "')"; + String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,'available'," + bid + + ")"; + BasicOperation.executeUpdateScript(con, sql); + } + con.close(); + return; + } + + /** + * ǸbidΪϵͳ + * + * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ + * @param bid id + * @param num + * @return void + * @throws SQLException ִдʱ׳쳣 + */ + public static void addBooksbybid(int uid, int bid, int num) throws SQLException { + int identity = getIdentity(uid); + String bookid = null; + if (identity != 2) + return; + Connection con = BasicOperation.getConnection(); + while (num-- > 0) { + bookid = bid + System.currentTimeMillis() + Integer.toString(num); + bookid = "MD5('" + bookid + "')"; + String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,'available'," + bid + + ")"; + BasicOperation.executeUpdateScript(con, sql); + } + con.close(); + return; + } + + +//ºǼ + /** + * û޸ĸϢ + * + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(String newEmail, String newPhoneNumber, int updaterUid, int updatedUid) + throws SQLException { + Connection con = BasicOperation.getConnection(); + int identity = getIdentity(con, updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con, + "select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if (rs1.next()) { + originalEmail = rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + if (newEmail == null) { + newEmail = originalEmail; + } + if (newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if (identity == 3 || identity == 2) { + if (identity == 3) + updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(updateScript); + } else if (identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + + /** + * û޸ĸϢ + * + * @param con ݿ + * @param newEmail ޸Ķߵĵ + * @param newPhoneNumber ޸Ķߵֻ + * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ + * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ + * @return updateԴĵķֵ + * @throws SQLException SQLִдʱ׳쳣 + */ + public static int updateUserInfo(Connection con, String newEmail, String newPhoneNumber, int updaterUid, + int updatedUid) throws SQLException { + int identity = getIdentity(con, updaterUid); + ResultSet rs1 = BasicOperation.getQueryResult(con, + "select Email,phoneNumber from User where uid=" + updatedUid); + String originalEmail = null; + String originalPhoneNumber = null; + if (rs1.next()) { + originalEmail = rs1.getString(1); + originalPhoneNumber = rs1.getString(2); + } + if (newEmail == null) { + newEmail = originalEmail; + } + if (newPhoneNumber == null) { + newPhoneNumber = originalPhoneNumber; + } + if (identity == 3 || identity == 2) { + if (identity == 3) + updatedUid = updaterUid; + newEmail = "'" + newEmail + "'"; + newPhoneNumber = "'" + newPhoneNumber + "'"; + String updateScript = "update User Set Email = " + newEmail + ", phoneNumber = " + newPhoneNumber + + " where uid = " + updatedUid; + return BasicOperation.executeUpdateScript(con, updateScript); + } else if (identity == 1) { + System.out.println("Աֹ޸ĶϢ"); + return -1; + } + return -1; + } + + /** + * ޸û + * + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword(int changerUid, int changedUid, String newPassword) throws SQLException { + int changerIdentity = getIdentity(changerUid); + int changedIdentity = getIdentity(changedUid); + if (changedIdentity - changerIdentity >= 0) { + if (newPassword == null) { + System.out.println("޸ĺ룡"); + return -1; + } + if (changedIdentity == changerIdentity) + changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + + /** + * ޸û + * + * @param con ݿ + * @param changerUid ޸ߵUID + * @param changedUid DZ޸ߵUID + * @param newPassword ޸ĺ + * @return update Դķֵ + * @throws SQLException + */ + public static int changePassword(Connection con, int changerUid, int changedUid, String newPassword) + throws SQLException { + int changerIdentity = getIdentity(con, changerUid); + int changedIdentity = getIdentity(con, changedUid); + if (changedIdentity - changerIdentity >= 0) { + if (newPassword == null) { + System.out.println("޸ĺ룡"); + return -1; + } + if (changedIdentity == changerIdentity) + changedUid = changerUid; + newPassword = "MD5('" + newPassword + "')"; + String updateScript = "update User set password = " + newPassword + " where uid = " + changedUid; + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + /** + * ޸ɽ𣨷 + * + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue(int updaterUid, double fineValue) throws SQLException { + int identity = getIdentity(updaterUid); + if (identity == 1) { + if (fineValue < 0) { + System.out.println("𲻵Ϊ"); + return -1; + } else if (fineValue > 0) { + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue; + return BasicOperation.executeUpdateScript(updateScript); + } else + return -1; + } + return -1; + } + + /** + * ޸ɽ𣨷 + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param fineValue ޸ĺ󷣽ֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateFineValue(Connection con, int updaterUid, double fineValue) throws SQLException { + int identity = getIdentity(con, updaterUid); + if (identity == 1) { + if (fineValue < 0) { + System.out.println("𲻵Ϊ"); + return -1; + } else if (fineValue > 0) { + String updateScript = "update SystemAttribute set bookFineValue =" + fineValue; + return BasicOperation.executeUpdateScript(con, updateScript); + } else + return -1; + } + return -1; + } + + /** + * ǻȡǰֵ + * + * @return fineValue ǰֵ + * @throws SQLException + */ + public static double getFineValue() throws SQLException { + double fineValue = 0; + Connection con = BasicOperation.getConnection(); + ResultSet rs; + String queryScript = "select bookFineValue from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + fineValue = rs.getDouble(1); + } + rs.close(); + con.close(); + return fineValue; + } + + /** + * ǻȡǰֵ + * + * @param con ݿ + * @return fineValue ǰֵ + * @throws SQLException + */ + public static double getFineValue(Connection con) throws SQLException { + double fineValue = 0; + ResultSet rs; + String queryScript = "select bookFineValue from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + fineValue = rs.getDouble(1); + } + rs.close(); + return fineValue; + } + + /** + * ޸Ĺ黹 + * + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod(int updaterUid, int returnPeriod) throws SQLException { + int identity = getIdentity(updaterUid); + if (identity == 1) { + if (returnPeriod <= 0) { + System.out.println("黹ڱΪ"); + return -1; + } else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + + /** + * ޸Ĺ黹 + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param returnPeriod ޸ĺ黹ڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReturnPeriod(Connection con, int updaterUid, int returnPeriod) throws SQLException { + int identity = getIdentity(con, updaterUid); + if (identity == 1) { + if (returnPeriod <= 0) { + System.out.println("黹ڱΪ"); + return -1; + } else { + String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod; + return BasicOperation.executeUpdateScript(con, updateScript); + } + } + return -1; + } + + /** + * ǻȡǰ黹 + * + * @return returnPeriod ǰ黹 + * @throws SQLException + */ + public static int getReturnPeriod() throws SQLException { + int returnPeriod = 0; + Connection con = BasicOperation.getConnection(); + ResultSet rs; + String queryScript = "select bookReturnPeriod from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + returnPeriod = rs.getInt(1); + } + rs.close(); + con.close(); + return returnPeriod; + } + + /** + * ǻȡǰ黹 + * + * @param con ݿ + * @return returnPeriod ǰ黹 + * @throws SQLException + */ + public static int getReturnPeriod(Connection con) throws SQLException { + int returnPeriod = 0; + ResultSet rs; + String queryScript = "select bookReturnPeriod from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + returnPeriod = rs.getInt(1); + } + rs.close(); + return returnPeriod; + } + + /** + * ޸ı֤ + * + * @param updaterUid ޸ߵUID + * @param securityDesposit ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit(int updaterUid, double securityDesposit) throws SQLException { + int identity = getIdentity(updaterUid); + if (identity == 1) { + if (securityDesposit < 0) { + System.out.println("֤Ϊ"); + return -1; + } else { + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + + /** + * ޸ı֤ + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param securityDesposit ޸ĺֵ֤ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateSecurityDesposit(Connection con, int updaterUid, double securityDesposit) + throws SQLException { + int identity = getIdentity(con, updaterUid); + if (identity == 1) { + if (securityDesposit < 0) { + System.out.println("֤Ϊ"); + return -1; + } else { + String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit; + return BasicOperation.executeUpdateScript(con, updateScript); + } + } + return -1; + } + + /** + * ǻȡǰ֤ + * + * @return securityDesposit ǰ֤ + * @throws SQLException + */ + public static double getSecurityDesposit() throws SQLException { + double securityDesposit = 0; + Connection con = BasicOperation.getConnection(); + ResultSet rs; + String queryScript = "select bookSecurityDesposit from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + securityDesposit = rs.getDouble(1); + } + rs.close(); + con.close(); + return securityDesposit; + } + + /** + * ǻȡǰ֤ + * + * @param con ݿ + * @return securityDesposit ǰ֤ + * @throws SQLException + */ + public static double getSecurityDesposit(Connection con) throws SQLException { + double securityDesposit = 0; + ResultSet rs; + String queryScript = "select bookSecurityDesposit from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + securityDesposit = rs.getDouble(1); + } + rs.close(); + return securityDesposit; + } + + /** + * ޸ԤԼ + * + * @param updaterUid ޸ߵUID + * @param reserveMaintainingHour ޸ĺԤԼڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReserveMaintainingHours(int updaterUid, int reserveMaintainingHours) throws SQLException { + int identity = getIdentity(updaterUid); + if (identity == 1) { + if (reserveMaintainingHours < 0) { + System.out.println("ԤԼڱΪ"); + return -1; + } else { + String updateScript = "update SystemAttribute set reserveMaintainingHours =" + reserveMaintainingHours; + return BasicOperation.executeUpdateScript(updateScript); + } + } + return -1; + } + + /** + * ޸ԤԼ + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param reserveMaintainingHour ޸ĺԤԼڵֵ + * @return update Դķֵ + * @throws SQLException + */ + public static int updateReserveMaintainingHour(Connection con, int updaterUid, int reserveMaintainingHours) + throws SQLException { + int identity = getIdentity(con, updaterUid); + if (identity == 1) { + if (reserveMaintainingHours < 0) { + System.out.println("ԤԼڱΪ"); + return -1; + } else { + String updateScript = "update SystemAttribute set reserveMaintainingHours =" + reserveMaintainingHours; + return BasicOperation.executeUpdateScript(con, updateScript); + } + } + return -1; + } + + /** + * ǻȡǰԤԼ + * + * @return reserveMaintainingHour ǰԤԼ + * @throws SQLException + */ + public static int getReserveMaintainingHours() throws SQLException { + int reserveMaintainingHours = 0; + Connection con = BasicOperation.getConnection(); + ResultSet rs; + String queryScript = "select reserveMaintainingHours from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + reserveMaintainingHours = rs.getInt(1); + } + rs.close(); + con.close(); + return reserveMaintainingHours; + } + + /** + * ǻȡǰԤԼ + * + * @param con ݿ + * @return reserveMaintainingHour ǰԤԼ + * @throws SQLException + */ + public static int getReserveMaintainingHours(Connection con) throws SQLException { + int reserveMaintainingHours = 0; + ResultSet rs; + String queryScript = "select reserveMaintainingHours from SystemAttribute"; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + reserveMaintainingHours = rs.getInt(1); + } + rs.close(); + return reserveMaintainingHours; + } + + /** + * Ǹbid༭ͼϢ(ߡ硢۸)Ҫھ + * + * @param updaterUid ޸ߵUID + * @param bookID DZ޸ĵͼbid + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfoByBid(int updaterUid, int bookID, String newName, String newAuthor, + String newPublisher, double newPrice) throws SQLException { + int identity = getIdentity(updaterUid); + Connection con = BasicOperation.getConnection(); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, + "select name,author,publisher,price from Book where bid =" + bookID); + if (rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + con.close(); + if (newName == null) { + newName = originalName; + } + if (newAuthor == null) { + newAuthor = originalAuthor; + } + if (newPublisher == null) { + newPublisher = originalPublisher; + } + if (newPrice <= 0.0) { + newPrice = originalPrice; + } + if (identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + + newPublisher + ", price =" + newPrice + "where ISBN =" + bookID; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + + /** + * Ǹbid༭ͼϢ(ߡ硢۸)Ҫھ + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param bookID DZ޸ĵͼbid + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfoByBid(Connection con, int updaterUid, int bookID, String newName, String newAuthor, + String newPublisher, double newPrice) throws SQLException { + int identity = getIdentity(con, updaterUid); + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, + "select name,author,publisher,price from Book where ISBN =" + bookID); + if (rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + if (newName == null) { + newName = originalName; + } + if (newAuthor == null) { + newAuthor = originalAuthor; + } + if (newPublisher == null) { + newPublisher = originalPublisher; + } + if (newPrice <= 0.0) { + newPrice = originalPrice; + } + if (identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + + newPublisher + ", price =" + newPrice + " where ISBN =" + bookID; + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + /** + * DZ༭ͬISBNͼϢ(ߡ硢۸) + * + * @param updaterUid ޸ߵUID + * @param bookISBN DZ޸ĵͼISBN + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfoByISBN(int updaterUid, String ISBN, String newName, String newAuthor, + String newPublisher, double newPrice) throws SQLException { + int identity = getIdentity(updaterUid); + Connection con = BasicOperation.getConnection(); + ISBN = "'" + ISBN + "'"; + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, + "select name,author,publisher,price from Book where bid =" + ISBN); + if (rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + con.close(); + if (newName == null) { + newName = originalName; + } + if (newAuthor == null) { + newAuthor = originalAuthor; + } + if (newPublisher == null) { + newPublisher = originalPublisher; + } + if (newPrice <= 0.0) { + newPrice = originalPrice; + } + if (identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + + newPublisher + ", price =" + newPrice + "where ISBN =" + ISBN; + return BasicOperation.executeUpdateScript(updateScript); + } + return -1; + } + + /** + * DZ༭ISBNͬͼϢ(ߡ硢۸)Ҫ + * + * @param con ݿ + * @param updaterUid ޸ߵUID + * @param bookID DZ޸ĵͼbid + * @param newName DZ޸ĵͼ + * @param newAuthor DZ޸ͼ + * @param newPublisher DZ޸ͼ³ + * @param newPrice DZ޸ͼ¼۸ + * @return updateԴķֵ + * @throws SQLException + */ + public static int updateBookInfoByISBN(Connection con, int updaterUid, String ISBN, String newName, + String newAuthor, String newPublisher, double newPrice) throws SQLException { + int identity = getIdentity(con, updaterUid); + ISBN = "'" + ISBN + "'"; + String originalName = null; + String originalAuthor = null; + String originalPublisher = null; + double originalPrice = 0; + ResultSet rs = BasicOperation.getQueryResult(con, + "select name,author,publisher,price from Book where ISBN =" + ISBN); + if (rs.next()) { + originalName = rs.getString(1); + originalAuthor = rs.getString(2); + originalPublisher = rs.getString(3); + originalPrice = rs.getDouble(4); + } + if (newName == null) { + newName = originalName; + } + if (newAuthor == null) { + newAuthor = originalAuthor; + } + if (newPublisher == null) { + newPublisher = originalPublisher; + } + if (newPrice <= 0.0) { + newPrice = originalPrice; + } + if (identity == 2) { + newName = "'" + newName + "'"; + newAuthor = "'" + newAuthor + "'"; + newPublisher = "'" + newPublisher + "'"; + String updateScript = "update Book set name =" + newName + ", author =" + newAuthor + ", publisher =" + + newPublisher + ", price =" + newPrice + " where ISBN =" + ISBN; + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + /** + * ɾͼָbookidͼ + * + * @param librarianUid ɾͼͼԱuid + * @param bookID ɾͼbookid + * @param reason ɾԭ + * @return sqlĬֵ + * @throws SQLException + */ + public static int getBookDeleted(int librarianUid, String bookID, String reason) throws SQLException { + Connection con = BasicOperation.getConnection(); + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return -1; + int bid = 0; + bookID = "'" + bookID + "'"; + reason = "'" + reason + "'"; + ResultSet rs; + String queryScript = "select bid from SpecificBook where bookID = " + bookID; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + bid = rs.getInt(1); + } + rs.close(); + if (bid == 0) { + con.close(); + return -1; + } + queryScript = "delete from SpecificBook where bookID = " + bookID; + BasicOperation.executeUpdateScript(con, queryScript); + con.close(); + queryScript = "insert into DeleteList (uid, bid, bookID, date ,reason) values(" + librarianUid + "," + bid + "," + + bookID + ",'" + dataOperator.BasicOperation.getDateWithTimeInString() + "'," + reason + ")"; + return BasicOperation.executeUpdateScript(queryScript); + } + + /** + * ɾͼָbookidͼ + * + * @param con ݿ + * @param librarianUid ɾͼͼԱuid + * @param bookID ɾͼbookid + * @param reason ɾԭ + * @return sqlĬֵ + * @throws SQLException + */ + public static int getBookDeleted(Connection con, int librarianUid, String bookID, String reason) + throws SQLException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return -1; + int bid = 0; + bookID = "'" + bookID + "'"; + reason = "'" + reason + "'"; + ResultSet rs; + String queryScript = "select bid from SpecificBook where bookID =" + bookID; + rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) { + bid = rs.getInt(1); + } + rs.close(); + if (bid == 0) { + return -1; + } + queryScript = "delete from SpecificBook where bookID =" + bookID; + BasicOperation.executeUpdateScript(con, queryScript); + queryScript = "insert into DeleteList (uid, bid, bookID, date ,reason) values(" + librarianUid + "," + bid + "," + + bookID + ",'" +dataOperator.BasicOperation.getDateWithTimeInString() + "'," + reason + ")"; + return BasicOperation.executeUpdateScript(con, queryScript); + } + /** + * ɾreaderûϢ + * + * @param con ݿ + * @param librarianUid ɾreaderͼԱuid + * @param ReaderUid ɾûuid + * @return sqlĬֵ + * @throws SQLException + */ + public static int getReaderDeleted(Connection con, int librarianUid, int ReaderUid) + throws SQLException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return -1; + String sql = "delete from User where uid =" + ReaderUid; + BasicOperation.executeUpdateScript(con, sql); + return 1; + } + /** + * Ǹuidȡemailַ + * @param uid ûuid + * @return ûemailַ + * @throws SQLException + */ + public static String getEmailByUid(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + String queryScript = "select Email from User where uid =" + uid; + String email = null; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + email = rs.getString(1); + rs.close(); + con.close(); + return email; + } + return null; + } + /** + * Ǹuidȡemailַ + * @param con ݿ + * @param uid ûuid + * @return ûemailַ + * @throws SQLException + */ + public static String getEmailByUid(Connection con, int uid) throws SQLException { + String queryScript = "select Email from User where uid =" + uid; + String email = null; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + email = rs.getString(1); + rs.close(); + return email; + } + return null; + } + /** + * Ǹuidȡû绰 + * @param uid ûuid + * @return û绰 + * @throws SQLException + */ + public static String getPhoneNumberByUid(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + String queryScript = "select phoneNumber from User where uid =" + uid; + String phoneNumber = null; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + phoneNumber = rs.getString(1); + rs.close(); + con.close(); + return phoneNumber; + } + return null; + } + /** + * Ǹuidȡû绰 + * @param con ݿ + * @param uid ûuid + * @return û绰 + * @throws SQLException + */ + public static String getPhoneNumberByUid(Connection con, int uid) throws SQLException { + String queryScript = "select phoneNumber from User where uid =" + uid; + String phoneNumber = null; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if(rs.next()) { + phoneNumber = rs.getString(1); + rs.close(); + return phoneNumber; + } + return null; + } + // º˼ + + /** + * гöĿ + * + * @param con ݿ + * @param uid ߵuid + * @return ض߽Ŀ + * @throws SQLException + */ + public static ResultSet getReaderBorrowList(Connection con, int uid) throws SQLException { + String selectScript = "select * from BorrowList where uid=" + uid; + ResultSet rs = BasicOperation.getQueryResult(con, selectScript); + ResultSetMetaData rsmd = rs.getMetaData(); + int columns = rsmd.getColumnCount(); + while (rs.next()) { + for (int i = 1; i <= columns; i++) { + System.out.print(rs.getString(i) + "\t"); + } + System.out.println(); + } + // rsָƻصһеλ + rs.beforeFirst(); + rs.next(); + return rs; + } + + /** + * + * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν + * + * @author kbtx + * @param bookID 鱾bookID + * @param readerUid ߵuid + * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) + * returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ + * @throws SQLException + * + */ + public static int updateBorrowList(Connection con, String bookID, int librarianUid, int readerUid, String status) + throws SQLException { + if ((getIdentity(con, librarianUid) != 2) || getIdentity(con, readerUid) != 3) + return -1; + if (!(status.equals("returned") || status.equals("borrowed"))) + return -1; + if (status.equals("borrowed")) { + String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + // ܽѾٴν + if (rs.next()) + return -1; + String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bookID + "','" + + dataOperator.BasicOperation.getDateWithTimeInString() + "','borrowed')"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + if (status.equals("returned")) { + String updateScript = "update BorrowList set status = 'returned (Date = " + + dataOperator.BasicOperation.getDateWithTimeInString() + ")' where bookID = '" + bookID + + "' and uid = " + readerUid; + updateBookStatus(con, bookID, librarianUid, readerUid, "available"); + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + + /** + * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList + * + * @param con ݿ + * @param bookID ĿbookID + * @param librarianUid ͼԱuidҪΪֵ + * @param readerUid ߵuidҪΪֵ + * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) + * @throws SQLException + */ + public static int updateBookStatus(Connection con, String bookID, int librarianUid, int readerUid, String status) + throws SQLException { + // ֤ + if ((getIdentity(con, librarianUid) != 2) || getIdentity(con, readerUid) != 3) + return -1; + // ַȡֵ + if (!(status.equals("available") || status.equals("borrowed"))) + return -1; + String updateScript = "update SpecificBook set status = '" + status + "' where bookID ='" + bookID + "'"; + BasicOperation.executeUpdateScript(con, updateScript); + if (status.equals("borrowed")) { + return updateBorrowList(con, bookID, librarianUid, readerUid, status); + } + return -1; + } + + /** + * ṩbiduidԱԤԼ + * + * ̣ 1.ѯⱾǷѾԤԼˣǣֹظԤԼ + * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" 3.˲SpecificBookκӰ + * + * @param con ݿ + * @param bid 鱾ID + * @param readerUid ߵuid + * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) + * @throws SQLException + * @throws ParseException + */ + public static int getBookReserved(Connection con, int bid, int readerUid) throws SQLException, ParseException { + // ֤ + if (getIdentity(con, readerUid) != 3) + return -1; + // ͬһ鲻ܶԤԼ + getExpiredReserveInvalidate(con, bid); + String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid + + " and status = 'reserving'"; + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + if (rs.next()) + return -1; + String sql = "select reserveMaintainingHours from SystemAttribute"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + if (!res.next()) + return -1; + int reserveMaintainingHours = res.getInt("reserveMaintainingHours"); + String updateScript = "insert into ReserveList values(" + readerUid + "," + bid + ",'" + + dataOperator.BasicOperation.getDateWithTimeAfterHours(reserveMaintainingHours) + "','reserving')"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + + /** + * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" + * + * @return + * @throws SQLException + * @throws ParseException + */ + private static int getExpiredReserveInvalidate(Connection con, int bid) throws SQLException, ParseException { + String getList = "select expirationDate from ReserveList where bid='" + bid + "'and status='reserving'"; + ResultSet List = BasicOperation.getQueryResult(con, getList); + long recentTime = System.currentTimeMillis(); + int n = 0; + String sql = null; + Date date = null; + String formatdate = null; + while (List.next()) { + formatdate = List.getString("expirationDate"); + date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(formatdate); + if (date.getTime() < recentTime) { + sql = "update ReserveList set status = 'expired' where bid = '" + bid + "' and expirationDate = '" + + formatdate + "'"; + BasicOperation.executeUpdateScript(con, sql); + n++; + } + } + return n; + } + + /** + * ǽԤԼͼԱ ̣ 1.ж˵Ƿȷȷֱӷ + * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" + * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" + * + * @param con + * @param bid + * @param librarianUid + * @param readerUid + * @return + * @throws SQLException + * @throws ParseException + */ + public static boolean getReservedBookBorrowed(Connection con, int bid, int librarianUid, int readerUid) + throws SQLException, ParseException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return false; + getExpiredReserveInvalidate(con, bid); + String sql = "select * from ReserveList where uid='" + readerUid + "'and bid='" + bid + + "' and status='reserving'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + if (!res.next()) + return getBookBorrowedDirectly(con, bid, librarianUid, readerUid); + sql = "update ReserveList set status='borrowed' where uid='" + readerUid + "'and bid='" + bid + + "' and status ='reserving'"; + BasicOperation.executeUpdateScript(con, sql); + sql = "select bookID from SpecificBook where status='available' and bid='" + bid + "'"; + res = BasicOperation.getQueryResult(con, sql); + String bookID = null; + if (!res.next()) + return false; + bookID = res.getString(1); + updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); + return true; + } + + /** + * ֱӽͼԱ ̣ 1.ж˵Ƿȷȷֱӷ + * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" + * 3.ѯųԤԼ״̬Ϊ"available"飬УԱҳһߣupdateBookStatus(...)״̬Ϊ"borrowed" + * + * @param con + * @param bid + * @param librarianUid + * @param readerUid + * @return + * @throws SQLException + * @throws ParseException + */ + public static boolean getBookBorrowedDirectly(Connection con, int bid, int librarianUid, int readerUid) + throws SQLException, ParseException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return false; + getExpiredReserveInvalidate(con, bid); + String sql = "select count(*) from ReserveList where bid='" + bid + "'and status ='reserving'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + res.next(); + int n = res.getInt(1); + System.out.println(n); + sql = "select bookID from SpecificBook where status='available' and bid='" + bid + "'"; + res = BasicOperation.getQueryResult(con, sql); + res.last(); + int m = res.getRow(); + System.out.println(m); + if (m <= n) + return false; + res.beforeFirst(); + String bookID = null; + if (!res.next()) + return false; + bookID = res.getString(1); + updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); + return true; + } + /* + * ʹԲݿǷ public static void main(String[] args) throws + * SQLException { System.out.println(getIdentity(1)); Date date=new Date(); + * SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } + */ + + +} diff --git a/old/src/dbOperator/BasicOperation.java b/old/src/dbOperator/BasicOperation.java new file mode 100644 index 0000000000000000000000000000000000000000..7c2c17a42bf76b534b119298b49aa9068a213d96 --- /dev/null +++ b/old/src/dbOperator/BasicOperation.java @@ -0,0 +1,117 @@ +package dbOperator; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +public class BasicOperation { + + /** + * ڽݿӣеӶӦͨӦд + * ˵һ¹淶ҪؽķӦҪṩͨ˷õӣصвҪؽķڷڴӣڷ֮ǰرա + * @return Connection + */ + public static Connection getConnection(){ + //ֱݿ⣬ͨÿԻȡһݿ⽨ + Connection con = null; + try + { + Class.forName("com.mysql.cj.jdbc.Driver"); //com.mysql.jdbc.DriverѾˣҪcj + } + catch(Exception e) + { + System.out.println("forNameError:" + e); + } + String url = "jdbc:mysql://60.205.185.202:3306/library?useSSL=false&characterEncoding=utf-8&serverTimezone=GMT"; //ҪserverTimezone=GMTᱨ + String user = "root"; + String password = "2fe553c3c3e13ee8"; + try + { + System.out.println("ʼ"); + con = DriverManager.getConnection(url, user, password); + } + catch(Exception e) + { + System.err.println("ʧ"); + System.out.println(e); + System.exit(1); + } + System.err.println("ӳɹ"); + return con; + } + + + /** + * ֱִSQLѯ䣬ȡ÷صĽؼǵùرսconӣ + * @param con һͨgetConnection()õݿ + * @param queryScript ҪִеIJѯ + * @return ѯõĽעʱݿȻڣҪڴر + * @throws SQLException ѯִдʱ׳쳣 + */ + protected static ResultSet getQueryResult(Connection con,String queryScript) throws SQLException { + //ֱִSQLѯ䣬ȡ÷صĽؼǵùرսconӣ + + /* һʾ֤ȷ + public static void main(String[] args) { + String queryScript = "select * from User"; + Connection con = getConnection(); + try { + ResultSet res = getQueryResult(con,queryScript); + while(res.next()) { + System.out.println(res.getString(1)); + } + con.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + */ + Statement sql = null; + sql = con.createStatement(); + return sql.executeQuery(queryScript); + } + + /** + * ֱִSQL䣬ȡ÷صֵ˴ҪconӵĽرգΪؽܼ򵥡 + * @param updateScript + * @return ִкķֵ + * @throws SQLException ִдʱ׳쳣 + */ + protected static int executeUpdateScript(String updateScript) throws SQLException { + //ֱִSQL䣬ȡ÷صֵ˴ҪconӵĽرգΪؽܼ򵥡 + //ʾ updateScript = "insert into User values ('3', 'qwertyuio@123.com', '18899990000', 'cookie_1324567', '3', MD5('1234567'))" + //ܣһûĻϢʹMD5 + + /*һʾ֤ȷ + public static void main(String[] args) { + String updateScript = "insert into User values ('4', 'qwertyuio@1234.com', '18899990001', 'cookie_1324567', '3', MD5('1234567'))"; + try { + executeUpdateScript(updateScript); + } catch (SQLException e) { + e.printStackTrace(); + } + } + */ + Connection con = getConnection(); + Statement sql = null; + sql = con.createStatement(); + int result = sql.executeUpdate(updateScript); + con.close(); + return result; + } + /** + * ִSQL䣬һҪṩӵذ汾Ѿڱ𴦴δرգƼʹô˷ + * @param con һѾõ + * @param updateScript SQL + * @return ִкķֵ + * @throws SQLException + */ + protected static int executeUpdateScript(Connection con, String updateScript) throws SQLException { + Statement sql = null; + sql = con.createStatement(); + return sql.executeUpdate(updateScript); + } + +} diff --git a/src/dbOperator/myOP.java b/old/src/dbOperator/myOP.java similarity index 97% rename from src/dbOperator/myOP.java rename to old/src/dbOperator/myOP.java index 8f00caa6d87fd6d64c61eaf572dc89034f2436ea..2566c1ba5c692a3ac22caff022657c4044502cca 100644 --- a/src/dbOperator/myOP.java +++ b/old/src/dbOperator/myOP.java @@ -1,339 +1,339 @@ -package dbOperator; - -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class myOP { - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); - if (rs.next()) { - int identity = rs.getInt(1); - con.close(); - return identity; - } - return 0; - } - - /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû - * - * @param con ݿ - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 - */ - public static int getIdentity(Connection con, int uid) throws SQLException { - ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); - if (rs.next()) { - int identity = rs.getInt(1); - return identity; - } - return 0; - } - - // ºǺ - /** - * ṩbiduidԱԤԼ - * - * ̣ - * 1.ѯⱾǷѾԤԼˣǣֹظԤԼ - * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" - * 3.˲SpecificBookκӰ - * - * @param con ݿ - * @param bid 鱾ID - * @param readerUid ߵuid - * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) - * @throws SQLException - * @throws ParseException - */ - public static int getBookReserved(Connection con,int bid,int readerUid) throws SQLException, ParseException{ - //֤ - if(getIdentity(con,readerUid)!=3) return -1; - //ͬһ鲻ܶԤԼ - getExpiredReserveInvalidate(con, bid); - String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid + " and status = 'reserving'"; - ResultSet rs = BasicOperation.getQueryResult(con,queryScript); - if(rs.next()) return -1; - String sql="select reserveMaintainingHours from SystemAttribute"; - ResultSet res=BasicOperation.getQueryResult(con, sql); - if(!res.next())return -1; - int reserveMaintainingHours=res.getInt("reserveMaintainingHours"); - String updateScript = "insert into ReserveList values(" + readerUid + "," + bid + ",'" - + dataOperator.BasicOperation.getDateWithTimeAfterHours(reserveMaintainingHours) + "','reserving')"; - return BasicOperation.executeUpdateScript(con, updateScript); - } - - /** - * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" - * - * @return - * @throws SQLException - * @throws ParseException - */ - private static int getExpiredReserveInvalidate(Connection con, int bid) throws SQLException, ParseException { - String getList = "select expirationDate from ReserveList where bid='" + bid+"'and status='reserving'"; - ResultSet List = BasicOperation.getQueryResult(con, getList); - long recentTime = System.currentTimeMillis(); - int n = 0; - String sql = null; - Date date = null; - String formatdate=null; - while (List.next()) { - formatdate=List.getString("expirationDate"); - date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(formatdate); - if (date.getTime() < recentTime) { - sql = "update ReserveList set status = 'expired' where bid = '" + bid + "' and expirationDate = '" + formatdate+"'"; - BasicOperation.executeUpdateScript(con, sql); - n++; - } - } - return n; - } - /** - * - * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν - * @param bookID 鱾bookID - * @param readerUid ߵuid - * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ - * @throws SQLException - * - */ - public static int updateBorrowList(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ - if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; - if(!(status.equals("returned")||status.equals("borrowed"))) return -1; - if(status.equals("borrowed")){ - String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; - ResultSet rs = BasicOperation.getQueryResult(con,queryScript); - //ܽѾٴν - if(rs.next()) return -1; - queryScript="select bid from SpecificBook where bookID ='"+bookID+"'"; - rs=BasicOperation.getQueryResult(con, queryScript); - int bid=0; - if(rs.next())bid=rs.getInt(1); - String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bid + "','"+ bookID + "','" + dataOperator.BasicOperation.getDateWithTimeInString() + "','borrowed')"; - return BasicOperation.executeUpdateScript(con, updateScript); - } - if(status.equals("returned")) { - String updateScript = "update BorrowList set status = 'returned (Date = " + dataOperator.BasicOperation.getDateWithTimeInString() + ")' where bookID = '" + bookID + "' and uid = " + readerUid; - updateBookStatus(con, bookID, librarianUid, readerUid, "available"); - return BasicOperation.executeUpdateScript(con, updateScript); - } - return -1; - } - /** - * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList - * @param con ݿ - * @param bookID ĿbookID - * @param librarianUid ͼԱuidҪΪֵ - * @param readerUid ߵuidҪΪֵ - * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) - * @throws SQLException - */ - public static int updateBookStatus(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ - //֤ - if((getIdentity(con,librarianUid)!=2)||(getIdentity(con,readerUid)!=3)) return -1; - //ַȡֵ - if(!(status.equals("available")||status.equals("borrowed"))) return -1; - String updateScript="update SpecificBook set status = '" + status + "' where bookID ='" + bookID +"'"; - BasicOperation.executeUpdateScript(con,updateScript); - if(status.equals("borrowed")){ - return updateBorrowList(con, bookID, librarianUid, readerUid, status); - } - return -1; - } - /** - * ǽԤԼͼԱ ̣ 1.ж˵Ƿȷȷֱӷ - * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" - * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" - * - * @param con - * @param bid - * @param librarianUid - * @param readerUid - * @return - * @throws SQLException - * @throws ParseException - */ - public static boolean getReservedBookBorrowed(Connection con, int bid, int librarianUid,int readerUid ) - throws SQLException, ParseException { - int identity = getIdentity(con, librarianUid); - if (identity != 2) - return false; - getExpiredReserveInvalidate(con, bid); - String sql = "select * from ReserveList where uid='"+readerUid+"'and bid='"+bid+"' and status='reserving'"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - if(!res.next())return getBookBorrowedDirectly(con, bid, librarianUid, readerUid); - sql="update ReserveList set status='borrowed' where uid='"+readerUid+"'and bid='"+bid+"' and status ='reserving'"; - BasicOperation.executeUpdateScript(con, sql); - sql = "select bookID from SpecificBook where status='available' and bid='"+bid+"'"; - res = BasicOperation.getQueryResult(con, sql); - String bookID = null; - if (!res.next())return false; - bookID = res.getString(1); - updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); - return true; - } - /** - * ֱӽͼԱ ̣ 1.ж˵Ƿȷȷֱӷ - * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" - * 3.ѯųԤԼ״̬Ϊ"available"飬УԱҳһߣupdateBookStatus(...)״̬Ϊ"borrowed" - * - * @param con - * @param bid - * @param librarianUid - * @param readerUid - * @return - * @throws SQLException - * @throws ParseException - */ - public static boolean getBookBorrowedDirectly(Connection con, int bid, int librarianUid,int readerUid ) - throws SQLException, ParseException { - int identity = getIdentity(con, librarianUid); - if (identity != 2) - return false; - getExpiredReserveInvalidate(con, bid); - String sql = "select count(*) from ReserveList where bid='"+bid+"'and status ='reserving'"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - res.next(); - int n=res.getInt(1); - sql = "select bookID from SpecificBook where status='available' and bid='"+bid+"'"; - res = BasicOperation.getQueryResult(con, sql); - res.last(); - int m=res.getRow(); - System.out.println(m); - if(m<=n)return false; - res.beforeFirst(); - String bookID = null; - if (!res.next())return false; - bookID = res.getString(1); - updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); - return true; - } - // ΪԷ - // 鿴 - public static void showBook() throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from Book"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println( - "bid:" + res.getInt("bid") + " name:" + res.getString("name") + " ISBN:" + res.getString("ISBN")); - } - con.close(); - } - - // 鿴 - public static void showSpecificBook() throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from SpecificBook"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println("bid:" + res.getInt("bid") + " bookID:" + res.getString("bookID")+" status:"+res.getString("status")); - } - con.close(); - } - // 鿴ԤԼ - public static void showReserveList()throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from ReserveList"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println("uid:" + res.getInt("uid")+"bid:" + res.getInt("bid")+"expirationDate:"+res.getString("expirationDate")+"status:"+res.getString("status")); - } - con.close(); - } - //鿴嵥 - public static void showBorrowList()throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from BorrowList"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println("uid:" + res.getInt("uid")+"bookID:" + res.getString("bookID")+"borrowDate:"+res.getString("borrowDate")+"status:"+res.getString("status")); - } - con.close(); - } - //ԤԼ,,ɾ嵥 - public static void doclean0() throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "truncate table ReserveList"; - BasicOperation.executeUpdateScript(con, sql); - con.close(); - } - public static void doclean1() throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "truncate table BorrowList"; - BasicOperation.executeUpdateScript(con, sql); - con.close(); - } - public static void doclean2() throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "truncate table DeleteList"; - BasicOperation.executeUpdateScript(con, sql); - con.close(); - } - //ͼ״̬ - public static void resetBook(Connection con) throws SQLException { - String sql="select bookID from SpecificBook"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - String bookid=null; - while(res.next()) { - bookid=res.getString(1); - sql="update SpecificBook set status = 'available' where bookID='"+bookid+"'"; - BasicOperation.executeUpdateScript(con, sql); - } - } - //鿴û - public static void showUser()throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from User"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println("uid:" + res.getInt("uid")+" phoneNumber:"+res.getString("phoneNumber")+" password:"+res.getString("password")+" recentCookie:"+res.getString("recentCookie")); - } - con.close(); - } - //鿴ɾб - public static void showDeleteList()throws SQLException { - Connection con = BasicOperation.getConnection(); - String sql = "select * from DeleteList"; - ResultSet res = BasicOperation.getQueryResult(con, sql); - while (res.next()) { - System.out.println("uid:" + res.getInt("uid")+" bid:"+res.getInt("bid")+" date:"+res.getString("date")+" reason:"+res.getString("reason")); - } - con.close(); - } - public static void main(String[] args) throws SQLException, ParseException { - //AdvancedOperation.addBooksBybid(8,2,10); - //showDeleteList(); - //showBook(); - //showUser(); - //Connection con=BasicOperation.getConnection(); - //resetBook(con); - //doclean0(); - //doclean1(); - //doclean2(); - //getBookReserved(con,2, 4); - //getExpiredReserveInvalidate(con,2); - //getReservedBookBorrowed(con,2,8,3); - //getBookBorrowedDirectly(con, 2, 5, 4); - //con.close(); - //showReserveList(); - //showBorrowList(); - //showSpecificBook(); - //System.out.println(getIdentity(3)); - dbOperator.AdvancedOperation.registerNewUser("302","302", 2, 3); - } -} +package dbOperator; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class myOP { + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(int uid) throws SQLException { + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); + if (rs.next()) { + int identity = rs.getInt(1); + con.close(); + return identity; + } + return 0; + } + + /** + * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * + * @param con ݿ + * @param uid ûID + * @return identity ûݴ + * @throws SQLException ݿѯִдʱ׳쳣 + */ + public static int getIdentity(Connection con, int uid) throws SQLException { + ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); + if (rs.next()) { + int identity = rs.getInt(1); + return identity; + } + return 0; + } + + // ºǺ + /** + * ṩbiduidԱԤԼ + * + * ̣ + * 1.ѯⱾǷѾԤԼˣǣֹظԤԼ + * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" + * 3.˲SpecificBookκӰ + * + * @param con ݿ + * @param bid 鱾ID + * @param readerUid ߵuid + * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) + * @throws SQLException + * @throws ParseException + */ + public static int getBookReserved(Connection con,int bid,int readerUid) throws SQLException, ParseException{ + //֤ + if(getIdentity(con,readerUid)!=3) return -1; + //ͬһ鲻ܶԤԼ + getExpiredReserveInvalidate(con, bid); + String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid + " and status = 'reserving'"; + ResultSet rs = BasicOperation.getQueryResult(con,queryScript); + if(rs.next()) return -1; + String sql="select reserveMaintainingHours from SystemAttribute"; + ResultSet res=BasicOperation.getQueryResult(con, sql); + if(!res.next())return -1; + int reserveMaintainingHours=res.getInt("reserveMaintainingHours"); + String updateScript = "insert into ReserveList values(" + readerUid + "," + bid + ",'" + + dataOperator.BasicOperation.getDateWithTimeAfterHours(reserveMaintainingHours) + "','reserving')"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + + /** + * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" + * + * @return + * @throws SQLException + * @throws ParseException + */ + private static int getExpiredReserveInvalidate(Connection con, int bid) throws SQLException, ParseException { + String getList = "select expirationDate from ReserveList where bid='" + bid+"'and status='reserving'"; + ResultSet List = BasicOperation.getQueryResult(con, getList); + long recentTime = System.currentTimeMillis(); + int n = 0; + String sql = null; + Date date = null; + String formatdate=null; + while (List.next()) { + formatdate=List.getString("expirationDate"); + date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(formatdate); + if (date.getTime() < recentTime) { + sql = "update ReserveList set status = 'expired' where bid = '" + bid + "' and expirationDate = '" + formatdate+"'"; + BasicOperation.executeUpdateScript(con, sql); + n++; + } + } + return n; + } + /** + * + * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν + * @param bookID 鱾bookID + * @param readerUid ߵuid + * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ + * @throws SQLException + * + */ + public static int updateBorrowList(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ + if((getIdentity(con,librarianUid)!=2)||getIdentity(con,readerUid)!=3) return -1; + if(!(status.equals("returned")||status.equals("borrowed"))) return -1; + if(status.equals("borrowed")){ + String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; + ResultSet rs = BasicOperation.getQueryResult(con,queryScript); + //ܽѾٴν + if(rs.next()) return -1; + queryScript="select bid from SpecificBook where bookID ='"+bookID+"'"; + rs=BasicOperation.getQueryResult(con, queryScript); + int bid=0; + if(rs.next())bid=rs.getInt(1); + String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bid + "','"+ bookID + "','" + dataOperator.BasicOperation.getDateWithTimeInString() + "','borrowed')"; + return BasicOperation.executeUpdateScript(con, updateScript); + } + if(status.equals("returned")) { + String updateScript = "update BorrowList set status = 'returned (Date = " + dataOperator.BasicOperation.getDateWithTimeInString() + ")' where bookID = '" + bookID + "' and uid = " + readerUid; + updateBookStatus(con, bookID, librarianUid, readerUid, "available"); + return BasicOperation.executeUpdateScript(con, updateScript); + } + return -1; + } + /** + * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList + * @param con ݿ + * @param bookID ĿbookID + * @param librarianUid ͼԱuidҪΪֵ + * @param readerUid ߵuidҪΪֵ + * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) + * @throws SQLException + */ + public static int updateBookStatus(Connection con,String bookID,int librarianUid,int readerUid,String status) throws SQLException{ + //֤ + if((getIdentity(con,librarianUid)!=2)||(getIdentity(con,readerUid)!=3)) return -1; + //ַȡֵ + if(!(status.equals("available")||status.equals("borrowed"))) return -1; + String updateScript="update SpecificBook set status = '" + status + "' where bookID ='" + bookID +"'"; + BasicOperation.executeUpdateScript(con,updateScript); + if(status.equals("borrowed")){ + return updateBorrowList(con, bookID, librarianUid, readerUid, status); + } + return -1; + } + /** + * ǽԤԼͼԱ ̣ 1.ж˵Ƿȷȷֱӷ + * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" + * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" + * + * @param con + * @param bid + * @param librarianUid + * @param readerUid + * @return + * @throws SQLException + * @throws ParseException + */ + public static boolean getReservedBookBorrowed(Connection con, int bid, int librarianUid,int readerUid ) + throws SQLException, ParseException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return false; + getExpiredReserveInvalidate(con, bid); + String sql = "select * from ReserveList where uid='"+readerUid+"'and bid='"+bid+"' and status='reserving'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + if(!res.next())return getBookBorrowedDirectly(con, bid, librarianUid, readerUid); + sql="update ReserveList set status='borrowed' where uid='"+readerUid+"'and bid='"+bid+"' and status ='reserving'"; + BasicOperation.executeUpdateScript(con, sql); + sql = "select bookID from SpecificBook where status='available' and bid='"+bid+"'"; + res = BasicOperation.getQueryResult(con, sql); + String bookID = null; + if (!res.next())return false; + bookID = res.getString(1); + updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); + return true; + } + /** + * ֱӽͼԱ ̣ 1.ж˵Ƿȷȷֱӷ + * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" + * 3.ѯųԤԼ״̬Ϊ"available"飬УԱҳһߣupdateBookStatus(...)״̬Ϊ"borrowed" + * + * @param con + * @param bid + * @param librarianUid + * @param readerUid + * @return + * @throws SQLException + * @throws ParseException + */ + public static boolean getBookBorrowedDirectly(Connection con, int bid, int librarianUid,int readerUid ) + throws SQLException, ParseException { + int identity = getIdentity(con, librarianUid); + if (identity != 2) + return false; + getExpiredReserveInvalidate(con, bid); + String sql = "select count(*) from ReserveList where bid='"+bid+"'and status ='reserving'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + res.next(); + int n=res.getInt(1); + sql = "select bookID from SpecificBook where status='available' and bid='"+bid+"'"; + res = BasicOperation.getQueryResult(con, sql); + res.last(); + int m=res.getRow(); + System.out.println(m); + if(m<=n)return false; + res.beforeFirst(); + String bookID = null; + if (!res.next())return false; + bookID = res.getString(1); + updateBookStatus(con, bookID, librarianUid, readerUid, "borrowed"); + return true; + } + // ΪԷ + // 鿴 + public static void showBook() throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from Book"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println( + "bid:" + res.getInt("bid") + " name:" + res.getString("name") + " ISBN:" + res.getString("ISBN")); + } + con.close(); + } + + // 鿴 + public static void showSpecificBook() throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from SpecificBook"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println("bid:" + res.getInt("bid") + " bookID:" + res.getString("bookID")+" status:"+res.getString("status")); + } + con.close(); + } + // 鿴ԤԼ + public static void showReserveList()throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from ReserveList"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println("uid:" + res.getInt("uid")+"bid:" + res.getInt("bid")+"expirationDate:"+res.getString("expirationDate")+"status:"+res.getString("status")); + } + con.close(); + } + //鿴嵥 + public static void showBorrowList()throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from BorrowList"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println("uid:" + res.getInt("uid")+"bookID:" + res.getString("bookID")+"borrowDate:"+res.getString("borrowDate")+"status:"+res.getString("status")); + } + con.close(); + } + //ԤԼ,,ɾ嵥 + public static void doclean0() throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "truncate table ReserveList"; + BasicOperation.executeUpdateScript(con, sql); + con.close(); + } + public static void doclean1() throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "truncate table BorrowList"; + BasicOperation.executeUpdateScript(con, sql); + con.close(); + } + public static void doclean2() throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "truncate table DeleteList"; + BasicOperation.executeUpdateScript(con, sql); + con.close(); + } + //ͼ״̬ + public static void resetBook(Connection con) throws SQLException { + String sql="select bookID from SpecificBook"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + String bookid=null; + while(res.next()) { + bookid=res.getString(1); + sql="update SpecificBook set status = 'available' where bookID='"+bookid+"'"; + BasicOperation.executeUpdateScript(con, sql); + } + } + //鿴û + public static void showUser()throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from User"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println("uid:" + res.getInt("uid")+" phoneNumber:"+res.getString("phoneNumber")+" password:"+res.getString("password")+" recentCookie:"+res.getString("recentCookie")); + } + con.close(); + } + //鿴ɾб + public static void showDeleteList()throws SQLException { + Connection con = BasicOperation.getConnection(); + String sql = "select * from DeleteList"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + while (res.next()) { + System.out.println("uid:" + res.getInt("uid")+" bid:"+res.getInt("bid")+" date:"+res.getString("date")+" reason:"+res.getString("reason")); + } + con.close(); + } + public static void main(String[] args) throws SQLException, ParseException { + //AdvancedOperation.addBooksBybid(8,2,10); + //showDeleteList(); + //showBook(); + //showUser(); + //Connection con=BasicOperation.getConnection(); + //resetBook(con); + //doclean0(); + //doclean1(); + //doclean2(); + //getBookReserved(con,2, 4); + //getExpiredReserveInvalidate(con,2); + //getReservedBookBorrowed(con,2,8,3); + //getBookBorrowedDirectly(con, 2, 5, 4); + //con.close(); + //showReserveList(); + //showBorrowList(); + //showSpecificBook(); + //System.out.println(getIdentity(3)); + dbOperator.AdvancedOperation.registerNewUser("302","302", 2, 3); + } +} diff --git a/src/servlet/Book.java b/old/src/servlet/Book.java similarity index 97% rename from src/servlet/Book.java rename to old/src/servlet/Book.java index dfeb537dff8d4d5c3f8601617a3debb5374a2e9e..9c65076a3e808fb80e412f0276f7ed6d7a05f4d7 100644 --- a/src/servlet/Book.java +++ b/old/src/servlet/Book.java @@ -1,225 +1,225 @@ -package servlet; - -import java.io.IOException; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import dbOperator.AdvancedOperation; -import dbOperator.BasicOperation; - -/** - * Servlet implementation class AddBook - */ -@WebServlet("/Book") -public class Book extends HttpServlet { - private static final long serialVersionUID = 1L; - - // 根据参数判断是哪一个页面发来的请求,调用相应的函数 - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - int type = Integer.parseInt(request.getParameter("Type")); - if (type == 1) { - try { - addBook(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 2) { - try { - editBook(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 3) { - try { - addSpecificBook(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 4) { - try { - editSpecificBook(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 5) { - try { - deleteSpecificBook(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - response.sendRedirect(request.getHeader("Referer")); - } - - /** - * 此函数用于添加某一种书 - * - * @throws ServletException, IOException, SQLException - */ - public void addBook(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - if (AdvancedOperation.getIdentity(con, uid) != 2) - return; - String name = request.getParameter("Name"); - String category = request.getParameter("Category"); - String author = request.getParameter("Author"); - String ISBN = request.getParameter("ISBN"); - String publisher = request.getParameter("Publisher"); - String pricestr=request.getParameter("Price"); - if(pricestr.equals(""))return; - Double price = Double.valueOf(pricestr); - Statement sql = con.createStatement(); - if(!(ISBN==null||ISBN.equals(""))) - sql.executeUpdate("insert into Book(name,category,author,publisher,ISBN,price) values('" + name + "','" + category + "','" + author + "','" + publisher + "','" + ISBN + "','" + price + "')"); - else sql.executeUpdate("insert into Book(name,category,author,publisher,price) values('" + name + "','" + category + "','" + author + "','" + publisher + "','" + price + "')"); - con.close(); - return; - } - } - } - - /** - * 此函数用于编辑某一种书的信息,根据bid定位 - * - * @throws ServletException, IOException,SQLException - */ - public void editBook(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - if (AdvancedOperation.getIdentity(con, uid) != 2) - return; - String bidstr = request.getParameter("eBID"); - String category = request.getParameter("category"); - String price = request.getParameter("price"); - if (bidstr == null || price.equals("")) - return; - int bid = Integer.parseInt(bidstr); - Statement sql = con.createStatement(); - sql.executeUpdate("update Book set category='" + category + "',price='" + price + "' where bid=" + bid); - con.close(); - return; - } - } - } - - /** - * 此函数用于添加某种书的副本数量,根据bid定位 - * - * @throws ServletException,IOException,SQLException - */ - public void addSpecificBook(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - String bidstr = request.getParameter("aBID"); - String numstr = request.getParameter("Number"); - if (bidstr == null || numstr.equals("")) - return; - int bid = Integer.parseInt(bidstr); - int num = Integer.parseInt(numstr); - AdvancedOperation.addBooksbybid(con, uid, bid, num); - con.close(); - } - } - } - - /** - * 此函数用于编辑某种书的具体副本的信息,根据bookID定位 - * - * @throws ServletException,IOException,SQLException - */ - public void editSpecificBook(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - if (AdvancedOperation.getIdentity(con, uid) != 2) - return; - String bookID = request.getParameter("eBookID"); - String status = request.getParameter("Status"); - String location = request.getParameter("Location"); - if (bookID == null) - return; - Statement sql = con.createStatement(); - sql.executeUpdate("update SpecificBook set status='" + status + "',position='" + location - + "' where bookID='" + bookID + "'"); - con.close(); - } - } - } - - /** - * 此函数用于删除某书的具体副本根据bookID定位 - * - * @throws ServletException,IOException,SQLException - * @throws SQLException - */ - protected void deleteSpecificBook(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - String bookIDstr = request.getParameter("dBookID"); - String rsn = request.getParameter("reason"); - if (bookIDstr == null) - return; - AdvancedOperation.getBookDeleted(con, uid, bookIDstr, rsn); - con.close(); - } - - } - } -} +package servlet; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import dbOperator.AdvancedOperation; +import dbOperator.BasicOperation; + +/** + * Servlet implementation class AddBook + */ +@WebServlet("/Book") +public class Book extends HttpServlet { + private static final long serialVersionUID = 1L; + + // 根据参数判断是哪一个页面发来的请求,调用相应的函数 + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + int type = Integer.parseInt(request.getParameter("Type")); + if (type == 1) { + try { + addBook(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 2) { + try { + editBook(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 3) { + try { + addSpecificBook(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 4) { + try { + editSpecificBook(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 5) { + try { + deleteSpecificBook(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + response.sendRedirect(request.getHeader("Referer")); + } + + /** + * 此函数用于添加某一种书 + * + * @throws ServletException, IOException, SQLException + */ + public void addBook(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + if (AdvancedOperation.getIdentity(con, uid) != 2) + return; + String name = request.getParameter("Name"); + String category = request.getParameter("Category"); + String author = request.getParameter("Author"); + String ISBN = request.getParameter("ISBN"); + String publisher = request.getParameter("Publisher"); + String pricestr=request.getParameter("Price"); + if(pricestr.equals(""))return; + Double price = Double.valueOf(pricestr); + Statement sql = con.createStatement(); + if(!(ISBN==null||ISBN.equals(""))) + sql.executeUpdate("insert into Book(name,category,author,publisher,ISBN,price) values('" + name + "','" + category + "','" + author + "','" + publisher + "','" + ISBN + "','" + price + "')"); + else sql.executeUpdate("insert into Book(name,category,author,publisher,price) values('" + name + "','" + category + "','" + author + "','" + publisher + "','" + price + "')"); + con.close(); + return; + } + } + } + + /** + * 此函数用于编辑某一种书的信息,根据bid定位 + * + * @throws ServletException, IOException,SQLException + */ + public void editBook(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + if (AdvancedOperation.getIdentity(con, uid) != 2) + return; + String bidstr = request.getParameter("eBID"); + String category = request.getParameter("category"); + String price = request.getParameter("price"); + if (bidstr == null || price.equals("")) + return; + int bid = Integer.parseInt(bidstr); + Statement sql = con.createStatement(); + sql.executeUpdate("update Book set category='" + category + "',price='" + price + "' where bid=" + bid); + con.close(); + return; + } + } + } + + /** + * 此函数用于添加某种书的副本数量,根据bid定位 + * + * @throws ServletException,IOException,SQLException + */ + public void addSpecificBook(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + String bidstr = request.getParameter("aBID"); + String numstr = request.getParameter("Number"); + if (bidstr == null || numstr.equals("")) + return; + int bid = Integer.parseInt(bidstr); + int num = Integer.parseInt(numstr); + AdvancedOperation.addBooksbybid(con, uid, bid, num); + con.close(); + } + } + } + + /** + * 此函数用于编辑某种书的具体副本的信息,根据bookID定位 + * + * @throws ServletException,IOException,SQLException + */ + public void editSpecificBook(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + if (AdvancedOperation.getIdentity(con, uid) != 2) + return; + String bookID = request.getParameter("eBookID"); + String status = request.getParameter("Status"); + String location = request.getParameter("Location"); + if (bookID == null) + return; + Statement sql = con.createStatement(); + sql.executeUpdate("update SpecificBook set status='" + status + "',position='" + location + + "' where bookID='" + bookID + "'"); + con.close(); + } + } + } + + /** + * 此函数用于删除某书的具体副本根据bookID定位 + * + * @throws ServletException,IOException,SQLException + * @throws SQLException + */ + protected void deleteSpecificBook(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + String bookIDstr = request.getParameter("dBookID"); + String rsn = request.getParameter("reason"); + if (bookIDstr == null) + return; + AdvancedOperation.getBookDeleted(con, uid, bookIDstr, rsn); + con.close(); + } + + } + } +} diff --git a/src/servlet/ISBN.java b/old/src/servlet/ISBN.java similarity index 97% rename from src/servlet/ISBN.java rename to old/src/servlet/ISBN.java index 279ccd9cac6750841785a359a53ea5b6ed492fa9..c0f90b6d26792fdd5e6c67a6ebfc9a8f06ab489e 100644 --- a/src/servlet/ISBN.java +++ b/old/src/servlet/ISBN.java @@ -1,110 +1,110 @@ -package servlet; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import dbOperator.AdvancedOperation; -import dbOperator.BasicOperation; - -/** - * Servlet implementation class ISBN - */ -@WebServlet("/ISBN") -//https://route.showapi.com/1626-1?isbn=9787208061644&showapi_appid=105792&showapi_sign=23960e7799d54ed2bad13cc16b8fca91 - -public class ISBN extends HttpServlet { - private static final long serialVersionUID = 1L; - - private static String getInfo(String res,String id) { - int i = res.indexOf("\""+id+"\""); - //System.out.println(i); - if (i==-1) return null; - String info = res.substring(i + id.length()+3); - if(info.indexOf('\"') == 0) { - info = info.substring(1); - i = info.indexOf('\"'); - } - else { - int t1 = info.indexOf(','); - int t2 = info.indexOf('}'); - if(t1>=0&&t2>=0) i=t1alert('FAILED to get the information through given ISBN!');window.location.href='" + request.getHeader("Referer") + "'");return;} - String publisher = getInfo(line, "publisher"); - String author = getInfo(line,"author"); - String name = getInfo(line,"title"); - String price = getInfo(line,"price"); - StringBuffer sbf=new StringBuffer(ISBN); - sbf.insert(3, '-');sbf.insert(5, '-');sbf.insert(10, '-');sbf.insert(15, '-'); - ISBN=sbf.toString(); - Statement sql; - try { - sql = con.createStatement(); - sql.executeUpdate("insert into Book(name,category,author,publisher,ISBN,price) values('" + name + "','','" + author + "','" + publisher + "','" + ISBN + "','" + price + "')"); - con.close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - response.sendRedirect(request.getHeader("Referer")); - } -} +package servlet; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import dbOperator.AdvancedOperation; +import dbOperator.BasicOperation; + +/** + * Servlet implementation class ISBN + */ +@WebServlet("/ISBN") +//https://route.showapi.com/1626-1?isbn=9787208061644&showapi_appid=105792&showapi_sign=23960e7799d54ed2bad13cc16b8fca91 + +public class ISBN extends HttpServlet { + private static final long serialVersionUID = 1L; + + private static String getInfo(String res,String id) { + int i = res.indexOf("\""+id+"\""); + //System.out.println(i); + if (i==-1) return null; + String info = res.substring(i + id.length()+3); + if(info.indexOf('\"') == 0) { + info = info.substring(1); + i = info.indexOf('\"'); + } + else { + int t1 = info.indexOf(','); + int t2 = info.indexOf('}'); + if(t1>=0&&t2>=0) i=t1alert('FAILED to get the information through given ISBN!');window.location.href='" + request.getHeader("Referer") + "'");return;} + String publisher = getInfo(line, "publisher"); + String author = getInfo(line,"author"); + String name = getInfo(line,"title"); + String price = getInfo(line,"price"); + StringBuffer sbf=new StringBuffer(ISBN); + sbf.insert(3, '-');sbf.insert(5, '-');sbf.insert(10, '-');sbf.insert(15, '-'); + ISBN=sbf.toString(); + Statement sql; + try { + sql = con.createStatement(); + sql.executeUpdate("insert into Book(name,category,author,publisher,ISBN,price) values('" + name + "','','" + author + "','" + publisher + "','" + ISBN + "','" + price + "')"); + con.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + } + response.sendRedirect(request.getHeader("Referer")); + } +} diff --git a/old/src/servlet/Login.java b/old/src/servlet/Login.java new file mode 100644 index 0000000000000000000000000000000000000000..ffb52b0fa4bf7ed4cb6177c033b3f200fe541573 --- /dev/null +++ b/old/src/servlet/Login.java @@ -0,0 +1,69 @@ +package servlet; + +import java.io.IOException; +import java.sql.SQLException; + +import javax.servlet.http.*; + +import dbOperator.*; + +public class Login extends HttpServlet{ + + /** + * + */ + private static final long serialVersionUID = -4143721484509460L; + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { + Cookie cookies[] = request.getCookies(); + if(cookies == null) {response.sendRedirect("index.html");return;} + for(Cookie c : cookies) { + if(c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + try { + int uid = AdvancedOperation.getUidbyCookie(currentCookie); + int userIdentity = AdvancedOperation.getIdentity(uid); + HttpSession session = request.getSession(); + session.setAttribute("uid", uid); + session.setAttribute("userIdentity", userIdentity); + switch(userIdentity) { + case 1:{response.sendRedirect("admin.html");break;} + case 2:{response.sendRedirect("librarian.jsp");break;} + case 3:{response.sendRedirect("reader.html");break;} + default:{response.sendRedirect("index.html");break;} + } + } catch (SQLException e) { + // TODO Զɵ catch + e.printStackTrace(); + } + } + } + return; + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { + String information = (String) request.getParameter("info"); + String password = dataOperator.BasicOperation.MD5((String) request.getParameter("pwd")); + String currentCookie = null; + try { + currentCookie = AdvancedOperation.getLoginInfo(information, password); + System.out.println(currentCookie); + } catch (SQLException e) { + // TODO Զɵ catch + e.printStackTrace(); + } + if(currentCookie != null) { + Cookie loginInfo = new Cookie("LoginInfo",currentCookie); + loginInfo.setMaxAge(604800); + //604800 = 60*60*24*7 cookieЧΪ7 + response.addCookie(loginInfo); + response.sendRedirect("launch"); + return; + } + else { + //ڴ˼뵯ʾĴ룬¶λ¼ҳ + response.sendRedirect("index.html"); + return; + } + } +} diff --git a/src/servlet/Reader.java b/old/src/servlet/Reader.java similarity index 96% rename from src/servlet/Reader.java rename to old/src/servlet/Reader.java index 2ef636a25f43b3cd3d3bcaaa398f3220659b62f5..2223aa53b3ecaf1b7d058d4a3699966eda03a0b0 100644 --- a/src/servlet/Reader.java +++ b/old/src/servlet/Reader.java @@ -1,116 +1,116 @@ -package servlet; - -import java.io.IOException; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import dbOperator.AdvancedOperation; - -/** - * Servlet implementation class Reader - */ -@WebServlet("/Reader") -public class Reader extends HttpServlet { - private static final long serialVersionUID = 1L; - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - int type = Integer.parseInt(request.getParameter("Type")); - if (type == 1) { - try { - editReader(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 2) { - try { - registerReader(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (type == 3) { - try { - deleteReader(request, response); - } catch (SQLException e) { - e.printStackTrace(); - } - } - response.sendRedirect(request.getHeader("Referer")); - } - - public void registerReader(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - int uidid=AdvancedOperation.getIdentity(con,uid); - String Email=request.getParameter("Email"); - String PhoneNumber=request.getParameter("PhoneNumber"); - dbOperator.AdvancedOperation.registerNewUser(Email,PhoneNumber, uidid, 3); - con.close(); - } - } - } - - public void editReader(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - if(AdvancedOperation.getIdentity(con,uid)!=2)return; - String eUID=request.getParameter("eUID"); - if(eUID==null)return; - String Email=request.getParameter("Email"); - String PhoneNumber=request.getParameter("PhoneNumber"); - int euid=Integer.parseInt(eUID); - Statement sql = con.createStatement(); - sql.executeUpdate("update User set Email='"+ - Email+ "',PhoneNumber='" + PhoneNumber+ "' where uid ="+euid); - con.close(); - } - } - } - - protected void deleteReader(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, SQLException { - Cookie cookies[] = request.getCookies(); - if (cookies == null) { - response.sendRedirect("index.html"); - return; - } - for (Cookie c : cookies) { - if (c.getName().equals("LoginInfo")) { - String currentCookie = c.getValue(); - Connection con = dbOperator.BasicOperation.getConnection(); - int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); - String readeridstr = request.getParameter("dUID"); - if (readeridstr == null) - return; - int readerid = Integer.parseInt(readeridstr); - AdvancedOperation.getReaderDeleted(con, uid, readerid); - con.close(); - } - } - } -} +package servlet; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import dbOperator.AdvancedOperation; + +/** + * Servlet implementation class Reader + */ +@WebServlet("/Reader") +public class Reader extends HttpServlet { + private static final long serialVersionUID = 1L; + + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + int type = Integer.parseInt(request.getParameter("Type")); + if (type == 1) { + try { + editReader(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 2) { + try { + registerReader(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + if (type == 3) { + try { + deleteReader(request, response); + } catch (SQLException e) { + e.printStackTrace(); + } + } + response.sendRedirect(request.getHeader("Referer")); + } + + public void registerReader(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + int uidid=AdvancedOperation.getIdentity(con,uid); + String Email=request.getParameter("Email"); + String PhoneNumber=request.getParameter("PhoneNumber"); + dbOperator.AdvancedOperation.registerNewUser(Email,PhoneNumber, uidid, 3); + con.close(); + } + } + } + + public void editReader(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + if(AdvancedOperation.getIdentity(con,uid)!=2)return; + String eUID=request.getParameter("eUID"); + if(eUID==null)return; + String Email=request.getParameter("Email"); + String PhoneNumber=request.getParameter("PhoneNumber"); + int euid=Integer.parseInt(eUID); + Statement sql = con.createStatement(); + sql.executeUpdate("update User set Email='"+ + Email+ "',PhoneNumber='" + PhoneNumber+ "' where uid ="+euid); + con.close(); + } + } + } + + protected void deleteReader(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + Cookie cookies[] = request.getCookies(); + if (cookies == null) { + response.sendRedirect("index.html"); + return; + } + for (Cookie c : cookies) { + if (c.getName().equals("LoginInfo")) { + String currentCookie = c.getValue(); + Connection con = dbOperator.BasicOperation.getConnection(); + int uid = AdvancedOperation.getUidbyCookie(con, currentCookie); + String readeridstr = request.getParameter("dUID"); + if (readeridstr == null) + return; + int readerid = Integer.parseInt(readeridstr); + AdvancedOperation.getReaderDeleted(con, uid, readerid); + con.close(); + } + } + } +} diff --git a/src/dataOperator/BasicOperation.java b/src/dataOperator/BasicOperation.java index 84bcb43970189c34ef4fbccf64359ea03e52e503..84d6b18738dbed8db8c8f19a58b06d3ea5340e67 100644 --- a/src/dataOperator/BasicOperation.java +++ b/src/dataOperator/BasicOperation.java @@ -1,17 +1,10 @@ package dataOperator; import java.security.MessageDigest; -import java.text.Format; import java.text.SimpleDateFormat; -import java.util.Calendar; import java.util.Date; public class BasicOperation { - /** - * ǰַMD5 - * @param dataStr Ҫַܵ - * @return ܽ - */ public static String MD5(String dataStr){ try { MessageDigest m = MessageDigest.getInstance("MD5"); @@ -28,71 +21,29 @@ public class BasicOperation { return null; } - /** - * ΪǰַϵţʹSQL - * @param str Ҫŵַ - * @return ŵַ - */ public static String addQuotes(String str) { if(str == null) return null; return "'" + str + "'"; } - /** - * ΪǰַȥţԱ - * @param str Ҫȥŵַ - * @return ȥŵַ - */ + public static String removeQuotes(String str) { if(str == null) return null; if(str.charAt(0)=='\'' && str.charAt(str.length()-1) == '\'') return str.substring(1, str.length()-1); return str; } - /** - * õ 2019-08-08 ʽַ(޵)SQLв - * @return ַ - */ - /*public static String getDateInString() { - Date d = new Date(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - return sdf.format(d); - }*/ - /** - * õ 2019-08-08 09:32:15 ʽĴʱַ(޵)SQLв - * @return ʱַ - */ - public static String getDateWithTimeInString() { - Date d = new Date(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - return sdf.format(d); - } - /** - * õ 2019-08-18 09:32:15 ʽĴʱַ()еIJƵ - * @param days Ƶ - * @return ʱַ - */ - public static String getDateWithTimeAfterDays(int days) { - Calendar c = Calendar.getInstance(); - c.setTime(new Date()); - c.add(Calendar.DAY_OF_MONTH, days);// ΪʱΪǰ - Format f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - //System.out.println(days + ":" + f.format(c.getTime())); - return f.format(c.getTime()); - } - /** - * õ 2019-08-08 12:32:15 ʽĴʱַ()еIJƵСʱ - * @param hours ƵСʱ - * @return ʱַ - */ - public static String getDateWithTimeAfterHours(int hours) { - Calendar c = Calendar.getInstance(); - c.setTime(new Date()); - c.add(Calendar.HOUR_OF_DAY, hours);// ΪʱΪǰСʱ - Format f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - //System.out.println(hours + "Сʱ:" + f.format(c.getTime())); - return f.format(c.getTime()); + public static String getDateWithTimeAfterHours(int i) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + long returnTime = new Date().getTime(); + returnTime += 1000*60*60*i; + Date date = new Date(returnTime); + + return sdf.format(date); } - public static void main(String[] args) { - System.out.println(getDateWithTimeAfterHours(0)); + + public static String getDateInString() { + // TODO Auto-generated method stub + return null; } + } diff --git a/src/dataOperator/BrrowList.java b/src/dataOperator/BrrowList.java new file mode 100644 index 0000000000000000000000000000000000000000..b682acc5830d2020792623c3343ef87291997a94 --- /dev/null +++ b/src/dataOperator/BrrowList.java @@ -0,0 +1,59 @@ +package dataOperator; + +import java.sql.Date; + +public class BrrowList { + int uid; + int bid; + String bookID; + String bookName; + String borrowDate; + String returnDate; + String status; + public int getUid() { + return uid; + } + public void setUid(int uid) { + this.uid = uid; + } + public int getBid() { + return bid; + } + public void setBid(int bid) { + this.bid = bid; + } + public String getBookID() { + return bookID; + } + public void setBookID(String bookID) { + this.bookID = bookID; + } + + public String getReturnDate() { + return returnDate; + } + public void setReturnDate(String returnDate) { + this.returnDate = returnDate; + } + public String getBookName() { + return bookName; + } + public void setBookName(String bookName) { + this.bookName = bookName; + } + public String getBorrowDate() { + return borrowDate; + } + public void setBorrowDate(String borrowDate) { + this.borrowDate = borrowDate; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + + + +} diff --git a/src/dataOperator/SBook.java b/src/dataOperator/SBook.java new file mode 100644 index 0000000000000000000000000000000000000000..44f84d2461196c3d7035252be40e63f41423b8b8 --- /dev/null +++ b/src/dataOperator/SBook.java @@ -0,0 +1,91 @@ +package dataOperator; + +public class SBook { + String bookID; + String bookName; + String position; + String category; + String author; + String publisher; + String ISBN; + double price; + String status; + int bid; + + public SBook(String bookID, String bookName, String position, String category, String author, String publisher, + String iSBN, double price, String status, int bid) { + super(); + this.bookID = bookID; + this.bookName = bookName; + this.position = position; + this.category = category; + this.author = author; + this.publisher = publisher; + ISBN = iSBN; + this.price = price; + this.status = status; + this.bid = bid; + } + public String getBookID() { + return bookID; + } + public void setBookID(String bookID) { + this.bookID = bookID; + } + public String getBookName() { + return bookName; + } + public void setBookName(String bookName) { + this.bookName = bookName; + } + public String getPosition() { + return position; + } + public void setPosition(String position) { + this.position = position; + } + public String getCategory() { + return category; + } + public void setCategory(String category) { + this.category = category; + } + public String getAuthor() { + return author; + } + public void setAuthor(String author) { + this.author = author; + } + public String getPublisher() { + return publisher; + } + public void setPublisher(String publisher) { + this.publisher = publisher; + } + public String getISBN() { + return ISBN; + } + public void setISBN(String iSBN) { + ISBN = iSBN; + } + public double getPrice() { + return price; + } + public void setPrice(double price) { + this.price = price; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public int getBid() { + return bid; + } + public void setBid(int bid) { + this.bid = bid; + } + + +} diff --git a/src/dbOperator/AdvancedOperation.java b/src/dbOperator/AdvancedOperation.java index 07926d13a8a4e9bbcd13ae192f6342ef2de111b2..6eac80760c1af1cea9afa0f4c6e677e7195fb6cb 100644 --- a/src/dbOperator/AdvancedOperation.java +++ b/src/dbOperator/AdvancedOperation.java @@ -10,11 +10,11 @@ import java.util.Date; public class AdvancedOperation { /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * 这个函数的作用是根据用户的ID号确定其身份为 读者、图书管理员还是超级管理员,其中 1是超级管理员,2是图书管理员,3是读者,返回值为0表示当前用户不存在 * - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 + * @param uid 用户的ID号 + * @return identity 用户的身份代号 + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static int getIdentity(int uid) throws SQLException { Connection con = BasicOperation.getConnection(); @@ -28,12 +28,12 @@ public class AdvancedOperation { } /** - * ǸûIDȷΪ ߡͼԱdzԱ 1dzԱ2ͼԱ3ǶߣֵΪ0ʾǰû + * 这个函数的作用是根据用户的ID号确定其身份为 读者、图书管理员还是超级管理员,其中 1是超级管理员,2是图书管理员,3是读者,返回值为0表示当前用户不存在 * - * @param con ݿ - * @param uid ûID - * @return identity ûݴ - * @throws SQLException ݿѯִдʱ׳쳣 + * @param con 建立的数据库连接 + * @param uid 用户的ID号 + * @return identity 用户的身份代号 + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static int getIdentity(Connection con, int uid) throws SQLException { ResultSet rs = BasicOperation.getQueryResult(con, "select identity from User where uid = " + uid); @@ -45,11 +45,11 @@ public class AdvancedOperation { } /** - * ǸûϢȡuidϢŻֻţԶж + * 这个函数的作用是根据用户的信息获取其uid,信息可以是邮箱号或手机号,函数可以自动做出判断 * - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 + * @param information 基本信息,可以是手机号或邮箱 + * @return 用户的ID + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static int getUid(String information) throws SQLException { int isEmail = information.indexOf("@"); @@ -68,12 +68,12 @@ public class AdvancedOperation { } /** - * ǸûϢȡuidϢŻֻţԶж + * 这个函数的作用是根据用户的信息获取其uid,信息可以是邮箱号或手机号,函数可以自动做出判断 * - * @param con ݿ - * @param information ϢֻŻ - * @return ûID - * @throws SQLException ݿѯִдʱ׳쳣 + * @param con 建立的数据库连接 + * @param information 基本信息,可以是手机号或邮箱 + * @return 用户的ID + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static int getUid(Connection con, String information) throws SQLException { int isEmail = information.indexOf("@"); @@ -89,13 +89,61 @@ public class AdvancedOperation { uid = res.getInt(1); return uid; } + + /** + * 这个函数的作用是根据用户的信息获取用户 + * + * @param con 建立的数据库连接 + * @param information 基本信息,可以是手机号或邮箱 + * @return 用户的ID + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 + */ + public static ResultSet getUser(String information, String password) throws SQLException { + String type = "phoneNumber"; + if (information.indexOf('@') != -1) + type = "Email"; + password = "'" + password + "'"; + String queryScript = "select * from User where " + type + " = '" + information + "' and password = " + password + + ""; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + return rs; + } + + /** + * 这个函数的作用是根据用户uid的信息获取用户 + * + * @param con 建立的数据库连接 + * @param uid 用户的uid + * @return 用户的ID + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 + */ + public static ResultSet getUserByUid(int uid) throws SQLException { + String queryScript = "select * from User where uid = " + uid ; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + return rs; + } + + + /** + * 获取所有图书 + * + * @throws SQLException + */ + public static ResultSet getAllSBooks() throws SQLException { + String queryScript = "SELECT * FROM Book book inner join SpecificBook sbook on book.bid = sbook.bid"; + Connection con = BasicOperation.getConnection(); + ResultSet rs = BasicOperation.getQueryResult(con, queryScript); + return rs; + } /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * 这个函数能根据cookie中的信息取得用户的id,如果当前用户的登录信息依然有效的话 * - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 + * @param cookie 用户的关键登录信息 + * @return 用户的id + * @throws SQLException 查询语句执行错误时抛出此异常 */ public static int getUidbyCookie(String cookie) throws SQLException { Connection con = BasicOperation.getConnection(); @@ -111,12 +159,12 @@ public class AdvancedOperation { } /** - * ܸcookieеϢȡûidǰûĵ¼ϢȻЧĻ + * 这个函数能根据cookie中的信息取得用户的id,如果当前用户的登录信息依然有效的话 * - * @param con ݿ - * @param cookie ûĹؼ¼Ϣ - * @return ûid - * @throws SQLException ѯִдʱ׳쳣 + * @param con 数据库连接 + * @param cookie 用户的关键登录信息 + * @return 用户的id + * @throws SQLException 查询语句执行错误时抛出此异常 */ public static int getUidbyCookie(Connection con, String cookie) throws SQLException { cookie = "'" + cookie + "'"; @@ -130,11 +178,11 @@ public class AdvancedOperation { } /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * 这个函数的作用是根据用户的信息获取在数据库中记录的最近一条Cookie,信息可以是邮箱号或手机号,函数可以自动做出判断 * - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 + * @param information 基本信息,可以是手机号或邮箱 + * @return 用户的最近一条(recent)Cookie + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static String getUserCookie(String information) throws SQLException { int isEmail = information.indexOf("@"); @@ -155,12 +203,12 @@ public class AdvancedOperation { } /** - * ǸûϢȡݿм¼һCookieϢŻֻţԶж + * 这个函数的作用是根据用户的信息获取在数据库中记录的最近一条Cookie,信息可以是邮箱号或手机号,函数可以自动做出判断 * - * @param con ݿ - * @param information ϢֻŻ - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 + * @param con 数据库连接 + * @param information 基本信息,可以是手机号或邮箱 + * @return 用户的最近一条(recent)Cookie + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static String getUserCookie(Connection con, String information) throws SQLException { int isEmail = information.indexOf("@"); @@ -179,11 +227,11 @@ public class AdvancedOperation { } /** - * ǸûIDݿм¼һCookie + * 这个函数的作用是根据用户的ID在数据库中记录的最近一条Cookie * - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 + * @param uid 用户的ID + * @return 用户的最近一条(recent)Cookie + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static String getUserCookie(int uid) throws SQLException { Connection con = BasicOperation.getConnection(); @@ -197,12 +245,12 @@ public class AdvancedOperation { } /** - * ǸûIDݿм¼һCookie + * 这个函数的作用是根据用户的ID在数据库中记录的最近一条Cookie * - * @param con ݿ - * @param uid ûID - * @return ûһ(recent)Cookie - * @throws SQLException ݿѯִдʱ׳쳣 + * @param con 数据库连接 + * @param uid 用户的ID + * @return 用户的最近一条(recent)Cookie + * @throws SQLException 数据库查询语句执行错误时会抛出此异常 */ public static String getUserCookie(Connection con, int uid) throws SQLException { String queryScript = "select recentCookie from User where uid = " + uid; @@ -214,15 +262,15 @@ public class AdvancedOperation { } /** - * Ϊϵͳעû + * 这个函数的作用是为系统注册新用户 * - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ ˵עߵ-ע = 1 - * ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 + * @param Email 用户的电子邮箱 + * @param phoneNumber 用户的手机号 + * @param registrantIdentity 注册者的身份,实际使用时请通过其他函数提供,不要填为定值 + * @param registeredIdentity 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份-注册者身份 = 1 + * 的时候注册行为被认为是合法的 + * @return update语句自带的的返回值 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static int registerNewUser(String Email, String phoneNumber, int registrantIdentity, int registeredIdentity) throws SQLException { @@ -246,16 +294,16 @@ public class AdvancedOperation { } /** - * Ϊϵͳעû + * 这个函数的作用是为系统注册新用户 * - * @param con ݿ - * @param Email ûĵ - * @param phoneNumber ûֻ - * @param registrantIdentity עߵݣʵʹʱͨṩҪΪֵ - * @param registeredIdentity עߵݣʵʹʱΪֵ ˵עߵ-ע = 1 - * ʱעΪΪǺϷ - * @return updateԴĵķֵ - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库连接 + * @param Email 用户的电子邮箱 + * @param phoneNumber 用户的手机号 + * @param registrantIdentity 注册者的身份,实际使用时请通过其他函数提供,不要填为定值 + * @param registeredIdentity 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份-注册者身份 = 1 + * 的时候注册行为被认为是合法的 + * @return update语句自带的的返回值 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static int registerNewUser(Connection con, String Email, String phoneNumber, int registrantIdentity, int registeredIdentity) throws SQLException { @@ -277,11 +325,11 @@ public class AdvancedOperation { } /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * 这个函数用来校验用户的信息(邮箱或手机号)和密码是否正确输入,如果输入正确,函数会更新并返回用户的登录信息(cookie),否则返回空 * - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 + * @param information 用户的信息 + * @param password 用户的密码 + * @throws SQLException 查询语句或更新语句执行异常时会抛出此异常 */ public static String getLoginInfo(String information, String password) throws SQLException { String type = "phoneNumber"; @@ -304,12 +352,12 @@ public class AdvancedOperation { } /** - * УûϢ(ֻ)Ƿȷ룬ȷ²ûĵ¼Ϣ(cookie)򷵻ؿַ + * 这个函数用来校验用户的信息(邮箱或手机号)和密码是否正确输入,如果输入正确,函数会更新并返回用户的登录信息(cookie),否则返回空字符串 * - * @param con ݿ - * @param information ûϢ - * @param password û - * @throws SQLException ѯִ쳣ʱ׳쳣 + * @param con 数据库连接 + * @param information 用户的信息 + * @param password 用户的密码 + * @throws SQLException 查询语句或更新语句执行异常时会抛出此异常 */ public static String getLoginInfo(Connection con, String information, String password) throws SQLException { String type = "phoneNumber"; @@ -328,24 +376,24 @@ public class AdvancedOperation { return null; } -// ºл +// 以下函数的作者是谢逸 /** - * Ǹݻȡ鼮ϢݿISBNbookIDûʱҪѡһַʽңĬΪʱжؼԿոָ - * ע˺ؽΪҪṩݿ + * 这个函数的作用是根据输入内容获取书籍的信息,输入内容可以是书名、ISBN、bookID,用户在输入时需要用下拉框选择按哪一种方式查找(默认为书名),输入书名时若有多个关键词需以空格分割 + * 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param inputValue - * @param condition ҷʽ - * @return Book - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param inputValue 搜索框输入内容 + * @param condition 查找方式 + * @return Book结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static ResultSet getBookInfo(Connection con, String inputValue, String condition) throws SQLException { - if (condition.equals("bid")) { // 鱾IDвѯ + if (condition.equals("bookID")) { // 根据书本ID进行查询 ResultSet rs = BasicOperation.getQueryResult(con, - "select * from Book where bid ='" + inputValue - + "'"); + "select * from Book where bid = (select bid from SpecificBook where bookID = '" + inputValue + + "')"); return rs; - } else { // 鱾ISBNвѯʵģѯ + } else { // 根据书本ISBN、书名进行查询,可实现书名的模糊化查询 inputValue.replaceAll(" ", "%"); ResultSet rs = BasicOperation.getQueryResult(con, "select * from Book where " + condition + " like " + "'%" + inputValue + "%'"); @@ -354,107 +402,102 @@ public class AdvancedOperation { } /** - * ǸݻȡһϢݿbid,bookID,statusûʱҪѡһַʽңĬΪʱжؼԿոָ - * ע˺ؽΪҪṩݿ + * 这个函数的作用是根据输入内容获取书籍的信息,输入内容可以是书名、ISBN、bookID,用户在输入时需要用下拉框选择按哪一种方式查找(默认为书名),输入书名时若有多个关键词需以空格分割 + * 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param inputValue - * @param condition ҷʽ - * @return - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param inputValue 搜索框输入内容 + * @param condition 查找方式 + * @return Book结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static ResultSet getSpecificBookInfo(Connection con, String inputValue, String condition) throws SQLException { - if (condition.equals("bookID")) { // 鱾IDвѯ + if (condition.equals("bookID")) { // 根据书本ID进行查询 ResultSet rs = BasicOperation.getQueryResult(con, "select * from SpecificBook where bookID = '" + inputValue + "'"); return rs; } - if (condition.equals("bid")) { // вѯ + if (condition.equals("bid")) { // 根据书类进行查询 ResultSet rs = BasicOperation.getQueryResult(con, "select * from SpecificBook where bid = '" + inputValue + "'"); return rs; } - else{ //ʵָ״̬ģѯ + else{ //可实现副本状态模糊化查询 inputValue.replaceAll(" ", "%"); ResultSet rs = BasicOperation.getQueryResult(con, - "select * from SpecificBook where " + condition + " like '%" + inputValue + "%'"); + "select * from SpecificBook where " + condition + " like " + "'%" + inputValue + "%'"); return rs; } } + /** - * ǸݻȡһϢݿbid,bookID,statusûʱҪѡһַʽңĬΪʱжؼԿոָ - * ע˺ؽΪҪṩݿ + * 这个函数的作用是Reader/Librarian查询借阅/归还记录 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param inputValue - * @param condition ҷʽ - * @return - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param userID 查询者的uid condition判断借阅/归还 + * @param condition 设定查询借阅/归还 + * @return BorrowList 结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ - public static ResultSet getReaderInfo(Connection con, String inputValue, String condition) throws SQLException { - if (condition.equals("uid")) { // ݶIDвѯ - ResultSet rs = BasicOperation.getQueryResult(con, - "select * from User where uid = '" + inputValue - + "' and identity = 3"); - return rs; - } - if (condition.equals("Email")) { // Emailвѯ - inputValue.replaceAll(" ", "%"); + public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { + int userIdentity = getIdentity(con, userID); + if (userIdentity == 2) { // identity=2,Librarian可执行操作,查询所有Reader的借阅/归还,condition判断借阅/归还 ResultSet rs = BasicOperation.getQueryResult(con, - "select * from User where Email like '%" + inputValue + "%' and identity = 3"); - return rs; + "select * from BorrowList where status like '%" + condition + "%'"); + if (rs.next()) { + return rs; + } } - else{ //phoneNumberвѯ - inputValue.replaceAll(" ", "%"); + if (userIdentity == 3) { // identity=3,Reader可执行操作,查询自己的借阅/归还,condition判断查找借阅/归还 ResultSet rs = BasicOperation.getQueryResult(con, - "select * from User where phoneNumber like '%" + inputValue + "%' and identity = 3"); - return rs; + "select * from BorrowList where uid = " + userID + "and status like '%" + condition + "%'"); + if (rs.next()) { + return rs; + } } + return null; } - + /** - * Reader/Librarianѯ/黹¼ ע˺ؽΪҪṩݿ + * 这个函数的作用是Reader/Librarian查询借阅/归还记录 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param userID ѯߵuid conditionжϽ/黹 - * @param condition 趨ѯ/黹 - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param userID 查询者的uid condition判断借阅/归还 + * @param condition 设定查询借阅/归还 + * @return BorrowList 结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ - public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition) throws SQLException { + public static ResultSet viewBorrowReturnHistoryReader(Connection con, int userID, String condition) throws SQLException { int userIdentity = getIdentity(con, userID); - if (userIdentity == 2) { // identity=2LibrarianִвѯReaderĽ/黹conditionжϽ/黹 + if (userIdentity == 2) { // identity=2,Librarian可执行操作,查询所有Reader的借阅/归还,condition判断借阅/归还 ResultSet rs = BasicOperation.getQueryResult(con, "select * from BorrowList where status like '%" + condition + "%'"); - if (rs.next()) { return rs; - } } - if (userIdentity == 3) { // identity=3ReaderִвѯԼĽ/黹conditionжϲҽ/黹 + System.out.println("select * from BorrowList where uid = " + userID + " and status like '%" + condition + "%'"); + if (userIdentity == 3) { // identity=3,Reader可执行操作,查询自己的借阅/归还,condition判断查找借阅/归还 ResultSet rs = BasicOperation.getQueryResult(con, - "select * from BorrowList where uid = " + userID + "and status like '%" + condition + "%'"); - if (rs.next()) { + "select * from BorrowList where uid = " + userID + " and status like '%" + condition + "%'"); return rs; - } } return null; } /** - * أLibrarianѯָreaderIDĽ/黹 ע˺ؽΪҪṩݿ + * 函数重载,用于Librarian查询指定readerID的借阅/归还的情况 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param userID ѯߵuid - * @param condition 趨ѯ/黹 - * @param readerID LibrarianָIJѯ - * @return BorrowList - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param userID 查询者的uid + * @param condition 设定查询借阅/归还 + * @param readerID Librarian指定的查询对象 + * @return BorrowList 结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static ResultSet viewBorrowReturnHistory(Connection con, int userID, String condition, int readerID) throws SQLException { - if (getIdentity(con, userID) == 2) { // identity=2LibrarianִвѯָReaderĽ/黹 + if (getIdentity(con, userID) == 2) { // identity=2,Librarian可执行操作,查询指定Reader的借阅/归还 ResultSet rs = BasicOperation.getQueryResult(con, "select * from BorrowList where uid = " + readerID + "and status like '%" + condition + "%'"); if (rs.next()) { @@ -465,22 +508,22 @@ public class AdvancedOperation { } /** - * ˺Librarian/Readerѯ¼ ע˺ؽΪҪṩݿ + * 此函数用于Librarian/Reader查询罚金记录 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param userID жû - * @return FineList - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param userID 判断用户身份 + * @return FineList结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static ResultSet viewFineHistory(Connection con, int userID) throws SQLException { int userIdentity = getIdentity(con, userID); - if (userIdentity == 2) { // identity=2,Librarianִв,ѯReaderFineHistory + if (userIdentity == 2) { // identity=2,Librarian可执行操作,查询所有Reader的FineHistory ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList"); if (rs.next()) { return rs; } } - if (userIdentity == 3) { // identity=3,Readerִв,ѯԼFineHistory + if (userIdentity == 3) { // identity=3,Reader可执行操作,查询自己的FineHistory ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList where uid = " + userID); if (rs.next()) { return rs; @@ -490,15 +533,15 @@ public class AdvancedOperation { } /** - * أLibrarianѯָReaderķ¼ ע˺ؽΪҪṩݿ + * 函数重载,用于Librarian查询指定Reader的罚金记录 注:此函数返回结果为结果集,需要调用者提供连接数据库的链接 * - * @param con ݿ - * @param userID readerIDLibrarianָIJѯ - * @return FineList - * @throws SQLException ִдʱ׳쳣 + * @param con 数据库链接 + * @param userID readerID是Librarian指定的查询对象 + * @return FineList结果集 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ public static ResultSet viewFineHistory(Connection con, int userID, int readerID) throws SQLException { - if (getIdentity(con, userID) == 2) { // identity=2,Librarianִв,ѯָReaderFineHistory + if (getIdentity(con, userID) == 2) { // identity=2,Librarian可执行操作,查询指定Reader的FineHistory ResultSet rs = BasicOperation.getQueryResult(con, "select * from FineList where uid =" + readerID); if (rs.next()) { return rs; @@ -507,18 +550,67 @@ public class AdvancedOperation { return null; } -// ºǺ +// 以下函数的作者是胡兰氪 /** - * ǸbidΪϵͳ + * 这个函数的作用是根据ISBN为系统添加新书 * - * @param con ݿ - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param bid id - * @param num + * @param con 数据库连接 + * @param uid 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份!= 2 的时候增书行为被认为是非法的 + * @param ISBN 书的类号 + * @param num 增书数量 * @return void - * @throws SQLException ִдʱ׳쳣 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ - public static void addBooksbybid(Connection con, int uid, int bid, int num) throws SQLException { + public static void addBooksbyISBN(Connection con, int uid, String ISBN, int num) throws SQLException { + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String sql = "select bid from Book where ISBN = '" + ISBN + "')"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + String bid = null; + if (res.next()) { + bid = res.getString("bid"); + addBooksBybid(con, uid, bid, num); + } + return; + } + + /** + * 这个函数的作用是根据ISBN为系统添加新书 + * + * @param uid 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份!= 2 的时候增书行为被认为是非法的 + * @param ISBN 书的类号 + * @param num 增书数量 + * @return void + * @throws SQLException 插入语句执行错误时会抛出此异常 + */ + public static void addBooksbyISBN(int uid, String ISBN, int num) throws SQLException { + int identity = getIdentity(uid); + if (identity != 2) + return; + Connection con = BasicOperation.getConnection(); + String sql = "select bid from Book where ISBN = '" + ISBN + "'"; + ResultSet res = BasicOperation.getQueryResult(con, sql); + String bid = null; + if (res.next()) { + bid = res.getString("bid"); + addBooksBybid(con, uid, bid, num); + } + con.close(); + return; + } + + /** + * 这个函数的作用是根据bid为系统添加新书 + * + * @param con 数据库连接 + * @param uid 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份!= 2 的时候增书行为被认为是非法的 + * @param bid 书的id + * @param num 增书数量 + * @return void + * @throws SQLException 插入语句执行错误时会抛出此异常 + */ + public static void addBooksBybid(Connection con, int uid, String bid, int num) throws SQLException { int identity = getIdentity(con, uid); String bookid = null; if (identity != 2) @@ -526,8 +618,8 @@ public class AdvancedOperation { while (num-- > 0) { bookid = bid + System.currentTimeMillis() + Integer.toString(num); bookid = "MD5('" + bookid + "')"; - String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,'available'," + bid - + ")"; + String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,NULL,'" + bid + + "')"; BasicOperation.executeUpdateScript(con, sql); } con.close(); @@ -535,15 +627,15 @@ public class AdvancedOperation { } /** - * ǸbidΪϵͳ + * 这个函数的作用是根据bid为系统添加新书 * - * @param uid עߵݣʵʹʱΪֵ ˵עߵ!= 2 ʱΪΪǷǷ - * @param bid id - * @param num + * @param uid 被注册者的身份,实际使用时可以填为定值 说明:当被注册者的身份!= 2 的时候增书行为被认为是非法的 + * @param bid 书的id + * @param num 增书数量 * @return void - * @throws SQLException ִдʱ׳쳣 + * @throws SQLException 插入语句执行错误时会抛出此异常 */ - public static void addBooksbybid(int uid, int bid, int num) throws SQLException { + public static void addBooksBybid(int uid, String bid, int num) throws SQLException { int identity = getIdentity(uid); String bookid = null; if (identity != 2) @@ -552,25 +644,59 @@ public class AdvancedOperation { while (num-- > 0) { bookid = bid + System.currentTimeMillis() + Integer.toString(num); bookid = "MD5('" + bookid + "')"; - String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,'available'," + bid - + ")"; + String sql = "insert into SpecificBook(bookID,position,status,bid) values(" + bookid + ",NULL,NULL,'" + bid + + "')"; BasicOperation.executeUpdateScript(con, sql); } con.close(); return; } + /** + * 这个函数的作用是设置书的位置信息 + * + * @param uid 被注册者的身份,实际使用时不要填为定值 说明:当被注册者的身份!= 2 的时候设置新书的信息被认为是非法的 + * @param booid 书的id + * @param position 书的位置信息 + * @return void + * @throws SQLException 插入语句执行错误时会抛出此异常 + */ + public static void setBookposition(int uid, String bookid, String position) throws SQLException { + int identity = getIdentity(uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(updateScript); + } + + /** + * 这个函数的作用是设置书的位置信息 + * + * @param con 数据库连接 + * @param uid 被注册者的身份,实际使用时不要填为定值 说明:当被注册者的身份!= 2 的时候设置新书的信息被认为是非法的 + * @param booid 书的id + * @param position 书的位置信息 + * @return void + * @throws SQLException 插入语句执行错误时会抛出此异常 + */ + public static void setBookposition(Connection con, int uid, String bookid, String position) throws SQLException { + int identity = getIdentity(con, uid); + if (identity != 2) + return; + String updateScript = "update SpecificBook set position= '" + position + "' where bookID = '" + bookid + "'"; + BasicOperation.executeUpdateScript(con, updateScript); + } -//ºǼ +//以下函数的作者是贾泽坤 /** - * û޸ĸϢ + * 这个函数的作用是用户修改个人信息 * - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 + * @param newEmail 被修改读者的电子邮箱 + * @param newPhoneNumber 被修改读者的手机号 + * @param updaterUid 修改者的UID,实际使用时请通过其他函数提供,不要填为定值 + * @param updatedUid 被修改用户的UID,实际使用时请通过修改者选择的读者UID提供,不要填为定值 + * @return update语句自带的的返回值 + * @throws SQLException SQL语句执行错误时会抛出此异常 */ public static int updateUserInfo(String newEmail, String newPhoneNumber, int updaterUid, int updatedUid) throws SQLException { @@ -599,22 +725,22 @@ public class AdvancedOperation { + " where uid = " + updatedUid; return BasicOperation.executeUpdateScript(updateScript); } else if (identity == 1) { - System.out.println("Աֹ޸ĶϢ"); + System.out.println("超级管理员禁止修改读者信息!"); return -1; } return -1; } /** - * û޸ĸϢ + * 这个函数的作用是用户修改个人信息 * - * @param con ݿ - * @param newEmail ޸Ķߵĵ - * @param newPhoneNumber ޸Ķߵֻ - * @param updaterUid ޸ߵUIDʵʹʱͨṩҪΪֵ - * @param updatedUid ޸ûUIDʵʹʱͨ޸ѡĶUIDṩҪΪֵ - * @return updateԴĵķֵ - * @throws SQLException SQLִдʱ׳쳣 + * @param con 数据库连接 + * @param newEmail 被修改读者的电子邮箱 + * @param newPhoneNumber 被修改读者的手机号 + * @param updaterUid 修改者的UID,实际使用时请通过其他函数提供,不要填为定值 + * @param updatedUid 被修改用户的UID,实际使用时请通过修改者选择的读者UID提供,不要填为定值 + * @return update语句自带的的返回值 + * @throws SQLException SQL语句执行错误时会抛出此异常 */ public static int updateUserInfo(Connection con, String newEmail, String newPhoneNumber, int updaterUid, int updatedUid) throws SQLException { @@ -642,19 +768,19 @@ public class AdvancedOperation { + " where uid = " + updatedUid; return BasicOperation.executeUpdateScript(con, updateScript); } else if (identity == 1) { - System.out.println("Աֹ޸ĶϢ"); + System.out.println("超级管理员禁止修改读者信息!"); return -1; } return -1; } /** - * ޸û + * 这个函数的作用是修改用户密码 * - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ + * @param changerUid 这是修改者的UID + * @param changedUid 这是被修改者的UID + * @param newPassword 这是修改后的密码 + * @return update 语句自带的返回值 * @throws SQLException */ public static int changePassword(int changerUid, int changedUid, String newPassword) throws SQLException { @@ -662,7 +788,7 @@ public class AdvancedOperation { int changedIdentity = getIdentity(changedUid); if (changedIdentity - changerIdentity >= 0) { if (newPassword == null) { - System.out.println("޸ĺ룡"); + System.out.println("请输入修改后的密码!"); return -1; } if (changedIdentity == changerIdentity) @@ -675,13 +801,13 @@ public class AdvancedOperation { } /** - * ޸û + * 这个函数的作用是修改用户密码 * - * @param con ݿ - * @param changerUid ޸ߵUID - * @param changedUid DZ޸ߵUID - * @param newPassword ޸ĺ - * @return update Դķֵ + * @param con 数据库连接 + * @param changerUid 这是修改者的UID + * @param changedUid 这是被修改者的UID + * @param newPassword 这是修改后的密码 + * @return update 语句自带的返回值 * @throws SQLException */ public static int changePassword(Connection con, int changerUid, int changedUid, String newPassword) @@ -690,7 +816,7 @@ public class AdvancedOperation { int changedIdentity = getIdentity(con, changedUid); if (changedIdentity - changerIdentity >= 0) { if (newPassword == null) { - System.out.println("޸ĺ룡"); + System.out.println("请输入修改后的密码!"); return -1; } if (changedIdentity == changerIdentity) @@ -703,18 +829,18 @@ public class AdvancedOperation { } /** - * ޸ɽ𣨷 + * 这个函数的作用是修改滞纳金(罚金) * - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ + * @param updaterUid 这是修改者的UID + * @param fineValue 这是修改后罚金的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateFineValue(int updaterUid, double fineValue) throws SQLException { int identity = getIdentity(updaterUid); if (identity == 1) { if (fineValue < 0) { - System.out.println("𲻵Ϊ"); + System.out.println("罚金不得为负!"); return -1; } else if (fineValue > 0) { String updateScript = "update SystemAttribute set bookFineValue =" + fineValue; @@ -726,19 +852,19 @@ public class AdvancedOperation { } /** - * ޸ɽ𣨷 + * 这个函数的作用是修改滞纳金(罚金) * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param fineValue ޸ĺ󷣽ֵ - * @return update Դķֵ + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param fineValue 这是修改后罚金的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateFineValue(Connection con, int updaterUid, double fineValue) throws SQLException { int identity = getIdentity(con, updaterUid); if (identity == 1) { if (fineValue < 0) { - System.out.println("𲻵Ϊ"); + System.out.println("罚金不得为负!"); return -1; } else if (fineValue > 0) { String updateScript = "update SystemAttribute set bookFineValue =" + fineValue; @@ -750,9 +876,9 @@ public class AdvancedOperation { } /** - * ǻȡǰֵ + * 这个函数的作用是获取当前罚金值 * - * @return fineValue ǰֵ + * @return fineValue 当前罚金值 * @throws SQLException */ public static double getFineValue() throws SQLException { @@ -770,10 +896,10 @@ public class AdvancedOperation { } /** - * ǻȡǰֵ + * 这个函数的作用是获取当前罚金值 * - * @param con ݿ - * @return fineValue ǰֵ + * @param con 数据库连接 + * @return fineValue 当前罚金值 * @throws SQLException */ public static double getFineValue(Connection con) throws SQLException { @@ -789,18 +915,18 @@ public class AdvancedOperation { } /** - * ޸Ĺ黹 + * 这个函数的作用是修改归还期 * - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ + * @param updaterUid 这是修改者的UID + * @param returnPeriod 这是修改后归还期的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateReturnPeriod(int updaterUid, int returnPeriod) throws SQLException { int identity = getIdentity(updaterUid); if (identity == 1) { if (returnPeriod <= 0) { - System.out.println("黹ڱΪ"); + System.out.println("归还期必须为正(天数)!"); return -1; } else { String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod; @@ -810,20 +936,21 @@ public class AdvancedOperation { return -1; } + /** - * ޸Ĺ黹 + * 这个函数的作用是修改归还期 * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param returnPeriod ޸ĺ黹ڵֵ - * @return update Դķֵ + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param returnPeriod 这是修改后归还期的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateReturnPeriod(Connection con, int updaterUid, int returnPeriod) throws SQLException { int identity = getIdentity(con, updaterUid); if (identity == 1) { if (returnPeriod <= 0) { - System.out.println("黹ڱΪ"); + System.out.println("归还期必须为正(天数)!"); return -1; } else { String updateScript = "update SystemAttribute set bookReturnPeriod =" + returnPeriod; @@ -834,9 +961,9 @@ public class AdvancedOperation { } /** - * ǻȡǰ黹 + * 这个函数的作用是获取当前归还期 * - * @return returnPeriod ǰ黹 + * @return returnPeriod 当前归还期 * @throws SQLException */ public static int getReturnPeriod() throws SQLException { @@ -854,10 +981,10 @@ public class AdvancedOperation { } /** - * ǻȡǰ黹 + * 这个函数的作用是获取当前归还期 * - * @param con ݿ - * @return returnPeriod ǰ黹 + * @param con 数据库连接 + * @return returnPeriod 当前归还期 * @throws SQLException */ public static int getReturnPeriod(Connection con) throws SQLException { @@ -873,18 +1000,18 @@ public class AdvancedOperation { } /** - * ޸ı֤ + * 这个函数的作用是修改保证金 * - * @param updaterUid ޸ߵUID - * @param securityDesposit ޸ĺֵ֤ - * @return update Դķֵ + * @param updaterUid 这是修改者的UID + * @param securityDesposit 这是修改后保证金的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateSecurityDesposit(int updaterUid, double securityDesposit) throws SQLException { int identity = getIdentity(updaterUid); if (identity == 1) { if (securityDesposit < 0) { - System.out.println("֤Ϊ"); + System.out.println("保证金必须为正数!"); return -1; } else { String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit; @@ -895,12 +1022,12 @@ public class AdvancedOperation { } /** - * ޸ı֤ + * 这个函数的作用是修改保证金 * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param securityDesposit ޸ĺֵ֤ - * @return update Դķֵ + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param securityDesposit 这是修改后保证金的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateSecurityDesposit(Connection con, int updaterUid, double securityDesposit) @@ -908,7 +1035,7 @@ public class AdvancedOperation { int identity = getIdentity(con, updaterUid); if (identity == 1) { if (securityDesposit < 0) { - System.out.println("֤Ϊ"); + System.out.println("保证金必须为正数!"); return -1; } else { String updateScript = "update SystemAttribute set bookSecurityDesposit =" + securityDesposit; @@ -919,9 +1046,9 @@ public class AdvancedOperation { } /** - * ǻȡǰ֤ + * 这个函数的作用是获取当前保证金 * - * @return securityDesposit ǰ֤ + * @return securityDesposit 当前保证金 * @throws SQLException */ public static double getSecurityDesposit() throws SQLException { @@ -939,10 +1066,10 @@ public class AdvancedOperation { } /** - * ǻȡǰ֤ + * 这个函数的作用是获取当前保证金 * - * @param con ݿ - * @return securityDesposit ǰ֤ + * @param con 数据库连接 + * @return securityDesposit 当前保证金 * @throws SQLException */ public static double getSecurityDesposit(Connection con) throws SQLException { @@ -958,18 +1085,18 @@ public class AdvancedOperation { } /** - * ޸ԤԼ + * 这个函数的作用是修改预约保持期 * - * @param updaterUid ޸ߵUID - * @param reserveMaintainingHour ޸ĺԤԼڵֵ - * @return update Դķֵ + * @param updaterUid 这是修改者的UID + * @param reserveMaintainingHour 这是修改后预约保持期的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateReserveMaintainingHours(int updaterUid, int reserveMaintainingHours) throws SQLException { int identity = getIdentity(updaterUid); if (identity == 1) { if (reserveMaintainingHours < 0) { - System.out.println("ԤԼڱΪ"); + System.out.println("预约保持期必须为正数!"); return -1; } else { String updateScript = "update SystemAttribute set reserveMaintainingHours =" + reserveMaintainingHours; @@ -980,12 +1107,12 @@ public class AdvancedOperation { } /** - * ޸ԤԼ + * 这个函数的作用是修改预约保持期 * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param reserveMaintainingHour ޸ĺԤԼڵֵ - * @return update Դķֵ + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param reserveMaintainingHour 这是修改后预约保持期的值 + * @return update 语句自带的返回值 * @throws SQLException */ public static int updateReserveMaintainingHour(Connection con, int updaterUid, int reserveMaintainingHours) @@ -993,7 +1120,7 @@ public class AdvancedOperation { int identity = getIdentity(con, updaterUid); if (identity == 1) { if (reserveMaintainingHours < 0) { - System.out.println("ԤԼڱΪ"); + System.out.println("预约保持期必须为正数!"); return -1; } else { String updateScript = "update SystemAttribute set reserveMaintainingHours =" + reserveMaintainingHours; @@ -1004,9 +1131,9 @@ public class AdvancedOperation { } /** - * ǻȡǰԤԼ + * 这个函数的作用是获取当前预约保持期 * - * @return reserveMaintainingHour ǰԤԼ + * @return reserveMaintainingHour 当前预约保持期 * @throws SQLException */ public static int getReserveMaintainingHours() throws SQLException { @@ -1024,10 +1151,10 @@ public class AdvancedOperation { } /** - * ǻȡǰԤԼ + * 这个函数的作用是获取当前预约保持期 * - * @param con ݿ - * @return reserveMaintainingHour ǰԤԼ + * @param con 数据库连接 + * @return reserveMaintainingHour 当前预约保持期 * @throws SQLException */ public static int getReserveMaintainingHours(Connection con) throws SQLException { @@ -1043,15 +1170,15 @@ public class AdvancedOperation { } /** - * Ǹbid༭ͼϢ(ߡ硢۸)Ҫھ - * - * @param updaterUid ޸ߵUID - * @param bookID DZ޸ĵͼbid - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ + * 这个函数的作用是根据bid单独编辑图书信息(书名、作者、出版社、价格),主要用于旧书 + * + * @param updaterUid 这是修改者的UID + * @param bookID 这是被修改的图书的bid + * @param newName 这是被修改的图书的新名字 + * @param newAuthor 这是被修改图书的新作者 + * @param newPublisher 这是被修改图书的新出版社 + * @param newPrice 这是被修改图书的新价格 + * @return update语句自带的返回值 * @throws SQLException */ public static int updateBookInfoByBid(int updaterUid, int bookID, String newName, String newAuthor, @@ -1095,16 +1222,16 @@ public class AdvancedOperation { } /** - * Ǹbid༭ͼϢ(ߡ硢۸)Ҫھ - * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param bookID DZ޸ĵͼbid - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ + * 这个函数的作用是根据bid单独编辑图书信息(书名、作者、出版社、价格),主要用于旧书 + * + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param bookID 这是被修改的图书的bid + * @param newName 这是被修改的图书的新名字 + * @param newAuthor 这是被修改图书的新作者 + * @param newPublisher 这是被修改图书的新出版社 + * @param newPrice 这是被修改图书的新价格 + * @return update语句自带的返回值 * @throws SQLException */ public static int updateBookInfoByBid(Connection con, int updaterUid, int bookID, String newName, String newAuthor, @@ -1146,15 +1273,15 @@ public class AdvancedOperation { } /** - * DZ༭ͬISBNͼϢ(ߡ硢۸) - * - * @param updaterUid ޸ߵUID - * @param bookISBN DZ޸ĵͼISBN - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ + * 这个函数的作用是编辑相同ISBN的图书信息(书名、作者、出版社、价格),用于新书 + * + * @param updaterUid 这是修改者的UID + * @param bookISBN 这是被修改的图书的ISBN + * @param newName 这是被修改的图书的新名字 + * @param newAuthor 这是被修改图书的新作者 + * @param newPublisher 这是被修改图书的新出版社 + * @param newPrice 这是被修改图书的新价格 + * @return update语句自带的返回值 * @throws SQLException */ public static int updateBookInfoByISBN(int updaterUid, String ISBN, String newName, String newAuthor, @@ -1199,16 +1326,16 @@ public class AdvancedOperation { } /** - * DZ༭ISBNͬͼϢ(ߡ硢۸)Ҫ - * - * @param con ݿ - * @param updaterUid ޸ߵUID - * @param bookID DZ޸ĵͼbid - * @param newName DZ޸ĵͼ - * @param newAuthor DZ޸ͼ - * @param newPublisher DZ޸ͼ³ - * @param newPrice DZ޸ͼ¼۸ - * @return updateԴķֵ + * 这个函数的作用是编辑ISBN相同的图书信息(书名、作者、出版社、价格),主要用于新书 + * + * @param con 数据库连接 + * @param updaterUid 这是修改者的UID + * @param bookID 这是被修改的图书的bid + * @param newName 这是被修改的图书的新名字 + * @param newAuthor 这是被修改图书的新作者 + * @param newPublisher 这是被修改图书的新出版社 + * @param newPrice 这是被修改图书的新价格 + * @return update语句自带的返回值 * @throws SQLException */ public static int updateBookInfoByISBN(Connection con, int updaterUid, String ISBN, String newName, @@ -1251,12 +1378,12 @@ public class AdvancedOperation { } /** - * ɾͼָbookidͼ + * 这个函数的作用是删除图书库里指定bookid的图书 * - * @param librarianUid ɾͼͼԱuid - * @param bookID ɾͼbookid - * @param reason ɾԭ - * @return sqlĬֵ + * @param librarianUid 删除图书的图书管理员的uid + * @param bookID 被删除图书的bookid + * @param reason 删除原因 + * @return sql语句默认值 * @throws SQLException */ public static int getBookDeleted(int librarianUid, String bookID, String reason) throws SQLException { @@ -1267,6 +1394,8 @@ public class AdvancedOperation { int bid = 0; bookID = "'" + bookID + "'"; reason = "'" + reason + "'"; + Date date = new Date(); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); ResultSet rs; String queryScript = "select bid from SpecificBook where bookID = " + bookID; rs = BasicOperation.getQueryResult(con, queryScript); @@ -1282,18 +1411,18 @@ public class AdvancedOperation { BasicOperation.executeUpdateScript(con, queryScript); con.close(); queryScript = "insert into DeleteList (uid, bid, bookID, date ,reason) values(" + librarianUid + "," + bid + "," - + bookID + ",'" + dataOperator.BasicOperation.getDateWithTimeInString() + "'," + reason + ")"; + + bookID + ",'" + dateFormat.format(date) + "'," + reason + ")"; return BasicOperation.executeUpdateScript(queryScript); } /** - * ɾͼָbookidͼ + * 这个函数的作用是删除图书库里指定bookid的图书 * - * @param con ݿ - * @param librarianUid ɾͼͼԱuid - * @param bookID ɾͼbookid - * @param reason ɾԭ - * @return sqlĬֵ + * @param con 数据库连接 + * @param librarianUid 删除图书的图书管理员的uid + * @param bookID 被删除图书的bookid + * @param reason 删除原因 + * @return sql语句默认值 * @throws SQLException */ public static int getBookDeleted(Connection con, int librarianUid, String bookID, String reason) @@ -1304,6 +1433,8 @@ public class AdvancedOperation { int bid = 0; bookID = "'" + bookID + "'"; reason = "'" + reason + "'"; + Date date = new Date(); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); ResultSet rs; String queryScript = "select bid from SpecificBook where bookID =" + bookID; rs = BasicOperation.getQueryResult(con, queryScript); @@ -1311,143 +1442,51 @@ public class AdvancedOperation { bid = rs.getInt(1); } rs.close(); - if (bid == 0) { + if (bid == 0) return -1; - } queryScript = "delete from SpecificBook where bookID =" + bookID; BasicOperation.executeUpdateScript(con, queryScript); queryScript = "insert into DeleteList (uid, bid, bookID, date ,reason) values(" + librarianUid + "," + bid + "," - + bookID + ",'" +dataOperator.BasicOperation.getDateWithTimeInString() + "'," + reason + ")"; + + bookID + ",'" + dateFormat.format(date) + "'," + reason + ")"; return BasicOperation.executeUpdateScript(con, queryScript); } - /** - * ɾreaderûϢ - * - * @param con ݿ - * @param librarianUid ɾreaderͼԱuid - * @param ReaderUid ɾûuid - * @return sqlĬֵ - * @throws SQLException - */ - public static int getReaderDeleted(Connection con, int librarianUid, int ReaderUid) - throws SQLException { - int identity = getIdentity(con, librarianUid); - if (identity != 2) - return -1; - String sql = "delete from User where uid =" + ReaderUid; - BasicOperation.executeUpdateScript(con, sql); - return 1; - } - /** - * Ǹuidȡemailַ - * @param uid ûuid - * @return ûemailַ - * @throws SQLException - */ - public static String getEmailByUid(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - String queryScript = "select Email from User where uid =" + uid; - String email = null; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - email = rs.getString(1); - rs.close(); - con.close(); - return email; - } - return null; - } - /** - * Ǹuidȡemailַ - * @param con ݿ - * @param uid ûuid - * @return ûemailַ - * @throws SQLException - */ - public static String getEmailByUid(Connection con, int uid) throws SQLException { - String queryScript = "select Email from User where uid =" + uid; - String email = null; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - email = rs.getString(1); - rs.close(); - return email; - } - return null; - } - /** - * Ǹuidȡû绰 - * @param uid ûuid - * @return û绰 - * @throws SQLException - */ - public static String getPhoneNumberByUid(int uid) throws SQLException { - Connection con = BasicOperation.getConnection(); - String queryScript = "select phoneNumber from User where uid =" + uid; - String phoneNumber = null; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - phoneNumber = rs.getString(1); - rs.close(); - con.close(); - return phoneNumber; - } - return null; - } - /** - * Ǹuidȡû绰 - * @param con ݿ - * @param uid ûuid - * @return û绰 - * @throws SQLException - */ - public static String getPhoneNumberByUid(Connection con, int uid) throws SQLException { - String queryScript = "select phoneNumber from User where uid =" + uid; - String phoneNumber = null; - ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - if(rs.next()) { - phoneNumber = rs.getString(1); - rs.close(); - return phoneNumber; - } - return null; - } - // º˼ + // 以下函数的作者是李思哲 + /** - * гöĿ + * 这个函数的作用是列出该读者所借的书目 * - * @param con ݿ - * @param uid ߵuid - * @return ض߽Ŀ + * @param con 数据库链接 + * @param uid 读者的uid + * @return 返回读者借书的书目 * @throws SQLException */ public static ResultSet getReaderBorrowList(Connection con, int uid) throws SQLException { String selectScript = "select * from BorrowList where uid=" + uid; ResultSet rs = BasicOperation.getQueryResult(con, selectScript); - ResultSetMetaData rsmd = rs.getMetaData(); - int columns = rsmd.getColumnCount(); - while (rs.next()) { - for (int i = 1; i <= columns; i++) { - System.out.print(rs.getString(i) + "\t"); - } - System.out.println(); - } - // rsָƻصһеλ - rs.beforeFirst(); - rs.next(); +// ResultSetMetaData rsmd = rs.getMetaData(); +// int columns = rsmd.getColumnCount(); +// while (rs.next()) { +// for (int i = 1; i <= columns; i++) { +// System.out.print(rs.getString(i) + "\t"); +// } +// System.out.println(); +// } + // 将rs的指针重新移回到第一行的位置 +// rs.beforeFirst(); +// rs.next(); return rs; } /** * - * Ǹ½бָ鱾ѾбҴڽ״̬Ϊѹ黹ֹٴν + * 这个函数的作用是更新借书列表,如果指定的书本已经在列表中且存在借出状态,则将其更新为已归还,或禁止再次借出 * * @author kbtx - * @param bookID 鱾bookID - * @param readerUid ߵuid - * @param status б鱾״̬ȡֵֻΪborrowed(ѽ) - * returned(ѹ黹)鱾ѹ黹ʱ״̬Ҫ׷ӹ黹ڣͬʱSpecificBookе鱾״̬ + * @param bookID 书本的bookID + * @param readerUid 读者的uid + * @param status 借书列表中书本的状态,取值只能为borrowed(已借出) + * returned(已归还),当书本已归还时状态内要追加归还日期,同时更新SpecificBook中的书本状态 * @throws SQLException * */ @@ -1460,16 +1499,16 @@ public class AdvancedOperation { if (status.equals("borrowed")) { String queryScript = "select * from BorrowList where bookID = '" + bookID + "' and status = 'borrowed'"; ResultSet rs = BasicOperation.getQueryResult(con, queryScript); - // ܽѾٴν + // 不能将已经借出的书再次借出 if (rs.next()) return -1; String updateScript = "insert into BorrowList values ('" + readerUid + "','" + bookID + "','" - + dataOperator.BasicOperation.getDateWithTimeInString() + "','borrowed')"; + + dataOperator.BasicOperation.getDateInString() + "','borrowed')"; return BasicOperation.executeUpdateScript(con, updateScript); } if (status.equals("returned")) { String updateScript = "update BorrowList set status = 'returned (Date = " - + dataOperator.BasicOperation.getDateWithTimeInString() + ")' where bookID = '" + bookID + + dataOperator.BasicOperation.getDateInString() + ")' where bookID = '" + bookID + "' and uid = " + readerUid; updateBookStatus(con, bookID, librarianUid, readerUid, "available"); return BasicOperation.executeUpdateScript(con, updateScript); @@ -1478,21 +1517,21 @@ public class AdvancedOperation { } /** - * Ǹ¸Ŀ״̬ǸΪ״̬һborrowList + * 这个函数的作用是更新该书目状态,如果是更新为借出状态函数会进一步更新borrowList * - * @param con ݿ - * @param bookID ĿbookID - * @param librarianUid ͼԱuidҪΪֵ - * @param readerUid ߵuidҪΪֵ - * @param status 鱾ǰ״̬ȡֵӦΪ available(ڹ) borrowed(ѽ) + * @param con 数据库链接 + * @param bookID 书目的bookID + * @param librarianUid 图书管理员的uid,不要填为定值 + * @param readerUid 读者的uid,不要填为定值 + * @param status 书本当前状态,取值应该为 available(在馆) borrowed(已借出) * @throws SQLException */ public static int updateBookStatus(Connection con, String bookID, int librarianUid, int readerUid, String status) throws SQLException { - // ֤ + // 身份验证 if ((getIdentity(con, librarianUid) != 2) || getIdentity(con, readerUid) != 3) return -1; - // ַȡֵ + // 字符串取值检查 if (!(status.equals("available") || status.equals("borrowed"))) return -1; String updateScript = "update SpecificBook set status = '" + status + "' where bookID ='" + bookID + "'"; @@ -1504,23 +1543,23 @@ public class AdvancedOperation { } /** - * ṩbiduidԱԤԼ + * 这个函数的作用是提供bid和uid以便预约书 * - * ̣ 1.ѯⱾǷѾԤԼˣǣֹظԤԼ - * 2.ⱾԤԼбʱݵǰʱݿȡõIJ趨״̬Ϊ"reserving" 3.˲SpecificBookκӰ + * 流程: 1.查询这本书是否已经被这个读者预约了,如果是,则禁止重复预约,并返回 + * 2.将这本书加入预约列表,过期时间根据当前时间和数据库取得的参数设定,状态置为"reserving" 3.此操作对SpecificBook无任何影响 * - * @param con ݿ - * @param bid 鱾ID - * @param readerUid ߵuid - * @return ԤԼbookIDṩԤԼܣѾԤԼһûпɹԤԼ飬򷵻ؿַ(ԤԼӦԾһ飬Ҫ) + * @param con 数据库链接 + * @param bid 书本的ID号 + * @param readerUid 读者的uid + * @return 返回预约的bookID提供给预约功能,如果已经预约过一本或者没有可供预约的书,则返回空字符串(预约不应该针对具体的一本书,还要继续改) * @throws SQLException * @throws ParseException */ public static int getBookReserved(Connection con, int bid, int readerUid) throws SQLException, ParseException { - // ֤ + // 身份验证 if (getIdentity(con, readerUid) != 3) return -1; - // ͬһ鲻ܶԤԼ + // 同一本书不能多次预约 getExpiredReserveInvalidate(con, bid); String queryScript = "select * from ReserveList where uid = " + readerUid + " and bid = " + bid + " and status = 'reserving'"; @@ -1538,7 +1577,7 @@ public class AdvancedOperation { } /** - * еǰʱ䳬expireDateReserveList״̬Ϊ"expired" + * 将所有当前时间超过expireDate的ReserveList项的状态置为"expired" * * @return * @throws SQLException @@ -1566,9 +1605,9 @@ public class AdvancedOperation { } /** - * ǽԤԼͼԱ ̣ 1.ж˵Ƿȷȷֱӷ - * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" - * 3.ѯǷСԤԼ"reserving"ԤԼ¼УԱҳһ״̬Ϊ"available"ߣupdateBookStatus(...)״̬Ϊ"borrowed"ͬʱԤԼ¼״̬Ϊ"borrowed" + * 这个函数的作用是将读者预约的书借出,必须由图书管理员调用 流程: 1.判定两人的身份是否正确,如果不正确直接返回 + * 2.调用getExpiredReserveInvalidate(),将过期的预约记录全部置为"expired" + * 3.查询是否有【正在预约"reserving"】的预约记录,如果有,管理员找出一本状态为"available"的书借给读者,调用updateBookStatus(...)将状态置为"borrowed",同时将本预约记录的状态改为"borrowed" * * @param con * @param bid @@ -1603,9 +1642,9 @@ public class AdvancedOperation { } /** - * ֱӽͼԱ ̣ 1.ж˵Ƿȷȷֱӷ - * 2.getExpiredReserveInvalidate()ڵԤԼ¼ȫΪ"expired" - * 3.ѯųԤԼ״̬Ϊ"available"飬УԱҳһߣupdateBookStatus(...)״̬Ϊ"borrowed" + * 这个函数的作用是直接将书借出,必须由图书管理员调用 流程: 1.判定两人的身份是否正确,如果不正确直接返回 + * 2.调用getExpiredReserveInvalidate(),将过期的预约记录全部置为"expired" + * 3.查询排除被预约的状态为"available"书,如果有,管理员找出一本借给读者,调用updateBookStatus(...)将状态置为"borrowed" * * @param con * @param bid @@ -1642,10 +1681,9 @@ public class AdvancedOperation { return true; } /* - * ʹԲݿǷ public static void main(String[] args) throws + * 使用这个主函数可以测试数据库的连接是否正常。 public static void main(String[] args) throws * SQLException { System.out.println(getIdentity(1)); Date date=new Date(); * SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } */ - } diff --git a/src/dbOperator/BasicOperation.java b/src/dbOperator/BasicOperation.java index 591384821379ca7a2a0eee7c3e321d4b498aa147..7265ac0155c37a4c3eebe4aa8e334d5921fcfcd8 100644 --- a/src/dbOperator/BasicOperation.java +++ b/src/dbOperator/BasicOperation.java @@ -9,51 +9,51 @@ import java.sql.Statement; public class BasicOperation { /** - * ڽݿӣеӶӦͨӦд - * ˵һ¹淶ҪؽķӦҪṩͨ˷õӣصвҪؽķڷڴӣڷ֮ǰرա - * @return Connection + * 这个函数用于建立数据库连接,所有的连接都应该通过本方法建立,不应该另写别的 + * 另外说一下规范:所有需要返回结果集的方法都应该要求调用者提供通过此方法得到的连接,这样才能在用完后关掉,所有不需要返回结果集的方法可以在方法内创建连接,并在返回之前关闭。 + * @return 建立的Connection连接 */ public static Connection getConnection(){ - //ֱݿ⣬ͨÿԻȡһݿ⽨ + //这个函数用于直接连接数据库,通过调用可以获取一个与数据库建立的连接 Connection con = null; try { - Class.forName("com.mysql.cj.jdbc.Driver"); //com.mysql.jdbc.DriverѾˣҪcj + Class.forName("com.mysql.cj.jdbc.Driver"); //com.mysql.jdbc.Driver已经弃用了,要加上cj } catch(Exception e) { System.out.println("forNameError:" + e); } - String url = "jdbc:mysql://60.205.185.202:3306/library?useSSL=false&characterEncoding=utf-8&serverTimezone=GMT"; //ҪserverTimezone=GMTᱨ + String url = "jdbc:mysql://60.205.185.202:3306/library?useSSL=false&characterEncoding=utf-8&serverTimezone=GMT"; //要加上serverTimezone=GMT,否则会报错 String user = "root"; String password = "2fe553c3c3e13ee8"; try { - System.out.println("ʼ"); + System.out.println("开始建立连接"); con = DriverManager.getConnection(url, user, password); } catch(Exception e) { - System.err.println("ʧ"); + System.err.println("连接失败"); System.out.println(e); System.exit(1); } - System.err.println("ӳɹ"); + System.err.println("连接成功"); return con; } /** - * ֱִSQLѯ䣬ȡ÷صĽؼǵùرսconӣ - * @param con һͨgetConnection()õݿ - * @param queryScript ҪִеIJѯ - * @return ѯõĽעʱݿȻڣҪڴر - * @throws SQLException ѯִдʱ׳쳣 + * 这个函数用于直接执行SQL查询语句,并取得返回的结果集,请务必记得关闭建立的con连接! + * @param con 一个通过getConnection()方法得到的数据库连接 + * @param queryScript 要执行的查询语句 + * @return 查询得到的结果集,请注意此时的数据库连接依然存在,要在处理完结果集后关闭 + * @throws SQLException 查询语句执行错误时会抛出此异常 */ protected static ResultSet getQueryResult(Connection con,String queryScript) throws SQLException { - //ֱִSQLѯ䣬ȡ÷صĽؼǵùرսconӣ + //这个函数用于直接执行SQL查询语句,并取得返回的结果集,请务必记得关闭建立的con连接! - /* һʾ֤ȷ + /* 这个主函数是一个调用示例,可以利用它验证方法的正确性 public static void main(String[] args) { String queryScript = "select * from User"; Connection con = getConnection(); @@ -74,17 +74,17 @@ public class BasicOperation { } /** - * ֱִSQL䣬ȡ÷صֵ˴ҪconӵĽرգΪؽܼ򵥡 - * @param updateScript - * @return ִкķֵ - * @throws SQLException ִдʱ׳쳣 + * 这个函数用于直接执行SQL更新语句,并取得返回的整数值,此处不需要考虑con连接的建立与关闭,因为返回结果很简单。 + * @param updateScript 更新语句 + * @return 语句执行后给出的返回值 + * @throws SQLException 更新语句执行错误时会抛出此异常 */ protected static int executeUpdateScript(String updateScript) throws SQLException { - //ֱִSQL䣬ȡ÷صֵ˴ҪconӵĽرգΪؽܼ򵥡 - //ʾ updateScript = "insert into User values ('3', 'qwertyuio@123.com', '18899990000', 'cookie_1324567', '3', MD5('1234567'))" - //ܣһûĻϢʹMD5 + //这个函数用于直接执行SQL更新语句,并取得返回的整数值,此处不需要考虑con连接的建立与关闭,因为返回结果很简单。 + //插入语句示例 updateScript = "insert into User values ('3', 'qwertyuio@123.com', '18899990000', 'cookie_1324567', '3', MD5('1234567'))" + //功能:插入一个用户的基本信息,其中密码使用MD5加密 - /*һʾ֤ȷ + /*这个主函数是一个调用示例,可以利用它验证方法的正确性 public static void main(String[] args) { String updateScript = "insert into User values ('4', 'qwertyuio@1234.com', '18899990001', 'cookie_1324567', '3', MD5('1234567'))"; try { @@ -102,10 +102,10 @@ public class BasicOperation { return result; } /** - * ִSQL䣬һҪṩӵذ汾Ѿڱ𴦴δرգƼʹô˷ - * @param con һѾõ - * @param updateScript SQL - * @return ִкķֵ + * 这个函数用于执行SQL更新语句,是一个需要提供连接的重载版本,如果你已经在别处创建了连接且尚未关闭,推荐使用此方法 + * @param con 一个已经建立好的连接 + * @param updateScript SQL更新语句 + * @return 语句执行后给出的返回值 * @throws SQLException */ protected static int executeUpdateScript(Connection con, String updateScript) throws SQLException { diff --git a/src/servlet/Login.java b/src/servlet/Login.java index fab23549a2992c853aed73afd42cb7c5e0d82025..8a53b5d87a5e3e4a91b1f368641b4f42c667928a 100644 --- a/src/servlet/Login.java +++ b/src/servlet/Login.java @@ -9,31 +9,30 @@ import dbOperator.*; public class Login extends HttpServlet{ - /** - * - */ - private static final long serialVersionUID = -4143721484509460L; - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Cookie cookies[] = request.getCookies(); - if(cookies == null) {response.sendRedirect("index.html");return;} + if(cookies == null) return; for(Cookie c : cookies) { if(c.getName().equals("LoginInfo")) { String currentCookie = c.getValue(); try { int uid = AdvancedOperation.getUidbyCookie(currentCookie); + if(uid == -1) {response.sendRedirect("index.html");return;} + else { int userIdentity = AdvancedOperation.getIdentity(uid); HttpSession session = request.getSession(); session.setAttribute("uid", uid); session.setAttribute("userIdentity", userIdentity); switch(userIdentity) { case 1:{response.sendRedirect("admin.html");break;} - case 2:{response.sendRedirect("librarian.jsp");break;} + case 2:{response.sendRedirect("librarian.html");break;} case 3:{response.sendRedirect("reader.html");break;} default:{response.sendRedirect("index.html");break;} + } + return; } } catch (SQLException e) { - // TODO Զɵ catch + // TODO 自动生成的 catch 块 e.printStackTrace(); } } @@ -49,19 +48,19 @@ public class Login extends HttpServlet{ currentCookie = AdvancedOperation.getLoginInfo(information, password); System.out.println(currentCookie); } catch (SQLException e) { - // TODO Զɵ catch + // TODO 自动生成的 catch 块 e.printStackTrace(); } if(currentCookie != null) { Cookie loginInfo = new Cookie("LoginInfo",currentCookie); loginInfo.setMaxAge(604800); - //604800 = 60*60*24*7 cookieЧΪ7 + //604800 = 60*60*24*7 ,即cookie的有效期为7天 response.addCookie(loginInfo); - response.sendRedirect("launch"); + doGet(request, response); return; } else { - //ڴ˼뵯ʾĴ룬¶λ¼ҳ + //在此加入弹窗提示密码错误的代码,并重新定位到登录页面 response.sendRedirect("index.html"); return; } diff --git a/src/servlet/ReaderServlet.java b/src/servlet/ReaderServlet.java new file mode 100644 index 0000000000000000000000000000000000000000..e6b6d6eddc04ebb6eda08b9ba6f06b8f5fd45b05 --- /dev/null +++ b/src/servlet/ReaderServlet.java @@ -0,0 +1,323 @@ +package servlet; + +import java.io.IOException; +import java.sql.Date; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.mysql.cj.xdevapi.JsonArray; +import com.mysql.cj.xdevapi.Result; + +import dataOperator.BasicOperation; +import dataOperator.BrrowList; +import dataOperator.SBook; +import dbOperator.AdvancedOperation; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import util.MailOperation; + +@WebServlet("/reader") +public class ReaderServlet extends HttpServlet{ + + /** + * + */ + + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { + HttpSession session = request.getSession(); + try { + String method = request.getParameter("method"); + if(method.equals("browerBookList")) { + int uid = 0; + try { + uid = AdvancedOperation.getUidbyCookie(session.getAttribute("loginCookie").toString()); + } catch (Exception e) { + response.sendRedirect("/library/login.jsp"); + } + ResultSet resultSet = AdvancedOperation.getReaderBorrowList(dbOperator.BasicOperation.getConnection(),uid); + List list = new ArrayList(); + while (resultSet.next()) { + uid = resultSet.getInt("uid"); + int bid = resultSet.getInt("bid"); + String bookID = resultSet.getString("bookId"); + Date borrowDate = resultSet.getDate("borrowDate"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + long returnTime = borrowDate.getTime(); + returnTime += 1000*60*60*60*24*30; + Date date = new Date(returnTime); + String status = resultSet.getString("status"); + BrrowList brrowList = new BrrowList(); + brrowList.setUid(uid); + brrowList.setBid(bid); + brrowList.setBookID(bookID); + brrowList.setReturnDate(sdf.format(date)); + ResultSet tempResultSet = AdvancedOperation.getBookInfo(dbOperator.BasicOperation.getConnection(), bookID, "bookID"); + while (tempResultSet.next()) { + String bookName = tempResultSet.getString("name"); + brrowList.setBookName(bookName); + } + brrowList.setBorrowDate(borrowDate.toString()); + brrowList.setStatus(status); + list.add(brrowList); + + + } + JSONArray jsonArray = JSONArray.fromObject(list); + + JSONObject obj=new JSONObject(); + //前台通过key值获得对应的value值 + obj.put("code", 0); + obj.put("msg", ""); + obj.put("count",1000); + obj.put("data",jsonArray.toString()); + System.out.println(obj.toString()); + response.getWriter().write(obj.toString()); + }else if(method.equals("returnBookList")) {//已归还书籍 + int uid = AdvancedOperation.getUidbyCookie(session.getAttribute("loginCookie").toString()); + ResultSet resultSet = AdvancedOperation.viewBorrowReturnHistoryReader(dbOperator.BasicOperation.getConnection(),uid,"returned"); + List list = new ArrayList(); + while (resultSet.next()) { + uid = resultSet.getInt("uid"); + int bid = resultSet.getInt("bid"); + String bookID = resultSet.getString("bookId"); + Date borrowDate = resultSet.getDate("borrowDate"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + long returnTime = borrowDate.getTime(); + returnTime += 1000*60*60*60*24*30; + Date date = new Date(returnTime); + String status = resultSet.getString("status"); + BrrowList brrowList = new BrrowList(); + brrowList.setUid(uid); + brrowList.setBid(bid); + brrowList.setBookID(bookID); + brrowList.setReturnDate(sdf.format(date)); + ResultSet tempResultSet = AdvancedOperation.getBookInfo(dbOperator.BasicOperation.getConnection(), bookID, "bookID"); + while (tempResultSet.next()) { + String bookName = tempResultSet.getString("name"); + brrowList.setBookName(bookName); + } + brrowList.setBorrowDate(borrowDate.toString()); + brrowList.setStatus(status); + list.add(brrowList); + + + } + JSONArray jsonArray = JSONArray.fromObject(list); + + JSONObject obj=new JSONObject(); + //前台通过key值获得对应的value值 + obj.put("code", 0); + obj.put("msg", ""); + obj.put("count",1000); + obj.put("data",jsonArray.toString()); + System.out.println(obj.toString()); + response.getWriter().write(obj.toString()); + }else if(method.equals("bookSearch")) { + String type = request.getParameter("type"); + String key = request.getParameter("key"); + List list = new ArrayList(); + if(key==null||key.equals("null")||key.equals("")) { + ResultSet resultSet = AdvancedOperation.getAllSBooks(); + while (resultSet.next()) { + String bookID = resultSet.getString("bookID"); + String bookName = resultSet.getString("name"); + String position = resultSet.getString("position"); + String category = resultSet.getString("category"); + String author = resultSet.getString("author"); + String publisher = resultSet.getString("publisher"); + String ISBN = resultSet.getString("ISBN"); + double price = resultSet.getDouble("price"); + String status = resultSet.getString("status"); + int bid = resultSet.getInt("bid"); + SBook sBook = new SBook(bookID, bookName, position, category, author, publisher, ISBN, price, status, bid); + list.add(sBook); + } + JSONArray jsonArray = JSONArray.fromObject(list); + + JSONObject obj=new JSONObject(); + //前台通过key值获得对应的value值 + obj.put("code", 0); + obj.put("msg", ""); + obj.put("count",1000); + obj.put("data",jsonArray.toString()); + System.out.println(obj.toString()); + response.getWriter().write(obj.toString()); + }else if(type.equals("bid")) { + ResultSet resultSet = AdvancedOperation.getAllSBooks(); + while (resultSet.next()) { + String bookID = resultSet.getString("bookID"); + String bookName = resultSet.getString("name"); + String position = resultSet.getString("position"); + String category = resultSet.getString("category"); + String author = resultSet.getString("author"); + String publisher = resultSet.getString("publisher"); + String ISBN = resultSet.getString("ISBN"); + double price = resultSet.getDouble("price"); + String status = resultSet.getString("status"); + int bid = resultSet.getInt("bid"); + SBook sBook = new SBook(bookID, bookName, position, category, author, publisher, ISBN, price, status, bid); + + try { + if(Integer.parseInt(key) == bid) { + list.add(sBook); + } + } catch (Exception e) { + + } + + } + JSONArray jsonArray = JSONArray.fromObject(list); + + JSONObject obj=new JSONObject(); + //前台通过key值获得对应的value值 + obj.put("code", 0); + obj.put("msg", ""); + obj.put("count",1000); + obj.put("data",jsonArray.toString()); + System.out.println(obj.toString()); + response.getWriter().write(obj.toString()); + }else if(type.equals("name")) { + ResultSet resultSet = AdvancedOperation.getAllSBooks(); + while (resultSet.next()) { + String bookID = resultSet.getString("bookID"); + String bookName = resultSet.getString("name"); + String position = resultSet.getString("position"); + String category = resultSet.getString("category"); + String author = resultSet.getString("author"); + String publisher = resultSet.getString("publisher"); + String ISBN = resultSet.getString("ISBN"); + double price = resultSet.getDouble("price"); + String status = resultSet.getString("status"); + int bid = resultSet.getInt("bid"); + SBook sBook = new SBook(bookID, bookName, position, category, author, publisher, ISBN, price, status, bid); + if(bookName.contains(key)) { + list.add(sBook); + } + + } + JSONArray jsonArray = JSONArray.fromObject(list); + + JSONObject obj=new JSONObject(); + //前台通过key值获得对应的value值 + obj.put("code", 0); + obj.put("msg", ""); + obj.put("count",1000); + obj.put("data",jsonArray.toString()); + System.out.println(obj.toString()); + response.getWriter().write(obj.toString()); + } + + }else if(method.equals("yuyue")) { + try { + int bid = Integer.parseInt(request.getParameter("bid")); + int uid = Integer.parseInt(session.getAttribute("uid").toString()); + AdvancedOperation.getBookReserved(dbOperator.BasicOperation.getConnection(), bid, uid); + response.sendRedirect("/library/reader/search.jsp?msg=success"); + } catch (Exception e) { + e.printStackTrace(); + response.sendRedirect("/library/login.jsp"); + } + + }else if(method.equals("logout")) { + session.invalidate(); + response.sendRedirect("/library/login.jsp"); + + } + } catch (Exception e) { + e.printStackTrace(); + // TODO: handle exception + } + + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { + HttpSession session = request.getSession(); + try { + String method = request.getParameter("method"); + if(method.equals("login")) { + String username = request.getParameter("username"); + String password = BasicOperation.MD5(request.getParameter("password")); + String result = AdvancedOperation.getLoginInfo(username, password); + if(result != null) { + ResultSet userResultSet = AdvancedOperation.getUser(username, password); + Cookie loginInfo = new Cookie("LoginInfo",result); + + loginInfo.setMaxAge(604800); + //604800 = 60*60*24*7 ,即cookie的有效期为7天 + response.addCookie(loginInfo); + + session.setAttribute("loginCookie", result); + while (userResultSet.next()) { + session.setAttribute("phoneNumber", userResultSet.getString("phoneNumber")); + session.setAttribute("Email", userResultSet.getString("Email")); + session.setAttribute("password", userResultSet.getString("password")); + session.setAttribute("uid", userResultSet.getString("uid")); + } + response.sendRedirect("/library/reader/reader.jsp"); + }else { + response.sendRedirect("/library/login.jsp"); + } + + } else if(method.equals("updatePersion")) { + String phoneNumber = request.getParameter("phoneNumber"); + String Email = request.getParameter("Email"); + String password = request.getParameter("password"); + AdvancedOperation.changePassword(Integer.parseInt(session.getAttribute("uid").toString()), Integer.parseInt(session.getAttribute("uid").toString()), password); + AdvancedOperation.updateUserInfo(Email,phoneNumber,Integer.parseInt(session.getAttribute("uid").toString()), Integer.parseInt(session.getAttribute("uid").toString())); + + String result = AdvancedOperation.getLoginInfo(phoneNumber, password); + if(result != null) { + ResultSet userResultSet = AdvancedOperation.getUser(phoneNumber, password); + Cookie loginInfo = new Cookie("LoginInfo",result); + + loginInfo.setMaxAge(604800); + //604800 = 60*60*24*7 ,即cookie的有效期为7天 + response.addCookie(loginInfo); + + session.setAttribute("loginCookie", result); + while (userResultSet.next()) { + session.setAttribute("phoneNumber", userResultSet.getString("phoneNumber")); + session.setAttribute("Email", userResultSet.getString("Email")); + session.setAttribute("password", userResultSet.getString("password")); + session.setAttribute("uid", userResultSet.getString("uid")); + } + response.sendRedirect("/library/reader/index.jsp"); + }else { + response.sendRedirect("/library/login.jsp"); + } + + }else if(method.equals("send_change_password_email")) { + String phone = request.getParameter("phone"); + String email = request.getParameter("email"); + int uid = Integer.parseInt(request.getParameter("uid")); + ResultSet resultSet = AdvancedOperation.getUserByUid(uid); + while (resultSet.next()) { + String phoneNumber = resultSet.getString("phoneNumber"); + String Email = resultSet.getString("Email"); + if(phoneNumber.equals(phone)&&Email.equals(email)) { + String tempPassword = UUID.randomUUID().toString().substring(0,6); + AdvancedOperation.changePassword(uid,uid,tempPassword); + MailOperation.sendMail("1021379990@qq.com", "yuanmamatou1234", "smtp.163.com", "yuanmamatouemail@163.com", Email, "密码重置提醒", "您的重置后密码为:"+tempPassword); + response.sendRedirect("/library/reader/changePassword.jsp?msg=success"); + }else { + response.sendRedirect("/library/reader/changePassword.jsp?msg=fail"); + } + } + } + } catch (Exception e) { + // TODO: handle exception + } + } +} diff --git a/src/util/MailAuthenticator.java b/src/util/MailAuthenticator.java new file mode 100644 index 0000000000000000000000000000000000000000..0ab97847a106d057d1aebb055284f169a2eaf17f --- /dev/null +++ b/src/util/MailAuthenticator.java @@ -0,0 +1,17 @@ +package util; +import javax.mail.Authenticator; +import javax.mail.PasswordAuthentication; + +public class MailAuthenticator extends Authenticator{ + + public static String USERNAME = ""; + public static String PASSWORD = ""; + + public MailAuthenticator() { + } + + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(USERNAME, PASSWORD); + } + +} \ No newline at end of file diff --git a/src/util/MailOperation.java b/src/util/MailOperation.java new file mode 100644 index 0000000000000000000000000000000000000000..00749fed650f4d09e2d2dc8c787d5cc654a89728 --- /dev/null +++ b/src/util/MailOperation.java @@ -0,0 +1,71 @@ +package util; +import java.util.Date; +import java.util.Properties; +import javax.mail.Message; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart;/** + * 邮件发送操作类 + * + * @author bxr + * + */ +public class MailOperation { + + /** + * 发送邮件 + * @param user 发件人邮箱 + * @param password 授权码(注意不是邮箱登录密码) + * @param host + * @param from 发件人 + * @param to 接收者邮箱 + * @param subject 邮件主题 + * @param content 邮件内容 + * @return success 发送成功 failure 发送失败 + * @throws Exception + */ + public static String sendMail(String user, String password, String host, + String from, String to, String subject, String content) + throws Exception { + if (to != null){ + Properties props = System.getProperties(); + props.put("mail.smtp.host", host); + props.put("mail.smtp.auth", "true"); + MailAuthenticator auth = new MailAuthenticator(); + MailAuthenticator.USERNAME = user; + MailAuthenticator.PASSWORD = password; + Session session = Session.getInstance(props, auth); + session.setDebug(true); + try { + MimeMessage message = new MimeMessage(session); + message.setFrom(new InternetAddress(from)); + if (!to.trim().equals("")) + message.addRecipient(Message.RecipientType.TO, + new InternetAddress(to.trim())); + message.setSubject(subject); + MimeBodyPart mbp1 = new MimeBodyPart(); // 正文 + mbp1.setContent(content, "text/html;charset=utf-8"); + Multipart mp = new MimeMultipart(); // 整个邮件:正文+附件 + mp.addBodyPart(mbp1); + // mp.addBodyPart(mbp2); + message.setContent(mp); + message.setSentDate(new Date()); + message.saveChanges(); + Transport trans = session.getTransport("smtp"); + trans.send(message); + System.out.println(message.toString()); + } catch (Exception e){ + e.printStackTrace(); + return "failure"; + } + return "success"; + }else{ + return "failure"; + } + } + +} \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391