commit 10e592fe2483fdfee46a621a198cc8257e966dc8 Author: zhaoxingchang.sd Date: Thu Sep 26 16:13:21 2024 +0800 feat:项目初始化,基于标品8.0.3-std diff --git a/README.md b/README.md new file mode 100644 index 0000000..fcd7f4d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# SIMS-scaninvoice + +销项扫码开票前端 \ No newline at end of file diff --git a/css/base.css b/css/base.css new file mode 100644 index 0000000..8a3db77 --- /dev/null +++ b/css/base.css @@ -0,0 +1,217 @@ +/* + * @名称:base.css + * @功能:1、重设浏览器默认样式 + * 2、设置通用原子类 + */ +html { + font-size: 20px; +} +body { + font-size: 16px; + font-family: "微软雅黑", serif; +} +@media only screen and (max-width: 320px) { html { + font-size: 42.7px !important; + }} +@media only screen and (min-width: 321px) and (max-width: 360px) { html { + font-size: 48px !important; + }} +@media only screen and (min-width: 361px) and (max-width: 375px) { html { + font-size: 50px !important; + }} +@media only screen and (min-width: 376px) and (max-width: 384px) { html { + font-size: 52.1px !important; + }} +@media only screen and (min-width: 385px) and (max-width: 414px) { html { + font-size: 55.2px !important; + }} +@media only screen and (min-width: 415px) and (max-width: 480px) { html { + font-size: 64px !important; + }} +@media only screen and (min-width: 481px) and (max-width: 540px) { html { + font-size: 72px !important; + }} +@media only screen and (min-width: 750px) { html { + font-size: 100px !important; + }} + +/*ios安卓通用1px线*/ +.border { + box-shadow: inset 0px -1px 0px 0px #EDEDED; +} +.border1{ + position:relative; +} +.border1:after{ + content:""; + position: absolute; + bottom:0px; + left:0px; + right:0px; + border-bottom:1px solid #DEDEDE; + -webkit-transform:scaleY(.5); + -webkit-transform-origin:0 0; +} +.border-03rem{ + position:relative; +} +.border-03rem:after{ + content:""; + position: absolute; + bottom:0px; + left:0px; + right:0px; + border-bottom:1px solid #DEDEDE; + -webkit-transform:scaleY(.5); + -webkit-transform-origin:0 0; + margin-left: 0.3rem; + margin-right: 0.3rem; +} + +/* 内外边距通常让各个浏览器样式的表现位置不同 */ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { + margin:0; + padding:0; + -webkit-tap-highlight-color: rgba(0,0,0,0);/*ios去除默认点击阴影效果*/ +} +/* 去掉 table cell 的边距并让其边重合 */ +table { + border-collapse:collapse; + border-spacing:0; +} +/* ie bug:th不继承 text-align */ +th { + text-align:inherit; +} +/* 去除默认边框 */ +fieldset,img { + border:none; +} +/* ie678 bug 显示为行内表现 */ +iframe { + display:block; +} +/* 一致的 del 样式 */ +del { + text-decoration:line-through; +} +address,caption,cite,code,dfn,em,th,var { + font-style:normal; + font-weight:500; +} +/* 去掉列表前的标识,li会继承 */ +ol,ul { + list-style:none; +} +/* 对齐是排版最重要的因素,别让什么都居中 */ +caption,th { + text-align:left; +} +h1,h2,h3,h4,h5,h6 { + font-weight:500; +} + +/* 统一上标和下标 */ +sub,sup { + font-size:75%; + line-height:0; + position:relative; + vertical-align:baseline; +} +sup { + top:-0.5em; +} +sub { + bottom:-0.25em; +} + +/* 让链接在 hover状态下显示下划线 +去除 ie6ie7焦点点状线 */ +a:hover { + text-decoration:underline; +} +a:link { + text-decoration: none; +} +ins,a { + text-decoration:none; +} +a:focus,*:focus { + outline:none; +} + +/* 清除浮动 */ +.clearfix:after { + content: ''; + display: block; + clear: both; + height: 0; + line-height: 0; + visibility: hidden; + overflow: hidden; +} +.clearfix { + zoom: 1; +} + +/* 设置显示和隐藏、浮动、定位 */ +.hide { + display:none; +} +.block { + display:block; +} +.fl,.fr { + display:inline; +} +.fl { + float:left; +} +.fr { + float:right; +} +.pr { + position: relative; +} +.pa { + position: absolute; +} + +/* 背景遮罩 */ +.shade{ + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 100; + background: rgba(0,0,0,0.70); +} +/* 背景底色 */ +.box:before { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -100; + content: " "; + background-color: #F7F7F7; +} +/*背景模糊*/ +/*.blur { */ +/* filter: url(blur.svg#blur); !* FireFox, Chrome, Opera *!*/ +/* -webkit-filter: blur(10px); !* Chrome, Opera *!*/ +/* -moz-filter: blur(10px);*/ +/* -ms-filter: blur(10px); */ +/* filter: blur(10px);*/ +/* filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=10, MakeShadow=false); !* IE6~IE9 *!*/ +/*}*/ + +/*解决浮动 定位的父容器无法被撑开问题*/ +.automatic-Height:after { + content:"."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} diff --git a/css/iosSelect.css b/css/iosSelect.css new file mode 100644 index 0000000..993d9dd --- /dev/null +++ b/css/iosSelect.css @@ -0,0 +1,266 @@ +/* layer begin */ +.ios-select-widget-box.olay { + position: fixed; + z-index: 500; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 1; + background: rgba(0, 0, 0, 0.7); +} +.ios-select-widget-box.olay .layer { + position: fixed; + z-index: 1000; + width: 100%; + height: 100%; + background-color: #fff; + bottom: -194px; + left: 0; + visibility: visible; +} +.ios-select-widget-box header.iosselect-header { + height: 0.8rem; + line-height: 0.8rem; + background-color: #fff; + width: 92%; + z-index: 9999; + margin-left: 4%; + text-align: center; + border-bottom: 1px solid #DEDEDE; +} +.ios-select-widget-box header.iosselect-header a { + font-size: 0.28rem; + color: #FFAA00; + text-decoration: none; +} +.ios-select-widget-box header.iosselect-header a.close { + float: left; +} +.ios-select-widget-box header.iosselect-header a.sure { + float: right; +} +.ios-select-widget-box { + padding-top: 44px; +} +.ios-select-widget-box .one-level-contain, +.ios-select-widget-box .two-level-contain, +.ios-select-widget-box .three-level-contain, +.ios-select-widget-box .four-level-contain, +.ios-select-widget-box .five-level-contain { + height: 100%; + overflow: hidden; +} +.ios-select-widget-box .iosselect-box { + overflow: hidden; +} +.ios-select-widget-box .iosselect-box > div { + display: block; + float: left; +} +.ios-select-widget-box ul { + background-color: #fff; +} +.ios-select-widget-box ul li { + font-size: 0.24rem; + text-align: center; + color: #A5A5A5; +} +.ios-select-widget-box ul li.at { + font-size: 0.28rem; + color: #666; + opacity: 1; +} +.ios-select-widget-box ul li.side1 { + font-size: 15px; + opacity: .7; +} +.ios-select-widget-box ul li.side2 { + font-size: 14px; + opacity: .5; +} +.ios-select-widget-box.one-level-box .one-level-contain { + width: 100%; +} +.ios-select-widget-box.one-level-box .two-level-contain, +.ios-select-widget-box.one-level-box .three-level-contain, +.ios-select-widget-box.one-level-box .four-level-contain, +.ios-select-widget-box.one-level-box .five-level-contain, +.ios-select-widget-box.one-level-box .six-level-contain { + width: 0; +} +.ios-select-widget-box.two-level-box .one-level-contain, +.ios-select-widget-box.two-level-box .two-level-contain { + width: 50%; +} +.ios-select-widget-box.two-level-box .three-level-contain, +.ios-select-widget-box.two-level-box .four-level-contain, +.ios-select-widget-box.two-level-box .five-level-contain, +.ios-select-widget-box.two-level-box .six-level-contain { + width: 0; +} +.ios-select-widget-box.three-level-box .one-level-contain, +.ios-select-widget-box.three-level-box .two-level-contain { + width: 30%; +} +.ios-select-widget-box.three-level-box .three-level-contain { + width: 40%; +} +.ios-select-widget-box.three-level-box .four-level-contain, +.ios-select-widget-box.three-level-box .five-level-contain, +.ios-select-widget-box.three-level-box .six-level-contain { + width: 0%; +} + +.ios-select-widget-box.four-level-box .one-level-contain, +.ios-select-widget-box.four-level-box .two-level-contain, +.ios-select-widget-box.four-level-box .three-level-contain, +.ios-select-widget-box.four-level-box .four-level-contain { + width: 25%; +} +.ios-select-widget-box.four-level-box .five-level-contain, +.ios-select-widget-box.four-level-box .six-level-contain { + width: 0%; +} + +.ios-select-widget-box.five-level-box .one-level-contain, +.ios-select-widget-box.five-level-box .two-level-contain, +.ios-select-widget-box.five-level-box .three-level-contain, +.ios-select-widget-box.five-level-box .four-level-contain, +.ios-select-widget-box.five-level-box .five-level-contain { + width: 20%; +} +.ios-select-widget-box.five-level-box .six-level-contain { + width: 0%; +} + +.ios-select-widget-box.six-level-box .one-level-contain, +.ios-select-widget-box.six-level-box .two-level-contain, +.ios-select-widget-box.six-level-box .three-level-contain, +.ios-select-widget-box.six-level-box .four-level-contain, +.ios-select-widget-box.six-level-box .five-level-contain { + width: 16%; +} +.ios-select-widget-box.six-level-box .six-level-contain { + width: 20%; +} +.ios-select-widget-box .cover-area1 { + width: 100%; + border: none; + border-top: 1px solid #d9d9d9; + position: absolute; + top: 149px; + margin: 0; + height: 0; +} +.ios-select-widget-box .cover-area2 { + width: 100%; + border: none; + border-top: 1px solid #d9d9d9; + position: absolute; + top: 183px; + margin: 0; + height: 0; +} +.ios-select-widget-box #iosSelectTitle { + margin: 0; + padding: 0; + display: inline-block; + font-size: 0.28rem; + color: #666; +} +.ios-select-body-class { + overflow: hidden; +} +.ios-select-body-class body { + touch-action: none; +} +.ios-select-widget-box.olay > div > .ios-select-loading-box { + width: 100%; + height: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(0,0,0,.5); + display: none; +} +.ios-select-widget-box.olay > div > .ios-select-loading-box > .ios-select-loading { + width: 50px; + height: 50px; + position: absolute; + left: 50%; + top: 50%; + margin-top: -25px; + margin-left: -25px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OEMxMEI3NDI3MEIxMUU2ODVGMzhFNjYyMDIyOUFCMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OEMxMEI3NTI3MEIxMUU2ODVGMzhFNjYyMDIyOUFCMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU4QzEwQjcyMjcwQjExRTY4NUYzOEU2NjIwMjI5QUIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU4QzEwQjczMjcwQjExRTY4NUYzOEU2NjIwMjI5QUIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GeWqMwAAA+BJREFUeNrMmVlsTGEUx+9cXZQiLZWKklhbQSSlSMUWSxAiJGJ5aSQehOiDF7yI4EFILW99I3iRSJGUPkiILSKp2OuJVtHWkrRVapn2jv+R/ycnn5l27rQz10l+mWlyl/+c833nO+c0FIlEnATMBbPAIn5OBuPAENAKToC74BtoB59AG/D9spBPgaPBdrAFjJH7Fa66TkRuNe8gP8Bb8Ap8j/eFaXFelwv286WZfKG2WL9SX5cFCuntBvAc/OoPD64HJ8EI5Q3tmW7whl4pAl/AUfAEDKZnQ1HuFXGPQGOiAsW7x8A26wUhirgMLnGtfe3hGcO5NApARpRnSchrY0UhlkAJxxmw0npYBzgOKinSj6WDCfRyphWFJnAPdMUjUH71WbDKElcDykGL0zcbCEroVf389+CW7Uk3ygNk/azghYIHDoCN/SDO4W6+A55aAiUrzImWz7StA2WWuF2gIpEc1ovVgQeWyELm06gCc8ARJU44DM45yTPZII8tkXO5DP4RuI8iPYqr4YmQbJN8+E4JlA1abAuUBbtZeU526O4khDWW3QdhK9TZWmAZd6/x3inw0UmdSZJ/pgSKlilGoMvTwoiTw/20k3p7yTyovRgScTNAvgrvFSbkVJuE+LU6GiXEefJHqfKefF5zgrMGVRnJZ4HEerryXjdzU1DWbB2BI10mRuPBej+1WhKsi8vLeDDXZRllwtvoBG8davNmS4gHUZyTQIWSrM1iQpyZptafo4QGabp9+JNmOijMY9MTtGWpEHe5PDHMGsz/DwQOUwI7XVYUZheP1ZVEAJbOFsGswTYR+EKF2NWVRABWwHPYeLDFZWKOKJFLAhRYpMQJjS7rsWYlcjlTT6pNOr5pahfL5m12KaparUPpZTcEILCEjjGniCy9iMk3F9hImzCXcZqQKhOnLFShjbBX/psQP4Aq5UUpdfZEGXEkKzGvZf4zu/exOdV0T1LJCZTx4gK2msm2Uq494z1pS29Ea5ra2RPrrm4HpwvJsplgtTW/kXq0M1ZffF2F2uMNe+nJUD+HVWaLm8AAtXNrOXTqcfQh2fwQmKdST4TTgAp6ui+WTWFTrUpedu15Fs29Do/kuDsIZlsiW7njryZQ2MrAaD5Yqko88+w6zoPCfsdv5VwjnnXayA67zYmUdGM/e0i+E7nWivnDPUWEz6iyPedngLkY7ARDrQeb72GOz5roVY/eylMHvxflXjkpLoKHfZ2wmhJIkvcylUi9BAnTa9U9DD59CzQm/csaZv0cn0JbOeK4ye/xbfcE/w0hYZvElnU8GEXBGRQjeewzi5B6rtP6RGY9vwUYACMHTam1T1ebAAAAAElFTkSuQmCC) no-repeat 0 0; + background-size: contain; + -webkit-animation: loading-keyframe 1s infinite linear; + animation: loading-keyframe 1s infinite linear; +} +.fadeInUp .layer{ + -webkit-animation: fadeInUp .5s; + animation: fadeInUp .5s; +} +.fadeOutDown .layer{ + -webkit-animation: fadeOutDown .5s!important; + animation: fadeOutDown .5s!important; +} +@-webkit-keyframes loading-keyframe { + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } +} +@keyframes loading-keyframe { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@-webkit-keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0,100%,0); + } + to { + opacity: 1; + -webkit-transform: none; + } +} +@keyframes fadeInUp { + from { + opacity: 0; + transform: translate3d(0,100%,0); + } + to { + opacity: 1; + transform: none; + } +} +@-webkit-keyframes fadeOutDown { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + } +} +@keyframes fadeOutDown { + from { + opacity: 1; + } + + to { + opacity: 0; + transform: translate3d(0, 100%, 0); + } +} diff --git a/css/wxscaninvoice/merge.css b/css/wxscaninvoice/merge.css new file mode 100644 index 0000000..78f2496 --- /dev/null +++ b/css/wxscaninvoice/merge.css @@ -0,0 +1,351 @@ +[v-cloak] { + display: none; +} + +span { + white-space: nowrap; +} + +.merge_content { + width: 100%; + height: 100%; + position: relative; + margin-bottom: 1.45rem; + /* height: */ +} + +.merge_header { + position: absolute; + width: 100%; + height: 1.3rem; + line-height: 1.3rem; + /* height: 9.6%; */ + background-color: rgb(14, 14, 14); +} + +.merge_header h3 { + font-size: .325rem; + color: #fff; + text-align: center; +} + +.merge_content .merge_handle { + height: 0.8rem; + background-color: #F7F7F7; + box-sizing: border-box; + padding: 0 .425rem; + line-height: 0.8rem; + display: flex; + flex-wrap: nowrap; + white-space: nowrap; + justify-content: space-between; +} + +.merge_content .merge_handle span { + font-size: .24rem; + display: flex; +} + +.merge_content .merge_handle span.handle_left { + color: #A5A5A5; + font-size: .24rem; +} + +.merge_content .merge_handle span.handle_right { + font-size: .24rem; + color: #D60000; + /* float: right; */ +} + +.merge_content .merge_main { + width: 100%; + background-color: #fff; +} + +.merge_main ul li { + height: 2.6rem; + width: 100%; + box-sizing: border-box; + padding: 0 .3rem; + +} + +.list-content { + width: 100%; + height: 100%; + padding: .3rem 0; + box-sizing: border-box; + display: flex; + border-bottom: 1px solid #E2E2E2; +} + +.merge_main ul li .select-box { + float: left; + width: .7rem; + height: 100%; + text-align: center; + display: flex; + align-items: center; +} + +.merge_main ul li .select-box i.icon-on { + display: inline-block; + width: .4rem; + height: .4rem; + background: url(../../image/wxscaninvoice/right.png) no-repeat; + background-size: 100% 100%; +} + +.merge_main ul li .select-box i.icon-off { + display: inline-block; + width: .4rem; + height: .4rem; + background: url(../../image/wxscaninvoice/Oval5.png) no-repeat; + background-size: 100% 100%; +} + +.title-box { + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.title-box span { + color: #A5A5A5; + font-size: .28rem; +} + +.val-box { + margin-left: .8rem; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.val-box span { + color: #666666; + width: 4.1rem; + display: inline-block; + font-size: .28rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.val-box .money { + font-size: .28rem; + color: #FFAA00; +} + +.merge_footer { + position: fixed; + width: 100%; + bottom: 0; + left: 0; + background-color: #fff; +} + +.merge_footer .footer-show { + height: .48rem; + width: 100%; + box-sizing: border-box; + padding: 0 .3rem; + border-bottom: 1px solid#FEFEFE; +} + +.merge_footer .footer-show span { + color: #444; + font-size: .24rem; +} + +.footer-control { + height: .96rem; + display: flex; +} + +.control-select { + display: flex; + width: 53.3%; + box-sizing: border-box; + padding: 0 15px; + align-items: center; +} + +.control-select i.icon-off { + display: inline-block; + width: .4rem; + height: .4rem; + background: url(../../image/wxscaninvoice/Oval5.png) no-repeat; + background-size: cover; +} + +.control-select i.icon-on { + display: inline-block; + width: .4rem; + height: .4rem; + background: url(../../image/wxscaninvoice/right.png) no-repeat; + background-size: cover; +} + +.control-select span { + color: #444444; + font-size: .28rem; + margin-left: .2rem; +} + +.control-select .homepage { + display: flex; + align-items: center; +} + +.control-select .selectAll { + display: flex; + align-items: center; + /* margin-left: .3rem; */ +} + +.control-btns { + display: flex; + width: 3.5rem; + flex: 1; +} + +.scan, +.next { + display: flex; + flex: 1; + align-items: center; + justify-content: center; + font-size: .34rem; + color: #fff; +} + +.scan { + background: #FFDF9F; +} + +.next { + background: #FFAA00; +} + + + + +/* 遮罩 */ +.shade { + /* display: none; */ + position: fixed; + z-index: 500; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 1; + background: rgba(0, 0, 0, 0.7); + overflow: hidden; +} + +.merge-block { + position: fixed; + /* display: none; */ + top: 30%; + left: 5%; + margin: 0 auto; + width: 90%; + height: 4rem; + background-color: #fff; + z-index: 999; + text-align: center; + box-sizing: border-box; + padding-top: 1rem; + +} + +.merge-block span { + font-size: .3rem; +} + +.operation { + position: absolute; + bottom: .4rem; + left: 0; + width: 100%; + display: flex; + justify-content: space-around; + +} + +.operation span { + width: 1.9rem; + height: .7rem; + text-align: center; + line-height: .7rem; + border-radius: .08rem; + border: 1px solid #FFAA00; +} + +.operation .cancel { + color: #FFAA00; +} + +.operation .confirm { + color: #fff; + background-color: #ffaa00; +} + +/* loading */ +.loading { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + overflow: hidden; + background-color: #fff; + z-index: 9999; + display: flex; + justify-content: center; + align-items: center; +} + +.loading img { + width: 1rem; + height: 1rem; +} + +.operation .nextBlock { + width: 70%; +} + +.loadingBlock { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + overflow: hidden; + /* background-color: #fff; */ + z-index: 1000; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + +} + +.loadingBlock img { + width: 0.8rem; + height: .8rem; +} + +.loadingBlock span { + margin-top: .8rem; + font-size: .26rem; + text-align: center; +} diff --git a/css/wxscaninvoice/writing.css b/css/wxscaninvoice/writing.css new file mode 100644 index 0000000..fd2ca9f --- /dev/null +++ b/css/wxscaninvoice/writing.css @@ -0,0 +1,630 @@ +.banner img { + width: 100%; + height: 1.4rem; + display: block; +} + +.writing_content { + padding-bottom: 1.14rem; +} + +input::-webkit-input-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +input:-moz-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +input::-moz-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +input:-ms-input-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +/*发票开具列表*/ +.name_li { + background: #FFF; +} + +.name_li_mTop { + margin-top: 0.2rem; +} + +.name_li_mTop p { + font-size: 0.24rem; + color: #A5A5A5; + letter-spacing: -0.58px; + margin-left: 4%; + padding-top: 0.2rem; +} + +.list_li { + width: 96%; + height: 0.8rem; + line-height: 0.8rem; + font-size: 0.28rem; + clear: both; + margin-left: 4%; + position: relative; +} + +.list_li:after, +.moreMsg_ul:after { + content: ""; + position: absolute; + bottom: 0px; + left: 0px; + right: 0px; + border-bottom: 1px solid #E9E9E9; + -webkit-transform: scaleY(.5); + -webkit-transform-origin: 0 0; +} + +.list_li:nth-last-child(1):after { + border-bottom: none; +} + +.name_li_rBottom li:nth-last-child(1) { + border-bottom: none; +} + +.list_li .list_name, +.markBox span { + width: 34%; + color: #666; + float: left; + display: inline; + letter-spacing: -0.68px; +} + +.list_li .list_name .stars { + color: #D0021B; + letter-spacing: -0.68px; + line-height: 0.29rem; +} + +.list_li .list_val { + width: 66%; + float: right; + text-align: left; + color: #666; +} + +.list_li .list_val i { + position: absolute; + font-size: 0.28rem; + font-family: '宋体', serif; + color: #A5A5A5; + font-style: normal; + top: 0; + left: 0; +} + +.list_li .list_val_pr { + position: relative; +} + +.list_li .fptt_close { + position: absolute; + width: 0.3rem; + height: 0.3rem; + top: 0.24rem; + right: 0.3rem; + display: none; + z-index: 100; +} + +.el-icon-more{ + position: absolute; + z-index: 110; +} + +.list_li .list_select { + width: 60%; + float: left; + text-align: right; +} + +.list_li .modelIcon { + width: 0.13rem; + height: 0.22rem; + position: absolute; + top: 0.29rem; + right: 0.3rem; +} + +.list_li .list_val input, +.list_li .list_select input { + width: 85%; + font-size: 0.28rem; + color: #666; + text-align: left; + border: none; + display: inline-block; +} + +.list_li .kpxms { + width: 60%; + float: left; + text-align: right; +} + +.list_li .kpxms input { + width: 85%; + font-size: 0.28rem; + color: #666; + text-align: left; + border: none; + display: inline-block; +} + +.list_li .list_select input { + width: 100%; +} + +.list_li .search { + width: 4.6rem; + height: auto; + position: absolute; + top: 0.81rem; + right: 0rem; + z-index: 10000; + border-radius: 0.08rem; + background: rgba(141, 139, 139, 0.93); +} + +.list_li .search_ul { + padding: 0 0.3rem; +} + +.list_li .search_ul .search_li { + line-height: 0.8rem; + text-align: left; + color: #FFF; + font-size: 0.28rem; + border-bottom: 1px solid #DEDEDE; +} + +.list_li .search_ul .search_li:nth-last-child(1) { + border-bottom: none; +} + +.start { + color: #C81026; +} + +.tip { + width: 30%; + font-size: 0.28rem; + color: #FFAA00; + float: right; +} + +.bottom_tips { + line-height: 0.73rem; + color: #A5A5A5; + font-size: 0.24rem; + letter-spacing: -0.58px; + padding-right: 4%; + text-align: right; +} + +.bottom_tips span:nth-child(1) { + margin-right: 0.6rem; +} + +/*提交按钮*/ +.bottom_submit { + width: 100%; + display: flex; + box-sizing: border-box; + padding: 0 .3rem; + justify-content: space-between; + height: 1.14rem; + text-align: center; + background: url(../../image/wxscaninvoice/footer-bg.png) repeat-x; + ; + background-size: cover; + position: fixed; + bottom: 0; + left: 0; +} + +.submit_click { + width: 70.7%; + height: 0.74rem; + line-height: 0.74rem; + text-align: center; + color: #FFF; + background-color: #FFAA00; + font-size: 0.29rem; + margin: 0.2rem auto; + border-radius: 4px; +} + +.Fristxmmc { + width: 34%; + color: #666; + display: inline-block; + line-height: 0.8rem; + letter-spacing: -0.68px; + overflow: hidden; + padding-right: 0.2rem; + text-overflow: ellipsis; + white-space: nowrap; + box-sizing: border-box; +} + +.Fristxmje { + width: 66%; + float: right; + text-align: left; + color: #666; +} + +/*开票项目更多*/ +.kpxm_li { + width: 92.4%; + font-size: 0.28rem; + clear: both; + line-height: 0.9rem; + margin: 0 auto; + position: relative; +} + +.kpxm_li:after { + content: ""; + position: absolute; + bottom: 0px; + left: 0px; + right: 0px; + border-bottom: 1px solid #E9E9E9; + -webkit-transform: scaleY(.5); + -webkit-transform-origin: 0 0; +} + +.kpxm_li .xmmc { + width: 35%; + color: #333; + display: inline-block; + line-height: 0.7rem; + letter-spacing: -0.68px; +} + +.kpxm_li .xmje { + width: 65%; + float: right; + text-align: right; +} + +/*纳税人识别号为空弹框*/ +.nsrsh_model, +.search_shade { + width: 100%; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1000; + background: rgba(0, 0, 0, 0.7); + display: none; +} + +.search_shade { + background: transparent; +} + +.nsrsh_border { + width: 5.9rem; + height: 3.9rem; + font-size: 0.28rem; + color: #666; + line-height: 0.41rem; + background: #FFF; + border-radius: 0.08rem; + margin: 2.8rem auto; + padding: 0.6rem 0.3rem 0; + letter-spacing: -0.68px; + box-sizing: border-box; + position: relative; +} + +.nsrsh_border div.nsrsh_sure { + width: 92%; + height: 1.08rem; + line-height: 1.08rem; + text-align: center; + position: absolute; + bottom: 0; + left: 0; + border-top: 1px solid #E9E9E9; + margin-left: 4%; + font-size: 0.34rem; + color: #FFAA00; +} + +/*发票类型模态框*/ +.freQuestion_shade, +.invoiceDescript_shade, +.viewExample_shade { + width: 100%; + height: 100%; + position: fixed; + top: 100%; + right: 0; + bottom: 0; + left: 0; + z-index: 1000; + background: rgba(0, 0, 0, 0.7); +} + +/*开票说明弹框 + 常见问题弹框*/ +.freQuestion_shade { + overflow: auto; +} + +.freQuestion_content, +.invoiceDescript_content { + width: 92%; + margin: 2.8rem auto; + color: #fff; + font-size: 0.28rem; +} + +.freQuestion_content { + margin: 0.8rem auto 0; + height: 85%; + overflow: auto; +} + +.freQuestion_content ul { + margin-bottom: 0.3rem; +} + +.freQuestion_content p, +.invoiceDescript_content p { + text-indent: 2em; + margin-bottom: 0.3rem; + line-height: 0.4rem; +} + +.freQuestion_content img, +.invoiceDescript_content img, +.viewExample_shade .viewExample_close { + width: 0.37rem; + height: 0.37rem; + position: absolute; + bottom: 0.4rem; + left: 50%; + margin-left: -0.185rem; +} + +/*点击提交弹框*/ +.seeCardMsg_shade { + width: 100%; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1000; + background: rgba(0, 0, 0, 0.7); + display: none; + overflow: auto; +} + +.seeCard_content { + width: 5.9rem; + height: auto; + background: #FFFFFF; + border-radius: 0.08rem; + margin: 2rem auto 0; + font-size: 0.28rem; + padding: 0.4rem 0.2rem 0 0.2rem; + box-sizing: border-box; + color: #666; + z-index: 10000; +} + +.seeCard_content p { + color: #333333; + text-align: center; + padding-bottom: 0.4rem; +} + +.seeCard_ul { + padding-bottom: 0.3rem; +} + +.seeCard_ul li { + line-height: 0.6rem; + clear: both; + letter-spacing: -0.68px; +} + +.seeCard_ul li .name { + display: inline-block; + width: 42%; + text-align: left; + color: #A5A5A5; + float: left; +} + +.seeCard_ul li .name_val { + width: 58%; + display: inline-block; + text-align: left; + color: #666; + line-height: 0.4rem; + word-break: break-word; +} + +.Mes_ul { + display: flex; + border-top: 1px solid #E9E9E9; + height: 1.08rem; + line-height: 1.08rem; + position: relative; +} + +.Mes_ul .seeCard_line { + width: 1px; + height: 0.48rem; + background: #E9E9E9; + position: absolute; + bottom: 0.3rem; + left: 50%; +} + +.Mes_ul .seeCard_noSure, +.Mes_ul .seeCard_sure { + flex: 1; + text-align: center; + font-size: 0.34rem; +} + +.Mes_ul .seeCard_noSure { + color: #A5A5A5; +} + +.Mes_ul .seeCard_sure { + color: #FFAA00; +} + + +/*更多信息*/ +.moreMsg_ul { + background-color: #fff; + height: 3.2rem; + position: relative; +} + +.viewExample { + font-size: 0.24rem; + color: #FFAA00; + letter-spacing: -0.58px; + position: absolute; + top: 0.2rem; + right: 0.3rem; +} + +.moreMsg_bottom { + position: relative; + height: calc(100vh - 3.2rem); + padding-top: 1.6rem; +} + +.moreMsg_click { + margin: 0 auto; +} + +.viewExample_pic { + width: 100%; + margin: 2.8rem auto 0; +} + +.markBox { + border-bottom: 0.14rem solid #F7F7F7; + font-size: 0.28rem; + padding-left: 4%; + line-height: 0.8rem; +} + +.markBox textarea { + width: 62%; + border: none; + resize: none; + font-size: 0.28rem; + letter-spacing: -0.68px; + color: #666; + overflow: hidden; + padding-top: 0.2rem; + min-height: 0.35rem; +} + +.markBox textarea::-webkit-input-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +.markBox textarea::-ms-input-placeholder { + font-size: 0.28rem; + color: #A5A5A5; +} + +/*异常页样式expiryEWM.html+exception.html*/ +.busy_info { + color: #666; + font-size: 0.28rem; + text-align: center; +} + +.error_icon { + width: 1.65rem; + height: 2.15rem; + margin-top: 1.4rem; +} + +.error_tip { + width: 92%; + padding-bottom: 0.5rem; + margin-top: 0.3rem; + margin-left: 4%; +} + +.myInvoice_con { + width: 3.38rem; + height: auto; + position: absolute; + top: 45.9%; + left: 50%; + margin-left: -1.69rem; +} + +.myInvoice_pic { + width: 100%; + height: 3.38rem; +} + +.myInvoice_tip { + margin-top: 0.3rem; + width: 3.68rem; + margin-left: -0.1rem; +} + +.bottom_con { + position: absolute; + bottom: 0.2rem; + left: 50%; + margin-left: -2.4rem; + text-align: center; + color: #A5A5A5; + font-size: 0.24rem; +} + +.merge_click { + display: none; + width: 41.5%; + height: 0.7rem; + /* background: url(../../image/wxscaninvoice/Group.png) no-repeat; */ + background-size: 100% 100%; + line-height: 0.74rem; + text-align: center; + color: rgb(252, 203, 106); + border: 1px solid rgb(252, 203, 106); + margin: 0.2rem auto; +} + +.mergeShow { + width: 47.7%; +} diff --git a/html/wxscaninvoice/Followorder.html b/html/wxscaninvoice/Followorder.html new file mode 100644 index 0000000..f661ce7 --- /dev/null +++ b/html/wxscaninvoice/Followorder.html @@ -0,0 +1,108 @@ + + + + + + + + 发票开具 + + + + +
+
+ +

发票开具申请已提交,请关注
+ 公众号或联系商家
,了解更多发票状态

+ +

温馨提示:长按识别二维码后关注公众号

+
+
+ +

发票开具申请已提交,请关注【我的发票】
+ 公众号或联系商家
,了解更多发票状态

+ +

温馨提示:长按识别二维码后关注"我的发票"

+
+
+ + + + + + + + diff --git a/html/wxscaninvoice/exception.html b/html/wxscaninvoice/exception.html new file mode 100644 index 0000000..b496f21 --- /dev/null +++ b/html/wxscaninvoice/exception.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +
+ +

+
+ +

长按识别二维码后关注公众号

+
+
+

如问题无法解决,请联系商家或拨打客服电话

+

400-8198018

+
+
+ + + + diff --git a/html/wxscaninvoice/expiryEWM.html b/html/wxscaninvoice/expiryEWM.html new file mode 100644 index 0000000..11108c7 --- /dev/null +++ b/html/wxscaninvoice/expiryEWM.html @@ -0,0 +1,24 @@ + + + + + + + + + + +
+ +

二维码已失效

+
+ +

长按关注【我的发票】

+
+
+

如问题无法解决,请联系商家或拨打客服电话

+

400-XXXXXX

+
+
+ + diff --git a/html/wxscaninvoice/invoicePreview.html b/html/wxscaninvoice/invoicePreview.html new file mode 100644 index 0000000..bedb1d5 --- /dev/null +++ b/html/wxscaninvoice/invoicePreview.html @@ -0,0 +1,66 @@ + + + + + + + + 发票预览 + + +
+
+ + + + + + diff --git a/html/wxscaninvoice/merge.html b/html/wxscaninvoice/merge.html new file mode 100644 index 0000000..e72f6f1 --- /dev/null +++ b/html/wxscaninvoice/merge.html @@ -0,0 +1,92 @@ + + + + + + + + 合并开票 + + + + + +
+ +
+
+
+
+ + 加载中... +
+
+ 删除订单后将不能恢复,确定删除吗? +
+ 取消 + 确定 +
+
+
+ 所选订单为{{ orderQuantity }}个纳税人主体,将开具{{ orderQuantity }}张发票 +
+ 确定 +
+
+
+ 查看开票历史 + 删除 +
+
+
    +
  • +
    +
    + +
    +
    + 添加时间 + 销方名称 + 开票项目 + 开票金额 +
    +
    + {{ v.addTime }} + {{ v.name }} + {{ v.billingItem }} + {{ v.money }} +
    +
    +
  • +
+
+ +
+ + + + + + + + diff --git a/html/wxscaninvoice/moreMsgFillIn.html b/html/wxscaninvoice/moreMsgFillIn.html new file mode 100644 index 0000000..158e533 --- /dev/null +++ b/html/wxscaninvoice/moreMsgFillIn.html @@ -0,0 +1,61 @@ + + + + + + + + 更多 + + +
+ 备注说明 + +
+ + +
+

查看示例

+
确认
+
+ + +
+ + +
+ + + +
+ + diff --git a/html/wxscaninvoice/successTip.html b/html/wxscaninvoice/successTip.html new file mode 100644 index 0000000..d13d4a1 --- /dev/null +++ b/html/wxscaninvoice/successTip.html @@ -0,0 +1,31 @@ + + + + + + + 发票开具 + + + +
+ +

发票开具申请已提交,商家审核中…


+
+ + + diff --git a/html/wxscaninvoice/transferPage.html b/html/wxscaninvoice/transferPage.html new file mode 100644 index 0000000..32e0175 --- /dev/null +++ b/html/wxscaninvoice/transferPage.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/html/wxscaninvoice/writing.html b/html/wxscaninvoice/writing.html new file mode 100644 index 0000000..38a5a0e --- /dev/null +++ b/html/wxscaninvoice/writing.html @@ -0,0 +1,281 @@ + + + + + + + + + + 发票开具 + + + +
+ + + + + + + + + + + + + +
+ 开票说明 + 常见问题 +
+
+
+
添加合并
+
提交
+
+ + +
+
+ 按照国税总局公告,从2017年7月1日起,企业在索取发票时,应提供纳税人识别号或统一社会信用代码,请核实是否已填列,若无有关证号,请至“个人/其他”抬头类型处开具发票。 +
确定
+
+
+ + +
+
+

1、根据国家税务总局公告2015年第84号的规定,增值税电子普通发票的法律效力、基本用途、基本使用规定等于税务机关监制的增值税普通发票相同。

+

2、开票项目过多时,如需确认开票项目,请在提交前确认。

+

3、暂不支持纸质发票邮寄功能,如需开具纸质发票,请咨询商家收取发票。

+

4、发票申请提交后无法修改,如信息有误请联系商家修改。

+ +
+
+ + +
+
+
    +
  • 问题:没有收到电子发票?
  • +
  • 回答:请联系商家,让商家进行电子发票补推。
  • +
+
    +
  • 问题:发票重新开具?
  • +
  • 回答:请联系商家,和商家协商解决。
  • +
+
    +
  • 问题:电子普通发票和纸质普通发票,法律效力一样吗?
  • +
  • 回答:增值税电子普通发票的法律效力、基本用途、基本使用规定等与税务机关监制的增值税普通发票相同,因此可以使用。
  • +
+
    +
  • 问题:在哪里可以查询到发票的真伪?
  • +
  • 回答:
  • +
  • (1)可以拨打12366纳税服务咨询电话;
  • +
  • (2)可以登录全国增值税发票查验平台(https://inv-veri.chinatax.gov.cn)进行发票信息一致性查询;
  • +
  • (3)可以携带发票原件到主管税务机关进行真伪鉴定;
  • +
  • (4)关注“我的发票”公众号,也可以一键查验发票真伪。
  • +
+
    +
  • 问题:增值税普通发票和专用发票有何不同?
  • +
  • 回答:增值税专用发票和普通发票主要在以下方面存在区别:
  • +
  • (1)开具发票所需信息不同,增值税专用发票需要购货方详细的资料信息(税号,企业基本账户开户行以及账号,地址联系方式),而普通发票只需要提供购货方名称和税号;
  • +
  • (2)发票的作用不同:增值税专用发票不仅是购销双方收付款的凭证,而且可以用作购买方扣除增值税的凭证;而普通发票不能用于抵扣增值税税款;
  • +
  • (3)发票使用的主体不同:增值税专用发票一般只能由增值税一般纳税人领购使用,小规模纳税人需要使用的,只能经税务机关批准后由当地的税务机关代开;普通发票则可以由从事经营活动并办理了税务登记的各种纳税人领购使用。 +
  • +
+
    +
  • 问题:使用电子发票有什么好处?
  • +
  • + 回答:对开票企业的好处:电子发票不需要纸质载体,没有印制、打印、存储和邮寄等成本,可以节约相关费用;对消费者的好处:可以在发生交易的同时收取电子发票,并可根据需要,在税务机关网站查询验证发票信息。在凭电子发票进行报销、入账及相关售后维修服务时,可以对电子发票进行下载或打印,解决了纸质发票查询和保存不便的缺陷。 +
  • +
+
    +
  • 问题:请问增值税专用发票,由于开票错误,需要开具红字发票,是否有时间限制?
  • +
  • 回答:纳税人开具增值税专用发票后,发生销货退回、开票有误、应税服务中止等情形但不符合发票作废条件,或者因销货部分退回及发生销售折让,可以开具红字增值税专用发票的,没有时间限制。
  • +
+ +
+
+ + +
+
+

确认开票申请

+
    +
  • + 发票抬头 + +
  • +
  • + 纳税人识别号 + +
  • +
  • + 手机 + +
  • + +
  • + 注册地址 + +
  • +
  • + 注册电话 + +
  • +
  • + 开户银行 + +
  • +
  • + 开户账号 + +
  • +
  • + 发票类型 + +
  • +
  • + 金额 + +
  • +
  • + 开票项目 + +
  • +
  • + 备注 + +
  • +
+
+ 返回修改 + + 确定 +
+
+
+ + + + + + + + + + + + + + diff --git a/image/common/timg.gif b/image/common/timg.gif new file mode 100644 index 0000000..a2b0931 Binary files /dev/null and b/image/common/timg.gif differ diff --git a/image/wxscaninvoice/Group.png b/image/wxscaninvoice/Group.png new file mode 100644 index 0000000..17e6b92 Binary files /dev/null and b/image/wxscaninvoice/Group.png differ diff --git a/image/wxscaninvoice/Oval5.png b/image/wxscaninvoice/Oval5.png new file mode 100644 index 0000000..c09c565 Binary files /dev/null and b/image/wxscaninvoice/Oval5.png differ diff --git a/image/wxscaninvoice/close.png b/image/wxscaninvoice/close.png new file mode 100644 index 0000000..ebaab8f Binary files /dev/null and b/image/wxscaninvoice/close.png differ diff --git a/image/wxscaninvoice/down.png b/image/wxscaninvoice/down.png new file mode 100644 index 0000000..7e0ad47 Binary files /dev/null and b/image/wxscaninvoice/down.png differ diff --git a/image/wxscaninvoice/error_icon.png b/image/wxscaninvoice/error_icon.png new file mode 100644 index 0000000..cfafbe3 Binary files /dev/null and b/image/wxscaninvoice/error_icon.png differ diff --git a/image/wxscaninvoice/faliure.png b/image/wxscaninvoice/faliure.png new file mode 100644 index 0000000..bf7887e Binary files /dev/null and b/image/wxscaninvoice/faliure.png differ diff --git a/image/wxscaninvoice/footer-bg.png b/image/wxscaninvoice/footer-bg.png new file mode 100644 index 0000000..82c0423 Binary files /dev/null and b/image/wxscaninvoice/footer-bg.png differ diff --git a/image/wxscaninvoice/fptt_close.png b/image/wxscaninvoice/fptt_close.png new file mode 100644 index 0000000..b3817c0 Binary files /dev/null and b/image/wxscaninvoice/fptt_close.png differ diff --git a/image/wxscaninvoice/list_icon_right.png b/image/wxscaninvoice/list_icon_right.png new file mode 100644 index 0000000..224ec07 Binary files /dev/null and b/image/wxscaninvoice/list_icon_right.png differ diff --git a/image/wxscaninvoice/logo.jpg b/image/wxscaninvoice/logo.jpg new file mode 100644 index 0000000..7753385 Binary files /dev/null and b/image/wxscaninvoice/logo.jpg differ diff --git a/image/wxscaninvoice/myInvoice.png b/image/wxscaninvoice/myInvoice.png new file mode 100644 index 0000000..a9c1174 Binary files /dev/null and b/image/wxscaninvoice/myInvoice.png differ diff --git a/image/wxscaninvoice/myfp_16.png b/image/wxscaninvoice/myfp_16.png new file mode 100644 index 0000000..0a8ccbe Binary files /dev/null and b/image/wxscaninvoice/myfp_16.png differ diff --git a/image/wxscaninvoice/right.png b/image/wxscaninvoice/right.png new file mode 100644 index 0000000..d2a394f Binary files /dev/null and b/image/wxscaninvoice/right.png differ diff --git a/image/wxscaninvoice/sl_home.jpg b/image/wxscaninvoice/sl_home.jpg new file mode 100644 index 0000000..f07ae9f Binary files /dev/null and b/image/wxscaninvoice/sl_home.jpg differ diff --git a/image/wxscaninvoice/sl_subscribe.jpg b/image/wxscaninvoice/sl_subscribe.jpg new file mode 100644 index 0000000..6ccab1a Binary files /dev/null and b/image/wxscaninvoice/sl_subscribe.jpg differ diff --git a/image/wxscaninvoice/success.png b/image/wxscaninvoice/success.png new file mode 100644 index 0000000..367f86e Binary files /dev/null and b/image/wxscaninvoice/success.png differ diff --git a/image/wxscaninvoice/up.png b/image/wxscaninvoice/up.png new file mode 100644 index 0000000..c582949 Binary files /dev/null and b/image/wxscaninvoice/up.png differ diff --git a/image/wxscaninvoice/viewExample.png b/image/wxscaninvoice/viewExample.png new file mode 100644 index 0000000..2de5039 Binary files /dev/null and b/image/wxscaninvoice/viewExample.png differ diff --git a/js/common/base.js b/js/common/base.js new file mode 100644 index 0000000..61e09a5 --- /dev/null +++ b/js/common/base.js @@ -0,0 +1,470 @@ +// var uid = localStorage.getItem('uid'); +// var token = localStorage.getItem('token'); +const openId = localStorage.getItem('openId'); + +/*线上全局配置变量*/ +const config = { + baseUrl: '/wxkf', + //本项目域名 + projectUrl: "/order-api", + // projectUrl: "/ysy1", + + wxscanUrl: "/wxscaninvoice", + + //销项基础服务 + simsBaseUrl: "/base-service", + + //接口域名以及项目名称 + interfaceUrl: "/ele-myinvoice", + + //发票列表票夹 + myinvoiceUrl: "/my-invoice", + + //微信服务地址 + wxservicePath: "http://wdfp.5ifapiao.com/wxservice", + + wxserviceTestPath: '/wxservice', + + //发票名片接口地址 + invoiceCardUrl: "/myinvoice-invoice-card", + + //账号相关接口地址 + accountUrl: "/myinvoice-account", + + //企业logo获取地址 + logoUrl: "/myinvoice-data" + + +}; + +// /*测试全局配置变量*/ +// var config = { +// baseUrl: 'http://sims.ele-cloud.com.com', +// //本项目域名 +// projectUrl: "http://test.5ifapiao.com:8888/order-api", +// // projectUrl:"https://sims.ele-cloud.com.com/wxscaninvoice", +// +// +// wxscanUrl: "http://test.5ifapiao.com:8888/wxscaninvoice", +// +// //接口域名以及项目名称 +// // interfaceUrl: "https://sims.ele-cloud.com.com/ele-myinvoice", +// interfaceUrl: "http://test.5ifapiao.com:8888/ele-myinvoice", +// +// //发票列表票夹 +// // myinvoiceUrl:"http://sims.ele-cloud.com.com/my-invoice-lyang", +// myinvoiceUrl: "http://sims.ele-cloud.com.com/my-invoice", +// +// //微信服务地址 +// // wxservicePath: "https://wdfp.5ifapiao.com/wxservice", +// wxservicePath: "http://wdfp.5ifapiao.com/wxservice", +// +// //发票名片接口地址 +// // invoiceCardUrl: "https://sims.ele-cloud.com.com/myinvoice-invoice-card", +// invoiceCardUrl: "http://test.5ifapiao.com:8888/myinvoice-invoice-card", +// +// //账号相关接口地址 +// // accountUrl: "https://sims.ele-cloud.com.com/myinvoice-account", +// accountUrl: "http://test.5ifapiao.com:8888/myinvoice-account", +// +// //企业logo获取地址 +// // logoUrl: "https://sims.ele-cloud.com.com/myinvoice-data" +// logoUrl: "http://test.5ifapiao.com:8888/myinvoice-data" +// +// +// }; + +//请求头类型 +function getProtocol() { + return window.location.protocol + "//"; +} + +//域名:端口 +function getHost() { + return window.location.host; //localhost:8080 +} + +//跳转页面 +function toPage(page) { + window.location.href = getPreUrl() + page; +} + +function getPreUrl() { + return getProtocol() + getHost() + '/' + getProjectName(); +} + +function getProjectName() { + const relativePath = location.pathname; + const tmp = relativePath.split("/"); + if (tmp[1].length === 0) { + return tmp[2]; + } else { + return tmp[1]; + } +} + +function updateUrlParam(num) { + const params = new URLSearchParams(location.search.slice(1)); + params.set('type', ''); + window.history.replaceState({}, '', `${location.pathname}?${params + location.hash}`); +} + +//获取url参数的value getUrlArgumentValue(参数名称) +function getUrlArgumentValue(name) { + const hash = window.location.hash; + if (hash !== "" && name === 'code') { //路径中有锚点 不能直接获取到 参数 + if (hash.indexOf('&') > 0) { + return hash.split('&')[1].split('=')[1]; + } else { + return hash.split('?')[1].split('=')[1]; + } + } + if (hash !== "" && name === 'path') { + return window.location.search.substr(6).split("?")[0] + hash.split('&')[0]; + } + const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + const r = window.location.search.substr(1).match(reg); + if (r != null) { + return unescape(r[2]) + hash; + } else { + return null; + } +} + +//获取url参数列表 数组 +function getUrlArgumentArr() { + let name, value; + let str = location.href; //取得整个地址栏 + let num = str.indexOf("?"); + str = str.substr(num + 1); //取得所有参数 stringvar.substr(start [, length ] + + const arr = str.split("&"); //各个参数放到数组里 + for (let i = 0; i < arr.length; i++) { + num = arr[i].indexOf("="); + if (num > 0) { + name = arr[i].substring(0, num); + value = arr[i].substr(num + 1); + this[name] = value; + } + } + return arr; +} + +//获取微信code 重定向返回当前页面 重定向回来后 有code 通过code获取openid 和 token +function getOpenidOrToken() { + const pathCode = encodeURIComponent(window.location.href); + if (pathCode.indexOf("%26code%3D") < 0 || pathCode.indexOf("%3fcode%3D") < 0) { + window.location.href = config.wxservicePath + '/api/toGetUserInfo?type=1&path=' + pathCode; + } + //basejs中获取地址参数值 + const code = getUrlArgumentValue("code"); + + //掉后台接口 通过code获取oppentId-->token + if (code != null && code !== '') { + $.ajax({ + type: 'POST', + data: { + "code": code + }, + dataType: 'JSON', + url: config.accountUrl + '/account/wx/getOpenId', + async: false, + header: { + 'content-type': 'application/x-www-form-urlencoded' + }, // 设置请求的 header + success: function (data) { + info = data.data; + localStorage.setItem('openId', info.user); + localStorage.setItem("token", info.token); + } + }) + } +} + +function getUnionIdAndOpenId() { + const pathCode = encodeURIComponent(window.location.href); + if (pathCode.indexOf("%26code%3D") < 0 || pathCode.indexOf("%3fcode%3D") < 0) { + window.location.href = config.wxservicePath + '/api/toGetUserInfo?type=1&path=' + pathCode; + } + //basejs中获取地址参数值 + const code = getUrlArgumentValue("code"); + if (code != null && code !== '') { + $.ajax({ + type: "get", + url: config.accountUrl + '/account/wx/getOpenId?code=' + code, + async: false, + success: function (data) { + return data; + } + }); + } +} + +//获取code并获取用户信息 +function getUserInfoCode(appid) { + let code = ""; + const pathCode = encodeURIComponent(window.location.href); + if (pathCode.indexOf("%26code%3D") >= 0 || pathCode.indexOf("%3fcode%3D") >= 0) { + code = getUrlArgumentValue("code"); + } else { + if (appid == null) { + window.location.href = config.wxservicePath + '/api/toGetUserInfo?type=1&path=' + pathCode; + } else { + window.location.href = config.wxservicePath + '/api/toGetUserInfo?type=1&path=' + pathCode + "&appid=" + appid; + } + } + //获取用户信息 + if (code != null && code !== '') { + $.ajax({ + type: "post", + url: config.wxserviceTestPath + "/api/getUserInfo", + data: JSON.stringify({ + "code": code, + "type": "1", + "gzh_appid": appid + }), + contentType: "application/json;charset=utf-8", + dataType: "json", + async: false, + success: function (data) { + }, + complete: function (xml) { + const responseText = JSON.parse(xml.responseText); + if (xml.status === 200) { + const subscribe = responseText.subscribe; + const openId = responseText.openid; + const unionId = responseText.unionid; + window.localStorage.setItem('openId', openId); + window.localStorage.setItem('subscribe', subscribe); + window.localStorage.setItem('unionId', unionId); + //登陆成功调jsp列表 + // pathCode1 = decodeURIComponent(pathCode); + // pathCode = getUrlArgumentValue("path"); + // if (pathCode != null) { + // window.location.replace(pathCode); + // } else { + // window.location.replace(pathCode1); + // } + } else { + alert_timing_open(getCodeInfo(responseText.code)); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + alert_loading_close(); + alert_timing_open('登录失败请重新登录'); + }, + }) + } +} + +//弹框 title:标题, description:描述, type:1显示确认 2显示确认取消 +function alert_prompt_open(title, description, type) { + const body = document.getElementsByTagName('body')[0]; + const sub = (type === "1" ? '
' + + '确定' + + '
' : + '
' + + '取消' + + '确定' + + '
'); + + const str = '
' + + '
' + + '
' + + '
' + + '
' + title + '
' + + '' + description + '' + + '
' + + sub + + '
' + + '
' + + '
'; + body.insertAdjacentHTML('beforeend', str); +} + +//关闭弹框 +function alert_prompt_close() { + const body = document.getElementsByTagName('body')[0]; + const open = document.getElementsByClassName('alert_prompt_open')[0]; + body.removeChild(open); +} + +//打开load弹框 +function alert_loading_open(info) { + const body = document.getElementsByTagName('body')[0]; + if (body !== undefined) { + var info = info != null ? info : '请等待...'; + const str = '
' + + '
' + + '
' + + '' + + '' + info + '' + + '
' + + '
' + + '
'; + body.insertAdjacentHTML('beforeend', str); + } +} + +//关闭load弹框 +function alert_loading_close() { + const body = document.getElementsByTagName('body')[0]; + const open = document.getElementsByClassName('alert_loading_open')[0]; + if (open !== undefined) { + body.removeChild(open); + } +} + +//定时自动关闭弹框 +function alert_timing_open(info) { + const body = document.getElementsByTagName('body')[0]; + const str = + '
' + + '
' + + info + + '
' + + '
'; + body.insertAdjacentHTML('beforeend', str); + setTimeout(function () { + const body = document.getElementsByTagName('body')[0]; + const open = document.getElementsByClassName('toast_box')[0]; + body.removeChild(open); + }, 2000); +} + +//处理键盘弹出 收起影响的元素 +function monitorKeyboard(element) { + const h = document.body.clientHeight; + window.onresize = function () { + if (document.documentElement.clientHeight < h) { + $(element).hide(); + } else { + $(element).show(); + } + }; +} + +//处理键盘弹出 收起影响的元素 +function monitorKeyboardScroll(element) { + const h = document.body.scrollHeight; //屏幕高度 + window.onresize = function () { + if (document.body.scrollHeight < h) { + $(element).hide(); + } else { + $(element).show(); + } + }; +} + +//设置token 和 uid +function setTokenOrUid(token, uid) { + window.localStorage.setItem('token', token); + window.localStorage.setItem('uid', uid); +} + + +/** + * 功能:通过 .class #id div 获取元素 class 与 div 返回arr + * @param ele : .class + * @param ele : #id + * @param ele : div + */ +function getEle(ele) { + const indexStusD = ele.indexOf('.'); + const indexStusJ = ele.indexOf('#'); + if (indexStusD !== -1) { + var ele = ele.split('.')[1]; + return document.getElementsByClassName(ele); + } else if (indexStusJ !== -1) { + var ele = ele.split('#')[1]; + return document.getElementById(ele); + } else if (indexStusD === -1 && indexStusJ === -1) { + return document.getElementsByTagName(ele); + } +} + +//设置token 和 uid +function setTokenOrUid(token, uid) { + window.localStorage.setItem('token', token); + window.localStorage.setItem('uid', uid); + this.token = token; + this.uid = uid; +} + +/*input框日历控件软键盘同时出现*/ +function cancelRili(cancelId) { + $("#" + cancelId).blur(); +} + +/*时间戳转换成日期格式*/ +function fmtDate(obj) { + const date = new Date(obj); + const y = 1900 + date.getYear(); + const m = "0" + (date.getMonth() + 1); + const d = "0" + date.getDate(); + return y + "-" + m.substring(m.length - 2, m.length) + "-" + d.substring(d.length - 2, d.length); +} + +/*时间戳转换成日期加时间*/ +function getdate(obj) { + const now = new Date(obj), + y = now.getFullYear(), + m = ("0" + (now.getMonth() + 1)).slice(-2), + d = ("0" + now.getDate()).slice(-2); + return y + "-" + m + "-" + d + " " + now.toTimeString().substr(0, 8); +} + +/*保留两位小数*/ +function changeTwoDecimal_f(x) { + var f_x = parseFloat(x); + if (isNaN(f_x)) { + return 0; + } + var f_x = Math.round(x * 100) / 100; + let s_x = f_x.toString(); + let pos_decimal = s_x.indexOf('.'); + if (pos_decimal < 0) { + pos_decimal = s_x.length; + s_x += '.'; + } + while (s_x.length <= pos_decimal + 2) { + s_x += '0'; + } + return s_x; +} + +function isWeiXin() { + const ua = window.navigator.userAgent.toLowerCase(); + return ua.indexOf('micromessenger') !== -1; +} + + +// AES加密 +function encrypt(plaintText,key) { + + let aesKey = CryptoJS.enc.Utf8.parse(key); + let encryptedData = CryptoJS.AES.encrypt(plaintText, aesKey, { + iv: CryptoJS.enc.Utf8.parse("6543210987654321"), + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + encryptedData = encryptedData.ciphertext.toString(); + let encryptedHexStr = CryptoJS.enc.Hex.parse(encryptedData); + return CryptoJS.enc.Base64.stringify(encryptedHexStr); + +} + +// AES解密 +function decrypt(encryptedData,key) { + + let aesKey = CryptoJS.enc.Utf8.parse(key); + let encryptedHexStr = CryptoJS.enc.Hex.parse(encryptedData); + let encryptedBase64Str = CryptoJS.enc.Base64.stringify(encryptedHexStr) + const decryptedData = CryptoJS.AES.decrypt(encryptedBase64Str, aesKey, { + iv: CryptoJS.enc.Utf8.parse("6543210987654321"), + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + return decryptedData.toString(CryptoJS.enc.Utf8); + +} diff --git a/js/iosSelect.js b/js/iosSelect.js new file mode 100644 index 0000000..1e86281 --- /dev/null +++ b/js/iosSelect.js @@ -0,0 +1,1752 @@ +/** + * IosSelect + * @param {number} level 选择的层级 1 2 3 4 5 6 最多支持6层 + * @param {...Array} data [oneLevelData[, twoLevelData[, threeLevelData[, fourLevelData[, fiveLevelData[, sixLevelData]]]]]] 可以用数组,也可以用方法 + * @param {Object} options + * @param {string=} options.container 组件插入到该元素下 可选 + * @param {Function} options.callback 选择完毕后的回调函数 + * @param {Function} options.fallback 选择取消后的回调函数 + * @param {string=} options.title 选择框title + * @param {number=} options.itemHeight 每一项的高度,默认 35 + * @param {number=} options.itemShowCount 组件展示的项数,默认 7,可选3,5,7,9,不过不是3,5,7,9则展示7项 + * @param {number=} options.headerHeight 组件标题栏高度 默认 44 + * @param {css=} options.cssUnit px或者rem 默认是px + * @param {string=} options.addClassName 组件额外类名 用于自定义样式 + * @param {...Array=} options.relation 数组 [oneTwoRelation, twoThreeRelation, threeFourRelation, fourFiveRelation] 默认值:[0, 0, 0, 0, 0, 0] + * @param {number=} options.relation.oneTwoRelation 第一列和第二列是否通过parentId关联 + * @param {number=} options.relation.twoThreeRelation 第二列和第三列是否通过parentId关联 + * @param {number=} options.relation.threeFourRelation 第三列和第四列是否通过parentId关联 + * @param {number=} options.relation.fourFiveRelation 第四列和第五列是否通过parentId关联 + * @param {number=} options.relation.fiveSixRelation 第五列和第六列是否通过parentId关联 + * @param {string=} options.oneLevelId 第一级选中id + * @param {string=} options.twoLevelId 第二级选中id + * @param {string=} options.threeLevelId 第三级选中id + * @param {string=} options.fourLevelId 第四级选中id + * @param {string=} options.fiveLevelId 第五级选中id + * @param {string=} options.sixLevelId 第六级选中id + * @param {boolean=} options.showLoading 如果你的数据是异步加载的,可以使用该参数设置为true,下拉菜单会有加载中的效果 + * @param {boolean=} options.showAnimate 是否需要入场动画和退场动画,如需自定义动画效果,请修改css + */ +(function() { + /* modify by zhoushengmufc,based on iScroll v5.2.0 */ + const rAF = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + window.setTimeout(callback, 1000 / 60); + }; + + const utils = (function () { + const me = {}; + const _elementStyle = document.createElement('div').style; + const _vendor = (function () { + const vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT']; + let transform, + i = 0; + const l = vendors.length; + + for (; i < l; i++) { + transform = vendors[i] + 'ransform'; + if (transform in _elementStyle) return vendors[i].substr(0, vendors[i].length - 1); + } + return false; + })(); + + function _prefixStyle(style) { + if (_vendor === false) return false; + if (_vendor === '') return style; + return _vendor + style.charAt(0).toUpperCase() + style.substr(1); + } + + me.getTime = Date.now || function getTime() { + return new Date().getTime(); + }; + + me.extend = function (target, obj) { + for (let i in obj) { + target[i] = obj[i]; + } + }; + + me.addEvent = function (el, type, fn, capture) { + el.addEventListener(type, fn, !!capture); + }; + + me.removeEvent = function (el, type, fn, capture) { + el.removeEventListener(type, fn, !!capture); + }; + + me.prefixPointerEvent = function (pointerEvent) { + return window.MSPointerEvent ? + 'MSPointer' + pointerEvent.charAt(7).toUpperCase() + pointerEvent.substr(8) : + pointerEvent; + }; + + me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) { + let distance = current - start; + const speed = Math.abs(distance) / time; + let destination, + duration; + deceleration = deceleration === undefined ? 0.0006 : deceleration; + destination = current + (speed * speed) / (2 * deceleration) * (distance < 0 ? -1 : 1); + duration = speed / deceleration; + + if (destination < lowerMargin) { + destination = wrapperSize ? lowerMargin - (wrapperSize / 2.5 * (speed / 8)) : lowerMargin; + distance = Math.abs(destination - current); + duration = distance / speed; + } else if (destination > 0) { + destination = wrapperSize ? wrapperSize / 2.5 * (speed / 8) : 0; + distance = Math.abs(current) + destination; + duration = distance / speed; + } + return { + destination: Math.round(destination), + duration: duration + }; + }; + + const _transform = _prefixStyle('transform'); + me.extend(me, { + hasTransform: _transform !== false, + hasPerspective: _prefixStyle('perspective') in _elementStyle, + hasTouch: 'ontouchstart' in window, + hasPointer: !!(window.PointerEvent || window.MSPointerEvent), // IE10 is prefixed + hasTransition: _prefixStyle('transition') in _elementStyle + }); + /* + This should find all Android browsers lower than build 535.19 (both stock browser and webview) + - galaxy S2 is ok + - 2.3.6 : `AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1` + - 4.0.4 : `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30` + - galaxy S3 is badAndroid (stock brower, webview) + `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30` + - galaxy S4 is badAndroid (stock brower, webview) + `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30` + - galaxy S5 is OK + `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)` + - galaxy S6 is OK + `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)` + */ + me.isBadAndroid = (function () { + const appVersion = window.navigator.appVersion; + // Android browser is not a Chrome browser. + if (/Android/.test(appVersion) && !(/Chrome\/\d/.test(appVersion))) { + const safariVersion = appVersion.match(/Safari\/(\d+.\d)/); + if (safariVersion && typeof safariVersion === "object" && safariVersion.length >= 2) { + return parseFloat(safariVersion[1]) < 535.19; + } else { + return true; + } + } else { + return false; + } + })(); + + me.extend(me.style = {}, { + transform: _transform, + transitionTimingFunction: _prefixStyle('transitionTimingFunction'), + transitionDuration: _prefixStyle('transitionDuration'), + transitionDelay: _prefixStyle('transitionDelay'), + transformOrigin: _prefixStyle('transformOrigin') + }); + + me.hasClass = function (e, c) { + const re = new RegExp("(^|\\s)" + c + "(\\s|$)"); + return re.test(e.className); + }; + + me.addClass = function (e, c) { + if (me.hasClass(e, c)) { + return; + } + const newclass = e.className.split(' '); + newclass.push(c); + e.className = newclass.join(' '); + }; + + me.removeClass = function (e, c) { + if (!me.hasClass(e, c)) { + return; + } + const re = new RegExp("(^|\\s)" + c + "(\\s|$)", 'g'); + e.className = e.className.replace(re, ' '); + }; + + me.offset = function (el) { + let left = -el.offsetLeft, + top = -el.offsetTop; + // jshint -W084 + while (el === el.offsetParent) { + left -= el.offsetLeft; + top -= el.offsetTop; + } + // jshint +W084 + return { + left: left, + top: top + }; + }; + + me.preventDefaultException = function (el, exceptions) { + for (let i in exceptions) { + if (exceptions[i].test(el[i])) { + return true; + } + } + return false; + }; + + me.extend(me.eventType = {}, { + touchstart: 1, + touchmove: 1, + touchend: 1, + + mousedown: 2, + mousemove: 2, + mouseup: 2, + + pointerdown: 3, + pointermove: 3, + pointerup: 3, + + MSPointerDown: 3, + MSPointerMove: 3, + MSPointerUp: 3 + }); + + me.extend(me.ease = {}, { + quadratic: { + style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', + fn: function (k) { + return k * (2 - k); + } + }, + circular: { + style: 'cubic-bezier(0.1, 0.57, 0.1, 1)', // Not properly "circular" but this looks better, it should be (0.075, 0.82, 0.165, 1) + fn: function (k) { + return Math.sqrt(1 - (--k * k)); + } + }, + back: { + style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)', + fn: function (k) { + const b = 4; + return (k = k - 1) * k * ((b + 1) * k + b) + 1; + } + }, + bounce: { + style: '', + fn: function (k) { + if ((k /= 1) < (1 / 2.75)) { + return 7.5625 * k * k; + } else if (k < (2 / 2.75)) { + return 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75; + } else if (k < (2.5 / 2.75)) { + return 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375; + } else { + return 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375; + } + } + }, + elastic: { + style: '', + fn: function (k) { + const f = 0.22, + e = 0.4; + if (k === 0) { + return 0; + } + if (k === 1) { + return 1; + } + + return (e * Math.pow(2, -10 * k) * Math.sin((k - f / 4) * (2 * Math.PI) / f) + 1); + } + } + }); + + me.tap = function (e, eventName) { + const ev = document.createEvent('Event'); + ev.initEvent(eventName, true, true); + ev.pageX = e.pageX; + ev.pageY = e.pageY; + e.target.dispatchEvent(ev); + }; + + me.click = function (e) { + const target = e.target; + let ev; + if (!(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName)) { + // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent + // initMouseEvent is deprecated. + ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event'); + ev.initEvent('click', true, true); + ev.view = e.view || window; + ev.detail = 1; + ev.screenX = target.screenX || 0; + ev.screenY = target.screenY || 0; + ev.clientX = target.clientX || 0; + ev.clientY = target.clientY || 0; + ev.ctrlKey = !!e.ctrlKey; + ev.altKey = !!e.altKey; + ev.shiftKey = !!e.shiftKey; + ev.metaKey = !!e.metaKey; + ev.button = 0; + ev.relatedTarget = null; + ev._constructed = true; + target.dispatchEvent(ev); + } + }; + return me; + })(); + + function IScrollForIosSelect (el, options) { + this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; + this.scroller = this.wrapper.children[0]; + this.scrollerStyle = this.scroller.style; // cache style for better performance + this.options = { + disablePointer: true, + disableTouch: !utils.hasTouch, + disableMouse: utils.hasTouch, + startX: 0, + startY: 0, + scrollY: true, + directionLockThreshold: 5, + momentum: true, + + bounce: true, + bounceTime: 600, + bounceEasing: '', + + preventDefault: true, + preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }, + + HWCompositing: true, + useTransition: true, + useTransform: true, + bindToWrapper: typeof window.onmousedown === "undefined" + }; + + for (let i in options ) { + this.options[i] = options[i]; + } + // Normalize options + this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : ''; + + this.options.useTransition = utils.hasTransition && this.options.useTransition; + this.options.useTransform = utils.hasTransform && this.options.useTransform; + + this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough; + this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault; + + // If you want eventPassthrough I have to lock one of the axes + this.options.scrollY = this.options.eventPassthrough === 'vertical' ? false : this.options.scrollY; + this.options.scrollX = this.options.eventPassthrough === 'horizontal' ? false : this.options.scrollX; + + // With eventPassthrough we also need lockDirection mechanism + this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough; + this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold; + + this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing; + + this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling; + + if ( this.options.tap === true ) { + this.options.tap = 'tap'; + } + + // https://github.com/cubiq/iscrollForIosSelect/issues/1029 + if (!this.options.useTransition && !this.options.useTransform) { + if(!(/relative|absolute/i).test(this.scrollerStyle.position)) { + this.scrollerStyle.position = "relative"; + } + } + + if ( this.options.shrinkScrollbars === 'scale' ) { + this.options.useTransition = false; + } + + this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1; + + if ( this.options.probeType === 3 ) { + this.options.useTransition = false; } + this.x = 0; + this.y = 0; + this.directionX = 0; + this.directionY = 0; + this._events = {}; + this._init(); + this.refresh(); + + this.scrollTo(this.options.startX, this.options.startY); + this.enable(); + } + + IScrollForIosSelect.prototype = { + version: '1.0.0', + + _init: function () { + this._initEvents(); + }, + + destroy: function () { + this._initEvents(true); + clearTimeout(this.resizeTimeout); + this.resizeTimeout = null; + this._execEvent('destroy'); + }, + + _transitionEnd: function (e) { + if ( e.target !== this.scroller || !this.isInTransition ) { + return; + } + + this._transitionTime(); + if ( !this.resetPosition(this.options.bounceTime) ) { + this.isInTransition = false; + this._execEvent('scrollEnd'); + } + }, + + _start: function (e) { + // React to left mouse button only + if ( utils.eventType[e.type] !== 1 ) { + // for button property + // http://unixpapa.com/js/mouse.html + let button; + if (!e.which) { + /* IE case */ + button = (e.button < 2) ? 0 : + ((e.button === 4) ? 1 : 2); + } else { + /* All others */ + button = e.button; + } + if ( button !== 0 ) { + return; + } + } + if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) { + return; + } + if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { + e.preventDefault(); + } + + const point = e.touches ? e.touches[0] : e; + let pos; + + this.initiated = utils.eventType[e.type]; + this.moved = false; + this.distX = 0; + this.distY = 0; + this.directionX = 0; + this.directionY = 0; + this.directionLocked = 0; + + this.startTime = utils.getTime(); + + if ( this.options.useTransition && this.isInTransition ) { + this._transitionTime(); + this.isInTransition = false; + pos = this.getComputedPosition(); + this._translate(Math.round(pos.x), Math.round(pos.y)); + this._execEvent('scrollEnd'); + } else if ( !this.options.useTransition && this.isAnimating ) { + this.isAnimating = false; + this._execEvent('scrollEnd'); + } + + this.startX = this.x; + this.startY = this.y; + this.absStartX = this.x; + this.absStartY = this.y; + this.pointX = point.pageX; + this.pointY = point.pageY; + + this._execEvent('beforeScrollStart'); + }, + + _move: function (e) { + if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { + return; + } + + if ( this.options.preventDefault ) { // increases performance on Android? TODO: check! + // e.preventDefault(); + } + + const point = e.touches ? e.touches[0] : e; + let deltaX = point.pageX - this.pointX, + deltaY = point.pageY - this.pointY; + const timestamp = utils.getTime(); + let newX, newY, + absDistX, absDistY; + + this.pointX = point.pageX; + this.pointY = point.pageY; + + this.distX += deltaX; + this.distY += deltaY; + absDistX = Math.abs(this.distX); + absDistY = Math.abs(this.distY); + + // We need to move at least 10 pixels for the scrolling to initiate + if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) { + return; + } + + // If you are scrolling in one direction lock the other + if ( !this.directionLocked && !this.options.freeScroll ) { + if ( absDistX > absDistY + this.options.directionLockThreshold ) { + this.directionLocked = 'h'; // lock horizontally + } else if ( absDistY >= absDistX + this.options.directionLockThreshold ) { + this.directionLocked = 'v'; // lock vertically + } else { + this.directionLocked = 'n'; // no lock + } + } + + if ( this.directionLocked === 'h' ) { + if ( this.options.eventPassthrough === 'vertical' ) { + e.preventDefault(); + } else if ( this.options.eventPassthrough === 'horizontal' ) { + this.initiated = false; + return; + } + + deltaY = 0; + } else if ( this.directionLocked === 'v' ) { + if ( this.options.eventPassthrough === 'horizontal' ) { + e.preventDefault(); + } else if ( this.options.eventPassthrough === 'vertical' ) { + this.initiated = false; + return; + } + + deltaX = 0; + } + + deltaX = this.hasHorizontalScroll ? deltaX : 0; + deltaY = this.hasVerticalScroll ? deltaY : 0; + + newX = this.x + deltaX; + newY = this.y + deltaY; + + // Slow down if the boundaries + if ( newX > 0 || newX < this.maxScrollX ) { + newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX; + } + if ( newY > 0 || newY < this.maxScrollY ) { + newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY; + } + + this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; + this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0; + + if ( !this.moved ) { + this._execEvent('scrollStart'); + } + + this.moved = true; + + this._translate(newX, newY); + if ( timestamp - this.startTime > 300 ) { + this.startTime = timestamp; + this.startX = this.x; + this.startY = this.y; + + if ( this.options.probeType === 1 ) { + this._execEvent('scroll'); + } + } + if ( this.options.probeType > 1 ) { + this._execEvent('scroll'); + } + }, + + _end: function (e) { + if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) { + return; + } + + if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) { + e.preventDefault(); + } + + const point = e.changedTouches ? e.changedTouches[0] : e; + let momentumX, + momentumY; + const duration = utils.getTime() - this.startTime; + let newX = Math.round(this.x), + newY = Math.round(this.y); + const distanceX = Math.abs(newX - this.startX), + distanceY = Math.abs(newY - this.startY); + let time = 0, + easing = ''; + this.isInTransition = 0; + this.initiated = 0; + this.endTime = utils.getTime(); + + // reset if we are the boundaries + if ( this.resetPosition(this.options.bounceTime) ) { + return; + } + + this.scrollTo(newX, newY); // ensures that the last position is rounded + + // we scrolled less than 10 pixels + if ( !this.moved ) { + if ( this.options.tap ) { + utils.tap(e, this.options.tap); + } + if ( this.options.click ) { + utils.click(e); + } + this._execEvent('scrollCancel'); + return; + } + + if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) { + this._execEvent('flick'); + return; + } + + // start momentum animation if needed + if ( this.options.momentum && duration < 300 ) { + momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 }; + momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 }; + newX = momentumX.destination; + newY = momentumY.destination; + time = Math.max(momentumX.duration, momentumY.duration); + this.isInTransition = 1; + } + + if ( this.options.snap ) { + const snap = this._nearestSnap(newX, newY); + this.currentPage = snap; + time = this.options.snapSpeed || Math.max( + Math.max( + Math.min(Math.abs(newX - snap.x), 1000), + Math.min(Math.abs(newY - snap.y), 1000) + ), 300); + newX = snap.x; + newY = snap.y; + + this.directionX = 0; + this.directionY = 0; + easing = this.options.bounceEasing; + } + + if ( newX !== this.x || newY !== this.y ) { + // change easing function when scroller goes out of the boundaries + if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) { + easing = utils.ease.quadratic; + } + this.scrollTo(newX, newY, time, easing); + return; + } + this._execEvent('scrollEnd'); + }, + + _resize: function () { + const that = this; + clearTimeout(this.resizeTimeout); + this.resizeTimeout = setTimeout(function () { + that.refresh(); + }, this.options.resizePolling); + }, + + resetPosition: function (time) { + let x = this.x, + y = this.y; + time = time || 0; + + if ( !this.hasHorizontalScroll || this.x > 0 ) { + x = 0; + } else if ( this.x < this.maxScrollX ) { + x = this.maxScrollX; + } + + if ( !this.hasVerticalScroll || this.y > 0 ) { + y = 0; + } else if ( this.y < this.maxScrollY ) { + y = this.maxScrollY; + } + + if ( x === this.x && y === this.y ) { + return false; + } + + this.scrollTo(x, y, time, this.options.bounceEasing); + + return true; + }, + + disable: function () { + this.enabled = false; + }, + + enable: function () { + this.enabled = true; + }, + + refresh: function () { + const rf = this.wrapper.offsetHeight; // Force reflow + + this.wrapperWidth = this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight; + + + this.scrollerWidth = this.scroller.offsetWidth; + this.scrollerHeight = this.scroller.offsetHeight; + + this.maxScrollX = this.wrapperWidth - this.scrollerWidth; + this.maxScrollY = this.wrapperHeight - this.scrollerHeight; + + + this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0; + this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0; + + if ( !this.hasHorizontalScroll ) { + this.maxScrollX = 0; + this.scrollerWidth = this.wrapperWidth; + } + + if ( !this.hasVerticalScroll ) { + this.maxScrollY = 0; + this.scrollerHeight = this.wrapperHeight; + } + + this.endTime = 0; + this.directionX = 0; + this.directionY = 0; + + this.wrapperOffset = utils.offset(this.wrapper); + + this._execEvent('refresh'); + + this.resetPosition(); + }, + + on: function (type, fn) { + if ( !this._events[type] ) { + this._events[type] = []; + } + this._events[type].push(fn); + }, + + off: function (type, fn) { + if ( !this._events[type] ) { + return; + } + const index = this._events[type].indexOf(fn); + if ( index > -1 ) { + this._events[type].splice(index, 1); + } + }, + + _execEvent: function (type) { + if ( !this._events[type] ) { + return; + } + let i = 0; + const l = this._events[type].length; + if ( !l ) { + return; + } + for ( ; i < l; i++ ) { + this._events[type][i].apply(this, [].slice.call(arguments, 1)); + } + }, + + scrollTo: function (x, y, time, easing) { + easing = easing || utils.ease.circular; + + this.isInTransition = this.options.useTransition && time > 0; + const transitionType = this.options.useTransition && easing.style; + if ( !time || transitionType ) { + if(transitionType) { + this._transitionTimingFunction(easing.style); + this._transitionTime(time); + } + this._translate(x, y); + } else { + this._animate(x, y, time, easing.fn); + } + }, + + scrollToElement: function (el, time, offsetX, offsetY, easing) { + el = el.nodeType ? el : this.scroller.querySelector(el); + + if ( !el ) { + return; + } + const pos = utils.offset(el); + + pos.left -= this.wrapperOffset.left; + pos.top -= this.wrapperOffset.top; + + // if offsetX/Y are true we center the element to the screen + if ( offsetX === true ) { + offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2); + } + if ( offsetY === true ) { + offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2); + } + + pos.left -= offsetX || 0; + pos.top -= offsetY || 0; + + pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left; + pos.top = pos.top > 0 ? 0 : pos.top < this.maxScrollY ? this.maxScrollY : pos.top; + + time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time; + + this.scrollTo(pos.left, pos.top, time, easing); + }, + + _transitionTime: function (time) { + if (!this.options.useTransition) { + return; + } + time = time || 0; + const durationProp = utils.style.transitionDuration; + if(!durationProp) { + return; + } + + this.scrollerStyle[durationProp] = time + 'ms'; + + if ( !time && utils.isBadAndroid ) { + this.scrollerStyle[durationProp] = '0.0001ms'; + // remove 0.0001ms + const self = this; + rAF(function() { + if(self.scrollerStyle[durationProp] === '0.0001ms') { + self.scrollerStyle[durationProp] = '0s'; + } + }); + } + }, + + _transitionTimingFunction: function (easing) { + this.scrollerStyle[utils.style.transitionTimingFunction] = easing; + }, + + _translate: function (x, y) { + if ( this.options.useTransform ) { + this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ; + } else { + x = Math.round(x); + y = Math.round(y); + this.scrollerStyle.left = x + 'px'; + this.scrollerStyle.top = y + 'px'; + } + + this.x = x; + this.y = y; + }, + + _initEvents: function (remove) { + const eventType = remove ? utils.removeEvent : utils.addEvent, + target = this.options.bindToWrapper ? this.wrapper : window; + eventType(window, 'orientationchange', this); + eventType(window, 'resize', this); + + if ( this.options.click ) { + eventType(this.wrapper, 'click', this, true); + } + + if ( !this.options.disableMouse ) { + eventType(this.wrapper, 'mousedown', this); + eventType(target, 'mousemove', this); + eventType(target, 'mousecancel', this); + eventType(target, 'mouseup', this); + } + + if ( utils.hasPointer && !this.options.disablePointer ) { + eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this); + eventType(target, utils.prefixPointerEvent('pointermove'), this); + eventType(target, utils.prefixPointerEvent('pointercancel'), this); + eventType(target, utils.prefixPointerEvent('pointerup'), this); + } + + if ( utils.hasTouch && !this.options.disableTouch ) { + eventType(this.wrapper, 'touchstart', this); + eventType(target, 'touchmove', this); + eventType(target, 'touchcancel', this); + eventType(target, 'touchend', this); + } + + eventType(this.scroller, 'transitionend', this); + eventType(this.scroller, 'webkitTransitionEnd', this); + eventType(this.scroller, 'oTransitionEnd', this); + eventType(this.scroller, 'MSTransitionEnd', this); + }, + + getComputedPosition: function () { + let matrix = window.getComputedStyle(this.scroller, null), + x, y; + if ( this.options.useTransform ) { + matrix = matrix[utils.style.transform].split(')')[0].split(', '); + x = +(matrix[12] || matrix[4]); + y = +(matrix[13] || matrix[5]); + } else { + x = +matrix.left.replace(/[^-\d.]/g, ''); + y = +matrix.top.replace(/[^-\d.]/g, ''); + } + return { x: x, y: y }; + }, + + _animate: function (destX, destY, duration, easingFn) { + const that = this, + startX = this.x, + startY = this.y, + startTime = utils.getTime(), + destTime = startTime + duration; + + function step () { + let now = utils.getTime(), + newX, newY, + easing; + if ( now >= destTime ) { + that.isAnimating = false; + that._translate(destX, destY); + + if ( !that.resetPosition(that.options.bounceTime) ) { + that._execEvent('scrollEnd'); + } + return; + } + + now = ( now - startTime ) / duration; + easing = easingFn(now); + newX = ( destX - startX ) * easing + startX; + newY = ( destY - startY ) * easing + startY; + that._translate(newX, newY); + + if ( that.isAnimating ) { + rAF(step); + } + if ( that.options.probeType === 3 ) { + that._execEvent('scroll'); + } + } + this.isAnimating = true; + step(); + }, + + handleEvent: function (e) { + switch ( e.type ) { + case 'touchstart': + case 'pointerdown': + case 'MSPointerDown': + case 'mousedown': + this._start(e); + break; + case 'touchmove': + case 'pointermove': + case 'MSPointerMove': + case 'mousemove': + this._move(e); + break; + case 'touchend': + case 'pointerup': + case 'MSPointerUp': + case 'mouseup': + case 'touchcancel': + case 'pointercancel': + case 'MSPointerCancel': + case 'mousecancel': + this._end(e); + break; + case 'orientationchange': + case 'resize': + this._resize(); + break; + case 'transitionend': + case 'webkitTransitionEnd': + case 'oTransitionEnd': + case 'MSTransitionEnd': + this._transitionEnd(e); + break; + case 'click': + if ( this.enabled && !e._constructed ) { + e.preventDefault(); + e.stopPropagation(); + } + break; + } + } + }; + IScrollForIosSelect.utils = utils; + + const iosSelectUtil = { + isArray: function (arg1) { + return Object.prototype.toString.call(arg1) === '[object Array]'; + }, + isFunction: function (arg1) { + return typeof arg1 === 'function'; + }, + attrToData: function (dom, index) { + const obj = {}; + for (let p in dom.dataset) { + obj[p] = dom.dataset[p]; + } + obj['dom'] = dom; + obj['atindex'] = index; + return obj; + }, + attrToHtml: function (obj) { + let html = ''; + for (let p in obj) { + html += 'data-' + p + '="' + obj[p] + '"'; + } + return html; + } + }; + /*function preventEventFun(e) { + e.preventDefault(); + }*/ + // Layer + function Layer(html, opts) { + if (!(this instanceof Layer)) { + return new Layer(html, opts); + } + this.html = html; + this.opts = opts; + const el = document.createElement('div'); + el.className = 'olay'; + const layer_el = document.createElement('div'); + layer_el.className = 'layer'; + this.el = el; + this.layer_el = layer_el; + this.init(); + } + Layer.prototype = { + init: function () { + this.layer_el.innerHTML = this.html; + if (this.opts.container && document.querySelector(this.opts.container)) { + document.querySelector(this.opts.container).appendChild(this.el); + } + else { + document.body.appendChild(this.el); + } + this.el.appendChild(this.layer_el); + this.el.style.height = Math.max(document.documentElement.getBoundingClientRect().height, window.innerHeight); + if (this.opts.className) { + this.el.className += ' ' + this.opts.className; + } + this.bindEvent(); + }, + bindEvent: function () { + const sureDom = this.el.querySelectorAll('.sure'); + const closeDom = this.el.querySelectorAll('.close'); + const self = this; + this.el.addEventListener('click', function(e) { + //此方式是处理滑动移出,暂不加 +// $(".layer").css({'bottom': '-194px', 'transition': 'all ease 0.3s'}); +// setTimeout(function() { +// $('.olay').css('opacity', 0); +// },300) + self.close() + self.opts.fallback && self.opts.fallback(); + }); + this.layer_el.addEventListener('click', function(e) { + e.stopPropagation(); + }); + Array.prototype.slice.call(sureDom).forEach(function (item, index) { + item.addEventListener('click', function () { + self.close(); + }); + }); + Array.prototype.slice.call(closeDom).forEach(function (item, index) { + item.addEventListener('click', function () { + self.close(); + self.opts.fallback && self.opts.fallback(); + }); + }); + }, + close: function () { + const self = this; + if (self.el) { + if (self.opts.showAnimate) { + self.el.className += ' fadeOutDown'; + setTimeout(function(){ + self.removeDom(); + }, 500); + } + else { + self.removeDom(); + } + } + }, + removeDom: function (){ + this.el.parentNode.removeChild(this.el); + this.el = null; + if (document.documentElement.classList.contains('ios-select-body-class')) { + document.documentElement.classList.remove('ios-select-body-class'); + } + } + } + function IosSelect(level, data, options) { + if (!iosSelectUtil.isArray(data) || data.length === 0) { + throw new TypeError('the data must be a non-empty array!'); + return; + } + if ([1, 2, 3, 4, 5, 6].indexOf(level) === -1) { + throw new RangeError('the level parameter must be one of 1,2,3,4,5,6!'); + return; + } + this.data = data; + this.level = level || 1; + this.options = options; + this.typeBox = 'one-level-box'; + if (this.level === 1) { + this.typeBox = 'one-level-box'; + } + else if (this.level === 2) { + this.typeBox = 'two-level-box'; + } + else if (this.level === 3) { + this.typeBox = 'three-level-box'; + } + else if (this.level === 4) { + this.typeBox = 'four-level-box'; + } + else if (this.level === 5) { + this.typeBox = 'five-level-box'; + } + else if (this.level === 6) { + this.typeBox = 'six-level-box'; + } + this.callback = options.callback; + this.fallback = options.fallback; + this.title = options.title || ''; + this.options.itemHeight = options.itemHeight || 35; + this.options.itemShowCount = [3, 5, 7, 9].indexOf(options.itemShowCount) !== -1? options.itemShowCount: 7; + this.options.coverArea1Top = Math.floor(this.options.itemShowCount / 2); + this.options.coverArea2Top = Math.ceil(this.options.itemShowCount / 2); + this.options.headerHeight = options.headerHeight || 44; + this.options.relation = iosSelectUtil.isArray(this.options.relation)? this.options.relation: []; + this.options.oneTwoRelation = this.options.relation[0]; + this.options.twoThreeRelation = this.options.relation[1]; + this.options.threeFourRelation = this.options.relation[2]; + this.options.fourFiveRelation = this.options.relation[3]; + this.options.fiveSixRelation = this.options.relation[4]; + if (this.options.cssUnit !== 'px' && this.options.cssUnit !== 'rem') { + this.options.cssUnit = 'px'; + } + const self = this; + // 选中元素的信息 + this.selectOneObj = { + id: self.options.oneLevelId + }; + this.selectTwoObj = { + id: self.options.twoLevelId + }; + this.selectThreeObj = { + id: self.options.threeLevelId + }; + this.selectFourObj = { + id: self.options.fourLevelId + }; + this.selectFiveObj = { + id: self.options.fiveLevelId + }; + this.selectSixObj = { + id: self.options.sixLevelId + }; + this.setBase(); + this.init(); + + //解决初始不指向当前发票类型 + if(options.title === '发票类型') { + var newTypeValue = document.getElementById('fp_type').value; + var typeliList = getEle('.typeLi'); + for( var i=0; i', + '' + closeText + '', + '' + sureText + '', + '

', + '', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
    ', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
' + ].join('\r\n'); + this.iosSelectLayer = new Layer(all_html, { + className: 'ios-select-widget-box ' + this.typeBox + (this.options.addClassName? ' ' + this.options.addClassName: '') + (this.options.showAnimate? ' fadeInUp': ''), + container: this.options.container || '', + showAnimate: this.options.showAnimate + }); + + this.iosSelectTitleDom = this.iosSelectLayer.el.querySelector('#iosSelectTitle'); + this.iosSelectLoadingBoxDom = this.iosSelectLayer.el.querySelector('#iosSelectLoadingBox'); + this.iosSelectTitleDom.innerHTML = this.title; + if (this.options.headerHeight && this.options.itemHeight) { + this.coverArea1Dom = this.iosSelectLayer.el.querySelector('.cover-area1'); + this.coverArea1Dom.style.top = this.options.headerHeight + this.options.itemHeight * this.options.coverArea1Top + this.options.cssUnit; + this.coverArea2Dom = this.iosSelectLayer.el.querySelector('.cover-area2'); + this.coverArea2Dom.style.top = this.options.headerHeight + this.options.itemHeight * this.options.coverArea2Top + this.options.cssUnit; + } + + this.oneLevelContainDom = this.iosSelectLayer.el.querySelector('#oneLevelContain'); + this.twoLevelContainDom = this.iosSelectLayer.el.querySelector('#twoLevelContain'); + this.threeLevelContainDom = this.iosSelectLayer.el.querySelector('#threeLevelContain'); + this.fourLevelContainDom = this.iosSelectLayer.el.querySelector('#fourLevelContain'); + this.fiveLevelContainDom = this.iosSelectLayer.el.querySelector('#fiveLevelContain'); + this.sixLevelContainDom = this.iosSelectLayer.el.querySelector('#sixLevelContain'); + + this.oneLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-one-level'); + this.twoLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-two-level'); + this.threeLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-three-level'); + this.fourLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-four-level'); + this.fiveLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-five-level'); + this.sixLevelUlContainDom = this.iosSelectLayer.el.querySelector('.select-six-level'); + + this.iosSelectLayer.el.querySelector('.layer').style.height = this.options.itemHeight * this.options.itemShowCount + this.options.headerHeight + this.options.cssUnit; + + this.oneLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + document.documentElement.classList.add('ios-select-body-class'); + + this.scrollOne = new IScrollForIosSelect('#oneLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollOne, 1); + + if (this.level >= 2) { + this.twoLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + this.scrollTwo = new IScrollForIosSelect('#twoLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollTwo, 2); + } + if (this.level >= 3) { + this.threeLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + this.scrollThree = new IScrollForIosSelect('#threeLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollThree, 3); + } + if (this.level >= 4) { + this.fourLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + this.scrollFour = new IScrollForIosSelect('#fourLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollFour, 4); + } + if (this.level >= 5) { + this.fiveLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + this.scrollFive = new IScrollForIosSelect('#fiveLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollFive, 5); + } + if (this.level >= 6) { + this.sixLevelContainDom.style.height = this.options.itemHeight * this.options.itemShowCount + this.options.cssUnit; + this.scrollSix = new IScrollForIosSelect('#sixLevelContain', { + probeType: 3, + bounce: false + }); + this.setScorllEvent(this.scrollSix, 6); + } + + // 取消 确认 事件 + this.closeBtnDom = this.iosSelectLayer.el.querySelector('.close'); + this.closeBtnDom.addEventListener('click', function (e) { + self.fallback && self.fallback(); + }); + + this.selectBtnDom = this.iosSelectLayer.el.querySelector('.sure'); + this.selectBtnDom.addEventListener('click', function (e) { + self.callback && self.callback(self.selectOneObj, self.selectTwoObj, self.selectThreeObj, self.selectFourObj, self.selectFiveObj, self.selectSixObj); + }); + }, + mapKeyByIndex: function (index) { + const self = this; + let map = { + index: 1, + levelContain: self.oneLevelContainDom, + relation: self.options.oneTwoRelation + }; + if (index === 2) { + map = { + index: 2, + levelContain: self.twoLevelContainDom, + relation: self.options.twoThreeRelation + }; + } + else if (index === 3) { + map = { + index: 3, + levelContain: self.threeLevelContainDom, + relation: self.options.threeFourRelation + }; + } + else if (index === 4) { + map = { + index: 4, + levelContain: self.fourLevelContainDom, + relation: self.options.fourFiveRelation + }; + } + else if (index === 5) { + map = { + index: 5, + levelContain: self.fiveLevelContainDom, + relation: self.options.fiveSixRelation + }; + } + else if (index === 6) { + map = { + index: 6, + levelContain: self.sixLevelContainDom, + relation: 0 + }; + } + return map; + }, + setScorllEvent: function (scrollInstance, index) { + const self = this; + const mapKey = self.mapKeyByIndex(index); + scrollInstance.on('scrollStart', function () { + self.toggleClassList(mapKey.levelContain); + }); + scrollInstance.on('scroll', function () { + if (isNaN(this.y)) { + return; + } + const pa = Math.abs(this.y / self.baseSize) / self.options.itemHeight; + const plast = Math.round(pa) + 1; + self.toggleClassList(mapKey.levelContain); + self.changeClassName(mapKey.levelContain, plast); + }); + scrollInstance.on('scrollEnd', function () { + const pa = Math.abs(this.y / self.baseSize) / self.options.itemHeight; + let plast; + let to; + if (Math.ceil(pa) === Math.round(pa)) { + to = Math.ceil(pa) * self.options.itemHeight * self.baseSize; + plast = Math.ceil(pa) + 1; + } else { + to = Math.floor(pa) * self.options.itemHeight * self.baseSize; + plast = Math.floor(pa) + 1; + } + scrollInstance.scrollTo(0, -to, 0); + + self.toggleClassList(mapKey.levelContain); + + const pdom = self.changeClassName(mapKey.levelContain, plast); + const obj = iosSelectUtil.attrToData(pdom, plast); + self.setSelectObj(index, obj); + + if (self.level > index) { + if ((mapKey.relation === 1 && iosSelectUtil.isArray(self.data[index])) || iosSelectUtil.isFunction(self.data[index])) { + self.setLevelData(index + 1, self.selectOneObj.id, self.selectTwoObj.id, self.selectThreeObj.id, self.selectFourObj.id, self.selectFiveObj.id, self.selectSixObj.id); + } + } + }); + scrollInstance.on('scrollCancel', function () { + const pa = Math.abs(this.y / self.baseSize) / self.options.itemHeight; + let plast; + let to; + if (Math.ceil(pa) === Math.round(pa)) { + to = Math.ceil(pa) * self.options.itemHeight * self.baseSize; + plast = Math.ceil(pa) + 1; + } else { + to = Math.floor(pa) * self.options.itemHeight * self.baseSize; + plast = Math.floor(pa) + 1; + } + scrollInstance.scrollTo(0, -to, 0); + + self.toggleClassList(mapKey.levelContain); + + const pdom = self.changeClassName(mapKey.levelContain, plast); + const obj = iosSelectUtil.attrToData(pdom, plast); + self.setSelectObj(index, obj); + + if (self.level > index) { + if ((mapKey.relation === 1 && iosSelectUtil.isArray(self.data[index])) || iosSelectUtil.isFunction(self.data[index])) { + self.setLevelData(index + 1, self.selectOneObj.id, self.selectTwoObj.id, self.selectThreeObj.id, self.selectFourObj.id, self.selectFiveObj.id, self.selectSixObj.id); + } + + } + }); + }, + loadingShow: function () { + this.options.showLoading && (this.iosSelectLoadingBoxDom.style.display = 'block'); + }, + loadingHide: function () { + this.iosSelectLoadingBoxDom.style.display = 'none'; + }, + mapRenderByIndex: function (index) { + const self = this; + let map = { + index: 1, + relation: 0, + levelUlContainDom: self.oneLevelUlContainDom, + scrollInstance: self.scrollOne, + levelContainDom: self.oneLevelContainDom + }; + if (index === 2) { + map = { + index: 2, + relation: self.options.oneTwoRelation, + levelUlContainDom: self.twoLevelUlContainDom, + scrollInstance: self.scrollTwo, + levelContainDom: self.twoLevelContainDom + }; + } + else if (index === 3) { + map = { + index: 3, + relation: self.options.twoThreeRelation, + levelUlContainDom: self.threeLevelUlContainDom, + scrollInstance: self.scrollThree, + levelContainDom: self.threeLevelContainDom + }; + } + else if (index === 4) { + map = { + index: 4, + relation: self.options.threeFourRelation, + levelUlContainDom: self.fourLevelUlContainDom, + scrollInstance: self.scrollFour, + levelContainDom: self.fourLevelContainDom + }; + } + else if (index === 5) { + map = { + index: 5, + relation: self.options.fourFiveRelation, + levelUlContainDom: self.fiveLevelUlContainDom, + scrollInstance: self.scrollFive, + levelContainDom: self.fiveLevelContainDom + }; + } + else if (index === 6) { + map = { + index: 6, + relation: self.options.fiveSixRelation, + levelUlContainDom: self.sixLevelUlContainDom, + scrollInstance: self.scrollSix, + levelContainDom: self.sixLevelContainDom + }; + } + return map; + }, + getLevelData: function (index, oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId) { + let levelData = []; + const renderMap = this.mapRenderByIndex(index); + if (index === 1) { + levelData = this.data[0]; + } + else if (renderMap.relation === 1) { + const pid = arguments[index - 1]; + this.data[index - 1].forEach(function (v, i, o) { + if (v['parentId'] === pid) { + levelData.push(v); + } + }); + } + else { + levelData = this.data[index - 1]; + } + return levelData; + }, + setLevelData: function (index, oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId, sixLevelId) { + if (iosSelectUtil.isArray(this.data[index - 1])) { + var levelData = this.getLevelData(index, oneLevelId, twoLevelId, threeLevelId, fourLevelId); + this.renderLevel(index, oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId, sixLevelId, levelData); + } + else if (iosSelectUtil.isFunction(this.data[index - 1])) { + this.loadingShow(); + this.data[index - 1].apply(this, [oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId].slice(0, index - 1).concat(function (levelData) { + this.loadingHide(); + this.renderLevel(index, oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId, sixLevelId, levelData); + }.bind(this))); + } + else { + throw new Error('data format error'); + } + }, + renderLevel: function (index, oneLevelId, twoLevelId, threeLevelId, fourLevelId, fiveLevelId, sixLevelId, levelData) { + let plast = 0; + let curLevelId = arguments[index]; + const hasAtId = levelData.some(function (v, i, o) { + return v.id === curLevelId; + }); + if (!hasAtId) { + curLevelId = levelData[0]['id']; + } + let tmpHtml = ''; + const itemHeightStyle = this.options.itemHeight + this.options.cssUnit; + tmpHtml += this.getWhiteItem(); + levelData.forEach(function (v, i, o) { + if (v.id === curLevelId) { + tmpHtml += '
  • ' + v.value + '
  • '; + plast = i + 1; + } + else { + tmpHtml += '
  • ' + v.value + '
  • '; + } + }); + tmpHtml += this.getWhiteItem(); + const renderMap = this.mapRenderByIndex(index); + renderMap.levelUlContainDom.innerHTML = tmpHtml; + renderMap.scrollInstance.refresh(); + renderMap.scrollInstance.scrollToElement(':nth-child(' + plast + ')', 0); + const pdom = this.changeClassName(renderMap.levelContainDom, plast); + const obj = iosSelectUtil.attrToData(pdom, plast); + this.setSelectObj(index, obj); + if (this.level > index) { + this.setLevelData(index + 1, this.selectOneObj.id, this.selectTwoObj.id, this.selectThreeObj.id, this.selectFourObj.id, this.selectFiveObj.id, this.selectSixObj.id); + } + }, + setSelectObj: function (index, obj) { + if (index === 1) { + this.selectOneObj = obj; + } + else if (index === 2) { + this.selectTwoObj = obj; + } + else if (index === 3) { + this.selectThreeObj = obj; + } + else if (index === 4) { + this.selectFourObj = obj; + } + else if (index === 5) { + this.selectFiveObj = obj; + } + else if (index === 6) { + this.selectSixObj = obj; + } + }, + getWhiteItem: function () { + let whiteItemHtml = ''; + const itemHeightStyle = this.options.itemHeight + this.options.cssUnit; + const itemLi = '
  • '; + whiteItemHtml += itemLi; + if (this.options.itemShowCount > 3) { + whiteItemHtml += itemLi; + } + if (this.options.itemShowCount > 5) { + whiteItemHtml += itemLi; + } + if (this.options.itemShowCount > 7) { + whiteItemHtml += itemLi; + } + return whiteItemHtml; + }, + getTextLength: function (pdom) { + let addCount = 0; + //计算字体大小,如果大于最小宽750px,按照比例缩小 + let textLength = pdom.textContent.length; + if(pdom.scrollWidth >= 750){ + if(textLength > 30){ + addCount += 0.01; + } + if(textLength > 40){ + addCount += 0.01; + } + if(textLength > 50){ + addCount += 0.01; + } + if(textLength > 60){ + addCount += 0.01; + } + if(textLength > 70){ + addCount += 0.01; + } + if(textLength > 80){ + addCount += 0.01; + } + if(textLength > 90){ + addCount += 0.01; + } + }else{ + if(textLength > 30){ + addCount += 0.02; + } + if(textLength > 40){ + addCount += 0.02; + } + if(textLength > 50){ + addCount += 0.02; + } + if(textLength > 60){ + addCount += 0.02; + } + if(textLength > 70){ + addCount += 0.02; + } + if(textLength > 80){ + addCount += 0.02; + } + if(textLength > 90){ + addCount += 0.02; + } + } + return addCount; + }, + changeClassName: function (levelContainDom, plast) { + let pdom; + if (this.options.itemShowCount === 3) { + pdom = levelContainDom.querySelector('li:nth-child(' + (plast + 1) + ')'); + let addCount = this.getTextLength(pdom); + + pdom.style.cssText += "font-size:" + ( 0.28 - addCount) + "rem"; + pdom.classList.add('at'); + + //上下两行需要重新计算 + let pdom1 = levelContainDom.querySelector('li:nth-child(' + (plast + 1) + ')'); + let pdom2 = levelContainDom.querySelector('li:nth-child(' + (plast + 3) + ')'); + if(pdom1 != null){ + let addCount = this.getTextLength(pdom1); + pdom1.style.cssText += "font-size:" + ( 0.24 - addCount) + "rem"; + } + if(pdom2 != null){ + let addCount = this.getTextLength(pdom2); + pdom2.style.cssText += "font-size:" + ( 0.24 - addCount) + "rem"; + } + + } + else if (this.options.itemShowCount === 5) { + pdom = levelContainDom.querySelector('li:nth-child(' + (plast + 2) + ')'); + pdom.classList.add('at'); + levelContainDom.querySelector('li:nth-child(' + (plast + 1) + ')').classList.add('side1'); + levelContainDom.querySelector('li:nth-child(' + (plast + 3) + ')').classList.add('side1'); + } + else if (this.options.itemShowCount === 7) { + pdom = levelContainDom.querySelector('li:nth-child(' + (plast + 3) + ')'); + pdom.classList.add('at'); + levelContainDom.querySelector('li:nth-child(' + (plast + 2) + ')').classList.add('side1'); + levelContainDom.querySelector('li:nth-child(' + (plast + 1) + ')').classList.add('side2'); + levelContainDom.querySelector('li:nth-child(' + (plast + 4) + ')').classList.add('side1'); + levelContainDom.querySelector('li:nth-child(' + (plast + 5) + ')').classList.add('side2'); + } + else if (this.options.itemShowCount === 9) { + pdom = levelContainDom.querySelector('li:nth-child(' + (plast + 4) + ')'); + pdom.classList.add('at'); + levelContainDom.querySelector('li:nth-child(' + (plast + 3) + ')').classList.add('side1'); + levelContainDom.querySelector('li:nth-child(' + (plast + 2) + ')').classList.add('side2'); + levelContainDom.querySelector('li:nth-child(' + (plast + 5) + ')').classList.add('side1'); + levelContainDom.querySelector('li:nth-child(' + (plast + 6) + ')').classList.add('side2'); + } + return pdom; + }, + setBase: function () { + if (this.options.cssUnit === 'rem') { + const dltDom = document.documentElement; + const dltStyle = window.getComputedStyle(dltDom, null); + const dltFontSize = dltStyle.fontSize; + try { + this.baseSize = /\d+(?:\.\d+)?/.exec(dltFontSize)[0]; + } + catch(e) { + this.baseSize = 1; + } + } + else { + this.baseSize = 1; + } + }, + toggleClassList: function (dom) { + Array.prototype.slice.call(dom.querySelectorAll('li')).forEach(function (v) { + if (v.classList.contains('at')) { + v.classList.remove('at'); + } + else if (v.classList.contains('side1')) { + v.classList.remove('side1'); + } + else if (v.classList.contains('side2')) { + v.classList.remove('side2'); + } + }) + } + } + if (typeof module != 'undefined' && module.exports) { + module.exports = IosSelect; + } + else if (typeof define == 'function' && define.amd) { + define(function () { + return IosSelect; + }); + } + else { + window.IosSelect = IosSelect; + } + +})(); diff --git a/js/lib/aes.js b/js/lib/aes.js new file mode 100644 index 0000000..827503c --- /dev/null +++ b/js/lib/aes.js @@ -0,0 +1,35 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, +q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w< +l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]), +f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f, +m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m, +E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/ +4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math); +(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d, +b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}(); +(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8, +16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;dd||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>> +8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t= +d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})(); diff --git a/js/lib/auto-height-textarea.js b/js/lib/auto-height-textarea.js new file mode 100644 index 0000000..1034047 --- /dev/null +++ b/js/lib/auto-height-textarea.js @@ -0,0 +1,39 @@ +(function () { + const isEmpty = function (value) { + return value.replace(/\s/, '').length > 0; + }; + const getStyle = function (element, property) { + if (!!document.defaultView.getComputedStyle) { + return document.defaultView.getComputedStyle(element, null)[property]; + } else { + const currentStyle = element.currentStyle; + return currentStyle[property]; + } + }; + let addEven = function (ele, type, callback) { + if (document.addEventListener) { + addEven = function (ele, type, callback) { + ele.addEventListener(type, callback, false); + }; + } else { + addEven = function (ele, type, callback) { + ele.attachEvent('on' + type, callback); + }; + } + addEven(ele, type, callback); + }; + + this.autoTextArea = function (dom) { + if (!(dom && dom.nodeType === 1 && dom.nodeName === 'TEXTAREA')) return; + const diff = parseInt(getStyle(dom, "paddingTop") || 0) + parseInt(getStyle(dom, "paddingBottom") || 0); + if (isEmpty(dom.value)) { + dom.style.height = dom.scrollHeight - diff + "px"; + } + addEven(dom,"input", function (e) { + const event = e || window.event; + const target = event.target || event.srcElement; + target.style.height = "0"; + target.style.height = target.scrollHeight - diff + "px"; + }); + }; +})(); diff --git a/js/lib/jquery-1.11.3.min.js b/js/lib/jquery-1.11.3.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/js/lib/jquery-1.11.3.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&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 n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
    a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:l.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("