diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e59295e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM registry.cn-hangzhou.aliyuncs.com/fullstack/nginx +MAINTAINER cheney +ADD www /app +ADD default.conf /etc/nginx/conf.d diff --git a/README.md b/README.md index 8a5cb59..ffae9c3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ - 采用 hugo 部署方式,方便高效。 - 主要的配置信息都集成到了 config.toml,一键完成各种自定义的配置。 - 导航的各个信息都集成在 data/webstack.yml 文件中,方便后续增删改动。 +- 图标存放在目录 static/assets/images/logos, 120 x 120 像素。 + ``` - taxonomy: 科研办公 icon: fas fa-flask fa-lg diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000..9e8fdc8 --- /dev/null +++ b/build.cmd @@ -0,0 +1,7 @@ +@REM 自动发布脚本 +cd src +hugo +cd .. +xcopy swa www\swa /s /e /y + +docker build -t fullstack.web . diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..929fc4f --- /dev/null +++ b/default.conf @@ -0,0 +1,11 @@ +server { + listen 80; + location / { + root /app; + } + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} diff --git a/hex.js b/hex.js deleted file mode 100644 index 055b5c1..0000000 --- a/hex.js +++ /dev/null @@ -1,14 +0,0 @@ -var v = "023030333830303630313233343536373839303132333435363738393031323334353637383930303030303030303030303030303030303030303030303030313233343536373833313230323231313039303030303132333430303030303030303030303030313030313033314303"; - -var nv = ""; -var flag = false -for ( let vv of v ) { - nv += vv; - if ( flag ) { - nv += " " - flag =false - } else { - flag = true - } -} -console.log( nv ) diff --git a/kit.json b/kit.json new file mode 100644 index 0000000..0334a37 --- /dev/null +++ b/kit.json @@ -0,0 +1,11 @@ +{ + "publish" : [{ + "shell" : "echo \"window.active = 'http://127.0.0.1:8066'\" >> ./dist/config.js" + },{ + "shell" : "echo \"window.server = '/api/v1'\" >> ./dist/config.js" + },{ + "shell" : "npm run build" + },{ + "shell" : "scp -C -v -r www root@n4.fullstack.club:/app/fullstack/" + }] +} diff --git a/push.cmd b/push.cmd index 29ec526..c8ae018 100644 --- a/push.cmd +++ b/push.cmd @@ -1,8 +1,2 @@ -@REM call quasar build -@REM -@REM timeout /T 3 /NOBREAK -cd src -hugo -cd .. -xcopy swa www\swa /s /e /y -scp -r www root@n4.fullstack.club:/app/fullstack/ +docker tag fullstack.web registry.cn-hangzhou.aliyuncs.com/fullstack/fullstack.web +docker push registry.cn-hangzhou.aliyuncs.com/fullstack/fullstack.web diff --git a/src/config.toml b/src/config.toml index 72f0e92..08651ee 100644 --- a/src/config.toml +++ b/src/config.toml @@ -36,4 +36,4 @@ publishDir = "../www" unsafe = true [params.footer] - copyright = '本站内容源自互联网,如有内容侵犯了你的权益,请联系删除相关内容,联系邮箱:postmaster@fullstack.club
© 2021 - {year} By [FullStack Club](https://www.fullstack.club) | [浙ICP备14009836号-5](http://beian.miit.gov.cn/)
' + copyright = '本站内容源自互联网,如有内容侵犯了你的权益,请联系删除相关内容,联系邮箱:postmaster@fullstack.club
© 2021 - {year} By [FullStack Club](https://www.fullstack.club) | 浙ICP备14009836号-5
' diff --git a/src/data/webstack.yml b/src/data/webstack.yml index 90c82ba..e6f82e7 100644 --- a/src/data/webstack.yml +++ b/src/data/webstack.yml @@ -3,18 +3,14 @@ - taxonomy: 常用推荐 icon: far fa-star links: - - title: 知乎 - logo: 知乎.png - url: https://www.zhihu.com/ - description: 知乎社区。 - title: V2EX logo: v2ex.jpg url: https://www.v2ex.com/ description: V2EX 创意工作者的社区。 - - title: Hacker News - url: https://news.ycombinator.com/ - logo: hacker-news.jpg - description: 一家关于计算机黑客和创业公司的社会化新闻网站。 + - title: 知乎 + logo: 知乎.png + url: https://www.zhihu.com/ + description: 知乎社区。 - title: 开源中国 logo: 开源中国.jpg url: https://www.oschina.net/ @@ -23,28 +19,44 @@ logo: 阿里云.jpg url: https://www.aliyun.com/ description: 上云就上阿里云。 + - title: 七牛云 + url: https://sso.qiniu.com/ + logo: qiniu.jpg + description: 七牛云。 -- taxonomy: 素材资源 +- taxonomy: 在线工具 icon: far fa-folder-open fa-lg list: - - term: 在线工具 + - term: 常用工具 links: + - title: 目标十字 + url: /swa/window.html?to=%2Fswa%2Fcross-nav%2Findex.html + logo: cross.jpg + description: 目标十字 + - title: 类型转换 + url: /swa/window.html?to=%2Fswa%2Ffmtconv%2Findex.html + logo: ic.png + description: Base64、Hex、UTF8 互相转换 - title: ASN.1 url: /swa/window.html?to=%2Fswa%2Fasn1%2Findex.html logo: duolao.png description: 解析 ASN.1 - - title: 无线支付密码器 - url: /swa/window.html?to=%2Fswa%2Fcpe%2Findex.html - logo: svgomg.png - description: 无线支付密码器 - - title: Key 发行器 - url: /swa/window.html?to=%2Fswa%2Fu%2Findex.html - logo: u.png - description: UKey 发行器 - - title: IC 卡发行器 - url: /swa/window.html?to=%2Fswa%2Fic%2Findex.html - logo: ic.png - description: IC 卡发行器 + - title: ASCII 码表 + url: https://c.runoob.com/front-end/6318/ + logo: isux.png + description: ASCII 码表 +# - title: 无线支付密码器 +# url: /swa/window.html?to=%2Fswa%2Fcpe%2Findex.html +# logo: svgomg.png +# description: 无线支付密码器 +# - title: UKey 发行器 +# url: /swa/window.html?to=%2Fswa%2Fu%2Findex.html +# logo: u.png +# description: 渔翁 UKey 发行器 +# - title: IC 卡发行器 +# url: /swa/window.html?to=%2Fswa%2Fic%2Findex.html +# logo: ic.png +# description: 信雅达 IC 卡发行器 - title: JS Playground url: https://jsfiddle.net/ logo: uikitme.png @@ -53,33 +65,38 @@ url: https://tinypng.com/ logo: tinypng.png description: Optimize your images with a perfect balance in quality and file size. - - title: goqr - url: http://goqr.me/ - logo: goqr.png - description: create QR codes for free (Logo, T-Shirt, vCard, EPS). - - title: ezgif - url: https://ezgif.com - logo: ezgif.png - description: simple online GIF maker and toolset for basic animated GIF editing. - - title: Android 9 patch - url: http://inloop.github.io/shadow4android/ - logo: Android9patch.png - description: Android 9-patch shadow generator fully customizable shadows. - - title: screen sizes - url: http://screensiz.es/ - logo: screensizes.png - description: Viewport Sizes and Pixel Densities for Popular Devices. - - title: svgomg - url: https://jakearchibald.github.io/svgomg/ - logo: svgomg.png - description: SVG 在线压缩平台。 - - title: 稿定抠图 - url: https://koutu.gaoding.com/ - logo: gaoding.png - description: 免费在线抠图软件,图片快速换背景-抠白底图。 + - title: AutoRegex + logo: Iconfinder.png + url: https://www.autoregex.xyz/ + description: 人工智能辅助正则生成器 + - term: 前端 + links: + - title: Vue + logo: vue.png + url: https://cn.vuejs.org/ + description: 渐进式 Javascript 框架。 + - title: Vue Router + logo: vue.png + url: https://router.vuejs.org/zh/guide/ + description: Vue Router 是 Vue.js 的官方路由。 + - title: Antd Vue + logo: ant.svg + url: https://www.antdv.com/components/overview-cn/ + description: 这里是 Ant Design 的 Vue 实现,开发和服务于企业级后台产品。 + - title: Vant + logo: vant4.png + url: https://vant-contrib.gitee.io/vant/ + description: 轻量、可定制的移动端 Vue 组件库。 + - title: WebPack + logo: webpack.svg + url: https://webpack.docschina.org/ + description: 构建你的 ... + - title: vite + logo: vite.png + url: https://cn.vitejs.dev/ + description: 下一代的前端工具链 - - - term: 图标素材 + - term: 图标 links: - title: Iconfinder logo: Iconfinder.png @@ -133,8 +150,6 @@ logo: simplelineicons.png url: http://simplelineicons.com/ description: Simple line Icons pack. - - term: 图标设计 - links: - title: Iconsfeed logo: iconsfeed.png url: http://www.iconsfeed.com/ @@ -151,7 +166,8 @@ logo: InstantLogoSearch.png url: http://instantlogosearch.com/ description: Search & download thousands of logos instantly. - - term: 平面素材 + + - term: 图片处理 links: - title: freepik logo: freepik.png @@ -205,6 +221,27 @@ logo: sccnn.png url: http://www.sccnn.com/ description: 免费素材共享平台。 + - title: goqr + url: http://goqr.me/ + logo: goqr.png + description: create QR codes for free (Logo, T-Shirt, vCard, EPS). + - title: ezgif + url: https://ezgif.com + logo: ezgif.png + description: simple online GIF maker and toolset for basic animated GIF editing. + - title: screen sizes + url: http://screensiz.es/ + logo: screensizes.png + description: Viewport Sizes and Pixel Densities for Popular Devices. + - title: svgomg + url: https://jakearchibald.github.io/svgomg/ + logo: svgomg.png + description: SVG 在线压缩平台。 + - title: 稿定抠图 + url: https://koutu.gaoding.com/ + logo: gaoding.png + description: 免费在线抠图软件,图片快速换背景-抠白底图。 + - term: 字体资源 links: - title: Google Font @@ -266,7 +303,8 @@ - title: Abstract Fonts url: http://www.abstractfonts.com/ logo: abstractfonts.png - description: Abstract Fonts (13,866 free fonts). + description: Abstract Fonts (13,866 free fonts). + - term: PPT资源 links: - title: OfficePLUS diff --git a/src/themes/WebStack/layouts/_default/single.html b/src/themes/WebStack/layouts/_default/single.html index 23413cd..228a41d 100644 --- a/src/themes/WebStack/layouts/_default/single.html +++ b/src/themes/WebStack/layouts/_default/single.html @@ -8,7 +8,7 @@ {{ .Site.Title }} - + diff --git a/src/themes/WebStack/layouts/partials/content_search.html b/src/themes/WebStack/layouts/partials/content_search.html index c0814bf..c01d32b 100644 --- a/src/themes/WebStack/layouts/partials/content_search.html +++ b/src/themes/WebStack/layouts/partials/content_search.html @@ -6,10 +6,8 @@
- -
@@ -37,28 +35,6 @@ -
- -
-
- -
diff --git a/src/themes/WebStack/static/assets/images/logos/ant.svg b/src/themes/WebStack/static/assets/images/logos/ant.svg new file mode 100644 index 0000000..dbfcee7 --- /dev/null +++ b/src/themes/WebStack/static/assets/images/logos/ant.svg @@ -0,0 +1,29 @@ + + + + Vue + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/themes/WebStack/static/assets/images/logos/cross.jpg b/src/themes/WebStack/static/assets/images/logos/cross.jpg new file mode 100644 index 0000000..81c79b4 Binary files /dev/null and b/src/themes/WebStack/static/assets/images/logos/cross.jpg differ diff --git a/src/themes/WebStack/static/assets/images/logos/qiniu.jpg b/src/themes/WebStack/static/assets/images/logos/qiniu.jpg new file mode 100644 index 0000000..5297747 Binary files /dev/null and b/src/themes/WebStack/static/assets/images/logos/qiniu.jpg differ diff --git a/src/themes/WebStack/static/assets/images/logos/vant4.png b/src/themes/WebStack/static/assets/images/logos/vant4.png new file mode 100644 index 0000000..59019a5 Binary files /dev/null and b/src/themes/WebStack/static/assets/images/logos/vant4.png differ diff --git a/src/themes/WebStack/static/assets/images/logos/vite.png b/src/themes/WebStack/static/assets/images/logos/vite.png new file mode 100644 index 0000000..8b23c91 Binary files /dev/null and b/src/themes/WebStack/static/assets/images/logos/vite.png differ diff --git a/src/themes/WebStack/static/assets/images/logos/vue.png b/src/themes/WebStack/static/assets/images/logos/vue.png new file mode 100644 index 0000000..d21cf54 Binary files /dev/null and b/src/themes/WebStack/static/assets/images/logos/vue.png differ diff --git a/src/themes/WebStack/static/assets/images/logos/webpack.svg b/src/themes/WebStack/static/assets/images/logos/webpack.svg new file mode 100644 index 0000000..2f60d3d --- /dev/null +++ b/src/themes/WebStack/static/assets/images/logos/webpack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..4ba4e18 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +img=registry.cn-hangzhou.aliyuncs.com/fullstack/fullstack.web +name=fullstack.web +docker pull $img +docker rm -vf $name +docker run -d --restart always \ + --name $name \ + -p 8081:80 \ + $img diff --git a/swa/asn1/index.html b/swa/asn1/index.html index 3f6f214..7f6bb18 100644 --- a/swa/asn1/index.html +++ b/swa/asn1/index.html @@ -1,7 +1,7 @@ - + - + ASN.1 JavaScript decoder @@ -15,12 +15,12 @@

- - - + + +
- Examples: + 示例: - +
@@ -39,5 +39,45 @@ + + diff --git a/swa/asn1/jquery-1.8.0.min.js b/swa/asn1/jquery-1.8.0.min.js new file mode 100644 index 0000000..066d72c --- /dev/null +++ b/swa/asn1/jquery-1.8.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v@1.8.0 jquery.com | jquery.org/license */ +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
t
",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;jq&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;ai){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="
",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="

",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/swa/cpe/active_cpe_setup.exe b/swa/cpe/active_cpe_setup.exe index b0dcbc0..da610f0 100644 Binary files a/swa/cpe/active_cpe_setup.exe and b/swa/cpe/active_cpe_setup.exe differ diff --git a/swa/cross-nav/PIXI.TextInput.min.js b/swa/cross-nav/PIXI.TextInput.min.js new file mode 100644 index 0000000..c4dfcc1 --- /dev/null +++ b/swa/cross-nav/PIXI.TextInput.min.js @@ -0,0 +1 @@ +!function(t){const e=t.PIXI;t.exportTo[0][t.exportTo[1]]=class extends e.Container{constructor(t){super(),this._input_style=Object.assign({position:"absolute",background:"none",border:"none",outline:"none",transformOrigin:"0 0",lineHeight:"1"},t.input),t.box?this._box_generator="function"==typeof t.box?t.box:new function(t){if((t=t||{fill:13421772}).default)t.focused=t.focused||t.default,t.disabled=t.disabled||t.default;else{let e=t;(t={}).default=t.focused=t.disabled=e}return function(i,s,r){let o=t[r.toLowerCase()],h=new e.Graphics;return o.fill&&h.beginFill(o.fill),o.stroke&&h.lineStyle(o.stroke.width||1,o.stroke.color||0,o.stroke.alpha||1),o.rounded?h.drawRoundedRect(0,0,i,s,o.rounded):h.drawRect(0,0,i,s),h.endFill(),h.closePath(),h}}(t.box):this._box_generator=null,this._input_style.hasOwnProperty("multiline")?(this._multiline=!!this._input_style.multiline,delete this._input_style.multiline):this._multiline=!1,this._box_cache={},this._previous={},this._dom_added=!1,this._dom_visible=!0,this._placeholder="",this._placeholderColor=11119017,this._selection=[0,0],this._restrict_value="",this._createDOMInput(),this.substituteText=!0,this._setState("DEFAULT"),this._addListeners()}get substituteText(){return this._substituted}set substituteText(t){this._substituted!=t&&(this._substituted=t,t?(this._createSurrogate(),this._dom_visible=!1):(this._destroySurrogate(),this._dom_visible=!0),this.placeholder=this._placeholder,this._update())}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this._substituted?(this._updateSurrogate(),this._dom_input.placeholder=""):this._dom_input.placeholder=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._dom_input.disabled=t,this._setState(t?"DISABLED":"DEFAULT")}get maxLength(){return this._max_length}set maxLength(t){this._max_length=t,this._dom_input.setAttribute("maxlength",t)}get restrict(){return this._restrict_regex}set restrict(t){t instanceof RegExp?("^"!==(t=t.toString().slice(1,-1)).charAt(0)&&(t="^"+t),"$"!==t.charAt(t.length-1)&&(t+="$"),t=new RegExp(t)):t=new RegExp("^["+t+"]*$"),this._restrict_regex=t}get text(){return this._dom_input.value}set text(t){this._dom_input.value=t,this._substituted&&this._updateSurrogate()}get htmlInput(){return this._dom_input}focus(){this._substituted&&!this.dom_visible&&this._setDOMInputVisible(!0),this._dom_input.focus()}blur(){this._dom_input.blur()}select(){this.focus(),this._dom_input.select()}setInputStyle(t,e){this._input_style[t]=e,this._dom_input.style[t]=e,!this._substituted||"fontFamily"!==t&&"fontSize"!==t||this._updateFontMetrics(),this._last_renderer&&this._update()}destroy(t){this._destroyBoxCache(),super.destroy(t)}_createDOMInput(){this._multiline?(this._dom_input=document.createElement("textarea"),this._dom_input.style.resize="none"):(this._dom_input=document.createElement("input"),this._dom_input.type="text");for(let t in this._input_style)this._dom_input.style[t]=this._input_style[t]}_addListeners(){this.on("added",this._onAdded.bind(this)),this.on("removed",this._onRemoved.bind(this)),this._dom_input.addEventListener("keydown",this._onInputKeyDown.bind(this)),this._dom_input.addEventListener("input",this._onInputInput.bind(this)),this._dom_input.addEventListener("keyup",this._onInputKeyUp.bind(this)),this._dom_input.addEventListener("focus",this._onFocused.bind(this)),this._dom_input.addEventListener("blur",this._onBlurred.bind(this))}_onInputKeyDown(t){this._selection=[this._dom_input.selectionStart,this._dom_input.selectionEnd],this.emit("keydown",t.keyCode)}_onInputInput(t){this._restrict_regex&&this._applyRestriction(),this._substituted&&this._updateSubstitution(),this.emit("input",this.text)}_onInputKeyUp(t){this.emit("keyup",t.keyCode)}_onFocused(){this._setState("FOCUSED"),this.emit("focus")}_onBlurred(){this._setState("DEFAULT"),this.emit("blur")}_onAdded(){document.body.appendChild(this._dom_input),this._dom_input.style.display="none",this._dom_added=!0}_onRemoved(){document.body.removeChild(this._dom_input),this._dom_added=!1}_setState(t){this.state=t,this._updateBox(),this._substituted&&this._updateSubstitution()}renderWebGL(t){super.renderWebGL(t),this._renderInternal(t)}renderCanvas(t){super.renderCanvas(t),this._renderInternal(t)}render(t){super.render(t),this._renderInternal(t)}_renderInternal(t){this._resolution=t.resolution,this._last_renderer=t,this._canvas_bounds=this._getCanvasBounds(),this._needsUpdate()&&this._update()}_update(){this._updateDOMInput(),this._substituted&&this._updateSurrogate(),this._updateBox()}_updateBox(){this._box_generator&&(this._needsNewBoxCache()&&this._buildBoxCache(),this.state==this._previous.state&&this._box==this._box_cache[this.state]||(this._box&&this.removeChild(this._box),this._box=this._box_cache[this.state],this.addChildAt(this._box,0),this._previous.state=this.state))}_updateSubstitution(){"FOCUSED"===this.state?(this._dom_visible=!0,this._surrogate.visible=0===this.text.length):(this._dom_visible=!1,this._surrogate.visible=!0),this._updateDOMInput(),this._updateSurrogate()}_updateDOMInput(){this._canvas_bounds&&(this._dom_input.style.top=(this._canvas_bounds.top||0)+"px",this._dom_input.style.left=(this._canvas_bounds.left||0)+"px",this._dom_input.style.transform=this._pixiMatrixToCSS(this._getDOMRelativeWorldTransform()),this._dom_input.style.opacity=this.worldAlpha,this._setDOMInputVisible(this.worldVisible&&this._dom_visible),this._previous.canvas_bounds=this._canvas_bounds,this._previous.world_transform=this.worldTransform.clone(),this._previous.world_alpha=this.worldAlpha,this._previous.world_visible=this.worldVisible)}_applyRestriction(){this._restrict_regex.test(this.text)?this._restrict_value=this.text:(this.text=this._restrict_value,this._dom_input.setSelectionRange(this._selection[0],this._selection[1]))}_needsUpdate(){return!this._comparePixiMatrices(this.worldTransform,this._previous.world_transform)||!this._compareClientRects(this._canvas_bounds,this._previous.canvas_bounds)||this.worldAlpha!=this._previous.world_alpha||this.worldVisible!=this._previous.world_visible}_needsNewBoxCache(){let t=this._getDOMInputBounds();return!this._previous.input_bounds||t.width!=this._previous.input_bounds.width||t.height!=this._previous.input_bounds.height}_createSurrogate(){this._surrogate_hitbox=new e.Graphics,this._surrogate_hitbox.alpha=0,this._surrogate_hitbox.interactive=!0,this._surrogate_hitbox.cursor="text",this._surrogate_hitbox.on("pointerdown",this._onSurrogateFocus.bind(this)),this.addChild(this._surrogate_hitbox),this._surrogate_mask=new e.Graphics,this.addChild(this._surrogate_mask),this._surrogate=new e.Text("",{}),this.addChild(this._surrogate),this._surrogate.mask=this._surrogate_mask,this._updateFontMetrics(),this._updateSurrogate()}_updateSurrogate(){let t=this._deriveSurrogatePadding(),e=this._getDOMInputBounds();switch(this._surrogate.style=this._deriveSurrogateStyle(),this._surrogate.style.padding=Math.max.apply(Math,t),this._surrogate.y=this._multiline?t[0]:(e.height-this._surrogate.height)/2,this._surrogate.x=t[3],this._surrogate.text=this._deriveSurrogateText(),this._surrogate.style.align){case"left":this._surrogate.x=t[3];break;case"center":this._surrogate.x=.5*e.width-.5*this._surrogate.width;break;case"right":this._surrogate.x=e.width-t[1]-this._surrogate.width}this._updateSurrogateHitbox(e),this._updateSurrogateMask(e,t)}_updateSurrogateHitbox(t){this._surrogate_hitbox.clear(),this._surrogate_hitbox.beginFill(0),this._surrogate_hitbox.drawRect(0,0,t.width,t.height),this._surrogate_hitbox.endFill(),this._surrogate_hitbox.interactive=!this._disabled}_updateSurrogateMask(t,e){this._surrogate_mask.clear(),this._surrogate_mask.beginFill(0),this._surrogate_mask.drawRect(e[3],0,t.width-e[3]-e[1],t.height),this._surrogate_mask.endFill()}_destroySurrogate(){this._surrogate&&(this.removeChild(this._surrogate),this.removeChild(this._surrogate_hitbox),this._surrogate.destroy(),this._surrogate_hitbox.destroy(),this._surrogate=null,this._surrogate_hitbox=null)}_onSurrogateFocus(){this._setDOMInputVisible(!0),setTimeout(this._ensureFocus.bind(this),10)}_ensureFocus(){this._hasFocus()||this.focus()}_deriveSurrogateStyle(){let t=new e.TextStyle;for(var i in this._input_style)switch(i){case"color":t.fill=this._input_style.color;break;case"fontFamily":case"fontSize":case"fontWeight":case"fontVariant":case"fontStyle":t[i]=this._input_style[i];break;case"letterSpacing":t.letterSpacing=parseFloat(this._input_style.letterSpacing);break;case"textAlign":t.align=this._input_style.textAlign}return this._multiline&&(t.lineHeight=parseFloat(t.fontSize),t.wordWrap=!0,t.wordWrapWidth=this._getDOMInputBounds().width),0===this._dom_input.value.length&&(t.fill=this._placeholderColor),t}_deriveSurrogatePadding(){let t=this._input_style.textIndent?parseFloat(this._input_style.textIndent):0;if(this._input_style.padding&&this._input_style.padding.length>0){let e=this._input_style.padding.trim().split(" ");if(1==e.length){let i=parseFloat(e[0]);return[i,i,i,i+t]}if(2==e.length){let i=parseFloat(e[0]),s=parseFloat(e[1]);return[i,s,i,s+t]}if(4==e.length){let i=e.map((t=>parseFloat(t)));return i[3]+=t,i}}return[0,0,0,t]}_deriveSurrogateText(){return 0===this._dom_input.value.length?this._placeholder:"password"==this._dom_input.type?"•".repeat(this._dom_input.value.length):this._dom_input.value}_updateFontMetrics(){const t=this._deriveSurrogateStyle().toFontString();this._font_metrics=e.TextMetrics.measureFont(t)}_buildBoxCache(){this._destroyBoxCache();let t=["DEFAULT","FOCUSED","DISABLED"],e=this._getDOMInputBounds();for(let i in t)this._box_cache[t[i]]=this._box_generator(e.width,e.height,t[i]);this._previous.input_bounds=e}_destroyBoxCache(){this._box&&(this.removeChild(this._box),this._box=null);for(let t in this._box_cache)this._box_cache[t].destroy(),this._box_cache[t]=null,delete this._box_cache[t]}_hasFocus(){return document.activeElement===this._dom_input}_setDOMInputVisible(t){this._dom_input.style.display=t?"block":"none"}_getCanvasBounds(){let t=this._last_renderer.view.getBoundingClientRect(),e={top:t.top,left:t.left,width:t.width,height:t.height};return e.left+=window.scrollX,e.top+=window.scrollY,e}_getDOMInputBounds(){let t=!1;this._dom_added||(document.body.appendChild(this._dom_input),t=!0);let e=this._dom_input.style.transform,i=this._dom_input.style.display;this._dom_input.style.transform="",this._dom_input.style.display="block";let s=this._dom_input.getBoundingClientRect();return this._dom_input.style.transform=e,this._dom_input.style.display=i,t&&document.body.removeChild(this._dom_input),s}_getDOMRelativeWorldTransform(){let t=this._last_renderer.view.getBoundingClientRect(),e=this.worldTransform.clone();return e.scale(this._resolution,this._resolution),e.scale(t.width/this._last_renderer.width,t.height/this._last_renderer.height),e}_pixiMatrixToCSS(t){return"matrix("+[t.a,t.b,t.c,t.d,t.tx,t.ty].join(",")+")"}_comparePixiMatrices(t,e){return!(!t||!e)&&t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d&&t.tx==e.tx&&t.ty==e.ty}_compareClientRects(t,e){return!(!t||!e)&&t.left==e.left&&t.top==e.top&&t.width==e.width&&t.height==e.height}}}("object"==typeof PIXI?{PIXI,exportTo:[PIXI,"TextInput"]}:"object"==typeof module?{PIXI:require("pixi.js"),exportTo:[module,"exports"]}:console.warn("[PIXI.TextInput] could not attach to PIXI namespace. Make sure to include this plugin after pixi.js")||{}); \ No newline at end of file diff --git a/swa/cross-nav/color.html b/swa/cross-nav/color.html new file mode 100644 index 0000000..1310bf4 --- /dev/null +++ b/swa/cross-nav/color.html @@ -0,0 +1,17 @@ + + + + + Title + + + + + + diff --git a/swa/cross-nav/index.html b/swa/cross-nav/index.html index 54d8a13..dadba4c 100644 --- a/swa/cross-nav/index.html +++ b/swa/cross-nav/index.html @@ -61,6 +61,18 @@ + +
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/swa/fmtconv/test.js b/swa/fmtconv/test.js new file mode 100644 index 0000000..f65f786 --- /dev/null +++ b/swa/fmtconv/test.js @@ -0,0 +1,37 @@ +const tool = require("./tool") + +const str1 = "722 黄谦 cheney"; +const str2 = "MIIBygYJKoZIhvcNAQcDoIIBuzCCAbcCAQAxggFLMIIBRwIBADAvMCMxCzAJBgNVBAYTAmNuMRQwEgYDVQQKEwtQQkMgVEVTVCBDQQIIE6NthajbntAwDQYJKoZIhvcNAQEBBQAEggEAfpqiXGzxULaCOJIPqRKFAsk/21WIg+NnrkgP/18OxSr68vnpLXKB2aDsyntX9RkwDVc/VwD7nrAq9l0xZPndrYQS2h8ayFfFUan7L5MtOvxS4Pt5+o84DE00+3axfkAr2v7I79tWFmAc0sipn+nQcJzoy0owknfG41hMauMrPI9jdtb1ZcUWLH0bMQ3VeYJJi8RSFYqirpc+RM3sOqwIvBthDcMdnH4XoUx4FKSdnpUd5wHd8Q1cEleVA1PAuEtim2ivjJ8450Y/08pURDOWcmabvX/f4mMp9437uigaC4qShRilyX3/Dt3xhdjq6ImKGxwLUqAaIM6DtHub08S0OTBjBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECP6Q/L2a03NMgECXtfqTp+J8JJGL9mNjf51jMe+C4E02q6UQtImLqmvnBEXCnkDLKOBIvOO7ADrlRDN73cma0865Qp1QXP2PT7ez" +const hex2 = "308201ca06092a864886f70d010703a08201bb308201b70201003182014b30820147020100302f3023310b300906035504061302636e31143012060355040a130b5042432054455354204341020813a36d85a8db9ed0300d06092a864886f70d0101010500048201007e9aa25c6cf150b68238920fa9128502c93fdb558883e367ae480fff5f0ec52afaf2f9e92d7281d9a0ecca7b57f519300d573f5700fb9eb02af65d3164f9ddad8412da1f1ac857c551a9fb2f932d3afc52e0fb79fa8f380c4d34fb76b17e402bdafec8efdb5616601cd2c8a99fe9d0709ce8cb4a309277c6e3584c6ae32b3c8f6376d6f565c5162c7d1b310dd57982498bc452158aa2ae973e44cdec3aac08bc1b610dc31d9c7e17a14c7814a49d9e951de701ddf10d5c1257950353c0b84b629b68af8c9f38e7463fd3ca5444339672669bbd7fdfe26329f78dfbba281a0b8a928518a5c97dff0eddf185d8eae8898a1b1c0b52a01a20ce83b47b9bd3c4b439306306092a864886f70d010701301406082a864886f70d03070408fe90fcbd9ad3734c804097b5fa93a7e27c24918bf663637f9d6331ef82e04d36aba510b4898baa6be70445c29e40cb28e048bce3bb003ae544337bddc99ad3ceb9429d505cfd8f4fb7b3" +const str3 = "722 cheney"; + + +const ret2 = tool.base64ToHex( str2 ) +console.log("hex=" + ret2) +console.assert( ret2 === hex2, "base64ToHex 转换失败" ); + +const ret22 = tool.hexToBase64( ret2 ) +console.assert( str2 === ret22, "base64 hex 转换失败" ); + + +const base64 = tool.utf8ToBase64(str1) +const ret3 = tool.base64ToHex( base64 ) +console.log("base64ToHex hex=" + ret3 ) +const ret32 = tool.hexToBase64( ret3 ) +console.assert( ret32 === base64, "base64 hex 中文 转换失败" ); + + +var ret11 = tool.utf8ToBase64(str1) +console.log("hex=" + ret11 ) + +var ret12 = tool.base64ToUtf8(ret11) +console.log("ret12=" + ret12) +console.assert( str1 === ret12, "base64 String 中文转换失败" ); + + +var ret4 = tool.utf8ToHex(str1); +var ret41 = tool.hexToUtf8(ret4); +console.assert( str1 === ret41, "hex String 中文转换失败" ); + + + diff --git a/swa/fmtconv/tool.js b/swa/fmtconv/tool.js new file mode 100644 index 0000000..891b9d6 --- /dev/null +++ b/swa/fmtconv/tool.js @@ -0,0 +1,551 @@ +var codePoint2utf8 = function (code) { + var bin = parseInt(code).toString(2) + var ln = 0; + var mx = 0; + if (bin.length <= 7) { + ln = 1; + mx = 7; + } else if (bin.length > 7 && bin.length <= 11) { + ln = 2; + mx = 11; + } else if (bin.length > 11 && bin.length <= 16) { + ln = 3; + mx = 16; + } else if (bin.length > 16 && bin.length <= 21) { + ln = 4; + mx = 21; + } else if (bin.length > 21 && bin.length <= 26) { + ln = 5; + mx = 26; + } else if (bin.length > 26 && bin.length <= 31) { + ln = 6; + mx = 31; + }; + var longbin = ("0".repeat(mx) + bin).slice(-mx) + var result = ''; + for (var i = 0; i < ln; i++) { + if (ln != 1) { + if (i == 0) { + result += parseInt("1".repeat(ln) + "0" + longbin.slice(0,7-ln),2).toString(16); + longbin = longbin.slice(7-ln); + } else { + result += parseInt("10" + longbin.slice(0,6),2).toString(16); + longbin = longbin.slice(6); + }; + } else { + result += ("00" + parseInt(longbin,2).toString(16)).slice(-2); + }; + }; + return result; +}; + +var stringToHex = function (inputstring) { + var result = ''; + for (var i = 0; i < inputstring.length; i++) { + result += codePoint2utf8(inputstring.codePointAt(i)) + }; + return result; +}; + +var hexToString = function (inputstring) { + try { + var result = decodeURIComponent(inputstring.toLowerCase().replace(/\s+/g, '').replace(/[0-9a-f]{2}/g, '%$&')); + } catch(e) { + throw "Not valid UTF-8 hex code!"; + }; + return result; +}; + + +function stringToByte(str) { + var bytes = new Array(); + var len, c; + len = str.length; + for(var i = 0; i < len; i++) { + c = str.charCodeAt(i); + if(c >= 0x010000 && c <= 0x10FFFF) { + bytes.push(((c >> 18) & 0x07) | 0xF0); + bytes.push(((c >> 12) & 0x3F) | 0x80); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if(c >= 0x000800 && c <= 0x00FFFF) { + bytes.push(((c >> 12) & 0x0F) | 0xE0); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if(c >= 0x000080 && c <= 0x0007FF) { + bytes.push(((c >> 6) & 0x1F) | 0xC0); + bytes.push((c & 0x3F) | 0x80); + } else { + bytes.push(c & 0xFF); + } + } + return bytes; + + +} +// utf8 +function byteToString(arr) { + if(typeof arr === 'string') { + return arr; + } + var str = '', + _arr = arr; + for(var i = 0; i < _arr.length; i++) { + var one = _arr[i].toString(2), + v = one.match(/^1+?(?=0)/); + if(v && one.length == 8) { + var bytesLength = v[0].length; + var store = _arr[i].toString(2).slice(7 - bytesLength); + for(var st = 1; st < bytesLength; st++) { + store += _arr[st + i].toString(2).slice(2); + } + str += String.fromCharCode(parseInt(store, 2)); + i += bytesLength - 1; + } else { + str += String.fromCharCode(_arr[i]); + } + } + return str; +} +/** + * Convert the given string to byte array + * + * @param {string} str the string to be converted to byte array + * @returns {number[]} + */ +var str2bytes = function (str) { + var i = 0; + var ch = null; + var hex = null; + var encoded = encodeURIComponent(str); + var length = encoded.length; + var bytes = []; + + while (i < length) { + ch = encoded.charAt(i++); + if (ch === '%') { + hex = encoded.charAt(i++) + hex += encoded.charAt(i++); + bytes.push(parseInt(hex, 16)); + } else { + bytes.push(ch.charCodeAt(0)); + } + } + + return bytes; +}; + +/** + * Convert the given byte array to string + * + * @param {number[]} bytes The byte array to be converted to string + * @returns {string} + */ +var bytes2str = function (bytes) { + var i = 0; + var hex = null; + var byte = 0; + var hexArray = []; + var length = bytes.length; + + while (i < length) { + byte = bytes[i++]; + hex = byte.toString(16); + hex = hex.length < 2 ? ('%0' + hex) : ('%' + hex); + hexArray.push(hex); + } + + return decodeURIComponent(hexArray.join('')); +}; +function base64ArrayBuffer(arrayBuffer) { + var base64 = '' + var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + + var bytes = new Uint8Array(arrayBuffer) + var byteLength = bytes.byteLength + var byteRemainder = byteLength % 3 + var mainLength = byteLength - byteRemainder + + var a, b, c, d + var chunk + + // Main loop deals with bytes in chunks of 3 + for (var i = 0; i < mainLength; i = i + 3) { + // Combine the three bytes into a single integer + chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2] + + // Use bitmasks to extract 6-bit segments from the triplet + a = (chunk & 16515072) >> 18 // 16515072 = (2^6 - 1) << 18 + b = (chunk & 258048) >> 12 // 258048 = (2^6 - 1) << 12 + c = (chunk & 4032) >> 6 // 4032 = (2^6 - 1) << 6 + d = chunk & 63 // 63 = 2^6 - 1 + + // Convert the raw binary segments to the appropriate ASCII encoding + base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d] + } + + // Deal with the remaining bytes and padding + if (byteRemainder == 1) { + chunk = bytes[mainLength] + + a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2 + + // Set the 4 least significant bits to zero + b = (chunk & 3) << 4 // 3 = 2^2 - 1 + + base64 += encodings[a] + encodings[b] + '==' + } else if (byteRemainder == 2) { + chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1] + + a = (chunk & 64512) >> 10 // 64512 = (2^6 - 1) << 10 + b = (chunk & 1008) >> 4 // 1008 = (2^6 - 1) << 4 + + // Set the 2 least significant bits to zero + c = (chunk & 15) << 2 // 15 = 2^4 - 1 + + base64 += encodings[a] + encodings[b] + encodings[c] + '=' + } + + return base64 +} + +(function() { + var base64EncodeChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + base64DecodeChars = new Array(( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 62, ( - 1), ( - 1), ( - 1), 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1)); + this.base64encode = function(e) { + var r, a, c, h, o, t; + for (c = e.length, a = 0, r = ''; a < c;) { + if (h = 255 & e.charCodeAt(a++), a == c) { + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4), + r += '=='; + break + } + if (o = e.charCodeAt(a++), a == c) { + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4), + r += base64EncodeChars.charAt((15 & o) << 2), + r += '='; + break + } + t = e.charCodeAt(a++), + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4), + r += base64EncodeChars.charAt((15 & o) << 2 | (192 & t) >> 6), + r += base64EncodeChars.charAt(63 & t) + } + return r + } + this.base64decode = function(e) { + var r, a, c, h, o, t, d; + for (t = e.length, o = 0, d = ''; o < t;) { + do r = base64DecodeChars[255 & e.charCodeAt(o++)]; + while (o < t && r == -1); + if (r == -1) break; + do a = base64DecodeChars[255 & e.charCodeAt(o++)]; + while (o < t && a == -1); + if (a == -1) break; + d += String.fromCharCode(r << 2 | (48 & a) >> 4); + do { + if (c = 255 & e.charCodeAt(o++), 61 == c) return d; + c = base64DecodeChars[c] + } while ( o < t && c == - 1 ); + if (c == -1) break; + d += String.fromCharCode((15 & a) << 4 | (60 & c) >> 2); + do { + if (h = 255 & e.charCodeAt(o++), 61 == h) return d; + h = base64DecodeChars[h] + } while ( o < t && h == - 1 ); + if (h == -1) break; + d += String.fromCharCode((3 & c) << 6 | h) + } + return d + } + this.HexToBase64 = function(str) { + return base64encode(String.fromCharCode.apply(null, str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" "))); + } + this.Base64Tohex = function(str) { + for (var i = 0, + bin = base64decode(str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) { + var tmp = bin.charCodeAt(i).toString(16); + if (tmp.length === 1) tmp = "0" + tmp; + hex[hex.length] = tmp; + } + return hex.join(""); + }, + this.toBytes = function(str) { + for (var bytes = [], c = 0; c < str.length; c += 2) + bytes.push(parseInt(str.substr(c, 2), 16)); + return bytes; + } + +}) (); +//hexToBase64 Base64Tohex base64decode base64encode + +var bytesToString = function(bytes){ + return hexToString(bytesToHex(bytes)); +} + + +var bytesToBase64 = function(bytes){ + return base64ArrayBuffer(bytes); +} + +// Convert a byte array to a hex string +var bytesToHex = function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(""); +} + + +var stringToBase64 = function(str){ + return base64encode(str); +} + +var stringToBytes = function(str){ + return hexToBytes(stringToHex(str)); +} + +// Convert a ASCII string to a hex string +var stringToHex = function(str) { + return str.split("").map(function(c) { + return ("0" + c.charCodeAt(0).toString(16)).slice(-2); + }).join(""); +} + +var hexToBytes= function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; +} + +// Convert a hex string to a ASCII string +var hexToString = function(hexStr) { + var hex = hexStr.toString();//force conversion + var str = ''; + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + return str; +} + +var hexToBase64 = function(hexStr){ + return HexToBase64(hexStr); +} + +var base64ToString = function(base64str){ + return base64decode(base64str); +} + + +const Base64 = { + _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + encode: function(e) { + var t = ""; + var n, r, i, s, o, u, a; + var f = 0; + e = Base64._utf8_encode(e); + while (f < e.length) { + n = e.charCodeAt(f++); + r = e.charCodeAt(f++); + i = e.charCodeAt(f++); + s = n >> 2; + o = (n & 3) << 4 | r >> 4; + u = (r & 15) << 2 | i >> 6; + a = i & 63; + if (isNaN(r)) { + u = a = 64 + } else if (isNaN(i)) { + a = 64 + } + t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a) + } + return t + }, + decode: function(e) { + var t = ""; + var n, r, i; + var s, o, u, a; + var f = 0; + e = e.replace(/[^A-Za-z0-9+/=]/g, ""); + while (f < e.length) { + s = this._keyStr.indexOf(e.charAt(f++)); + o = this._keyStr.indexOf(e.charAt(f++)); + u = this._keyStr.indexOf(e.charAt(f++)); + a = this._keyStr.indexOf(e.charAt(f++)); + n = s << 2 | o >> 4; + r = (o & 15) << 4 | u >> 2; + i = (u & 3) << 6 | a; + t = t + String.fromCharCode(n); + if (u != 64) { + t = t + String.fromCharCode(r) + } + if (a != 64) { + t = t + String.fromCharCode(i) + } + } + t = Base64._utf8_decode(t); + return t + }, + _utf8_encode: function(e) { + e = e.replace(/rn/g, "n"); + var t = ""; + for (var n = 0; n < e.length; n++) { + var r = e.charCodeAt(n); + if (r < 128) { + t += String.fromCharCode(r) + } else if (r > 127 && r < 2048) { + t += String.fromCharCode(r >> 6 | 192); + t += String.fromCharCode(r & 63 | 128) + } else { + t += String.fromCharCode(r >> 12 | 224); + t += String.fromCharCode(r >> 6 & 63 | 128); + t += String.fromCharCode(r & 63 | 128) + } + } + return t + }, + _utf8_decode: function(e) { + var t = ""; + var n = 0; + var r = 0; + var c1 =0; + var c2 =0; + var c3 =0; + while (n < e.length) { + r = e.charCodeAt(n); + if (r < 128) { + t += String.fromCharCode(r); + n++ + } else if (r > 191 && r < 224) { + c2 = e.charCodeAt(n + 1); + t += String.fromCharCode((r & 31) << 6 | c2 & 63); + n += 2 + } else { + c2 = e.charCodeAt(n + 1); + c3 = e.charCodeAt(n + 2); + t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63); + n += 3 + } + } + return t + } +} + +function encodeUtf8(text) { + const code = encodeURIComponent(text); + const bytes = []; + for (var i = 0; i < code.length; i++) { + const c = code.charAt(i); + if (c === '%') { + const hex = code.charAt(i + 1) + code.charAt(i + 2); + const hexVal = parseInt(hex, 16); + bytes.push(hexVal); + i += 2; + } else bytes.push(c.charCodeAt(0)); + } + return bytes; +} + +function decodeUtf8(bytes) { + var encoded = ""; + for (var i = 0; i < bytes.length; i++) { + encoded += '%' + bytes[i].toString(16); + } + return decodeURIComponent(encoded); +} +function strToBytesUTF8(str) { + let utf8 = []; + for (let i = 0; i < str.length; i++) { + let charcode = str.charCodeAt(i); + if (charcode < 0x80) utf8.push(charcode); + else if (charcode < 0x800) { + utf8.push(0xc0 | (charcode >> 6), + 0x80 | (charcode & 0x3f)); + } + else if (charcode < 0xd800 || charcode >= 0xe000) { + utf8.push(0xe0 | (charcode >> 12), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + // surrogate pair + else { + i++; + // UTF-16 encodes 0x10000-0x10FFFF by + // subtracting 0x10000 and splitting the + // 20 bits of 0x0-0xFFFFF into two halves + charcode = 0x10000 + (((charcode & 0x3ff)<<10) + | (str.charCodeAt(i) & 0x3ff)); + utf8.push(0xf0 | (charcode >>18), + 0x80 | ((charcode>>12) & 0x3f), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + } + return utf8; +} + +function utf8ToBase64(str){ + var ret11 = strToBytesUTF8( str ) + return bytesToBase64( ret11 ) +} + +function base64ToUtf8( str ){ + var hex = base64ToHex( str ); + var ret = hexToBytes( hex ) + // var ret = base64ToBytes( str ) + return decodeUtf8(ret); +} + +var base64ToHex = function(base64str){ + return Base64Tohex(base64str); +} + +var base64ToBytes = function(base64str){ + return toBytes(base64str); + //null +} +var utf8ToHex = function (str) { + var ret11 = strToBytesUTF8( str ) + return bytesToHex( ret11 ) +} + +var hexToUtf8 = function (hex) { + var ret = hexToBytes( hex ) + // var ret = base64ToBytes( str ) + return decodeUtf8(ret); +} + +if ( module ) { + + module.exports = { + + stringToByte, + byteToString, + str2bytes, + bytes2str, + base64ArrayBuffer, + bytesToString, + bytesToBase64, + bytesToHex, + stringToBase64, + stringToBytes, + stringToHex, + hexToBytes, + hexToString, + hexToBase64, + base64ToString, + base64ToHex, + base64ToBytes, + Base64, + encodeUtf8, + decodeUtf8, + strToBytesUTF8, + utf8ToBase64, + base64ToUtf8, + utf8ToHex, + hexToUtf8 + } +} diff --git a/swa/ic/index.html b/swa/ic/index.html index 1100a85..f8bc106 100644 --- a/swa/ic/index.html +++ b/swa/ic/index.html @@ -366,12 +366,30 @@ } var path2 = $("#path2").val(); - check(path2, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串填充错误") + check(path2, /^([A-Fa-f0-9][A-Fa-f0-9]){4}$/g, "特征字串2填充错误") + + var path3 = $("#path3").val(); + check(path3, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串3填充错误") + + var path4 = $("#path4").val(); + check(path4, /^([A-Fa-f0-9][A-Fa-f0-9]){4}$/g, "特征字串4填充错误") + + var path5 = $("#path5").val(); + check(path5, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串5填充错误") ic.writeHex(0x20, path1) .then(function (def){ return ic.writeHex(0x30, path2) }) + .then(function (def){ + return ic.writeHex(0x40, path3) + }) + .then(function (def){ + return ic.writeHex(0x50, path4) + }) + .then(function (def){ + return ic.writeHex(0x60, path5) + }) .then(function (def){ success("写入成功") }) diff --git a/swa/ic/mac.js b/swa/ic/mac.js index 2ba750e..e375c98 100644 --- a/swa/ic/mac.js +++ b/swa/ic/mac.js @@ -83,22 +83,24 @@ function bytesToHex(bytes) { -const DES = require('./jssrc/des.js') -var des = new DES(); -var key = hexToBytes("12345678123456781234567812345678") -var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); -console.log( ret ) - -des = new DES(); -key = hexToBytes("12345678123456781234567812345670") -ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); -console.log( ret ) -// -// -// const sm4 = require('./jssrc/sm4.js') -// ret = sm4.SM4CryptECB("000000000000000011", 1 , "12345678123456781234567812345678") +// const DES = require('./jssrc/des.js') +// var des = new DES(); +// var key = hexToBytes("12345678123456781234567812345678") +// var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); // console.log( ret ) // +// des = new DES(); +// key = hexToBytes("12345678123456781234567812345670") +// ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// + + +const sm4 = require('./jssrc/sm4.js') +var ret = sm4.SM4CryptECB("00000000000000000000000000000000", 1 , "11111111111111111111111111111111") +console.log( ret ) + diff --git a/swa/keycodes/index.html b/swa/keycodes/index.html index a1f20d8..5bf6a41 100644 --- a/swa/keycodes/index.html +++ b/swa/keycodes/index.html @@ -5,7 +5,7 @@ JavaScript Event KeyCodes - + diff --git a/swa/token/.gitignore b/swa/token/.gitignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/swa/token/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/swa/token/active.ic.min.js b/swa/token/active.ic.min.js new file mode 100644 index 0000000..d982732 --- /dev/null +++ b/swa/token/active.ic.min.js @@ -0,0 +1,226 @@ +function check(v, re, msg) { + if (!re.test(v)) { + alert(msg) + } +} + +function padPkcs7(data) { + + var d = data.length % 16; + d = 16 - d; + var arr = Array.from(data) + for (var i = 0; i < d; i++) { + arr.push(d) + } + return arr; +} + +function stripPcks7(data) { + var arr = Array.from(data) + var padder = arr[arr.length - 1]; + return arr.slice(0, arr.length - padder); +} + +function ecb(bytes, cb) { + var ret = [] + for (var i = 0; i < bytes.length; i += 16) { + var d = bytes.slice(i, i + 16); + var en = cb(d) + ret = ret.concat(Array.from(en)) + } + return ret; +} + + +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} + +function hexToString(hex){ + var arr = hex.split("") + var out = "" + for (var i = 0; i < arr.length / 2; i++) { + var tmp = "0x" + arr[i * 2] + arr[i * 2 + 1] + var charValue = String.fromCharCode(tmp); + out += charValue + } + return out +} + +class ActiveIC { + constructor() { + this.server = "ws://127.0.0.1:12322/active"; + this.waitMap = {} + + } + + __debug(...str) { + if (window.active_debug) { + console.log(...str) + } + } + + connect() { + this.__debug("connect") + var _this = this; + try { + + if (this.sock) { + this.sock.onclose = function () { + } + this.sock.close() + } + + this.sock = new WebSocket(this.server); + this.__debug("sock") + this.sock.onopen = function () { + _this.__debug("open"); + _this.sock.isopened = true; + _this.sock.onmessage = function (e) { + _this.__debug(e.data) + var ret = JSON.parse(e.data); + + var cb = _this.waitMap[ret.id] + cb && cb(ret) + } + }; + + this.sock.onclose = function () { + _this.sock.isopened = false; + _this.__debug("close"); + _this.reconnect(); + }; + + // this.sock.onerror = function () { + // _this.sock.isopened = false; + // this.__debug("onerror"); + // _this.reconnect(); + // }; + + } catch (e) { + _this.__debug("onerror"); + _this.reconnect(); + } + + } + + reconnect() { + this.__debug("reconnect") + var _this = this; + + if (_this.sock && _this.sock.isopened) { + this.__debug("miss") + return + } + + setTimeout(function () { + _this.connect(); + }, 3000); + } + + __send(cmd, param, cb) { + var id = (Math.random() + "").substr(2); + this.sock.send( + JSON.stringify({ + id: id, + cmd: cmd, + param: param + }) + ); + if (cb) { + this.waitMap[id] = cb; + } + } + + __check(v, re, msg, reject) { + if (!re.test(v)) { + reject && reject({ + msg, + code: "C0" + }) + } + } + + readText(addr, len) { + var _this = this; + return new Promise(function (resolve, reject) { + + if (!_this.sock || !_this.sock.isopened) { + reject({ + code: "CB", + msg: "Active 通信失败" + }) + } + + _this.__check(addr, /\d{1,2}/g, "用户编号填写错误!", reject); + _this.__check(len, /\d{1,2}/g, "用户类型填写错误!", reject); + + _this.__send("read", { + addr, len + }, function (ret) { + if (ret.code === "00") { + resolve(ret) + } else { + reject(ret) + } + }) + }) + } + writeText(addr, data) { + return this.writeHex(addr, stringToHex( data )) + } + writeHex(addr, data) { + var _this = this; + return new Promise(function (resolve, reject) { + + if (!_this.sock || !_this.sock.isopened) { + reject({ + code: "CB", + msg: "Active 通信失败" + }) + } + + + _this.__check(addr, /\d{1,2}/g, "地址填写错误!", reject); + _this.__check(data, /^([A-Fa-f0-9][A-Fa-f0-9])+$/g, "数据填写错误!", reject); + + _this.__send("write", { + addr, data + }, function (ret) { + if (ret.code === "00") { + resolve(ret) + } else { + reject(ret) + } + }) + }) + } + +} + + +/** + * 检测通过返回 true + * 检测不通过返回 fase + */ +ActiveIC.checkSupport = function () { + try { + if (!!window.WebSocket && window.WebSocket.prototype.send) { + return true; + } else { + console.error("您的浏览器不支持!") + return false; + } + } catch (e) { + console.error("当前环境不支持!", e) + return false; + } +} diff --git a/swa/token/active_ic_setup.exe b/swa/token/active_ic_setup.exe new file mode 100644 index 0000000..ea81e25 Binary files /dev/null and b/swa/token/active_ic_setup.exe differ diff --git a/swa/token/des.js b/swa/token/des.js new file mode 100644 index 0000000..eb611aa --- /dev/null +++ b/swa/token/des.js @@ -0,0 +1,851 @@ +/** + * DES加密/解密 + * @Copyright Copyright (c) 2006 + * @author Guapo + * @see DESCore + */ +/* +* encrypt the string to string made up of hex +* return the encrypted string +*/ +var defaultKey="app@@server"; +function desEnc(data){ + return strEnc(data,defaultKey); +} +function desDec(data){ + return strDec(data,defaultKey); +} + + +function strEnc(data,firstKey,secondKey,thirdKey){ + var leng = data.length; + var encData = ""; + var firstKeyBt,secondKeyBt,thirdKeyBt,firstLength,secondLength,thirdLength; + if(firstKey != null && firstKey != ""){ + firstKeyBt = getKeyBytes(firstKey); + firstLength = firstKeyBt.length; + } + if(secondKey != null && secondKey != ""){ + secondKeyBt = getKeyBytes(secondKey); + secondLength = secondKeyBt.length; + } + if(thirdKey != null && thirdKey != ""){ + thirdKeyBt = getKeyBytes(thirdKey); + thirdLength = thirdKeyBt.length; + } + + if(leng > 0){ + if(leng < 4){ + var bt = strToBt(data); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x = 0; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData = bt64ToHex(encByte); + }else{ + var iterator = parseInt(leng/4); + var remainder = leng%4; + var i=0; + for(i = 0;i < iterator;i++){ + var tempData = data.substring(i*4+0,i*4+4); + var tempByte = strToBt(tempData); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData += bt64ToHex(encByte); + } + if(remainder > 0){ + var remainderData = data.substring(iterator*4+0,leng); + var tempByte = strToBt(remainderData); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData += bt64ToHex(encByte); + } + } + } + return encData; +} +/* +* decrypt the encrypted string to the original string +* +* return the original string +*/ +function strDec(data,firstKey,secondKey,thirdKey){ + var leng = data.length; + var decStr = ""; + var firstKeyBt,secondKeyBt,thirdKeyBt,firstLength,secondLength,thirdLength; + if(firstKey != null && firstKey != ""){ + firstKeyBt = getKeyBytes(firstKey); + firstLength = firstKeyBt.length; + } + if(secondKey != null && secondKey != ""){ + secondKeyBt = getKeyBytes(secondKey); + secondLength = secondKeyBt.length; + } + if(thirdKey != null && thirdKey != ""){ + thirdKeyBt = getKeyBytes(thirdKey); + thirdLength = thirdKeyBt.length; + } + + var iterator = parseInt(leng/16); + var i=0; + for(i = 0;i < iterator;i++){ + var tempData = data.substring(i*16+0,i*16+16); + var strByte = hexToBt64(tempData); + var intByte = new Array(64); + var j = 0; + for(j = 0;j < 64; j++){ + intByte[j] = parseInt(strByte.substring(j,j+1)); + } + var decByte; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = thirdLength - 1;x >= 0;x --){ + tempBt = dec(tempBt,thirdKeyBt[x]); + } + for(y = secondLength - 1;y >= 0;y --){ + tempBt = dec(tempBt,secondKeyBt[y]); + } + for(z = firstLength - 1;z >= 0 ;z --){ + tempBt = dec(tempBt,firstKeyBt[z]); + } + decByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = secondLength - 1;x >= 0 ;x --){ + tempBt = dec(tempBt,secondKeyBt[x]); + } + for(y = firstLength - 1;y >= 0 ;y --){ + tempBt = dec(tempBt,firstKeyBt[y]); + } + decByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = firstLength - 1;x >= 0 ;x --){ + tempBt = dec(tempBt,firstKeyBt[x]); + } + decByte = tempBt; + } + } + } + decStr += byteToString(decByte); + } + return decStr; +} +/* +* chang the string into the bit array +* +* return bit array(it's length % 64 = 0) +*/ +function getKeyBytes(key){ + var keyBytes = new Array(); + var leng = key.length; + var iterator = parseInt(leng/4); + var remainder = leng%4; + var i = 0; + for(i = 0;i < iterator; i ++){ + keyBytes[i] = strToBt(key.substring(i*4+0,i*4+4)); + } + if(remainder > 0){ + keyBytes[i] = strToBt(key.substring(i*4+0,leng)); + } + return keyBytes; +} +/* +* chang the string(it's length <= 4) into the bit array +* +* return bit array(it's length = 64) +*/ +function strToBt(str){ + var leng = str.length; + var bt = new Array(64); + if(leng < 4){ + var i=0,j=0,p=0,q=0; + for(i = 0;ij;m--){ + pow *= 2; + } + bt[16*i+j]=parseInt(k/pow)%2; + } + } + for(p = leng;p<4;p++){ + var k = 0; + for(q=0;q<16;q++){ + var pow=1,m=0; + for(m=15;m>q;m--){ + pow *= 2; + } + bt[16*p+q]=parseInt(k/pow)%2; + } + } + }else{ + for(i = 0;i<4;i++){ + var k = str.charCodeAt(i); + for(j=0;j<16;j++){ + var pow=1; + for(m=15;m>j;m--){ + pow *= 2; + } + bt[16*i+j]=parseInt(k/pow)%2; + } + } + } + return bt; +} +/* +* chang the bit(it's length = 4) into the hex +* +* return hex +*/ +function bt4ToHex(binary) { + var hex; + switch (binary) { + case "0000" : hex = "0"; break; + case "0001" : hex = "1"; break; + case "0010" : hex = "2"; break; + case "0011" : hex = "3"; break; + case "0100" : hex = "4"; break; + case "0101" : hex = "5"; break; + case "0110" : hex = "6"; break; + case "0111" : hex = "7"; break; + case "1000" : hex = "8"; break; + case "1001" : hex = "9"; break; + case "1010" : hex = "A"; break; + case "1011" : hex = "B"; break; + case "1100" : hex = "C"; break; + case "1101" : hex = "D"; break; + case "1110" : hex = "E"; break; + case "1111" : hex = "F"; break; + } + return hex; +} +/* +* chang the hex into the bit(it's length = 4) +* +* return the bit(it's length = 4) +*/ +function hexToBt4(hex) { + var binary; + switch (hex) { + case "0" : binary = "0000"; break; + case "1" : binary = "0001"; break; + case "2" : binary = "0010"; break; + case "3" : binary = "0011"; break; + case "4" : binary = "0100"; break; + case "5" : binary = "0101"; break; + case "6" : binary = "0110"; break; + case "7" : binary = "0111"; break; + case "8" : binary = "1000"; break; + case "9" : binary = "1001"; break; + case "A" : binary = "1010"; break; + case "B" : binary = "1011"; break; + case "C" : binary = "1100"; break; + case "D" : binary = "1101"; break; + case "E" : binary = "1110"; break; + case "F" : binary = "1111"; break; + } + return binary; +} +/* +* chang the bit(it's length = 64) into the string +* +* return string +*/ +function byteToString(byteData){ + var str=""; + for(i = 0;i<4;i++){ + var count=0; + for(j=0;j<16;j++){ + var pow=1; + for(m=15;m>j;m--){ + pow*=2; + } + count+=byteData[16*i+j]*pow; + } + if(count != 0){ + str+=String.fromCharCode(count); + } + } + return str; +} +function bt64ToHex(byteData){ + var hex = ""; + for(i = 0;i<16;i++){ + var bt = ""; + for(j=0;j<4;j++){ + bt += byteData[i*4+j]; + } + hex+=bt4ToHex(bt); + } + return hex; +} +function hexToBt64(hex){ + var binary = ""; + for(i = 0;i<16;i++){ + binary+=hexToBt4(hex.substring(i,i+1)); + } + return binary; +} +/* +* the 64 bit des core arithmetic +*/ +function enc(dataByte,keyByte){ + var keys = generateKeys(keyByte); + var ipByte = initPermute(dataByte); + var ipLeft = new Array(32); + var ipRight = new Array(32); + var tempLeft = new Array(32); + var i = 0,j = 0,k = 0,m = 0, n = 0; + for(k = 0;k < 32;k ++){ + ipLeft[k] = ipByte[k]; + ipRight[k] = ipByte[32+k]; + } + for(i = 0;i < 16;i ++){ + for(j = 0;j < 32;j ++){ + tempLeft[j] = ipLeft[j]; + ipLeft[j] = ipRight[j]; + } + var key = new Array(48); + for(m = 0;m < 48;m ++){ + key[m] = keys[i][m]; + } + var tempRight = xor(pPermute(sBoxPermute(xor(expandPermute(ipRight),key))), tempLeft); + for(n = 0;n < 32;n ++){ + ipRight[n] = tempRight[n]; + } + + } + + + var finalData =new Array(64); + for(i = 0;i < 32;i ++){ + finalData[i] = ipRight[i]; + finalData[32+i] = ipLeft[i]; + } + return finallyPermute(finalData); +} +function dec(dataByte,keyByte){ + var keys = generateKeys(keyByte); + var ipByte = initPermute(dataByte); + var ipLeft = new Array(32); + var ipRight = new Array(32); + var tempLeft = new Array(32); + var i = 0,j = 0,k = 0,m = 0, n = 0; + for(k = 0;k < 32;k ++){ + ipLeft[k] = ipByte[k]; + ipRight[k] = ipByte[32+k]; + } + for(i = 15;i >= 0;i --){ + for(j = 0;j < 32;j ++){ + tempLeft[j] = ipLeft[j]; + ipLeft[j] = ipRight[j]; + } + var key = new Array(48); + for(m = 0;m < 48;m ++){ + key[m] = keys[i][m]; + } + + var tempRight = xor(pPermute(sBoxPermute(xor(expandPermute(ipRight),key))), tempLeft); + for(n = 0;n < 32;n ++){ + ipRight[n] = tempRight[n]; + } + } + + + var finalData =new Array(64); + for(i = 0;i < 32;i ++){ + finalData[i] = ipRight[i]; + finalData[32+i] = ipLeft[i]; + } + return finallyPermute(finalData); +} +function initPermute(originalData){ + var ipByte = new Array(64); + for (i = 0, m = 1, n = 0; i < 4; i++, m += 2, n += 2) { + for (j = 7, k = 0; j >= 0; j--, k++) { + ipByte[i * 8 + k] = originalData[j * 8 + m]; + ipByte[i * 8 + k + 32] = originalData[j * 8 + n]; + } + } + return ipByte; +} +function expandPermute(rightData){ + var epByte = new Array(48); + for (i = 0; i < 8; i++) { + if (i == 0) { + epByte[i * 6 + 0] = rightData[31]; + } else { + epByte[i * 6 + 0] = rightData[i * 4 - 1]; + } + epByte[i * 6 + 1] = rightData[i * 4 + 0]; + epByte[i * 6 + 2] = rightData[i * 4 + 1]; + epByte[i * 6 + 3] = rightData[i * 4 + 2]; + epByte[i * 6 + 4] = rightData[i * 4 + 3]; + if (i == 7) { + epByte[i * 6 + 5] = rightData[0]; + } else { + epByte[i * 6 + 5] = rightData[i * 4 + 4]; + } + } + return epByte; +} +function xor(byteOne,byteTwo){ + var xorByte = new Array(byteOne.length); + for(i = 0;i < byteOne.length; i ++){ + xorByte[i] = byteOne[i] ^ byteTwo[i]; + } + return xorByte; +} +function sBoxPermute(expandByte){ + + var sBoxByte = new Array(32); + var binary = ""; + var s1 = [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 ]]; + /* Table - s2 */ + var s2 = [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 ]]; + /* Table - s3 */ + var s3= [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 ]]; + /* Table - s4 */ + var s4 = [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 ]]; + /* Table - s5 */ + var s5 = [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 ]]; + /* Table - s6 */ + var s6 = [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 ]]; + /* Table - s7 */ + var s7 = [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12]]; + /* Table - s8 */ + var s8 = [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11]]; + + for(m=0;m<8;m++){ + var i=0,j=0; + i = expandByte[m*6+0]*2+expandByte[m*6+5]; + j = expandByte[m * 6 + 1] * 2 * 2 * 2 + + expandByte[m * 6 + 2] * 2* 2 + + expandByte[m * 6 + 3] * 2 + + expandByte[m * 6 + 4]; + switch (m) { + case 0 : + binary = getBoxBinary(s1[i][j]); + break; + case 1 : + binary = getBoxBinary(s2[i][j]); + break; + case 2 : + binary = getBoxBinary(s3[i][j]); + break; + case 3 : + binary = getBoxBinary(s4[i][j]); + break; + case 4 : + binary = getBoxBinary(s5[i][j]); + break; + case 5 : + binary = getBoxBinary(s6[i][j]); + break; + case 6 : + binary = getBoxBinary(s7[i][j]); + break; + case 7 : + binary = getBoxBinary(s8[i][j]); + break; + } + sBoxByte[m*4+0] = parseInt(binary.substring(0,1)); + sBoxByte[m*4+1] = parseInt(binary.substring(1,2)); + sBoxByte[m*4+2] = parseInt(binary.substring(2,3)); + sBoxByte[m*4+3] = parseInt(binary.substring(3,4)); + } + return sBoxByte; +} +function pPermute(sBoxByte){ + var pBoxPermute = new Array(32); + pBoxPermute[ 0] = sBoxByte[15]; + pBoxPermute[ 1] = sBoxByte[ 6]; + pBoxPermute[ 2] = sBoxByte[19]; + pBoxPermute[ 3] = sBoxByte[20]; + pBoxPermute[ 4] = sBoxByte[28]; + pBoxPermute[ 5] = sBoxByte[11]; + pBoxPermute[ 6] = sBoxByte[27]; + pBoxPermute[ 7] = sBoxByte[16]; + pBoxPermute[ 8] = sBoxByte[ 0]; + pBoxPermute[ 9] = sBoxByte[14]; + pBoxPermute[10] = sBoxByte[22]; + pBoxPermute[11] = sBoxByte[25]; + pBoxPermute[12] = sBoxByte[ 4]; + pBoxPermute[13] = sBoxByte[17]; + pBoxPermute[14] = sBoxByte[30]; + pBoxPermute[15] = sBoxByte[ 9]; + pBoxPermute[16] = sBoxByte[ 1]; + pBoxPermute[17] = sBoxByte[ 7]; + pBoxPermute[18] = sBoxByte[23]; + pBoxPermute[19] = sBoxByte[13]; + pBoxPermute[20] = sBoxByte[31]; + pBoxPermute[21] = sBoxByte[26]; + pBoxPermute[22] = sBoxByte[ 2]; + pBoxPermute[23] = sBoxByte[ 8]; + pBoxPermute[24] = sBoxByte[18]; + pBoxPermute[25] = sBoxByte[12]; + pBoxPermute[26] = sBoxByte[29]; + pBoxPermute[27] = sBoxByte[ 5]; + pBoxPermute[28] = sBoxByte[21]; + pBoxPermute[29] = sBoxByte[10]; + pBoxPermute[30] = sBoxByte[ 3]; + pBoxPermute[31] = sBoxByte[24]; + return pBoxPermute; +} +function finallyPermute(endByte){ + var fpByte = new Array(64); + fpByte[ 0] = endByte[39]; + fpByte[ 1] = endByte[ 7]; + fpByte[ 2] = endByte[47]; + fpByte[ 3] = endByte[15]; + fpByte[ 4] = endByte[55]; + fpByte[ 5] = endByte[23]; + fpByte[ 6] = endByte[63]; + fpByte[ 7] = endByte[31]; + fpByte[ 8] = endByte[38]; + fpByte[ 9] = endByte[ 6]; + fpByte[10] = endByte[46]; + fpByte[11] = endByte[14]; + fpByte[12] = endByte[54]; + fpByte[13] = endByte[22]; + fpByte[14] = endByte[62]; + fpByte[15] = endByte[30]; + fpByte[16] = endByte[37]; + fpByte[17] = endByte[ 5]; + fpByte[18] = endByte[45]; + fpByte[19] = endByte[13]; + fpByte[20] = endByte[53]; + fpByte[21] = endByte[21]; + fpByte[22] = endByte[61]; + fpByte[23] = endByte[29]; + fpByte[24] = endByte[36]; + fpByte[25] = endByte[ 4]; + fpByte[26] = endByte[44]; + fpByte[27] = endByte[12]; + fpByte[28] = endByte[52]; + fpByte[29] = endByte[20]; + fpByte[30] = endByte[60]; + fpByte[31] = endByte[28]; + fpByte[32] = endByte[35]; + fpByte[33] = endByte[ 3]; + fpByte[34] = endByte[43]; + fpByte[35] = endByte[11]; + fpByte[36] = endByte[51]; + fpByte[37] = endByte[19]; + fpByte[38] = endByte[59]; + fpByte[39] = endByte[27]; + fpByte[40] = endByte[34]; + fpByte[41] = endByte[ 2]; + fpByte[42] = endByte[42]; + fpByte[43] = endByte[10]; + fpByte[44] = endByte[50]; + fpByte[45] = endByte[18]; + fpByte[46] = endByte[58]; + fpByte[47] = endByte[26]; + fpByte[48] = endByte[33]; + fpByte[49] = endByte[ 1]; + fpByte[50] = endByte[41]; + fpByte[51] = endByte[ 9]; + fpByte[52] = endByte[49]; + fpByte[53] = endByte[17]; + fpByte[54] = endByte[57]; + fpByte[55] = endByte[25]; + fpByte[56] = endByte[32]; + fpByte[57] = endByte[ 0]; + fpByte[58] = endByte[40]; + fpByte[59] = endByte[ 8]; + fpByte[60] = endByte[48]; + fpByte[61] = endByte[16]; + fpByte[62] = endByte[56]; + fpByte[63] = endByte[24]; + return fpByte; +} +function getBoxBinary(i) { + var binary = ""; + switch (i) { + case 0 :binary = "0000";break; + case 1 :binary = "0001";break; + case 2 :binary = "0010";break; + case 3 :binary = "0011";break; + case 4 :binary = "0100";break; + case 5 :binary = "0101";break; + case 6 :binary = "0110";break; + case 7 :binary = "0111";break; + case 8 :binary = "1000";break; + case 9 :binary = "1001";break; + case 10 :binary = "1010";break; + case 11 :binary = "1011";break; + case 12 :binary = "1100";break; + case 13 :binary = "1101";break; + case 14 :binary = "1110";break; + case 15 :binary = "1111";break; + } + return binary; +} +/* +* generate 16 keys for xor +* +*/ +function generateKeys(keyByte){ + var key = new Array(56); + var keys = new Array(); + + keys[ 0] = new Array(); + keys[ 1] = new Array(); + keys[ 2] = new Array(); + keys[ 3] = new Array(); + keys[ 4] = new Array(); + keys[ 5] = new Array(); + keys[ 6] = new Array(); + keys[ 7] = new Array(); + keys[ 8] = new Array(); + keys[ 9] = new Array(); + keys[10] = new Array(); + keys[11] = new Array(); + keys[12] = new Array(); + keys[13] = new Array(); + keys[14] = new Array(); + keys[15] = new Array(); + var loop = [1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1]; + for(i=0;i<7;i++){ + for(j=0,k=7;j<8;j++,k--){ + key[i*8+j]=keyByte[8*k+i]; + } + } + + var i = 0; + for(i = 0;i < 16;i ++){ + var tempLeft=0; + var tempRight=0; + for(j = 0; j < loop[i];j ++){ + tempLeft = key[0]; + tempRight = key[28]; + for(k = 0;k < 27 ;k ++){ + key[k] = key[k+1]; + key[28+k] = key[29+k]; + } + key[27]=tempLeft; + key[55]=tempRight; + } + var tempKey = new Array(48); + tempKey[ 0] = key[13]; + tempKey[ 1] = key[16]; + tempKey[ 2] = key[10]; + tempKey[ 3] = key[23]; + tempKey[ 4] = key[ 0]; + tempKey[ 5] = key[ 4]; + tempKey[ 6] = key[ 2]; + tempKey[ 7] = key[27]; + tempKey[ 8] = key[14]; + tempKey[ 9] = key[ 5]; + tempKey[10] = key[20]; + tempKey[11] = key[ 9]; + tempKey[12] = key[22]; + tempKey[13] = key[18]; + tempKey[14] = key[11]; + tempKey[15] = key[ 3]; + tempKey[16] = key[25]; + tempKey[17] = key[ 7]; + tempKey[18] = key[15]; + tempKey[19] = key[ 6]; + tempKey[20] = key[26]; + tempKey[21] = key[19]; + tempKey[22] = key[12]; + tempKey[23] = key[ 1]; + tempKey[24] = key[40]; + tempKey[25] = key[51]; + tempKey[26] = key[30]; + tempKey[27] = key[36]; + tempKey[28] = key[46]; + tempKey[29] = key[54]; + tempKey[30] = key[29]; + tempKey[31] = key[39]; + tempKey[32] = key[50]; + tempKey[33] = key[44]; + tempKey[34] = key[32]; + tempKey[35] = key[47]; + tempKey[36] = key[43]; + tempKey[37] = key[48]; + tempKey[38] = key[38]; + tempKey[39] = key[55]; + tempKey[40] = key[33]; + tempKey[41] = key[52]; + tempKey[42] = key[45]; + tempKey[43] = key[41]; + tempKey[44] = key[49]; + tempKey[45] = key[35]; + tempKey[46] = key[28]; + tempKey[47] = key[31]; + switch(i){ + case 0: for(m=0;m < 48 ;m++){ keys[ 0][m] = tempKey[m]; } break; + case 1: for(m=0;m < 48 ;m++){ keys[ 1][m] = tempKey[m]; } break; + case 2: for(m=0;m < 48 ;m++){ keys[ 2][m] = tempKey[m]; } break; + case 3: for(m=0;m < 48 ;m++){ keys[ 3][m] = tempKey[m]; } break; + case 4: for(m=0;m < 48 ;m++){ keys[ 4][m] = tempKey[m]; } break; + case 5: for(m=0;m < 48 ;m++){ keys[ 5][m] = tempKey[m]; } break; + case 6: for(m=0;m < 48 ;m++){ keys[ 6][m] = tempKey[m]; } break; + case 7: for(m=0;m < 48 ;m++){ keys[ 7][m] = tempKey[m]; } break; + case 8: for(m=0;m < 48 ;m++){ keys[ 8][m] = tempKey[m]; } break; + case 9: for(m=0;m < 48 ;m++){ keys[ 9][m] = tempKey[m]; } break; + case 10: for(m=0;m < 48 ;m++){ keys[10][m] = tempKey[m]; } break; + case 11: for(m=0;m < 48 ;m++){ keys[11][m] = tempKey[m]; } break; + case 12: for(m=0;m < 48 ;m++){ keys[12][m] = tempKey[m]; } break; + case 13: for(m=0;m < 48 ;m++){ keys[13][m] = tempKey[m]; } break; + case 14: for(m=0;m < 48 ;m++){ keys[14][m] = tempKey[m]; } break; + case 15: for(m=0;m < 48 ;m++){ keys[15][m] = tempKey[m]; } break; + } + } + return keys; +} +//end------------------------------------------------------------------------------------------------------------- diff --git a/swa/token/index.html b/swa/token/index.html new file mode 100644 index 0000000..d1f8a70 --- /dev/null +++ b/swa/token/index.html @@ -0,0 +1,386 @@ + + + + + Token 工具 + + + + + + +
+

信雅达离线 Token 工具

+
+ +
+ +
+ + +
+ + +
+ +
+

帮助

+
    +
  • + 清空 +

    仅清空 3 个输入框。

    +
  • +
  • + 临存 +

    将 3 个输入框的内容临时保存在本地。

    +
  • +
  • + 临取 +

    将临时保存在本地的信息填入 3 个输入框。

    +
  • +
  • + 返显 +

    尝试读取 IC 卡内部信息。IC 卡内部信息错误时有可能显示乱码。

    +
  • +
  • + 发行 +

    将发行信息写入 IC 卡。

    +
  • +
+ +
+ +
+ + + + + + + + + + +
+ +
+ + + + +
+ + + + + +
+ +
+ +
+

帮助

+

本页所有值都是 HEX

+
+ +
+ +
+ IC卡属主 (20h+1) + +
+ +
+ 主密钥校验值 (30h+4) + +
+ +
+ 主密钥密文 (40h+16) + +
+ +
+ 保护密钥校验值 (50h+4) + +
+ +
+ 保护密钥分量(60h+16) + +
+ + +
+ + + +
+ + +
+ +
+ + + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + diff --git a/swa/token/jquery.min.js b/swa/token/jquery.min.js new file mode 100644 index 0000000..16ad06c --- /dev/null +++ b/swa/token/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/swa/token/jssrc/des.js b/swa/token/jssrc/des.js new file mode 100644 index 0000000..2270ce0 --- /dev/null +++ b/swa/token/jssrc/des.js @@ -0,0 +1,1083 @@ +var DES = null; + +(function () { + if (!Array.prototype.fill) { + Array.prototype.fill = function (params) { + var len = this.length + for (var i = 0; i < len; i++) { + this[i] = params + } + return this + } + } + var starip_tab = [ + 58, 50, 42, 34, 26, 18, 10, 2, + 60, 52, 44, 36, 28, 20, 12, 4, + 62, 54, 46, 38, 30, 22, 14, 6, + 64, 56, 48, 40, 32, 24, 16, 8, + 57, 49, 41, 33, 25, 17, 9, 1, + 59, 51, 43, 35, 27, 19, 11, 3, + 61, 53, 45, 37, 29, 21, 13, 5, + 63, 55, 47, 39, 31, 23, 15, 7 + ] + + var _starip_tab = [ + 40, 8, 48, 16, 56, 24, 64, 32, + 39, 7, 47, 15, 55, 23, 63, 31, + 38, 6, 46, 14, 54, 22, 62, 30, + 37, 5, 45, 13, 53, 21, 61, 29, + 36, 4, 44, 12, 52, 20, 60, 28, + 35, 3, 43, 11, 51, 19, 59, 27, + 34, 2, 42, 10, 50, 18, 58, 26, + 33, 1, 41, 9, 49, 17, 57, 25 + ] + + var starpc_1_c = [ + 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35 + ] + + var starpc_1_d = [ + 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 + ] + + var starpc_2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ] + + var starls_count = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1] + + var stare_r = [32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, + 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, + 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, + 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1 + ] + + var starP = [16, 7, 20, 21, 29, 12, 28, 17, + 1, 15, 23, 26, 5, 18, 31, 10, + 2, 8, 24, 14, 32, 27, 3, 9, + 19, 13, 30, 6, 22, 11, 4, 25 + ] + + var starSSS = [ + [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13] + ], + [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9] + ], + [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12] + ], + [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14] + ], + [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3] + ], + [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13] + ], + [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12] + ], + [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11] + ] + ] + + var bit_box = [ + [0, 0, 0, 0], + [0, 0, 0, 1], + [0, 0, 1, 0], + [0, 0, 1, 1], + [0, 1, 0, 0], + [0, 1, 0, 1], + [0, 1, 1, 0], + [0, 1, 1, 1], + [1, 0, 0, 0], + [1, 0, 0, 1], + [1, 0, 1, 0], + [1, 0, 1, 1], + [1, 1, 0, 0], + [1, 1, 0, 1], + [1, 1, 1, 0], + [1, 1, 1, 1] + ] + + var S1 = [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13] + ] + + var S2 = [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9] + ] + + var S3 = [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12] + ] + + var S4 = [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14] + ] + + var S5 = [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3] + ] + + var S6 = [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13] + ] + + var S7 = [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12] + ] + + var S8 = [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11] + ] + + var SHIFT = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1] + + var BINARY = [ + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1 + ] + + DES = function () { + var KEYBLOCK = new Array(16), + DATABLOCK = new Array(16), + ANSBLOCK = new Array(16), + KEY = new Array(64), + BUFFER = new Array(64), + BUFOUT = new Array(64), + KWORK = new Array(56), + WORKA = new Array(48), + KN = new Array(48), + OPTION = '', + TEMP1 = 0, + TEMP2 = 0, + NBROFSHIFT = 0, + VALINDEX = 0; + + function MAINPROCESS() { + var i, j, k, iter; + + for (i = 0; i < 16; i++) { + j = i * 4; + switch (KEYBLOCK[i]) { + case '0': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case '1': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case '2': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case '3': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case '4': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case '5': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case '6': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case '7': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case '8': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + + break; + case '9': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case 'a': + case 'A': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case 'b': + case 'B': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case 'C': + case 'c': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case 'D': + case 'd': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case 'E': + case 'e': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case 'F': + case 'f': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + } /* switch */ + } /* for */ + + for (i = 0; i < 16; i++) { + j = i * 4; + switch (DATABLOCK[i]) { + case '0': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '1': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case '2': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case '3': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case '4': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '5': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case '6': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case '7': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case '8': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '9': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case 'A': + case 'a': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case 'B': + case 'b': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case 'C': + case 'c': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case 'D': + case 'd': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case 'E': + case 'e': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case 'F': + case 'f': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + + } /* end switch */ + } /* for */ + + /* INITIAL PERMUTATION OF DATA */ + BUFOUT[0] = BUFFER[57]; + BUFOUT[1] = BUFFER[49]; + BUFOUT[2] = BUFFER[41]; + BUFOUT[3] = BUFFER[33]; + BUFOUT[4] = BUFFER[25]; + BUFOUT[5] = BUFFER[17]; + BUFOUT[6] = BUFFER[9]; + BUFOUT[7] = BUFFER[1]; + BUFOUT[8] = BUFFER[59]; + BUFOUT[9] = BUFFER[51]; + BUFOUT[10] = BUFFER[43]; + BUFOUT[11] = BUFFER[35]; + BUFOUT[12] = BUFFER[27]; + BUFOUT[13] = BUFFER[19]; + BUFOUT[14] = BUFFER[11]; + BUFOUT[15] = BUFFER[3]; + BUFOUT[16] = BUFFER[61]; + BUFOUT[17] = BUFFER[53]; + BUFOUT[18] = BUFFER[45]; + BUFOUT[19] = BUFFER[37]; + BUFOUT[20] = BUFFER[29]; + BUFOUT[21] = BUFFER[21]; + BUFOUT[22] = BUFFER[13]; + BUFOUT[23] = BUFFER[5]; + BUFOUT[24] = BUFFER[63]; + BUFOUT[25] = BUFFER[55]; + BUFOUT[26] = BUFFER[47]; + BUFOUT[27] = BUFFER[39]; + BUFOUT[28] = BUFFER[31]; + BUFOUT[29] = BUFFER[23]; + BUFOUT[30] = BUFFER[15]; + BUFOUT[31] = BUFFER[7]; + BUFOUT[32] = BUFFER[56]; + BUFOUT[33] = BUFFER[48]; + BUFOUT[34] = BUFFER[40]; + BUFOUT[35] = BUFFER[32]; + BUFOUT[36] = BUFFER[24]; + BUFOUT[37] = BUFFER[16]; + BUFOUT[38] = BUFFER[8]; + BUFOUT[39] = BUFFER[0]; + BUFOUT[40] = BUFFER[58]; + BUFOUT[41] = BUFFER[50]; + BUFOUT[42] = BUFFER[42]; + BUFOUT[43] = BUFFER[34]; + BUFOUT[44] = BUFFER[26]; + BUFOUT[45] = BUFFER[18]; + BUFOUT[46] = BUFFER[10]; + BUFOUT[47] = BUFFER[2]; + BUFOUT[48] = BUFFER[60]; + BUFOUT[49] = BUFFER[52]; + BUFOUT[50] = BUFFER[44]; + BUFOUT[51] = BUFFER[36]; + BUFOUT[52] = BUFFER[28]; + BUFOUT[53] = BUFFER[20]; + BUFOUT[54] = BUFFER[12]; + BUFOUT[55] = BUFFER[4]; + BUFOUT[56] = BUFFER[62]; + BUFOUT[57] = BUFFER[54]; + BUFOUT[58] = BUFFER[46]; + BUFOUT[59] = BUFFER[38]; + BUFOUT[60] = BUFFER[30]; + BUFOUT[61] = BUFFER[22]; + BUFOUT[62] = BUFFER[14]; + BUFOUT[63] = BUFFER[6]; + + /* INITIAL PERMUTATION OF KEY */ + KWORK[0] = KEY[56]; + KWORK[1] = KEY[48]; + KWORK[2] = KEY[40]; + KWORK[3] = KEY[32]; + KWORK[4] = KEY[24]; + KWORK[5] = KEY[16]; + KWORK[6] = KEY[8]; + KWORK[7] = KEY[0]; + KWORK[8] = KEY[57]; + KWORK[9] = KEY[49]; + KWORK[10] = KEY[41]; + KWORK[11] = KEY[33]; + KWORK[12] = KEY[25]; + KWORK[13] = KEY[17]; + KWORK[14] = KEY[9]; + KWORK[15] = KEY[1]; + KWORK[16] = KEY[58]; + KWORK[17] = KEY[50]; + KWORK[18] = KEY[42]; + KWORK[19] = KEY[34]; + KWORK[20] = KEY[26]; + KWORK[21] = KEY[18]; + KWORK[22] = KEY[10]; + KWORK[23] = KEY[2]; + KWORK[24] = KEY[59]; + KWORK[25] = KEY[51]; + KWORK[26] = KEY[43]; + KWORK[27] = KEY[35]; + KWORK[28] = KEY[62]; + KWORK[29] = KEY[54]; + KWORK[30] = KEY[46]; + KWORK[31] = KEY[38]; + KWORK[32] = KEY[30]; + KWORK[33] = KEY[22]; + KWORK[34] = KEY[14]; + KWORK[35] = KEY[6]; + KWORK[36] = KEY[61]; + KWORK[37] = KEY[53]; + KWORK[38] = KEY[45]; + KWORK[39] = KEY[37]; + KWORK[40] = KEY[29]; + KWORK[41] = KEY[21]; + KWORK[42] = KEY[13]; + KWORK[43] = KEY[5]; + KWORK[44] = KEY[60]; + KWORK[45] = KEY[52]; + KWORK[46] = KEY[44]; + KWORK[47] = KEY[36]; + KWORK[48] = KEY[28]; + KWORK[49] = KEY[20]; + KWORK[50] = KEY[12]; + KWORK[51] = KEY[4]; + KWORK[52] = KEY[27]; + KWORK[53] = KEY[19]; + KWORK[54] = KEY[11]; + KWORK[55] = KEY[3]; + + for (iter = 0; iter < 16; iter++) { + for (i = 0; i < 32; i++) + BUFFER[i] = BUFOUT[32 + i]; + + /* CALCULATION OF F(R,K) */ + /* PERMUTE - E */ + WORKA[0] = BUFFER[31]; + WORKA[1] = BUFFER[0]; + WORKA[2] = BUFFER[1]; + WORKA[3] = BUFFER[2]; + WORKA[4] = BUFFER[3]; + WORKA[5] = BUFFER[4]; + WORKA[6] = BUFFER[3]; + WORKA[7] = BUFFER[4]; + WORKA[8] = BUFFER[5]; + WORKA[9] = BUFFER[6]; + WORKA[10] = BUFFER[7]; + WORKA[11] = BUFFER[8]; + WORKA[12] = BUFFER[7]; + WORKA[13] = BUFFER[8]; + WORKA[14] = BUFFER[9]; + WORKA[15] = BUFFER[10]; + WORKA[16] = BUFFER[11]; + WORKA[17] = BUFFER[12]; + WORKA[18] = BUFFER[11]; + WORKA[19] = BUFFER[12]; + WORKA[20] = BUFFER[13]; + WORKA[21] = BUFFER[14]; + WORKA[22] = BUFFER[15]; + WORKA[23] = BUFFER[16]; + WORKA[24] = BUFFER[15]; + WORKA[25] = BUFFER[16]; + WORKA[26] = BUFFER[17]; + WORKA[27] = BUFFER[18]; + WORKA[28] = BUFFER[19]; + WORKA[29] = BUFFER[20]; + WORKA[30] = BUFFER[19]; + WORKA[31] = BUFFER[20]; + WORKA[32] = BUFFER[21]; + WORKA[33] = BUFFER[22]; + WORKA[34] = BUFFER[23]; + WORKA[35] = BUFFER[24]; + WORKA[36] = BUFFER[23]; + WORKA[37] = BUFFER[24]; + WORKA[38] = BUFFER[25]; + WORKA[39] = BUFFER[26]; + WORKA[40] = BUFFER[27]; + WORKA[41] = BUFFER[28]; + WORKA[42] = BUFFER[27]; + WORKA[43] = BUFFER[28]; + WORKA[44] = BUFFER[29]; + WORKA[45] = BUFFER[30]; + WORKA[46] = BUFFER[31]; + WORKA[47] = BUFFER[0]; + + /* KS FUNCTION BEGIN */ + if (OPTION == 'E') { + NBROFSHIFT = SHIFT[iter]; + for (i = 0; i < NBROFSHIFT; i++) { + TEMP1 = KWORK[0]; + TEMP2 = KWORK[28]; + for (j = 0; j < 27; j++) { + KWORK[j] = KWORK[j + 1]; + KWORK[j + 28] = KWORK[j + 29]; + } + KWORK[27] = TEMP1; + KWORK[55] = TEMP2; + } + } else if (iter > 0) { + NBROFSHIFT = SHIFT[16 - iter]; + for (i = 0; i < NBROFSHIFT; i++) { + TEMP1 = KWORK[27]; + TEMP2 = KWORK[55]; + for (j = 27; j > 0; j--) { + KWORK[j] = KWORK[j - 1]; + KWORK[j + 28] = KWORK[j + 27]; + } + KWORK[0] = TEMP1; + KWORK[28] = TEMP2; + } + } + + /* PERMUTE KWORK - PC2 */ + KN[0] = KWORK[13]; + KN[1] = KWORK[16]; + KN[2] = KWORK[10]; + KN[3] = KWORK[23]; + KN[4] = KWORK[0]; + KN[5] = KWORK[4]; + KN[6] = KWORK[2]; + KN[7] = KWORK[27]; + KN[8] = KWORK[14]; + KN[9] = KWORK[5]; + KN[10] = KWORK[20]; + KN[11] = KWORK[9]; + KN[12] = KWORK[22]; + KN[13] = KWORK[18]; + KN[14] = KWORK[11]; + KN[15] = KWORK[3]; + KN[16] = KWORK[25]; + KN[17] = KWORK[7]; + KN[18] = KWORK[15]; + KN[19] = KWORK[6]; + KN[20] = KWORK[26]; + KN[21] = KWORK[19]; + KN[22] = KWORK[12]; + KN[23] = KWORK[1]; + KN[24] = KWORK[40]; + KN[25] = KWORK[51]; + KN[26] = KWORK[30]; + KN[27] = KWORK[36]; + KN[28] = KWORK[46]; + KN[29] = KWORK[54]; + KN[30] = KWORK[29]; + KN[31] = KWORK[39]; + KN[32] = KWORK[50]; + KN[33] = KWORK[44]; + KN[34] = KWORK[32]; + KN[35] = KWORK[47]; + KN[36] = KWORK[43]; + KN[37] = KWORK[48]; + KN[38] = KWORK[38]; + KN[39] = KWORK[55]; + KN[40] = KWORK[33]; + KN[41] = KWORK[52]; + KN[42] = KWORK[45]; + KN[43] = KWORK[41]; + KN[44] = KWORK[49]; + KN[45] = KWORK[35]; + KN[46] = KWORK[28]; + KN[47] = KWORK[31]; + + for (i = 0; i < 48; i++) + WORKA[i] = (WORKA[i] + KN[i]) % 2; + + + VALINDEX = S1[2 * WORKA[0] + WORKA[5]][2 * (2 * (2 * WORKA[1] + WORKA[2]) + WORKA[3]) + WORKA[4]]; + VALINDEX = VALINDEX * 4; + KN[0] = BINARY[0 + VALINDEX]; + KN[1] = BINARY[1 + VALINDEX]; + KN[2] = BINARY[2 + VALINDEX]; + KN[3] = BINARY[3 + VALINDEX]; + VALINDEX = S2[2 * WORKA[6] + WORKA[11]][2 * (2 * (2 * WORKA[7] + WORKA[8]) + WORKA[9]) + WORKA[10]]; + VALINDEX = VALINDEX * 4; + KN[4] = BINARY[0 + VALINDEX]; + KN[5] = BINARY[1 + VALINDEX]; + KN[6] = BINARY[2 + VALINDEX]; + KN[7] = BINARY[3 + VALINDEX]; + VALINDEX = S3[2 * WORKA[12] + WORKA[17]][2 * (2 * (2 * WORKA[13] + WORKA[14]) + WORKA[15]) + WORKA[16]]; + VALINDEX = VALINDEX * 4; + KN[8] = BINARY[0 + VALINDEX]; + KN[9] = BINARY[1 + VALINDEX]; + KN[10] = BINARY[2 + VALINDEX]; + KN[11] = BINARY[3 + VALINDEX]; + VALINDEX = S4[2 * WORKA[18] + WORKA[23]][2 * (2 * (2 * WORKA[19] + WORKA[20]) + WORKA[21]) + WORKA[22]]; + VALINDEX = VALINDEX * 4; + KN[12] = BINARY[0 + VALINDEX]; + KN[13] = BINARY[1 + VALINDEX]; + KN[14] = BINARY[2 + VALINDEX]; + KN[15] = BINARY[3 + VALINDEX]; + VALINDEX = S5[2 * WORKA[24] + WORKA[29]][2 * (2 * (2 * WORKA[25] + WORKA[26]) + WORKA[27]) + WORKA[28]]; + VALINDEX = VALINDEX * 4; + KN[16] = BINARY[0 + VALINDEX]; + KN[17] = BINARY[1 + VALINDEX]; + KN[18] = BINARY[2 + VALINDEX]; + KN[19] = BINARY[3 + VALINDEX]; + VALINDEX = S6[2 * WORKA[30] + WORKA[35]][2 * (2 * (2 * WORKA[31] + WORKA[32]) + WORKA[33]) + WORKA[34]]; + VALINDEX = VALINDEX * 4; + KN[20] = BINARY[0 + VALINDEX]; + KN[21] = BINARY[1 + VALINDEX]; + KN[22] = BINARY[2 + VALINDEX]; + KN[23] = BINARY[3 + VALINDEX]; + VALINDEX = S7[2 * WORKA[36] + WORKA[41]][2 * (2 * (2 * WORKA[37] + WORKA[38]) + WORKA[39]) + WORKA[40]]; + VALINDEX = VALINDEX * 4; + KN[24] = BINARY[0 + VALINDEX]; + KN[25] = BINARY[1 + VALINDEX]; + KN[26] = BINARY[2 + VALINDEX]; + KN[27] = BINARY[3 + VALINDEX]; + VALINDEX = S8[2 * WORKA[42] + WORKA[47]][2 * (2 * (2 * WORKA[43] + WORKA[44]) + WORKA[45]) + WORKA[46]]; + VALINDEX = VALINDEX * 4; + KN[28] = BINARY[0 + VALINDEX]; + KN[29] = BINARY[1 + VALINDEX]; + KN[30] = BINARY[2 + VALINDEX]; + KN[31] = BINARY[3 + VALINDEX]; + + WORKA[0] = KN[15]; + WORKA[1] = KN[6]; + WORKA[2] = KN[19]; + WORKA[3] = KN[20]; + WORKA[4] = KN[28]; + WORKA[5] = KN[11]; + WORKA[6] = KN[27]; + WORKA[7] = KN[16]; + WORKA[8] = KN[0]; + WORKA[9] = KN[14]; + WORKA[10] = KN[22]; + WORKA[11] = KN[25]; + WORKA[12] = KN[4]; + WORKA[13] = KN[17]; + WORKA[14] = KN[30]; + WORKA[15] = KN[9]; + WORKA[16] = KN[1]; + WORKA[17] = KN[7]; + WORKA[18] = KN[23]; + WORKA[19] = KN[13]; + WORKA[20] = KN[31]; + WORKA[21] = KN[26]; + WORKA[22] = KN[2]; + WORKA[23] = KN[8]; + WORKA[24] = KN[18]; + WORKA[25] = KN[12]; + WORKA[26] = KN[29]; + WORKA[27] = KN[5]; + WORKA[28] = KN[21]; + WORKA[29] = KN[10]; + WORKA[30] = KN[3]; + WORKA[31] = KN[24]; + + /* BUFOUT XOR WORKA */ + for (j = 0; j < 32; j++) { + BUFOUT[j + 32] = (BUFOUT[j] + WORKA[j]) % 2; + BUFOUT[j] = BUFFER[j]; + } + } /* for iter*/ + + for (i = 0; i < 32; i++) { + j = BUFOUT[i]; + BUFOUT[i] = BUFOUT[32 + i]; + BUFOUT[32 + i] = j; + } + + + BUFFER[0] = BUFOUT[39]; + BUFFER[1] = BUFOUT[7]; + BUFFER[2] = BUFOUT[47]; + BUFFER[3] = BUFOUT[15]; + BUFFER[4] = BUFOUT[55]; + BUFFER[5] = BUFOUT[23]; + BUFFER[6] = BUFOUT[63]; + BUFFER[7] = BUFOUT[31]; + BUFFER[8] = BUFOUT[38]; + BUFFER[9] = BUFOUT[6]; + BUFFER[10] = BUFOUT[46]; + BUFFER[11] = BUFOUT[14]; + BUFFER[12] = BUFOUT[54]; + BUFFER[13] = BUFOUT[22]; + BUFFER[14] = BUFOUT[62]; + BUFFER[15] = BUFOUT[30]; + BUFFER[16] = BUFOUT[37]; + BUFFER[17] = BUFOUT[5]; + BUFFER[18] = BUFOUT[45]; + BUFFER[19] = BUFOUT[13]; + BUFFER[20] = BUFOUT[53]; + BUFFER[21] = BUFOUT[21]; + BUFFER[22] = BUFOUT[61]; + BUFFER[23] = BUFOUT[29]; + BUFFER[24] = BUFOUT[36]; + BUFFER[25] = BUFOUT[4]; + BUFFER[26] = BUFOUT[44]; + BUFFER[27] = BUFOUT[12]; + BUFFER[28] = BUFOUT[52]; + BUFFER[29] = BUFOUT[20]; + BUFFER[30] = BUFOUT[60]; + BUFFER[31] = BUFOUT[28]; + BUFFER[32] = BUFOUT[35]; + BUFFER[33] = BUFOUT[3]; + BUFFER[34] = BUFOUT[43]; + BUFFER[35] = BUFOUT[11]; + BUFFER[36] = BUFOUT[51]; + BUFFER[37] = BUFOUT[19]; + BUFFER[38] = BUFOUT[59]; + BUFFER[39] = BUFOUT[27]; + BUFFER[40] = BUFOUT[34]; + BUFFER[41] = BUFOUT[2]; + BUFFER[42] = BUFOUT[42]; + BUFFER[43] = BUFOUT[10]; + BUFFER[44] = BUFOUT[50]; + BUFFER[45] = BUFOUT[18]; + BUFFER[46] = BUFOUT[58]; + BUFFER[47] = BUFOUT[26]; + BUFFER[48] = BUFOUT[33]; + BUFFER[49] = BUFOUT[1]; + BUFFER[50] = BUFOUT[41]; + BUFFER[51] = BUFOUT[9]; + BUFFER[52] = BUFOUT[49]; + BUFFER[53] = BUFOUT[17]; + BUFFER[54] = BUFOUT[57]; + BUFFER[55] = BUFOUT[25]; + BUFFER[56] = BUFOUT[32]; + BUFFER[57] = BUFOUT[0]; + BUFFER[58] = BUFOUT[40]; + BUFFER[59] = BUFOUT[8]; + BUFFER[60] = BUFOUT[48]; + BUFFER[61] = BUFOUT[16]; + BUFFER[62] = BUFOUT[56]; + BUFFER[63] = BUFOUT[24]; + + j = 0; + for (i = 0; i < 8; i++) { + ANSBLOCK[i] = 0; + for (k = 0; k <= 6; k++) { + ANSBLOCK[i] = (ANSBLOCK[i] + BUFFER[j + k]) * 2; + } + ANSBLOCK[i] = ANSBLOCK[i] + BUFFER[j + 7]; + j = j + 8; + } + } + + function SingleDES(source, dest, in_key, flag) { + var i; + KEYBLOCK.fill('\0') + DATABLOCK.fill('\0') + ANSBLOCK.fill(0) + + for (i = 0; i < 64; i++) { + KEY[i] = 0; /* 0,1 */ + BUFFER[i] = 0, BUFOUT[i] = 0; /* 0,1 */ + } + for (i = 0; i < 48; i++) { + WORKA[i] = 0; /* 0,1 */ + KN[i] = 0; + } + for (i = 0; i < 56; i++) { + KWORK[i] = 0; /* 0,1 */ + } + TEMP1 = 0, TEMP2 = 0; /* 0,1 */ + NBROFSHIFT = 0, VALINDEX = 0; + + for (i = 0; i < 16; i++) { + KEYBLOCK[i] = in_key[i] + DATABLOCK[i] = source[i] + } + + OPTION = flag; + MAINPROCESS(); + + var result = '' + for (i = 0; i < 8; i++) { + result = strfix(ANSBLOCK[i].toString(16), 2).toUpperCase() + dest[2 * i] = result[0] + dest[2 * i + 1] = result[1] + } + } + + function TripleDES(source, dest, in_key, flag) { + var keya = new Array(16), + keyb = new Array(16), + tmpbuf1 = new Array(16), + tmpbuf2 = new Array(16), + i; + + for (i = 0; i < 16; i++) { + keya[i] = in_key[i] + keyb[i] = in_key[16 + i] + } + + if (flag == 'E') { + SingleDES(source, tmpbuf1, keya, 'E'); + SingleDES(tmpbuf1, tmpbuf2, keyb, 'D'); + SingleDES(tmpbuf2, dest, keya, 'E'); + } + else if (flag == 'D') { + SingleDES(source, tmpbuf1, keya, 'D'); + SingleDES(tmpbuf1, tmpbuf2, keyb, 'E'); + SingleDES(tmpbuf2, dest, keya, 'D'); + } + } + + function strfix(str, len) { + var length = len - str.length + while (length-- > 0) { + str = "0" + str + } + return str + } + + function CHSTR2BCH(ch) { + if (ch >= 0x30 && ch <= 0x39) { + ch -= 0x30; + } + else if (ch >= 0x41 && ch <= 0x47) { + ch -= 0x37; + } + else if (ch >= 0x61 && ch < 0x67) { + ch -= 0x57; + } + return ch + } + + function CHBCH2STR(ch) { + if (ch >= 0x00 && ch <= 0x09) { + ch += 0x30; + } + else if (ch >= 0x0A && ch <= 0x0F) { + ch += 0x37; + } + return ch; + } + + function hex2Array(str) { + var len = str.length / 2, + substr = '', + result = new Array(len); + for (var i = 0; i < len; i++) { + substr = str.slice(2 * i, 2 * (i + 1)) + result[i] = parseInt(substr, 16) || 0 + } + return result + } + + this.CalDES = function (pszSource, pszKey, flag) { + var nKeyLen = pszKey.length + if (nKeyLen !== 16 && nKeyLen !== 32) { + console.log("key 长度应为16或32字节"); + return ""; + } + var nLen = pszSource.length, + nCount = Math.floor((nLen + 15) / 16), + nCopyLen, + szPartSource = new Array(16), + szPartDest = new Array(16); + + var result = '' + for (var i = 0; i < nCount; i++) { + if (i == (nCount - 1)) { + nCopyLen = nLen - i * 16; + } else { + nCopyLen = 16; + } + + for (var j = 0; j < nCopyLen; j++) { + szPartSource[j] = pszSource[i * 16 + j] + } + + if (nKeyLen == 16) { + SingleDES(szPartSource, szPartDest, pszKey, flag); + } + else { + TripleDES(szPartSource, szPartDest, pszKey, flag); + } + + result += szPartDest.join('') + szPartSource.fill('\0') + szPartDest.fill('\0') + } + return result + } + + this.CalX99MAC = function (pszSource, nLength, pszKey) { + var nKeyLen = pszKey.length + if (nKeyLen !== 16) { + console.log("key 长度应为16字节"); + return ""; + } + var szBCD = new Array(16), + szBlock = new Array(16), + strSource = ''; + + for (var k = 0; k < nLength; k++) { + strSource += strfix(pszSource.charCodeAt(k).toString(16), 2).toUpperCase() + } + + var nLoopCount; + nLoopCount = Math.floor((nLength + 7) / 8); + nLoopCount = Math.floor((nLength * 2 + 15) / 16); + + for (var i = 0; i < nLoopCount; i++) { + + for (var j = 0; j < 16; j++) { + var a = strSource[i * 16 + j] || '0', + b = szBlock[j] || '0'; + szBCD[j] = String.fromCharCode(CHBCH2STR(CHSTR2BCH(a.charCodeAt(0)) ^ CHSTR2BCH(b.charCodeAt(0)))) + } + + SingleDES(szBCD, szBlock, pszKey, 'E'); + } + + return szBlock.join(''); + } + + this.CalANSI919MAC = function (source, length, in_key) { + if (in_key.length !== 32) { + console.log("key 长度应为32字节"); + return ""; + } + var iCount = Math.floor((length + 7) / 8), + byData = new Array(8), + data = new Array(16), + buf = new Array(16), + ikey = ''; + + for (var ii = 0; ii < iCount; ii++) { + for (var ij = 0; ij < 8; ij++) { + var a = source[ii * 8 + ij] || '\0', + b = byData[ij] || 0, + ikey = strfix((a.charCodeAt(0) ^ b).toString(16), 2).toUpperCase(); + data[ij * 2] = ikey[0]; + data[ij * 2 + 1] = ikey[1]; + } + + SingleDES(data, buf, in_key, 'E'); + + byData = hex2Array(buf.join('')) + } + + for (var jj = 0; jj < 8; jj++) { + ikey = strfix(byData[jj].toString(16), 2).toUpperCase(); + data[jj * 2] = ikey[0]; + data[jj * 2 + 1] = ikey[1]; + } + + SingleDES(data, buf, in_key.slice(16, 32), 'D'); + SingleDES(buf, data, in_key.slice(0, 16), 'E'); + + return data.join('') + } + } +})() + +try { + module.exports = DES +} catch (error) { + +} diff --git a/swa/token/jssrc/index.js b/swa/token/jssrc/index.js new file mode 100644 index 0000000..9df2aa5 --- /dev/null +++ b/swa/token/jssrc/index.js @@ -0,0 +1,26 @@ +var des, sm4; +try { + des = require('./des.js') +} catch (error) { + des = new DES() +} + +try { + sm4 = require('./sm4.js') +} catch (error) { + sm4 = SM4 +} + +var softcrypt = { + CalDES: des.CalDES, + Cal919MAC: des.CalANSI919MAC, + Cal99MAC: des.CalX99MAC, + CalSM4: sm4.SM4CryptECB, + CalSM4MAC: sm4.SM4MACGenerated +} + +try { + module.exports = softcrypt +} catch (error) { + +} diff --git a/swa/token/jssrc/sm4.js b/swa/token/jssrc/sm4.js new file mode 100644 index 0000000..effeb2a --- /dev/null +++ b/swa/token/jssrc/sm4.js @@ -0,0 +1,318 @@ +var SM4 = {}; + +(function () { + var SM4_ENCRYPT = 1 + var SM4_DECRYPT = 0 + + function sm4_context() { + this.mode = 0; + this.sk = [] + } + + function GET_ULONG_BE(n, b, i) { + return (b[i] << 24) | (b[i + 1] << 16) | (b[i + 2]) << 8 | (b[i + 3]) + } + + function PUT_ULONG_BE(n, b, i) { + b[i] = n >>> 24 + b[i + 1] = n >>> 16 + b[i + 2] = n >>> 8 + b[i + 3] = n + } + + function ROTL(x, n) { + var a = (x & 0xFFFFFFFF) << n + var b = x >>> (32 - n) + + return a | b + } + + var SboxTable = [ + [0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05], + [0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99], + [0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0xed, 0xcf, 0xac, 0x62], + [0xe4, 0xb3, 0x1c, 0xa9, 0xc9, 0x08, 0xe8, 0x95, 0x80, 0xdf, 0x94, 0xfa, 0x75, 0x8f, 0x3f, 0xa6], + [0x47, 0x07, 0xa7, 0xfc, 0xf3, 0x73, 0x17, 0xba, 0x83, 0x59, 0x3c, 0x19, 0xe6, 0x85, 0x4f, 0xa8], + [0x68, 0x6b, 0x81, 0xb2, 0x71, 0x64, 0xda, 0x8b, 0xf8, 0xeb, 0x0f, 0x4b, 0x70, 0x56, 0x9d, 0x35], + [0x1e, 0x24, 0x0e, 0x5e, 0x63, 0x58, 0xd1, 0xa2, 0x25, 0x22, 0x7c, 0x3b, 0x01, 0x21, 0x78, 0x87], + [0xd4, 0x00, 0x46, 0x57, 0x9f, 0xd3, 0x27, 0x52, 0x4c, 0x36, 0x02, 0xe7, 0xa0, 0xc4, 0xc8, 0x9e], + [0xea, 0xbf, 0x8a, 0xd2, 0x40, 0xc7, 0x38, 0xb5, 0xa3, 0xf7, 0xf2, 0xce, 0xf9, 0x61, 0x15, 0xa1], + [0xe0, 0xae, 0x5d, 0xa4, 0x9b, 0x34, 0x1a, 0x55, 0xad, 0x93, 0x32, 0x30, 0xf5, 0x8c, 0xb1, 0xe3], + [0x1d, 0xf6, 0xe2, 0x2e, 0x82, 0x66, 0xca, 0x60, 0xc0, 0x29, 0x23, 0xab, 0x0d, 0x53, 0x4e, 0x6f], + [0xd5, 0xdb, 0x37, 0x45, 0xde, 0xfd, 0x8e, 0x2f, 0x03, 0xff, 0x6a, 0x72, 0x6d, 0x6c, 0x5b, 0x51], + [0x8d, 0x1b, 0xaf, 0x92, 0xbb, 0xdd, 0xbc, 0x7f, 0x11, 0xd9, 0x5c, 0x41, 0x1f, 0x10, 0x5a, 0xd8], + [0x0a, 0xc1, 0x31, 0x88, 0xa5, 0xcd, 0x7b, 0xbd, 0x2d, 0x74, 0xd0, 0x12, 0xb8, 0xe5, 0xb4, 0xb0], + [0x89, 0x69, 0x97, 0x4a, 0x0c, 0x96, 0x77, 0x7e, 0x65, 0xb9, 0xf1, 0x09, 0xc5, 0x6e, 0xc6, 0x84], + [0x18, 0xf0, 0x7d, 0xec, 0x3a, 0xdc, 0x4d, 0x20, 0x79, 0xee, 0x5f, 0x3e, 0xd7, 0xcb, 0x39, 0x48] + ] + + var FK = [0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc]; + var CK = [ + 0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269, + 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9, + 0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249, + 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9, + 0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229, + 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299, + 0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209, + 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279 + ] + + function sm4Sbox(n) { + var l = n >>> 4 + var r = n % 16 + return SboxTable[l][r] + } + + function sm4Lt(ka) { + var bb = 0; + var c = 0; + var a = new Uint8Array(4); + var b = new Array(4); + PUT_ULONG_BE(ka, a, 0) + b[0] = sm4Sbox(a[0]) + b[1] = sm4Sbox(a[1]) + b[2] = sm4Sbox(a[2]) + b[3] = sm4Sbox(a[3]) + bb = GET_ULONG_BE(bb, b, 0) + + c = bb ^ (ROTL(bb, 2)) ^ (ROTL(bb, 10)) ^ (ROTL(bb, 18)) ^ (ROTL(bb, 24)) + return c; + } + + function sm4F(x0, x1, x2, x3, rk) { + return (x0 ^ sm4Lt(x1 ^ x2 ^ x3 ^ rk)) + } + + function sm4CalciRK(ka) { + var bb = 0; + var rk = 0; + var a = new Uint8Array(4); + var b = new Array(4); + PUT_ULONG_BE(ka, a, 0) + b[0] = sm4Sbox(a[0]); + b[1] = sm4Sbox(a[1]); + b[2] = sm4Sbox(a[2]); + b[3] = sm4Sbox(a[3]); + bb = GET_ULONG_BE(bb, b, 0) + + rk = bb ^ (ROTL(bb, 13)) ^ (ROTL(bb, 23)) + + return rk; + } + + function sm4_setkey(SK, key) { + var MK = new Array(4); + var k = new Array(36); + var i = 0; + MK[0] = GET_ULONG_BE(MK[0], key, 0); + MK[1] = GET_ULONG_BE(MK[1], key, 4); + MK[2] = GET_ULONG_BE(MK[2], key, 8); + MK[3] = GET_ULONG_BE(MK[3], key, 12); + + k[0] = MK[0] ^ FK[0] + k[1] = MK[1] ^ FK[1] + k[2] = MK[2] ^ FK[2] + k[3] = MK[3] ^ FK[3] + + for (; i < 32; i++) { + k[i + 4] = k[i] ^ (sm4CalciRK(k[i + 1] ^ k[i + 2] ^ k[i + 3] ^ CK[i])) + SK[i] = k[i + 4]; + } + } + + function sm4_one_round(sk, input, output) { + var i = 0; + var ulbuf = new Array(36); + + ulbuf[0] = GET_ULONG_BE(ulbuf[0], input, 0) + ulbuf[1] = GET_ULONG_BE(ulbuf[1], input, 4) + ulbuf[2] = GET_ULONG_BE(ulbuf[2], input, 8) + ulbuf[3] = GET_ULONG_BE(ulbuf[3], input, 12) + while (i < 32) { + ulbuf[i + 4] = sm4F(ulbuf[i], ulbuf[i + 1], ulbuf[i + 2], ulbuf[i + 3], sk[i]); + i++; + } + + PUT_ULONG_BE(ulbuf[35], output, 0); + PUT_ULONG_BE(ulbuf[34], output, 4); + PUT_ULONG_BE(ulbuf[33], output, 8); + PUT_ULONG_BE(ulbuf[32], output, 12); + } + + function sm4_setkey_enc(ctx, key) { + ctx.mode = SM4_ENCRYPT; + sm4_setkey(ctx.sk, key); + } + + function sm4_setkey_dec(ctx, key) { + var i, j; + ctx.mode = SM4_ENCRYPT; + sm4_setkey(ctx.sk, key); + for (i = 0; i < 16; i++) { + j = ctx.sk[31 - i] + ctx.sk[31 - i] = ctx.sk[i] + ctx.sk[i] = j + } + } + + function sm4_crypt_ecb(ctx, mode, length, input, output) { + var index = 0; + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Uint8Array(16) + sm4_one_round(ctx.sk, oneInput, oneOutput); + + for (var i = 0; i < 16; i++) { + output[index + i] = oneOutput[i] + } + index += 16; + length -= 16; + } + } + + function sm4_crypt_cbc(ctx, mode, length, iv, input, output) { + var i; + var temp = new Array(16); + var index = 0; + + if (mode == SM4_ENCRYPT) { + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Array(16) + for (i = 0; i < 16; i++) { + oneOutput[i] = oneInput[i] ^ iv[i] + } + + sm4_one_round(ctx.sk, oneOutput, oneOutput); + + for (i = 0; i < 16; i++) { + iv[i] = oneOutput[i] + output[index + i] = oneOutput[i] + } + + index += 16; + length -= 16; + } + } else /* SM4_DECRYPT */ { + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Array(16) + index += 16; + for (i = 0; i < 16; i++) { + temp[i] = oneInput[i] + } + + sm4_one_round(ctx.sk, oneInput, oneOutput); + + for (i = 0; i < 16; i++) { + oneOutput[i] = oneOutput[i] ^ iv[i] + output[index + i] = oneOutput[i] + } + + for (i = 0; i < 16; i++) { + iv[i] = temp[i] + } + + index += 16; + length -= 16; + } + } + } + + function strfix(str, len) { + var length = len - str.length + while (length-- > 0) { + str = "0" + str + } + return str + } + + function HEXStrXOR(str1, str2) { + var buf1 = hex2Array(str1) + var buf2 = hex2Array(str2) + + var result = '' + for (var i = 0; i < 16; i++) { + result += strfix((buf1[i] ^ buf2[i]).toString(16).toUpperCase(), 2) + } + + return result + } + + function hex2Array(str) { + var len = str.length / 2, + substr = '', + result = new Array(len); + for (var i = 0; i < len; i++) { + substr = str.slice(2 * i, 2 * (i + 1)) + result[i] = parseInt(substr, 16) || 0 + } + return result + } + + SM4.SM4CryptECB = function (szData, sCryptFlag, szSM4Key) { + if (szSM4Key.length !== 32) { + console.log("传入密钥[" + szSM4Key + "]长度不为32位"); + return ""; + } + var len = szData.length + var count = len % 32 + if(count !== 0) { + count = 32 - count + len += count + while (count --) { + szData += '0' + } + } + + var ctx = new sm4_context() + var lpbKey = hex2Array(szSM4Key) + if (sCryptFlag === SM4_ENCRYPT) { + sm4_setkey_enc(ctx, lpbKey); //加密 + } else { + sm4_setkey_dec(ctx, lpbKey); //解密 + } + + var lpbData = hex2Array(szData) + var pbyCryptResult = new Array(len / 2) + sm4_crypt_ecb(ctx, sCryptFlag, len / 2, lpbData, pbyCryptResult) + var szResult = '' + for (var i = 0; i < len / 2; i++) { + szResult += strfix(pbyCryptResult[i].toString(16), 2).toUpperCase() + } + + return szResult; + } + + SM4.SM4MACGenerated = function (szData, szSM4Key) { + if (szSM4Key.length !== 32) { + console.log("传入密钥[" + szSM4Key + "]长度不为32位"); + return ""; + } + var len = szData.length + var count = Math.floor(len / 32) + if (len % 32 !== 0) { + count += 1; + var dvalue = count * 32 - len + while(dvalue--) szData += '0'; + len = count * 32 + } + + var szResult = '', macString = ''; + for (var i = 0; i < count; i++) { + macString = szData.slice(32 * i, 32 * (i + 1)) + if (i > 0) { + macString = HEXStrXOR(macString, szResult); + } + szResult = SM4.SM4CryptECB(macString, 1, szSM4Key); + } + return szResult + } +})() + +try { + module.exports = SM4 +} catch (error) { + +} diff --git a/swa/token/jssrc/test.js b/swa/token/jssrc/test.js new file mode 100644 index 0000000..5f484af --- /dev/null +++ b/swa/token/jssrc/test.js @@ -0,0 +1,20 @@ +var CryptoJS = require("crypto-js"); +var fHEX = require("crypto-js/format-hex"); + +var text = CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); +var key = CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); + + +function enc(text, key){ + var encrypt = CryptoJS.TripleDES.encrypt(text, key, { + mode: CryptoJS.mode.ECB, //CBC模式 + // mode: CryptoJS.mode.ECB, //ECB模式 + padding: CryptoJS.pad.NoPadding//padding处理 + } + ); + var encryptData = encrypt.toString(fHEX);//加密完成后,转换成字符串 + console.log( encryptData ) + return encryptData; +} + +enc(text, key) diff --git a/swa/token/layx.min.css b/swa/token/layx.min.css new file mode 100644 index 0000000..b5689ef --- /dev/null +++ b/swa/token/layx.min.css @@ -0,0 +1 @@ +[class^=layx-]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;margin:0;padding:0}#layx-body.zlayx-body-noscroll{overflow:hidden!important}.layx-flexbox{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.layx-flex-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row;-ms-flex-flow:row;flex-flow:row}.layx-flex-row-reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-flow:row-reverse;-ms-flex-flow:row-reverse;flex-flow:row-reverse}.layx-flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column}.layx-flex-center,.layx-flex-vertical-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.layx-flex-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.layx-flex-item{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#layx-salver-bar{position:fixed}#layx-salver-bar.layx-animate-salver-slide-up{-webkit-animation-name:layx-animate-salver-slide-up;animation-name:layx-animate-salver-slide-up}#layx-salver-bar.layx-animate-salver-slide-down{-webkit-animation-name:layx-animate-salver-slide-down;animation-name:layx-animate-salver-slide-down}.layx-salver-button{position:relative;overflow:hidden;background-color:#f1f1f1}.layx-salver-button:after{position:absolute;content:"";border-top:5px solid #ddd;left:0;top:0;right:0;bottom:0;width:100%;height:100%}.layx-salver-button:hover{background-color:#e9e9e9}.layx-salver-button.layx-salver-button-active{background-color:#f5f5f5}.layx-salver-button.layx-salver-button-active:after{border-top:5px solid #3baced}.layx-salver-button .layx-icon{font-size:20px;color:#666}.layx-salver-button.layx-salver-button-active .layx-icon{color:#3baced}.layx-icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden;font-size:14px;display:inline-block;line-height:normal;pointer-events:none}.layx-window{position:relative;overflow:hidden}.layx-window.layx-window-layer{position:fixed}.layx-window.layx-window-min{opacity:0;display:none}.layx-drag-layer{position:fixed;top:0;left:0;bottom:0;right:0;background-color:transparent;display:none}.layx-drag-layer.layx-drag-layer-active{display:block}.layx-animate{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layx-animate-d3s{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layx-animate-zoom-show{-webkit-animation-name:layx-animate-zoom-show;animation-name:layx-animate-zoom-show}.layx-animate-zoom-destroy{-webkit-animation-name:layx-animate-zoom-destroy;animation-name:layx-animate-zoom-destroy}.layx-animate-zoom-to-min{-webkit-animation-name:layx-animate-zoom-to-min;animation-name:layx-animate-zoom-to-min}.layx-animate-zoom-drag-to-normal{-webkit-animation-name:layx-animate-zoom-drag-to-normal;animation-name:layx-animate-zoom-drag-to-normal}.layx-animate-zoom-to-max,.layx-animate-zoom-to-normal{-webkit-transition-property:left,top,width,height;transition-property:left,top,width,height;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@-webkit-keyframes layx-animate-zoom-show{0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-show{0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-zoom-drag-to-normal{0%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}}@keyframes layx-animate-zoom-drag-to-normal{0%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}}@-webkit-keyframes layx-animate-zoom-destroy{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-destroy{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-zoom-to-min{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-to-min{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-salver-slide-up{0%{bottom:-45px}to{bottom:0}}@keyframes layx-animate-salver-slide-up{0%{bottom:-45px}to{bottom:0}}@-webkit-keyframes layx-animate-salver-slide-down{0%{bottom:0}to{bottom:-45px}}@keyframes layx-animate-salver-slide-down{0%{bottom:0}to{bottom:-45px}}@-webkit-keyframes layx-animate-fade-in-right{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes layx-animate-fade-in-right{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes layx-animate-fade-in-right-reverse{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes layx-animate-fade-in-right-reverse{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes layx-animate-fade-in-left{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes layx-animate-fade-in-left{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes layx-animate-slide-to-top{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes layx-animate-slide-to-top{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.layx-parclose{position:fixed;top:0;left:0;bottom:0;right:0;background-color:transparent}.layx-context-menu-bar{position:fixed;background-color:#fff;-webkit-box-shadow:rgba(0,0,0,.3) 0 2px 5px;box-shadow:0 2px 5px rgba(0,0,0,.3);border:1px solid #d5d5d5;width:180px;max-width:240px;display:none}.layx-context-menu-bar.layx-context-menu-bar-active{display:block}.layx-context-menu-button:hover{background-color:#e9e9e9}.layx-context-menu-button-label{padding-left:10px;display:inline-block;font-size:13px;color:#444}.layx-context-menu-more{color:#999;padding:0 5px}.layx-resize-bar>[class^=layx-resize-item-]{position:absolute;z-index:3;overflow:hidden;-ms-touch-action:none;touch-action:none}.layx-resize-item-bottom,.layx-resize-item-top{height:6px;left:6px;right:6px}.layx-resize-item-top{top:0;cursor:n-resize}.layx-resize-item-bottom{bottom:0;cursor:s-resize}.layx-resize-item-left,.layx-resize-item-right{width:6px;top:6px;bottom:6px}.layx-resize-item-left{left:0;cursor:w-resize}.layx-resize-item-right{right:0;cursor:e-resize}.layx-resize-item-left-bottom,.layx-resize-item-left-top,.layx-resize-item-right-bottom,.layx-resize-item-right-top{width:6px;height:6px}.layx-resize-item-left-top{left:0;top:0;cursor:nw-resize}.layx-resize-item-right-top{right:0;top:0;cursor:ne-resize}.layx-resize-item-left-bottom{left:0;bottom:0;cursor:sw-resize}.layx-resize-item-right-bottom{right:0;bottom:0;cursor:se-resize}.layx-resize-bar.layx-resize-bar-disabled>[class^=layx-resize-item-]{cursor:default!important}.layx-tool-bar{-ms-touch-action:none;touch-action:none;-webkit-overflow-scrolling:touch}.layx-action-button{text-align:center}.layx-action-button:hover{background-color:#e5e5e5}.layx-action-button.layx-action-button-destroy:hover{background-color:#e81123;color:#fff}.layx-action-button.layx-action-button-hidden{display:none;pointer-events:none}.layx-title-bar{min-width:0;padding:0 5px}.layx-window-title{font-size:14px;min-width:0;line-height:0}.layx-window-title .layx-window-title-label{display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;word-wrap:break-word;line-height:normal}.layx-title-bar .layx-window-icon{margin-right:5px}.layx-top-menu-bar{min-height:25px;background:#fff}.layx-top-menu-button{float:left;padding:0 8px;line-height:25px}.layx-top-menu-button-label{display:inline-block;font-size:13px;color:#444}.layx-top-menu-button.layx-top-menu-button-active,.layx-top-menu-button:hover{background-color:#e9e9e9}.layx-content-container{width:100%;position:relative;overflow:auto;font-size:14px;opacity:1}.layx-html-content{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.layx-content-penetrate{position:absolute;top:0;left:0;bottom:0;right:0;z-index:2;background:transparent;visibility:hidden}.layx-content-penetrate.layx-content-penetrate-active{visibility:visible}.layx-content-container.layx-content-container-fade-out{opacity:0}.layx-url-content{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1}.layx-notice{position:fixed;margin-bottom:10px;padding:16px;-webkit-box-shadow:0 1px 6px rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.2);background:#fff;width:320px;right:24px;overflow:hidden}.layx-notice.layx-animate-fade-in-right{-webkit-animation-name:layx-animate-fade-in-right;animation-name:layx-animate-fade-in-right}.layx-notice.layx-animate-fade-in-right-reverse{-webkit-animation-name:layx-animate-fade-in-right-reverse;animation-name:layx-animate-fade-in-right-reverse}.layx-notice.layx-animate-slide-to-top{-webkit-animation-name:layx-animate-slide-to-top;animation-name:layx-animate-slide-to-top}.layx-notice-close-button{position:absolute;top:10px;right:10px;z-index:1;width:16px;height:16px;border-radius:50%;cursor:pointer}.layx-notice-close-button .layx-icon{font-size:10px}.layx-notice-close-button:hover{background-color:#e81123}.layx-notice-close-button:hover .layx-icon{color:#fff}.layx-notice-icon{margin-right:16px}.layx-notice-icon .layx-icon{font-size:26px}.layx-notice-title{font-weight:700;margin-bottom:8px;font-size:14px;line-height:17px;color:#17233d;white-space:nowrap}.layx-notice-content{font-size:13px;color:#515a6e;line-height:1.5}.layx-notice-time{font-size:10px;color:#999;text-align:right;margin-top:8px}.layx-notice-process{position:absolute;left:0;bottom:0;height:2px;z-index:1;background:#dedede;width:0}.layx-notice-info{color:#009688}.layx-notice-success{color:#01aaed}.layx-notice-warning{color:#ffb800}.layx-notice-error{color:red}.layx-statu-bar{position:relative;font-size:13px} \ No newline at end of file diff --git a/swa/token/layx.min.js b/swa/token/layx.min.js new file mode 100644 index 0000000..2d392e9 --- /dev/null +++ b/swa/token/layx.min.js @@ -0,0 +1,5 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.layx=e():t.layx=e()}(window,function(){return(d=[function(t,e,n){(function(d){t.exports=function(){"use strict";var t=function(t){var e=t.id,n=t.viewBox,i=t.content;this.id=e,this.viewBox=n,this.content=i};t.prototype.stringify=function(){return this.content},t.prototype.toString=function(){return this.stringify()},t.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};"undefined"!=typeof window?window:void 0!==d||"undefined"!=typeof self&&self;function e(t,e){return t(e={exports:{}},e.exports),e.exports}var o=e(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return u(t,e,n)})},u}()}),n=e(function(t,e){e.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},t.exports=e.default}),i=n.svg,r=n.xlink,s={};s[i.name]=i.uri,s[r.name]=r.uri;var a=function(t,e){void 0===t&&(t="");var n=o(s,e||{}),i=function(n){return Object.keys(n).map(function(t){var e=n[t].toString().replace(/"/g,""");return t+'="'+e+'"'}).join(" ")}(n);return""+t+""};return function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},e.createFromExistingNode=function(t){return new e({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},e.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},e.prototype.mount=function(t){if(this.isMounted)return this.node;var e="string"==typeof t?document.querySelector(t):t,n=this.render();return this.node=n,e.appendChild(n),n},e.prototype.render=function(){var t=this.stringify();return function(t){var e=!!document.importNode,n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(e){return document.importNode(n,true)}return n}(a(t)).childNodes[0]},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(e.prototype,n),e}(t)}()}).call(this,n(14))},function(t,e,n){(function(H){t.exports=function(){"use strict";"undefined"!=typeof window?window:void 0!==H||"undefined"!=typeof self&&self;function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return u(t,e,n)})},u}()});var e=t(function(t,e){e.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},t.exports=e.default}),n=e.svg,i=e.xlink,o={};o[n.name]=n.uri,o[i.name]=i.uri;var r,s=function(t,e){void 0===t&&(t="");var n=a(o,e||{}),i=function(n){return Object.keys(n).map(function(t){var e=n[t].toString().replace(/"/g,""");return t+'="'+e+'"'}).join(" ")}(n);return""+t+""},d=e.svg,u=e.xlink,p={attrs:(r={style:["position: absolute","width: 0","height: 0"].join("; ")},r[d.name]=d.uri,r[u.name]=u.uri,r)},l=function(t){this.config=a(p,t||{}),this.symbols=[]};l.prototype.add=function(t){var e=this.symbols,n=this.find(t.id);return n?(e[e.indexOf(n)]=t,!1):(e.push(t),!0)},l.prototype.remove=function(t){var e=this.symbols,n=this.find(t);return!!n&&(e.splice(e.indexOf(n),1),n.destroy(),!0)},l.prototype.find=function(e){return this.symbols.filter(function(t){return t.id===e})[0]||null},l.prototype.has=function(t){return null!==this.find(t)},l.prototype.stringify=function(){var t=this.config,e=t.attrs,n=this.symbols.map(function(t){return t.stringify()}).join("");return s(n,e)},l.prototype.toString=function(){return this.stringify()},l.prototype.destroy=function(){this.symbols.forEach(function(t){return t.destroy()})};var c=function(t){var e=t.id,n=t.viewBox,i=t.content;this.id=e,this.viewBox=n,this.content=i};c.prototype.stringify=function(){return this.content},c.prototype.toString=function(){return this.stringify()},c.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};var h=function(t){var e=!!document.importNode,n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;return e?document.importNode(n,!0):n},f=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},e.createFromExistingNode=function(t){return new e({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},e.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},e.prototype.mount=function(t){if(this.isMounted)return this.node;var e="string"==typeof t?document.querySelector(t):t,n=this.render();return this.node=n,e.appendChild(n),n},e.prototype.render=function(){var t=this.stringify();return h(s(t)).childNodes[0]},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(e.prototype,n),e}(c),m={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},w=function(t){return Array.prototype.slice.call(t,0)},v={isChrome:function(){return/chrome/i.test(navigator.userAgent)},isFirefox:function(){return/firefox/i.test(navigator.userAgent)},isIE:function(){return/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)},isEdge:function(){return/edge/i.test(navigator.userAgent)}},y=function(t){return(t||window.location.href).split("#")[0]},g=function(i){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",function(t,e,n){!function(t,e){var n=document.createEvent("CustomEvent");n.initCustomEvent(t,false,false,e),window.dispatchEvent(n)}(i,{oldUrl:n,newUrl:e})})}])},b=function(t,n){return void 0===n&&(n="linearGradient, radialGradient, pattern"),w(t.querySelectorAll("symbol")).forEach(function(e){w(e.querySelectorAll(n)).forEach(function(t){e.parentNode.insertBefore(t,e)})}),t};var x=e.xlink.uri,_="xlink:href",C=/[{}|\\\^\[\]`"<>]/g;function E(t){return t.replace(C,function(t){return"%"+t[0].charCodeAt(0).toString(16).toUpperCase()})}var O,M=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],B=M.map(function(t){return"["+t+"]"}).join(","),I=function(t,e,n,i){var o=E(n),r=E(i),s=t.querySelectorAll(B),a=function(t,o){return w(t).reduce(function(t,e){if(!e.attributes)return t;var n=w(e.attributes),i=o?n.filter(o):n;return t.concat(i)},[])}(s,function(t){var e=t.localName,n=t.value;return-1!==M.indexOf(e)&&-1!==n.indexOf("url("+o)});a.forEach(function(t){return t.value=t.value.replace(new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(o),"g"),r)}),function(t,i,o){w(t).forEach(function(t){var e=t.getAttribute(_);if(e&&0===e.indexOf(i)){var n=e.replace(i,o);t.setAttributeNS(x,_,n)}})}(e,o,r)},S={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},j=function(s){function t(t){var e=this;void 0===t&&(t={}),s.call(this,a(m,t));var n=function(i){return i=i||Object.create(null),{on:function(t,e){(i[t]||(i[t]=[])).push(e)},off:function(t,e){i[t]&&i[t].splice(i[t].indexOf(e)>>>0,1)},emit:function(e,n){(i[e]||[]).map(function(t){t(n)}),(i["*"]||[]).map(function(t){t(e,n)})}}}();this._emitter=n,this.node=null;var i=this.config;if(i.autoConfigure&&this._autoConfigure(t),i.syncUrlsWithBaseTag){var o=document.getElementsByTagName("base")[0].getAttribute("href");n.on(S.MOUNT,function(){return e.updateUrls("#",o)})}var r=this._handleLocationChange.bind(this);this._handleLocationChange=r,i.listenLocationChangeEvent&&window.addEventListener(i.locationChangeEvent,r),i.locationChangeAngularEmitter&&g(i.locationChangeEvent),n.on(S.MOUNT,function(t){i.moveGradientsOutsideSymbol&&b(t)}),n.on(S.SYMBOL_MOUNT,function(t){i.moveGradientsOutsideSymbol&&b(t.parentNode),(v.isIE()||v.isEdge())&&function(t){var e=[];w(t.querySelectorAll("style")).forEach(function(t){t.textContent+="",e.push(t)})}(t)})}s&&(t.__proto__=s),(t.prototype=Object.create(s&&s.prototype)).constructor=t;var e={isMounted:{}};return e.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(t){var e=this.config;void 0===t.syncUrlsWithBaseTag&&(e.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===t.locationChangeAngularEmitter&&(e.locationChangeAngularEmitter="angular"in window),void 0===t.moveGradientsOutsideSymbol&&(e.moveGradientsOutsideSymbol=v.isFirefox())},t.prototype._handleLocationChange=function(t){var e=t.detail,n=e.oldUrl,i=e.newUrl;this.updateUrls(n,i)},t.prototype.add=function(t){var e=s.prototype.add.call(this,t);return this.isMounted&&e&&(t.mount(this.node),this._emitter.emit(S.SYMBOL_MOUNT,t.node)),e},t.prototype.attach=function(t){var e=this,n=this;if(n.isMounted)return n.node;var i="string"==typeof t?document.querySelector(t):t;return n.node=i,this.symbols.forEach(function(t){t.mount(n.node),e._emitter.emit(S.SYMBOL_MOUNT,t.node)}),w(i.querySelectorAll("symbol")).forEach(function(t){var e=f.createFromExistingNode(t);e.node=t,n.add(e)}),this._emitter.emit(S.MOUNT,i),i},t.prototype.destroy=function(){var t=this.config,e=this.symbols,n=this._emitter;e.forEach(function(t){return t.destroy()}),n.off("*"),window.removeEventListener(t.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(t,e){void 0===t&&(t=this.config.mountTo),void 0===e&&(e=!1);if(this.isMounted)return this.node;var n="string"==typeof t?document.querySelector(t):t,i=this.render();return this.node=i,e&&n.childNodes[0]?n.insertBefore(i,n.childNodes[0]):n.appendChild(i),this._emitter.emit(S.MOUNT,i),i},t.prototype.render=function(){return h(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(t,e){if(!this.isMounted)return!1;var n=document.querySelectorAll(this.config.usagesToUpdate);return I(this.node,n,y(t)+"#",y(e)+"#"),!0},Object.defineProperties(t.prototype,e),t}(l),A=t(function(t){ +/*! + * domready (c) Dustin Diaz 2014 - License MIT + */ +t.exports=function(){var t,e=[],n=document,i=n.documentElement.doScroll,o="DOMContentLoaded",r=(i?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return r||n.addEventListener(o,t=function(){for(n.removeEventListener(o,t),r=1;t=e.shift();)t()}),function(t){r?setTimeout(t,0):e.push(t)}}()}),P="__SVG_SPRITE_NODE__",k="__SVG_SPRITE__";window[k]?O=window[k]:(O=new j({attrs:{id:P}}),window[k]=O);var T=function(){var t=document.getElementById(P);t?O.attach(t):O.mount(document.body,!0)};return document.body?T():A(T),O}()}).call(this,n(14))},function(t,e,n){"use strict";function o(t,i,o){void 0===o&&(o="layx-");for(var e=[],n=3;ninnerWidth&&(u=a-r),void 0!==i?p=i:s+d>innerHeight&&(p=d-s),m.addClasses(this.element,this.app.prefix,"context-menu-bar-active"),m.addStyles(this.element,{zIndex:""+e,top:p+"px",left:u+"px"})}},w.prototype.updateChildrenOffset=function(t,e,n){if(!this.isTopMenu&&e&&e.parentElement&&e.parentElement.parentElement){var i=e.parentElement.parentElement,o=getComputedStyle(i),r=Number(o.width.replace("px","")),s=Number(o.left.replace("px","")),a=Number(o.top.replace("px","")),d=getComputedStyle(e),u=Number(d.width.replace("px","")),p=e.childElementCount*f.default.height,l=f.default.height*n,c=r+s-w.offset,h=a+l-w.offset;r+s+u>innerWidth&&(c=s-u+w.offset),a+l+p>innerHeight&&(h=innerHeight-p-w.offset),m.addClasses(e,this.app.prefix,"context-menu-bar-active"),m.addStyles(e,{top:h+"px",left:c+"px"})}},w.prototype.hideChildren=function(t){this.isTopMenu||m.removeClasses(t,this.app.prefix,"context-menu-bar-active")},w.prototype.createContextMenuButtons=function(t){if(!1!==this.contextMenuButtons){for(var e=Array(),n=0,i=0,o=this.contextMenuButtons;i=innerHeight-50){if(i.containClass(o.salver.element,o.prefix,"salver-bar-keep"))return;o.salver.show()}else{if(!i.containClass(o.salver.element,o.prefix,"salver-bar-keep"))return;o.salver.show(!1)}},this.init()}e.default=u},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(bp=function(t,e){return(bp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}bp(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),bp;Object.defineProperty(exports,"__esModule",{value:!0});var UIComponent_1=__webpack_require__(6),UIParclose_1=__webpack_require__(19),UIResizeBar_1=__webpack_require__(20),UIToolBar_1=__webpack_require__(22),UIActionButton_1=__webpack_require__(13),UIContextMenuBar_1=__webpack_require__(10),UITopMenuBar_1=__webpack_require__(28),UISalverBar_1=__webpack_require__(30),UIContent_1=__webpack_require__(32),UIStatuBar_1=__webpack_require__(35),ElementHelper=__webpack_require__(2),CastHelper=__webpack_require__(3),TypeHelper=__webpack_require__(5),ExceptionHelper=__webpack_require__(8),StringHelper=__webpack_require__(9),UIWindow=function(_super){function UIWindow(t,e){var n,i,o=_super.call(this,t)||this;return o.zIndex=o.app.zIndex,o.enableAnimated=!1,o.status="normal",o.lastStatus="none",o.flickering=!1,o.width=800,o.height=600,o.maxWidth=innerWidth,o.maxHeight=innerHeight,o.minWidth=200,o.minHeight=200,o.background="#ffffff",o.shadow="rgba(0, 0, 0, 0.3) 1px 1px 24px",o.parclose=!1,o.mode="layer",o.border=null,o.borderRadius=null,o.animate="zoom",o.resizeBar={},o.toolBar={},o.contextMenu=!1,o.topMenu=!1,o.content={},o.statuBar=!1,o.storeStatus=!0,o._element=null,o._flickerShadow=null,o._lastStoreStatus=null,TypeHelper.isStringWithNotEmpty(e.id)||ExceptionHelper.assertId(),o.id=e.id,o.elementId=o.app.prefix+o.id,o.mode=CastHelper.windowModeCast(e.mode,o.mode),o.width=CastHelper.numberCast(e.width,o.width),o.height=CastHelper.numberCast(e.height,o.height),o.maxWidth=Math.min(CastHelper.numberCast(e.maxWidth,o.maxWidth),o.maxWidth),o.maxHeight=Math.min(CastHelper.numberCast(e.maxHeight,o.maxHeight),o.maxHeight),o.minWidth=Math.max(CastHelper.numberCast(e.minWidth,o.minWidth),o.minWidth),o.minHeight=Math.max(CastHelper.numberCast(e.minHeight,o.minHeight),o.minHeight),o.width=Math.max(o.minWidth,o.width),o.width=Math.min(o.maxWidth,o.width),o.height=Math.max(o.minHeight,o.height),o.height=Math.min(o.maxHeight,o.height),n=CastHelper.offsetCast(e.offset,o.width,o.height),o.left=n[0],o.top=n[1],o.background=CastHelper.stringOrBooleanStyleCast(e.background,o.background),o.shadow=CastHelper.stringOrBooleanStyleCast(e.shadow,o.shadow),o.parclose=CastHelper.typeOrBooleanCast(e.parclose,o.parclose,0),i=CastHelper.borderCast(e.border,{width:1,style:"solid",color:"#3baced",radius:4}),o.border=i[0],o.borderRadius=i[1],o.animate=CastHelper.windowAnimateCast(e.animate,o.animate),o.enableAnimated="none"!==o.animate,o.resizeBar=CastHelper.jsonOrBooleanCast(e.resizeBar,o.resizeBar),o.toolBar=CastHelper.jsonOrBooleanCast(e.toolBar,o.toolBar),o.contextMenu=CastHelper.contextMenuButtonsCast(e.contextMenu),o.topMenu=CastHelper.contextMenuButtonsCast(e.topMenu),o.content=CastHelper.jsonOrBooleanCast(e.content,o.content),o.statuBar=CastHelper.jsonOrBooleanCast(e.statuBar,o.statuBar),o.storeStatus=CastHelper.booleanCast(e.storeStatus,o.storeStatus),o}return __extends(UIWindow,_super),Object.defineProperty(UIWindow.prototype,"element",{get:function(){return document.getElementById(this.elementId)},enumerable:!0,configurable:!0}),Object.defineProperty(UIWindow.prototype,"flickerShadow",{get:function(){return this.getFlickerShadow()},enumerable:!0,configurable:!0}),Object.defineProperty(UIWindow.prototype,"lastStoreStatus",{get:function(){var storeStatus=localStorage.getItem(this.app.prefix+this.id);return storeStatus?eval("("+storeStatus+")"):null},set:function(t){localStorage.setItem(this.app.prefix+this.id,JSON.stringify(t))},enumerable:!0,configurable:!0}),UIWindow.prototype.present=function(){var e=this,t=ElementHelper.createFragment(),n=ElementHelper.createElement("div");if(n.id=this.elementId,n.setAttribute("data-window-id",this.id),ElementHelper.addClasses(n,this.app.prefix,"window","window-"+this.mode,"flexbox","flex-column",this.enableAnimated?"animate":"",this.enableAnimated?"animate-"+this.animate+"-show":""),this.readStoreStatus(),ElementHelper.addStyles(n,{zIndex:"layer"===this.mode?""+this.zIndex:null,maxWidth:this.maxWidth+"px",maxHeight:this.maxHeight+"px",minWidth:this.minWidth+"px",minHeight:this.minHeight+"px",width:this.width+"px",height:this.height+"px",top:"layer"===this.mode?this.top+"px":null,left:"layer"===this.mode?this.left+"px":null,background:this.background,border:this.border,borderRadius:this.borderRadius,webkitBorderRadius:this.borderRadius,boxShadow:this.shadow,webkitBoxShadow:this.shadow}),n.addEventListener("mousedown",function(t){e.updateZIndex()},!0),!1!==this.toolBar){var i=new UIToolBar_1.default(this.app,this,this.toolBar),o=i.present();n.appendChild(o),this.setComponent("tool-bar",i)}if(!1!==this.topMenu){var r=new UITopMenuBar_1.default(this.app,this,this.topMenu),s=r.present();n.appendChild(s),this.setComponent("top-menu-bar",r)}if(!1!==this.content){var a=new UIContent_1.default(this.app,this,this.content),d=a.present();n.appendChild(d),this.setComponent("content-container",a)}if(!1!==this.resizeBar){var u=new UIResizeBar_1.default(this.app,this,this.resizeBar),p=u.present();n.appendChild(p),this.setComponent("resize-bar",u)}if(!1!==this.statuBar){var l=new UIStatuBar_1.default(this.app,this,this.statuBar),c=l.present();n.appendChild(c),this.setComponent("statu-bar",l)}if(!1!==this.parclose){var h=new UIParclose_1.default(this.app,this,{opacity:this.parclose}),f=h.present();t.appendChild(f),this.setComponent("parclose",h),this.app.salver&&this.app.salver.parsecloseCount++}if(!1!==this.contextMenu){var m=new UIContextMenuBar_1.default(this.app,this,"window",this.contextMenu),w=m.present();t.appendChild(w),this.setComponent("context-menu-bar",m)}if(this.bindEvent(n),!this.app.salver){var v=new UISalverBar_1.default(this.app),y=v.present();t.appendChild(y),this.app.salver=v}return t.appendChild(n),t},UIWindow.prototype.readStoreStatus=function(){var t=this.lastStoreStatus;this.storeStatus&&(t?(this.width=t.width,this.height=t.height,this.top=t.top,this.left=t.left):this.lastStoreStatus={top:this.top,left:this.left,width:this.width,height:this.height})},UIWindow.prototype.handlerContentByAnimate=function(t){void 0===t&&(t=!0);var e=this.getComponent("content-container");e&&(t?ElementHelper.addClasses(e.element,this.app.prefix,"content-container-fade-out"):ElementHelper.removeClasses(e.element,this.app.prefix,"content-container-fade-out"))},UIWindow.prototype.bindEvent=function(t){var n=this;!1!==this.contextMenu&&t.addEventListener("contextmenu",function(t){t.preventDefault(),t.returnValue=!1;var e=n.getComponent("context-menu-bar");return e&&e.updateOffset(t,n.zIndex+1),!1}),t.addEventListener("animationstart",function(t){n.handlerContentByAnimate()}),t.addEventListener("animationend",function(t){var e=n.element;ElementHelper.removeClasses(e,n.app.prefix,"animate-"+n.animate+"-show","animate-"+n.animate+"-drag-to-normal"),ElementHelper.containClass(e,n.app.prefix,"animate-"+n.animate+"-destroy")&&n.remove(),ElementHelper.containClass(e,n.app.prefix,"animate-"+n.animate+"-to-min")&&n.minimize(),n.handlerContentByAnimate(!1)}),t.addEventListener("transitionend",function(t){ElementHelper.removeClasses(n.element,n.app.prefix,"animate-"+n.animate+"-to-max","animate-"+n.animate+"-to-normal"),n.handlerContentByAnimate(!1)})},UIWindow.prototype.destroy=function(){this.enableAnimated?ElementHelper.addClasses(this.element,this.app.prefix,"animate-"+this.animate+"-destroy"):this.remove()},UIWindow.prototype.remove=function(){"max"===this.status&&ElementHelper.removeClasses(document.body,"z"+this.app.prefix,"body-noscroll");var t=this.getComponent("parclose");t&&(ElementHelper.removeElement(t.element),this.app.salver&&this.app.salver.parsecloseCount--),this.app.salver&&this.app.salver.removeItem();var e=this.app.windows.indexOf(this);this.app.windows.splice(e,1),this.app.window=null,ElementHelper.removeElement(this.element)},UIWindow.prototype.normal=function(t){void 0===t&&(t=!1);var e=this.element;if(e&&e.parentElement&&"normal"!==this.status){this.lastStatus=this.status,this.status="normal",this.handlerContentByAnimate(),ElementHelper.removeClasses(document.body,"z"+this.app.prefix,"body-noscroll"),ElementHelper.addClasses(e,this.app.prefix,this.enableAnimated?!1===t?"animate-"+this.animate+"-to-normal":"animate-"+this.animate+"-drag-to-normal":""),ElementHelper.addStyles(e,{top:this.top+"px",left:this.left+"px",width:this.width+"px",height:this.height+"px",borderRadius:this.borderRadius});var n=this.getComponent("resize-bar");n&&ElementHelper.removeClasses(n.element,this.app.prefix,"resize-bar-disabled");var i=this.getComponent("\n tool-bar\n /action-bar\n /action-buttons");if(i&&0!==i.length){for(var o=0,r=i;othis.window.width/2&&ethis.window.width/2&&e>=innerWidth-this.window.width&&(this._left=e-this.window.width/2),this.window.top=o,this.window.left=this._left,this.window.normal(!0))},u.prototype.mouseStar=function(t){this.app.drayLayer.updateZIndex(this.window.zIndex-1),this.content=this.window.getComponent("content-container"),this.content&&this.content.showPenetrate()},u.prototype.mouseMove=function(t){t.preventDefault()},u.prototype.mouseEnd=function(t){},u);function u(t,e,n,i){var o=r.call(this,n)||this;return o.app=t,o.window=e,o.dragMoveOptions=i,o.emerge=10,o._top=0,o._left=0,o._originTop=0,o._originLeft=0,o._lastTime=null,o.content=null,o}e.default=d},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(4),f=n(10),m=n(13),w=n(2),a=n(3),d=(r=s.default,o(v,r),Object.defineProperty(v.prototype,"element",{get:function(){return document.getElementById(""+this.elementId)},enumerable:!0,configurable:!0}),v.prototype.present=function(){var t=w.createFragment();if(!0===this.enable){var e=w.createElement("div");e.setAttribute("data-window-id",this.window.id),e.id=this.elementId,w.addClasses(e,this.app.prefix,"action-bar","flexbox","flex-row"),e.addEventListener("mousedown",function(t){t.preventDefault(),t.stopPropagation()}),e.addEventListener("contextmenu",function(t){return t.preventDefault(),t.stopPropagation(),t.returnValue=!1},!0),this.createActionButtons(e),t.appendChild(e)}return t},v.prototype.zoomActionButtons=function(t){if(!1!==this.items){var e=t<=v.actionButtonZoomWidth,n=this.getComponent("action-buttons");if(n){for(var i=n.slice().reverse(),o=i[0],r=i.slice(1),s=Array(),a=0,d=r=r.reverse();a=parent.innerHeight-50){if(a.containClass(i.app.salver.element,i.app.prefix,"salver-bar-keep"))return;i.app.salver.show()}else{if(!a.containClass(i.app.salver.element,i.app.prefix,"salver-bar-keep"))return;i.app.salver.show(!1)}},i.url=d.stringCast(n),i}e.default=l},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(4),a=n(2),d=n(3),u=n(5),p=(r=s.default,o(l,r),Object.defineProperty(l.prototype,"element",{get:function(){return document.getElementById(""+this.elementId)},enumerable:!0,configurable:!0}),l.prototype.present=function(){var t=a.createFragment(),e=a.createElement("div");if(e.setAttribute("data-window-id",this.window.id),e.id=this.elementId,a.addClasses(e,this.app.prefix,"statu-bar"),a.addStyles(e,{height:this.height+"px",background:""+this.background}),u.isElement(this.content)){var n=this.content.cloneNode(!0);a.addStyles(n,{display:"inherit"}),e.appendChild(n)}else e.innerHTML=this.content;return t.appendChild(e),t},l);function l(t,e,n){var i=r.call(this,t,e)||this;return i.elementId=i.window.elementId+"-statu-bar",i.height=30,i.background="#e5e5e5",i.content="",i._element=null,i.height=d.numberCast(n.height,i.height),i.background=d.stringOrBooleanStyleCast(n.background,i.background),i.content=d.stringOrElementCast(n.content),i}e.default=p},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(6),a=n(7),d=n(2),u=n(3),p=n(37),l=(r=s.default,o(c,r),Object.defineProperty(c.prototype,"element",{get:function(){return document.getElementById(this.elementId)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"processElement",{get:function(){return this.element?this.element.querySelector("."+this.app.prefix+"notice-process"):null},enumerable:!0,configurable:!0}),c.prototype.present=function(){var t=d.createFragment(),e=d.createElement("div");e.id=this.elementId,d.addClasses(e,this.app.prefix,"notice","animate-d3s","animate-fade-in-right"),d.addStyles(e,{zIndex:""+this.id}),this.bindEvent(e),this.createClose(e);var n=d.createElement("div");d.addClasses(n,this.app.prefix,"notice-container","flexbox","flex-row");var i=d.createElement("div");d.addClasses(i,this.app.prefix,"notice-icon","notice-"+this.type);var o=new a.default(this.app,""+this.type).present();i.appendChild(o),n.appendChild(i);var r=d.createElement("div");return d.addClasses(r,this.app.prefix,"notice-message","flex-item"),this.createTitle(r),this.createContent(r),n.appendChild(r),e.appendChild(n),this.createNoticeTime(e),this.createProcess(e),t.appendChild(e),t},c.prototype.createClose=function(t){var e=this,n=d.createElement("div");d.addClasses(n,this.app.prefix,"notice-close-button","flexbox","flex-center");var i=new a.default(this.app,"destroy").present();n.appendChild(i),n.addEventListener("mousedown",function(t){e.destroy()}),t.appendChild(n)},c.prototype.createTitle=function(t){if(void 0!==this.title){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-title","notice-"+this.type),e.innerText=this.title,t.appendChild(e)}},c.prototype.createContent=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-content"),e.innerText=this.message,t.appendChild(e)},c.prototype.createNoticeTime=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-time"),e.innerText=""+p.getDatetime(),t.appendChild(e)},c.prototype.createProcess=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-process"),t.appendChild(e)},c.prototype.calcTopOffset=function(t){void 0===t&&(t=void 0);var e=c.topOffset;if(0'});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"min",use:"min-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"max",use:"max-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"info",use:"info-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"restore",use:"restore-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"above",use:"above-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"more",use:"more-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"icon",use:"icon-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"right",use:"right-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"about",use:"about-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"success",use:"success-usage",viewBox:"0 0 1025 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"warning",use:"warning-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"error",use:"error-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"refresh",use:"refresh-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a}],e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)f.d(n,i,function(t){return e[t]}.bind(null,i));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s=15)).default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e}); \ No newline at end of file diff --git a/swa/token/mac.js b/swa/token/mac.js new file mode 100644 index 0000000..e375c98 --- /dev/null +++ b/swa/token/mac.js @@ -0,0 +1,116 @@ +/** + * int 转 byte + * @param i + */ +function intToByte(i) { + var b = i & 0xFF; + var c = 0; + if (b >= 128) { + c = b % 128; + c = -1 * (128 - c); + } else { + c = b; + } + return c; +} + +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} +function toHex(d) { return ("0"+(Number(d).toString(16))).slice(-2).toUpperCase() } + +function mac( hex ) { + if ( ! /^([A-Fa-f0-9][A-Fa-f0-9])+$/.test( hex ) ) { + throw "hex 格式错误" + } + var checkNum = intToByte(0); + var arrBytes = new Array(); + for ( var i = 0 ; i < hex.length; i+=2 ) { + var v = intToByte(parseInt(hex[i] + hex[i+1], 16)) + arrBytes.push( v ) + checkNum = checkNum ^ v; + } + + return toHex( checkNum & 0xFF ) +} + +console.log( mac("FFFF010203EEEECCCC7777223311") ) + + +function xor(d1, d2, d3) { + if ( 32 !== d1.length || 32 !== d2.length || 32 !== d3.length ) { + throw "输入格式错误" + } + + var a1 = hexToBytes(d1); + var a2 = hexToBytes(d2); + var a3 = hexToBytes(d3); + + var data = []; + for ( var i = 0; i < 16 ; i++){ + data[ i ] = a1[ i ] ^ a2[ i ] ^ a3[ i ] + } + + return bytesToHex( data ) +} + +var r = xor("11111111111111111111111111111111", "22222222222222222222222222222222", "33333333333333333333333333333333") +console.log( r ) + +// Des3 +// npm i crypto-js +function hexToBytes(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; +} + +function bytesToHex(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(""); +} + + + +// const DES = require('./jssrc/des.js') +// var des = new DES(); +// var key = hexToBytes("12345678123456781234567812345678") +// var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// des = new DES(); +// key = hexToBytes("12345678123456781234567812345670") +// ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// + + +const sm4 = require('./jssrc/sm4.js') +var ret = sm4.SM4CryptECB("00000000000000000000000000000000", 1 , "11111111111111111111111111111111") +console.log( ret ) + + + + +// const tripledes = require("crypto-js/tripledes"); +// +// var value = "123";CryptoJS.enc.Hex.parse("0000000000000000"); +// var key = "12345678123456781234567812345678"; CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); +// +// var encrypted = tripledes.encrypt(value , key); +// var decrypted = tripledes.decrypt(encrypted, key); +// +// console.log( "encrypted", encrypted.toString('hex') ) +// console.log( "decrypted", decrypted ) diff --git a/swa/token/package-lock.json b/swa/token/package-lock.json new file mode 100644 index 0000000..81aaea0 --- /dev/null +++ b/swa/token/package-lock.json @@ -0,0 +1,4443 @@ +{ + "name": "ic", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "crypto-js": "^4.1.1", + "install": "^0.13.0", + "npm": "^9.2.0" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "node_modules/install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/npm": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/npm/-/npm-9.2.0.tgz", + "integrity": "sha512-oypVdaWGHDuV79RXLvp+B9gh6gDyAmoHKrQ0/JBYTWWx5D8/+AAxFdZC84fSIiyDdyW4qfrSyYGKhekxDOaMXQ==", + "bundleDependencies": [ + "@isaacs/string-locale-compare", + "@npmcli/arborist", + "@npmcli/config", + "@npmcli/map-workspaces", + "@npmcli/package-json", + "@npmcli/run-script", + "abbrev", + "archy", + "cacache", + "chalk", + "ci-info", + "cli-columns", + "cli-table3", + "columnify", + "fastest-levenshtein", + "fs-minipass", + "glob", + "graceful-fs", + "hosted-git-info", + "ini", + "init-package-json", + "is-cidr", + "json-parse-even-better-errors", + "libnpmaccess", + "libnpmdiff", + "libnpmexec", + "libnpmfund", + "libnpmhook", + "libnpmorg", + "libnpmpack", + "libnpmpublish", + "libnpmsearch", + "libnpmteam", + "libnpmversion", + "make-fetch-happen", + "minimatch", + "minipass", + "minipass-pipeline", + "mkdirp", + "ms", + "node-gyp", + "nopt", + "npm-audit-report", + "npm-install-checks", + "npm-package-arg", + "npm-pick-manifest", + "npm-profile", + "npm-registry-fetch", + "npm-user-validate", + "npmlog", + "p-map", + "pacote", + "parse-conflict-json", + "proc-log", + "qrcode-terminal", + "read", + "read-package-json", + "read-package-json-fast", + "rimraf", + "semver", + "ssri", + "tar", + "text-table", + "tiny-relative-date", + "treeverse", + "validate-npm-package-name", + "which", + "write-file-atomic" + ], + "workspaces": [ + "docs", + "smoke-tests", + "mock-registry", + "workspaces/*" + ], + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^6.1.5", + "@npmcli/config": "^6.1.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^17.0.3", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "graceful-fs": "^4.2.10", + "hosted-git-info": "^6.1.1", + "ini": "^3.0.1", + "init-package-json": "^4.0.1", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", + "libnpmversion": "^4.0.1", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "ms": "^2.1.2", + "node-gyp": "^9.3.0", + "nopt": "^7.0.0", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.3", + "npm-user-validate": "^1.0.1", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.8", + "ssri": "^10.0.1", + "tar": "^6.1.13", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^3.0.0", + "write-file-atomic": "^5.0.0" + }, + "bin": { + "npm": "bin/npm-cli.js", + "npx": "bin/npx-cli.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@colors/colors": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/npm/node_modules/@gar/promisify": { + "version": "1.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/arborist": { + "version": "6.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.3", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^5.1.1", + "nopt": "^7.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.3", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^10.0.1", + "treeverse": "^3.0.0", + "walk-up-path": "^1.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/config": { + "version": "6.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/map-workspaces": "^3.0.0", + "ini": "^3.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", + "semver": "^7.3.5", + "walk-up-path": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/disparity-colors": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ansi-styles": "^4.3.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/fs": { + "version": "3.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/git": { + "version": "4.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/installed-package-contents": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/map-workspaces": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^8.0.1", + "minimatch": "^5.0.1", + "read-package-json-fast": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/name-from-folder": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/package-json": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/promise-spawn": { + "version": "6.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/query": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/run-script": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tootallnate/once": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/abbrev": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/abort-controller": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/npm/node_modules/agent-base": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/npm/node_modules/agentkeepalive": { + "version": "4.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/npm/node_modules/aggregate-error": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/aproba": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/archy": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/are-we-there-yet": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/are-we-there-yet/node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/npm/node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/bin-links": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/binary-extensions": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/builtins": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/npm/node_modules/cacache": { + "version": "17.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/chalk": { + "version": "4.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/npm/node_modules/chownr": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ci-info": { + "version": "3.7.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cidr-regex": { + "version": "3.1.1", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "ip-regex": "^4.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/clean-stack": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/cli-columns": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/cli-table3": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/npm/node_modules/clone": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/cmd-shim": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/npm/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/color-support": { + "version": "1.1.3", + "inBundle": true, + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/npm/node_modules/columnify": { + "version": "1.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/npm/node_modules/common-ancestor-path": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/concat-map": { + "version": "0.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/console-control-strings": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/cssesc": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/debug": { + "version": "4.3.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/defaults": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/npm/node_modules/delegates": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/depd": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/diff": { + "version": "5.1.0", + "inBundle": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/npm/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/encoding": { + "version": "0.1.13", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/npm/node_modules/env-paths": { + "version": "2.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/err-code": { + "version": "2.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/event-target-shim": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/events": { + "version": "3.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/npm/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/npm/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/fs.realpath": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/function-bind": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/gauge": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/glob": { + "version": "8.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/graceful-fs": { + "version": "4.2.10", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/has": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/npm/node_modules/has-flag": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/has-unicode": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/hosted-git-info": { + "version": "6.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.0", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/http-proxy-agent": { + "version": "5.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/https-proxy-agent": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/humanize-ms": { + "version": "1.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/npm/node_modules/iconv-lite": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/npm/node_modules/ignore-walk": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minimatch": "^5.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/imurmurhash": { + "version": "0.1.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/npm/node_modules/indent-string": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/infer-owner": { + "version": "1.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/inflight": { + "version": "1.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/inherits": { + "version": "2.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/ini": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/init-package-json": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.0.0", + "promzard": "^0.3.0", + "read": "^1.0.7", + "read-package-json": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/ip": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/ip-regex": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-cidr": { + "version": "4.0.2", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "^3.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/is-core-module": { + "version": "2.10.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-lambda": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/json-stringify-nice": { + "version": "1.1.4", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/jsonparse": { + "version": "1.3.1", + "engines": [ + "node >= 0.2.0" + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff": { + "version": "5.1.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff-apply": { + "version": "5.4.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/libnpmaccess": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmdiff": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmexec": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "chalk": "^4.1.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "proc-log": "^3.0.0", + "read": "^1.0.7", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "walk-up-path": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmfund": { + "version": "4.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmhook": { + "version": "9.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmorg": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpack": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpublish": { + "version": "7.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", + "semver": "^7.3.7", + "ssri": "^10.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmsearch": { + "version": "6.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmteam": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmversion": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/lru-cache": { + "version": "7.13.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/npm/node_modules/make-fetch-happen": { + "version": "11.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/minimatch": { + "version": "5.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/minipass": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-collect": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-fetch": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-flush": { + "version": "1.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-json-stream": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline": { + "version": "1.2.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized": { + "version": "1.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minizlib": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/mkdirp": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ms": { + "version": "2.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/mute-stream": { + "version": "0.0.8", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/negotiator": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/node-gyp": { + "version": "9.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "2.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { + "version": "1.1.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { + "version": "16.1.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob": { + "version": "8.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { + "version": "5.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "10.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/ssri": { + "version": "9.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-filename": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-slug": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/normalize-package-data": { + "version": "5.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-audit-report": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-bundled": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-install-checks": { + "version": "6.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-normalize-package-bin": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-package-arg": { + "version": "10.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-packlist": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-pick-manifest": { + "version": "8.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-profile": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch": { + "version": "14.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-user-validate": { + "version": "1.0.1", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/npmlog": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/once": { + "version": "1.4.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/p-map": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/pacote": { + "version": "15.0.7", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/parse-conflict-json": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^5.0.1", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/path-is-absolute": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/proc-log": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/process": { + "version": "0.11.10", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/npm/node_modules/promise-all-reject-late": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-call-limit": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-inflight": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/promise-retry": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/promzard": { + "version": "0.3.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "read": "1" + } + }, + "node_modules/npm/node_modules/qrcode-terminal": { + "version": "0.12.0", + "inBundle": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, + "node_modules/npm/node_modules/read": { + "version": "1.0.7", + "inBundle": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/read-cmd-shim": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json-fast": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/readable-stream": { + "version": "3.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/retry": { + "version": "0.12.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm/node_modules/rimraf": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/safer-buffer": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/npm/node_modules/semver": { + "version": "7.3.8", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/set-blocking": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/signal-exit": { + "version": "3.0.7", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/smart-buffer": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks": { + "version": "2.7.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/spdx-correct": { + "version": "3.1.1", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-exceptions": { + "version": "2.3.0", + "inBundle": true, + "license": "CC-BY-3.0" + }, + "node_modules/npm/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-license-ids": { + "version": "3.0.11", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/npm/node_modules/ssri": { + "version": "10.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/npm/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/supports-color": { + "version": "7.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/tar": { + "version": "6.1.13", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/text-table": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tiny-relative-date": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/treeverse": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-filename": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-slug": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/validate-npm-package-license": { + "version": "3.0.4", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/walk-up-path": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/wcwidth": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/npm/node_modules/which": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/wide-align": { + "version": "1.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/npm/node_modules/wrappy": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/write-file-atomic": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/yallist": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + } + }, + "dependencies": { + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" + }, + "npm": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/npm/-/npm-9.2.0.tgz", + "integrity": "sha512-oypVdaWGHDuV79RXLvp+B9gh6gDyAmoHKrQ0/JBYTWWx5D8/+AAxFdZC84fSIiyDdyW4qfrSyYGKhekxDOaMXQ==", + "requires": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^6.1.5", + "@npmcli/config": "^6.1.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^17.0.3", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "graceful-fs": "^4.2.10", + "hosted-git-info": "^6.1.1", + "ini": "^3.0.1", + "init-package-json": "^4.0.1", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", + "libnpmversion": "^4.0.1", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "ms": "^2.1.2", + "node-gyp": "^9.3.0", + "nopt": "^7.0.0", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.3", + "npm-user-validate": "^1.0.1", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.8", + "ssri": "^10.0.1", + "tar": "^6.1.13", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^3.0.0", + "write-file-atomic": "^5.0.0" + }, + "dependencies": { + "@colors/colors": { + "version": "1.5.0", + "bundled": true, + "optional": true + }, + "@gar/promisify": { + "version": "1.1.3", + "bundled": true + }, + "@isaacs/string-locale-compare": { + "version": "1.1.0", + "bundled": true + }, + "@npmcli/arborist": { + "version": "6.1.5", + "bundled": true, + "requires": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.3", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^5.1.1", + "nopt": "^7.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.3", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^10.0.1", + "treeverse": "^3.0.0", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/config": { + "version": "6.1.0", + "bundled": true, + "requires": { + "@npmcli/map-workspaces": "^3.0.0", + "ini": "^3.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", + "semver": "^7.3.5", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/disparity-colors": { + "version": "3.0.0", + "bundled": true, + "requires": { + "ansi-styles": "^4.3.0" + } + }, + "@npmcli/fs": { + "version": "3.1.0", + "bundled": true, + "requires": { + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "4.0.3", + "bundled": true, + "requires": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + } + }, + "@npmcli/installed-package-contents": { + "version": "2.0.1", + "bundled": true, + "requires": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "@npmcli/map-workspaces": { + "version": "3.0.0", + "bundled": true, + "requires": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^8.0.1", + "minimatch": "^5.0.1", + "read-package-json-fast": "^3.0.0" + } + }, + "@npmcli/metavuln-calculator": { + "version": "5.0.0", + "bundled": true, + "requires": { + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", + "semver": "^7.3.5" + } + }, + "@npmcli/name-from-folder": { + "version": "1.0.1", + "bundled": true + }, + "@npmcli/node-gyp": { + "version": "3.0.0", + "bundled": true + }, + "@npmcli/package-json": { + "version": "3.0.0", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0" + } + }, + "@npmcli/promise-spawn": { + "version": "6.0.1", + "bundled": true, + "requires": { + "which": "^3.0.0" + } + }, + "@npmcli/query": { + "version": "3.0.0", + "bundled": true, + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "@npmcli/run-script": { + "version": "6.0.0", + "bundled": true, + "requires": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "bundled": true + }, + "abbrev": { + "version": "2.0.0", + "bundled": true + }, + "abort-controller": { + "version": "3.0.0", + "bundled": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "agent-base": { + "version": "6.0.2", + "bundled": true, + "requires": { + "debug": "4" + } + }, + "agentkeepalive": { + "version": "4.2.1", + "bundled": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.1.0", + "bundled": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ansi-regex": { + "version": "5.0.1", + "bundled": true + }, + "ansi-styles": { + "version": "4.3.0", + "bundled": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "aproba": { + "version": "2.0.0", + "bundled": true + }, + "archy": { + "version": "1.0.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "4.0.0", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "bundled": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "readable-stream": { + "version": "4.2.0", + "bundled": true, + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + } + } + } + }, + "balanced-match": { + "version": "1.0.2", + "bundled": true + }, + "base64-js": { + "version": "1.5.1", + "bundled": true + }, + "bin-links": { + "version": "4.0.1", + "bundled": true, + "requires": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + } + }, + "binary-extensions": { + "version": "2.2.0", + "bundled": true + }, + "brace-expansion": { + "version": "2.0.1", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "builtins": { + "version": "5.0.1", + "bundled": true, + "requires": { + "semver": "^7.0.0" + } + }, + "cacache": { + "version": "17.0.3", + "bundled": true, + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + } + }, + "chalk": { + "version": "4.1.2", + "bundled": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chownr": { + "version": "2.0.0", + "bundled": true + }, + "ci-info": { + "version": "3.7.0", + "bundled": true + }, + "cidr-regex": { + "version": "3.1.1", + "bundled": true, + "requires": { + "ip-regex": "^4.1.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "bundled": true + }, + "cli-columns": { + "version": "4.0.0", + "bundled": true, + "requires": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + } + }, + "cli-table3": { + "version": "0.6.3", + "bundled": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, + "clone": { + "version": "1.0.4", + "bundled": true + }, + "cmd-shim": { + "version": "6.0.0", + "bundled": true + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true + }, + "color-support": { + "version": "1.1.3", + "bundled": true + }, + "columnify": { + "version": "1.6.0", + "bundled": true, + "requires": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + } + }, + "common-ancestor-path": { + "version": "1.0.1", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "cssesc": { + "version": "3.0.0", + "bundled": true + }, + "debug": { + "version": "4.3.4", + "bundled": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "bundled": true + } + } + }, + "defaults": { + "version": "1.0.3", + "bundled": true, + "requires": { + "clone": "^1.0.2" + } + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "depd": { + "version": "1.1.2", + "bundled": true + }, + "diff": { + "version": "5.1.0", + "bundled": true + }, + "emoji-regex": { + "version": "8.0.0", + "bundled": true + }, + "encoding": { + "version": "0.1.13", + "bundled": true, + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "env-paths": { + "version": "2.2.1", + "bundled": true + }, + "err-code": { + "version": "2.0.3", + "bundled": true + }, + "event-target-shim": { + "version": "5.0.1", + "bundled": true + }, + "events": { + "version": "3.3.0", + "bundled": true + }, + "fastest-levenshtein": { + "version": "1.0.16", + "bundled": true + }, + "fs-minipass": { + "version": "2.1.0", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "function-bind": { + "version": "1.1.1", + "bundled": true + }, + "gauge": { + "version": "5.0.0", + "bundled": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "glob": { + "version": "8.0.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "bundled": true + }, + "has": { + "version": "1.0.3", + "bundled": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hosted-git-info": { + "version": "6.1.1", + "bundled": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "bundled": true + }, + "http-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "bundled": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.6.3", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "bundled": true + }, + "ignore-walk": { + "version": "6.0.0", + "bundled": true, + "requires": { + "minimatch": "^5.0.1" + } + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "indent-string": { + "version": "4.0.0", + "bundled": true + }, + "infer-owner": { + "version": "1.0.4", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "ini": { + "version": "3.0.1", + "bundled": true + }, + "init-package-json": { + "version": "4.0.1", + "bundled": true, + "requires": { + "npm-package-arg": "^10.0.0", + "promzard": "^0.3.0", + "read": "^1.0.7", + "read-package-json": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + } + }, + "ip": { + "version": "2.0.0", + "bundled": true + }, + "ip-regex": { + "version": "4.3.0", + "bundled": true + }, + "is-cidr": { + "version": "4.0.2", + "bundled": true, + "requires": { + "cidr-regex": "^3.1.1" + } + }, + "is-core-module": { + "version": "2.10.0", + "bundled": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "bundled": true + }, + "is-lambda": { + "version": "1.0.1", + "bundled": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true + }, + "json-parse-even-better-errors": { + "version": "3.0.0", + "bundled": true + }, + "json-stringify-nice": { + "version": "1.1.4", + "bundled": true + }, + "jsonparse": { + "version": "1.3.1", + "bundled": true + }, + "just-diff": { + "version": "5.1.1", + "bundled": true + }, + "just-diff-apply": { + "version": "5.4.1", + "bundled": true + }, + "libnpmaccess": { + "version": "7.0.1", + "bundled": true, + "requires": { + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmdiff": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" + } + }, + "libnpmexec": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "chalk": "^4.1.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "proc-log": "^3.0.0", + "read": "^1.0.7", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "walk-up-path": "^1.0.0" + } + }, + "libnpmfund": { + "version": "4.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5" + } + }, + "libnpmhook": { + "version": "9.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmorg": { + "version": "5.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmpack": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" + } + }, + "libnpmpublish": { + "version": "7.0.6", + "bundled": true, + "requires": { + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", + "semver": "^7.3.7", + "ssri": "^10.0.1" + } + }, + "libnpmsearch": { + "version": "6.0.1", + "bundled": true, + "requires": { + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmteam": { + "version": "5.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmversion": { + "version": "4.0.1", + "bundled": true, + "requires": { + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + } + }, + "lru-cache": { + "version": "7.13.2", + "bundled": true + }, + "make-fetch-happen": { + "version": "11.0.2", + "bundled": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "5.1.1", + "bundled": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "4.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-fetch": { + "version": "3.0.0", + "bundled": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-flush": { + "version": "1.0.5", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-json-stream": { + "version": "1.0.1", + "bundled": true, + "requires": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-sized": { + "version": "1.0.3", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minizlib": { + "version": "2.1.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "mkdirp": { + "version": "1.0.4", + "bundled": true + }, + "ms": { + "version": "2.1.3", + "bundled": true + }, + "mute-stream": { + "version": "0.0.8", + "bundled": true + }, + "negotiator": { + "version": "0.6.3", + "bundled": true + }, + "node-gyp": { + "version": "9.3.0", + "bundled": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "bundled": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "bundled": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "are-we-there-yet": { + "version": "3.0.1", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "cacache": { + "version": "16.1.3", + "bundled": true, + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.0.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.0", + "bundled": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "gauge": { + "version": "4.0.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "glob": { + "version": "7.2.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "make-fetch-happen": { + "version": "10.2.1", + "bundled": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-fetch": { + "version": "2.1.2", + "bundled": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "nopt": { + "version": "6.0.0", + "bundled": true, + "requires": { + "abbrev": "^1.0.0" + } + }, + "npmlog": { + "version": "6.0.2", + "bundled": true, + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } + }, + "ssri": { + "version": "9.0.1", + "bundled": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "bundled": true, + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "which": { + "version": "2.0.2", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "nopt": { + "version": "7.0.0", + "bundled": true, + "requires": { + "abbrev": "^2.0.0" + } + }, + "normalize-package-data": { + "version": "5.0.0", + "bundled": true, + "requires": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + } + }, + "npm-audit-report": { + "version": "4.0.0", + "bundled": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "npm-bundled": { + "version": "3.0.0", + "bundled": true, + "requires": { + "npm-normalize-package-bin": "^3.0.0" + } + }, + "npm-install-checks": { + "version": "6.0.0", + "bundled": true, + "requires": { + "semver": "^7.1.1" + } + }, + "npm-normalize-package-bin": { + "version": "3.0.0", + "bundled": true + }, + "npm-package-arg": { + "version": "10.1.0", + "bundled": true, + "requires": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + } + }, + "npm-packlist": { + "version": "7.0.4", + "bundled": true, + "requires": { + "ignore-walk": "^6.0.0" + } + }, + "npm-pick-manifest": { + "version": "8.0.1", + "bundled": true, + "requires": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + } + }, + "npm-profile": { + "version": "7.0.1", + "bundled": true, + "requires": { + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" + } + }, + "npm-registry-fetch": { + "version": "14.0.3", + "bundled": true, + "requires": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.1", + "bundled": true + }, + "npmlog": { + "version": "7.0.1", + "bundled": true, + "requires": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "p-map": { + "version": "4.0.0", + "bundled": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "pacote": { + "version": "15.0.7", + "bundled": true, + "requires": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + } + }, + "parse-conflict-json": { + "version": "3.0.0", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^5.0.1", + "just-diff-apply": "^5.2.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "postcss-selector-parser": { + "version": "6.0.10", + "bundled": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "proc-log": { + "version": "3.0.0", + "bundled": true + }, + "process": { + "version": "0.11.10", + "bundled": true + }, + "promise-all-reject-late": { + "version": "1.0.1", + "bundled": true + }, + "promise-call-limit": { + "version": "1.0.1", + "bundled": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true + }, + "promise-retry": { + "version": "2.0.1", + "bundled": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "requires": { + "read": "1" + } + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "4.0.0", + "bundled": true + }, + "read-package-json": { + "version": "6.0.0", + "bundled": true, + "requires": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "read-package-json-fast": { + "version": "3.0.1", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "retry": { + "version": "0.12.0", + "bundled": true + }, + "rimraf": { + "version": "3.0.2", + "bundled": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "semver": { + "version": "7.3.8", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.7", + "bundled": true + }, + "smart-buffer": { + "version": "4.2.0", + "bundled": true + }, + "socks": { + "version": "2.7.0", + "bundled": true, + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "bundled": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "spdx-correct": { + "version": "3.1.1", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "bundled": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "bundled": true + }, + "ssri": { + "version": "10.0.1", + "bundled": true, + "requires": { + "minipass": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "bundled": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "bundled": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "bundled": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar": { + "version": "6.1.13", + "bundled": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true + }, + "treeverse": { + "version": "3.0.0", + "bundled": true + }, + "unique-filename": { + "version": "3.0.0", + "bundled": true, + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "5.0.0", + "bundled": true, + "requires": { + "builtins": "^5.0.0" + } + }, + "walk-up-path": { + "version": "1.0.0", + "bundled": true + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "3.0.0", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.5", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "5.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true + } + } + } + } +} diff --git a/swa/token/package.json b/swa/token/package.json new file mode 100644 index 0000000..188aaf8 --- /dev/null +++ b/swa/token/package.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "crypto-js": "^4.1.1", + "install": "^0.13.0", + "npm": "^9.2.0" + } +} diff --git a/swa/token/tabs.css b/swa/token/tabs.css new file mode 100644 index 0000000..7e3a09d --- /dev/null +++ b/swa/token/tabs.css @@ -0,0 +1,55 @@ +.tabs { + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; + list-style: none; +} + +.tabs li { + float: left; + margin: 0 -15px 0 0; +} + +.tabs a { + float: left; + position: relative; + padding: 0 40px; + height: 0; + line-height: 30px; + text-transform: uppercase; + text-decoration: none; + color: #fff; + border-right: 30px solid transparent; + border-bottom: 30px solid var(--mainColor); + /*border-bottom-color: #777 \9;*/ + opacity: .3; + filter: alpha(opacity=30); +} + +.tabs a:hover { + border-bottom-color: var(--mainColor); + opacity: 0.5; + filter: alpha(opacity=50); +} + +.tabs a:focus { + outline: 0; +} + +.tabs .current { + z-index: 3; + border-bottom-color: var(--mainColor); + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-content { + background: #fff; + border-top: 2px solid var(--mainColor); + padding: 1rem 0; +} + +.tabs-content h2, #content h3, #content p { + margin: 0 0 15px 0; +} diff --git a/swa/token/tabs.js b/swa/token/tabs.js new file mode 100644 index 0000000..cf7cda7 --- /dev/null +++ b/swa/token/tabs.js @@ -0,0 +1,19 @@ +$(function (){ + + var $e = $(".tabs a").first(); + $e.addClass("current") + showHideBlock( $e ) + + function showHideBlock($e){ + $(".tabs-content .tab").hide() + var block = ".tabs-content .tab" + "." + $e.attr("name") + $(block).show() + } + + + $(".tabs a").click(function (){ + $(".tabs a").removeClass("current") + $(this).addClass("current") + showHideBlock( $(this) ) + }) +}) diff --git a/swa/token/tools.js b/swa/token/tools.js new file mode 100644 index 0000000..9f71943 --- /dev/null +++ b/swa/token/tools.js @@ -0,0 +1,45 @@ +// 覆盖默认行为 +function success(msg){ + layx.notice({ + title: '成功', + type: 'success', + message: msg + }); +} + +// 覆盖默认行为 +function warning(msg){ + layx.notice({ + title: '警告', + type: 'warning', + message: msg + }); +} + +// 覆盖默认行为 +function alert(msg){ + layx.notice({ + title: '错误', + type: 'error', + message: msg + }); +} + +function check(v, re, msg) { + if (!re.test(v)) { + alert("参数校验失败:" + msg) + throw "参数校验失败" + } +} + + +function getyyyyMMdd(){ + var d = new Date(); + var curr_date = d.getDate(); + var curr_month = d.getMonth() + 1; + var curr_year = d.getFullYear(); + String(curr_month).length < 2 ? (curr_month = "0" + curr_month): curr_month; + String(curr_date).length < 2 ? (curr_date = "0" + curr_date): curr_date; + var yyyyMMdd = curr_year + "" + curr_month +""+ curr_date; + return yyyyMMdd; +} diff --git a/swa/u/gmhelper.js b/swa/u/gmhelper.js new file mode 100644 index 0000000..603b095 --- /dev/null +++ b/swa/u/gmhelper.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.gmhelper=e():t.gmhelper=e()}("undefined"!=typeof self?self:this,(function(){return t={10:(t,e,r)=>{const i=r(694),{G:o,curve:n,n:s}=i.generateEcparam(),h=r(664).sm3,u=r(742);function a(t){for(var e="",r=0;r>8&255);const d=h(p);return{z:d,hex:h(i.hexToArray(d+a(t)))}}function l(t){return t=(t=t.substr("-----BEGIN ECDSA PUBLIC KEY-----".length)).substr(0,t.length-"-----END ECDSA PUBLIC KEY-----".length),(t=function(t){for(var e="",r=0;r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,n=u(t),s=n[0],h=n[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,h)),f=0,l=h>0?s-4:s;for(r=0;r>16&255,a[f++]=e>>8&255,a[f++]=255&e;return 2===h&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[f++]=255&e),1===h&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[f++]=e>>8&255,a[f++]=255&e),a},e.fromByteArray=function(t){for(var e,i=t.length,o=i%3,n=[],s=16383,h=0,u=i-o;hu?u:h+s));return 1===o?(e=t[i-1],n.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[i-2]<<8)+t[i-1],n.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),n.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,h=n.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t,e,i){for(var o,n,s=[],h=e;h>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},77:function(t,e){(function(){var e;function r(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function i(){return new r(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,r,i,o,n){for(var s=32767&e,h=e>>15;--n>=0;){var u=32767&this[t],a=this[t++]>>15,f=h*u+a*s;o=((u=s*u+((32767&f)<<15)+r[i]+(1073741823&o))>>>30)+(f>>>15)+h*a+(o>>>30),r[i++]=1073741823&u}return o},e=30):o&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,i,o,n){for(;--n>=0;){var s=e*this[t++]+r[i]+o;o=Math.floor(s/67108864),r[i++]=67108863&s}return o},e=26):(r.prototype.am=function(t,e,r,i,o,n){for(var s=16383&e,h=e>>14;--n>=0;){var u=16383&this[t],a=this[t++]>>14,f=h*u+a*s;o=((u=s*u+((16383&f)<<14)+r[i]+o)>>28)+(f>>14)+h*a,r[i++]=268435455&u}return o},e=28),r.prototype.DB=e,r.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function c(t){this.m=t}function p(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function T(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function F(){}function b(t){return t}function B(t){this.r2=i(),this.q3=i(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}c.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},c.prototype.revert=function(t){return t},c.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},c.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},c.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},p.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},p.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},p.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},p.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var o=t.length,n=!1,s=0;--o>=0;){var h=8==i?255&t[o]:a(t,o);h<0?"-"==t.charAt(o)&&(n=!0):(n=!1,0==s?this[this.t++]=h:s+i>this.DB?(this[this.t-1]|=(h&(1<>this.DB-s):this[this.t-1]|=h<=this.DB&&(s-=this.DB))}8==i&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>o|h,h=(this[r]&n)<=0;--r)e[r]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,o=this.DB-i,n=(1<>i;for(var s=r+1;s>i;i>0&&(e[this.t-r-1]|=(this.s&n)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),o=t.abs(),n=i.t;for(e.t=n+o.t;--n>=0;)e[n]=0;for(n=0;n=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,o){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t0?(n.lShiftTo(f,h),s.lShiftTo(f,o)):(n.copyTo(h),s.copyTo(o));var c=h.t,p=h[c-1];if(0!=p){var g=p*(1<1?h[c-2]>>this.F2:0),d=this.FV/g,m=(1<=0&&(o[o.t++]=1,o.subTo(F,o)),r.ONE.dlShiftTo(c,F),F.subTo(h,h);h.t=0;){var b=o[--v]==p?this.DM:Math.floor(o[v]*d+(o[v-1]+y)*m);if((o[v]+=h.am(0,b,o,T,0,c))0&&o.rShiftTo(f,o),u<0&&r.ZERO.subTo(o,o)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var o=i(),n=i(),s=e.convert(this),h=l(t)-1;for(s.copyTo(o);--h>=0;)if(e.sqrTo(o,n),(t&1<0)e.mulTo(n,s,o);else{var u=o;o=n,n=u}return e.revert(o)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<0)for(h>h)>0&&(o=!0,n=u(r));s>=0;)h>(h+=this.DB-e)):(r=this[s]>>(h-=e)&i,h<=0&&(h+=this.DB,--s)),r>0&&(o=!0),o&&(n+=u(r));return o?n:"0"},r.prototype.negate=function(){var t=i();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=i();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new c(e):new p(e),this.exp(t,r)},r.ZERO=f(0),r.ONE=f(1),F.prototype.convert=b,F.prototype.revert=b,F.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},F.prototype.sqrTo=function(t,e){t.squareTo(e)},B.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},B.prototype.revert=function(t){return t},B.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},B.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var w,x,I,D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/D[D.length-1];function E(){var t;t=(new Date).getTime(),x[I++]^=255&t,x[I++]^=t>>8&255,x[I++]^=t>>16&255,x[I++]^=t>>24&255,I>=M&&(I-=M)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),o=f(r),n=i(),s=i(),h="";for(this.divRemTo(o,n,s);n.signum()>0;)h=(r+s.intValue()).toString(t).substr(1)+h,n.divRemTo(o,n,s);return s.intValue().toString(t)+h},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),o=Math.pow(e,i),n=!1,s=0,h=0,u=0;u=i&&(this.dMultiply(o),this.dAddOffset(h,0),s=0,h=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(h,0)),n&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var o=new Array,n=7&t;o.length=1+(t>>3),e.nextBytes(o),n>0?o[0]&=(1<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var i,o=Math.min(this.t+t.t,e);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(i=r.t-this.t;o=0;)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),o=e.getLowestSetBit();if(o<=0)return!1;var n=e.shiftRight(o);(t=t+1>>1)>D.length&&(t=D.length);for(var s=i(),h=0;h>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,o=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(e[o++]=r|this.s<=0;)i<8?(r=(this[t]&(1<>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==o&&(128&this.s)!=(128&r)&&++o,(o>0||r!=this.s)&&(e[o++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=i();return this.bitwiseTo(t,g,e),e},r.prototype.or=function(t){var e=i();return this.bitwiseTo(t,d,e),e},r.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,m,e),e},r.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,y,e),e},r.prototype.not=function(){for(var t=i(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var d=i();for(o.sqrTo(h[1],d);u<=g;)h[u]=i(),o.mulTo(d,h[u-2],h[u]),u+=2}var m,y,v=t.t-1,T=!0,F=i();for(n=l(t[v])-1;v>=0;){for(n>=a?m=t[v]>>n-a&g:(m=(t[v]&(1<0&&(m|=t[v-1]>>this.DB+n-a)),u=r;0==(1&m);)m>>=1,--u;if((n-=u)<0&&(n+=this.DB,--v),T)h[m].copyTo(s),T=!1;else{for(;u>1;)o.sqrTo(s,F),o.sqrTo(F,s),u-=2;u>0?o.sqrTo(s,F):(y=s,s=F,F=y),o.mulTo(F,h[m],s)}for(;v>=0&&0==(t[v]&1<=0?(i.subTo(o,i),e&&n.subTo(h,n),s.subTo(u,s)):(o.subTo(i,o),e&&h.subTo(n,h),u.subTo(s,u))}return 0!=o.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new F)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var o=e.getLowestSetBit(),n=r.getLowestSetBit();if(n<0)return e;for(o0&&(e.rShiftTo(n,e),r.rShiftTo(n,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return n>0&&r.lShiftTo(n,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=D[D.length-1]){for(e=0;e>>8,x[I++]=255&S;I=0,E()}function R(){if(null==w){for(E(),(w=new O).init(x),I=0;I{t.exports={sm2:r(251),sm3:r(748),sm4:r(810)}},563:(t,e,r)=>{const{BigInteger:i}=r(77);class o{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let e=t.toString(16);return e.length%2==1&&(e="0"+e),t<128?e:(128+e.length/2).toString(16)+e}getValue(){return""}}class n extends o{constructor(t){super(),this.t="02",t&&(this.v=function(t){let e=t.toString(16);if("-"!==e[0])e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{e=e.substr(1);let r=e.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);let o="";for(let t=0;tt.getEncodedHex())).join(""),this.v}}function h(t,e){return+t[e+2]<8?1:128&+t.substr(e+2,2)}function u(t,e){const r=h(t,e),o=t.substr(e+2,2*r);return o?(+o[0]<8?new i(o,16):new i(o.substr(2),16)).intValue():-1}function a(t,e){return e+2*(h(t,e)+1)}t.exports={encodeDer(t,e){const r=new n(t),i=new n(e);return new s([r,i]).getEncodedHex()},decodeDer(t){const e=a(t,0),r=a(t,e),o=u(t,e),n=t.substr(r,2*o),s=r+n.length,h=a(t,s),f=u(t,s),l=t.substr(h,2*f);return{r:new i(n,16),s:new i(l,16)}}}},13:(t,e,r)=>{const{BigInteger:i}=r(77),o=new i("2"),n=new i("3");class s{constructor(t,e){this.x=e,this.q=t}equals(t){return t===this||this.q.equals(t.q)&&this.x.equals(t.x)}toBigInteger(){return this.x}negate(){return new s(this.q,this.x.negate().mod(this.q))}add(t){return new s(this.q,this.x.add(t.toBigInteger()).mod(this.q))}subtract(t){return new s(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}multiply(t){return new s(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}divide(t){return new s(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new s(this.q,this.x.square().mod(this.q))}}class h{constructor(t,e,r,o){this.curve=t,this.x=e,this.y=r,this.z=null==o?i.ONE:o,this.zinv=null}getX(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(t){return t===this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(i.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(i.ZERO))}isInfinity(){return null===this.x&&null===this.y||this.z.equals(i.ZERO)&&!this.y.toBigInteger().equals(i.ZERO)}negate(){return new h(this.curve,this.x,this.y.negate(),this.z)}add(t){if(this.isInfinity())return t;if(t.isInfinity())return this;const e=this.x.toBigInteger(),r=this.y.toBigInteger(),o=this.z,n=t.x.toBigInteger(),s=t.y.toBigInteger(),u=t.z,a=this.curve.q,f=e.multiply(u).mod(a),l=n.multiply(o).mod(a),c=f.subtract(l),p=r.multiply(u).mod(a),g=s.multiply(o).mod(a),d=p.subtract(g);if(i.ZERO.equals(c))return i.ZERO.equals(d)?this.twice():this.curve.infinity;const m=f.add(l),y=o.multiply(u).mod(a),v=c.square().mod(a),T=c.multiply(v).mod(a),F=y.multiply(d.square()).subtract(m.multiply(v)).mod(a),b=c.multiply(F).mod(a),B=d.multiply(v.multiply(f).subtract(F)).subtract(p.multiply(T)).mod(a),w=T.multiply(y).mod(a);return new h(this.curve,this.curve.fromBigInteger(b),this.curve.fromBigInteger(B),w)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const t=this.x.toBigInteger(),e=this.y.toBigInteger(),r=this.z,i=this.curve.q,o=this.curve.a.toBigInteger(),s=t.square().multiply(n).add(o.multiply(r.square())).mod(i),u=e.shiftLeft(1).multiply(r).mod(i),a=e.square().mod(i),f=a.multiply(t).multiply(r).mod(i),l=u.square().mod(i),c=s.square().subtract(f.shiftLeft(3)).mod(i),p=u.multiply(c).mod(i),g=s.multiply(f.shiftLeft(2).subtract(c)).subtract(l.shiftLeft(1).multiply(a)).mod(i),d=u.multiply(l).mod(i);return new h(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(g),d)}multiply(t){if(this.isInfinity())return this;if(!t.signum())return this.curve.infinity;const e=t.multiply(n),r=this.negate();let i=this;for(let o=e.bitLength()-2;o>0;o--){i=i.twice();const n=e.testBit(o);n!==t.testBit(o)&&(i=i.add(n?this:r))}return i}}t.exports={ECPointFp:h,ECCurveFp:class{constructor(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new h(this,null,null)}equals(t){return t===this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}fromBigInteger(t){return new s(this.q,t)}decodePointHex(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:const e=this.fromBigInteger(new i(t.substr(2),16));let r=this.fromBigInteger(e.multiply(e.square()).add(e.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new i("4")).add(i.ONE),this.q));return r.toBigInteger().mod(o).equals(new i(t.substr(0,2),16).subtract(o))||(r=r.negate()),new h(this,e,r);case 4:case 6:case 7:const n=(t.length-2)/2,s=t.substr(2,n),u=t.substr(n+2,n);return new h(this,this.fromBigInteger(new i(s,16)),this.fromBigInteger(new i(u,16)));default:return null}}}}},251:(t,e,r)=>{const{BigInteger:i}=r(77),{encodeDer:o,decodeDer:n}=r(563),s=r(694),h=r(570).sm3,{G:u,curve:a,n:f}=s.generateEcparam();function l(t,e,r="1234567812345678"){r=s.utf8ToHex(r);const i=s.leftPad(u.curve.a.toBigInteger().toRadix(16),64),o=s.leftPad(u.curve.b.toBigInteger().toRadix(16),64),n=s.leftPad(u.getX().toBigInteger().toRadix(16),64),a=s.leftPad(u.getY().toBigInteger().toRadix(16),64);let f,l;if(128===e.length)f=e.substr(0,64),l=e.substr(64,64);else{const t=u.curve.decodePointHex(e);f=s.leftPad(t.getX().toBigInteger().toRadix(16),64),l=s.leftPad(t.getY().toBigInteger().toRadix(16),64)}const c=s.hexToArray(r+i+o+n+a+f+l),p=4*r.length;c.unshift(255&p),c.unshift(p>>8&255);const g=h(c);return s.arrayToHex(h(g.concat(s.hexToArray(t))))}function c(){const t=s.generateKeyPairHex(),e=a.decodePointHex(t.publicKey);return t.k=new i(t.privateKey,16),t.x1=e.getX().toBigInteger(),t}t.exports={generateKeyPairHex:s.generateKeyPairHex,compressPublicKeyHex:s.compressPublicKeyHex,comparePublicKeyHex:s.comparePublicKeyHex,doEncrypt:function(t,e,r=1){t="string"==typeof t?s.hexToArray(s.utf8ToHex(t)):Array.prototype.slice.call(t),e=s.getGlobalCurve().decodePointHex(e);const o=s.generateKeyPairHex(),n=new i(o.privateKey,16);let u=o.publicKey;u.length>128&&(u=u.substr(u.length-128));const a=e.multiply(n),f=s.hexToArray(s.leftPad(a.getX().toBigInteger().toRadix(16),64)),l=s.hexToArray(s.leftPad(a.getY().toBigInteger().toRadix(16),64)),c=s.arrayToHex(h([].concat(f,t,l)));let p=1,g=0,d=[];const m=[].concat(f,l),y=()=>{d=h([...m,p>>24&255,p>>16&255,p>>8&255,255&p]),p++,g=0};y();for(let e=0,r=t.length;e{d=h([...m,p>>24&255,p>>16&255,p>>8&255,255&p]),p++,g=0};y();for(let t=0,e=a.length;t{const e=new Uint32Array(68),r=new Uint32Array(64);function i(t,e){const r=31&e;return t<>>32-r}function o(t,e){const r=[];for(let i=t.length-1;i>=0;i--)r[i]=255&(t[i]^e[i]);return r}function n(t){return t^i(t,9)^i(t,17)}function s(t){let o=8*t.length,s=o%512;s=s>=448?512-s%448-1:448-s-1;const h=new Array((s-7)/8),u=new Array(8);for(let t=0,e=h.length;t=0;t--)if(o.length>8){const e=o.length-8;u[t]=parseInt(o.substr(e),2),o=o.substr(0,e)}else o.length>0&&(u[t]=parseInt(o,2),o="");const a=new Uint8Array([...t,128,...h,...u]),f=new DataView(a.buffer,0),l=a.length/64,c=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let t=0;t=0&&t<=15?s:h,u=i(i(m,12)+F+i(d,t),7),a=u^i(m,12),l=(t>=0&&t<=15?m^y^v:m&y|m&v|y&v)+T+a+r[t],g=(t>=0&&t<=15?F^b^B:F&b|~F&B)+w+u+e[t],T=v,v=i(y,9),y=m,m=l,w=B,B=i(b,19),b=F,F=n(g);c[0]^=m,c[1]^=y,c[2]^=v,c[3]^=T,c[4]^=F,c[5]^=b,c[6]^=B,c[7]^=w}var p;const g=[];for(let t=0,e=c.length;t>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e)}return g}const h=new Uint8Array(64),u=new Uint8Array(64);for(let t=0;t<64;t++)h[t]=54,u[t]=92;t.exports={sm3:s,hmac:function(t,e){for(e.length>64&&(e=s(e));e.length<64;)e.push(0);const r=o(e,h),i=o(e,u),n=s([...r,...t]);return s([...i,...n])}}},694:(t,e,r)=>{const{BigInteger:i,SecureRandom:o}=r(77),{ECCurveFp:n}=r(13),s=new o,{curve:h,G:u,n:a}=f();function f(){const t=new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),e=new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),r=new i("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),o=new n(t,e,r),s=o.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:o,G:s,n:new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function l(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}t.exports={getGlobalCurve:function(){return h},generateEcparam:f,generateKeyPairHex:function(t,e,r){const o=(t?new i(t,e,r):new i(a.bitLength(),s)).mod(a.subtract(i.ONE)).add(i.ONE),n=l(o.toString(16),64),h=u.multiply(o);return{privateKey:n,publicKey:"04"+l(h.getX().toBigInteger().toString(16),64)+l(h.getY().toBigInteger().toString(16),64)}},compressPublicKeyHex:function(t){if(130!==t.length)throw new Error("Invalid public key to compress");const e=(t.length-2)/2,r=t.substr(2,e);let o="03";return new i(t.substr(e+2,e),16).mod(new i("2")).equals(i.ZERO)&&(o="02"),o+r},utf8ToHex:function(t){const e=(t=unescape(encodeURIComponent(t))).length,r=[];for(let i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;const i=[];for(let t=0;t>>2]>>>24-t%4*8&255;i.push((e>>>4).toString(16)),i.push((15&e).toString(16))}return i.join("")},leftPad:l,arrayToHex:function(t){return t.map((t=>1===(t=t.toString(16)).length?"0"+t:t)).join("")},arrayToUtf8:function(t){const e=[];let r=0;for(let i=0;i<2*t.length;i+=2)e[i>>>3]|=parseInt(t[r],10)<<24-i%8*4,r++;try{const r=[];for(let i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(t))}return decodeURIComponent(escape(r.join("")))}catch(t){throw new Error("Malformed UTF-8 data")}},hexToArray:function(t){const e=[];let r=t.length;r%2!=0&&(t=l(t,r+1)),r=t.length;for(let i=0;i{const{sm3:i,hmac:o}=r(570);function n(t){return t.map((t=>1===(t=t.toString(16)).length?"0"+t:t)).join("")}t.exports=function(t,e){if(t="string"==typeof t?function(t){const e=[];for(let r=0,i=t.length;r>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");r++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):Array.prototype.slice.call(t),e){if("hmac"!==(e.mode||"hmac"))throw new Error("invalid mode");let r=e.key;if(!r)throw new Error("invalid key");return r="string"==typeof r?function(t){const e=[];let r=t.length;var i,o;r%2!=0&&(o=r+1,t=(i=t).length>=o?i:new Array(o-i.length+1).join("0")+i),r=t.length;for(let i=0;i{const e=16,r=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],i=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function o(t){const e=[];for(let r=0,i=t.length;r>>32-e}function s(t){return(255&r[t>>>24&255])<<24|(255&r[t>>>16&255])<<16|(255&r[t>>>8&255])<<8|255&r[255&t]}function h(t){return t^n(t,2)^n(t,10)^n(t,18)^n(t,24)}function u(t){return t^n(t,13)^n(t,23)}function a(t,e,r){const i=new Array(4),o=new Array(4);for(let e=0;e<4;e++)o[0]=255&t[4*e],o[1]=255&t[4*e+1],o[2]=255&t[4*e+2],o[3]=255&t[4*e+3],i[e]=o[0]<<24|o[1]<<16|o[2]<<8|o[3];for(let t,e=0;e<32;e+=4)t=i[1]^i[2]^i[3]^r[e+0],i[0]^=h(s(t)),t=i[2]^i[3]^i[0]^r[e+1],i[1]^=h(s(t)),t=i[3]^i[0]^i[1]^r[e+2],i[2]^=h(s(t)),t=i[0]^i[1]^i[2]^r[e+3],i[3]^=h(s(t));for(let t=0;t<16;t+=4)e[t]=i[3-t/4]>>>24&255,e[t+1]=i[3-t/4]>>>16&255,e[t+2]=i[3-t/4]>>>8&255,e[t+3]=255&i[3-t/4]}function f(t,r,n,{padding:h="pkcs#7",mode:f,iv:l=[],output:c="string"}={}){if("cbc"===f&&("string"==typeof l&&(l=o(l)),16!==l.length))throw new Error("iv is invalid");if("string"==typeof r&&(r=o(r)),16!==r.length)throw new Error("key is invalid");if(t="string"==typeof t?0!==n?function(t){const e=[];for(let r=0,i=t.length;r>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");r++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):o(t):[...t],("pkcs#5"===h||"pkcs#7"===h)&&0!==n){const r=e-t.length%e;for(let e=0;e=e;){const r=t.slice(y,y+16),i=new Array(16);if("cbc"===f)for(let t=0;t1===(t=t.toString(16)).length?"0"+t:t)).join(""):function(t){const e=[];for(let r=0,i=t.length;r=240&&t[r]<=247?(e.push(String.fromCodePoint(((7&t[r])<<18)+((63&t[r+1])<<12)+((63&t[r+2])<<6)+(63&t[r+3]))),r+=3):t[r]>=224&&t[r]<=239?(e.push(String.fromCodePoint(((15&t[r])<<12)+((63&t[r+1])<<6)+(63&t[r+2]))),r+=2):t[r]>=192&&t[r]<=223?(e.push(String.fromCodePoint(((31&t[r])<<6)+(63&t[r+1]))),r++):e.push(String.fromCodePoint(t[r]));return e.join("")}(g):g}t.exports={encrypt:(t,e,r)=>f(t,e,1,r),decrypt:(t,e,r)=>f(t,e,0,r)}}},e={},function r(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={exports:{}};return t[i].call(n.exports,n,n.exports,r),n.exports}(10);var t,e})); +//# sourceMappingURL=gmhelper.js.map \ No newline at end of file diff --git a/swa/u/icu.js b/swa/u/icu.js new file mode 100644 index 0000000..4982c4d --- /dev/null +++ b/swa/u/icu.js @@ -0,0 +1,65 @@ +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} + + +function hexToStr(hex,encoding) { + var trimedStr = hex.trim(); + var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr; + var len = rawStr.length; + if (len % 2 !== 0) { + alert("Illegal Format ASCII Code!"); + return ""; + } + var curCharCode; + var resultStr = []; + for (var i = 0; i < len; i = i + 2) { + curCharCode = parseInt(rawStr.substr(i, 2), 16); + resultStr.push(curCharCode); + } + // encoding为空时默认为utf-8 + var bytesView = new Uint8Array(resultStr); + var str = new TextDecoder(encoding).decode(bytesView); + return str; +} + + +/** + * 输入 json 格式的授信信息 + * 返回 hex 格式的登录信息 + */ +function auth( info ){ + var str = ""; + var manufactor = info.manufactor + " "; + manufactor.substr(0, 8); + var system = info.system + " "; + system.substr(0, 8); + var customer = info.customer; + str = manufactor + system + customer + return stringToHex( str ) +} + + + +// 测试 +var test = { + "manufactor": "sunyard", + "system": "hsm", + "customer": "ICBC" +} + +console.log( auth(test) ) + + +console.log("hexToStr=" + hexToStr("73756e796172642068736d202020202049434243", "UTF-8")) + +// 73756e79617264202020202020202068736d202020202020202049434243 +// 73756e796172642068736d202020202049434243 diff --git a/swa/u/index.html b/swa/u/index.html index d92fc11..03ff364 100644 --- a/swa/u/index.html +++ b/swa/u/index.html @@ -50,6 +50,7 @@
+
@@ -72,6 +73,10 @@ 文件操作 +
  • + 签名 +
  • +
  • PIN 管理
  • @@ -129,6 +134,17 @@ > +
    + +
    + + + + + + + +
    @@ -178,6 +194,7 @@ + @@ -404,6 +421,29 @@ }) + $("#btn_sign").click(function () { + var inData = $("#inData").val() + + // 公钥 + var pk = window.UKey.exportPk(); + + var s = window.gmhelper.getHashAsBase64( inData, pk ) + + + + var outData = pk + + outData += "\r\n\r\nz=" + s.z + + outData += "\r\n\r\nhash=" + s.hashHex + + var sign = window.UKey.sign( s.hashBase64 ) + outData += "\r\n\r\nsign=" + sign + + $("#outData").text(outData) + }) + + $("#reset").click(function () { alert("暂不开放") }) diff --git a/swa/u/ukey.js b/swa/u/ukey.js index e57d8d6..41072d0 100644 --- a/swa/u/ukey.js +++ b/swa/u/ukey.js @@ -80,6 +80,8 @@ FISECKEY.FILE_CreateFile(hDevice, DIR, "name", fileSize, 0); + FISECKEY.GenECCKeypair(hDevice, 0, 256, 1); + var data = JSON.stringify(info) writeFile(DIR, "name", data) @@ -291,6 +293,14 @@ FISECKEY.USER_ChangePin(hDevice, 1, oldpin, newpin); } + function exportPk(){ + return FISECKEY.ExportECCKeypair(hDevice, 1); + } + + function sign(vInbuf){ + return FISECKEY.ECCSign(hDevice, 1, 1, vInbuf); + } + root.UKey = { release: release, catRelease : catRelease, @@ -306,6 +316,8 @@ saveLMK : saveLMK, loadLMK : loadLMK, saveAuth : saveAuth, - loadAuth : loadAuth + loadAuth : loadAuth, + exportPk : exportPk, + sign : sign } })( window ) diff --git a/swa/window.html b/swa/window.html index 641236f..7cc3061 100644 --- a/swa/window.html +++ b/swa/window.html @@ -8,7 +8,7 @@ SWA | Fullstack Club - + @@ -37,7 +37,7 @@
    + allowtransparency=”yes” height="100%" style="width: 100%; height: 100%; margin-top: 48px;"> + + diff --git a/www/swa/asn1/jquery-1.8.0.min.js b/www/swa/asn1/jquery-1.8.0.min.js new file mode 100644 index 0000000..066d72c --- /dev/null +++ b/www/swa/asn1/jquery-1.8.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v@1.8.0 jquery.com | jquery.org/license */ +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
    a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
    t
    ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
    ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;jq&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;ai){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="
    ",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="

    ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
    ","
    "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
    ").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/www/swa/cpe/active_cpe_setup.exe b/www/swa/cpe/active_cpe_setup.exe index b0dcbc0..da610f0 100644 Binary files a/www/swa/cpe/active_cpe_setup.exe and b/www/swa/cpe/active_cpe_setup.exe differ diff --git a/www/swa/cross-nav/PIXI.TextInput.min.js b/www/swa/cross-nav/PIXI.TextInput.min.js new file mode 100644 index 0000000..c4dfcc1 --- /dev/null +++ b/www/swa/cross-nav/PIXI.TextInput.min.js @@ -0,0 +1 @@ +!function(t){const e=t.PIXI;t.exportTo[0][t.exportTo[1]]=class extends e.Container{constructor(t){super(),this._input_style=Object.assign({position:"absolute",background:"none",border:"none",outline:"none",transformOrigin:"0 0",lineHeight:"1"},t.input),t.box?this._box_generator="function"==typeof t.box?t.box:new function(t){if((t=t||{fill:13421772}).default)t.focused=t.focused||t.default,t.disabled=t.disabled||t.default;else{let e=t;(t={}).default=t.focused=t.disabled=e}return function(i,s,r){let o=t[r.toLowerCase()],h=new e.Graphics;return o.fill&&h.beginFill(o.fill),o.stroke&&h.lineStyle(o.stroke.width||1,o.stroke.color||0,o.stroke.alpha||1),o.rounded?h.drawRoundedRect(0,0,i,s,o.rounded):h.drawRect(0,0,i,s),h.endFill(),h.closePath(),h}}(t.box):this._box_generator=null,this._input_style.hasOwnProperty("multiline")?(this._multiline=!!this._input_style.multiline,delete this._input_style.multiline):this._multiline=!1,this._box_cache={},this._previous={},this._dom_added=!1,this._dom_visible=!0,this._placeholder="",this._placeholderColor=11119017,this._selection=[0,0],this._restrict_value="",this._createDOMInput(),this.substituteText=!0,this._setState("DEFAULT"),this._addListeners()}get substituteText(){return this._substituted}set substituteText(t){this._substituted!=t&&(this._substituted=t,t?(this._createSurrogate(),this._dom_visible=!1):(this._destroySurrogate(),this._dom_visible=!0),this.placeholder=this._placeholder,this._update())}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this._substituted?(this._updateSurrogate(),this._dom_input.placeholder=""):this._dom_input.placeholder=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._dom_input.disabled=t,this._setState(t?"DISABLED":"DEFAULT")}get maxLength(){return this._max_length}set maxLength(t){this._max_length=t,this._dom_input.setAttribute("maxlength",t)}get restrict(){return this._restrict_regex}set restrict(t){t instanceof RegExp?("^"!==(t=t.toString().slice(1,-1)).charAt(0)&&(t="^"+t),"$"!==t.charAt(t.length-1)&&(t+="$"),t=new RegExp(t)):t=new RegExp("^["+t+"]*$"),this._restrict_regex=t}get text(){return this._dom_input.value}set text(t){this._dom_input.value=t,this._substituted&&this._updateSurrogate()}get htmlInput(){return this._dom_input}focus(){this._substituted&&!this.dom_visible&&this._setDOMInputVisible(!0),this._dom_input.focus()}blur(){this._dom_input.blur()}select(){this.focus(),this._dom_input.select()}setInputStyle(t,e){this._input_style[t]=e,this._dom_input.style[t]=e,!this._substituted||"fontFamily"!==t&&"fontSize"!==t||this._updateFontMetrics(),this._last_renderer&&this._update()}destroy(t){this._destroyBoxCache(),super.destroy(t)}_createDOMInput(){this._multiline?(this._dom_input=document.createElement("textarea"),this._dom_input.style.resize="none"):(this._dom_input=document.createElement("input"),this._dom_input.type="text");for(let t in this._input_style)this._dom_input.style[t]=this._input_style[t]}_addListeners(){this.on("added",this._onAdded.bind(this)),this.on("removed",this._onRemoved.bind(this)),this._dom_input.addEventListener("keydown",this._onInputKeyDown.bind(this)),this._dom_input.addEventListener("input",this._onInputInput.bind(this)),this._dom_input.addEventListener("keyup",this._onInputKeyUp.bind(this)),this._dom_input.addEventListener("focus",this._onFocused.bind(this)),this._dom_input.addEventListener("blur",this._onBlurred.bind(this))}_onInputKeyDown(t){this._selection=[this._dom_input.selectionStart,this._dom_input.selectionEnd],this.emit("keydown",t.keyCode)}_onInputInput(t){this._restrict_regex&&this._applyRestriction(),this._substituted&&this._updateSubstitution(),this.emit("input",this.text)}_onInputKeyUp(t){this.emit("keyup",t.keyCode)}_onFocused(){this._setState("FOCUSED"),this.emit("focus")}_onBlurred(){this._setState("DEFAULT"),this.emit("blur")}_onAdded(){document.body.appendChild(this._dom_input),this._dom_input.style.display="none",this._dom_added=!0}_onRemoved(){document.body.removeChild(this._dom_input),this._dom_added=!1}_setState(t){this.state=t,this._updateBox(),this._substituted&&this._updateSubstitution()}renderWebGL(t){super.renderWebGL(t),this._renderInternal(t)}renderCanvas(t){super.renderCanvas(t),this._renderInternal(t)}render(t){super.render(t),this._renderInternal(t)}_renderInternal(t){this._resolution=t.resolution,this._last_renderer=t,this._canvas_bounds=this._getCanvasBounds(),this._needsUpdate()&&this._update()}_update(){this._updateDOMInput(),this._substituted&&this._updateSurrogate(),this._updateBox()}_updateBox(){this._box_generator&&(this._needsNewBoxCache()&&this._buildBoxCache(),this.state==this._previous.state&&this._box==this._box_cache[this.state]||(this._box&&this.removeChild(this._box),this._box=this._box_cache[this.state],this.addChildAt(this._box,0),this._previous.state=this.state))}_updateSubstitution(){"FOCUSED"===this.state?(this._dom_visible=!0,this._surrogate.visible=0===this.text.length):(this._dom_visible=!1,this._surrogate.visible=!0),this._updateDOMInput(),this._updateSurrogate()}_updateDOMInput(){this._canvas_bounds&&(this._dom_input.style.top=(this._canvas_bounds.top||0)+"px",this._dom_input.style.left=(this._canvas_bounds.left||0)+"px",this._dom_input.style.transform=this._pixiMatrixToCSS(this._getDOMRelativeWorldTransform()),this._dom_input.style.opacity=this.worldAlpha,this._setDOMInputVisible(this.worldVisible&&this._dom_visible),this._previous.canvas_bounds=this._canvas_bounds,this._previous.world_transform=this.worldTransform.clone(),this._previous.world_alpha=this.worldAlpha,this._previous.world_visible=this.worldVisible)}_applyRestriction(){this._restrict_regex.test(this.text)?this._restrict_value=this.text:(this.text=this._restrict_value,this._dom_input.setSelectionRange(this._selection[0],this._selection[1]))}_needsUpdate(){return!this._comparePixiMatrices(this.worldTransform,this._previous.world_transform)||!this._compareClientRects(this._canvas_bounds,this._previous.canvas_bounds)||this.worldAlpha!=this._previous.world_alpha||this.worldVisible!=this._previous.world_visible}_needsNewBoxCache(){let t=this._getDOMInputBounds();return!this._previous.input_bounds||t.width!=this._previous.input_bounds.width||t.height!=this._previous.input_bounds.height}_createSurrogate(){this._surrogate_hitbox=new e.Graphics,this._surrogate_hitbox.alpha=0,this._surrogate_hitbox.interactive=!0,this._surrogate_hitbox.cursor="text",this._surrogate_hitbox.on("pointerdown",this._onSurrogateFocus.bind(this)),this.addChild(this._surrogate_hitbox),this._surrogate_mask=new e.Graphics,this.addChild(this._surrogate_mask),this._surrogate=new e.Text("",{}),this.addChild(this._surrogate),this._surrogate.mask=this._surrogate_mask,this._updateFontMetrics(),this._updateSurrogate()}_updateSurrogate(){let t=this._deriveSurrogatePadding(),e=this._getDOMInputBounds();switch(this._surrogate.style=this._deriveSurrogateStyle(),this._surrogate.style.padding=Math.max.apply(Math,t),this._surrogate.y=this._multiline?t[0]:(e.height-this._surrogate.height)/2,this._surrogate.x=t[3],this._surrogate.text=this._deriveSurrogateText(),this._surrogate.style.align){case"left":this._surrogate.x=t[3];break;case"center":this._surrogate.x=.5*e.width-.5*this._surrogate.width;break;case"right":this._surrogate.x=e.width-t[1]-this._surrogate.width}this._updateSurrogateHitbox(e),this._updateSurrogateMask(e,t)}_updateSurrogateHitbox(t){this._surrogate_hitbox.clear(),this._surrogate_hitbox.beginFill(0),this._surrogate_hitbox.drawRect(0,0,t.width,t.height),this._surrogate_hitbox.endFill(),this._surrogate_hitbox.interactive=!this._disabled}_updateSurrogateMask(t,e){this._surrogate_mask.clear(),this._surrogate_mask.beginFill(0),this._surrogate_mask.drawRect(e[3],0,t.width-e[3]-e[1],t.height),this._surrogate_mask.endFill()}_destroySurrogate(){this._surrogate&&(this.removeChild(this._surrogate),this.removeChild(this._surrogate_hitbox),this._surrogate.destroy(),this._surrogate_hitbox.destroy(),this._surrogate=null,this._surrogate_hitbox=null)}_onSurrogateFocus(){this._setDOMInputVisible(!0),setTimeout(this._ensureFocus.bind(this),10)}_ensureFocus(){this._hasFocus()||this.focus()}_deriveSurrogateStyle(){let t=new e.TextStyle;for(var i in this._input_style)switch(i){case"color":t.fill=this._input_style.color;break;case"fontFamily":case"fontSize":case"fontWeight":case"fontVariant":case"fontStyle":t[i]=this._input_style[i];break;case"letterSpacing":t.letterSpacing=parseFloat(this._input_style.letterSpacing);break;case"textAlign":t.align=this._input_style.textAlign}return this._multiline&&(t.lineHeight=parseFloat(t.fontSize),t.wordWrap=!0,t.wordWrapWidth=this._getDOMInputBounds().width),0===this._dom_input.value.length&&(t.fill=this._placeholderColor),t}_deriveSurrogatePadding(){let t=this._input_style.textIndent?parseFloat(this._input_style.textIndent):0;if(this._input_style.padding&&this._input_style.padding.length>0){let e=this._input_style.padding.trim().split(" ");if(1==e.length){let i=parseFloat(e[0]);return[i,i,i,i+t]}if(2==e.length){let i=parseFloat(e[0]),s=parseFloat(e[1]);return[i,s,i,s+t]}if(4==e.length){let i=e.map((t=>parseFloat(t)));return i[3]+=t,i}}return[0,0,0,t]}_deriveSurrogateText(){return 0===this._dom_input.value.length?this._placeholder:"password"==this._dom_input.type?"•".repeat(this._dom_input.value.length):this._dom_input.value}_updateFontMetrics(){const t=this._deriveSurrogateStyle().toFontString();this._font_metrics=e.TextMetrics.measureFont(t)}_buildBoxCache(){this._destroyBoxCache();let t=["DEFAULT","FOCUSED","DISABLED"],e=this._getDOMInputBounds();for(let i in t)this._box_cache[t[i]]=this._box_generator(e.width,e.height,t[i]);this._previous.input_bounds=e}_destroyBoxCache(){this._box&&(this.removeChild(this._box),this._box=null);for(let t in this._box_cache)this._box_cache[t].destroy(),this._box_cache[t]=null,delete this._box_cache[t]}_hasFocus(){return document.activeElement===this._dom_input}_setDOMInputVisible(t){this._dom_input.style.display=t?"block":"none"}_getCanvasBounds(){let t=this._last_renderer.view.getBoundingClientRect(),e={top:t.top,left:t.left,width:t.width,height:t.height};return e.left+=window.scrollX,e.top+=window.scrollY,e}_getDOMInputBounds(){let t=!1;this._dom_added||(document.body.appendChild(this._dom_input),t=!0);let e=this._dom_input.style.transform,i=this._dom_input.style.display;this._dom_input.style.transform="",this._dom_input.style.display="block";let s=this._dom_input.getBoundingClientRect();return this._dom_input.style.transform=e,this._dom_input.style.display=i,t&&document.body.removeChild(this._dom_input),s}_getDOMRelativeWorldTransform(){let t=this._last_renderer.view.getBoundingClientRect(),e=this.worldTransform.clone();return e.scale(this._resolution,this._resolution),e.scale(t.width/this._last_renderer.width,t.height/this._last_renderer.height),e}_pixiMatrixToCSS(t){return"matrix("+[t.a,t.b,t.c,t.d,t.tx,t.ty].join(",")+")"}_comparePixiMatrices(t,e){return!(!t||!e)&&t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d&&t.tx==e.tx&&t.ty==e.ty}_compareClientRects(t,e){return!(!t||!e)&&t.left==e.left&&t.top==e.top&&t.width==e.width&&t.height==e.height}}}("object"==typeof PIXI?{PIXI,exportTo:[PIXI,"TextInput"]}:"object"==typeof module?{PIXI:require("pixi.js"),exportTo:[module,"exports"]}:console.warn("[PIXI.TextInput] could not attach to PIXI namespace. Make sure to include this plugin after pixi.js")||{}); \ No newline at end of file diff --git a/www/swa/cross-nav/color.html b/www/swa/cross-nav/color.html new file mode 100644 index 0000000..1310bf4 --- /dev/null +++ b/www/swa/cross-nav/color.html @@ -0,0 +1,17 @@ + + + + + Title + + + + + + diff --git a/www/swa/cross-nav/index.html b/www/swa/cross-nav/index.html index 54d8a13..dadba4c 100644 --- a/www/swa/cross-nav/index.html +++ b/www/swa/cross-nav/index.html @@ -61,6 +61,18 @@ + +
    a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
    "+""+"
    ",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
    t
    ",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
    ",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/www/swa/fmtconv/test.js b/www/swa/fmtconv/test.js new file mode 100644 index 0000000..f65f786 --- /dev/null +++ b/www/swa/fmtconv/test.js @@ -0,0 +1,37 @@ +const tool = require("./tool") + +const str1 = "722 黄谦 cheney"; +const str2 = "MIIBygYJKoZIhvcNAQcDoIIBuzCCAbcCAQAxggFLMIIBRwIBADAvMCMxCzAJBgNVBAYTAmNuMRQwEgYDVQQKEwtQQkMgVEVTVCBDQQIIE6NthajbntAwDQYJKoZIhvcNAQEBBQAEggEAfpqiXGzxULaCOJIPqRKFAsk/21WIg+NnrkgP/18OxSr68vnpLXKB2aDsyntX9RkwDVc/VwD7nrAq9l0xZPndrYQS2h8ayFfFUan7L5MtOvxS4Pt5+o84DE00+3axfkAr2v7I79tWFmAc0sipn+nQcJzoy0owknfG41hMauMrPI9jdtb1ZcUWLH0bMQ3VeYJJi8RSFYqirpc+RM3sOqwIvBthDcMdnH4XoUx4FKSdnpUd5wHd8Q1cEleVA1PAuEtim2ivjJ8450Y/08pURDOWcmabvX/f4mMp9437uigaC4qShRilyX3/Dt3xhdjq6ImKGxwLUqAaIM6DtHub08S0OTBjBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECP6Q/L2a03NMgECXtfqTp+J8JJGL9mNjf51jMe+C4E02q6UQtImLqmvnBEXCnkDLKOBIvOO7ADrlRDN73cma0865Qp1QXP2PT7ez" +const hex2 = "308201ca06092a864886f70d010703a08201bb308201b70201003182014b30820147020100302f3023310b300906035504061302636e31143012060355040a130b5042432054455354204341020813a36d85a8db9ed0300d06092a864886f70d0101010500048201007e9aa25c6cf150b68238920fa9128502c93fdb558883e367ae480fff5f0ec52afaf2f9e92d7281d9a0ecca7b57f519300d573f5700fb9eb02af65d3164f9ddad8412da1f1ac857c551a9fb2f932d3afc52e0fb79fa8f380c4d34fb76b17e402bdafec8efdb5616601cd2c8a99fe9d0709ce8cb4a309277c6e3584c6ae32b3c8f6376d6f565c5162c7d1b310dd57982498bc452158aa2ae973e44cdec3aac08bc1b610dc31d9c7e17a14c7814a49d9e951de701ddf10d5c1257950353c0b84b629b68af8c9f38e7463fd3ca5444339672669bbd7fdfe26329f78dfbba281a0b8a928518a5c97dff0eddf185d8eae8898a1b1c0b52a01a20ce83b47b9bd3c4b439306306092a864886f70d010701301406082a864886f70d03070408fe90fcbd9ad3734c804097b5fa93a7e27c24918bf663637f9d6331ef82e04d36aba510b4898baa6be70445c29e40cb28e048bce3bb003ae544337bddc99ad3ceb9429d505cfd8f4fb7b3" +const str3 = "722 cheney"; + + +const ret2 = tool.base64ToHex( str2 ) +console.log("hex=" + ret2) +console.assert( ret2 === hex2, "base64ToHex 转换失败" ); + +const ret22 = tool.hexToBase64( ret2 ) +console.assert( str2 === ret22, "base64 hex 转换失败" ); + + +const base64 = tool.utf8ToBase64(str1) +const ret3 = tool.base64ToHex( base64 ) +console.log("base64ToHex hex=" + ret3 ) +const ret32 = tool.hexToBase64( ret3 ) +console.assert( ret32 === base64, "base64 hex 中文 转换失败" ); + + +var ret11 = tool.utf8ToBase64(str1) +console.log("hex=" + ret11 ) + +var ret12 = tool.base64ToUtf8(ret11) +console.log("ret12=" + ret12) +console.assert( str1 === ret12, "base64 String 中文转换失败" ); + + +var ret4 = tool.utf8ToHex(str1); +var ret41 = tool.hexToUtf8(ret4); +console.assert( str1 === ret41, "hex String 中文转换失败" ); + + + diff --git a/www/swa/fmtconv/tool.js b/www/swa/fmtconv/tool.js new file mode 100644 index 0000000..891b9d6 --- /dev/null +++ b/www/swa/fmtconv/tool.js @@ -0,0 +1,551 @@ +var codePoint2utf8 = function (code) { + var bin = parseInt(code).toString(2) + var ln = 0; + var mx = 0; + if (bin.length <= 7) { + ln = 1; + mx = 7; + } else if (bin.length > 7 && bin.length <= 11) { + ln = 2; + mx = 11; + } else if (bin.length > 11 && bin.length <= 16) { + ln = 3; + mx = 16; + } else if (bin.length > 16 && bin.length <= 21) { + ln = 4; + mx = 21; + } else if (bin.length > 21 && bin.length <= 26) { + ln = 5; + mx = 26; + } else if (bin.length > 26 && bin.length <= 31) { + ln = 6; + mx = 31; + }; + var longbin = ("0".repeat(mx) + bin).slice(-mx) + var result = ''; + for (var i = 0; i < ln; i++) { + if (ln != 1) { + if (i == 0) { + result += parseInt("1".repeat(ln) + "0" + longbin.slice(0,7-ln),2).toString(16); + longbin = longbin.slice(7-ln); + } else { + result += parseInt("10" + longbin.slice(0,6),2).toString(16); + longbin = longbin.slice(6); + }; + } else { + result += ("00" + parseInt(longbin,2).toString(16)).slice(-2); + }; + }; + return result; +}; + +var stringToHex = function (inputstring) { + var result = ''; + for (var i = 0; i < inputstring.length; i++) { + result += codePoint2utf8(inputstring.codePointAt(i)) + }; + return result; +}; + +var hexToString = function (inputstring) { + try { + var result = decodeURIComponent(inputstring.toLowerCase().replace(/\s+/g, '').replace(/[0-9a-f]{2}/g, '%$&')); + } catch(e) { + throw "Not valid UTF-8 hex code!"; + }; + return result; +}; + + +function stringToByte(str) { + var bytes = new Array(); + var len, c; + len = str.length; + for(var i = 0; i < len; i++) { + c = str.charCodeAt(i); + if(c >= 0x010000 && c <= 0x10FFFF) { + bytes.push(((c >> 18) & 0x07) | 0xF0); + bytes.push(((c >> 12) & 0x3F) | 0x80); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if(c >= 0x000800 && c <= 0x00FFFF) { + bytes.push(((c >> 12) & 0x0F) | 0xE0); + bytes.push(((c >> 6) & 0x3F) | 0x80); + bytes.push((c & 0x3F) | 0x80); + } else if(c >= 0x000080 && c <= 0x0007FF) { + bytes.push(((c >> 6) & 0x1F) | 0xC0); + bytes.push((c & 0x3F) | 0x80); + } else { + bytes.push(c & 0xFF); + } + } + return bytes; + + +} +// utf8 +function byteToString(arr) { + if(typeof arr === 'string') { + return arr; + } + var str = '', + _arr = arr; + for(var i = 0; i < _arr.length; i++) { + var one = _arr[i].toString(2), + v = one.match(/^1+?(?=0)/); + if(v && one.length == 8) { + var bytesLength = v[0].length; + var store = _arr[i].toString(2).slice(7 - bytesLength); + for(var st = 1; st < bytesLength; st++) { + store += _arr[st + i].toString(2).slice(2); + } + str += String.fromCharCode(parseInt(store, 2)); + i += bytesLength - 1; + } else { + str += String.fromCharCode(_arr[i]); + } + } + return str; +} +/** + * Convert the given string to byte array + * + * @param {string} str the string to be converted to byte array + * @returns {number[]} + */ +var str2bytes = function (str) { + var i = 0; + var ch = null; + var hex = null; + var encoded = encodeURIComponent(str); + var length = encoded.length; + var bytes = []; + + while (i < length) { + ch = encoded.charAt(i++); + if (ch === '%') { + hex = encoded.charAt(i++) + hex += encoded.charAt(i++); + bytes.push(parseInt(hex, 16)); + } else { + bytes.push(ch.charCodeAt(0)); + } + } + + return bytes; +}; + +/** + * Convert the given byte array to string + * + * @param {number[]} bytes The byte array to be converted to string + * @returns {string} + */ +var bytes2str = function (bytes) { + var i = 0; + var hex = null; + var byte = 0; + var hexArray = []; + var length = bytes.length; + + while (i < length) { + byte = bytes[i++]; + hex = byte.toString(16); + hex = hex.length < 2 ? ('%0' + hex) : ('%' + hex); + hexArray.push(hex); + } + + return decodeURIComponent(hexArray.join('')); +}; +function base64ArrayBuffer(arrayBuffer) { + var base64 = '' + var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + + var bytes = new Uint8Array(arrayBuffer) + var byteLength = bytes.byteLength + var byteRemainder = byteLength % 3 + var mainLength = byteLength - byteRemainder + + var a, b, c, d + var chunk + + // Main loop deals with bytes in chunks of 3 + for (var i = 0; i < mainLength; i = i + 3) { + // Combine the three bytes into a single integer + chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2] + + // Use bitmasks to extract 6-bit segments from the triplet + a = (chunk & 16515072) >> 18 // 16515072 = (2^6 - 1) << 18 + b = (chunk & 258048) >> 12 // 258048 = (2^6 - 1) << 12 + c = (chunk & 4032) >> 6 // 4032 = (2^6 - 1) << 6 + d = chunk & 63 // 63 = 2^6 - 1 + + // Convert the raw binary segments to the appropriate ASCII encoding + base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d] + } + + // Deal with the remaining bytes and padding + if (byteRemainder == 1) { + chunk = bytes[mainLength] + + a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2 + + // Set the 4 least significant bits to zero + b = (chunk & 3) << 4 // 3 = 2^2 - 1 + + base64 += encodings[a] + encodings[b] + '==' + } else if (byteRemainder == 2) { + chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1] + + a = (chunk & 64512) >> 10 // 64512 = (2^6 - 1) << 10 + b = (chunk & 1008) >> 4 // 1008 = (2^6 - 1) << 4 + + // Set the 2 least significant bits to zero + c = (chunk & 15) << 2 // 15 = 2^4 - 1 + + base64 += encodings[a] + encodings[b] + encodings[c] + '=' + } + + return base64 +} + +(function() { + var base64EncodeChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + base64DecodeChars = new Array(( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 62, ( - 1), ( - 1), ( - 1), 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1)); + this.base64encode = function(e) { + var r, a, c, h, o, t; + for (c = e.length, a = 0, r = ''; a < c;) { + if (h = 255 & e.charCodeAt(a++), a == c) { + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4), + r += '=='; + break + } + if (o = e.charCodeAt(a++), a == c) { + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4), + r += base64EncodeChars.charAt((15 & o) << 2), + r += '='; + break + } + t = e.charCodeAt(a++), + r += base64EncodeChars.charAt(h >> 2), + r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4), + r += base64EncodeChars.charAt((15 & o) << 2 | (192 & t) >> 6), + r += base64EncodeChars.charAt(63 & t) + } + return r + } + this.base64decode = function(e) { + var r, a, c, h, o, t, d; + for (t = e.length, o = 0, d = ''; o < t;) { + do r = base64DecodeChars[255 & e.charCodeAt(o++)]; + while (o < t && r == -1); + if (r == -1) break; + do a = base64DecodeChars[255 & e.charCodeAt(o++)]; + while (o < t && a == -1); + if (a == -1) break; + d += String.fromCharCode(r << 2 | (48 & a) >> 4); + do { + if (c = 255 & e.charCodeAt(o++), 61 == c) return d; + c = base64DecodeChars[c] + } while ( o < t && c == - 1 ); + if (c == -1) break; + d += String.fromCharCode((15 & a) << 4 | (60 & c) >> 2); + do { + if (h = 255 & e.charCodeAt(o++), 61 == h) return d; + h = base64DecodeChars[h] + } while ( o < t && h == - 1 ); + if (h == -1) break; + d += String.fromCharCode((3 & c) << 6 | h) + } + return d + } + this.HexToBase64 = function(str) { + return base64encode(String.fromCharCode.apply(null, str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" "))); + } + this.Base64Tohex = function(str) { + for (var i = 0, + bin = base64decode(str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) { + var tmp = bin.charCodeAt(i).toString(16); + if (tmp.length === 1) tmp = "0" + tmp; + hex[hex.length] = tmp; + } + return hex.join(""); + }, + this.toBytes = function(str) { + for (var bytes = [], c = 0; c < str.length; c += 2) + bytes.push(parseInt(str.substr(c, 2), 16)); + return bytes; + } + +}) (); +//hexToBase64 Base64Tohex base64decode base64encode + +var bytesToString = function(bytes){ + return hexToString(bytesToHex(bytes)); +} + + +var bytesToBase64 = function(bytes){ + return base64ArrayBuffer(bytes); +} + +// Convert a byte array to a hex string +var bytesToHex = function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(""); +} + + +var stringToBase64 = function(str){ + return base64encode(str); +} + +var stringToBytes = function(str){ + return hexToBytes(stringToHex(str)); +} + +// Convert a ASCII string to a hex string +var stringToHex = function(str) { + return str.split("").map(function(c) { + return ("0" + c.charCodeAt(0).toString(16)).slice(-2); + }).join(""); +} + +var hexToBytes= function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; +} + +// Convert a hex string to a ASCII string +var hexToString = function(hexStr) { + var hex = hexStr.toString();//force conversion + var str = ''; + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + return str; +} + +var hexToBase64 = function(hexStr){ + return HexToBase64(hexStr); +} + +var base64ToString = function(base64str){ + return base64decode(base64str); +} + + +const Base64 = { + _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + encode: function(e) { + var t = ""; + var n, r, i, s, o, u, a; + var f = 0; + e = Base64._utf8_encode(e); + while (f < e.length) { + n = e.charCodeAt(f++); + r = e.charCodeAt(f++); + i = e.charCodeAt(f++); + s = n >> 2; + o = (n & 3) << 4 | r >> 4; + u = (r & 15) << 2 | i >> 6; + a = i & 63; + if (isNaN(r)) { + u = a = 64 + } else if (isNaN(i)) { + a = 64 + } + t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a) + } + return t + }, + decode: function(e) { + var t = ""; + var n, r, i; + var s, o, u, a; + var f = 0; + e = e.replace(/[^A-Za-z0-9+/=]/g, ""); + while (f < e.length) { + s = this._keyStr.indexOf(e.charAt(f++)); + o = this._keyStr.indexOf(e.charAt(f++)); + u = this._keyStr.indexOf(e.charAt(f++)); + a = this._keyStr.indexOf(e.charAt(f++)); + n = s << 2 | o >> 4; + r = (o & 15) << 4 | u >> 2; + i = (u & 3) << 6 | a; + t = t + String.fromCharCode(n); + if (u != 64) { + t = t + String.fromCharCode(r) + } + if (a != 64) { + t = t + String.fromCharCode(i) + } + } + t = Base64._utf8_decode(t); + return t + }, + _utf8_encode: function(e) { + e = e.replace(/rn/g, "n"); + var t = ""; + for (var n = 0; n < e.length; n++) { + var r = e.charCodeAt(n); + if (r < 128) { + t += String.fromCharCode(r) + } else if (r > 127 && r < 2048) { + t += String.fromCharCode(r >> 6 | 192); + t += String.fromCharCode(r & 63 | 128) + } else { + t += String.fromCharCode(r >> 12 | 224); + t += String.fromCharCode(r >> 6 & 63 | 128); + t += String.fromCharCode(r & 63 | 128) + } + } + return t + }, + _utf8_decode: function(e) { + var t = ""; + var n = 0; + var r = 0; + var c1 =0; + var c2 =0; + var c3 =0; + while (n < e.length) { + r = e.charCodeAt(n); + if (r < 128) { + t += String.fromCharCode(r); + n++ + } else if (r > 191 && r < 224) { + c2 = e.charCodeAt(n + 1); + t += String.fromCharCode((r & 31) << 6 | c2 & 63); + n += 2 + } else { + c2 = e.charCodeAt(n + 1); + c3 = e.charCodeAt(n + 2); + t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63); + n += 3 + } + } + return t + } +} + +function encodeUtf8(text) { + const code = encodeURIComponent(text); + const bytes = []; + for (var i = 0; i < code.length; i++) { + const c = code.charAt(i); + if (c === '%') { + const hex = code.charAt(i + 1) + code.charAt(i + 2); + const hexVal = parseInt(hex, 16); + bytes.push(hexVal); + i += 2; + } else bytes.push(c.charCodeAt(0)); + } + return bytes; +} + +function decodeUtf8(bytes) { + var encoded = ""; + for (var i = 0; i < bytes.length; i++) { + encoded += '%' + bytes[i].toString(16); + } + return decodeURIComponent(encoded); +} +function strToBytesUTF8(str) { + let utf8 = []; + for (let i = 0; i < str.length; i++) { + let charcode = str.charCodeAt(i); + if (charcode < 0x80) utf8.push(charcode); + else if (charcode < 0x800) { + utf8.push(0xc0 | (charcode >> 6), + 0x80 | (charcode & 0x3f)); + } + else if (charcode < 0xd800 || charcode >= 0xe000) { + utf8.push(0xe0 | (charcode >> 12), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + // surrogate pair + else { + i++; + // UTF-16 encodes 0x10000-0x10FFFF by + // subtracting 0x10000 and splitting the + // 20 bits of 0x0-0xFFFFF into two halves + charcode = 0x10000 + (((charcode & 0x3ff)<<10) + | (str.charCodeAt(i) & 0x3ff)); + utf8.push(0xf0 | (charcode >>18), + 0x80 | ((charcode>>12) & 0x3f), + 0x80 | ((charcode>>6) & 0x3f), + 0x80 | (charcode & 0x3f)); + } + } + return utf8; +} + +function utf8ToBase64(str){ + var ret11 = strToBytesUTF8( str ) + return bytesToBase64( ret11 ) +} + +function base64ToUtf8( str ){ + var hex = base64ToHex( str ); + var ret = hexToBytes( hex ) + // var ret = base64ToBytes( str ) + return decodeUtf8(ret); +} + +var base64ToHex = function(base64str){ + return Base64Tohex(base64str); +} + +var base64ToBytes = function(base64str){ + return toBytes(base64str); + //null +} +var utf8ToHex = function (str) { + var ret11 = strToBytesUTF8( str ) + return bytesToHex( ret11 ) +} + +var hexToUtf8 = function (hex) { + var ret = hexToBytes( hex ) + // var ret = base64ToBytes( str ) + return decodeUtf8(ret); +} + +if ( module ) { + + module.exports = { + + stringToByte, + byteToString, + str2bytes, + bytes2str, + base64ArrayBuffer, + bytesToString, + bytesToBase64, + bytesToHex, + stringToBase64, + stringToBytes, + stringToHex, + hexToBytes, + hexToString, + hexToBase64, + base64ToString, + base64ToHex, + base64ToBytes, + Base64, + encodeUtf8, + decodeUtf8, + strToBytesUTF8, + utf8ToBase64, + base64ToUtf8, + utf8ToHex, + hexToUtf8 + } +} diff --git a/www/swa/ic/index.html b/www/swa/ic/index.html index 1100a85..f8bc106 100644 --- a/www/swa/ic/index.html +++ b/www/swa/ic/index.html @@ -366,12 +366,30 @@ } var path2 = $("#path2").val(); - check(path2, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串填充错误") + check(path2, /^([A-Fa-f0-9][A-Fa-f0-9]){4}$/g, "特征字串2填充错误") + + var path3 = $("#path3").val(); + check(path3, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串3填充错误") + + var path4 = $("#path4").val(); + check(path4, /^([A-Fa-f0-9][A-Fa-f0-9]){4}$/g, "特征字串4填充错误") + + var path5 = $("#path5").val(); + check(path5, /^([A-Fa-f0-9][A-Fa-f0-9]){16}$/g, "特征字串5填充错误") ic.writeHex(0x20, path1) .then(function (def){ return ic.writeHex(0x30, path2) }) + .then(function (def){ + return ic.writeHex(0x40, path3) + }) + .then(function (def){ + return ic.writeHex(0x50, path4) + }) + .then(function (def){ + return ic.writeHex(0x60, path5) + }) .then(function (def){ success("写入成功") }) diff --git a/www/swa/ic/mac.js b/www/swa/ic/mac.js index 2ba750e..e375c98 100644 --- a/www/swa/ic/mac.js +++ b/www/swa/ic/mac.js @@ -83,22 +83,24 @@ function bytesToHex(bytes) { -const DES = require('./jssrc/des.js') -var des = new DES(); -var key = hexToBytes("12345678123456781234567812345678") -var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); -console.log( ret ) - -des = new DES(); -key = hexToBytes("12345678123456781234567812345670") -ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); -console.log( ret ) -// -// -// const sm4 = require('./jssrc/sm4.js') -// ret = sm4.SM4CryptECB("000000000000000011", 1 , "12345678123456781234567812345678") +// const DES = require('./jssrc/des.js') +// var des = new DES(); +// var key = hexToBytes("12345678123456781234567812345678") +// var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); // console.log( ret ) // +// des = new DES(); +// key = hexToBytes("12345678123456781234567812345670") +// ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// + + +const sm4 = require('./jssrc/sm4.js') +var ret = sm4.SM4CryptECB("00000000000000000000000000000000", 1 , "11111111111111111111111111111111") +console.log( ret ) + diff --git a/www/swa/keycodes/index.html b/www/swa/keycodes/index.html index a1f20d8..5bf6a41 100644 --- a/www/swa/keycodes/index.html +++ b/www/swa/keycodes/index.html @@ -5,7 +5,7 @@ JavaScript Event KeyCodes - + diff --git a/www/swa/token/.gitignore b/www/swa/token/.gitignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/www/swa/token/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/www/swa/token/active.ic.min.js b/www/swa/token/active.ic.min.js new file mode 100644 index 0000000..d982732 --- /dev/null +++ b/www/swa/token/active.ic.min.js @@ -0,0 +1,226 @@ +function check(v, re, msg) { + if (!re.test(v)) { + alert(msg) + } +} + +function padPkcs7(data) { + + var d = data.length % 16; + d = 16 - d; + var arr = Array.from(data) + for (var i = 0; i < d; i++) { + arr.push(d) + } + return arr; +} + +function stripPcks7(data) { + var arr = Array.from(data) + var padder = arr[arr.length - 1]; + return arr.slice(0, arr.length - padder); +} + +function ecb(bytes, cb) { + var ret = [] + for (var i = 0; i < bytes.length; i += 16) { + var d = bytes.slice(i, i + 16); + var en = cb(d) + ret = ret.concat(Array.from(en)) + } + return ret; +} + + +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} + +function hexToString(hex){ + var arr = hex.split("") + var out = "" + for (var i = 0; i < arr.length / 2; i++) { + var tmp = "0x" + arr[i * 2] + arr[i * 2 + 1] + var charValue = String.fromCharCode(tmp); + out += charValue + } + return out +} + +class ActiveIC { + constructor() { + this.server = "ws://127.0.0.1:12322/active"; + this.waitMap = {} + + } + + __debug(...str) { + if (window.active_debug) { + console.log(...str) + } + } + + connect() { + this.__debug("connect") + var _this = this; + try { + + if (this.sock) { + this.sock.onclose = function () { + } + this.sock.close() + } + + this.sock = new WebSocket(this.server); + this.__debug("sock") + this.sock.onopen = function () { + _this.__debug("open"); + _this.sock.isopened = true; + _this.sock.onmessage = function (e) { + _this.__debug(e.data) + var ret = JSON.parse(e.data); + + var cb = _this.waitMap[ret.id] + cb && cb(ret) + } + }; + + this.sock.onclose = function () { + _this.sock.isopened = false; + _this.__debug("close"); + _this.reconnect(); + }; + + // this.sock.onerror = function () { + // _this.sock.isopened = false; + // this.__debug("onerror"); + // _this.reconnect(); + // }; + + } catch (e) { + _this.__debug("onerror"); + _this.reconnect(); + } + + } + + reconnect() { + this.__debug("reconnect") + var _this = this; + + if (_this.sock && _this.sock.isopened) { + this.__debug("miss") + return + } + + setTimeout(function () { + _this.connect(); + }, 3000); + } + + __send(cmd, param, cb) { + var id = (Math.random() + "").substr(2); + this.sock.send( + JSON.stringify({ + id: id, + cmd: cmd, + param: param + }) + ); + if (cb) { + this.waitMap[id] = cb; + } + } + + __check(v, re, msg, reject) { + if (!re.test(v)) { + reject && reject({ + msg, + code: "C0" + }) + } + } + + readText(addr, len) { + var _this = this; + return new Promise(function (resolve, reject) { + + if (!_this.sock || !_this.sock.isopened) { + reject({ + code: "CB", + msg: "Active 通信失败" + }) + } + + _this.__check(addr, /\d{1,2}/g, "用户编号填写错误!", reject); + _this.__check(len, /\d{1,2}/g, "用户类型填写错误!", reject); + + _this.__send("read", { + addr, len + }, function (ret) { + if (ret.code === "00") { + resolve(ret) + } else { + reject(ret) + } + }) + }) + } + writeText(addr, data) { + return this.writeHex(addr, stringToHex( data )) + } + writeHex(addr, data) { + var _this = this; + return new Promise(function (resolve, reject) { + + if (!_this.sock || !_this.sock.isopened) { + reject({ + code: "CB", + msg: "Active 通信失败" + }) + } + + + _this.__check(addr, /\d{1,2}/g, "地址填写错误!", reject); + _this.__check(data, /^([A-Fa-f0-9][A-Fa-f0-9])+$/g, "数据填写错误!", reject); + + _this.__send("write", { + addr, data + }, function (ret) { + if (ret.code === "00") { + resolve(ret) + } else { + reject(ret) + } + }) + }) + } + +} + + +/** + * 检测通过返回 true + * 检测不通过返回 fase + */ +ActiveIC.checkSupport = function () { + try { + if (!!window.WebSocket && window.WebSocket.prototype.send) { + return true; + } else { + console.error("您的浏览器不支持!") + return false; + } + } catch (e) { + console.error("当前环境不支持!", e) + return false; + } +} diff --git a/www/swa/token/active_ic_setup.exe b/www/swa/token/active_ic_setup.exe new file mode 100644 index 0000000..ea81e25 Binary files /dev/null and b/www/swa/token/active_ic_setup.exe differ diff --git a/www/swa/token/des.js b/www/swa/token/des.js new file mode 100644 index 0000000..eb611aa --- /dev/null +++ b/www/swa/token/des.js @@ -0,0 +1,851 @@ +/** + * DES加密/解密 + * @Copyright Copyright (c) 2006 + * @author Guapo + * @see DESCore + */ +/* +* encrypt the string to string made up of hex +* return the encrypted string +*/ +var defaultKey="app@@server"; +function desEnc(data){ + return strEnc(data,defaultKey); +} +function desDec(data){ + return strDec(data,defaultKey); +} + + +function strEnc(data,firstKey,secondKey,thirdKey){ + var leng = data.length; + var encData = ""; + var firstKeyBt,secondKeyBt,thirdKeyBt,firstLength,secondLength,thirdLength; + if(firstKey != null && firstKey != ""){ + firstKeyBt = getKeyBytes(firstKey); + firstLength = firstKeyBt.length; + } + if(secondKey != null && secondKey != ""){ + secondKeyBt = getKeyBytes(secondKey); + secondLength = secondKeyBt.length; + } + if(thirdKey != null && thirdKey != ""){ + thirdKeyBt = getKeyBytes(thirdKey); + thirdLength = thirdKeyBt.length; + } + + if(leng > 0){ + if(leng < 4){ + var bt = strToBt(data); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x = 0; + tempBt = bt; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData = bt64ToHex(encByte); + }else{ + var iterator = parseInt(leng/4); + var remainder = leng%4; + var i=0; + for(i = 0;i < iterator;i++){ + var tempData = data.substring(i*4+0,i*4+4); + var tempByte = strToBt(tempData); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData += bt64ToHex(encByte); + } + if(remainder > 0){ + var remainderData = data.substring(iterator*4+0,leng); + var tempByte = strToBt(remainderData); + var encByte ; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + for(z = 0;z < thirdLength ;z ++){ + tempBt = enc(tempBt,thirdKeyBt[z]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + for(y = 0;y < secondLength ;y ++){ + tempBt = enc(tempBt,secondKeyBt[y]); + } + encByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x; + tempBt = tempByte; + for(x = 0;x < firstLength ;x ++){ + tempBt = enc(tempBt,firstKeyBt[x]); + } + encByte = tempBt; + } + } + } + encData += bt64ToHex(encByte); + } + } + } + return encData; +} +/* +* decrypt the encrypted string to the original string +* +* return the original string +*/ +function strDec(data,firstKey,secondKey,thirdKey){ + var leng = data.length; + var decStr = ""; + var firstKeyBt,secondKeyBt,thirdKeyBt,firstLength,secondLength,thirdLength; + if(firstKey != null && firstKey != ""){ + firstKeyBt = getKeyBytes(firstKey); + firstLength = firstKeyBt.length; + } + if(secondKey != null && secondKey != ""){ + secondKeyBt = getKeyBytes(secondKey); + secondLength = secondKeyBt.length; + } + if(thirdKey != null && thirdKey != ""){ + thirdKeyBt = getKeyBytes(thirdKey); + thirdLength = thirdKeyBt.length; + } + + var iterator = parseInt(leng/16); + var i=0; + for(i = 0;i < iterator;i++){ + var tempData = data.substring(i*16+0,i*16+16); + var strByte = hexToBt64(tempData); + var intByte = new Array(64); + var j = 0; + for(j = 0;j < 64; j++){ + intByte[j] = parseInt(strByte.substring(j,j+1)); + } + var decByte; + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != "" && thirdKey != null && thirdKey != ""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = thirdLength - 1;x >= 0;x --){ + tempBt = dec(tempBt,thirdKeyBt[x]); + } + for(y = secondLength - 1;y >= 0;y --){ + tempBt = dec(tempBt,secondKeyBt[y]); + } + for(z = firstLength - 1;z >= 0 ;z --){ + tempBt = dec(tempBt,firstKeyBt[z]); + } + decByte = tempBt; + }else{ + if(firstKey != null && firstKey !="" && secondKey != null && secondKey != ""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = secondLength - 1;x >= 0 ;x --){ + tempBt = dec(tempBt,secondKeyBt[x]); + } + for(y = firstLength - 1;y >= 0 ;y --){ + tempBt = dec(tempBt,firstKeyBt[y]); + } + decByte = tempBt; + }else{ + if(firstKey != null && firstKey !=""){ + var tempBt; + var x,y,z; + tempBt = intByte; + for(x = firstLength - 1;x >= 0 ;x --){ + tempBt = dec(tempBt,firstKeyBt[x]); + } + decByte = tempBt; + } + } + } + decStr += byteToString(decByte); + } + return decStr; +} +/* +* chang the string into the bit array +* +* return bit array(it's length % 64 = 0) +*/ +function getKeyBytes(key){ + var keyBytes = new Array(); + var leng = key.length; + var iterator = parseInt(leng/4); + var remainder = leng%4; + var i = 0; + for(i = 0;i < iterator; i ++){ + keyBytes[i] = strToBt(key.substring(i*4+0,i*4+4)); + } + if(remainder > 0){ + keyBytes[i] = strToBt(key.substring(i*4+0,leng)); + } + return keyBytes; +} +/* +* chang the string(it's length <= 4) into the bit array +* +* return bit array(it's length = 64) +*/ +function strToBt(str){ + var leng = str.length; + var bt = new Array(64); + if(leng < 4){ + var i=0,j=0,p=0,q=0; + for(i = 0;ij;m--){ + pow *= 2; + } + bt[16*i+j]=parseInt(k/pow)%2; + } + } + for(p = leng;p<4;p++){ + var k = 0; + for(q=0;q<16;q++){ + var pow=1,m=0; + for(m=15;m>q;m--){ + pow *= 2; + } + bt[16*p+q]=parseInt(k/pow)%2; + } + } + }else{ + for(i = 0;i<4;i++){ + var k = str.charCodeAt(i); + for(j=0;j<16;j++){ + var pow=1; + for(m=15;m>j;m--){ + pow *= 2; + } + bt[16*i+j]=parseInt(k/pow)%2; + } + } + } + return bt; +} +/* +* chang the bit(it's length = 4) into the hex +* +* return hex +*/ +function bt4ToHex(binary) { + var hex; + switch (binary) { + case "0000" : hex = "0"; break; + case "0001" : hex = "1"; break; + case "0010" : hex = "2"; break; + case "0011" : hex = "3"; break; + case "0100" : hex = "4"; break; + case "0101" : hex = "5"; break; + case "0110" : hex = "6"; break; + case "0111" : hex = "7"; break; + case "1000" : hex = "8"; break; + case "1001" : hex = "9"; break; + case "1010" : hex = "A"; break; + case "1011" : hex = "B"; break; + case "1100" : hex = "C"; break; + case "1101" : hex = "D"; break; + case "1110" : hex = "E"; break; + case "1111" : hex = "F"; break; + } + return hex; +} +/* +* chang the hex into the bit(it's length = 4) +* +* return the bit(it's length = 4) +*/ +function hexToBt4(hex) { + var binary; + switch (hex) { + case "0" : binary = "0000"; break; + case "1" : binary = "0001"; break; + case "2" : binary = "0010"; break; + case "3" : binary = "0011"; break; + case "4" : binary = "0100"; break; + case "5" : binary = "0101"; break; + case "6" : binary = "0110"; break; + case "7" : binary = "0111"; break; + case "8" : binary = "1000"; break; + case "9" : binary = "1001"; break; + case "A" : binary = "1010"; break; + case "B" : binary = "1011"; break; + case "C" : binary = "1100"; break; + case "D" : binary = "1101"; break; + case "E" : binary = "1110"; break; + case "F" : binary = "1111"; break; + } + return binary; +} +/* +* chang the bit(it's length = 64) into the string +* +* return string +*/ +function byteToString(byteData){ + var str=""; + for(i = 0;i<4;i++){ + var count=0; + for(j=0;j<16;j++){ + var pow=1; + for(m=15;m>j;m--){ + pow*=2; + } + count+=byteData[16*i+j]*pow; + } + if(count != 0){ + str+=String.fromCharCode(count); + } + } + return str; +} +function bt64ToHex(byteData){ + var hex = ""; + for(i = 0;i<16;i++){ + var bt = ""; + for(j=0;j<4;j++){ + bt += byteData[i*4+j]; + } + hex+=bt4ToHex(bt); + } + return hex; +} +function hexToBt64(hex){ + var binary = ""; + for(i = 0;i<16;i++){ + binary+=hexToBt4(hex.substring(i,i+1)); + } + return binary; +} +/* +* the 64 bit des core arithmetic +*/ +function enc(dataByte,keyByte){ + var keys = generateKeys(keyByte); + var ipByte = initPermute(dataByte); + var ipLeft = new Array(32); + var ipRight = new Array(32); + var tempLeft = new Array(32); + var i = 0,j = 0,k = 0,m = 0, n = 0; + for(k = 0;k < 32;k ++){ + ipLeft[k] = ipByte[k]; + ipRight[k] = ipByte[32+k]; + } + for(i = 0;i < 16;i ++){ + for(j = 0;j < 32;j ++){ + tempLeft[j] = ipLeft[j]; + ipLeft[j] = ipRight[j]; + } + var key = new Array(48); + for(m = 0;m < 48;m ++){ + key[m] = keys[i][m]; + } + var tempRight = xor(pPermute(sBoxPermute(xor(expandPermute(ipRight),key))), tempLeft); + for(n = 0;n < 32;n ++){ + ipRight[n] = tempRight[n]; + } + + } + + + var finalData =new Array(64); + for(i = 0;i < 32;i ++){ + finalData[i] = ipRight[i]; + finalData[32+i] = ipLeft[i]; + } + return finallyPermute(finalData); +} +function dec(dataByte,keyByte){ + var keys = generateKeys(keyByte); + var ipByte = initPermute(dataByte); + var ipLeft = new Array(32); + var ipRight = new Array(32); + var tempLeft = new Array(32); + var i = 0,j = 0,k = 0,m = 0, n = 0; + for(k = 0;k < 32;k ++){ + ipLeft[k] = ipByte[k]; + ipRight[k] = ipByte[32+k]; + } + for(i = 15;i >= 0;i --){ + for(j = 0;j < 32;j ++){ + tempLeft[j] = ipLeft[j]; + ipLeft[j] = ipRight[j]; + } + var key = new Array(48); + for(m = 0;m < 48;m ++){ + key[m] = keys[i][m]; + } + + var tempRight = xor(pPermute(sBoxPermute(xor(expandPermute(ipRight),key))), tempLeft); + for(n = 0;n < 32;n ++){ + ipRight[n] = tempRight[n]; + } + } + + + var finalData =new Array(64); + for(i = 0;i < 32;i ++){ + finalData[i] = ipRight[i]; + finalData[32+i] = ipLeft[i]; + } + return finallyPermute(finalData); +} +function initPermute(originalData){ + var ipByte = new Array(64); + for (i = 0, m = 1, n = 0; i < 4; i++, m += 2, n += 2) { + for (j = 7, k = 0; j >= 0; j--, k++) { + ipByte[i * 8 + k] = originalData[j * 8 + m]; + ipByte[i * 8 + k + 32] = originalData[j * 8 + n]; + } + } + return ipByte; +} +function expandPermute(rightData){ + var epByte = new Array(48); + for (i = 0; i < 8; i++) { + if (i == 0) { + epByte[i * 6 + 0] = rightData[31]; + } else { + epByte[i * 6 + 0] = rightData[i * 4 - 1]; + } + epByte[i * 6 + 1] = rightData[i * 4 + 0]; + epByte[i * 6 + 2] = rightData[i * 4 + 1]; + epByte[i * 6 + 3] = rightData[i * 4 + 2]; + epByte[i * 6 + 4] = rightData[i * 4 + 3]; + if (i == 7) { + epByte[i * 6 + 5] = rightData[0]; + } else { + epByte[i * 6 + 5] = rightData[i * 4 + 4]; + } + } + return epByte; +} +function xor(byteOne,byteTwo){ + var xorByte = new Array(byteOne.length); + for(i = 0;i < byteOne.length; i ++){ + xorByte[i] = byteOne[i] ^ byteTwo[i]; + } + return xorByte; +} +function sBoxPermute(expandByte){ + + var sBoxByte = new Array(32); + var binary = ""; + var s1 = [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 ]]; + /* Table - s2 */ + var s2 = [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 ]]; + /* Table - s3 */ + var s3= [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 ]]; + /* Table - s4 */ + var s4 = [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 ]]; + /* Table - s5 */ + var s5 = [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 ]]; + /* Table - s6 */ + var s6 = [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 ]]; + /* Table - s7 */ + var s7 = [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12]]; + /* Table - s8 */ + var s8 = [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11]]; + + for(m=0;m<8;m++){ + var i=0,j=0; + i = expandByte[m*6+0]*2+expandByte[m*6+5]; + j = expandByte[m * 6 + 1] * 2 * 2 * 2 + + expandByte[m * 6 + 2] * 2* 2 + + expandByte[m * 6 + 3] * 2 + + expandByte[m * 6 + 4]; + switch (m) { + case 0 : + binary = getBoxBinary(s1[i][j]); + break; + case 1 : + binary = getBoxBinary(s2[i][j]); + break; + case 2 : + binary = getBoxBinary(s3[i][j]); + break; + case 3 : + binary = getBoxBinary(s4[i][j]); + break; + case 4 : + binary = getBoxBinary(s5[i][j]); + break; + case 5 : + binary = getBoxBinary(s6[i][j]); + break; + case 6 : + binary = getBoxBinary(s7[i][j]); + break; + case 7 : + binary = getBoxBinary(s8[i][j]); + break; + } + sBoxByte[m*4+0] = parseInt(binary.substring(0,1)); + sBoxByte[m*4+1] = parseInt(binary.substring(1,2)); + sBoxByte[m*4+2] = parseInt(binary.substring(2,3)); + sBoxByte[m*4+3] = parseInt(binary.substring(3,4)); + } + return sBoxByte; +} +function pPermute(sBoxByte){ + var pBoxPermute = new Array(32); + pBoxPermute[ 0] = sBoxByte[15]; + pBoxPermute[ 1] = sBoxByte[ 6]; + pBoxPermute[ 2] = sBoxByte[19]; + pBoxPermute[ 3] = sBoxByte[20]; + pBoxPermute[ 4] = sBoxByte[28]; + pBoxPermute[ 5] = sBoxByte[11]; + pBoxPermute[ 6] = sBoxByte[27]; + pBoxPermute[ 7] = sBoxByte[16]; + pBoxPermute[ 8] = sBoxByte[ 0]; + pBoxPermute[ 9] = sBoxByte[14]; + pBoxPermute[10] = sBoxByte[22]; + pBoxPermute[11] = sBoxByte[25]; + pBoxPermute[12] = sBoxByte[ 4]; + pBoxPermute[13] = sBoxByte[17]; + pBoxPermute[14] = sBoxByte[30]; + pBoxPermute[15] = sBoxByte[ 9]; + pBoxPermute[16] = sBoxByte[ 1]; + pBoxPermute[17] = sBoxByte[ 7]; + pBoxPermute[18] = sBoxByte[23]; + pBoxPermute[19] = sBoxByte[13]; + pBoxPermute[20] = sBoxByte[31]; + pBoxPermute[21] = sBoxByte[26]; + pBoxPermute[22] = sBoxByte[ 2]; + pBoxPermute[23] = sBoxByte[ 8]; + pBoxPermute[24] = sBoxByte[18]; + pBoxPermute[25] = sBoxByte[12]; + pBoxPermute[26] = sBoxByte[29]; + pBoxPermute[27] = sBoxByte[ 5]; + pBoxPermute[28] = sBoxByte[21]; + pBoxPermute[29] = sBoxByte[10]; + pBoxPermute[30] = sBoxByte[ 3]; + pBoxPermute[31] = sBoxByte[24]; + return pBoxPermute; +} +function finallyPermute(endByte){ + var fpByte = new Array(64); + fpByte[ 0] = endByte[39]; + fpByte[ 1] = endByte[ 7]; + fpByte[ 2] = endByte[47]; + fpByte[ 3] = endByte[15]; + fpByte[ 4] = endByte[55]; + fpByte[ 5] = endByte[23]; + fpByte[ 6] = endByte[63]; + fpByte[ 7] = endByte[31]; + fpByte[ 8] = endByte[38]; + fpByte[ 9] = endByte[ 6]; + fpByte[10] = endByte[46]; + fpByte[11] = endByte[14]; + fpByte[12] = endByte[54]; + fpByte[13] = endByte[22]; + fpByte[14] = endByte[62]; + fpByte[15] = endByte[30]; + fpByte[16] = endByte[37]; + fpByte[17] = endByte[ 5]; + fpByte[18] = endByte[45]; + fpByte[19] = endByte[13]; + fpByte[20] = endByte[53]; + fpByte[21] = endByte[21]; + fpByte[22] = endByte[61]; + fpByte[23] = endByte[29]; + fpByte[24] = endByte[36]; + fpByte[25] = endByte[ 4]; + fpByte[26] = endByte[44]; + fpByte[27] = endByte[12]; + fpByte[28] = endByte[52]; + fpByte[29] = endByte[20]; + fpByte[30] = endByte[60]; + fpByte[31] = endByte[28]; + fpByte[32] = endByte[35]; + fpByte[33] = endByte[ 3]; + fpByte[34] = endByte[43]; + fpByte[35] = endByte[11]; + fpByte[36] = endByte[51]; + fpByte[37] = endByte[19]; + fpByte[38] = endByte[59]; + fpByte[39] = endByte[27]; + fpByte[40] = endByte[34]; + fpByte[41] = endByte[ 2]; + fpByte[42] = endByte[42]; + fpByte[43] = endByte[10]; + fpByte[44] = endByte[50]; + fpByte[45] = endByte[18]; + fpByte[46] = endByte[58]; + fpByte[47] = endByte[26]; + fpByte[48] = endByte[33]; + fpByte[49] = endByte[ 1]; + fpByte[50] = endByte[41]; + fpByte[51] = endByte[ 9]; + fpByte[52] = endByte[49]; + fpByte[53] = endByte[17]; + fpByte[54] = endByte[57]; + fpByte[55] = endByte[25]; + fpByte[56] = endByte[32]; + fpByte[57] = endByte[ 0]; + fpByte[58] = endByte[40]; + fpByte[59] = endByte[ 8]; + fpByte[60] = endByte[48]; + fpByte[61] = endByte[16]; + fpByte[62] = endByte[56]; + fpByte[63] = endByte[24]; + return fpByte; +} +function getBoxBinary(i) { + var binary = ""; + switch (i) { + case 0 :binary = "0000";break; + case 1 :binary = "0001";break; + case 2 :binary = "0010";break; + case 3 :binary = "0011";break; + case 4 :binary = "0100";break; + case 5 :binary = "0101";break; + case 6 :binary = "0110";break; + case 7 :binary = "0111";break; + case 8 :binary = "1000";break; + case 9 :binary = "1001";break; + case 10 :binary = "1010";break; + case 11 :binary = "1011";break; + case 12 :binary = "1100";break; + case 13 :binary = "1101";break; + case 14 :binary = "1110";break; + case 15 :binary = "1111";break; + } + return binary; +} +/* +* generate 16 keys for xor +* +*/ +function generateKeys(keyByte){ + var key = new Array(56); + var keys = new Array(); + + keys[ 0] = new Array(); + keys[ 1] = new Array(); + keys[ 2] = new Array(); + keys[ 3] = new Array(); + keys[ 4] = new Array(); + keys[ 5] = new Array(); + keys[ 6] = new Array(); + keys[ 7] = new Array(); + keys[ 8] = new Array(); + keys[ 9] = new Array(); + keys[10] = new Array(); + keys[11] = new Array(); + keys[12] = new Array(); + keys[13] = new Array(); + keys[14] = new Array(); + keys[15] = new Array(); + var loop = [1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1]; + for(i=0;i<7;i++){ + for(j=0,k=7;j<8;j++,k--){ + key[i*8+j]=keyByte[8*k+i]; + } + } + + var i = 0; + for(i = 0;i < 16;i ++){ + var tempLeft=0; + var tempRight=0; + for(j = 0; j < loop[i];j ++){ + tempLeft = key[0]; + tempRight = key[28]; + for(k = 0;k < 27 ;k ++){ + key[k] = key[k+1]; + key[28+k] = key[29+k]; + } + key[27]=tempLeft; + key[55]=tempRight; + } + var tempKey = new Array(48); + tempKey[ 0] = key[13]; + tempKey[ 1] = key[16]; + tempKey[ 2] = key[10]; + tempKey[ 3] = key[23]; + tempKey[ 4] = key[ 0]; + tempKey[ 5] = key[ 4]; + tempKey[ 6] = key[ 2]; + tempKey[ 7] = key[27]; + tempKey[ 8] = key[14]; + tempKey[ 9] = key[ 5]; + tempKey[10] = key[20]; + tempKey[11] = key[ 9]; + tempKey[12] = key[22]; + tempKey[13] = key[18]; + tempKey[14] = key[11]; + tempKey[15] = key[ 3]; + tempKey[16] = key[25]; + tempKey[17] = key[ 7]; + tempKey[18] = key[15]; + tempKey[19] = key[ 6]; + tempKey[20] = key[26]; + tempKey[21] = key[19]; + tempKey[22] = key[12]; + tempKey[23] = key[ 1]; + tempKey[24] = key[40]; + tempKey[25] = key[51]; + tempKey[26] = key[30]; + tempKey[27] = key[36]; + tempKey[28] = key[46]; + tempKey[29] = key[54]; + tempKey[30] = key[29]; + tempKey[31] = key[39]; + tempKey[32] = key[50]; + tempKey[33] = key[44]; + tempKey[34] = key[32]; + tempKey[35] = key[47]; + tempKey[36] = key[43]; + tempKey[37] = key[48]; + tempKey[38] = key[38]; + tempKey[39] = key[55]; + tempKey[40] = key[33]; + tempKey[41] = key[52]; + tempKey[42] = key[45]; + tempKey[43] = key[41]; + tempKey[44] = key[49]; + tempKey[45] = key[35]; + tempKey[46] = key[28]; + tempKey[47] = key[31]; + switch(i){ + case 0: for(m=0;m < 48 ;m++){ keys[ 0][m] = tempKey[m]; } break; + case 1: for(m=0;m < 48 ;m++){ keys[ 1][m] = tempKey[m]; } break; + case 2: for(m=0;m < 48 ;m++){ keys[ 2][m] = tempKey[m]; } break; + case 3: for(m=0;m < 48 ;m++){ keys[ 3][m] = tempKey[m]; } break; + case 4: for(m=0;m < 48 ;m++){ keys[ 4][m] = tempKey[m]; } break; + case 5: for(m=0;m < 48 ;m++){ keys[ 5][m] = tempKey[m]; } break; + case 6: for(m=0;m < 48 ;m++){ keys[ 6][m] = tempKey[m]; } break; + case 7: for(m=0;m < 48 ;m++){ keys[ 7][m] = tempKey[m]; } break; + case 8: for(m=0;m < 48 ;m++){ keys[ 8][m] = tempKey[m]; } break; + case 9: for(m=0;m < 48 ;m++){ keys[ 9][m] = tempKey[m]; } break; + case 10: for(m=0;m < 48 ;m++){ keys[10][m] = tempKey[m]; } break; + case 11: for(m=0;m < 48 ;m++){ keys[11][m] = tempKey[m]; } break; + case 12: for(m=0;m < 48 ;m++){ keys[12][m] = tempKey[m]; } break; + case 13: for(m=0;m < 48 ;m++){ keys[13][m] = tempKey[m]; } break; + case 14: for(m=0;m < 48 ;m++){ keys[14][m] = tempKey[m]; } break; + case 15: for(m=0;m < 48 ;m++){ keys[15][m] = tempKey[m]; } break; + } + } + return keys; +} +//end------------------------------------------------------------------------------------------------------------- diff --git a/www/swa/token/index.html b/www/swa/token/index.html new file mode 100644 index 0000000..d1f8a70 --- /dev/null +++ b/www/swa/token/index.html @@ -0,0 +1,386 @@ + + + + + Token 工具 + + + + + + +
    +

    信雅达离线 Token 工具

    +
    + +
    + +
    + + +
    + + +
    + +
    +

    帮助

    +
      +
    • + 清空 +

      仅清空 3 个输入框。

      +
    • +
    • + 临存 +

      将 3 个输入框的内容临时保存在本地。

      +
    • +
    • + 临取 +

      将临时保存在本地的信息填入 3 个输入框。

      +
    • +
    • + 返显 +

      尝试读取 IC 卡内部信息。IC 卡内部信息错误时有可能显示乱码。

      +
    • +
    • + 发行 +

      将发行信息写入 IC 卡。

      +
    • +
    + +
    + +
    + + + + + + + + + + +
    + +
    + + + + +
    + + + + + +
    + +
    + +
    +

    帮助

    +

    本页所有值都是 HEX

    +
    + +
    + +
    + IC卡属主 (20h+1) + +
    + +
    + 主密钥校验值 (30h+4) + +
    + +
    + 主密钥密文 (40h+16) + +
    + +
    + 保护密钥校验值 (50h+4) + +
    + +
    + 保护密钥分量(60h+16) + +
    + + +
    + + + +
    + + +
    + +
    + + + +
    + +
    +
    + + +
    + + + + + + + + + + + + + + + + diff --git a/www/swa/token/jquery.min.js b/www/swa/token/jquery.min.js new file mode 100644 index 0000000..16ad06c --- /dev/null +++ b/www/swa/token/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
    "+""+"
    ",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
    t
    ",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
    ",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/www/swa/token/jssrc/des.js b/www/swa/token/jssrc/des.js new file mode 100644 index 0000000..2270ce0 --- /dev/null +++ b/www/swa/token/jssrc/des.js @@ -0,0 +1,1083 @@ +var DES = null; + +(function () { + if (!Array.prototype.fill) { + Array.prototype.fill = function (params) { + var len = this.length + for (var i = 0; i < len; i++) { + this[i] = params + } + return this + } + } + var starip_tab = [ + 58, 50, 42, 34, 26, 18, 10, 2, + 60, 52, 44, 36, 28, 20, 12, 4, + 62, 54, 46, 38, 30, 22, 14, 6, + 64, 56, 48, 40, 32, 24, 16, 8, + 57, 49, 41, 33, 25, 17, 9, 1, + 59, 51, 43, 35, 27, 19, 11, 3, + 61, 53, 45, 37, 29, 21, 13, 5, + 63, 55, 47, 39, 31, 23, 15, 7 + ] + + var _starip_tab = [ + 40, 8, 48, 16, 56, 24, 64, 32, + 39, 7, 47, 15, 55, 23, 63, 31, + 38, 6, 46, 14, 54, 22, 62, 30, + 37, 5, 45, 13, 53, 21, 61, 29, + 36, 4, 44, 12, 52, 20, 60, 28, + 35, 3, 43, 11, 51, 19, 59, 27, + 34, 2, 42, 10, 50, 18, 58, 26, + 33, 1, 41, 9, 49, 17, 57, 25 + ] + + var starpc_1_c = [ + 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35 + ] + + var starpc_1_d = [ + 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 + ] + + var starpc_2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ] + + var starls_count = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1] + + var stare_r = [32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, + 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, + 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, + 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1 + ] + + var starP = [16, 7, 20, 21, 29, 12, 28, 17, + 1, 15, 23, 26, 5, 18, 31, 10, + 2, 8, 24, 14, 32, 27, 3, 9, + 19, 13, 30, 6, 22, 11, 4, 25 + ] + + var starSSS = [ + [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13] + ], + [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9] + ], + [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12] + ], + [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14] + ], + [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3] + ], + [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13] + ], + [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12] + ], + [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11] + ] + ] + + var bit_box = [ + [0, 0, 0, 0], + [0, 0, 0, 1], + [0, 0, 1, 0], + [0, 0, 1, 1], + [0, 1, 0, 0], + [0, 1, 0, 1], + [0, 1, 1, 0], + [0, 1, 1, 1], + [1, 0, 0, 0], + [1, 0, 0, 1], + [1, 0, 1, 0], + [1, 0, 1, 1], + [1, 1, 0, 0], + [1, 1, 0, 1], + [1, 1, 1, 0], + [1, 1, 1, 1] + ] + + var S1 = [ + [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], + [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], + [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], + [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13] + ] + + var S2 = [ + [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10], + [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5], + [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15], + [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9] + ] + + var S3 = [ + [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8], + [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1], + [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7], + [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12] + ] + + var S4 = [ + [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15], + [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9], + [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4], + [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14] + ] + + var S5 = [ + [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9], + [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6], + [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14], + [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3] + ] + + var S6 = [ + [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11], + [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8], + [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6], + [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13] + ] + + var S7 = [ + [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1], + [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6], + [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2], + [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12] + ] + + var S8 = [ + [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7], + [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2], + [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8], + [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11] + ] + + var SHIFT = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1] + + var BINARY = [ + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1 + ] + + DES = function () { + var KEYBLOCK = new Array(16), + DATABLOCK = new Array(16), + ANSBLOCK = new Array(16), + KEY = new Array(64), + BUFFER = new Array(64), + BUFOUT = new Array(64), + KWORK = new Array(56), + WORKA = new Array(48), + KN = new Array(48), + OPTION = '', + TEMP1 = 0, + TEMP2 = 0, + NBROFSHIFT = 0, + VALINDEX = 0; + + function MAINPROCESS() { + var i, j, k, iter; + + for (i = 0; i < 16; i++) { + j = i * 4; + switch (KEYBLOCK[i]) { + case '0': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case '1': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case '2': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case '3': + KEY[j + 0] = 0; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case '4': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case '5': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case '6': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case '7': + KEY[j + 0] = 0; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case '8': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + + break; + case '9': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case 'a': + case 'A': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case 'b': + case 'B': + KEY[j + 0] = 1; + KEY[j + 1] = 0; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + case 'C': + case 'c': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 0; + break; + case 'D': + case 'd': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 0; + KEY[j + 3] = 1; + break; + case 'E': + case 'e': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 0; + break; + case 'F': + case 'f': + KEY[j + 0] = 1; + KEY[j + 1] = 1; + KEY[j + 2] = 1; + KEY[j + 3] = 1; + break; + } /* switch */ + } /* for */ + + for (i = 0; i < 16; i++) { + j = i * 4; + switch (DATABLOCK[i]) { + case '0': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '1': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case '2': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case '3': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case '4': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '5': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case '6': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case '7': + BUFFER[j + 0] = 0; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case '8': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case '9': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case 'A': + case 'a': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case 'B': + case 'b': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 0; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + case 'C': + case 'c': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 0; + break; + case 'D': + case 'd': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 0; + BUFFER[j + 3] = 1; + break; + case 'E': + case 'e': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 0; + break; + case 'F': + case 'f': + BUFFER[j + 0] = 1; + BUFFER[j + 1] = 1; + BUFFER[j + 2] = 1; + BUFFER[j + 3] = 1; + break; + + } /* end switch */ + } /* for */ + + /* INITIAL PERMUTATION OF DATA */ + BUFOUT[0] = BUFFER[57]; + BUFOUT[1] = BUFFER[49]; + BUFOUT[2] = BUFFER[41]; + BUFOUT[3] = BUFFER[33]; + BUFOUT[4] = BUFFER[25]; + BUFOUT[5] = BUFFER[17]; + BUFOUT[6] = BUFFER[9]; + BUFOUT[7] = BUFFER[1]; + BUFOUT[8] = BUFFER[59]; + BUFOUT[9] = BUFFER[51]; + BUFOUT[10] = BUFFER[43]; + BUFOUT[11] = BUFFER[35]; + BUFOUT[12] = BUFFER[27]; + BUFOUT[13] = BUFFER[19]; + BUFOUT[14] = BUFFER[11]; + BUFOUT[15] = BUFFER[3]; + BUFOUT[16] = BUFFER[61]; + BUFOUT[17] = BUFFER[53]; + BUFOUT[18] = BUFFER[45]; + BUFOUT[19] = BUFFER[37]; + BUFOUT[20] = BUFFER[29]; + BUFOUT[21] = BUFFER[21]; + BUFOUT[22] = BUFFER[13]; + BUFOUT[23] = BUFFER[5]; + BUFOUT[24] = BUFFER[63]; + BUFOUT[25] = BUFFER[55]; + BUFOUT[26] = BUFFER[47]; + BUFOUT[27] = BUFFER[39]; + BUFOUT[28] = BUFFER[31]; + BUFOUT[29] = BUFFER[23]; + BUFOUT[30] = BUFFER[15]; + BUFOUT[31] = BUFFER[7]; + BUFOUT[32] = BUFFER[56]; + BUFOUT[33] = BUFFER[48]; + BUFOUT[34] = BUFFER[40]; + BUFOUT[35] = BUFFER[32]; + BUFOUT[36] = BUFFER[24]; + BUFOUT[37] = BUFFER[16]; + BUFOUT[38] = BUFFER[8]; + BUFOUT[39] = BUFFER[0]; + BUFOUT[40] = BUFFER[58]; + BUFOUT[41] = BUFFER[50]; + BUFOUT[42] = BUFFER[42]; + BUFOUT[43] = BUFFER[34]; + BUFOUT[44] = BUFFER[26]; + BUFOUT[45] = BUFFER[18]; + BUFOUT[46] = BUFFER[10]; + BUFOUT[47] = BUFFER[2]; + BUFOUT[48] = BUFFER[60]; + BUFOUT[49] = BUFFER[52]; + BUFOUT[50] = BUFFER[44]; + BUFOUT[51] = BUFFER[36]; + BUFOUT[52] = BUFFER[28]; + BUFOUT[53] = BUFFER[20]; + BUFOUT[54] = BUFFER[12]; + BUFOUT[55] = BUFFER[4]; + BUFOUT[56] = BUFFER[62]; + BUFOUT[57] = BUFFER[54]; + BUFOUT[58] = BUFFER[46]; + BUFOUT[59] = BUFFER[38]; + BUFOUT[60] = BUFFER[30]; + BUFOUT[61] = BUFFER[22]; + BUFOUT[62] = BUFFER[14]; + BUFOUT[63] = BUFFER[6]; + + /* INITIAL PERMUTATION OF KEY */ + KWORK[0] = KEY[56]; + KWORK[1] = KEY[48]; + KWORK[2] = KEY[40]; + KWORK[3] = KEY[32]; + KWORK[4] = KEY[24]; + KWORK[5] = KEY[16]; + KWORK[6] = KEY[8]; + KWORK[7] = KEY[0]; + KWORK[8] = KEY[57]; + KWORK[9] = KEY[49]; + KWORK[10] = KEY[41]; + KWORK[11] = KEY[33]; + KWORK[12] = KEY[25]; + KWORK[13] = KEY[17]; + KWORK[14] = KEY[9]; + KWORK[15] = KEY[1]; + KWORK[16] = KEY[58]; + KWORK[17] = KEY[50]; + KWORK[18] = KEY[42]; + KWORK[19] = KEY[34]; + KWORK[20] = KEY[26]; + KWORK[21] = KEY[18]; + KWORK[22] = KEY[10]; + KWORK[23] = KEY[2]; + KWORK[24] = KEY[59]; + KWORK[25] = KEY[51]; + KWORK[26] = KEY[43]; + KWORK[27] = KEY[35]; + KWORK[28] = KEY[62]; + KWORK[29] = KEY[54]; + KWORK[30] = KEY[46]; + KWORK[31] = KEY[38]; + KWORK[32] = KEY[30]; + KWORK[33] = KEY[22]; + KWORK[34] = KEY[14]; + KWORK[35] = KEY[6]; + KWORK[36] = KEY[61]; + KWORK[37] = KEY[53]; + KWORK[38] = KEY[45]; + KWORK[39] = KEY[37]; + KWORK[40] = KEY[29]; + KWORK[41] = KEY[21]; + KWORK[42] = KEY[13]; + KWORK[43] = KEY[5]; + KWORK[44] = KEY[60]; + KWORK[45] = KEY[52]; + KWORK[46] = KEY[44]; + KWORK[47] = KEY[36]; + KWORK[48] = KEY[28]; + KWORK[49] = KEY[20]; + KWORK[50] = KEY[12]; + KWORK[51] = KEY[4]; + KWORK[52] = KEY[27]; + KWORK[53] = KEY[19]; + KWORK[54] = KEY[11]; + KWORK[55] = KEY[3]; + + for (iter = 0; iter < 16; iter++) { + for (i = 0; i < 32; i++) + BUFFER[i] = BUFOUT[32 + i]; + + /* CALCULATION OF F(R,K) */ + /* PERMUTE - E */ + WORKA[0] = BUFFER[31]; + WORKA[1] = BUFFER[0]; + WORKA[2] = BUFFER[1]; + WORKA[3] = BUFFER[2]; + WORKA[4] = BUFFER[3]; + WORKA[5] = BUFFER[4]; + WORKA[6] = BUFFER[3]; + WORKA[7] = BUFFER[4]; + WORKA[8] = BUFFER[5]; + WORKA[9] = BUFFER[6]; + WORKA[10] = BUFFER[7]; + WORKA[11] = BUFFER[8]; + WORKA[12] = BUFFER[7]; + WORKA[13] = BUFFER[8]; + WORKA[14] = BUFFER[9]; + WORKA[15] = BUFFER[10]; + WORKA[16] = BUFFER[11]; + WORKA[17] = BUFFER[12]; + WORKA[18] = BUFFER[11]; + WORKA[19] = BUFFER[12]; + WORKA[20] = BUFFER[13]; + WORKA[21] = BUFFER[14]; + WORKA[22] = BUFFER[15]; + WORKA[23] = BUFFER[16]; + WORKA[24] = BUFFER[15]; + WORKA[25] = BUFFER[16]; + WORKA[26] = BUFFER[17]; + WORKA[27] = BUFFER[18]; + WORKA[28] = BUFFER[19]; + WORKA[29] = BUFFER[20]; + WORKA[30] = BUFFER[19]; + WORKA[31] = BUFFER[20]; + WORKA[32] = BUFFER[21]; + WORKA[33] = BUFFER[22]; + WORKA[34] = BUFFER[23]; + WORKA[35] = BUFFER[24]; + WORKA[36] = BUFFER[23]; + WORKA[37] = BUFFER[24]; + WORKA[38] = BUFFER[25]; + WORKA[39] = BUFFER[26]; + WORKA[40] = BUFFER[27]; + WORKA[41] = BUFFER[28]; + WORKA[42] = BUFFER[27]; + WORKA[43] = BUFFER[28]; + WORKA[44] = BUFFER[29]; + WORKA[45] = BUFFER[30]; + WORKA[46] = BUFFER[31]; + WORKA[47] = BUFFER[0]; + + /* KS FUNCTION BEGIN */ + if (OPTION == 'E') { + NBROFSHIFT = SHIFT[iter]; + for (i = 0; i < NBROFSHIFT; i++) { + TEMP1 = KWORK[0]; + TEMP2 = KWORK[28]; + for (j = 0; j < 27; j++) { + KWORK[j] = KWORK[j + 1]; + KWORK[j + 28] = KWORK[j + 29]; + } + KWORK[27] = TEMP1; + KWORK[55] = TEMP2; + } + } else if (iter > 0) { + NBROFSHIFT = SHIFT[16 - iter]; + for (i = 0; i < NBROFSHIFT; i++) { + TEMP1 = KWORK[27]; + TEMP2 = KWORK[55]; + for (j = 27; j > 0; j--) { + KWORK[j] = KWORK[j - 1]; + KWORK[j + 28] = KWORK[j + 27]; + } + KWORK[0] = TEMP1; + KWORK[28] = TEMP2; + } + } + + /* PERMUTE KWORK - PC2 */ + KN[0] = KWORK[13]; + KN[1] = KWORK[16]; + KN[2] = KWORK[10]; + KN[3] = KWORK[23]; + KN[4] = KWORK[0]; + KN[5] = KWORK[4]; + KN[6] = KWORK[2]; + KN[7] = KWORK[27]; + KN[8] = KWORK[14]; + KN[9] = KWORK[5]; + KN[10] = KWORK[20]; + KN[11] = KWORK[9]; + KN[12] = KWORK[22]; + KN[13] = KWORK[18]; + KN[14] = KWORK[11]; + KN[15] = KWORK[3]; + KN[16] = KWORK[25]; + KN[17] = KWORK[7]; + KN[18] = KWORK[15]; + KN[19] = KWORK[6]; + KN[20] = KWORK[26]; + KN[21] = KWORK[19]; + KN[22] = KWORK[12]; + KN[23] = KWORK[1]; + KN[24] = KWORK[40]; + KN[25] = KWORK[51]; + KN[26] = KWORK[30]; + KN[27] = KWORK[36]; + KN[28] = KWORK[46]; + KN[29] = KWORK[54]; + KN[30] = KWORK[29]; + KN[31] = KWORK[39]; + KN[32] = KWORK[50]; + KN[33] = KWORK[44]; + KN[34] = KWORK[32]; + KN[35] = KWORK[47]; + KN[36] = KWORK[43]; + KN[37] = KWORK[48]; + KN[38] = KWORK[38]; + KN[39] = KWORK[55]; + KN[40] = KWORK[33]; + KN[41] = KWORK[52]; + KN[42] = KWORK[45]; + KN[43] = KWORK[41]; + KN[44] = KWORK[49]; + KN[45] = KWORK[35]; + KN[46] = KWORK[28]; + KN[47] = KWORK[31]; + + for (i = 0; i < 48; i++) + WORKA[i] = (WORKA[i] + KN[i]) % 2; + + + VALINDEX = S1[2 * WORKA[0] + WORKA[5]][2 * (2 * (2 * WORKA[1] + WORKA[2]) + WORKA[3]) + WORKA[4]]; + VALINDEX = VALINDEX * 4; + KN[0] = BINARY[0 + VALINDEX]; + KN[1] = BINARY[1 + VALINDEX]; + KN[2] = BINARY[2 + VALINDEX]; + KN[3] = BINARY[3 + VALINDEX]; + VALINDEX = S2[2 * WORKA[6] + WORKA[11]][2 * (2 * (2 * WORKA[7] + WORKA[8]) + WORKA[9]) + WORKA[10]]; + VALINDEX = VALINDEX * 4; + KN[4] = BINARY[0 + VALINDEX]; + KN[5] = BINARY[1 + VALINDEX]; + KN[6] = BINARY[2 + VALINDEX]; + KN[7] = BINARY[3 + VALINDEX]; + VALINDEX = S3[2 * WORKA[12] + WORKA[17]][2 * (2 * (2 * WORKA[13] + WORKA[14]) + WORKA[15]) + WORKA[16]]; + VALINDEX = VALINDEX * 4; + KN[8] = BINARY[0 + VALINDEX]; + KN[9] = BINARY[1 + VALINDEX]; + KN[10] = BINARY[2 + VALINDEX]; + KN[11] = BINARY[3 + VALINDEX]; + VALINDEX = S4[2 * WORKA[18] + WORKA[23]][2 * (2 * (2 * WORKA[19] + WORKA[20]) + WORKA[21]) + WORKA[22]]; + VALINDEX = VALINDEX * 4; + KN[12] = BINARY[0 + VALINDEX]; + KN[13] = BINARY[1 + VALINDEX]; + KN[14] = BINARY[2 + VALINDEX]; + KN[15] = BINARY[3 + VALINDEX]; + VALINDEX = S5[2 * WORKA[24] + WORKA[29]][2 * (2 * (2 * WORKA[25] + WORKA[26]) + WORKA[27]) + WORKA[28]]; + VALINDEX = VALINDEX * 4; + KN[16] = BINARY[0 + VALINDEX]; + KN[17] = BINARY[1 + VALINDEX]; + KN[18] = BINARY[2 + VALINDEX]; + KN[19] = BINARY[3 + VALINDEX]; + VALINDEX = S6[2 * WORKA[30] + WORKA[35]][2 * (2 * (2 * WORKA[31] + WORKA[32]) + WORKA[33]) + WORKA[34]]; + VALINDEX = VALINDEX * 4; + KN[20] = BINARY[0 + VALINDEX]; + KN[21] = BINARY[1 + VALINDEX]; + KN[22] = BINARY[2 + VALINDEX]; + KN[23] = BINARY[3 + VALINDEX]; + VALINDEX = S7[2 * WORKA[36] + WORKA[41]][2 * (2 * (2 * WORKA[37] + WORKA[38]) + WORKA[39]) + WORKA[40]]; + VALINDEX = VALINDEX * 4; + KN[24] = BINARY[0 + VALINDEX]; + KN[25] = BINARY[1 + VALINDEX]; + KN[26] = BINARY[2 + VALINDEX]; + KN[27] = BINARY[3 + VALINDEX]; + VALINDEX = S8[2 * WORKA[42] + WORKA[47]][2 * (2 * (2 * WORKA[43] + WORKA[44]) + WORKA[45]) + WORKA[46]]; + VALINDEX = VALINDEX * 4; + KN[28] = BINARY[0 + VALINDEX]; + KN[29] = BINARY[1 + VALINDEX]; + KN[30] = BINARY[2 + VALINDEX]; + KN[31] = BINARY[3 + VALINDEX]; + + WORKA[0] = KN[15]; + WORKA[1] = KN[6]; + WORKA[2] = KN[19]; + WORKA[3] = KN[20]; + WORKA[4] = KN[28]; + WORKA[5] = KN[11]; + WORKA[6] = KN[27]; + WORKA[7] = KN[16]; + WORKA[8] = KN[0]; + WORKA[9] = KN[14]; + WORKA[10] = KN[22]; + WORKA[11] = KN[25]; + WORKA[12] = KN[4]; + WORKA[13] = KN[17]; + WORKA[14] = KN[30]; + WORKA[15] = KN[9]; + WORKA[16] = KN[1]; + WORKA[17] = KN[7]; + WORKA[18] = KN[23]; + WORKA[19] = KN[13]; + WORKA[20] = KN[31]; + WORKA[21] = KN[26]; + WORKA[22] = KN[2]; + WORKA[23] = KN[8]; + WORKA[24] = KN[18]; + WORKA[25] = KN[12]; + WORKA[26] = KN[29]; + WORKA[27] = KN[5]; + WORKA[28] = KN[21]; + WORKA[29] = KN[10]; + WORKA[30] = KN[3]; + WORKA[31] = KN[24]; + + /* BUFOUT XOR WORKA */ + for (j = 0; j < 32; j++) { + BUFOUT[j + 32] = (BUFOUT[j] + WORKA[j]) % 2; + BUFOUT[j] = BUFFER[j]; + } + } /* for iter*/ + + for (i = 0; i < 32; i++) { + j = BUFOUT[i]; + BUFOUT[i] = BUFOUT[32 + i]; + BUFOUT[32 + i] = j; + } + + + BUFFER[0] = BUFOUT[39]; + BUFFER[1] = BUFOUT[7]; + BUFFER[2] = BUFOUT[47]; + BUFFER[3] = BUFOUT[15]; + BUFFER[4] = BUFOUT[55]; + BUFFER[5] = BUFOUT[23]; + BUFFER[6] = BUFOUT[63]; + BUFFER[7] = BUFOUT[31]; + BUFFER[8] = BUFOUT[38]; + BUFFER[9] = BUFOUT[6]; + BUFFER[10] = BUFOUT[46]; + BUFFER[11] = BUFOUT[14]; + BUFFER[12] = BUFOUT[54]; + BUFFER[13] = BUFOUT[22]; + BUFFER[14] = BUFOUT[62]; + BUFFER[15] = BUFOUT[30]; + BUFFER[16] = BUFOUT[37]; + BUFFER[17] = BUFOUT[5]; + BUFFER[18] = BUFOUT[45]; + BUFFER[19] = BUFOUT[13]; + BUFFER[20] = BUFOUT[53]; + BUFFER[21] = BUFOUT[21]; + BUFFER[22] = BUFOUT[61]; + BUFFER[23] = BUFOUT[29]; + BUFFER[24] = BUFOUT[36]; + BUFFER[25] = BUFOUT[4]; + BUFFER[26] = BUFOUT[44]; + BUFFER[27] = BUFOUT[12]; + BUFFER[28] = BUFOUT[52]; + BUFFER[29] = BUFOUT[20]; + BUFFER[30] = BUFOUT[60]; + BUFFER[31] = BUFOUT[28]; + BUFFER[32] = BUFOUT[35]; + BUFFER[33] = BUFOUT[3]; + BUFFER[34] = BUFOUT[43]; + BUFFER[35] = BUFOUT[11]; + BUFFER[36] = BUFOUT[51]; + BUFFER[37] = BUFOUT[19]; + BUFFER[38] = BUFOUT[59]; + BUFFER[39] = BUFOUT[27]; + BUFFER[40] = BUFOUT[34]; + BUFFER[41] = BUFOUT[2]; + BUFFER[42] = BUFOUT[42]; + BUFFER[43] = BUFOUT[10]; + BUFFER[44] = BUFOUT[50]; + BUFFER[45] = BUFOUT[18]; + BUFFER[46] = BUFOUT[58]; + BUFFER[47] = BUFOUT[26]; + BUFFER[48] = BUFOUT[33]; + BUFFER[49] = BUFOUT[1]; + BUFFER[50] = BUFOUT[41]; + BUFFER[51] = BUFOUT[9]; + BUFFER[52] = BUFOUT[49]; + BUFFER[53] = BUFOUT[17]; + BUFFER[54] = BUFOUT[57]; + BUFFER[55] = BUFOUT[25]; + BUFFER[56] = BUFOUT[32]; + BUFFER[57] = BUFOUT[0]; + BUFFER[58] = BUFOUT[40]; + BUFFER[59] = BUFOUT[8]; + BUFFER[60] = BUFOUT[48]; + BUFFER[61] = BUFOUT[16]; + BUFFER[62] = BUFOUT[56]; + BUFFER[63] = BUFOUT[24]; + + j = 0; + for (i = 0; i < 8; i++) { + ANSBLOCK[i] = 0; + for (k = 0; k <= 6; k++) { + ANSBLOCK[i] = (ANSBLOCK[i] + BUFFER[j + k]) * 2; + } + ANSBLOCK[i] = ANSBLOCK[i] + BUFFER[j + 7]; + j = j + 8; + } + } + + function SingleDES(source, dest, in_key, flag) { + var i; + KEYBLOCK.fill('\0') + DATABLOCK.fill('\0') + ANSBLOCK.fill(0) + + for (i = 0; i < 64; i++) { + KEY[i] = 0; /* 0,1 */ + BUFFER[i] = 0, BUFOUT[i] = 0; /* 0,1 */ + } + for (i = 0; i < 48; i++) { + WORKA[i] = 0; /* 0,1 */ + KN[i] = 0; + } + for (i = 0; i < 56; i++) { + KWORK[i] = 0; /* 0,1 */ + } + TEMP1 = 0, TEMP2 = 0; /* 0,1 */ + NBROFSHIFT = 0, VALINDEX = 0; + + for (i = 0; i < 16; i++) { + KEYBLOCK[i] = in_key[i] + DATABLOCK[i] = source[i] + } + + OPTION = flag; + MAINPROCESS(); + + var result = '' + for (i = 0; i < 8; i++) { + result = strfix(ANSBLOCK[i].toString(16), 2).toUpperCase() + dest[2 * i] = result[0] + dest[2 * i + 1] = result[1] + } + } + + function TripleDES(source, dest, in_key, flag) { + var keya = new Array(16), + keyb = new Array(16), + tmpbuf1 = new Array(16), + tmpbuf2 = new Array(16), + i; + + for (i = 0; i < 16; i++) { + keya[i] = in_key[i] + keyb[i] = in_key[16 + i] + } + + if (flag == 'E') { + SingleDES(source, tmpbuf1, keya, 'E'); + SingleDES(tmpbuf1, tmpbuf2, keyb, 'D'); + SingleDES(tmpbuf2, dest, keya, 'E'); + } + else if (flag == 'D') { + SingleDES(source, tmpbuf1, keya, 'D'); + SingleDES(tmpbuf1, tmpbuf2, keyb, 'E'); + SingleDES(tmpbuf2, dest, keya, 'D'); + } + } + + function strfix(str, len) { + var length = len - str.length + while (length-- > 0) { + str = "0" + str + } + return str + } + + function CHSTR2BCH(ch) { + if (ch >= 0x30 && ch <= 0x39) { + ch -= 0x30; + } + else if (ch >= 0x41 && ch <= 0x47) { + ch -= 0x37; + } + else if (ch >= 0x61 && ch < 0x67) { + ch -= 0x57; + } + return ch + } + + function CHBCH2STR(ch) { + if (ch >= 0x00 && ch <= 0x09) { + ch += 0x30; + } + else if (ch >= 0x0A && ch <= 0x0F) { + ch += 0x37; + } + return ch; + } + + function hex2Array(str) { + var len = str.length / 2, + substr = '', + result = new Array(len); + for (var i = 0; i < len; i++) { + substr = str.slice(2 * i, 2 * (i + 1)) + result[i] = parseInt(substr, 16) || 0 + } + return result + } + + this.CalDES = function (pszSource, pszKey, flag) { + var nKeyLen = pszKey.length + if (nKeyLen !== 16 && nKeyLen !== 32) { + console.log("key 长度应为16或32字节"); + return ""; + } + var nLen = pszSource.length, + nCount = Math.floor((nLen + 15) / 16), + nCopyLen, + szPartSource = new Array(16), + szPartDest = new Array(16); + + var result = '' + for (var i = 0; i < nCount; i++) { + if (i == (nCount - 1)) { + nCopyLen = nLen - i * 16; + } else { + nCopyLen = 16; + } + + for (var j = 0; j < nCopyLen; j++) { + szPartSource[j] = pszSource[i * 16 + j] + } + + if (nKeyLen == 16) { + SingleDES(szPartSource, szPartDest, pszKey, flag); + } + else { + TripleDES(szPartSource, szPartDest, pszKey, flag); + } + + result += szPartDest.join('') + szPartSource.fill('\0') + szPartDest.fill('\0') + } + return result + } + + this.CalX99MAC = function (pszSource, nLength, pszKey) { + var nKeyLen = pszKey.length + if (nKeyLen !== 16) { + console.log("key 长度应为16字节"); + return ""; + } + var szBCD = new Array(16), + szBlock = new Array(16), + strSource = ''; + + for (var k = 0; k < nLength; k++) { + strSource += strfix(pszSource.charCodeAt(k).toString(16), 2).toUpperCase() + } + + var nLoopCount; + nLoopCount = Math.floor((nLength + 7) / 8); + nLoopCount = Math.floor((nLength * 2 + 15) / 16); + + for (var i = 0; i < nLoopCount; i++) { + + for (var j = 0; j < 16; j++) { + var a = strSource[i * 16 + j] || '0', + b = szBlock[j] || '0'; + szBCD[j] = String.fromCharCode(CHBCH2STR(CHSTR2BCH(a.charCodeAt(0)) ^ CHSTR2BCH(b.charCodeAt(0)))) + } + + SingleDES(szBCD, szBlock, pszKey, 'E'); + } + + return szBlock.join(''); + } + + this.CalANSI919MAC = function (source, length, in_key) { + if (in_key.length !== 32) { + console.log("key 长度应为32字节"); + return ""; + } + var iCount = Math.floor((length + 7) / 8), + byData = new Array(8), + data = new Array(16), + buf = new Array(16), + ikey = ''; + + for (var ii = 0; ii < iCount; ii++) { + for (var ij = 0; ij < 8; ij++) { + var a = source[ii * 8 + ij] || '\0', + b = byData[ij] || 0, + ikey = strfix((a.charCodeAt(0) ^ b).toString(16), 2).toUpperCase(); + data[ij * 2] = ikey[0]; + data[ij * 2 + 1] = ikey[1]; + } + + SingleDES(data, buf, in_key, 'E'); + + byData = hex2Array(buf.join('')) + } + + for (var jj = 0; jj < 8; jj++) { + ikey = strfix(byData[jj].toString(16), 2).toUpperCase(); + data[jj * 2] = ikey[0]; + data[jj * 2 + 1] = ikey[1]; + } + + SingleDES(data, buf, in_key.slice(16, 32), 'D'); + SingleDES(buf, data, in_key.slice(0, 16), 'E'); + + return data.join('') + } + } +})() + +try { + module.exports = DES +} catch (error) { + +} diff --git a/www/swa/token/jssrc/index.js b/www/swa/token/jssrc/index.js new file mode 100644 index 0000000..9df2aa5 --- /dev/null +++ b/www/swa/token/jssrc/index.js @@ -0,0 +1,26 @@ +var des, sm4; +try { + des = require('./des.js') +} catch (error) { + des = new DES() +} + +try { + sm4 = require('./sm4.js') +} catch (error) { + sm4 = SM4 +} + +var softcrypt = { + CalDES: des.CalDES, + Cal919MAC: des.CalANSI919MAC, + Cal99MAC: des.CalX99MAC, + CalSM4: sm4.SM4CryptECB, + CalSM4MAC: sm4.SM4MACGenerated +} + +try { + module.exports = softcrypt +} catch (error) { + +} diff --git a/www/swa/token/jssrc/sm4.js b/www/swa/token/jssrc/sm4.js new file mode 100644 index 0000000..effeb2a --- /dev/null +++ b/www/swa/token/jssrc/sm4.js @@ -0,0 +1,318 @@ +var SM4 = {}; + +(function () { + var SM4_ENCRYPT = 1 + var SM4_DECRYPT = 0 + + function sm4_context() { + this.mode = 0; + this.sk = [] + } + + function GET_ULONG_BE(n, b, i) { + return (b[i] << 24) | (b[i + 1] << 16) | (b[i + 2]) << 8 | (b[i + 3]) + } + + function PUT_ULONG_BE(n, b, i) { + b[i] = n >>> 24 + b[i + 1] = n >>> 16 + b[i + 2] = n >>> 8 + b[i + 3] = n + } + + function ROTL(x, n) { + var a = (x & 0xFFFFFFFF) << n + var b = x >>> (32 - n) + + return a | b + } + + var SboxTable = [ + [0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05], + [0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99], + [0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0xed, 0xcf, 0xac, 0x62], + [0xe4, 0xb3, 0x1c, 0xa9, 0xc9, 0x08, 0xe8, 0x95, 0x80, 0xdf, 0x94, 0xfa, 0x75, 0x8f, 0x3f, 0xa6], + [0x47, 0x07, 0xa7, 0xfc, 0xf3, 0x73, 0x17, 0xba, 0x83, 0x59, 0x3c, 0x19, 0xe6, 0x85, 0x4f, 0xa8], + [0x68, 0x6b, 0x81, 0xb2, 0x71, 0x64, 0xda, 0x8b, 0xf8, 0xeb, 0x0f, 0x4b, 0x70, 0x56, 0x9d, 0x35], + [0x1e, 0x24, 0x0e, 0x5e, 0x63, 0x58, 0xd1, 0xa2, 0x25, 0x22, 0x7c, 0x3b, 0x01, 0x21, 0x78, 0x87], + [0xd4, 0x00, 0x46, 0x57, 0x9f, 0xd3, 0x27, 0x52, 0x4c, 0x36, 0x02, 0xe7, 0xa0, 0xc4, 0xc8, 0x9e], + [0xea, 0xbf, 0x8a, 0xd2, 0x40, 0xc7, 0x38, 0xb5, 0xa3, 0xf7, 0xf2, 0xce, 0xf9, 0x61, 0x15, 0xa1], + [0xe0, 0xae, 0x5d, 0xa4, 0x9b, 0x34, 0x1a, 0x55, 0xad, 0x93, 0x32, 0x30, 0xf5, 0x8c, 0xb1, 0xe3], + [0x1d, 0xf6, 0xe2, 0x2e, 0x82, 0x66, 0xca, 0x60, 0xc0, 0x29, 0x23, 0xab, 0x0d, 0x53, 0x4e, 0x6f], + [0xd5, 0xdb, 0x37, 0x45, 0xde, 0xfd, 0x8e, 0x2f, 0x03, 0xff, 0x6a, 0x72, 0x6d, 0x6c, 0x5b, 0x51], + [0x8d, 0x1b, 0xaf, 0x92, 0xbb, 0xdd, 0xbc, 0x7f, 0x11, 0xd9, 0x5c, 0x41, 0x1f, 0x10, 0x5a, 0xd8], + [0x0a, 0xc1, 0x31, 0x88, 0xa5, 0xcd, 0x7b, 0xbd, 0x2d, 0x74, 0xd0, 0x12, 0xb8, 0xe5, 0xb4, 0xb0], + [0x89, 0x69, 0x97, 0x4a, 0x0c, 0x96, 0x77, 0x7e, 0x65, 0xb9, 0xf1, 0x09, 0xc5, 0x6e, 0xc6, 0x84], + [0x18, 0xf0, 0x7d, 0xec, 0x3a, 0xdc, 0x4d, 0x20, 0x79, 0xee, 0x5f, 0x3e, 0xd7, 0xcb, 0x39, 0x48] + ] + + var FK = [0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc]; + var CK = [ + 0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269, + 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9, + 0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249, + 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9, + 0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229, + 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299, + 0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209, + 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279 + ] + + function sm4Sbox(n) { + var l = n >>> 4 + var r = n % 16 + return SboxTable[l][r] + } + + function sm4Lt(ka) { + var bb = 0; + var c = 0; + var a = new Uint8Array(4); + var b = new Array(4); + PUT_ULONG_BE(ka, a, 0) + b[0] = sm4Sbox(a[0]) + b[1] = sm4Sbox(a[1]) + b[2] = sm4Sbox(a[2]) + b[3] = sm4Sbox(a[3]) + bb = GET_ULONG_BE(bb, b, 0) + + c = bb ^ (ROTL(bb, 2)) ^ (ROTL(bb, 10)) ^ (ROTL(bb, 18)) ^ (ROTL(bb, 24)) + return c; + } + + function sm4F(x0, x1, x2, x3, rk) { + return (x0 ^ sm4Lt(x1 ^ x2 ^ x3 ^ rk)) + } + + function sm4CalciRK(ka) { + var bb = 0; + var rk = 0; + var a = new Uint8Array(4); + var b = new Array(4); + PUT_ULONG_BE(ka, a, 0) + b[0] = sm4Sbox(a[0]); + b[1] = sm4Sbox(a[1]); + b[2] = sm4Sbox(a[2]); + b[3] = sm4Sbox(a[3]); + bb = GET_ULONG_BE(bb, b, 0) + + rk = bb ^ (ROTL(bb, 13)) ^ (ROTL(bb, 23)) + + return rk; + } + + function sm4_setkey(SK, key) { + var MK = new Array(4); + var k = new Array(36); + var i = 0; + MK[0] = GET_ULONG_BE(MK[0], key, 0); + MK[1] = GET_ULONG_BE(MK[1], key, 4); + MK[2] = GET_ULONG_BE(MK[2], key, 8); + MK[3] = GET_ULONG_BE(MK[3], key, 12); + + k[0] = MK[0] ^ FK[0] + k[1] = MK[1] ^ FK[1] + k[2] = MK[2] ^ FK[2] + k[3] = MK[3] ^ FK[3] + + for (; i < 32; i++) { + k[i + 4] = k[i] ^ (sm4CalciRK(k[i + 1] ^ k[i + 2] ^ k[i + 3] ^ CK[i])) + SK[i] = k[i + 4]; + } + } + + function sm4_one_round(sk, input, output) { + var i = 0; + var ulbuf = new Array(36); + + ulbuf[0] = GET_ULONG_BE(ulbuf[0], input, 0) + ulbuf[1] = GET_ULONG_BE(ulbuf[1], input, 4) + ulbuf[2] = GET_ULONG_BE(ulbuf[2], input, 8) + ulbuf[3] = GET_ULONG_BE(ulbuf[3], input, 12) + while (i < 32) { + ulbuf[i + 4] = sm4F(ulbuf[i], ulbuf[i + 1], ulbuf[i + 2], ulbuf[i + 3], sk[i]); + i++; + } + + PUT_ULONG_BE(ulbuf[35], output, 0); + PUT_ULONG_BE(ulbuf[34], output, 4); + PUT_ULONG_BE(ulbuf[33], output, 8); + PUT_ULONG_BE(ulbuf[32], output, 12); + } + + function sm4_setkey_enc(ctx, key) { + ctx.mode = SM4_ENCRYPT; + sm4_setkey(ctx.sk, key); + } + + function sm4_setkey_dec(ctx, key) { + var i, j; + ctx.mode = SM4_ENCRYPT; + sm4_setkey(ctx.sk, key); + for (i = 0; i < 16; i++) { + j = ctx.sk[31 - i] + ctx.sk[31 - i] = ctx.sk[i] + ctx.sk[i] = j + } + } + + function sm4_crypt_ecb(ctx, mode, length, input, output) { + var index = 0; + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Uint8Array(16) + sm4_one_round(ctx.sk, oneInput, oneOutput); + + for (var i = 0; i < 16; i++) { + output[index + i] = oneOutput[i] + } + index += 16; + length -= 16; + } + } + + function sm4_crypt_cbc(ctx, mode, length, iv, input, output) { + var i; + var temp = new Array(16); + var index = 0; + + if (mode == SM4_ENCRYPT) { + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Array(16) + for (i = 0; i < 16; i++) { + oneOutput[i] = oneInput[i] ^ iv[i] + } + + sm4_one_round(ctx.sk, oneOutput, oneOutput); + + for (i = 0; i < 16; i++) { + iv[i] = oneOutput[i] + output[index + i] = oneOutput[i] + } + + index += 16; + length -= 16; + } + } else /* SM4_DECRYPT */ { + while (length > 0) { + var oneInput = input.slice(index, index + 16) + var oneOutput = new Array(16) + index += 16; + for (i = 0; i < 16; i++) { + temp[i] = oneInput[i] + } + + sm4_one_round(ctx.sk, oneInput, oneOutput); + + for (i = 0; i < 16; i++) { + oneOutput[i] = oneOutput[i] ^ iv[i] + output[index + i] = oneOutput[i] + } + + for (i = 0; i < 16; i++) { + iv[i] = temp[i] + } + + index += 16; + length -= 16; + } + } + } + + function strfix(str, len) { + var length = len - str.length + while (length-- > 0) { + str = "0" + str + } + return str + } + + function HEXStrXOR(str1, str2) { + var buf1 = hex2Array(str1) + var buf2 = hex2Array(str2) + + var result = '' + for (var i = 0; i < 16; i++) { + result += strfix((buf1[i] ^ buf2[i]).toString(16).toUpperCase(), 2) + } + + return result + } + + function hex2Array(str) { + var len = str.length / 2, + substr = '', + result = new Array(len); + for (var i = 0; i < len; i++) { + substr = str.slice(2 * i, 2 * (i + 1)) + result[i] = parseInt(substr, 16) || 0 + } + return result + } + + SM4.SM4CryptECB = function (szData, sCryptFlag, szSM4Key) { + if (szSM4Key.length !== 32) { + console.log("传入密钥[" + szSM4Key + "]长度不为32位"); + return ""; + } + var len = szData.length + var count = len % 32 + if(count !== 0) { + count = 32 - count + len += count + while (count --) { + szData += '0' + } + } + + var ctx = new sm4_context() + var lpbKey = hex2Array(szSM4Key) + if (sCryptFlag === SM4_ENCRYPT) { + sm4_setkey_enc(ctx, lpbKey); //加密 + } else { + sm4_setkey_dec(ctx, lpbKey); //解密 + } + + var lpbData = hex2Array(szData) + var pbyCryptResult = new Array(len / 2) + sm4_crypt_ecb(ctx, sCryptFlag, len / 2, lpbData, pbyCryptResult) + var szResult = '' + for (var i = 0; i < len / 2; i++) { + szResult += strfix(pbyCryptResult[i].toString(16), 2).toUpperCase() + } + + return szResult; + } + + SM4.SM4MACGenerated = function (szData, szSM4Key) { + if (szSM4Key.length !== 32) { + console.log("传入密钥[" + szSM4Key + "]长度不为32位"); + return ""; + } + var len = szData.length + var count = Math.floor(len / 32) + if (len % 32 !== 0) { + count += 1; + var dvalue = count * 32 - len + while(dvalue--) szData += '0'; + len = count * 32 + } + + var szResult = '', macString = ''; + for (var i = 0; i < count; i++) { + macString = szData.slice(32 * i, 32 * (i + 1)) + if (i > 0) { + macString = HEXStrXOR(macString, szResult); + } + szResult = SM4.SM4CryptECB(macString, 1, szSM4Key); + } + return szResult + } +})() + +try { + module.exports = SM4 +} catch (error) { + +} diff --git a/www/swa/token/jssrc/test.js b/www/swa/token/jssrc/test.js new file mode 100644 index 0000000..5f484af --- /dev/null +++ b/www/swa/token/jssrc/test.js @@ -0,0 +1,20 @@ +var CryptoJS = require("crypto-js"); +var fHEX = require("crypto-js/format-hex"); + +var text = CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); +var key = CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); + + +function enc(text, key){ + var encrypt = CryptoJS.TripleDES.encrypt(text, key, { + mode: CryptoJS.mode.ECB, //CBC模式 + // mode: CryptoJS.mode.ECB, //ECB模式 + padding: CryptoJS.pad.NoPadding//padding处理 + } + ); + var encryptData = encrypt.toString(fHEX);//加密完成后,转换成字符串 + console.log( encryptData ) + return encryptData; +} + +enc(text, key) diff --git a/www/swa/token/layx.min.css b/www/swa/token/layx.min.css new file mode 100644 index 0000000..b5689ef --- /dev/null +++ b/www/swa/token/layx.min.css @@ -0,0 +1 @@ +[class^=layx-]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;margin:0;padding:0}#layx-body.zlayx-body-noscroll{overflow:hidden!important}.layx-flexbox{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.layx-flex-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row;-ms-flex-flow:row;flex-flow:row}.layx-flex-row-reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-flow:row-reverse;-ms-flex-flow:row-reverse;flex-flow:row-reverse}.layx-flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column}.layx-flex-center,.layx-flex-vertical-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.layx-flex-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.layx-flex-item{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#layx-salver-bar{position:fixed}#layx-salver-bar.layx-animate-salver-slide-up{-webkit-animation-name:layx-animate-salver-slide-up;animation-name:layx-animate-salver-slide-up}#layx-salver-bar.layx-animate-salver-slide-down{-webkit-animation-name:layx-animate-salver-slide-down;animation-name:layx-animate-salver-slide-down}.layx-salver-button{position:relative;overflow:hidden;background-color:#f1f1f1}.layx-salver-button:after{position:absolute;content:"";border-top:5px solid #ddd;left:0;top:0;right:0;bottom:0;width:100%;height:100%}.layx-salver-button:hover{background-color:#e9e9e9}.layx-salver-button.layx-salver-button-active{background-color:#f5f5f5}.layx-salver-button.layx-salver-button-active:after{border-top:5px solid #3baced}.layx-salver-button .layx-icon{font-size:20px;color:#666}.layx-salver-button.layx-salver-button-active .layx-icon{color:#3baced}.layx-icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden;font-size:14px;display:inline-block;line-height:normal;pointer-events:none}.layx-window{position:relative;overflow:hidden}.layx-window.layx-window-layer{position:fixed}.layx-window.layx-window-min{opacity:0;display:none}.layx-drag-layer{position:fixed;top:0;left:0;bottom:0;right:0;background-color:transparent;display:none}.layx-drag-layer.layx-drag-layer-active{display:block}.layx-animate{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layx-animate-d3s{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layx-animate-zoom-show{-webkit-animation-name:layx-animate-zoom-show;animation-name:layx-animate-zoom-show}.layx-animate-zoom-destroy{-webkit-animation-name:layx-animate-zoom-destroy;animation-name:layx-animate-zoom-destroy}.layx-animate-zoom-to-min{-webkit-animation-name:layx-animate-zoom-to-min;animation-name:layx-animate-zoom-to-min}.layx-animate-zoom-drag-to-normal{-webkit-animation-name:layx-animate-zoom-drag-to-normal;animation-name:layx-animate-zoom-drag-to-normal}.layx-animate-zoom-to-max,.layx-animate-zoom-to-normal{-webkit-transition-property:left,top,width,height;transition-property:left,top,width,height;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@-webkit-keyframes layx-animate-zoom-show{0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-show{0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-zoom-drag-to-normal{0%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}}@keyframes layx-animate-zoom-drag-to-normal{0%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}}@-webkit-keyframes layx-animate-zoom-destroy{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-destroy{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-zoom-to-min{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@keyframes layx-animate-zoom-to-min{0%{opacity:1}50%{opacity:0}to{opacity:0;-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}}@-webkit-keyframes layx-animate-salver-slide-up{0%{bottom:-45px}to{bottom:0}}@keyframes layx-animate-salver-slide-up{0%{bottom:-45px}to{bottom:0}}@-webkit-keyframes layx-animate-salver-slide-down{0%{bottom:0}to{bottom:-45px}}@keyframes layx-animate-salver-slide-down{0%{bottom:0}to{bottom:-45px}}@-webkit-keyframes layx-animate-fade-in-right{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes layx-animate-fade-in-right{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes layx-animate-fade-in-right-reverse{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes layx-animate-fade-in-right-reverse{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes layx-animate-fade-in-left{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes layx-animate-fade-in-left{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes layx-animate-slide-to-top{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes layx-animate-slide-to-top{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.layx-parclose{position:fixed;top:0;left:0;bottom:0;right:0;background-color:transparent}.layx-context-menu-bar{position:fixed;background-color:#fff;-webkit-box-shadow:rgba(0,0,0,.3) 0 2px 5px;box-shadow:0 2px 5px rgba(0,0,0,.3);border:1px solid #d5d5d5;width:180px;max-width:240px;display:none}.layx-context-menu-bar.layx-context-menu-bar-active{display:block}.layx-context-menu-button:hover{background-color:#e9e9e9}.layx-context-menu-button-label{padding-left:10px;display:inline-block;font-size:13px;color:#444}.layx-context-menu-more{color:#999;padding:0 5px}.layx-resize-bar>[class^=layx-resize-item-]{position:absolute;z-index:3;overflow:hidden;-ms-touch-action:none;touch-action:none}.layx-resize-item-bottom,.layx-resize-item-top{height:6px;left:6px;right:6px}.layx-resize-item-top{top:0;cursor:n-resize}.layx-resize-item-bottom{bottom:0;cursor:s-resize}.layx-resize-item-left,.layx-resize-item-right{width:6px;top:6px;bottom:6px}.layx-resize-item-left{left:0;cursor:w-resize}.layx-resize-item-right{right:0;cursor:e-resize}.layx-resize-item-left-bottom,.layx-resize-item-left-top,.layx-resize-item-right-bottom,.layx-resize-item-right-top{width:6px;height:6px}.layx-resize-item-left-top{left:0;top:0;cursor:nw-resize}.layx-resize-item-right-top{right:0;top:0;cursor:ne-resize}.layx-resize-item-left-bottom{left:0;bottom:0;cursor:sw-resize}.layx-resize-item-right-bottom{right:0;bottom:0;cursor:se-resize}.layx-resize-bar.layx-resize-bar-disabled>[class^=layx-resize-item-]{cursor:default!important}.layx-tool-bar{-ms-touch-action:none;touch-action:none;-webkit-overflow-scrolling:touch}.layx-action-button{text-align:center}.layx-action-button:hover{background-color:#e5e5e5}.layx-action-button.layx-action-button-destroy:hover{background-color:#e81123;color:#fff}.layx-action-button.layx-action-button-hidden{display:none;pointer-events:none}.layx-title-bar{min-width:0;padding:0 5px}.layx-window-title{font-size:14px;min-width:0;line-height:0}.layx-window-title .layx-window-title-label{display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;word-wrap:break-word;line-height:normal}.layx-title-bar .layx-window-icon{margin-right:5px}.layx-top-menu-bar{min-height:25px;background:#fff}.layx-top-menu-button{float:left;padding:0 8px;line-height:25px}.layx-top-menu-button-label{display:inline-block;font-size:13px;color:#444}.layx-top-menu-button.layx-top-menu-button-active,.layx-top-menu-button:hover{background-color:#e9e9e9}.layx-content-container{width:100%;position:relative;overflow:auto;font-size:14px;opacity:1}.layx-html-content{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.layx-content-penetrate{position:absolute;top:0;left:0;bottom:0;right:0;z-index:2;background:transparent;visibility:hidden}.layx-content-penetrate.layx-content-penetrate-active{visibility:visible}.layx-content-container.layx-content-container-fade-out{opacity:0}.layx-url-content{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1}.layx-notice{position:fixed;margin-bottom:10px;padding:16px;-webkit-box-shadow:0 1px 6px rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.2);background:#fff;width:320px;right:24px;overflow:hidden}.layx-notice.layx-animate-fade-in-right{-webkit-animation-name:layx-animate-fade-in-right;animation-name:layx-animate-fade-in-right}.layx-notice.layx-animate-fade-in-right-reverse{-webkit-animation-name:layx-animate-fade-in-right-reverse;animation-name:layx-animate-fade-in-right-reverse}.layx-notice.layx-animate-slide-to-top{-webkit-animation-name:layx-animate-slide-to-top;animation-name:layx-animate-slide-to-top}.layx-notice-close-button{position:absolute;top:10px;right:10px;z-index:1;width:16px;height:16px;border-radius:50%;cursor:pointer}.layx-notice-close-button .layx-icon{font-size:10px}.layx-notice-close-button:hover{background-color:#e81123}.layx-notice-close-button:hover .layx-icon{color:#fff}.layx-notice-icon{margin-right:16px}.layx-notice-icon .layx-icon{font-size:26px}.layx-notice-title{font-weight:700;margin-bottom:8px;font-size:14px;line-height:17px;color:#17233d;white-space:nowrap}.layx-notice-content{font-size:13px;color:#515a6e;line-height:1.5}.layx-notice-time{font-size:10px;color:#999;text-align:right;margin-top:8px}.layx-notice-process{position:absolute;left:0;bottom:0;height:2px;z-index:1;background:#dedede;width:0}.layx-notice-info{color:#009688}.layx-notice-success{color:#01aaed}.layx-notice-warning{color:#ffb800}.layx-notice-error{color:red}.layx-statu-bar{position:relative;font-size:13px} \ No newline at end of file diff --git a/www/swa/token/layx.min.js b/www/swa/token/layx.min.js new file mode 100644 index 0000000..2d392e9 --- /dev/null +++ b/www/swa/token/layx.min.js @@ -0,0 +1,5 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.layx=e():t.layx=e()}(window,function(){return(d=[function(t,e,n){(function(d){t.exports=function(){"use strict";var t=function(t){var e=t.id,n=t.viewBox,i=t.content;this.id=e,this.viewBox=n,this.content=i};t.prototype.stringify=function(){return this.content},t.prototype.toString=function(){return this.stringify()},t.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};"undefined"!=typeof window?window:void 0!==d||"undefined"!=typeof self&&self;function e(t,e){return t(e={exports:{}},e.exports),e.exports}var o=e(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return u(t,e,n)})},u}()}),n=e(function(t,e){e.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},t.exports=e.default}),i=n.svg,r=n.xlink,s={};s[i.name]=i.uri,s[r.name]=r.uri;var a=function(t,e){void 0===t&&(t="");var n=o(s,e||{}),i=function(n){return Object.keys(n).map(function(t){var e=n[t].toString().replace(/"/g,""");return t+'="'+e+'"'}).join(" ")}(n);return""+t+""};return function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},e.createFromExistingNode=function(t){return new e({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},e.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},e.prototype.mount=function(t){if(this.isMounted)return this.node;var e="string"==typeof t?document.querySelector(t):t,n=this.render();return this.node=n,e.appendChild(n),n},e.prototype.render=function(){var t=this.stringify();return function(t){var e=!!document.importNode,n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(e){return document.importNode(n,true)}return n}(a(t)).childNodes[0]},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(e.prototype,n),e}(t)}()}).call(this,n(14))},function(t,e,n){(function(H){t.exports=function(){"use strict";"undefined"!=typeof window?window:void 0!==H||"undefined"!=typeof self&&self;function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(t,e){t.exports=function(){function r(t){var e=t&&"object"==typeof t;return e&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function s(t,e){var n,i=e&&!0===e.clone;return i&&r(t)?u((n=t,Array.isArray(n)?[]:{}),t,e):t}function a(n,t,i){var o=n.slice();return t.forEach(function(t,e){void 0===o[e]?o[e]=s(t,i):r(t)?o[e]=u(n[e],t,i):-1===n.indexOf(t)&&o.push(s(t,i))}),o}function d(e,n,i){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=s(e[t],i)}),Object.keys(n).forEach(function(t){r(n[t])&&e[t]?o[t]=u(e[t],n[t],i):o[t]=s(n[t],i)}),o}function u(t,e,n){var i=Array.isArray(e),o=n||{arrayMerge:a},r=o.arrayMerge||a;return i?Array.isArray(t)?r(t,e,n):s(e,n):d(t,e,n)}return u.all=function(t,n){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,e){return u(t,e,n)})},u}()});var e=t(function(t,e){e.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},t.exports=e.default}),n=e.svg,i=e.xlink,o={};o[n.name]=n.uri,o[i.name]=i.uri;var r,s=function(t,e){void 0===t&&(t="");var n=a(o,e||{}),i=function(n){return Object.keys(n).map(function(t){var e=n[t].toString().replace(/"/g,""");return t+'="'+e+'"'}).join(" ")}(n);return""+t+""},d=e.svg,u=e.xlink,p={attrs:(r={style:["position: absolute","width: 0","height: 0"].join("; ")},r[d.name]=d.uri,r[u.name]=u.uri,r)},l=function(t){this.config=a(p,t||{}),this.symbols=[]};l.prototype.add=function(t){var e=this.symbols,n=this.find(t.id);return n?(e[e.indexOf(n)]=t,!1):(e.push(t),!0)},l.prototype.remove=function(t){var e=this.symbols,n=this.find(t);return!!n&&(e.splice(e.indexOf(n),1),n.destroy(),!0)},l.prototype.find=function(e){return this.symbols.filter(function(t){return t.id===e})[0]||null},l.prototype.has=function(t){return null!==this.find(t)},l.prototype.stringify=function(){var t=this.config,e=t.attrs,n=this.symbols.map(function(t){return t.stringify()}).join("");return s(n,e)},l.prototype.toString=function(){return this.stringify()},l.prototype.destroy=function(){this.symbols.forEach(function(t){return t.destroy()})};var c=function(t){var e=t.id,n=t.viewBox,i=t.content;this.id=e,this.viewBox=n,this.content=i};c.prototype.stringify=function(){return this.content},c.prototype.toString=function(){return this.stringify()},c.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};var h=function(t){var e=!!document.importNode,n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;return e?document.importNode(n,!0):n},f=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},e.createFromExistingNode=function(t){return new e({id:t.getAttribute("id"),viewBox:t.getAttribute("viewBox"),content:t.outerHTML})},e.prototype.destroy=function(){this.isMounted&&this.unmount(),t.prototype.destroy.call(this)},e.prototype.mount=function(t){if(this.isMounted)return this.node;var e="string"==typeof t?document.querySelector(t):t,n=this.render();return this.node=n,e.appendChild(n),n},e.prototype.render=function(){var t=this.stringify();return h(s(t)).childNodes[0]},e.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(e.prototype,n),e}(c),m={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},w=function(t){return Array.prototype.slice.call(t,0)},v={isChrome:function(){return/chrome/i.test(navigator.userAgent)},isFirefox:function(){return/firefox/i.test(navigator.userAgent)},isIE:function(){return/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)},isEdge:function(){return/edge/i.test(navigator.userAgent)}},y=function(t){return(t||window.location.href).split("#")[0]},g=function(i){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",function(t,e,n){!function(t,e){var n=document.createEvent("CustomEvent");n.initCustomEvent(t,false,false,e),window.dispatchEvent(n)}(i,{oldUrl:n,newUrl:e})})}])},b=function(t,n){return void 0===n&&(n="linearGradient, radialGradient, pattern"),w(t.querySelectorAll("symbol")).forEach(function(e){w(e.querySelectorAll(n)).forEach(function(t){e.parentNode.insertBefore(t,e)})}),t};var x=e.xlink.uri,_="xlink:href",C=/[{}|\\\^\[\]`"<>]/g;function E(t){return t.replace(C,function(t){return"%"+t[0].charCodeAt(0).toString(16).toUpperCase()})}var O,M=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],B=M.map(function(t){return"["+t+"]"}).join(","),I=function(t,e,n,i){var o=E(n),r=E(i),s=t.querySelectorAll(B),a=function(t,o){return w(t).reduce(function(t,e){if(!e.attributes)return t;var n=w(e.attributes),i=o?n.filter(o):n;return t.concat(i)},[])}(s,function(t){var e=t.localName,n=t.value;return-1!==M.indexOf(e)&&-1!==n.indexOf("url("+o)});a.forEach(function(t){return t.value=t.value.replace(new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(o),"g"),r)}),function(t,i,o){w(t).forEach(function(t){var e=t.getAttribute(_);if(e&&0===e.indexOf(i)){var n=e.replace(i,o);t.setAttributeNS(x,_,n)}})}(e,o,r)},S={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},j=function(s){function t(t){var e=this;void 0===t&&(t={}),s.call(this,a(m,t));var n=function(i){return i=i||Object.create(null),{on:function(t,e){(i[t]||(i[t]=[])).push(e)},off:function(t,e){i[t]&&i[t].splice(i[t].indexOf(e)>>>0,1)},emit:function(e,n){(i[e]||[]).map(function(t){t(n)}),(i["*"]||[]).map(function(t){t(e,n)})}}}();this._emitter=n,this.node=null;var i=this.config;if(i.autoConfigure&&this._autoConfigure(t),i.syncUrlsWithBaseTag){var o=document.getElementsByTagName("base")[0].getAttribute("href");n.on(S.MOUNT,function(){return e.updateUrls("#",o)})}var r=this._handleLocationChange.bind(this);this._handleLocationChange=r,i.listenLocationChangeEvent&&window.addEventListener(i.locationChangeEvent,r),i.locationChangeAngularEmitter&&g(i.locationChangeEvent),n.on(S.MOUNT,function(t){i.moveGradientsOutsideSymbol&&b(t)}),n.on(S.SYMBOL_MOUNT,function(t){i.moveGradientsOutsideSymbol&&b(t.parentNode),(v.isIE()||v.isEdge())&&function(t){var e=[];w(t.querySelectorAll("style")).forEach(function(t){t.textContent+="",e.push(t)})}(t)})}s&&(t.__proto__=s),(t.prototype=Object.create(s&&s.prototype)).constructor=t;var e={isMounted:{}};return e.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(t){var e=this.config;void 0===t.syncUrlsWithBaseTag&&(e.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===t.locationChangeAngularEmitter&&(e.locationChangeAngularEmitter="angular"in window),void 0===t.moveGradientsOutsideSymbol&&(e.moveGradientsOutsideSymbol=v.isFirefox())},t.prototype._handleLocationChange=function(t){var e=t.detail,n=e.oldUrl,i=e.newUrl;this.updateUrls(n,i)},t.prototype.add=function(t){var e=s.prototype.add.call(this,t);return this.isMounted&&e&&(t.mount(this.node),this._emitter.emit(S.SYMBOL_MOUNT,t.node)),e},t.prototype.attach=function(t){var e=this,n=this;if(n.isMounted)return n.node;var i="string"==typeof t?document.querySelector(t):t;return n.node=i,this.symbols.forEach(function(t){t.mount(n.node),e._emitter.emit(S.SYMBOL_MOUNT,t.node)}),w(i.querySelectorAll("symbol")).forEach(function(t){var e=f.createFromExistingNode(t);e.node=t,n.add(e)}),this._emitter.emit(S.MOUNT,i),i},t.prototype.destroy=function(){var t=this.config,e=this.symbols,n=this._emitter;e.forEach(function(t){return t.destroy()}),n.off("*"),window.removeEventListener(t.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(t,e){void 0===t&&(t=this.config.mountTo),void 0===e&&(e=!1);if(this.isMounted)return this.node;var n="string"==typeof t?document.querySelector(t):t,i=this.render();return this.node=i,e&&n.childNodes[0]?n.insertBefore(i,n.childNodes[0]):n.appendChild(i),this._emitter.emit(S.MOUNT,i),i},t.prototype.render=function(){return h(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(t,e){if(!this.isMounted)return!1;var n=document.querySelectorAll(this.config.usagesToUpdate);return I(this.node,n,y(t)+"#",y(e)+"#"),!0},Object.defineProperties(t.prototype,e),t}(l),A=t(function(t){ +/*! + * domready (c) Dustin Diaz 2014 - License MIT + */ +t.exports=function(){var t,e=[],n=document,i=n.documentElement.doScroll,o="DOMContentLoaded",r=(i?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return r||n.addEventListener(o,t=function(){for(n.removeEventListener(o,t),r=1;t=e.shift();)t()}),function(t){r?setTimeout(t,0):e.push(t)}}()}),P="__SVG_SPRITE_NODE__",k="__SVG_SPRITE__";window[k]?O=window[k]:(O=new j({attrs:{id:P}}),window[k]=O);var T=function(){var t=document.getElementById(P);t?O.attach(t):O.mount(document.body,!0)};return document.body?T():A(T),O}()}).call(this,n(14))},function(t,e,n){"use strict";function o(t,i,o){void 0===o&&(o="layx-");for(var e=[],n=3;ninnerWidth&&(u=a-r),void 0!==i?p=i:s+d>innerHeight&&(p=d-s),m.addClasses(this.element,this.app.prefix,"context-menu-bar-active"),m.addStyles(this.element,{zIndex:""+e,top:p+"px",left:u+"px"})}},w.prototype.updateChildrenOffset=function(t,e,n){if(!this.isTopMenu&&e&&e.parentElement&&e.parentElement.parentElement){var i=e.parentElement.parentElement,o=getComputedStyle(i),r=Number(o.width.replace("px","")),s=Number(o.left.replace("px","")),a=Number(o.top.replace("px","")),d=getComputedStyle(e),u=Number(d.width.replace("px","")),p=e.childElementCount*f.default.height,l=f.default.height*n,c=r+s-w.offset,h=a+l-w.offset;r+s+u>innerWidth&&(c=s-u+w.offset),a+l+p>innerHeight&&(h=innerHeight-p-w.offset),m.addClasses(e,this.app.prefix,"context-menu-bar-active"),m.addStyles(e,{top:h+"px",left:c+"px"})}},w.prototype.hideChildren=function(t){this.isTopMenu||m.removeClasses(t,this.app.prefix,"context-menu-bar-active")},w.prototype.createContextMenuButtons=function(t){if(!1!==this.contextMenuButtons){for(var e=Array(),n=0,i=0,o=this.contextMenuButtons;i=innerHeight-50){if(i.containClass(o.salver.element,o.prefix,"salver-bar-keep"))return;o.salver.show()}else{if(!i.containClass(o.salver.element,o.prefix,"salver-bar-keep"))return;o.salver.show(!1)}},this.init()}e.default=u},function(module,exports,__webpack_require__){"use strict";var __extends=this&&this.__extends||(bp=function(t,e){return(bp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}bp(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),bp;Object.defineProperty(exports,"__esModule",{value:!0});var UIComponent_1=__webpack_require__(6),UIParclose_1=__webpack_require__(19),UIResizeBar_1=__webpack_require__(20),UIToolBar_1=__webpack_require__(22),UIActionButton_1=__webpack_require__(13),UIContextMenuBar_1=__webpack_require__(10),UITopMenuBar_1=__webpack_require__(28),UISalverBar_1=__webpack_require__(30),UIContent_1=__webpack_require__(32),UIStatuBar_1=__webpack_require__(35),ElementHelper=__webpack_require__(2),CastHelper=__webpack_require__(3),TypeHelper=__webpack_require__(5),ExceptionHelper=__webpack_require__(8),StringHelper=__webpack_require__(9),UIWindow=function(_super){function UIWindow(t,e){var n,i,o=_super.call(this,t)||this;return o.zIndex=o.app.zIndex,o.enableAnimated=!1,o.status="normal",o.lastStatus="none",o.flickering=!1,o.width=800,o.height=600,o.maxWidth=innerWidth,o.maxHeight=innerHeight,o.minWidth=200,o.minHeight=200,o.background="#ffffff",o.shadow="rgba(0, 0, 0, 0.3) 1px 1px 24px",o.parclose=!1,o.mode="layer",o.border=null,o.borderRadius=null,o.animate="zoom",o.resizeBar={},o.toolBar={},o.contextMenu=!1,o.topMenu=!1,o.content={},o.statuBar=!1,o.storeStatus=!0,o._element=null,o._flickerShadow=null,o._lastStoreStatus=null,TypeHelper.isStringWithNotEmpty(e.id)||ExceptionHelper.assertId(),o.id=e.id,o.elementId=o.app.prefix+o.id,o.mode=CastHelper.windowModeCast(e.mode,o.mode),o.width=CastHelper.numberCast(e.width,o.width),o.height=CastHelper.numberCast(e.height,o.height),o.maxWidth=Math.min(CastHelper.numberCast(e.maxWidth,o.maxWidth),o.maxWidth),o.maxHeight=Math.min(CastHelper.numberCast(e.maxHeight,o.maxHeight),o.maxHeight),o.minWidth=Math.max(CastHelper.numberCast(e.minWidth,o.minWidth),o.minWidth),o.minHeight=Math.max(CastHelper.numberCast(e.minHeight,o.minHeight),o.minHeight),o.width=Math.max(o.minWidth,o.width),o.width=Math.min(o.maxWidth,o.width),o.height=Math.max(o.minHeight,o.height),o.height=Math.min(o.maxHeight,o.height),n=CastHelper.offsetCast(e.offset,o.width,o.height),o.left=n[0],o.top=n[1],o.background=CastHelper.stringOrBooleanStyleCast(e.background,o.background),o.shadow=CastHelper.stringOrBooleanStyleCast(e.shadow,o.shadow),o.parclose=CastHelper.typeOrBooleanCast(e.parclose,o.parclose,0),i=CastHelper.borderCast(e.border,{width:1,style:"solid",color:"#3baced",radius:4}),o.border=i[0],o.borderRadius=i[1],o.animate=CastHelper.windowAnimateCast(e.animate,o.animate),o.enableAnimated="none"!==o.animate,o.resizeBar=CastHelper.jsonOrBooleanCast(e.resizeBar,o.resizeBar),o.toolBar=CastHelper.jsonOrBooleanCast(e.toolBar,o.toolBar),o.contextMenu=CastHelper.contextMenuButtonsCast(e.contextMenu),o.topMenu=CastHelper.contextMenuButtonsCast(e.topMenu),o.content=CastHelper.jsonOrBooleanCast(e.content,o.content),o.statuBar=CastHelper.jsonOrBooleanCast(e.statuBar,o.statuBar),o.storeStatus=CastHelper.booleanCast(e.storeStatus,o.storeStatus),o}return __extends(UIWindow,_super),Object.defineProperty(UIWindow.prototype,"element",{get:function(){return document.getElementById(this.elementId)},enumerable:!0,configurable:!0}),Object.defineProperty(UIWindow.prototype,"flickerShadow",{get:function(){return this.getFlickerShadow()},enumerable:!0,configurable:!0}),Object.defineProperty(UIWindow.prototype,"lastStoreStatus",{get:function(){var storeStatus=localStorage.getItem(this.app.prefix+this.id);return storeStatus?eval("("+storeStatus+")"):null},set:function(t){localStorage.setItem(this.app.prefix+this.id,JSON.stringify(t))},enumerable:!0,configurable:!0}),UIWindow.prototype.present=function(){var e=this,t=ElementHelper.createFragment(),n=ElementHelper.createElement("div");if(n.id=this.elementId,n.setAttribute("data-window-id",this.id),ElementHelper.addClasses(n,this.app.prefix,"window","window-"+this.mode,"flexbox","flex-column",this.enableAnimated?"animate":"",this.enableAnimated?"animate-"+this.animate+"-show":""),this.readStoreStatus(),ElementHelper.addStyles(n,{zIndex:"layer"===this.mode?""+this.zIndex:null,maxWidth:this.maxWidth+"px",maxHeight:this.maxHeight+"px",minWidth:this.minWidth+"px",minHeight:this.minHeight+"px",width:this.width+"px",height:this.height+"px",top:"layer"===this.mode?this.top+"px":null,left:"layer"===this.mode?this.left+"px":null,background:this.background,border:this.border,borderRadius:this.borderRadius,webkitBorderRadius:this.borderRadius,boxShadow:this.shadow,webkitBoxShadow:this.shadow}),n.addEventListener("mousedown",function(t){e.updateZIndex()},!0),!1!==this.toolBar){var i=new UIToolBar_1.default(this.app,this,this.toolBar),o=i.present();n.appendChild(o),this.setComponent("tool-bar",i)}if(!1!==this.topMenu){var r=new UITopMenuBar_1.default(this.app,this,this.topMenu),s=r.present();n.appendChild(s),this.setComponent("top-menu-bar",r)}if(!1!==this.content){var a=new UIContent_1.default(this.app,this,this.content),d=a.present();n.appendChild(d),this.setComponent("content-container",a)}if(!1!==this.resizeBar){var u=new UIResizeBar_1.default(this.app,this,this.resizeBar),p=u.present();n.appendChild(p),this.setComponent("resize-bar",u)}if(!1!==this.statuBar){var l=new UIStatuBar_1.default(this.app,this,this.statuBar),c=l.present();n.appendChild(c),this.setComponent("statu-bar",l)}if(!1!==this.parclose){var h=new UIParclose_1.default(this.app,this,{opacity:this.parclose}),f=h.present();t.appendChild(f),this.setComponent("parclose",h),this.app.salver&&this.app.salver.parsecloseCount++}if(!1!==this.contextMenu){var m=new UIContextMenuBar_1.default(this.app,this,"window",this.contextMenu),w=m.present();t.appendChild(w),this.setComponent("context-menu-bar",m)}if(this.bindEvent(n),!this.app.salver){var v=new UISalverBar_1.default(this.app),y=v.present();t.appendChild(y),this.app.salver=v}return t.appendChild(n),t},UIWindow.prototype.readStoreStatus=function(){var t=this.lastStoreStatus;this.storeStatus&&(t?(this.width=t.width,this.height=t.height,this.top=t.top,this.left=t.left):this.lastStoreStatus={top:this.top,left:this.left,width:this.width,height:this.height})},UIWindow.prototype.handlerContentByAnimate=function(t){void 0===t&&(t=!0);var e=this.getComponent("content-container");e&&(t?ElementHelper.addClasses(e.element,this.app.prefix,"content-container-fade-out"):ElementHelper.removeClasses(e.element,this.app.prefix,"content-container-fade-out"))},UIWindow.prototype.bindEvent=function(t){var n=this;!1!==this.contextMenu&&t.addEventListener("contextmenu",function(t){t.preventDefault(),t.returnValue=!1;var e=n.getComponent("context-menu-bar");return e&&e.updateOffset(t,n.zIndex+1),!1}),t.addEventListener("animationstart",function(t){n.handlerContentByAnimate()}),t.addEventListener("animationend",function(t){var e=n.element;ElementHelper.removeClasses(e,n.app.prefix,"animate-"+n.animate+"-show","animate-"+n.animate+"-drag-to-normal"),ElementHelper.containClass(e,n.app.prefix,"animate-"+n.animate+"-destroy")&&n.remove(),ElementHelper.containClass(e,n.app.prefix,"animate-"+n.animate+"-to-min")&&n.minimize(),n.handlerContentByAnimate(!1)}),t.addEventListener("transitionend",function(t){ElementHelper.removeClasses(n.element,n.app.prefix,"animate-"+n.animate+"-to-max","animate-"+n.animate+"-to-normal"),n.handlerContentByAnimate(!1)})},UIWindow.prototype.destroy=function(){this.enableAnimated?ElementHelper.addClasses(this.element,this.app.prefix,"animate-"+this.animate+"-destroy"):this.remove()},UIWindow.prototype.remove=function(){"max"===this.status&&ElementHelper.removeClasses(document.body,"z"+this.app.prefix,"body-noscroll");var t=this.getComponent("parclose");t&&(ElementHelper.removeElement(t.element),this.app.salver&&this.app.salver.parsecloseCount--),this.app.salver&&this.app.salver.removeItem();var e=this.app.windows.indexOf(this);this.app.windows.splice(e,1),this.app.window=null,ElementHelper.removeElement(this.element)},UIWindow.prototype.normal=function(t){void 0===t&&(t=!1);var e=this.element;if(e&&e.parentElement&&"normal"!==this.status){this.lastStatus=this.status,this.status="normal",this.handlerContentByAnimate(),ElementHelper.removeClasses(document.body,"z"+this.app.prefix,"body-noscroll"),ElementHelper.addClasses(e,this.app.prefix,this.enableAnimated?!1===t?"animate-"+this.animate+"-to-normal":"animate-"+this.animate+"-drag-to-normal":""),ElementHelper.addStyles(e,{top:this.top+"px",left:this.left+"px",width:this.width+"px",height:this.height+"px",borderRadius:this.borderRadius});var n=this.getComponent("resize-bar");n&&ElementHelper.removeClasses(n.element,this.app.prefix,"resize-bar-disabled");var i=this.getComponent("\n tool-bar\n /action-bar\n /action-buttons");if(i&&0!==i.length){for(var o=0,r=i;othis.window.width/2&&ethis.window.width/2&&e>=innerWidth-this.window.width&&(this._left=e-this.window.width/2),this.window.top=o,this.window.left=this._left,this.window.normal(!0))},u.prototype.mouseStar=function(t){this.app.drayLayer.updateZIndex(this.window.zIndex-1),this.content=this.window.getComponent("content-container"),this.content&&this.content.showPenetrate()},u.prototype.mouseMove=function(t){t.preventDefault()},u.prototype.mouseEnd=function(t){},u);function u(t,e,n,i){var o=r.call(this,n)||this;return o.app=t,o.window=e,o.dragMoveOptions=i,o.emerge=10,o._top=0,o._left=0,o._originTop=0,o._originLeft=0,o._lastTime=null,o.content=null,o}e.default=d},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(4),f=n(10),m=n(13),w=n(2),a=n(3),d=(r=s.default,o(v,r),Object.defineProperty(v.prototype,"element",{get:function(){return document.getElementById(""+this.elementId)},enumerable:!0,configurable:!0}),v.prototype.present=function(){var t=w.createFragment();if(!0===this.enable){var e=w.createElement("div");e.setAttribute("data-window-id",this.window.id),e.id=this.elementId,w.addClasses(e,this.app.prefix,"action-bar","flexbox","flex-row"),e.addEventListener("mousedown",function(t){t.preventDefault(),t.stopPropagation()}),e.addEventListener("contextmenu",function(t){return t.preventDefault(),t.stopPropagation(),t.returnValue=!1},!0),this.createActionButtons(e),t.appendChild(e)}return t},v.prototype.zoomActionButtons=function(t){if(!1!==this.items){var e=t<=v.actionButtonZoomWidth,n=this.getComponent("action-buttons");if(n){for(var i=n.slice().reverse(),o=i[0],r=i.slice(1),s=Array(),a=0,d=r=r.reverse();a=parent.innerHeight-50){if(a.containClass(i.app.salver.element,i.app.prefix,"salver-bar-keep"))return;i.app.salver.show()}else{if(!a.containClass(i.app.salver.element,i.app.prefix,"salver-bar-keep"))return;i.app.salver.show(!1)}},i.url=d.stringCast(n),i}e.default=l},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(4),a=n(2),d=n(3),u=n(5),p=(r=s.default,o(l,r),Object.defineProperty(l.prototype,"element",{get:function(){return document.getElementById(""+this.elementId)},enumerable:!0,configurable:!0}),l.prototype.present=function(){var t=a.createFragment(),e=a.createElement("div");if(e.setAttribute("data-window-id",this.window.id),e.id=this.elementId,a.addClasses(e,this.app.prefix,"statu-bar"),a.addStyles(e,{height:this.height+"px",background:""+this.background}),u.isElement(this.content)){var n=this.content.cloneNode(!0);a.addStyles(n,{display:"inherit"}),e.appendChild(n)}else e.innerHTML=this.content;return t.appendChild(e),t},l);function l(t,e,n){var i=r.call(this,t,e)||this;return i.elementId=i.window.elementId+"-statu-bar",i.height=30,i.background="#e5e5e5",i.content="",i._element=null,i.height=d.numberCast(n.height,i.height),i.background=d.stringOrBooleanStyleCast(n.background,i.background),i.content=d.stringOrElementCast(n.content),i}e.default=p},function(t,e,n){"use strict";var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r,s=n(6),a=n(7),d=n(2),u=n(3),p=n(37),l=(r=s.default,o(c,r),Object.defineProperty(c.prototype,"element",{get:function(){return document.getElementById(this.elementId)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"processElement",{get:function(){return this.element?this.element.querySelector("."+this.app.prefix+"notice-process"):null},enumerable:!0,configurable:!0}),c.prototype.present=function(){var t=d.createFragment(),e=d.createElement("div");e.id=this.elementId,d.addClasses(e,this.app.prefix,"notice","animate-d3s","animate-fade-in-right"),d.addStyles(e,{zIndex:""+this.id}),this.bindEvent(e),this.createClose(e);var n=d.createElement("div");d.addClasses(n,this.app.prefix,"notice-container","flexbox","flex-row");var i=d.createElement("div");d.addClasses(i,this.app.prefix,"notice-icon","notice-"+this.type);var o=new a.default(this.app,""+this.type).present();i.appendChild(o),n.appendChild(i);var r=d.createElement("div");return d.addClasses(r,this.app.prefix,"notice-message","flex-item"),this.createTitle(r),this.createContent(r),n.appendChild(r),e.appendChild(n),this.createNoticeTime(e),this.createProcess(e),t.appendChild(e),t},c.prototype.createClose=function(t){var e=this,n=d.createElement("div");d.addClasses(n,this.app.prefix,"notice-close-button","flexbox","flex-center");var i=new a.default(this.app,"destroy").present();n.appendChild(i),n.addEventListener("mousedown",function(t){e.destroy()}),t.appendChild(n)},c.prototype.createTitle=function(t){if(void 0!==this.title){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-title","notice-"+this.type),e.innerText=this.title,t.appendChild(e)}},c.prototype.createContent=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-content"),e.innerText=this.message,t.appendChild(e)},c.prototype.createNoticeTime=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-time"),e.innerText=""+p.getDatetime(),t.appendChild(e)},c.prototype.createProcess=function(t){var e=d.createElement("div");d.addClasses(e,this.app.prefix,"notice-process"),t.appendChild(e)},c.prototype.calcTopOffset=function(t){void 0===t&&(t=void 0);var e=c.topOffset;if(0'});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"min",use:"min-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"max",use:"max-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"info",use:"info-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"restore",use:"restore-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"above",use:"above-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"more",use:"more-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"icon",use:"icon-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"right",use:"right-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"about",use:"about-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"success",use:"success-usage",viewBox:"0 0 1025 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"warning",use:"warning-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"error",use:"error-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),r=n(1),s=n.n(r),a=new o.a({id:"refresh",use:"refresh-usage",viewBox:"0 0 1024 1024",content:''});s.a.add(a);e.default=a}],e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)f.d(n,i,function(t){return e[t]}.bind(null,i));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s=15)).default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e}); \ No newline at end of file diff --git a/www/swa/token/mac.js b/www/swa/token/mac.js new file mode 100644 index 0000000..e375c98 --- /dev/null +++ b/www/swa/token/mac.js @@ -0,0 +1,116 @@ +/** + * int 转 byte + * @param i + */ +function intToByte(i) { + var b = i & 0xFF; + var c = 0; + if (b >= 128) { + c = b % 128; + c = -1 * (128 - c); + } else { + c = b; + } + return c; +} + +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} +function toHex(d) { return ("0"+(Number(d).toString(16))).slice(-2).toUpperCase() } + +function mac( hex ) { + if ( ! /^([A-Fa-f0-9][A-Fa-f0-9])+$/.test( hex ) ) { + throw "hex 格式错误" + } + var checkNum = intToByte(0); + var arrBytes = new Array(); + for ( var i = 0 ; i < hex.length; i+=2 ) { + var v = intToByte(parseInt(hex[i] + hex[i+1], 16)) + arrBytes.push( v ) + checkNum = checkNum ^ v; + } + + return toHex( checkNum & 0xFF ) +} + +console.log( mac("FFFF010203EEEECCCC7777223311") ) + + +function xor(d1, d2, d3) { + if ( 32 !== d1.length || 32 !== d2.length || 32 !== d3.length ) { + throw "输入格式错误" + } + + var a1 = hexToBytes(d1); + var a2 = hexToBytes(d2); + var a3 = hexToBytes(d3); + + var data = []; + for ( var i = 0; i < 16 ; i++){ + data[ i ] = a1[ i ] ^ a2[ i ] ^ a3[ i ] + } + + return bytesToHex( data ) +} + +var r = xor("11111111111111111111111111111111", "22222222222222222222222222222222", "33333333333333333333333333333333") +console.log( r ) + +// Des3 +// npm i crypto-js +function hexToBytes(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; +} + +function bytesToHex(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(""); +} + + + +// const DES = require('./jssrc/des.js') +// var des = new DES(); +// var key = hexToBytes("12345678123456781234567812345678") +// var ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// des = new DES(); +// key = hexToBytes("12345678123456781234567812345670") +// ret = des.CalDES(hexToBytes("00000000000000000000000000000000"), key); +// console.log( ret ) +// +// + + +const sm4 = require('./jssrc/sm4.js') +var ret = sm4.SM4CryptECB("00000000000000000000000000000000", 1 , "11111111111111111111111111111111") +console.log( ret ) + + + + +// const tripledes = require("crypto-js/tripledes"); +// +// var value = "123";CryptoJS.enc.Hex.parse("0000000000000000"); +// var key = "12345678123456781234567812345678"; CryptoJS.enc.Hex.parse("12345678123456781234567812345678"); +// +// var encrypted = tripledes.encrypt(value , key); +// var decrypted = tripledes.decrypt(encrypted, key); +// +// console.log( "encrypted", encrypted.toString('hex') ) +// console.log( "decrypted", decrypted ) diff --git a/www/swa/token/package-lock.json b/www/swa/token/package-lock.json new file mode 100644 index 0000000..81aaea0 --- /dev/null +++ b/www/swa/token/package-lock.json @@ -0,0 +1,4443 @@ +{ + "name": "ic", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "crypto-js": "^4.1.1", + "install": "^0.13.0", + "npm": "^9.2.0" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "node_modules/install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/npm": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/npm/-/npm-9.2.0.tgz", + "integrity": "sha512-oypVdaWGHDuV79RXLvp+B9gh6gDyAmoHKrQ0/JBYTWWx5D8/+AAxFdZC84fSIiyDdyW4qfrSyYGKhekxDOaMXQ==", + "bundleDependencies": [ + "@isaacs/string-locale-compare", + "@npmcli/arborist", + "@npmcli/config", + "@npmcli/map-workspaces", + "@npmcli/package-json", + "@npmcli/run-script", + "abbrev", + "archy", + "cacache", + "chalk", + "ci-info", + "cli-columns", + "cli-table3", + "columnify", + "fastest-levenshtein", + "fs-minipass", + "glob", + "graceful-fs", + "hosted-git-info", + "ini", + "init-package-json", + "is-cidr", + "json-parse-even-better-errors", + "libnpmaccess", + "libnpmdiff", + "libnpmexec", + "libnpmfund", + "libnpmhook", + "libnpmorg", + "libnpmpack", + "libnpmpublish", + "libnpmsearch", + "libnpmteam", + "libnpmversion", + "make-fetch-happen", + "minimatch", + "minipass", + "minipass-pipeline", + "mkdirp", + "ms", + "node-gyp", + "nopt", + "npm-audit-report", + "npm-install-checks", + "npm-package-arg", + "npm-pick-manifest", + "npm-profile", + "npm-registry-fetch", + "npm-user-validate", + "npmlog", + "p-map", + "pacote", + "parse-conflict-json", + "proc-log", + "qrcode-terminal", + "read", + "read-package-json", + "read-package-json-fast", + "rimraf", + "semver", + "ssri", + "tar", + "text-table", + "tiny-relative-date", + "treeverse", + "validate-npm-package-name", + "which", + "write-file-atomic" + ], + "workspaces": [ + "docs", + "smoke-tests", + "mock-registry", + "workspaces/*" + ], + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^6.1.5", + "@npmcli/config": "^6.1.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^17.0.3", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "graceful-fs": "^4.2.10", + "hosted-git-info": "^6.1.1", + "ini": "^3.0.1", + "init-package-json": "^4.0.1", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", + "libnpmversion": "^4.0.1", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "ms": "^2.1.2", + "node-gyp": "^9.3.0", + "nopt": "^7.0.0", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.3", + "npm-user-validate": "^1.0.1", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.8", + "ssri": "^10.0.1", + "tar": "^6.1.13", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^3.0.0", + "write-file-atomic": "^5.0.0" + }, + "bin": { + "npm": "bin/npm-cli.js", + "npx": "bin/npx-cli.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@colors/colors": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/npm/node_modules/@gar/promisify": { + "version": "1.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/arborist": { + "version": "6.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.3", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^5.1.1", + "nopt": "^7.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.3", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^10.0.1", + "treeverse": "^3.0.0", + "walk-up-path": "^1.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/config": { + "version": "6.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/map-workspaces": "^3.0.0", + "ini": "^3.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", + "semver": "^7.3.5", + "walk-up-path": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/disparity-colors": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ansi-styles": "^4.3.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/fs": { + "version": "3.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/git": { + "version": "4.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/installed-package-contents": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/map-workspaces": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^8.0.1", + "minimatch": "^5.0.1", + "read-package-json-fast": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/name-from-folder": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/package-json": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/promise-spawn": { + "version": "6.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/query": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/run-script": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tootallnate/once": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/abbrev": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/abort-controller": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/npm/node_modules/agent-base": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/npm/node_modules/agentkeepalive": { + "version": "4.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/npm/node_modules/aggregate-error": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/aproba": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/archy": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/are-we-there-yet": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/are-we-there-yet/node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/npm/node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/bin-links": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/binary-extensions": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/builtins": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/npm/node_modules/cacache": { + "version": "17.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/chalk": { + "version": "4.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/npm/node_modules/chownr": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ci-info": { + "version": "3.7.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cidr-regex": { + "version": "3.1.1", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "ip-regex": "^4.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/clean-stack": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/cli-columns": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/cli-table3": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/npm/node_modules/clone": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/cmd-shim": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/npm/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/color-support": { + "version": "1.1.3", + "inBundle": true, + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/npm/node_modules/columnify": { + "version": "1.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/npm/node_modules/common-ancestor-path": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/concat-map": { + "version": "0.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/console-control-strings": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/cssesc": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/debug": { + "version": "4.3.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/defaults": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/npm/node_modules/delegates": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/depd": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/diff": { + "version": "5.1.0", + "inBundle": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/npm/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/encoding": { + "version": "0.1.13", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/npm/node_modules/env-paths": { + "version": "2.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/err-code": { + "version": "2.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/event-target-shim": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/events": { + "version": "3.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/npm/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/npm/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/fs.realpath": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/function-bind": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/gauge": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/glob": { + "version": "8.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/graceful-fs": { + "version": "4.2.10", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/has": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/npm/node_modules/has-flag": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/has-unicode": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/hosted-git-info": { + "version": "6.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.0", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/http-proxy-agent": { + "version": "5.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/https-proxy-agent": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/humanize-ms": { + "version": "1.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/npm/node_modules/iconv-lite": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/npm/node_modules/ignore-walk": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minimatch": "^5.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/imurmurhash": { + "version": "0.1.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/npm/node_modules/indent-string": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/infer-owner": { + "version": "1.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/inflight": { + "version": "1.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/inherits": { + "version": "2.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/ini": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/init-package-json": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.0.0", + "promzard": "^0.3.0", + "read": "^1.0.7", + "read-package-json": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/ip": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/ip-regex": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-cidr": { + "version": "4.0.2", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "^3.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/is-core-module": { + "version": "2.10.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-lambda": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/json-stringify-nice": { + "version": "1.1.4", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/jsonparse": { + "version": "1.3.1", + "engines": [ + "node >= 0.2.0" + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff": { + "version": "5.1.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff-apply": { + "version": "5.4.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/libnpmaccess": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmdiff": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmexec": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "chalk": "^4.1.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "proc-log": "^3.0.0", + "read": "^1.0.7", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "walk-up-path": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmfund": { + "version": "4.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmhook": { + "version": "9.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmorg": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpack": { + "version": "5.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpublish": { + "version": "7.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", + "semver": "^7.3.7", + "ssri": "^10.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmsearch": { + "version": "6.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmteam": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmversion": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/lru-cache": { + "version": "7.13.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/npm/node_modules/make-fetch-happen": { + "version": "11.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/minimatch": { + "version": "5.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/minipass": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-collect": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-fetch": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-flush": { + "version": "1.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-json-stream": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline": { + "version": "1.2.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized": { + "version": "1.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minizlib": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/mkdirp": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ms": { + "version": "2.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/mute-stream": { + "version": "0.0.8", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/negotiator": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/node-gyp": { + "version": "9.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "2.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { + "version": "1.1.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { + "version": "16.1.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob": { + "version": "8.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { + "version": "5.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "10.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/ssri": { + "version": "9.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-filename": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-slug": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/normalize-package-data": { + "version": "5.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-audit-report": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-bundled": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-install-checks": { + "version": "6.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-normalize-package-bin": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-package-arg": { + "version": "10.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-packlist": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-pick-manifest": { + "version": "8.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-profile": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch": { + "version": "14.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-user-validate": { + "version": "1.0.1", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/npmlog": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/once": { + "version": "1.4.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/p-map": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/pacote": { + "version": "15.0.7", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/parse-conflict-json": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^5.0.1", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/path-is-absolute": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/proc-log": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/process": { + "version": "0.11.10", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/npm/node_modules/promise-all-reject-late": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-call-limit": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-inflight": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/promise-retry": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/promzard": { + "version": "0.3.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "read": "1" + } + }, + "node_modules/npm/node_modules/qrcode-terminal": { + "version": "0.12.0", + "inBundle": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, + "node_modules/npm/node_modules/read": { + "version": "1.0.7", + "inBundle": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/read-cmd-shim": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json-fast": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/readable-stream": { + "version": "3.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/retry": { + "version": "0.12.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm/node_modules/rimraf": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/safer-buffer": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/npm/node_modules/semver": { + "version": "7.3.8", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/set-blocking": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/signal-exit": { + "version": "3.0.7", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/smart-buffer": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks": { + "version": "2.7.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/spdx-correct": { + "version": "3.1.1", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-exceptions": { + "version": "2.3.0", + "inBundle": true, + "license": "CC-BY-3.0" + }, + "node_modules/npm/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-license-ids": { + "version": "3.0.11", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/npm/node_modules/ssri": { + "version": "10.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/npm/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/supports-color": { + "version": "7.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/tar": { + "version": "6.1.13", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/text-table": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tiny-relative-date": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/treeverse": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-filename": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-slug": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/validate-npm-package-license": { + "version": "3.0.4", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/walk-up-path": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/wcwidth": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/npm/node_modules/which": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/wide-align": { + "version": "1.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/npm/node_modules/wrappy": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/write-file-atomic": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/yallist": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + } + }, + "dependencies": { + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" + }, + "npm": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/npm/-/npm-9.2.0.tgz", + "integrity": "sha512-oypVdaWGHDuV79RXLvp+B9gh6gDyAmoHKrQ0/JBYTWWx5D8/+AAxFdZC84fSIiyDdyW4qfrSyYGKhekxDOaMXQ==", + "requires": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^6.1.5", + "@npmcli/config": "^6.1.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^17.0.3", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "graceful-fs": "^4.2.10", + "hosted-git-info": "^6.1.1", + "ini": "^3.0.1", + "init-package-json": "^4.0.1", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", + "libnpmversion": "^4.0.1", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "ms": "^2.1.2", + "node-gyp": "^9.3.0", + "nopt": "^7.0.0", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.3", + "npm-user-validate": "^1.0.1", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.8", + "ssri": "^10.0.1", + "tar": "^6.1.13", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^3.0.0", + "write-file-atomic": "^5.0.0" + }, + "dependencies": { + "@colors/colors": { + "version": "1.5.0", + "bundled": true, + "optional": true + }, + "@gar/promisify": { + "version": "1.1.3", + "bundled": true + }, + "@isaacs/string-locale-compare": { + "version": "1.1.0", + "bundled": true + }, + "@npmcli/arborist": { + "version": "6.1.5", + "bundled": true, + "requires": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^6.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.3", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^5.1.1", + "nopt": "^7.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.3", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^10.0.1", + "treeverse": "^3.0.0", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/config": { + "version": "6.1.0", + "bundled": true, + "requires": { + "@npmcli/map-workspaces": "^3.0.0", + "ini": "^3.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", + "semver": "^7.3.5", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/disparity-colors": { + "version": "3.0.0", + "bundled": true, + "requires": { + "ansi-styles": "^4.3.0" + } + }, + "@npmcli/fs": { + "version": "3.1.0", + "bundled": true, + "requires": { + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "4.0.3", + "bundled": true, + "requires": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + } + }, + "@npmcli/installed-package-contents": { + "version": "2.0.1", + "bundled": true, + "requires": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "@npmcli/map-workspaces": { + "version": "3.0.0", + "bundled": true, + "requires": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^8.0.1", + "minimatch": "^5.0.1", + "read-package-json-fast": "^3.0.0" + } + }, + "@npmcli/metavuln-calculator": { + "version": "5.0.0", + "bundled": true, + "requires": { + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", + "semver": "^7.3.5" + } + }, + "@npmcli/name-from-folder": { + "version": "1.0.1", + "bundled": true + }, + "@npmcli/node-gyp": { + "version": "3.0.0", + "bundled": true + }, + "@npmcli/package-json": { + "version": "3.0.0", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0" + } + }, + "@npmcli/promise-spawn": { + "version": "6.0.1", + "bundled": true, + "requires": { + "which": "^3.0.0" + } + }, + "@npmcli/query": { + "version": "3.0.0", + "bundled": true, + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "@npmcli/run-script": { + "version": "6.0.0", + "bundled": true, + "requires": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "bundled": true + }, + "abbrev": { + "version": "2.0.0", + "bundled": true + }, + "abort-controller": { + "version": "3.0.0", + "bundled": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "agent-base": { + "version": "6.0.2", + "bundled": true, + "requires": { + "debug": "4" + } + }, + "agentkeepalive": { + "version": "4.2.1", + "bundled": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.1.0", + "bundled": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ansi-regex": { + "version": "5.0.1", + "bundled": true + }, + "ansi-styles": { + "version": "4.3.0", + "bundled": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "aproba": { + "version": "2.0.0", + "bundled": true + }, + "archy": { + "version": "1.0.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "4.0.0", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "bundled": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "readable-stream": { + "version": "4.2.0", + "bundled": true, + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + } + } + } + }, + "balanced-match": { + "version": "1.0.2", + "bundled": true + }, + "base64-js": { + "version": "1.5.1", + "bundled": true + }, + "bin-links": { + "version": "4.0.1", + "bundled": true, + "requires": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + } + }, + "binary-extensions": { + "version": "2.2.0", + "bundled": true + }, + "brace-expansion": { + "version": "2.0.1", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "builtins": { + "version": "5.0.1", + "bundled": true, + "requires": { + "semver": "^7.0.0" + } + }, + "cacache": { + "version": "17.0.3", + "bundled": true, + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + } + }, + "chalk": { + "version": "4.1.2", + "bundled": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chownr": { + "version": "2.0.0", + "bundled": true + }, + "ci-info": { + "version": "3.7.0", + "bundled": true + }, + "cidr-regex": { + "version": "3.1.1", + "bundled": true, + "requires": { + "ip-regex": "^4.1.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "bundled": true + }, + "cli-columns": { + "version": "4.0.0", + "bundled": true, + "requires": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + } + }, + "cli-table3": { + "version": "0.6.3", + "bundled": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, + "clone": { + "version": "1.0.4", + "bundled": true + }, + "cmd-shim": { + "version": "6.0.0", + "bundled": true + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true + }, + "color-support": { + "version": "1.1.3", + "bundled": true + }, + "columnify": { + "version": "1.6.0", + "bundled": true, + "requires": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + } + }, + "common-ancestor-path": { + "version": "1.0.1", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "cssesc": { + "version": "3.0.0", + "bundled": true + }, + "debug": { + "version": "4.3.4", + "bundled": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "bundled": true + } + } + }, + "defaults": { + "version": "1.0.3", + "bundled": true, + "requires": { + "clone": "^1.0.2" + } + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "depd": { + "version": "1.1.2", + "bundled": true + }, + "diff": { + "version": "5.1.0", + "bundled": true + }, + "emoji-regex": { + "version": "8.0.0", + "bundled": true + }, + "encoding": { + "version": "0.1.13", + "bundled": true, + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "env-paths": { + "version": "2.2.1", + "bundled": true + }, + "err-code": { + "version": "2.0.3", + "bundled": true + }, + "event-target-shim": { + "version": "5.0.1", + "bundled": true + }, + "events": { + "version": "3.3.0", + "bundled": true + }, + "fastest-levenshtein": { + "version": "1.0.16", + "bundled": true + }, + "fs-minipass": { + "version": "2.1.0", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "function-bind": { + "version": "1.1.1", + "bundled": true + }, + "gauge": { + "version": "5.0.0", + "bundled": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "glob": { + "version": "8.0.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "bundled": true + }, + "has": { + "version": "1.0.3", + "bundled": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hosted-git-info": { + "version": "6.1.1", + "bundled": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "bundled": true + }, + "http-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "bundled": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.6.3", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "bundled": true + }, + "ignore-walk": { + "version": "6.0.0", + "bundled": true, + "requires": { + "minimatch": "^5.0.1" + } + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "indent-string": { + "version": "4.0.0", + "bundled": true + }, + "infer-owner": { + "version": "1.0.4", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "ini": { + "version": "3.0.1", + "bundled": true + }, + "init-package-json": { + "version": "4.0.1", + "bundled": true, + "requires": { + "npm-package-arg": "^10.0.0", + "promzard": "^0.3.0", + "read": "^1.0.7", + "read-package-json": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + } + }, + "ip": { + "version": "2.0.0", + "bundled": true + }, + "ip-regex": { + "version": "4.3.0", + "bundled": true + }, + "is-cidr": { + "version": "4.0.2", + "bundled": true, + "requires": { + "cidr-regex": "^3.1.1" + } + }, + "is-core-module": { + "version": "2.10.0", + "bundled": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "bundled": true + }, + "is-lambda": { + "version": "1.0.1", + "bundled": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true + }, + "json-parse-even-better-errors": { + "version": "3.0.0", + "bundled": true + }, + "json-stringify-nice": { + "version": "1.1.4", + "bundled": true + }, + "jsonparse": { + "version": "1.3.1", + "bundled": true + }, + "just-diff": { + "version": "5.1.1", + "bundled": true + }, + "just-diff-apply": { + "version": "5.4.1", + "bundled": true + }, + "libnpmaccess": { + "version": "7.0.1", + "bundled": true, + "requires": { + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmdiff": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" + } + }, + "libnpmexec": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "chalk": "^4.1.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.7", + "proc-log": "^3.0.0", + "read": "^1.0.7", + "read-package-json-fast": "^3.0.1", + "semver": "^7.3.7", + "walk-up-path": "^1.0.0" + } + }, + "libnpmfund": { + "version": "4.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5" + } + }, + "libnpmhook": { + "version": "9.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmorg": { + "version": "5.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmpack": { + "version": "5.0.6", + "bundled": true, + "requires": { + "@npmcli/arborist": "^6.1.5", + "@npmcli/run-script": "^6.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" + } + }, + "libnpmpublish": { + "version": "7.0.6", + "bundled": true, + "requires": { + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", + "semver": "^7.3.7", + "ssri": "^10.0.1" + } + }, + "libnpmsearch": { + "version": "6.0.1", + "bundled": true, + "requires": { + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmteam": { + "version": "5.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + } + }, + "libnpmversion": { + "version": "4.0.1", + "bundled": true, + "requires": { + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + } + }, + "lru-cache": { + "version": "7.13.2", + "bundled": true + }, + "make-fetch-happen": { + "version": "11.0.2", + "bundled": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "5.1.1", + "bundled": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "4.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-fetch": { + "version": "3.0.0", + "bundled": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-flush": { + "version": "1.0.5", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-json-stream": { + "version": "1.0.1", + "bundled": true, + "requires": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-sized": { + "version": "1.0.3", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minizlib": { + "version": "2.1.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "mkdirp": { + "version": "1.0.4", + "bundled": true + }, + "ms": { + "version": "2.1.3", + "bundled": true + }, + "mute-stream": { + "version": "0.0.8", + "bundled": true + }, + "negotiator": { + "version": "0.6.3", + "bundled": true + }, + "node-gyp": { + "version": "9.3.0", + "bundled": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "bundled": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "bundled": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "are-we-there-yet": { + "version": "3.0.1", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "cacache": { + "version": "16.1.3", + "bundled": true, + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.0.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.0", + "bundled": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "gauge": { + "version": "4.0.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "glob": { + "version": "7.2.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "make-fetch-happen": { + "version": "10.2.1", + "bundled": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minipass": { + "version": "3.3.6", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-fetch": { + "version": "2.1.2", + "bundled": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "nopt": { + "version": "6.0.0", + "bundled": true, + "requires": { + "abbrev": "^1.0.0" + } + }, + "npmlog": { + "version": "6.0.2", + "bundled": true, + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } + }, + "ssri": { + "version": "9.0.1", + "bundled": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "bundled": true, + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "which": { + "version": "2.0.2", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "nopt": { + "version": "7.0.0", + "bundled": true, + "requires": { + "abbrev": "^2.0.0" + } + }, + "normalize-package-data": { + "version": "5.0.0", + "bundled": true, + "requires": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + } + }, + "npm-audit-report": { + "version": "4.0.0", + "bundled": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "npm-bundled": { + "version": "3.0.0", + "bundled": true, + "requires": { + "npm-normalize-package-bin": "^3.0.0" + } + }, + "npm-install-checks": { + "version": "6.0.0", + "bundled": true, + "requires": { + "semver": "^7.1.1" + } + }, + "npm-normalize-package-bin": { + "version": "3.0.0", + "bundled": true + }, + "npm-package-arg": { + "version": "10.1.0", + "bundled": true, + "requires": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + } + }, + "npm-packlist": { + "version": "7.0.4", + "bundled": true, + "requires": { + "ignore-walk": "^6.0.0" + } + }, + "npm-pick-manifest": { + "version": "8.0.1", + "bundled": true, + "requires": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + } + }, + "npm-profile": { + "version": "7.0.1", + "bundled": true, + "requires": { + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" + } + }, + "npm-registry-fetch": { + "version": "14.0.3", + "bundled": true, + "requires": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.1", + "bundled": true + }, + "npmlog": { + "version": "7.0.1", + "bundled": true, + "requires": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "p-map": { + "version": "4.0.0", + "bundled": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "pacote": { + "version": "15.0.7", + "bundled": true, + "requires": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + } + }, + "parse-conflict-json": { + "version": "3.0.0", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^5.0.1", + "just-diff-apply": "^5.2.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "postcss-selector-parser": { + "version": "6.0.10", + "bundled": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "proc-log": { + "version": "3.0.0", + "bundled": true + }, + "process": { + "version": "0.11.10", + "bundled": true + }, + "promise-all-reject-late": { + "version": "1.0.1", + "bundled": true + }, + "promise-call-limit": { + "version": "1.0.1", + "bundled": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true + }, + "promise-retry": { + "version": "2.0.1", + "bundled": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "requires": { + "read": "1" + } + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "4.0.0", + "bundled": true + }, + "read-package-json": { + "version": "6.0.0", + "bundled": true, + "requires": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "read-package-json-fast": { + "version": "3.0.1", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "retry": { + "version": "0.12.0", + "bundled": true + }, + "rimraf": { + "version": "3.0.2", + "bundled": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "semver": { + "version": "7.3.8", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.7", + "bundled": true + }, + "smart-buffer": { + "version": "4.2.0", + "bundled": true + }, + "socks": { + "version": "2.7.0", + "bundled": true, + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "bundled": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "spdx-correct": { + "version": "3.1.1", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "bundled": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "bundled": true + }, + "ssri": { + "version": "10.0.1", + "bundled": true, + "requires": { + "minipass": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "bundled": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "bundled": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "bundled": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar": { + "version": "6.1.13", + "bundled": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true + }, + "treeverse": { + "version": "3.0.0", + "bundled": true + }, + "unique-filename": { + "version": "3.0.0", + "bundled": true, + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "5.0.0", + "bundled": true, + "requires": { + "builtins": "^5.0.0" + } + }, + "walk-up-path": { + "version": "1.0.0", + "bundled": true + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "3.0.0", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.5", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "5.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true + } + } + } + } +} diff --git a/www/swa/token/package.json b/www/swa/token/package.json new file mode 100644 index 0000000..188aaf8 --- /dev/null +++ b/www/swa/token/package.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "crypto-js": "^4.1.1", + "install": "^0.13.0", + "npm": "^9.2.0" + } +} diff --git a/www/swa/token/tabs.css b/www/swa/token/tabs.css new file mode 100644 index 0000000..7e3a09d --- /dev/null +++ b/www/swa/token/tabs.css @@ -0,0 +1,55 @@ +.tabs { + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; + list-style: none; +} + +.tabs li { + float: left; + margin: 0 -15px 0 0; +} + +.tabs a { + float: left; + position: relative; + padding: 0 40px; + height: 0; + line-height: 30px; + text-transform: uppercase; + text-decoration: none; + color: #fff; + border-right: 30px solid transparent; + border-bottom: 30px solid var(--mainColor); + /*border-bottom-color: #777 \9;*/ + opacity: .3; + filter: alpha(opacity=30); +} + +.tabs a:hover { + border-bottom-color: var(--mainColor); + opacity: 0.5; + filter: alpha(opacity=50); +} + +.tabs a:focus { + outline: 0; +} + +.tabs .current { + z-index: 3; + border-bottom-color: var(--mainColor); + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-content { + background: #fff; + border-top: 2px solid var(--mainColor); + padding: 1rem 0; +} + +.tabs-content h2, #content h3, #content p { + margin: 0 0 15px 0; +} diff --git a/www/swa/token/tabs.js b/www/swa/token/tabs.js new file mode 100644 index 0000000..cf7cda7 --- /dev/null +++ b/www/swa/token/tabs.js @@ -0,0 +1,19 @@ +$(function (){ + + var $e = $(".tabs a").first(); + $e.addClass("current") + showHideBlock( $e ) + + function showHideBlock($e){ + $(".tabs-content .tab").hide() + var block = ".tabs-content .tab" + "." + $e.attr("name") + $(block).show() + } + + + $(".tabs a").click(function (){ + $(".tabs a").removeClass("current") + $(this).addClass("current") + showHideBlock( $(this) ) + }) +}) diff --git a/www/swa/token/tools.js b/www/swa/token/tools.js new file mode 100644 index 0000000..9f71943 --- /dev/null +++ b/www/swa/token/tools.js @@ -0,0 +1,45 @@ +// 覆盖默认行为 +function success(msg){ + layx.notice({ + title: '成功', + type: 'success', + message: msg + }); +} + +// 覆盖默认行为 +function warning(msg){ + layx.notice({ + title: '警告', + type: 'warning', + message: msg + }); +} + +// 覆盖默认行为 +function alert(msg){ + layx.notice({ + title: '错误', + type: 'error', + message: msg + }); +} + +function check(v, re, msg) { + if (!re.test(v)) { + alert("参数校验失败:" + msg) + throw "参数校验失败" + } +} + + +function getyyyyMMdd(){ + var d = new Date(); + var curr_date = d.getDate(); + var curr_month = d.getMonth() + 1; + var curr_year = d.getFullYear(); + String(curr_month).length < 2 ? (curr_month = "0" + curr_month): curr_month; + String(curr_date).length < 2 ? (curr_date = "0" + curr_date): curr_date; + var yyyyMMdd = curr_year + "" + curr_month +""+ curr_date; + return yyyyMMdd; +} diff --git a/www/swa/u/gmhelper.js b/www/swa/u/gmhelper.js new file mode 100644 index 0000000..603b095 --- /dev/null +++ b/www/swa/u/gmhelper.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.gmhelper=e():t.gmhelper=e()}("undefined"!=typeof self?self:this,(function(){return t={10:(t,e,r)=>{const i=r(694),{G:o,curve:n,n:s}=i.generateEcparam(),h=r(664).sm3,u=r(742);function a(t){for(var e="",r=0;r>8&255);const d=h(p);return{z:d,hex:h(i.hexToArray(d+a(t)))}}function l(t){return t=(t=t.substr("-----BEGIN ECDSA PUBLIC KEY-----".length)).substr(0,t.length-"-----END ECDSA PUBLIC KEY-----".length),(t=function(t){for(var e="",r=0;r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,n=u(t),s=n[0],h=n[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,h)),f=0,l=h>0?s-4:s;for(r=0;r>16&255,a[f++]=e>>8&255,a[f++]=255&e;return 2===h&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[f++]=255&e),1===h&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[f++]=e>>8&255,a[f++]=255&e),a},e.fromByteArray=function(t){for(var e,i=t.length,o=i%3,n=[],s=16383,h=0,u=i-o;hu?u:h+s));return 1===o?(e=t[i-1],n.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[i-2]<<8)+t[i-1],n.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),n.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,h=n.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t,e,i){for(var o,n,s=[],h=e;h>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},77:function(t,e){(function(){var e;function r(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function i(){return new r(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,r,i,o,n){for(var s=32767&e,h=e>>15;--n>=0;){var u=32767&this[t],a=this[t++]>>15,f=h*u+a*s;o=((u=s*u+((32767&f)<<15)+r[i]+(1073741823&o))>>>30)+(f>>>15)+h*a+(o>>>30),r[i++]=1073741823&u}return o},e=30):o&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,i,o,n){for(;--n>=0;){var s=e*this[t++]+r[i]+o;o=Math.floor(s/67108864),r[i++]=67108863&s}return o},e=26):(r.prototype.am=function(t,e,r,i,o,n){for(var s=16383&e,h=e>>14;--n>=0;){var u=16383&this[t],a=this[t++]>>14,f=h*u+a*s;o=((u=s*u+((16383&f)<<14)+r[i]+o)>>28)+(f>>14)+h*a,r[i++]=268435455&u}return o},e=28),r.prototype.DB=e,r.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function c(t){this.m=t}function p(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function T(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function F(){}function b(t){return t}function B(t){this.r2=i(),this.q3=i(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}c.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},c.prototype.revert=function(t){return t},c.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},c.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},c.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},p.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},p.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},p.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},p.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var o=t.length,n=!1,s=0;--o>=0;){var h=8==i?255&t[o]:a(t,o);h<0?"-"==t.charAt(o)&&(n=!0):(n=!1,0==s?this[this.t++]=h:s+i>this.DB?(this[this.t-1]|=(h&(1<>this.DB-s):this[this.t-1]|=h<=this.DB&&(s-=this.DB))}8==i&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>o|h,h=(this[r]&n)<=0;--r)e[r]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,o=this.DB-i,n=(1<>i;for(var s=r+1;s>i;i>0&&(e[this.t-r-1]|=(this.s&n)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),o=t.abs(),n=i.t;for(e.t=n+o.t;--n>=0;)e[n]=0;for(n=0;n=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,o){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t0?(n.lShiftTo(f,h),s.lShiftTo(f,o)):(n.copyTo(h),s.copyTo(o));var c=h.t,p=h[c-1];if(0!=p){var g=p*(1<1?h[c-2]>>this.F2:0),d=this.FV/g,m=(1<=0&&(o[o.t++]=1,o.subTo(F,o)),r.ONE.dlShiftTo(c,F),F.subTo(h,h);h.t=0;){var b=o[--v]==p?this.DM:Math.floor(o[v]*d+(o[v-1]+y)*m);if((o[v]+=h.am(0,b,o,T,0,c))0&&o.rShiftTo(f,o),u<0&&r.ZERO.subTo(o,o)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var o=i(),n=i(),s=e.convert(this),h=l(t)-1;for(s.copyTo(o);--h>=0;)if(e.sqrTo(o,n),(t&1<0)e.mulTo(n,s,o);else{var u=o;o=n,n=u}return e.revert(o)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<0)for(h>h)>0&&(o=!0,n=u(r));s>=0;)h>(h+=this.DB-e)):(r=this[s]>>(h-=e)&i,h<=0&&(h+=this.DB,--s)),r>0&&(o=!0),o&&(n+=u(r));return o?n:"0"},r.prototype.negate=function(){var t=i();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=i();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new c(e):new p(e),this.exp(t,r)},r.ZERO=f(0),r.ONE=f(1),F.prototype.convert=b,F.prototype.revert=b,F.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},F.prototype.sqrTo=function(t,e){t.squareTo(e)},B.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},B.prototype.revert=function(t){return t},B.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},B.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var w,x,I,D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/D[D.length-1];function E(){var t;t=(new Date).getTime(),x[I++]^=255&t,x[I++]^=t>>8&255,x[I++]^=t>>16&255,x[I++]^=t>>24&255,I>=M&&(I-=M)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),o=f(r),n=i(),s=i(),h="";for(this.divRemTo(o,n,s);n.signum()>0;)h=(r+s.intValue()).toString(t).substr(1)+h,n.divRemTo(o,n,s);return s.intValue().toString(t)+h},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),o=Math.pow(e,i),n=!1,s=0,h=0,u=0;u=i&&(this.dMultiply(o),this.dAddOffset(h,0),s=0,h=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(h,0)),n&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var o=new Array,n=7&t;o.length=1+(t>>3),e.nextBytes(o),n>0?o[0]&=(1<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var i,o=Math.min(this.t+t.t,e);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(i=r.t-this.t;o=0;)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),o=e.getLowestSetBit();if(o<=0)return!1;var n=e.shiftRight(o);(t=t+1>>1)>D.length&&(t=D.length);for(var s=i(),h=0;h>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,o=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(e[o++]=r|this.s<=0;)i<8?(r=(this[t]&(1<>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==o&&(128&this.s)!=(128&r)&&++o,(o>0||r!=this.s)&&(e[o++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=i();return this.bitwiseTo(t,g,e),e},r.prototype.or=function(t){var e=i();return this.bitwiseTo(t,d,e),e},r.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,m,e),e},r.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,y,e),e},r.prototype.not=function(){for(var t=i(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var d=i();for(o.sqrTo(h[1],d);u<=g;)h[u]=i(),o.mulTo(d,h[u-2],h[u]),u+=2}var m,y,v=t.t-1,T=!0,F=i();for(n=l(t[v])-1;v>=0;){for(n>=a?m=t[v]>>n-a&g:(m=(t[v]&(1<0&&(m|=t[v-1]>>this.DB+n-a)),u=r;0==(1&m);)m>>=1,--u;if((n-=u)<0&&(n+=this.DB,--v),T)h[m].copyTo(s),T=!1;else{for(;u>1;)o.sqrTo(s,F),o.sqrTo(F,s),u-=2;u>0?o.sqrTo(s,F):(y=s,s=F,F=y),o.mulTo(F,h[m],s)}for(;v>=0&&0==(t[v]&1<=0?(i.subTo(o,i),e&&n.subTo(h,n),s.subTo(u,s)):(o.subTo(i,o),e&&h.subTo(n,h),u.subTo(s,u))}return 0!=o.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new F)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var o=e.getLowestSetBit(),n=r.getLowestSetBit();if(n<0)return e;for(o0&&(e.rShiftTo(n,e),r.rShiftTo(n,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return n>0&&r.lShiftTo(n,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=D[D.length-1]){for(e=0;e>>8,x[I++]=255&S;I=0,E()}function R(){if(null==w){for(E(),(w=new O).init(x),I=0;I{t.exports={sm2:r(251),sm3:r(748),sm4:r(810)}},563:(t,e,r)=>{const{BigInteger:i}=r(77);class o{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let e=t.toString(16);return e.length%2==1&&(e="0"+e),t<128?e:(128+e.length/2).toString(16)+e}getValue(){return""}}class n extends o{constructor(t){super(),this.t="02",t&&(this.v=function(t){let e=t.toString(16);if("-"!==e[0])e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{e=e.substr(1);let r=e.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);let o="";for(let t=0;tt.getEncodedHex())).join(""),this.v}}function h(t,e){return+t[e+2]<8?1:128&+t.substr(e+2,2)}function u(t,e){const r=h(t,e),o=t.substr(e+2,2*r);return o?(+o[0]<8?new i(o,16):new i(o.substr(2),16)).intValue():-1}function a(t,e){return e+2*(h(t,e)+1)}t.exports={encodeDer(t,e){const r=new n(t),i=new n(e);return new s([r,i]).getEncodedHex()},decodeDer(t){const e=a(t,0),r=a(t,e),o=u(t,e),n=t.substr(r,2*o),s=r+n.length,h=a(t,s),f=u(t,s),l=t.substr(h,2*f);return{r:new i(n,16),s:new i(l,16)}}}},13:(t,e,r)=>{const{BigInteger:i}=r(77),o=new i("2"),n=new i("3");class s{constructor(t,e){this.x=e,this.q=t}equals(t){return t===this||this.q.equals(t.q)&&this.x.equals(t.x)}toBigInteger(){return this.x}negate(){return new s(this.q,this.x.negate().mod(this.q))}add(t){return new s(this.q,this.x.add(t.toBigInteger()).mod(this.q))}subtract(t){return new s(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}multiply(t){return new s(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}divide(t){return new s(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new s(this.q,this.x.square().mod(this.q))}}class h{constructor(t,e,r,o){this.curve=t,this.x=e,this.y=r,this.z=null==o?i.ONE:o,this.zinv=null}getX(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(t){return t===this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(i.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(i.ZERO))}isInfinity(){return null===this.x&&null===this.y||this.z.equals(i.ZERO)&&!this.y.toBigInteger().equals(i.ZERO)}negate(){return new h(this.curve,this.x,this.y.negate(),this.z)}add(t){if(this.isInfinity())return t;if(t.isInfinity())return this;const e=this.x.toBigInteger(),r=this.y.toBigInteger(),o=this.z,n=t.x.toBigInteger(),s=t.y.toBigInteger(),u=t.z,a=this.curve.q,f=e.multiply(u).mod(a),l=n.multiply(o).mod(a),c=f.subtract(l),p=r.multiply(u).mod(a),g=s.multiply(o).mod(a),d=p.subtract(g);if(i.ZERO.equals(c))return i.ZERO.equals(d)?this.twice():this.curve.infinity;const m=f.add(l),y=o.multiply(u).mod(a),v=c.square().mod(a),T=c.multiply(v).mod(a),F=y.multiply(d.square()).subtract(m.multiply(v)).mod(a),b=c.multiply(F).mod(a),B=d.multiply(v.multiply(f).subtract(F)).subtract(p.multiply(T)).mod(a),w=T.multiply(y).mod(a);return new h(this.curve,this.curve.fromBigInteger(b),this.curve.fromBigInteger(B),w)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const t=this.x.toBigInteger(),e=this.y.toBigInteger(),r=this.z,i=this.curve.q,o=this.curve.a.toBigInteger(),s=t.square().multiply(n).add(o.multiply(r.square())).mod(i),u=e.shiftLeft(1).multiply(r).mod(i),a=e.square().mod(i),f=a.multiply(t).multiply(r).mod(i),l=u.square().mod(i),c=s.square().subtract(f.shiftLeft(3)).mod(i),p=u.multiply(c).mod(i),g=s.multiply(f.shiftLeft(2).subtract(c)).subtract(l.shiftLeft(1).multiply(a)).mod(i),d=u.multiply(l).mod(i);return new h(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(g),d)}multiply(t){if(this.isInfinity())return this;if(!t.signum())return this.curve.infinity;const e=t.multiply(n),r=this.negate();let i=this;for(let o=e.bitLength()-2;o>0;o--){i=i.twice();const n=e.testBit(o);n!==t.testBit(o)&&(i=i.add(n?this:r))}return i}}t.exports={ECPointFp:h,ECCurveFp:class{constructor(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new h(this,null,null)}equals(t){return t===this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}fromBigInteger(t){return new s(this.q,t)}decodePointHex(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:const e=this.fromBigInteger(new i(t.substr(2),16));let r=this.fromBigInteger(e.multiply(e.square()).add(e.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new i("4")).add(i.ONE),this.q));return r.toBigInteger().mod(o).equals(new i(t.substr(0,2),16).subtract(o))||(r=r.negate()),new h(this,e,r);case 4:case 6:case 7:const n=(t.length-2)/2,s=t.substr(2,n),u=t.substr(n+2,n);return new h(this,this.fromBigInteger(new i(s,16)),this.fromBigInteger(new i(u,16)));default:return null}}}}},251:(t,e,r)=>{const{BigInteger:i}=r(77),{encodeDer:o,decodeDer:n}=r(563),s=r(694),h=r(570).sm3,{G:u,curve:a,n:f}=s.generateEcparam();function l(t,e,r="1234567812345678"){r=s.utf8ToHex(r);const i=s.leftPad(u.curve.a.toBigInteger().toRadix(16),64),o=s.leftPad(u.curve.b.toBigInteger().toRadix(16),64),n=s.leftPad(u.getX().toBigInteger().toRadix(16),64),a=s.leftPad(u.getY().toBigInteger().toRadix(16),64);let f,l;if(128===e.length)f=e.substr(0,64),l=e.substr(64,64);else{const t=u.curve.decodePointHex(e);f=s.leftPad(t.getX().toBigInteger().toRadix(16),64),l=s.leftPad(t.getY().toBigInteger().toRadix(16),64)}const c=s.hexToArray(r+i+o+n+a+f+l),p=4*r.length;c.unshift(255&p),c.unshift(p>>8&255);const g=h(c);return s.arrayToHex(h(g.concat(s.hexToArray(t))))}function c(){const t=s.generateKeyPairHex(),e=a.decodePointHex(t.publicKey);return t.k=new i(t.privateKey,16),t.x1=e.getX().toBigInteger(),t}t.exports={generateKeyPairHex:s.generateKeyPairHex,compressPublicKeyHex:s.compressPublicKeyHex,comparePublicKeyHex:s.comparePublicKeyHex,doEncrypt:function(t,e,r=1){t="string"==typeof t?s.hexToArray(s.utf8ToHex(t)):Array.prototype.slice.call(t),e=s.getGlobalCurve().decodePointHex(e);const o=s.generateKeyPairHex(),n=new i(o.privateKey,16);let u=o.publicKey;u.length>128&&(u=u.substr(u.length-128));const a=e.multiply(n),f=s.hexToArray(s.leftPad(a.getX().toBigInteger().toRadix(16),64)),l=s.hexToArray(s.leftPad(a.getY().toBigInteger().toRadix(16),64)),c=s.arrayToHex(h([].concat(f,t,l)));let p=1,g=0,d=[];const m=[].concat(f,l),y=()=>{d=h([...m,p>>24&255,p>>16&255,p>>8&255,255&p]),p++,g=0};y();for(let e=0,r=t.length;e{d=h([...m,p>>24&255,p>>16&255,p>>8&255,255&p]),p++,g=0};y();for(let t=0,e=a.length;t{const e=new Uint32Array(68),r=new Uint32Array(64);function i(t,e){const r=31&e;return t<>>32-r}function o(t,e){const r=[];for(let i=t.length-1;i>=0;i--)r[i]=255&(t[i]^e[i]);return r}function n(t){return t^i(t,9)^i(t,17)}function s(t){let o=8*t.length,s=o%512;s=s>=448?512-s%448-1:448-s-1;const h=new Array((s-7)/8),u=new Array(8);for(let t=0,e=h.length;t=0;t--)if(o.length>8){const e=o.length-8;u[t]=parseInt(o.substr(e),2),o=o.substr(0,e)}else o.length>0&&(u[t]=parseInt(o,2),o="");const a=new Uint8Array([...t,128,...h,...u]),f=new DataView(a.buffer,0),l=a.length/64,c=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let t=0;t=0&&t<=15?s:h,u=i(i(m,12)+F+i(d,t),7),a=u^i(m,12),l=(t>=0&&t<=15?m^y^v:m&y|m&v|y&v)+T+a+r[t],g=(t>=0&&t<=15?F^b^B:F&b|~F&B)+w+u+e[t],T=v,v=i(y,9),y=m,m=l,w=B,B=i(b,19),b=F,F=n(g);c[0]^=m,c[1]^=y,c[2]^=v,c[3]^=T,c[4]^=F,c[5]^=b,c[6]^=B,c[7]^=w}var p;const g=[];for(let t=0,e=c.length;t>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e)}return g}const h=new Uint8Array(64),u=new Uint8Array(64);for(let t=0;t<64;t++)h[t]=54,u[t]=92;t.exports={sm3:s,hmac:function(t,e){for(e.length>64&&(e=s(e));e.length<64;)e.push(0);const r=o(e,h),i=o(e,u),n=s([...r,...t]);return s([...i,...n])}}},694:(t,e,r)=>{const{BigInteger:i,SecureRandom:o}=r(77),{ECCurveFp:n}=r(13),s=new o,{curve:h,G:u,n:a}=f();function f(){const t=new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),e=new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),r=new i("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),o=new n(t,e,r),s=o.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:o,G:s,n:new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function l(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}t.exports={getGlobalCurve:function(){return h},generateEcparam:f,generateKeyPairHex:function(t,e,r){const o=(t?new i(t,e,r):new i(a.bitLength(),s)).mod(a.subtract(i.ONE)).add(i.ONE),n=l(o.toString(16),64),h=u.multiply(o);return{privateKey:n,publicKey:"04"+l(h.getX().toBigInteger().toString(16),64)+l(h.getY().toBigInteger().toString(16),64)}},compressPublicKeyHex:function(t){if(130!==t.length)throw new Error("Invalid public key to compress");const e=(t.length-2)/2,r=t.substr(2,e);let o="03";return new i(t.substr(e+2,e),16).mod(new i("2")).equals(i.ZERO)&&(o="02"),o+r},utf8ToHex:function(t){const e=(t=unescape(encodeURIComponent(t))).length,r=[];for(let i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;const i=[];for(let t=0;t>>2]>>>24-t%4*8&255;i.push((e>>>4).toString(16)),i.push((15&e).toString(16))}return i.join("")},leftPad:l,arrayToHex:function(t){return t.map((t=>1===(t=t.toString(16)).length?"0"+t:t)).join("")},arrayToUtf8:function(t){const e=[];let r=0;for(let i=0;i<2*t.length;i+=2)e[i>>>3]|=parseInt(t[r],10)<<24-i%8*4,r++;try{const r=[];for(let i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(t))}return decodeURIComponent(escape(r.join("")))}catch(t){throw new Error("Malformed UTF-8 data")}},hexToArray:function(t){const e=[];let r=t.length;r%2!=0&&(t=l(t,r+1)),r=t.length;for(let i=0;i{const{sm3:i,hmac:o}=r(570);function n(t){return t.map((t=>1===(t=t.toString(16)).length?"0"+t:t)).join("")}t.exports=function(t,e){if(t="string"==typeof t?function(t){const e=[];for(let r=0,i=t.length;r>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");r++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):Array.prototype.slice.call(t),e){if("hmac"!==(e.mode||"hmac"))throw new Error("invalid mode");let r=e.key;if(!r)throw new Error("invalid key");return r="string"==typeof r?function(t){const e=[];let r=t.length;var i,o;r%2!=0&&(o=r+1,t=(i=t).length>=o?i:new Array(o-i.length+1).join("0")+i),r=t.length;for(let i=0;i{const e=16,r=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],i=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function o(t){const e=[];for(let r=0,i=t.length;r>>32-e}function s(t){return(255&r[t>>>24&255])<<24|(255&r[t>>>16&255])<<16|(255&r[t>>>8&255])<<8|255&r[255&t]}function h(t){return t^n(t,2)^n(t,10)^n(t,18)^n(t,24)}function u(t){return t^n(t,13)^n(t,23)}function a(t,e,r){const i=new Array(4),o=new Array(4);for(let e=0;e<4;e++)o[0]=255&t[4*e],o[1]=255&t[4*e+1],o[2]=255&t[4*e+2],o[3]=255&t[4*e+3],i[e]=o[0]<<24|o[1]<<16|o[2]<<8|o[3];for(let t,e=0;e<32;e+=4)t=i[1]^i[2]^i[3]^r[e+0],i[0]^=h(s(t)),t=i[2]^i[3]^i[0]^r[e+1],i[1]^=h(s(t)),t=i[3]^i[0]^i[1]^r[e+2],i[2]^=h(s(t)),t=i[0]^i[1]^i[2]^r[e+3],i[3]^=h(s(t));for(let t=0;t<16;t+=4)e[t]=i[3-t/4]>>>24&255,e[t+1]=i[3-t/4]>>>16&255,e[t+2]=i[3-t/4]>>>8&255,e[t+3]=255&i[3-t/4]}function f(t,r,n,{padding:h="pkcs#7",mode:f,iv:l=[],output:c="string"}={}){if("cbc"===f&&("string"==typeof l&&(l=o(l)),16!==l.length))throw new Error("iv is invalid");if("string"==typeof r&&(r=o(r)),16!==r.length)throw new Error("key is invalid");if(t="string"==typeof t?0!==n?function(t){const e=[];for(let r=0,i=t.length;r>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");r++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):o(t):[...t],("pkcs#5"===h||"pkcs#7"===h)&&0!==n){const r=e-t.length%e;for(let e=0;e=e;){const r=t.slice(y,y+16),i=new Array(16);if("cbc"===f)for(let t=0;t1===(t=t.toString(16)).length?"0"+t:t)).join(""):function(t){const e=[];for(let r=0,i=t.length;r=240&&t[r]<=247?(e.push(String.fromCodePoint(((7&t[r])<<18)+((63&t[r+1])<<12)+((63&t[r+2])<<6)+(63&t[r+3]))),r+=3):t[r]>=224&&t[r]<=239?(e.push(String.fromCodePoint(((15&t[r])<<12)+((63&t[r+1])<<6)+(63&t[r+2]))),r+=2):t[r]>=192&&t[r]<=223?(e.push(String.fromCodePoint(((31&t[r])<<6)+(63&t[r+1]))),r++):e.push(String.fromCodePoint(t[r]));return e.join("")}(g):g}t.exports={encrypt:(t,e,r)=>f(t,e,1,r),decrypt:(t,e,r)=>f(t,e,0,r)}}},e={},function r(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={exports:{}};return t[i].call(n.exports,n,n.exports,r),n.exports}(10);var t,e})); +//# sourceMappingURL=gmhelper.js.map \ No newline at end of file diff --git a/www/swa/u/icu.js b/www/swa/u/icu.js new file mode 100644 index 0000000..4982c4d --- /dev/null +++ b/www/swa/u/icu.js @@ -0,0 +1,65 @@ +function stringToHex(str){ + var val = ""; + for (var i = 0; i < str.length; i++) { + var v = str.charCodeAt(i).toString(16); + if ( v.length < 2 ) { + v = "0" + v; + } + val += v; + } + return val +} + + +function hexToStr(hex,encoding) { + var trimedStr = hex.trim(); + var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr; + var len = rawStr.length; + if (len % 2 !== 0) { + alert("Illegal Format ASCII Code!"); + return ""; + } + var curCharCode; + var resultStr = []; + for (var i = 0; i < len; i = i + 2) { + curCharCode = parseInt(rawStr.substr(i, 2), 16); + resultStr.push(curCharCode); + } + // encoding为空时默认为utf-8 + var bytesView = new Uint8Array(resultStr); + var str = new TextDecoder(encoding).decode(bytesView); + return str; +} + + +/** + * 输入 json 格式的授信信息 + * 返回 hex 格式的登录信息 + */ +function auth( info ){ + var str = ""; + var manufactor = info.manufactor + " "; + manufactor.substr(0, 8); + var system = info.system + " "; + system.substr(0, 8); + var customer = info.customer; + str = manufactor + system + customer + return stringToHex( str ) +} + + + +// 测试 +var test = { + "manufactor": "sunyard", + "system": "hsm", + "customer": "ICBC" +} + +console.log( auth(test) ) + + +console.log("hexToStr=" + hexToStr("73756e796172642068736d202020202049434243", "UTF-8")) + +// 73756e79617264202020202020202068736d202020202020202049434243 +// 73756e796172642068736d202020202049434243 diff --git a/www/swa/u/index.html b/www/swa/u/index.html index d92fc11..03ff364 100644 --- a/www/swa/u/index.html +++ b/www/swa/u/index.html @@ -50,6 +50,7 @@
    +
    @@ -72,6 +73,10 @@ 文件操作 +
  • + 签名 +
  • +
  • PIN 管理
  • @@ -129,6 +134,17 @@ > +
    + +
    + + + + + + + +
    @@ -178,6 +194,7 @@ + @@ -404,6 +421,29 @@ }) + $("#btn_sign").click(function () { + var inData = $("#inData").val() + + // 公钥 + var pk = window.UKey.exportPk(); + + var s = window.gmhelper.getHashAsBase64( inData, pk ) + + + + var outData = pk + + outData += "\r\n\r\nz=" + s.z + + outData += "\r\n\r\nhash=" + s.hashHex + + var sign = window.UKey.sign( s.hashBase64 ) + outData += "\r\n\r\nsign=" + sign + + $("#outData").text(outData) + }) + + $("#reset").click(function () { alert("暂不开放") }) diff --git a/www/swa/u/ukey.js b/www/swa/u/ukey.js index e57d8d6..41072d0 100644 --- a/www/swa/u/ukey.js +++ b/www/swa/u/ukey.js @@ -80,6 +80,8 @@ FISECKEY.FILE_CreateFile(hDevice, DIR, "name", fileSize, 0); + FISECKEY.GenECCKeypair(hDevice, 0, 256, 1); + var data = JSON.stringify(info) writeFile(DIR, "name", data) @@ -291,6 +293,14 @@ FISECKEY.USER_ChangePin(hDevice, 1, oldpin, newpin); } + function exportPk(){ + return FISECKEY.ExportECCKeypair(hDevice, 1); + } + + function sign(vInbuf){ + return FISECKEY.ECCSign(hDevice, 1, 1, vInbuf); + } + root.UKey = { release: release, catRelease : catRelease, @@ -306,6 +316,8 @@ saveLMK : saveLMK, loadLMK : loadLMK, saveAuth : saveAuth, - loadAuth : loadAuth + loadAuth : loadAuth, + exportPk : exportPk, + sign : sign } })( window ) diff --git a/www/swa/window.html b/www/swa/window.html index 641236f..7cc3061 100644 --- a/www/swa/window.html +++ b/www/swa/window.html @@ -8,7 +8,7 @@ SWA | Fullstack Club - + @@ -37,7 +37,7 @@
    + allowtransparency=”yes” height="100%" style="width: 100%; height: 100%; margin-top: 48px;">