Commit f5e58026 authored by techird's avatar techird

stash

parent 16ecfab2
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
"keymap", "keymap",
"baidu", "baidu",
"browser", "browser",
"FUI" "FUI",
"fio"
] ]
} }
\ No newline at end of file
...@@ -24,8 +24,6 @@ module.exports = function(grunt) { ...@@ -24,8 +24,6 @@ module.exports = function(grunt) {
var srcPath = 'src/', var srcPath = 'src/',
distPath = 'dist/'; distPath = 'dist/';
console.log(sources);
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
...@@ -35,10 +33,15 @@ module.exports = function(grunt) { ...@@ -35,10 +33,15 @@ module.exports = function(grunt) {
concat: { concat: {
js: { js: {
options: { options: {
banner: banner + '(function(kity, window) {\n\n', banner: banner + '(function(window) {\n\n',
footer: '\n\n})(kity, window)', footer: '\n\n})(window)',
process: function(src, filepath) { process: function(src, filepath) {
return src + '\n'; return ['\n',
'/* ' + filepath + ' */',
src.replace(/^.+$/mg, ' $&'),
'/* ' + filepath + ' end */',
'\n',
].join('\n');
} }
}, },
src: sources, src: sources,
...@@ -62,16 +65,16 @@ module.exports = function(grunt) { ...@@ -62,16 +65,16 @@ module.exports = function(grunt) {
copy: { copy: {
dir: { dir: {
files: [{ files: [{
src: ['ui/theme/**', 'index.html', 'download.php'], src: [
'ui/theme/**/css/*.css',
'ui/theme/**/images/*',
'lang/**/*',
'index.html',
'download.php'
],
dest: distPath dest: distPath
}] }]
}, },
kity: {
expand: true,
cwd: 'kity/dist/',
src: '**',
dest: distPath + 'lib/'
},
km_config: { km_config: {
expand: true, expand: true,
src: 'kityminder.config.js', src: 'kityminder.config.js',
...@@ -90,9 +93,6 @@ module.exports = function(grunt) { ...@@ -90,9 +93,6 @@ module.exports = function(grunt) {
src: distPath + 'index.html', src: distPath + 'index.html',
overwrite: true, overwrite: true,
replacements: [{ replacements: [{
from: /kity\/dist\/kity\.js/ig,
to: 'lib/kity.min.js'
}, {
from: /import\.js/, from: /import\.js/,
to: 'kityminder.all.min.js' to: 'kityminder.all.min.js'
}] }]
...@@ -143,7 +143,7 @@ module.exports = function(grunt) { ...@@ -143,7 +143,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-less');
// Build task(s). // Build task(s).
grunt.registerTask('default', ['concat', 'uglify', 'copy', 'replace']); grunt.registerTask('default', ['concat', 'uglify', 'less', 'copy', 'replace']);
grunt.registerTask('dev', ['less', 'watch']); grunt.registerTask('dev', ['less', 'watch']);
}; };
\ No newline at end of file
# KityMinder 更新日志
## v1.2.1
### 体验优化
1. 较大提升了文件载入和操作的性能
2. 拖动时不显示子节点和连接线
3. 文字输入细节体验优化
4. 历史回退使用动画回退
5. 美化帮助窗口的样式
### BUG 修复
1. 修复 F2 不能编辑的 BUG
2. 修复按 Shift + Tab 页面溢出的 BUG
## v1.2.0
### 新功能
1. 允许节点自由拖动
2. 允许节点排序(包括拖动以及快捷键 Alt + Up 和 Alt + Down)
3. 节点上插入在线图片(暂不支持本地图片)
4. 节点上添加资源标签(分配负责人)
5. 支持节点复制粘贴
6. 支持换肤,添加了 “文艺清新” 系列的几个皮肤
### 体验优化
1. 界面重新设计,更加美观
2. 布局性能有较大的提高
3. 调整了文字输入的交互
4. 添加了布局时的动画效果
5. 扩大了超链接的点击范围
6. 优先级增加至 9 个,进度增加至 9 个
7. 支持ipad编辑
### BUG 修复
1. 修复 XSS 攻击问题(超链接和图片)
2. 修复导入损坏文件报错的问题
3. 修复新版 Chrome 下载扩展名错误问题
4. 修复 SVG 和 PNG 在缩放之后导出不全的问题
5. 修复缩放后选区闪烁的问题
6. 修复分享内容无法更新的问题 说明:需要再次点击分享创建更新链接
## v1.1.3.2
### Hot Fix
1. 修复新版 Chrome 浏览器无法导出正确文件格式的问题([#77](https://github.com/fex-team/kityminder/issues/77)
## v1.1.3.1
### Hot Fix
1. 修复某些输入法下输入英文的问题
2. 添加网盘操作(加载列表、保存文件等)失败后重试的机制
## v1.1.3
### 功能更新
1. 保存时可自定义文件名
2. 添加/删除超链接,导入第三方格式支持超链接
3. 选中节点时,按F2直接进入文字编辑状态
4. "展开全部节点""收起全部节点"功能
5. 当前选中的高亮的节点可直接进行文字编辑
6. 右键选中节点,显示编辑节点的菜单
7. 可指定放大缩小的百分比
## 问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
3. 修复回退操作后所选节点未回选问题
4. 修复回退操作后展开收起的节点没有记录问题
5. 优化了输入文字时的卡顿效果
6. 优化了当输入中文时,中文显示位置与光标距离过远的问题
7. html标签转码问题
8. 修复撤销按钮点击后,重做按钮还是不可点问题
## v1.1.2
### 功能更新
1. **支持本地格式文件导入**
* 支持文件拖拽和网盘文件导入
* 格式支持 xmind/freemind/mindmanager,其他格式暂不支持
2. 新增节点移动到视野中
3. 当前文件名加到 Title 中
4. 分享链接直接到粘贴板(针对已经支持的浏览器)
5. 分享到社交网络
6. 用户登出功能
7. 添加只读模式,配置项 readOnly,添加动态调用接口setEnabled,setDisabled
8. 优化当下拉菜单不可执行时,下拉菜单按钮会自动变灰
9. 添加了新的logo图标
### 问题修复
1. 导出 png 和 svg 图片时,文本中如果包含 ` ` 字符会报错的问题
2. 删除中心节点导致页面卡住
3. 文件在IE下无法导出(.txt,.svg,.km)
4. 拖入文件导入之后,草稿箱和社会化文件名不同步
5. 仅有根节点时,将其删除,再添加节点报错
6. 本地部署,127.0.0.1退出后不能登录
7. 去掉了“导出”菜单上的打勾
8. 修复了firefox下光标定位到文字最后空格,光标不跟着移动问题
9. 修复在页面失去焦点时光标不消失
10. 优化了光标定位和闪烁时常
## v1.1.1
### 功能更新
1. 添加文件操作快捷键支持:
* 新建脑图(`Ctrl` + `N`
* 保存脑图到云端(`Ctrl` + `S`
* 分享脑图(`Ctrl` + `Shift` + `S`
2. 草稿功能升级为草稿箱
3. 添加了帮助菜单
### 问题修复
1. 修复切换文件时,回复历史没有清空的问题
2. 修复在添加 markers 时,会出现 js 报错的问题
3. 仅有根节点,将其删除,再添加节点报错
## v1.1.0
### 功能更新
1. 添加了剪贴板操作的支持
2. 添加了本地自动保存草稿的功能
3. 优化了文字选中效果
4. 改进了文字输入体验
### 功能调整
1. 视野定位功能抽取为 camera 命令,并且创建新文件和打开文件会把视野定位到根节点
### 问题修复
1. 修正了 bottom 主题的位置问题
2. 修正了子节点全部删除后展开/收缩标志依然存在画布上的问题
3. 修复了 bottom 主题的键盘导航出错的问题
4. 滚轮缩放的问题
## v1.0.1
### 问题修复
1. 修复 png 导出问题。
## v1.0.0
首个版本发布,包括基本的编辑功能。
(function() {
// 用于存储整个快捷菜单的机构信息的字符串
var helpInfo = '';
$.ajax({
type: 'get',
dataType: 'text',
url: 'dialogs/help/operation.txt',
success: function(text) {
createHelpHtml(text);
}
});
function createHelpHtml(text) {
var txt = text;
// 用于存储获取的某一行数据
var line = '';
// 用于临时存储处理一条line字符串之后的结果
var result = '';
// 判断是否为第一个份菜单,用于控制div.shortcuts-table标签前是否添加</div>。
var isFirstTable = true;
// // 判断是否为每份菜单的第一项
// var isFirstTr = true;
// 正则表达式 start
// 1、匹配菜单分类标题
var reg_thead = /^##/g;
// 2、匹配菜单项
var reg_tcell = /\:/g;
// 3、匹配键值
var reg_key = /\`(.+?)\`/g;
// var 4、匹配快捷键组合选择
var reg_opt = /or|\+|,/gi;
// 菜单分类标题1
var temp = '';
var xmlhttp;
var arr, keys, info;
// help-container start
helpInfo += '<div class="help-container' + (kity.Browser.mac ? ' mac' : '') + '">';
// help-header start
helpInfo += '<h2 class="help-header">操作说明</h2>';
// help-header end
// help-article start
helpInfo += '<div class="help-article row">';
// 开始读取operation.txt文件信息
txt.split('\n').forEach(function(line) {
result = '';
// 如果line以##开头,表明是菜单分类标题
if (reg_thead.test(line)) {
// isFirstTr = true;
// 如果不是第一个分类菜单,那么就需要在添加下一个开始标签之前,为上一个菜单添加结束标签
if (!isFirstTable) {
result += '</table>';
}
// 处理第一个分类菜单后,就需要把标示第一个分类菜单的变量改变
else {
isFirstTable = false;
}
temp = line.substring(line.lastIndexOf(' '));
result += '<table class="shortcuts-table "><tr><td></td><td><span class="shortcuts-thead">' + temp + '</span></td>';
} else if (/\S/.test(line)) {
// else if(reg_tcell.test(line)) {
result += '<tr class="shortcuts-tbody"><td class="shortcuts-group"><div class="right">';
arr = line.split(':');
keys = arr[0];
info = arr[1];
keys = keys.toLowerCase().replace(reg_key, '<span class="shortcuts-key label $1">$1</span>');
result += keys;
result += '</div></td><td class="shortcuts-use">' + info + '</td>';
// 加最后一项的结尾标签
result += '</tr>';
}
// 处理完每一行之后,将result添加到helpInfo之后
helpInfo += result;
result = '';
});
// 要在处理完最后一个分类菜单后,为这个菜单添加结束标签
helpInfo += '<table>';
// 读取operation.txt文件信息完毕
helpInfo += '</div>';
// help-article end
helpInfo += '</div>';
// // help-container end
// $("#help").html(helpInfo);
KM.registerWidget('help', {
tpl: helpInfo,
initContent: function(km) {
var lang = km.getLang('dialogs.help'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, lang);
}
this.root().html(html);
},
initEvent: function(km, $w) {
}
});
}
})();
\ No newline at end of file
## 节点操作
`Enter`: 插入兄弟节点
`Tab`: 插入子节点
`Delete`: 删除节点
`Up`, `Down`, `Left`, `Right`: 节点导航
`Alt` + `Up`, `Alt` + `Down`: 向上/向下调整顺序
`/`: 展开/收起节点
`F2`: 编辑节点
`Ctrl` + `A`: 全选节点
`Ctrl` + `C`: 复制节点
`Ctrl` + `X`: 剪切节点
`Ctrl` + `V`: 粘贴节点
`Ctrl` + `B`: 加粗
`Ctrl` + `I`: 斜体
## 视野控制
`Space`: 切换编辑/抓手模式
`滚轮`: 移动视野
`右键拖动`: 拖动视野
`空白处双击`: 居中根节点
`+`, `-`: 放大/缩小视野
## 文件操作
`Ctrl` + `N`: 新建
`Ctrl` + `S`: 保存
`Ctrl` + `Shift` + `S`: 分享
## 后悔药
`Ctrl` + `Z`: 撤销
`Ctrl` + `Y`: 重做
\ No newline at end of file
(function(utils) {
//todo 这里先写死成中文
var content = '<div class="hyperlink-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="hyperlink_href"/>';
content += '<button id="hyperlink_insert">插入</button>';
content += '</div>';
KM.registerWidget('hyperlink', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.hyperlink'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'hyperlink'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#hyperlink_insert');
$btn.attr('disabled', 'disabled');
var $href = $w.find('#hyperlink_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
$btn.attr('disabled', 'disabled');
} else {
$href.css('color', 'black');
$href.data('error', false);
$btn.removeAttr('disabled');
}
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
var url = $w.find('#hyperlink_href').val();
km.execCommand('hyperlink', url);
$w.kmui().hide();
});
$w.find('#hyperlink_href').on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('hyperlink');
var $input = $w.find('#hyperlink_href');
$input.val(url || 'http://');
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function(utils) {
var content = '<div class="image-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="image_href"/>';
content += '<button id="image_insert">插入</button>';
content += '<hr style="height: 0; border: none; border-top: 1px solid #ccc;">';
content += '<img id="image_preview" style="max-width: 360px;"/>';
content += '</div>';
KM.registerWidget('image', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.image'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'image'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#image_insert').attr('disabled', 'disabled');
var $href = $w.find('#image_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
} else {
$href.css('color', 'black');
$href.data('error', false);
}
$w.find('#image_preview').attr('src', $href.val());
});
$w.find('#image_preview').on('load', function() {
$btn.removeAttr('disabled');
}).on('error', function() {
$btn.attr('disabled', 'disabled');
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
km.execCommand('image', $href.val());
$w.kmui().hide();
});
$href.on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('image');
var $input = $w.find('#image_href');
$input.val(url || 'http://');
if (url) $w.find('#image_preview').attr('src', url);
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function (utils) {
KM.registerWidget('markers', {
tpl: "<style>" +
".kmui-dialog-<%= container %> .priority .icon{background:url(dialogs/markers/images/iconpriority.png) 0 0}" +
".kmui-dialog-<%= container %> .progress .icon{background:url(dialogs/markers/images/iconprogress.png) 0 0}" +
".kmui-dialog-<%= container %> .icon.p2{background-position: -20px 0}" +
".kmui-dialog-<%= container %> .icon.p3{background-position: -40px 0}" +
".kmui-dialog-<%= container %> .icon.p4{background-position: -60px 0}" +
".kmui-dialog-<%= container %> .icon.p5{background-position: -80px 0}" +
".kmui-dialog-<%= container %> .icon.p6{background-position: -100px 0}" +
".kmui-dialog-<%= container %> .icon.p7{background-position: -120px 0}" +
".kmui-dialog-<%= container %> .icon.p8{background-position: -140px 0}" +
".kmui-dialog-<%= container %> .icon.p9{background-position: -160px 0}" +
".kmui-dialog-<%= container %> .icon.p0{background-position: -180px 0}" +
".kmui-dialog-<%= container %> ul li{width:40%;display:inline-block}" +
".kmui-dialog-<%= container %> h4{padding:5px 10px; margin:0; background:#eee}" +
"</style>" +
"<h4><%= priority %></h3>" +
"<ul class='icon-list priority'>" +
"<li value='1' type='priority'><span class='icon p1'></span><span><%= priority %>1</span></li>" +
"<li value='2' type='priority'><span class='icon p2'></span><span><%= priority %>2</span></li>" +
"<li value='3' type='priority'><span class='icon p3'></span><span><%= priority %>3</span></li>" +
"<li value='4' type='priority'><span class='icon p4'></span><span><%= priority %>4</span></li>" +
"<li value='5' type='priority'><span class='icon p5'></span><span><%= priority %>5</span></li>" +
"<li value='6' type='priority'><span class='icon p6'></span><span><%= priority %>6</span></li>" +
"<li value='7' type='priority'><span class='icon p7'></span><span><%= priority %>7</span></li>" +
"<li value='8' type='priority'><span class='icon p8'></span><span><%= priority %>8</span></li>" +
"<li value='9' type='priority'><span class='icon p9'></span><span><%= priority %>9</span></li>" +
"<li value='0' type='priority'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>" +
"<h4><%= progress.title %></h4>" +
"<ul class='icon-list progress'>" +
"<li value='1' type='progress'><span class='icon p1'></span><span><%= progress.notdone %></span></li>" +
"<li value='2' type='progress'><span class='icon p2'></span><span><%= progress.done1 %></span></li>" +
"<li value='3' type='progress'><span class='icon p3'></span><span><%= progress.done2 %></span></li>" +
"<li value='4' type='progress'><span class='icon p4'></span><span><%= progress.done3 %></span></li>" +
"<li value='5' type='progress'><span class='icon p5'></span><span><%= progress.done4 %></span></li>" +
"<li value='6' type='progress'><span class='icon p6'></span><span><%= progress.done5 %></span></li>" +
"<li value='7' type='progress'><span class='icon p7'></span><span><%= progress.done6 %></span></li>" +
"<li value='8' type='progress'><span class='icon p8'></span><span><%= progress.done7 %></span></li>" +
"<li value='9' type='progress'><span class='icon p9'></span><span><%= progress.done %></span></li>" +
"<li value='0' type='progress'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>",
initContent: function (km, $w) {
var lang = km.getLang('dialogs.markers');
if (lang) {
var html = $.parseTmpl(this.tpl, utils.extend({
'container': 'markers'
}, lang));
}
this.root().html(html);
var valPri = km.queryCommandValue("priority") || 0;
var valPro = km.queryCommandValue("progress") || 0;
$w.find("li[type='priority']").removeClass("active");
$w.find("li[type='priority'][value='" + valPri + "']").addClass("active");
$w.find("li[type='progress']").removeClass("active");
$w.find("li[type='progress'][value='" + valPro + "']").addClass("active");
},
initEvent: function (km, $w) {
$w.on("click", "li", function () {
var $this = $(this);
$this.siblings().removeClass("active");
var val = $this.val();
var type = $this.attr("type");
km.execCommand(type, val);
});
km.on('interactchange', function (e) {
var valPri = this.queryCommandValue("priority");
var valPro = this.queryCommandValue("progress");
$w.find("li[type='priority']").removeClass("active");
$w.find("li[type='priority'][value='" + valPri + "']").addClass("active");
$w.find("li[type='progress']").removeClass("active");
$w.find("li[type='progress'][value='" + valPro + "']").addClass("active");
});
},
width: 200
})
})(KM.Utils);
\ No newline at end of file
( function () {
//todo 这里先写死成中文
var preferenceContent = '<div class="help-content" style="padding:20px;width:360px;">';
preferenceContent += '<h3>展开属性设置</h3>';
preferenceContent += '<p><label><input type="checkbox" name="expand" />打开时展开全部节点(刷新页面生效)</label></p>';
preferenceContent += '<p><hr/></p>';
preferenceContent += '<p><button id="reset_preference">重置</button></p>';
//preferenceContent += '<p><label><b style="color:red">有些偏好设置会在你下次刷新页面时生效</b></label></p>';
preferenceContent += '</div>';
//todo 偏好设置暂时都在这里处理
//用于在reset所有偏好时,清除这个dialog下的所有偏好
var allPreferences = {};
function checkEverything( km, $w ) {
checkExpand( km, $w )
}
function initEverything( km, $w ) {
initExpand( km, $w )
}
//展开
function initExpand( km, $w ) {
var expand = km.getOptions( 'defaultExpand' );
$w.find( '[name=expand]' )[ 0 ].checked = expand && expand.defaultLayer == 0;
allPreferences[ 'defaultExpand' ] = null;
}
function checkExpand( km, $w ) {
var checked = $w.find( '[name=expand]' )[ 0 ].checked;
if ( checked ) {
km.setPreferences( 'defaultExpand', {
'defaultLayer': 0,
'defaultSubShow': 0
} )
} else {
km.setPreferences( 'defaultExpand' )
}
}
//重置偏好
function resetPreferences( km ) {
km.setPreferences( allPreferences )
}
KM.registerWidget( 'preference', {
tpl: preferenceContent,
initContent: function ( km ) {
var lang = km.getLang( 'dialogs.help' ),
html;
if ( lang ) {
html = $.parseTmpl( this.tpl, lang );
}
this.root().html( html );
},
initEvent: function ( km, $w ) {
//绑定默认值
initEverything( km, $w );
$w.find( '#reset_preference' ).on( 'click', function ( e ) {
resetPreferences( km );
//重置系统默认的偏好设置
initEverything( km, $w )
} );
$w.on( 'click', '.kmui-close', function ( e ) {
checkEverything( km, $w );
km.fire( 'preferencechange' )
} );
},
width: 400
} );
} )();
\ No newline at end of file
(function(utils) {
KM.registerWidget('resource', {
tpl: '<div class="resource-container">' +
'<div class="add-resource">' +
'<input type="text" /><button class="button">添加</button>' +
'<ul class="global-resource"></ul>' +
'</div>' +
'</div>' +
'<div class="no-selected">未选中节点</div>',
initContent: function(km, $w) {
var lang = km.getLang('dialogs.resource'),
html = $.parseTmpl(this.tpl, lang);
this.root().html(html);
},
initEvent: function(km, $w) {
var $container = $w.find('.resource-container');
var $noSelected = $w.find('.no-selected');
var $current = $w.find('.current-resource').hide();
var $addInput = $w.find('.add-resource input');
var $addButton = $w.find('.add-resource button');
var $global = $w.find('.global-resource');
function switchDisplay() {
if (!km.getSelectedNodes().length) {
$container.hide();
$noSelected.show();
} else {
$container.show();
$noSelected.hide();
}
}
function addResource() {
var resource = $addInput.val();
var origin = km.queryCommandValue('resource');
if (resource) {
origin.push(resource);
km.execCommand('resource', origin);
}
$addInput.val(null);
}
$addInput.on('keydown', function(e) {
if (e.keyCode == 13) addResource();
});
$addButton.click(addResource);
switchDisplay();
$global.delegate('input[type=checkbox]', 'change', function() {
km.execCommand('resource', $global.find('input[type=checkbox]:checked').map(function(index, chk) {
return $(chk).data('resource');
}).toArray());
});
km.on('interactchange', function(e) {
var resource = this.queryCommandValue("resource");
var used = this.getUsedResource();
switchDisplay();
$global.empty().append(used.map(function(name) {
var $li = $('<li></li>'),
$label = $('<label></label>').appendTo($li),
$chk = $('<input type="checkbox" />')
.data('resource', name)
.prop('checked', ~resource.indexOf(name))
.appendTo($label);
$label.append(name);
var color = km.getResourceColor(name);
return $li.css({
color: color.dec('l', 60).toString(),
backgroundColor: ~resource.indexOf(name) ? color : color.dec('a', 0.85).toRGBA()
});
}));
}).fire('interactchange');
},
width: 250
});
})(KM.Utils);
\ No newline at end of file
...@@ -7,29 +7,14 @@ ...@@ -7,29 +7,14 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"> <meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="lib/jquery-2.1.0.min.js?_=1406196567611" charset="utf-8"></script> <title>百度脑图 - 便捷的思维导图工具</title>
<script src="lib/ZeroClipboard.min.js?_=1406196567611" charset="utf-8"></script>
<script type="text/javascript"> <script src="kityminder.all.min.js?_=1408005703290" charset="utf-8"></script>
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } ); <script src="kityminder.config.js?_=1408005703290" charset="utf-8"></script>
</script> <script src="lang/zh-cn/zh-cn.js?_=1408005703290" charset="utf-8"></script>
<script src="lib/kity.min.js?_=1406196567611" charset="utf-8"></script> <link href="ui/theme/default/css/default.all.css" type="text/css" rel="stylesheet" />
<script src="kityminder.all.min.js?_=1406196567611" charset="utf-8"></script>
<script src="kityminder.config.js?_=1406196567611" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1406196567611" charset="utf-8"></script>
<script src="lib/zip.js?_=1406196567611" charset="utf-8"></script>
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1406196567611" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1406196567611" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1406196567611" charset="utf-8"></script>
<script src="social/social.js?_=1406196567611" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"> <link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
<link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed"> <link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed">
</head> </head>
...@@ -38,7 +23,9 @@ ...@@ -38,7 +23,9 @@
<div id="content-wrapper"> <div id="content-wrapper">
<div id="panel"></div> <div id="panel"></div>
<div id="kityminder" onselectstart="return false"></div> <div id="kityminder" onselectstart="return false">
</div>
<div id="share-dialog"> <div id="share-dialog">
<h3>URL分享:</h3> <h3>URL分享:</h3>
...@@ -107,11 +94,24 @@ ...@@ -107,11 +94,24 @@
<!--脑图启动代码--> <!--脑图启动代码-->
<script> <script>
// create km instance
km = KM.getKityMinder('kityminder');
// New Version Notify /* global km:true, ZeroClipboard:true, zip:true */
$(function() { /* jshint browser:true */
$(function() {
/* 依赖库初始化 */
ZeroClipboard.setDefaults({ moviePath: 'lib/ZeroClipboard.swf' });
zip.inflateJSPath = 'lib/inflate.js';
});
// create km instance
km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
// init ui for instance
km.initUI();
// New Version Notify
$(function() {
var lastVersion = localStorage.lastKMVersion; var lastVersion = localStorage.lastKMVersion;
$('#km-version').text( 'v' + KM.version ); $('#km-version').text( 'v' + KM.version );
...@@ -120,23 +120,20 @@ ...@@ -120,23 +120,20 @@
$( '#km-version' ).addClass( 'new-version' ); $( '#km-version' ).addClass( 'new-version' );
localStorage.lastKMVersion = KM.version; localStorage.lastKMVersion = KM.version;
} }
}); });
km.on('unziperror', function(ev) { km.on('unziperror', function(ev) {
alert('文件解析错误,文件可能已损坏!'); window.alert('文件解析错误,文件可能已损坏!');
}); });
km.on('parseerror', function(ev) { km.on('parseerror', function(ev) {
alert('文件解析错误,文件可能已损坏!'); window.alert('文件解析错误,文件可能已损坏!');
}); });
km.on('unknownprotocal', function(ev) { km.on('unknownprotocal', function(ev) {
alert('不支持的文件格式!'); window.alert('不支持的文件格式!');
}); });
document.body.ontouchmove = function(e) {
//e.preventDefault();
}
</script> </script>
<!--社会分享代码--> <!--社会分享代码-->
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(function() { (function() {
function getKMBasePath(docUrl, confUrl) { window.KITYMINDER_CONFIG = {
// 定义
return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath()); //modules: [],
}
function getConfigFilePath() {
var configPath = document.getElementsByTagName('script');
return configPath[configPath.length - 1].src;
}
function getBasePath(docUrl, confUrl) {
var basePath = confUrl;
if (/^(\/|\\\\)/.test(confUrl)) {
basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
} else if (!/^[a-z]+:/i.test(confUrl)) {
docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
basePath = docUrl + "" + confUrl;
}
return optimizationPath(basePath);
}
function optimizationPath(path) {
var protocol = /^[a-z]+:\/\//.exec(path)[0],
tmp = null,
res = [];
path = path.replace(protocol, "").split("?")[0].split("#")[0];
path = path.replace(/\\/g, '/').split(/\//);
path[path.length - 1] = "";
while (path.length) {
if ((tmp = path.shift()) === "..") {
res.pop();
} else if (tmp !== ".") {
res.push(tmp);
}
} // 只读模式,默认是false
readOnly: false,
return protocol + res.join("/"); // 默认主题
defaultTemplate: 'default',
} // 默认皮肤
window.KITYMINDER_CONFIG = { defaultTheme: 'fresh-blue',
'KITYMINDER_HOME_URL': getKMBasePath(),
//定义工具栏
toolbars: [
'undo redo | template theme | fontfamily fontsize bold italic forecolor | node hyperlink unhyperlink image removeimage markers resource | collapsenode expandnode | hand zoom-in zoom zoom-out | help'
]
//只读模式,默认是false
//readOnly: true
//设置主题 // 最大可回退的次数,默认 20
//,defaultTemplate : 'default' //设置默认的主题 maxUndoCount: 20,
//,defaultTheme : 'fresh-blue' //添加有那些主图
//回退相关选项 // 语言,默认是 'zh-cn'
//,maxUndoCount:20 //最大可回退的次数,默认20 lang: 'zh-cn',
//语言默认是zh-cn // 配置放大缩小的比例
//,lang:'zh-cn' zoom: [50, 80, 100, 120, 150, 200],
//设置km整体的z-index大小 // 图片尺寸限制
//,zIndex : 1000 maxImageWidth: 200,
//设置初始加载时展开的层数和子节点数目阈值 maxImageHeight: 200
//默认是全部展开,0表示全部展开
// ,
// defaultExpand: {
// defaultLayer: 2,
// defaultSubShow: 5
// }
//配置放大缩小的比例
//,zoom:[50,80,100,120,150,200]
//
//图片尺寸限制
//,maxImageWidth: 200
//,maxImageHeight: 200
//
}; };
})(); })();
\ No newline at end of file
...@@ -16,7 +16,24 @@ KityMinder.LANG['zh-cn'] = { ...@@ -16,7 +16,24 @@ KityMinder.LANG['zh-cn'] = {
}, },
'maintopic': '中心主题', 'maintopic': '中心主题',
'topic': '分支主题', 'topic': '分支主题',
'tooltips': { 'panels': {
'history': '历史',
'template': '模板',
'theme': '皮肤',
'layout': '布局',
'style': '样式',
'font': '字体',
'color': '颜色',
'background': '背景',
'insert': '插入',
'arrange': '调整',
'nodeop': '当前',
'priority': '优先级',
'progress': '进度',
'resource': '资源',
'attachment': '附件'
},
'ui': {
'undo': '撤销', 'undo': '撤销',
'redo': '重做', 'redo': '重做',
'bold': '加粗', 'bold': '加粗',
...@@ -33,13 +50,37 @@ KityMinder.LANG['zh-cn'] = { ...@@ -33,13 +50,37 @@ KityMinder.LANG['zh-cn'] = {
'resource': '资源', 'resource': '资源',
'help': '帮助', 'help': '帮助',
'preference': '偏好设置', 'preference': '偏好设置',
'image': '插入图片',
'hyperlink': '插入链接',
'unhyperlink': '删除链接',
'expandnode': '展开到叶子', 'expandnode': '展开到叶子',
'collapsenode': '收起到一级节点', 'collapsenode': '收起到一级节点',
'template': '模板', 'template': '模板',
'theme': '皮肤' 'theme': '皮肤',
'clearstyle': '清除样式',
'copystyle': '复制样式',
'pastestyle': '粘贴样式',
'appendsiblingnode': '下一主题',
'appendchildnode': '儿子主题',
'arrangeup': '前调',
'arrangedown': '后调',
'editnode': '编辑',
'removenode': '移除',
'priority': '优先级',
'progress': {
'p1': '未开始',
'p2': '完成 1/8',
'p3': '完成 1/4',
'p4': '完成 3/8',
'p5': '完成一半',
'p6': '完成 5/8',
'p7': '完成 3/4',
'p8': '完成 7/8',
'p9': '已完成',
'p0': '清除进度'
},
'link': '链接',
'image': '图片',
'removelink': '移除已有连接',
'removeimage': '移除已有图片',
'resetlayout': '整理布局'
}, },
'popupcolor': { 'popupcolor': {
'clearColor': '清空颜色', 'clearColor': '清空颜色',
...@@ -76,12 +117,6 @@ KityMinder.LANG['zh-cn'] = { ...@@ -76,12 +117,6 @@ KityMinder.LANG['zh-cn'] = {
'image': {}, 'image': {},
'resource': {} 'resource': {}
}, },
'node': {
'appendsiblingnode': '插入兄弟节点',
'appendchildnode': '插入子节点',
'removenode': '删除',
'editnode': '编辑'
},
'hyperlink': { 'hyperlink': {
'hyperlink': '链接...', 'hyperlink': '链接...',
'unhyperlink': '移除链接' 'unhyperlink': '移除链接'
......
/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2013 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v1.2.3
*/
!function(){"use strict";var a,b=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),c=function(a,c){var d,e,f,g,h,i;if(window.getComputedStyle?d=window.getComputedStyle(a,null).getPropertyValue(c):(e=b(c),d=a.currentStyle?a.currentStyle[e]:a.style[e]),"cursor"===c&&(!d||"auto"===d))for(f=a.tagName.toLowerCase(),g=["a"],h=0,i=g.length;i>h;h++)if(f===g[h])return"pointer";return d},d=function(a){if(p.prototype._singleton){a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),p.prototype._singleton.setCurrent(b)}},e=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},f=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},g=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},h=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},i=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(100*(b/c))/100),d},j=function(a){var b={left:0,top:0,width:0,height:0,zIndex:999999999},d=c(a,"z-index");if(d&&"auto"!==d&&(b.zIndex=parseInt(d,10)),a.getBoundingClientRect){var e,f,g,h=a.getBoundingClientRect();"pageXOffset"in window&&"pageYOffset"in window?(e=window.pageXOffset,f=window.pageYOffset):(g=i(),e=Math.round(document.documentElement.scrollLeft/g),f=Math.round(document.documentElement.scrollTop/g));var j=document.documentElement.clientLeft||0,k=document.documentElement.clientTop||0;b.left=h.left+e-j,b.top=h.top+f-k,b.width="width"in h?h.width:h.right-h.left,b.height="height"in h?h.height:h.bottom-h.top}return b},k=function(a,b){var c=!(b&&b.useNoCache===!1);return c?(-1===a.indexOf("?")?"?":"&")+"nocache="+(new Date).getTime():""},l=function(a){var b=[],c=[];return a.trustedOrigins&&("string"==typeof a.trustedOrigins?c.push(a.trustedOrigins):"object"==typeof a.trustedOrigins&&"length"in a.trustedOrigins&&(c=c.concat(a.trustedOrigins))),a.trustedDomains&&("string"==typeof a.trustedDomains?c.push(a.trustedDomains):"object"==typeof a.trustedDomains&&"length"in a.trustedDomains&&(c=c.concat(a.trustedDomains))),c.length&&b.push("trustedOrigins="+encodeURIComponent(c.join(","))),"string"==typeof a.amdModuleId&&a.amdModuleId&&b.push("amdModuleId="+encodeURIComponent(a.amdModuleId)),"string"==typeof a.cjsModuleId&&a.cjsModuleId&&b.push("cjsModuleId="+encodeURIComponent(a.cjsModuleId)),b.join("&")},m=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;d>c;c++)if(b[c]===a)return c;return-1},n=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},o=function(a,b,c,d,e){e?window.setTimeout(function(){a.call(b,c,d)},0):a.call(b,c,d)},p=function(a,b){if(a&&(p.prototype._singleton||this).glue(a),p.prototype._singleton)return p.prototype._singleton;p.prototype._singleton=this,this.options={};for(var c in s)this.options[c]=s[c];for(var d in b)this.options[d]=b[d];this.handlers={},p.detectFlashSupport()&&v()},q=[];p.prototype.setCurrent=function(b){a=b,this.reposition();var d=b.getAttribute("title");d&&this.setTitle(d);var e=this.options.forceHandCursor===!0||"pointer"===c(b,"cursor");return r.call(this,e),this},p.prototype.setText=function(a){return a&&""!==a&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a)),this},p.prototype.setTitle=function(a){return a&&""!==a&&this.htmlBridge.setAttribute("title",a),this},p.prototype.setSize=function(a,b){return this.ready()&&this.flashBridge.setSize(a,b),this},p.prototype.setHandCursor=function(a){return a="boolean"==typeof a?a:!!a,r.call(this,a),this.options.forceHandCursor=a,this};var r=function(a){this.ready()&&this.flashBridge.setHandCursor(a)};p.version="1.2.3";var s={moviePath:"ZeroClipboard.swf",trustedOrigins:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain",useNoCache:!0,forceHandCursor:!1};p.setDefaults=function(a){for(var b in a)s[b]=a[b]},p.destroy=function(){p.prototype._singleton.unglue(q);var a=p.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete p.prototype._singleton},p.detectFlashSupport=function(){var a=!1;if("function"==typeof ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}return!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0),a};var t=null,u=null,v=function(){var a,b,c=p.prototype._singleton,d=document.getElementById("global-zeroclipboard-html-bridge");if(!d){var e={};for(var f in c.options)e[f]=c.options[f];e.amdModuleId=t,e.cjsModuleId=u;var g=l(e),h=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+c.options.moviePath+k(c.options.moviePath,c.options)+'"/> <param name="allowScriptAccess" value="'+c.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+g+'"/> <embed src="'+c.options.moviePath+k(c.options.moviePath,c.options)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+g+'" scale="exactfit"> </embed> </object>';d=document.createElement("div"),d.id="global-zeroclipboard-html-bridge",d.setAttribute("class","global-zeroclipboard-container"),d.setAttribute("data-clipboard-ready",!1),d.style.position="absolute",d.style.left="-9999px",d.style.top="-9999px",d.style.width="15px",d.style.height="15px",d.style.zIndex="9999",d.innerHTML=h,document.body.appendChild(d)}c.htmlBridge=d,a=document["global-zeroclipboard-flash-bridge"],a&&(b=a.length)&&(a=a[b-1]),c.flashBridge=a||d.children[0].lastElementChild};p.prototype.resetBridge=function(){return this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),h(a,this.options.activeClass),a=null,this.options.text=null,this},p.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return"true"===a||a===!0},p.prototype.reposition=function(){if(!a)return!1;var b=j(a);return this.htmlBridge.style.top=b.top+"px",this.htmlBridge.style.left=b.left+"px",this.htmlBridge.style.width=b.width+"px",this.htmlBridge.style.height=b.height+"px",this.htmlBridge.style.zIndex=b.zIndex+1,this.setSize(b.width,b.height),this},p.dispatch=function(a,b){p.prototype._singleton.receiveEvent(a,b)},p.prototype.on=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);return this.handlers.noflash&&!p.detectFlashSupport()&&this.receiveEvent("onNoFlash",null),this},p.prototype.addEventListener=p.prototype.on,p.prototype.off=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}return this},p.prototype.removeEventListener=p.prototype.off,p.prototype.receiveEvent=function(b,c){b=b.toString().toLowerCase().replace(/^on/,"");var d=a,e=!0;switch(b){case"load":if(c&&parseFloat(c.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10)return this.receiveEvent("onWrongFlash",{flashVersion:c.flashVersion}),void 0;this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":g(d,this.options.hoverClass);break;case"mouseout":h(d,this.options.hoverClass),this.resetBridge();break;case"mousedown":g(d,this.options.activeClass);break;case"mouseup":h(d,this.options.activeClass);break;case"datarequested":var f=d.getAttribute("data-clipboard-target"),i=f?document.getElementById(f):null;if(i){var j=i.value||i.textContent||i.innerText;j&&this.setText(j)}else{var k=d.getAttribute("data-clipboard-text");k&&this.setText(k)}e=!1;break;case"complete":this.options.text=null}if(this.handlers[b]){var l=this.handlers[b];"string"==typeof l&&"function"==typeof window[l]&&(l=window[l]),"function"==typeof l&&o(l,d,this,c,e)}},p.prototype.glue=function(a){a=n(a);for(var b=0;b<a.length;b++)-1==m(a[b],q)&&(q.push(a[b]),e(a[b],"mouseover",d));return this},p.prototype.unglue=function(a){a=n(a);for(var b=0;b<a.length;b++){f(a[b],"mouseover",d);var c=m(a[b],q);-1!=c&&q.splice(c,1)}return this},"function"==typeof define&&define.amd?define(["require","exports","module"],function(a,b,c){return t=c&&c.id||null,p}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?(u=module.id||null,module.exports=p):window.ZeroClipboard=p}();
\ No newline at end of file
var baidu = baidu || {};
baidu.frontia = {}, function(e) {
baidu.frontia.version = "1.0.0", baidu.frontia.serviceHost = {PCS: "https://c.pcs.baidu.com",Frontia: "https://frontia.baidu.com",PBLog: "http://frontialog.smrapp.baidu.com",Social: "https://openapi.baidu.com"}, baidu.frontia.currentAccount = null, baidu.frontia.apiKey = null, baidu.frontia._CURRENT_USER_KEY = "currentUser", "undefined" != typeof localStorage && (baidu.frontia.localStorage = localStorage), baidu.frontia.DomainManager = {getSocialDomain: function() {
return baidu.frontia.serviceHost.Social
},getPCSDomain: function() {
return baidu.frontia.serviceHost.PCS
},getFrontiaDomain: function() {
return baidu.frontia.serviceHost.Frontia
},getPBLogDomain: function() {
return baidu.frontia.serviceHost.PBLog
}}, baidu.frontia.Base = Object.defineProperty(function() {
}, "extend", {value: function(e, t) {
var r = e && e.hasOwnProperty("constructor") ? e.constructor : this, n = function() {
r.apply(this, arguments)
};
if (n.prototype = function(e, t) {
return Object.getOwnPropertyNames(t).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r))
}), e
}(Object.create(this.prototype), e || {}), t)
for (var a in t)
t.hasOwnProperty(a) && (n[a] = t[a]);
return Object.defineProperty(n, "extend", Object.getOwnPropertyDescriptor(this, "extend")), n
}}), baidu.frontia.Object = baidu.frontia.Base.extend({acl: null,constructor: function(t) {
if (t && !(t instanceof e.ACL))
throw new Error("[construct ]: acl is invalid");
this.acl = t || null
},setAcl: function(t) {
if (t && !(t instanceof e.ACL))
throw new Error("[setAcl ]: acl is invalid");
this.acl = t || null
},getACL: function() {
return this.acl
},_getACLInfo: function() {
var t = null;
return this.acl instanceof e.ACL && (t = this.acl.toJSON()), t
}}), baidu.frontia.setCurrentAccount = function(t) {
if (!(t instanceof e.User || t instanceof e.Role))
throw new Error("[setCurrentAccount]: account is invalid");
var r = t.toJSON();
baidu.frontia.localStorage.setItem(baidu.frontia._getLocalStorageKey(baidu.frontia._CURRENT_USER_KEY), JSON.stringify(r)), baidu.frontia.currentAccount = t
}, baidu.frontia.logOutCurrentAccount = function() {
baidu.frontia.currentAccount = null, baidu.frontia.localStorage.removeItem(baidu.frontia._getLocalStorageKey(baidu.frontia._CURRENT_USER_KEY))
}, baidu.frontia.getCurrentAccount = function() {
if (baidu.frontia.currentAccount)
return baidu.frontia.currentAccount;
var e = baidu.frontia.localStorage.getItem(baidu.frontia._getLocalStorageKey(baidu.frontia._CURRENT_USER_KEY));
if (!e)
return null;
var t = JSON.parse(e);
return "user" === t.type ? new baidu.frontia.User({socialId: t.socialId,accessToken: t.accessToken,name: t.name,mediaType: t.mediaType,expiresIn: t.expiresIn}) : new baidu.frontia.Role(t.roleId)
}, baidu.frontia.init = function(e) {
if (!e)
throw new Error("[init]: apiKey is invaild");
baidu.frontia.apiKey = e
}, baidu.frontia.getApiKey = function() {
return baidu.frontia.apiKey
}, baidu.frontia._getLocalStorageKey = function(e) {
if (!baidu.frontia.apiKey)
throw "Should call baidu.frontia.init before using baidu.frontia";
if (e || (e = ""), "string" != typeof e)
throw "userKey must be a string when getting localStorage key";
return "baidu.frontia/" + baidu.frontia.apiKey + "/" + e
}
}(baidu.frontia), "undefined" != typeof module && module.exports && (module.exports = baidu), baidu.frontia.error = baidu.frontia.error || {}, function() {
baidu.frontia.error = function(e, t) {
t = t || "error", this.code = e.error_code || e.Code, this.message = e.error_msg || e.Message, this.message += " [" + t + "]"
}, baidu.frontia.ERR_MSG = {NO_AK: {error_code: -1,error_msg: "No AK found, please config AK by calling BaiduFrontia.init(yourak) at first"},INVALID_AK: {error_code: -1,error_msg: "Invalid AK"},INVALID_PARAMS: {error_code: -1,error_msg: "Invalid params"},INVALID_RES_TYPE: {error_code: -1,error_msg: "Invalid params: response_type"},INVALID_MEDIA_TYPE: {error_code: -1,error_msg: "Invalid params: media_type"}}
}(baidu.frontia), function() {
"use strict";
function e(e, t) {
var r = e.split("."), n = g;
!(r[0] in n) && n.execScript && n.execScript("var " + r[0]);
for (var a; r.length && (a = r.shift()); )
r.length || t === h ? n = n[a] ? n[a] : n[a] = {} : n[a] = t
}
function t(e, t) {
if (this.index = "number" == typeof t ? t : 0, this.f = 0, this.buffer = e instanceof (m ? Uint8Array : Array) ? e : new (m ? Uint8Array : Array)(32768), 2 * this.buffer.length <= this.index)
throw Error("invalid index");
this.buffer.length <= this.index && r(this)
}
function r(e) {
var t, r = e.buffer, n = r.length, a = new (m ? Uint8Array : Array)(n << 1);
if (m)
a.set(r);
else
for (t = 0; n > t; ++t)
a[t] = r[t];
return e.buffer = a
}
function n(e, t, r) {
var n, a = "number" == typeof t ? t : t = 0, o = "number" == typeof r ? r : e.length;
for (n = -1, a = 7 & o; a--; ++t)
n = n >>> 8 ^ S[255 & (n ^ e[t])];
for (a = o >> 3; a--; t += 8)
n = n >>> 8 ^ S[255 & (n ^ e[t])], n = n >>> 8 ^ S[255 & (n ^ e[t + 1])], n = n >>> 8 ^ S[255 & (n ^ e[t + 2])], n = n >>> 8 ^ S[255 & (n ^ e[t + 3])], n = n >>> 8 ^ S[255 & (n ^ e[t + 4])], n = n >>> 8 ^ S[255 & (n ^ e[t + 5])], n = n >>> 8 ^ S[255 & (n ^ e[t + 6])], n = n >>> 8 ^ S[255 & (n ^ e[t + 7])];
return (4294967295 ^ n) >>> 0
}
function a(e) {
this.buffer = new (m ? Uint16Array : Array)(2 * e), this.length = 0
}
function o(e, t) {
this.h = j, this.j = 0, this.input = m && e instanceof Array ? new Uint8Array(e) : e, this.c = 0, t && (t.lazy && (this.j = t.lazy), "number" == typeof t.compressionType && (this.h = t.compressionType), t.outputBuffer && (this.a = m && t.outputBuffer instanceof Array ? new Uint8Array(t.outputBuffer) : t.outputBuffer), "number" == typeof t.outputIndex && (this.c = t.outputIndex)), this.a || (this.a = new (m ? Uint8Array : Array)(32768))
}
function i(e, t) {
this.length = e, this.k = t
}
function s(e, t) {
function r(e, t) {
var r, n = e.k, a = [], o = 0;
r = O[e.length], a[o++] = 65535 & r, a[o++] = 255 & r >> 16, a[o++] = r >> 24;
var i;
switch (d) {
case 1 === n:
i = [0, n - 1, 0];
break;
case 2 === n:
i = [1, n - 2, 0];
break;
case 3 === n:
i = [2, n - 3, 0];
break;
case 4 === n:
i = [3, n - 4, 0];
break;
case 6 >= n:
i = [4, n - 5, 1];
break;
case 8 >= n:
i = [5, n - 7, 1];
break;
case 12 >= n:
i = [6, n - 9, 2];
break;
case 16 >= n:
i = [7, n - 13, 2];
break;
case 24 >= n:
i = [8, n - 17, 3];
break;
case 32 >= n:
i = [9, n - 25, 3];
break;
case 48 >= n:
i = [10, n - 33, 4];
break;
case 64 >= n:
i = [11, n - 49, 4];
break;
case 96 >= n:
i = [12, n - 65, 5];
break;
case 128 >= n:
i = [13, n - 97, 5];
break;
case 192 >= n:
i = [14, n - 129, 6];
break;
case 256 >= n:
i = [15, n - 193, 6];
break;
case 384 >= n:
i = [16, n - 257, 7];
break;
case 512 >= n:
i = [17, n - 385, 7];
break;
case 768 >= n:
i = [18, n - 513, 8];
break;
case 1024 >= n:
i = [19, n - 769, 8];
break;
case 1536 >= n:
i = [20, n - 1025, 9];
break;
case 2048 >= n:
i = [21, n - 1537, 9];
break;
case 3072 >= n:
i = [22, n - 2049, 10];
break;
case 4096 >= n:
i = [23, n - 3073, 10];
break;
case 6144 >= n:
i = [24, n - 4097, 11];
break;
case 8192 >= n:
i = [25, n - 6145, 11];
break;
case 12288 >= n:
i = [26, n - 8193, 12];
break;
case 16384 >= n:
i = [27, n - 12289, 12];
break;
case 24576 >= n:
i = [28, n - 16385, 13];
break;
case 32768 >= n:
i = [29, n - 24577, 13];
break;
default:
throw "invalid distance"
}
r = i, a[o++] = r[0], a[o++] = r[1], a[o++] = r[2];
var s, c;
for (s = 0, c = a.length; c > s; ++s)
y[_++] = a[s];
v[a[0]]++, b[a[3]]++, A = e.length + t - 1, l = null
}
var n, a, o, i, s, u, f, l, p, g = {}, y = m ? new Uint16Array(2 * t.length) : [], _ = 0, A = 0, v = new (m ? Uint32Array : Array)(286), b = new (m ? Uint32Array : Array)(30), w = e.j;
if (!m) {
for (o = 0; 285 >= o; )
v[o++] = 0;
for (o = 0; 29 >= o; )
b[o++] = 0
}
for (v[256] = 1, n = 0, a = t.length; a > n; ++n) {
for (o = s = 0, i = 3; i > o && n + o !== a; ++o)
s = s << 8 | t[n + o];
if (g[s] === h && (g[s] = []), u = g[s], !(0 < A--)) {
for (; 0 < u.length && 32768 < n - u[0]; )
u.shift();
if (n + 3 >= a) {
for (l && r(l, -1), o = 0, i = a - n; i > o; ++o)
p = t[n + o], y[_++] = p, ++v[p];
break
}
0 < u.length ? (f = c(t, n, u), l ? l.length < f.length ? (p = t[n - 1], y[_++] = p, ++v[p], r(f, 0)) : r(l, -1) : f.length < w ? l = f : r(f, 0)) : l ? r(l, -1) : (p = t[n], y[_++] = p, ++v[p])
}
u.push(n)
}
return y[_++] = 256, v[256]++, e.n = v, e.m = b, m ? y.subarray(0, _) : y
}
function c(e, t, r) {
var n, a, o, s, c, u, f = 0, l = e.length;
s = 0, u = r.length;
e: for (; u > s; s++) {
if (n = r[u - s - 1], o = 3, f > 3) {
for (c = f; c > 3; c--)
if (e[n + c - 1] !== e[t + c - 1])
continue e;
o = f
}
for (; 258 > o && l > t + o && e[n + o] === e[t + o]; )
++o;
if (o > f && (a = n, f = o), 258 === o)
break
}
return new i(f, t - a)
}
function u(e, t) {
var r, n, o, i, s, c = e.length, u = new a(572), l = new (m ? Uint8Array : Array)(c);
if (!m)
for (i = 0; c > i; i++)
l[i] = 0;
for (i = 0; c > i; ++i)
0 < e[i] && u.push(i, e[i]);
if (r = Array(u.length / 2), n = new (m ? Uint32Array : Array)(u.length / 2), 1 === r.length)
return l[u.pop().index] = 1, l;
for (i = 0, s = u.length / 2; s > i; ++i)
r[i] = u.pop(), n[i] = r[i].value;
for (o = f(n, n.length, t), i = 0, s = r.length; s > i; ++i)
l[r[i].index] = o[i];
return l
}
function f(e, t, r) {
function n(e) {
var r = h[e][d[e]];
r === t ? (n(e + 1), n(e + 1)) : --l[r], ++d[e]
}
var a, o, i, s, c, u = new (m ? Uint16Array : Array)(r), f = new (m ? Uint8Array : Array)(r), l = new (m ? Uint8Array : Array)(t), p = Array(r), h = Array(r), d = Array(r), g = (1 << r) - t, y = 1 << r - 1;
for (u[r - 1] = t, o = 0; r > o; ++o)
y > g ? f[o] = 0 : (f[o] = 1, g -= y), g <<= 1, u[r - 2 - o] = (0 | u[r - 1 - o] / 2) + t;
for (u[0] = f[0], p[0] = Array(u[0]), h[0] = Array(u[0]), o = 1; r > o; ++o)
u[o] > 2 * u[o - 1] + f[o] && (u[o] = 2 * u[o - 1] + f[o]), p[o] = Array(u[o]), h[o] = Array(u[o]);
for (a = 0; t > a; ++a)
l[a] = r;
for (i = 0; i < u[r - 1]; ++i)
p[r - 1][i] = e[i], h[r - 1][i] = i;
for (a = 0; r > a; ++a)
d[a] = 0;
for (1 === f[r - 1] && (--l[0], ++d[r - 1]), o = r - 2; o >= 0; --o) {
for (s = a = 0, c = d[o + 1], i = 0; i < u[o]; i++)
s = p[o + 1][c] + p[o + 1][c + 1], s > e[a] ? (p[o][i] = s, h[o][i] = t, c += 2) : (p[o][i] = e[a], h[o][i] = a, ++a);
d[o] = 0, 1 === f[o] && n(o)
}
return l
}
function l(e) {
var t, r, n, a, o = new (m ? Uint16Array : Array)(e.length), i = [], s = [], c = 0;
for (t = 0, r = e.length; r > t; t++)
i[e[t]] = (0 | i[e[t]]) + 1;
for (t = 1, r = 16; r >= t; t++)
s[t] = c, c += 0 | i[t], c <<= 1;
for (t = 0, r = e.length; r > t; t++)
for (c = s[e[t]], s[e[t]] += 1, n = o[t] = 0, a = e[t]; a > n; n++)
o[t] = o[t] << 1 | 1 & c, c >>>= 1;
return o
}
function p(e, t) {
this.input = e, this.c = this.i = 0, this.d = {}, t && (t.flags && (this.d = t.flags), "string" == typeof t.filename && (this.filename = t.filename), "string" == typeof t.comment && (this.l = t.comment), t.deflateOptions && (this.e = t.deflateOptions)), this.e || (this.e = {})
}
var h = void 0, d = !0, g = this, m = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array;
t.prototype.b = function(e, t, n) {
var a, o = this.buffer, i = this.index, s = this.f, c = o[i];
if (n && t > 1 && (e = t > 8 ? (w[255 & e] << 24 | w[255 & e >>> 8] << 16 | w[255 & e >>> 16] << 8 | w[255 & e >>> 24]) >> 32 - t : w[e] >> 8 - t), 8 > t + s)
c = c << t | e, s += t;
else
for (a = 0; t > a; ++a)
c = c << 1 | 1 & e >> t - a - 1, 8 === ++s && (s = 0, o[i++] = w[c], c = 0, i === o.length && (o = r(this)));
o[i] = c, this.buffer = o, this.f = s, this.index = i
}, t.prototype.finish = function() {
var e, t = this.buffer, r = this.index;
return 0 < this.f && (t[r] <<= 8 - this.f, t[r] = w[t[r]], r++), m ? e = t.subarray(0, r) : (t.length = r, e = t), e
};
var y, _ = new (m ? Uint8Array : Array)(256);
for (y = 0; 256 > y; ++y) {
for (var A = y, v = A, b = 7, A = A >>> 1; A; A >>>= 1)
v <<= 1, v |= 1 & A, --b;
_[y] = (255 & v << b) >>> 0
}
var w = _, T = [0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274, 2044508324, 3772115230, 2547177864, 162941995, 2125561021, 3887607047, 2428444049, 498536548, 1789927666, 4089016648, 2227061214, 450548861, 1843258603, 4107580753, 2211677639, 325883990, 1684777152, 4251122042, 2321926636, 335633487, 1661365465, 4195302755, 2366115317, 997073096, 1281953886, 3579855332, 2724688242, 1006888145, 1258607687, 3524101629, 2768942443, 901097722, 1119000684, 3686517206, 2898065728, 853044451, 1172266101, 3705015759, 2882616665, 651767980, 1373503546, 3369554304, 3218104598, 565507253, 1454621731, 3485111705, 3099436303, 671266974, 1594198024, 3322730930, 2970347812, 795835527, 1483230225, 3244367275, 3060149565, 1994146192, 31158534, 2563907772, 4023717930, 1907459465, 112637215, 2680153253, 3904427059, 2013776290, 251722036, 2517215374, 3775830040, 2137656763, 141376813, 2439277719, 3865271297, 1802195444, 476864866, 2238001368, 4066508878, 1812370925, 453092731, 2181625025, 4111451223, 1706088902, 314042704, 2344532202, 4240017532, 1658658271, 366619977, 2362670323, 4224994405, 1303535960, 984961486, 2747007092, 3569037538, 1256170817, 1037604311, 2765210733, 3554079995, 1131014506, 879679996, 2909243462, 3663771856, 1141124467, 855842277, 2852801631, 3708648649, 1342533948, 654459306, 3188396048, 3373015174, 1466479909, 544179635, 3110523913, 3462522015, 1591671054, 702138776, 2966460450, 3352799412, 1504918807, 783551873, 3082640443, 3233442989, 3988292384, 2596254646, 62317068, 1957810842, 3939845945, 2647816111, 81470997, 1943803523, 3814918930, 2489596804, 225274430, 2053790376, 3826175755, 2466906013, 167816743, 2097651377, 4027552580, 2265490386, 503444072, 1762050814, 4150417245, 2154129355, 426522225, 1852507879, 4275313526, 2312317920, 282753626, 1742555852, 4189708143, 2394877945, 397917763, 1622183637, 3604390888, 2714866558, 953729732, 1340076626, 3518719985, 2797360999, 1068828381, 1219638859, 3624741850, 2936675148, 906185462, 1090812512, 3747672003, 2825379669, 829329135, 1181335161, 3412177804, 3160834842, 628085408, 1382605366, 3423369109, 3138078467, 570562233, 1426400815, 3317316542, 2998733608, 733239954, 1555261956, 3268935591, 3050360625, 752459403, 1541320221, 2607071920, 3965973030, 1969922972, 40735498, 2617837225, 3943577151, 1913087877, 83908371, 2512341634, 3803740692, 2075208622, 213261112, 2463272603, 3855990285, 2094854071, 198958881, 2262029012, 4057260610, 1759359992, 534414190, 2176718541, 4139329115, 1873836001, 414664567, 2282248934, 4279200368, 1711684554, 285281116, 2405801727, 4167216745, 1634467795, 376229701, 2685067896, 3608007406, 1308918612, 956543938, 2808555105, 3495958263, 1231636301, 1047427035, 2932959818, 3654703836, 1088359270, 936918e3, 2847714899, 3736837829, 1202900863, 817233897, 3183342108, 3401237130, 1404277552, 615818150, 3134207493, 3453421203, 1423857449, 601450431, 3009837614, 3294710456, 1567103746, 711928724, 3020668471, 3272380065, 1510334235, 755167117], S = m ? new Uint32Array(T) : T;
a.prototype.getParent = function(e) {
return 2 * (0 | (e - 2) / 4)
}, a.prototype.push = function(e, t) {
var r, n, a, o = this.buffer;
for (r = this.length, o[this.length++] = t, o[this.length++] = e; r > 0 && (n = this.getParent(r), o[r] > o[n]); )
a = o[r], o[r] = o[n], o[n] = a, a = o[r + 1], o[r + 1] = o[n + 1], o[n + 1] = a, r = n;
return this.length
}, a.prototype.pop = function() {
var e, t, r, n, a, o = this.buffer;
for (t = o[0], e = o[1], this.length -= 2, o[0] = o[this.length], o[1] = o[this.length + 1], a = 0; (n = 2 * a + 2, !(n >= this.length)) && (n + 2 < this.length && o[n + 2] > o[n] && (n += 2), o[n] > o[a]); )
r = o[a], o[a] = o[n], o[n] = r, r = o[a + 1], o[a + 1] = o[n + 1], o[n + 1] = r, a = n;
return {index: e,value: t,length: this.length}
};
var k, j = 2, I = [];
for (k = 0; 288 > k; k++)
switch (d) {
case 143 >= k:
I.push([k + 48, 8]);
break;
case 255 >= k:
I.push([k - 144 + 400, 9]);
break;
case 279 >= k:
I.push([k - 256 + 0, 7]);
break;
case 287 >= k:
I.push([k - 280 + 192, 8]);
break;
default:
throw "invalid literal: " + k
}
o.prototype.g = function() {
var e, r, n, a, o = this.input;
switch (this.h) {
case 0:
for (n = 0, a = o.length; a > n; ) {
r = m ? o.subarray(n, n + 65535) : o.slice(n, n + 65535), n += r.length;
var i = r, c = n === a, f = h, p = h, g = h, y = h, _ = h, A = this.a, v = this.c;
if (m) {
for (A = new Uint8Array(this.a.buffer); A.length <= v + i.length + 5; )
A = new Uint8Array(A.length << 1);
A.set(this.a)
}
if (f = c ? 1 : 0, A[v++] = 0 | f, p = i.length, g = 65535 & ~p + 65536, A[v++] = 255 & p, A[v++] = 255 & p >>> 8, A[v++] = 255 & g, A[v++] = 255 & g >>> 8, m)
A.set(i, v), v += i.length, A = A.subarray(0, v);
else {
for (y = 0, _ = i.length; _ > y; ++y)
A[v++] = i[y];
A.length = v
}
this.c = v, this.a = A
}
break;
case 1:
var b = new t(m ? new Uint8Array(this.a.buffer) : this.a, this.c);
b.b(1, 1, d), b.b(1, 2, d);
var w, T, S, k = s(this, o);
for (w = 0, T = k.length; T > w; w++)
if (S = k[w], t.prototype.b.apply(b, I[S]), S > 256)
b.b(k[++w], k[++w], d), b.b(k[++w], 5), b.b(k[++w], k[++w], d);
else if (256 === S)
break;
this.a = b.finish(), this.c = this.a.length;
break;
case j:
var x, O, R, D, N, P, E, C, U, L, M, q, F, K, J, B = new t(m ? new Uint8Array(this.a.buffer) : this.a, this.c), z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], V = Array(19);
for (x = j, B.b(1, 1, d), B.b(x, 2, d), O = s(this, o), P = u(this.n, 15), E = l(P), C = u(this.m, 7), U = l(C), R = 286; R > 257 && 0 === P[R - 1]; R--)
;
for (D = 30; D > 1 && 0 === C[D - 1]; D--)
;
var H, G, Q, Y, $, X, Z = R, W = D, et = new (m ? Uint32Array : Array)(Z + W), tt = new (m ? Uint32Array : Array)(316), rt = new (m ? Uint8Array : Array)(19);
for (H = G = 0; Z > H; H++)
et[G++] = P[H];
for (H = 0; W > H; H++)
et[G++] = C[H];
if (!m)
for (H = 0, Y = rt.length; Y > H; ++H)
rt[H] = 0;
for (H = $ = 0, Y = et.length; Y > H; H += G) {
for (G = 1; Y > H + G && et[H + G] === et[H]; ++G)
;
if (Q = G, 0 === et[H])
if (3 > Q)
for (; 0 < Q--; )
tt[$++] = 0, rt[0]++;
else
for (; Q > 0; )
X = 138 > Q ? Q : 138, X > Q - 3 && Q > X && (X = Q - 3), 10 >= X ? (tt[$++] = 17, tt[$++] = X - 3, rt[17]++) : (tt[$++] = 18, tt[$++] = X - 11, rt[18]++), Q -= X;
else if (tt[$++] = et[H], rt[et[H]]++, Q--, 3 > Q)
for (; 0 < Q--; )
tt[$++] = et[H], rt[et[H]]++;
else
for (; Q > 0; )
X = 6 > Q ? Q : 6, X > Q - 3 && Q > X && (X = Q - 3), tt[$++] = 16, tt[$++] = X - 3, rt[16]++, Q -= X
}
for (e = m ? tt.subarray(0, $) : tt.slice(0, $), L = u(rt, 7), K = 0; 19 > K; K++)
V[K] = L[z[K]];
for (N = 19; N > 4 && 0 === V[N - 1]; N--)
;
for (M = l(L), B.b(R - 257, 5, d), B.b(D - 1, 5, d), B.b(N - 4, 4, d), K = 0; N > K; K++)
B.b(V[K], 3, d);
for (K = 0, J = e.length; J > K; K++)
if (q = e[K], B.b(M[q], L[q], d), q >= 16) {
switch (K++, q) {
case 16:
F = 2;
break;
case 17:
F = 3;
break;
case 18:
F = 7;
break;
default:
throw "invalid code: " + q
}
B.b(e[K], F, d)
}
var nt, at, ot, it, st, ct, ut, ft, lt = [E, P], pt = [U, C];
for (st = lt[0], ct = lt[1], ut = pt[0], ft = pt[1], nt = 0, at = O.length; at > nt; ++nt)
if (ot = O[nt], B.b(st[ot], ct[ot], d), ot > 256)
B.b(O[++nt], O[++nt], d), it = O[++nt], B.b(ut[it], ft[it], d), B.b(O[++nt], O[++nt], d);
else if (256 === ot)
break;
this.a = B.finish(), this.c = this.a.length;
break;
default:
throw "invalid compression type"
}
return this.a
};
var x = function() {
function e(e) {
switch (d) {
case 3 === e:
return [257, e - 3, 0];
case 4 === e:
return [258, e - 4, 0];
case 5 === e:
return [259, e - 5, 0];
case 6 === e:
return [260, e - 6, 0];
case 7 === e:
return [261, e - 7, 0];
case 8 === e:
return [262, e - 8, 0];
case 9 === e:
return [263, e - 9, 0];
case 10 === e:
return [264, e - 10, 0];
case 12 >= e:
return [265, e - 11, 1];
case 14 >= e:
return [266, e - 13, 1];
case 16 >= e:
return [267, e - 15, 1];
case 18 >= e:
return [268, e - 17, 1];
case 22 >= e:
return [269, e - 19, 2];
case 26 >= e:
return [270, e - 23, 2];
case 30 >= e:
return [271, e - 27, 2];
case 34 >= e:
return [272, e - 31, 2];
case 42 >= e:
return [273, e - 35, 3];
case 50 >= e:
return [274, e - 43, 3];
case 58 >= e:
return [275, e - 51, 3];
case 66 >= e:
return [276, e - 59, 3];
case 82 >= e:
return [277, e - 67, 4];
case 98 >= e:
return [278, e - 83, 4];
case 114 >= e:
return [279, e - 99, 4];
case 130 >= e:
return [280, e - 115, 4];
case 162 >= e:
return [281, e - 131, 5];
case 194 >= e:
return [282, e - 163, 5];
case 226 >= e:
return [283, e - 195, 5];
case 257 >= e:
return [284, e - 227, 5];
case 258 === e:
return [285, e - 258, 0];
default:
throw "invalid length: " + e
}
}
var t, r, n = [];
for (t = 3; 258 >= t; t++)
r = e(t), n[t] = r[2] << 24 | r[1] << 16 | r[0];
return n
}(), O = m ? new Uint32Array(x) : x;
p.prototype.g = function() {
var e, t, r, a, i, s, c, u, f = new (m ? Uint8Array : Array)(32768), l = 0, p = this.input, d = this.i, g = this.filename, y = this.l;
if (f[l++] = 31, f[l++] = 139, f[l++] = 8, e = 0, this.d.fname && (e |= N), this.d.fcomment && (e |= P), this.d.fhcrc && (e |= D), f[l++] = e, t = 0 | (Date.now ? Date.now() : +new Date) / 1e3, f[l++] = 255 & t, f[l++] = 255 & t >>> 8, f[l++] = 255 & t >>> 16, f[l++] = 255 & t >>> 24, f[l++] = 0, f[l++] = R, this.d.fname !== h) {
for (c = 0, u = g.length; u > c; ++c)
s = g.charCodeAt(c), s > 255 && (f[l++] = 255 & s >>> 8), f[l++] = 255 & s;
f[l++] = 0
}
if (this.d.comment) {
for (c = 0, u = y.length; u > c; ++c)
s = y.charCodeAt(c), s > 255 && (f[l++] = 255 & s >>> 8), f[l++] = 255 & s;
f[l++] = 0
}
return this.d.fhcrc && (r = 65535 & n(f, 0, l), f[l++] = 255 & r, f[l++] = 255 & r >>> 8), this.e.outputBuffer = f, this.e.outputIndex = l, i = new o(p, this.e), f = i.g(), l = i.c, m && (l + 8 > f.buffer.byteLength ? (this.a = new Uint8Array(l + 8), this.a.set(new Uint8Array(f.buffer)), f = this.a) : f = new Uint8Array(f.buffer)), a = n(p, h, h), f[l++] = 255 & a, f[l++] = 255 & a >>> 8, f[l++] = 255 & a >>> 16, f[l++] = 255 & a >>> 24, u = p.length, f[l++] = 255 & u, f[l++] = 255 & u >>> 8, f[l++] = 255 & u >>> 16, f[l++] = 255 & u >>> 24, this.i = d, m && l < f.length && (this.a = f = f.subarray(0, l)), f
};
var R = 255, D = 2, N = 8, P = 16;
e("Zlib.Gzip", p), e("Zlib.Gzip.prototype.compress", p.prototype.g)
}.call(this), baidu.frontia.util = {}, function(namespace_) {
var now = +new Date, util = {};
util.guid = function() {
return "baidu_frontia_" + now++
}, util.mix = function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
if (r)
for (var n in r)
r.hasOwnProperty(n) && (e[n] = r[n])
}
return e
}, util.noop = function() {
}, util.parseJSON = function(text) {
return window.JSON && "function" == typeof JSON.parse ? JSON.parse(text) : eval("(" + text + ")")
};
var whitespace = /(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g;
util.trim = function(e) {
return e.replace(whitespace, "")
}, util.encodeHTML = function(e) {
return e += "", e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
}, util.serializeURL = function(e) {
if (!e)
return "";
var t = "";
for (var r in e)
if (e.hasOwnProperty(r)) {
var n = e[r];
t += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(n)
}
return t.slice(1)
}, function(e) {
"use strict";
if (!e.Base64) {
var t, r = "2.1.2";
"undefined" != typeof module && module.exports && (t = require("buffer").Buffer);
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = function(e) {
for (var t = {}, r = 0, n = e.length; n > r; r++)
t[e.charAt(r)] = r;
return t
}(n), o = String.fromCharCode, i = function(e) {
if (e.length < 2) {
var t = e.charCodeAt(0);
return 128 > t ? e : 2048 > t ? o(192 | t >>> 6) + o(128 | 63 & t) : o(224 | 15 & t >>> 12) + o(128 | 63 & t >>> 6) + o(128 | 63 & t)
}
var t = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320);
return o(240 | 7 & t >>> 18) + o(128 | 63 & t >>> 12) + o(128 | 63 & t >>> 6) + o(128 | 63 & t)
}, s = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, c = function(e) {
return e.replace(s, i)
}, u = function(e) {
var t = [0, 2, 1][e.length % 3], r = e.charCodeAt(0) << 16 | (e.length > 1 ? e.charCodeAt(1) : 0) << 8 | (e.length > 2 ? e.charCodeAt(2) : 0), a = [n.charAt(r >>> 18), n.charAt(63 & r >>> 12), t >= 2 ? "=" : n.charAt(63 & r >>> 6), t >= 1 ? "=" : n.charAt(63 & r)];
return a.join("")
}, f = e.btoa || function(e) {
return e.replace(/[\s\S]{1,3}/g, u)
}, l = t ? function(e) {
return new t(e).toString("base64")
} : function(e) {
return f(c(e))
}, p = function(e, t) {
return t ? l(e).replace(/[+\/]/g, function(e) {
return "+" == e ? "-" : "_"
}).replace(/=/g, "") : l(e)
}, h = function(e) {
return p(e, !0)
}, d = new RegExp(["[À-ß][€-¿]", "[à-ï][€-¿]{2}", "[ð-÷][€-¿]{3}"].join("|"), "g"), g = function(e) {
switch (e.length) {
case 4:
var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), r = t - 65536;
return o((r >>> 10) + 55296) + o((1023 & r) + 56320);
case 3:
return o((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
default:
return o((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1))
}
}, m = function(e) {
return e.replace(d, g)
}, y = function(e) {
var t = e.length, r = t % 4, n = (t > 0 ? a[e.charAt(0)] << 18 : 0) | (t > 1 ? a[e.charAt(1)] << 12 : 0) | (t > 2 ? a[e.charAt(2)] << 6 : 0) | (t > 3 ? a[e.charAt(3)] : 0), i = [o(n >>> 16), o(255 & n >>> 8), o(255 & n)];
return i.length -= [0, 0, 2, 1][r], i.join("")
}, _ = e.atob || function(e) {
return e.replace(/[\s\S]{1,4}/g, y)
}, A = t ? function(e) {
return new t(e, "base64").toString()
} : function(e) {
return m(_(e))
}, v = function(e) {
return A(e.replace(/[-_]/g, function(e) {
return "-" == e ? "+" : "/"
}).replace(/[^A-Za-z0-9\+\/]/g, ""))
};
e.mix(e, {VERSION: r,atob: _,btoa: f,fromBase64: v,toBase64: p,utob: c,encode: p,encodeURI: h,btou: m,decode: v})
}
}(util), util.isBoolean = function(e) {
return e === !0 || e === !1 || "[object Boolean]" == toString.call(e)
}, namespace_.util = util
}(baidu.frontia), baidu.frontia.ajax = {}, function(e) {
function t(e, t) {
var r = a.serializeURL(t);
if (r) {
var n = e.indexOf("?") >= 0 ? "&" : "?";
return e + n + r
}
return e
}
function r(e, t) {
null == t && (t = "");
var a = n.hooks.serializeData.getKey, o = e ? encodeURIComponent(e) : "", i = Object.prototype.toString.call(t);
switch (i) {
case "[object Array]":
for (var s = [], c = 0; c < t.length; c++) {
var u = t[c];
s[c] = r("", u)
}
return o ? o + "=" + s.join(",") : s.join(",");
case "[object Object]":
var f = [];
for (var l in t) {
var p = a(l, e), h = r(p, t[l]);
f.push(h)
}
return f.join("&");
default:
return o ? o + "=" + encodeURIComponent(t) : encodeURIComponent(t)
}
}
var n = {}, a = e.util;
n.hooks = {}, n.hooks.serializeData = function(e) {
return r("", e)
}, n.hooks.serializeData.getKey = function(e, t) {
return t ? t + "." + e : e
}, n.request = function(e) {
var r = {method: "POST",data: {},cache: !0,callback: function() {
},onerror: function() {
}};
e = a.mix(r, e);
var o, i = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
i.onreadystatechange = function() {
if (4 === i.readyState) {
clearTimeout(o);
var t = i.status;
if (0 === t ? t = 200 : 1223 === t && (t = 204), 200 > t || t >= 300 && 304 !== t)
return e.onerror(i), void 0;
var r = i.responseText;
if ("json" === e.dataType)
try {
r = a.parseJSON(r)
} catch (n) {
return e.onerror(i, n), void 0
}
e.callback(r)
}
};
var s = e.method.toUpperCase(), c = {};
"GET" === s && a.mix(c, e.data), e.cache === !1 && (c._ = +new Date);
var u = t(e.url, c);
if (i.open(s, u, !0), e.header) {
var f;
for (f in e.header)
e.header.hasOwnProperty(f) && i.setRequestHeader(f, e.header[f])
}
if ("GET" === s)
i.send();
else {
var l = e.contentType || "application/x-www-form-urlencoded";
i.setRequestHeader("Content-type", l);
var p = n.hooks.serializeData(e.data);
i.send(p), i.send(e.data)
}
return e.timeout > 0 && (o = setTimeout(function() {
i.status = 408, e.onerror(i)
}, e.timeout)), i
}, n.get = function(e, t, r) {
var o = {method: "GET",url: e,data: t,cache: !1};
return r = a.mix(o, r), n.request(r)
}, n.getJSON = function(e, t, r) {
var o = {method: "GET",url: e,data: t,dataType: "json",cache: cache || !1};
return r = a.mix(o, r), n.request(r)
}, n.request1 = function(e) {
var r = {method: "POST",data: {},cache: !0,callback: function() {
},onerror: function() {
}};
e = a.mix(r, e);
var o, i = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
i.onreadystatechange = function() {
if (4 === i.readyState) {
clearTimeout(o);
var t = i.status;
if (0 === t ? t = 200 : 1223 === t && (t = 204), 200 > t || t >= 300 && 304 !== t)
return e.onerror(i), void 0;
var r = i.responseText;
if ("json" === e.dataType && r)
try {
r = a.parseJSON(r)
} catch (n) {
return e.onerror(i, n), void 0
}
e.callback(r)
}
};
var s = e.method.toUpperCase(), c = {};
"GET" === s && a.mix(c, e.data), e.cache === !1 && (c._ = +new Date);
var u = t(e.url, c);
if (i.open(s, u, !0), e.header) {
var f;
for (f in e.header)
e.header.hasOwnProperty(f) && i.setRequestHeader(f, e.header[f])
}
if ("GET" === s)
i.send();
else if (e.contentLength && i.setRequestHeader("Content-Length", e.contentLength), "multipart/form-data" === e.contentType)
i.send(e.data);
else if ("application/json" === e.contentType)
i.setRequestHeader("Content-type", e.contentType), i.send(e.data);
else if ("application/octet-stream" === e.contentType)
i.setRequestHeader("Content-type", e.contentType), i.send(e.data);
else {
var l = e.contentType || "application/x-www-form-urlencoded";
i.setRequestHeader("Content-type", l);
var p = n.hooks.serializeData(e.data);
i.send(p)
}
return e.timeout > 0 && (o = setTimeout(function() {
i.status = 408, e.onerror(i)
}, e.timeout)), i
}, n.post = function(e, t, r, o) {
var i = {method: "POST",url: e,data: t,dataType: r || "json"};
return o = a.mix(i, o), n.request1(o)
}, n.put = function(e, t, r, o) {
var i = {method: "PUT",url: e,data: t,dataType: r || "json"};
return o = a.mix(i, o), n.request1(o)
}, e.ajax = n
}(baidu.frontia), baidu.frontia.jsonp = {}, function(e) {
e.jsonp = function() {
function e(e, t) {
var r = document.createElement("script"), n = !1;
r.src = e, r.async = !0;
var o = t || s.error;
"function" == typeof o && (r.onerror = function(t) {
o({url: e,event: t})
}), r.onload = r.onreadystatechange = function() {
n || this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState || (n = !0, r.onload = r.onreadystatechange = null, r && r.parentNode && r.parentNode.removeChild(r))
}, a || (a = document.getElementsByTagName("head")[0]), a.appendChild(r)
}
function t(e) {
return encodeURIComponent(e)
}
function r(r, n, a, c, u) {
var f, l = -1 === (r || "").indexOf("?") ? "?" : "&";
u = u || s.callbackName || "callback";
var p = "baidu_frontia_" + u + "_json" + ++o;
n = n || {};
for (f in n)
n.hasOwnProperty(f) && (l += t(f) + "=" + t(n[f]) + "&");
return i[p] = function(e) {
a(e);
try {
delete i[p]
} catch (t) {
}
i[p] = null
}, e(r + l + u + "=" + p, c), p
}
function n(e) {
s = e
}
var a, o = 0, i = this, s = {};
return {get: r,init: n}
}()
}(baidu.frontia), baidu.frontia.Account = baidu.frontia.Account || {}, baidu.frontia.User = baidu.frontia.User || {}, baidu.frontia.Role = baidu.frontia.Role || {}, baidu.frontia.ACL = baidu.frontia.ACL || {}, function(e) {
function t(t) {
var r = e.util.toBase64("Application:" + t);
return "Basic " + r
}
function r(t) {
var r = {application_info: [{app_frontia_version: e.version,app_appid: e.getApiKey(),user_id: e.getCurrentAccount().getId() || "",frontia_action: [{action_name: "",timestamp: null,restimestamp: null,err_code: "",err_msg: ""}]}]};
r.application_info[0].frontia_action[0] = t;
var n = {}, a = new Zlib.Gzip(new Uint8Array(JSON.stringify(r).split("").map(function(e) {
return e.charCodeAt(0)
}))), o = a.compress();
n.stats = btoa(String.fromCharCode.apply(null, o));
var i = e.ajax;
i.post(c, JSON.stringify(n), "json", {contentType: "application/json"})
}
function n() {
var e = Math.floor((new Date).getTime() / 1e3);
return e
}
var a = e.error, o = e.ERR_MSG, i = e.DomainManager.getFrontiaDomain() + "/role", s = e.DomainManager.getFrontiaDomain() + "/user", c = e.DomainManager.getPBLogDomain() + "/pushlog";
e.Account = e.Object.extend({accountId: null,accountType: null,accountName: null,constructor: function(e, t, r) {
if (!e || "string" != typeof e && "number" != typeof e)
throw new a(o.INVALID_PARAMS, "[construct Role/User]: accountId is invalid, the typeof accountId is string or number");
this.accountType = t, this.accountId = e, this.accountName = r
},getId: function() {
return this.accountId
},getType: function() {
return this.accountType
},getName: function() {
return this.accountName
}}), e.User = e.Account.extend({accessToken: null,expirationIn: null,mediaType: null,constructor: function(t) {
t = t || {}, this.accessToken = t.accessToken, this.expiresIn = t.expiresIn, this.mediaType = t.mediaType, e.Account.prototype.constructor.call(this, t.socialId, "user", t.name)
},getAccessToken: function() {
return this.accessToken
},getExpiresIn: function() {
return this.expiresIn
},getMediaType: function() {
return this.mediaType
},getDetailInfo: function(t) {
t = t || {}, t.error || (t.error = function() {
}), t.success || (t.success = function() {
}), e.User.find({userId: this.accountId}, {error: function(e) {
t.error(e)
},success: function(e) {
0 === e.count ? t.error(new a({Code: "1701",Message: "user not exists"})) : t.success(e.result[0])
}})
},toJSON: function() {
return {socialId: this.getId(),name: this.getName(),type: this.getType(),mediaType: this.getMediaType(),expiresIn: this.getExpiresIn(),accessToken: this.getAccessToken()}
}});
var u = {options: {error: function() {
},success: function() {
}},_configure: function(e) {
e = e || {}, e.error && (this.options.error = e.error), e.success && (this.options.success = e.success)
},_checkParams: function(t, r) {
var n = this;
return t.every(function(t) {
return "string" !== t.type || t.value && "string" == typeof t.value ? "role" !== t.type || t.value && t.value instanceof e.Role ? "array" !== t.type || t.value && "Array" === Object.prototype.toString.call(t.value).slice(8, -1) ? !0 : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: targets is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: role is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: target is invalid")), !1)
})
},find: function(o, i) {
var c = {};
c.action_name = "User.list", c.timestamp = n();
var u = this;
if (1 === arguments.length)
var i = o;
i || (i = {}), u._configure(i);
var f = {};
o.mediaType && (f.media_type = o.mediaType), o.sex && (f.sex = o.sex), o.userId && (f.user_id = o.userId), o.userName && (f.username = o.userName);
var l = u._attachAccount({method: "list",criteria: f}), p = u._createAjaxOpt(c, {header: {authorization: t(e.getApiKey())},contentType: "application/json"});
p.callback = function(t) {
if (t.error_code) {
var o = new a(t);
u.options.error(o), c.err_code = o.code, c.err_msg = o.message
} else {
var i = [];
t.response_params.users.forEach(function(t) {
var r = new e.User({socialId: t.user_id,mediaType: t.media_type,name: t.username});
r.extra = t;
i.push(r);
}), u.options.success({result: i,count: t.response_params.count}), c.err_code = 0
}
c.restimestamp = n(), r(c)
};
var h = e.ajax;
h.post(s, JSON.stringify(l), "json", p)
},_attachAccount: function(t) {
var r = null;
return e.currentAccount && e.currentAccount instanceof e.Role && e.currentAccount.getId() ? (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getId()) : e.currentAccount && e.currentAccount instanceof e.User && e.currentAccount.getAccessToken() && (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getAccessToken()), t
},_createAjaxOpt: function(t, o) {
var i = this, s = {callback: function(e) {
if (e.error_code) {
var o = new a(e);
i.options.error(o), t.err_code = o.code, t.err_msg = o.message
} else
i.options.success(e), t.err_code = 0;
t.restimestamp = n(), r(t)
},onerror: function(o, s) {
try {
var c = e.util.parseJSON(o.responseText)
} catch (u) {
return i.options.error(u, o), void 0
}
var s = new a(c);
i.options.error(new a(c), o), t.err_code = s.code, t.err_msg = s.message, t.restimestamp = n(), r(t)
}};
return e.util.mix(s, o)
}};
e.util.mix(e.User, u), e.Role = e.Account.extend({roleList: {},constructor: function(t, r) {
var n = this;
n.roleList = {}, Array.isArray(r) && r.forEach(function(t) {
if (!(t instanceof e.User || t instanceof e.Role))
throw new a(o.INVALID_PARAMS, "[construct Role]: account is invalid");
n.roleList[t.getId()] = t
}), e.Account.prototype.constructor.call(this, t, "role", t)
},add: function(t) {
if (!(t instanceof e.User || t instanceof e.Role))
throw new a(o.INVALID_PARAMS, "[add Role]: account is invalid");
this.roleList[t.getId()] = t
},"delete": function(e) {
delete this.roleList[e]
},getInfo: function() {
var e = [];
for (var t in this.roleList)
this.roleList.hasOwnProperty(t) && e.push(this.roleList[t].getType() + ":" + this.roleList[t].getId());
return e
},toJSON: function() {
return {roleId: this.getId(),name: this.getName(),memberList: this.getInfo()}
}});
var f = {options: {error: function() {
},success: function() {
}},_configure: function(e) {
e = e || {}, e.error && (this.options.error = e.error), e.success && (this.options.success = e.success)
},_checkParams: function(t, r) {
var n = this;
return t.every(function(t) {
return "string" !== t.type || t.value && "string" == typeof t.value ? "role" !== t.type || t.value && t.value instanceof e.Role ? "array" !== t.type || t.value && "Array" === Object.prototype.toString.call(t.value).slice(8, -1) ? !0 : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: targets is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: role is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: target is invalid")), !1)
})
},remove: function(r, a) {
var o = {};
o.action_name = "Role.remove", o.timestamp = n();
var s = this;
if (a = a || {}, s._configure(a), s._checkParams([{value: r,type: "string"}], "Role remove")) {
var c = s._attachAccount({method: "remove",role_id: r}), u = s._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), f = e.ajax;
f.post(i, JSON.stringify(c), "json", u)
}
},get: function(r, a) {
var o = {};
o.action_name = "Role.get", o.timestamp = n();
var s = this;
if (a = a || {}, s._configure(a), s._checkParams([{value: r,type: "string"}], "Role get")) {
var c = s._attachAccount({method: "describe",role_id: r}), u = s._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), f = e.ajax;
f.post(i, JSON.stringify(c), "json", u)
}
},save: function(r, a) {
var o = {};
o.action_name = "Role.save", o.timestamp = n();
var s = this;
if (a = a || {}, s._configure(a), s._checkParams([{value: r,type: "role"}], "Role save")) {
var c = r.getInfo(), u = s._attachAccount({method: "create",role_id: r.getId(),child: c}), f = r.getACL();
f && (u._acl = f.toJSON());
var l = s._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), p = e.ajax;
p.post(i, JSON.stringify(u), "json", l)
}
},update: function(r, s) {
var c = {};
c.action_name = "Role.update", c.timestamp = n();
var u = this, f = null;
if (s = s || {}, u._configure(s), u._checkParams([{value: r,type: "string"}], "Role update")) {
var l = u._attachAccount({method: "modify",role_id: r});
if (s.acl && s.acl instanceof e.ACL && (l._acl = s.acl.toJSON()), f = "add" === s.update_type ? "push_child" : "del" === s.update_type ? "pull_child" : "set" === s.update_type ? "set_child" : null) {
var p = [];
s.accounts.forEach(function(t) {
if (!(t instanceof e.User || t instanceof e.Role))
throw new a(o.INVALID_PARAMS, "[update Role]: account is invalid");
p.push(t.getType() + ":" + t.getId())
}), l[f] = p
}
var h = u._createAjaxOpt(c, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), d = e.ajax;
d.post(i, JSON.stringify(l), "json", h)
}
},list: function(o) {
var s = {};
s.action_name = "Role.list", s.timestamp = n();
var c = this;
o = o || {}, c._configure(o);
var u = c._attachAccount({method: "list"}), f = c._createAjaxOpt(s, {header: {authorization: t(e.getApiKey())},contentType: "application/json"});
f.callback = function(t) {
if (t.error_code) {
var o = new a(t);
c.options.error(o), s.err_code = o.code, s.err_msg = o.message
} else {
var i = [];
t.response_params.roles.forEach(function(t) {
var r = new e.ACL;
t._acl && (r._setPermission(t._acl), delete t._acl);
var n = new e.Role(t.role_id);
t.child.forEach(function(t) {
var r = t.split(":");
"user" === r[0] ? n.add(new e.User({socialId: r[1]})) : n.add(new e.Role(r[1]))
}), i.push(n)
}), c.options.success({result: i,count: t.response_params.count}), s.err_code = 0
}
s.restimestamp = n(), r(s)
};
var l = e.ajax;
l.post(i, JSON.stringify(u), "json", f)
},_attachAccount: function(t) {
var r = null;
return e.currentAccount && e.currentAccount instanceof e.Role && e.currentAccount.getId() ? (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getId()) : e.currentAccount && e.currentAccount instanceof e.User && e.currentAccount.getAccessToken() && (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getAccessToken()), t
},_createAjaxOpt: function(t, o) {
var i = this, s = {callback: function(e) {
if (e.error_code) {
var o = new a(e);
i.options.error(o), t.err_code = o.code, t.err_msg = o.message
} else
i.options.success(e), t.err_code = 0;
t.restimestamp = n(), r(t)
},onerror: function(o, s) {
try {
var c = e.util.parseJSON(o.responseText)
} catch (u) {
return i.options.error(u, o), void 0
}
var s = new a(c);
i.options.error(s, o), t.err_code = s.code, t.err_msg = s.message, t.restimestamp = n(), r(t)
}};
return e.util.mix(s, o)
}};
e.util.mix(e.Role, f), e.ACL = e.Base.extend({permissions: null,constructor: function() {
this.permissions = {}
},_setAccess: function(t, r, n) {
if (!(r instanceof e.User || r instanceof e.Role))
throw new a(o.INVALID_PARAMS, "[setAccess]: account is invalid");
if (!e.util.isBoolean(n))
throw new a(o.INVALID_PARAMS, "[setAccess]: allowed is invalid");
var i = [r.getType(), ":", r.getId()].join("");
this.permissions[i] = this.permissions[i] || {}, this.permissions[i][t] = n
},_isAccess: function(t, r) {
if (!(r instanceof e.User || r instanceof e.Role))
throw new a(o.INVALID_PARAMS, "[isAccess]: account is invalid");
if (this.permissions["role:*"] && this.permissions["role:*"][t])
return !0;
var n = [r.getType(), ":", r.getId()].join(""), i = this.permissions[n];
return i ? i[t] : !1
},_setPermission: function(e) {
this.permissions = {};
for (var t in e)
if (e.hasOwnProperty(t))
switch (e[t]) {
case 1:
this.permissions[t] = this.permissions[t] || {}, this.permissions[t].write = !0;
break;
case 2:
this.permissions[t] = this.permissions[t] || {}, this.permissions[t].read = !0;
break;
case 3:
this.permissions[t] = this.permissions[t] || {}, this.permissions[t].write = !0, this.permissions[t].read = !0
}
},setReadAccess: function(e, t) {
this._setAccess("read", e, t)
},setPublicReadAccess: function(t) {
var r = new e.Role("*");
this._setAccess("read", r, t)
},setWriteAccess: function(e, t) {
this._setAccess("write", e, t)
},setPublicWriteAccess: function(t) {
var r = new e.Role("*");
this._setAccess("write", r, t)
},isReadAccess: function(e) {
this._isAccess("read", e)
},isWriteAccess: function(e) {
this._isAccess("write", e)
},toJSON: function() {
var e = {};
for (var t in this.permissions)
if (this.permissions.hasOwnProperty(t)) {
var r = this.permissions[t];
e[t] = (r.read ? 2 : 0) + (r.write ? 1 : 0)
}
return e
}})
}(baidu.frontia), baidu.frontia.social = baidu.frontia.social || {}, function(e) {
function t(e) {
return encodeURIComponent(e + "")
}
function r(e, r, n, a, o, i, s, c) {
var u = f + "?" + "response_type=" + r + "&" + "client_id=" + e + "&" + "media_type=" + n + "&" + "redirect_uri=" + t(a);
return o && (u += "&state=" + o), i && (u += "&display=" + i), s && (u += "&client_type=" + s), c && (u += "&scope=" + c), u + "&secure=1"
}
function n(t) {
var n = e.getApiKey(), a = r(n, t.response_type, t.media_type, t.redirect_uri, t.state, t.display, t.client_type, t.scope);
return a
}
function a() {
function e() {
var e = {};
if (t) {
var r = t.indexOf("#");
if (-1 !== r) {
var n = t.slice(r + 1);
if (n) {
var a = n.split("&");
a.forEach(function(t) {
var r = t.split("=");
e[r[0]] = r[1]
})
}
}
}
return e
}
var t = location.hash, r = e();
return {access_token: r.access_token,expires_in: r.expires_in,media_type: r.media_type}
}
function o(t) {
var r = null;
return e.currentAccount && e.currentAccount instanceof e.Role && e.currentAccount.getId() ? (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getId()) : e.currentAccount && e.currentAccount instanceof e.User && e.currentAccount.getAccessToken() && (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getAccessToken()), t
}
function i(t) {
var r = e.util.toBase64("Application:" + t);
return "Basic " + r
}
function s(t) {
var r = {application_info: [{app_frontia_version: e.version,app_appid: e.getApiKey(),user_id: e.getCurrentAccount().getId() || "",frontia_action: [{action_name: "",timestamp: null,restimestamp: null,err_code: "",err_msg: ""}]}]};
r.application_info[0].frontia_action[0] = t;
var n = {}, a = new Zlib.Gzip(new Uint8Array(JSON.stringify(r).split("").map(function(e) {
return e.charCodeAt(0)
}))), o = a.compress();
n.stats = btoa(String.fromCharCode.apply(null, o));
var i = e.ajax;
i.post(p, JSON.stringify(n), "json", {contentType: "application/json"})
}
function c() {
var e = Math.floor((new Date).getTime() / 1e3);
return e
}
var u = e.error, f = e.DomainManager.getSocialDomain() + "/social/oauth/2.0/authorize", l = e.DomainManager.getSocialDomain() + "/social/api/2.0/user/info", p = e.DomainManager.getPBLogDomain() + "/pushlog", h = e.DomainManager.getFrontiaDomain() + "/user", d = {TOKEN: "token",CODE: "code"}, g = {setLoginCallback: function(t) {
var r = a();
if (!e.getCurrentAccount() && r.access_token && t) {
var n = {};
n.action_name = "social.login", n.timestamp = c(), t.success || (t.success = function() {
}), t.error || (t.error = function() {
}), e.jsonp.get(l, {access_token: r.access_token}, function(a) {
if (a.error_code) {
var f = new u(a);
t.error(f), n.err_code = f.code, n.err_msg = f.message
} else {
var l = new e.User({socialId: a.social_uid,name: a.username,accessToken: r.access_token,expiresIn: r.expires_in,mediaType: r.media_type});
e.setCurrentAccount(l);
var p = o({method: "register"}), d = {header: {authorization: i(e.getApiKey())},contentType: "application/json"}, g = e.ajax;
g.post(h, JSON.stringify(p), "json", d), t.success(l), n.err_code = 0
}
n.restimestamp = c(), s(n)
}, function() {
})
}
},login: function(t) {
if (e.logOutCurrentAccount(), !t)
throw new baidu.frontia.error(baidu.frontia.ERR_MSG.INVALID_PARAMS);
if (t.error = t.error || function() {
}, !t.response_type)
throw new baidu.frontia.error(baidu.frontia.ERR_MSG.INVALID_PARAMS);
if (!t.media_type)
throw new baidu.frontia.error(baidu.frontia.ERR_MSG.INVALID_PARAMS);
if (t.response_type != d.TOKEN)
throw new baidu.frontia.error(baidu.frontia.ERR_MSG.INVALID_PARAMS);
var r = n(t);
location.href = r
}};
e.social = g
}(baidu.frontia), baidu.frontia.storage = baidu.frontia.storage || {}, function(e) {
function t(t) {
var r = e.util.toBase64("Application:" + t);
return "Basic " + r
}
function r(t) {
var r = {application_info: [{app_frontia_version: e.version,app_appid: e.getApiKey(),user_id: e.getCurrentAccount().getId() || "",frontia_action: [{action_name: "",timestamp: null,restimestamp: null,err_code: "",err_msg: ""}]}]};
r.application_info[0].frontia_action[0] = t;
var n = {}, a = new Zlib.Gzip(new Uint8Array(JSON.stringify(r).split("").map(function(e) {
return e.charCodeAt(0)
}))), o = a.compress();
n.stats = btoa(String.fromCharCode.apply(null, o));
var i = e.ajax;
i.post(c, JSON.stringify(n), "json", {contentType: "application/json"})
}
function n() {
var e = Math.floor((new Date).getTime() / 1e3);
return e
}
var a = e.error, o = e.ERR_MSG, i = e.DomainManager.getFrontiaDomain() + "/bss/document", s = e.DomainManager.getFrontiaDomain() + "/bcs/object", c = e.DomainManager.getPBLogDomain() + "/pushlog";
e.File = e.Object.extend({constructor: function(t, r, n) {
if (t && !(t instanceof File))
throw new a(o.INVALID_PARAMS, "[baidu.frontia.File.constructor]: file is invalid");
this.file = t, this.target = r, this.detail = null, e.Object.prototype.constructor.call(this, n)
},getFileInfo: function() {
return this.detail
},_getFile: function() {
return this.file
},_getTarget: function() {
return this.target
},_setFileInfo: function(e) {
this.detail = e
}}), e.Data = e.Object.extend({constructor: function(t, r) {
this.obj = t || {}, e.Object.prototype.constructor.call(this, r)
},getData: function() {
return this.obj
}});
var u = {options: {error: function() {
},success: function() {
}},_configure: function(e) {
e = e || {}, e.error && (this.options.error = e.error), e.success && (this.options.success = e.success)
},_checkParams: function(t, r) {
var n = this;
return t.every(function(t) {
return "file" !== t.type || t.value && t.value instanceof e.File ? "string" !== t.type || t.value && "string" == typeof t.value ? "array" !== t.type || t.value && "Array" === Object.prototype.toString.call(t.value).slice(8, -1) ? "query" !== t.type || t.value && t.value instanceof u.Query ? "data" !== t.type || t.value && t.value instanceof e.Data ? !0 : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: data is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: query is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: targets is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: target is invalid")), !1) : (n.options.error(new a(o.INVALID_PARAMS, "[" + r + "]: file is null or not typeof File of baidu.frontia")), !1)
})
},uploadFile: function(o, i) {
var c = {};
c.action_name = "storage.uploadFile", c.timestamp = n();
var u = this;
if (i = i || {}, u._configure(i), u._checkParams([{value: o,type: "file"}], "storage.uploadFile")) {
var f = {file: o._getFile(),acl: o._getACLInfo(),target: o._getTarget()}, l = u._attachAccount({method: "getuploadurl"}), p = e.ajax;
p.post(s, JSON.stringify(l), "json", {header: {authorization: t(e.getApiKey())},contentType: "application/json",callback: function(o) {
if (o.error_code)
u.options.error(new a(o));
else {
var i = o.response_params.url + "&dumpheader=1", l = new FileReader;
l.onload = function() {
var o = l.result;
p.put(i, o, "json", {contentType: "application/octet-stream",callback: function(r) {
if (0 !== r.Error.Code)
u.options.error(new a(r.Error));
else {
var n = u._createAjaxOpt(c, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), o = u._attachAccount({method: "create",md5s: [r.Header["Content-MD5"]],object: f.target,_acl: f.acl});
p.post(s, JSON.stringify(o), "json", n)
}
},onerror: function(e, t) {
try {
var o = JSON.parse(e.responseText)
} catch (i) {
return u.options.error(i, e), void 0
}
var t = new a(o.Error);
u.options.error(t, e), c.err_code = t.code, c.err_msg = t.message, c.restimestamp = n(), r(c)
}})
}, l.readAsArrayBuffer(f.file)
}
},onerror: function(e, t) {
try {
var o = JSON.parse(e.responseText)
} catch (i) {
return u.options.error(i, e), void 0
}
var t = new a(o);
u.options.error(t, e), c.err_code = t.code, c.err_msg = t.message, c.restimestamp = n(), r(c)
}})
}
},getFileUrl: function(r, a) {
var o = {};
o.action_name = "storage.getFileUrl", o.timestamp = n();
var i = this;
if (a = a || {}, i._configure(a), i._checkParams([{value: r,type: "string"}], "storage.getFileUrl")) {
var c = i._attachAccount({method: "getdownloadurl",object: r}), u = i._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), f = e.ajax;
f.post(s, JSON.stringify(c), "json", u)
}
},deleteFile: function(r, a) {
var o = {};
o.action_name = "storage.deleteFile", o.timestamp = n();
var i = this;
if (a = a || {}, i._configure(a), i._checkParams([{value: r,type: "string"}], "storage.deleteFile")) {
var c = i._attachAccount({method: "delete",object: r}), u = i._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), f = e.ajax;
f.post(s, JSON.stringify(c), "json", u)
}
},listFile: function(o, i) {
var c = {};
c.action_name = "storage.listFile", c.timestamp = n();
var u = this;
if (i = i || {}, u._configure(i), u._checkParams([{value: o,type: "string"}], "storage.listFile")) {
var f = u._attachAccount({method: "list",object: o}), l = u._createAjaxOpt(c, {header: {authorization: t(e.getApiKey())},contentType: "application/json"});
l.callback = function(t) {
if (t.error_code) {
var o = new a(t);
u.options.error(o), c.err_code = o.code, c.err_msg = o.message
} else {
var i = [];
t.response_params.object_list.forEach(function(t) {
var r = new e.ACL;
t._acl && (r._setPermission(t._acl), delete t._acl);
var n = new e.File(null, null, r);
n._setFileInfo(t), i.push(n)
}), u.options.success({result: i,count: t.response_params.object_total}), c.err_code = 0
}
c.restimestamp = n(), r(c)
};
var p = e.ajax;
p.post(s, JSON.stringify(f), "json", l)
}
},insertData: function(r, a) {
var o = {};
if (o.action_name = "storage.insertData", o.timestamp = n(), a = a || {}, this._configure(a), this._checkParams([{value: r,type: "data"}], "storage.insertData")) {
var s = r.getData(), c = r._getACLInfo();
c && (s._acl = c);
var u = this._attachAccount({method: "insert",documents: s}), f = this._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), l = e.ajax;
l.post(i, JSON.stringify(u), "json", f)
}
},deleteData: function(r, a) {
var o = {};
if (o.action_name = "storage.deleteData", o.timestamp = n(), a = a || {}, this._configure(a), this._checkParams([{value: r,type: "query"}], "storage.deleteData")) {
var s = this._attachAccount({method: "remove",criteria: r.query}), c = this._createAjaxOpt(o, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), u = e.ajax;
u.post(i, JSON.stringify(s), "json", c)
}
},updateData: function(r, a, o) {
var s = {};
if (s.action_name = "storage.updateData", s.timestamp = n(), o = o || {}, this._configure(o), this._checkParams([{value: r,type: "query"}, {value: a,type: "data"}], "storage.updateData")) {
var c = a.getData(), u = a._getACLInfo();
if (u)
if (c.hasOwnProperty("$set"))
c.$set._acl = u;
else {
var f = 0;
for (var l in c)
if (c.hasOwnProperty(l) && "$" === l[0]) {
f = 1, c.$set = {}, c.$set._acl = u;
break
}
0 === f && (c._acl = u)
}
var p = this._attachAccount({method: "update",criteria: r.query,document: c}), h = this._createAjaxOpt(s, {header: {authorization: t(e.getApiKey())},contentType: "application/json"}), d = e.ajax;
d.post(i, JSON.stringify(p), "json", h)
}
},findData: function(o, s) {
var c = {};
c.action_name = "storage.findData", c.timestamp = n();
var u = this;
if (s = s || {}, this._configure(s), this._checkParams([{value: o,type: "query"}], "storage.findData")) {
var f = this._attachAccount({method: "query",criteria: o.query}), l = this._createAjaxOpt(c, {header: {authorization: t(e.getApiKey())},contentType: "application/json"});
l.callback = function(t) {
if (t.error_code) {
var o = new a(t);
u.options.error(o), c.err_code = o.code, c.err_msg = o.message
} else {
var i = [];
t.response_params.documents.forEach(function(t) {
var r = new e.ACL;
t._acl && (r._setPermission(t._acl), delete t._acl);
var n = new e.Data(t, r);
i.push(n)
}), u.options.success({result: i,count: t.response_params.count}), c.err_code = 0
}
c.restimestamp = n(), r(c)
};
var p = e.ajax;
p.post(i, JSON.stringify(f), "json", l)
}
},_attachAccount: function(t) {
var r = null;
return e.currentAccount && e.currentAccount instanceof e.Role && e.currentAccount.getId() ? (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getId()) : e.currentAccount && e.currentAccount instanceof e.User && e.currentAccount.getAccessToken() && (r = "requester", t[r] = e.currentAccount.getType() + ":" + e.currentAccount.getAccessToken()), t
},_createAjaxOpt: function(t, o) {
var i = this, s = {callback: function(e) {
if (e.error_code) {
var o = new a(e);
i.options.error(o), t.err_code = o.code, t.err_msg = o.message
} else
i.options.success(e), t.err_code = 0;
t.restimestamp = n(), r(t)
},onerror: function(o, s) {
try {
var c = e.util.parseJSON(o.responseText)
} catch (u) {
return i.options.error(u, o), void 0
}
var s = new a(c);
i.options.error(s, o), t.err_code = s.code, t.err_msg = s.message, t.restimestamp = n(), r(t)
}};
return e.util.mix(s, o)
}};
u.Query = e.Base.extend({currentKey: null,query: null,constructor: function() {
},_set: function(e, t) {
this.query = this.query || {}, this.query[e] instanceof Object || (this.query[e] = {});
for (var r in t)
t.hasOwnProperty(r) && (this.query[e][r] = t[r])
},_build: function(e, t) {
if (null === this.currentKey)
throw new a("Query key must not be null");
switch (e) {
case u.Query.EQUAL:
this.query = this.query || {}, this.query[this.currentKey] = t;
break;
case u.Query.LESSTHAN:
this._set(this.currentKey, {$lt: t});
break;
case u.Query.LESSTHANEQUAL:
this._set(this.currentKey, {$lte: t});
break;
case u.Query.GREATERTHAN:
this._set(this.currentKey, {$gt: t});
break;
case u.Query.GREATERTHANEQUAL:
this._set(this.currentKey, {$gte: t});
break;
default:
throw new a("Query " + e + " is not supported")
}
},equal: function(e) {
return this._build(u.Query.EQUAL, e), this
},lessThan: function(e) {
return this._build(u.Query.LESSTHAN, e), this
},lessThanEqual: function(e) {
return this._build(u.Query.LESSTHANEQUAL, e), this
},greaterThan: function(e) {
return this._build(u.Query.GREATERTHAN, e), this
},greaterThanEqual: function(e) {
return this._build(u.Query.GREATERTHANEQUAL, e), this
},on: function(e) {
return this.currentKey = e, this
}}, {EQUAL: 1,LESSTHAN: 2,LESSTHANEQUAL: 3,GREATERTHAN: 4,GREATERTHANEQUAL: 5}), e.storage = u
}(baidu.frontia), baidu.frontia.personalStorage = baidu.frontia.personalStorage || {}, function(e) {
function t(e, t, r) {
var n, a = {}, o = null, i = null;
t = t || {}, "string" == typeof e ? (o = "/" === e.slice(0, 1) ? e : "/".concat(e), a.path = o) : e && (i = {list: []}, e.forEach(function(e) {
o = "/" === e.slice(0, 1) ? e : "/".concat(e), i.list.push({path: o})
}), i = JSON.stringify(i));
for (n in t)
t.hasOwnProperty(n) && -1 === r.indexOf(n) && (a[n] = t[n]);
return {query: a,body: i}
}
function r(t, r) {
var n = [s, t, e.util.serializeURL(r)].join("");
return n
}
function n(t) {
var r = {application_info: [{app_frontia_version: e.version,app_appid: e.getApiKey(),user_id: e.getCurrentAccount().getId() || "",frontia_action: [{action_name: "",timestamp: null,restimestamp: null,err_code: "",err_msg: ""}]}]};
r.application_info[0].frontia_action[0] = t;
var n = {}, a = new Zlib.Gzip(new Uint8Array(JSON.stringify(r).split("").map(function(e) {
return e.charCodeAt(0)
}))), o = a.compress();
n.stats = btoa(String.fromCharCode.apply(null, o));
var i = e.ajax;
i.post(c, JSON.stringify(n), "json", {contentType: "application/json"})
}
function a() {
var e = Math.floor((new Date).getTime() / 1e3);
return e
}
var o = baidu.frontia.error, i = baidu.frontia.ERR_MSG, s = e.DomainManager.getPCSDomain() + "/rest/2.0/pcs/", c = e.DomainManager.getPBLogDomain() + "/pushlog";
e.apiKey;
var u = {};
u = {options: {error: function() {
},success: function() {
}},_configure: function(e) {
e = e || {}, e.error && (this.options.error = e.error), e.success && (this.options.success = e.success)
},_checkParams: function(e, t) {
var r = this;
return e.every(function(e) {
return "file" !== e.type || e.value && e.value instanceof File ? "string" !== e.type || e.value && "string" == typeof e.value ? "array" !== e.type || e.value && "Array" === Object.prototype.toString.call(e.value).slice(8, -1) ? !0 : (r.options.error(new o(i.INVALID_PARAMS, "[" + t + "]: targets is invalid")), !1) : (r.options.error(new o(i.INVALID_PARAMS, "[" + t + "]: target is invalid")), !1) : (r.options.error(new o(i.INVALID_PARAMS, "[" + t + "]: file is null or not typeof File of DOM")), !1)
})
},_createAjaxOpt: function(t, r, cb) {
var i = this, s = {callback: function(e) {
if (e.error_code) {
var r = new o(e);
i.options.error(r), t.err_code = r.code, t.err_msg = r.message
} else
(cb && cb.success || i.options.success)(e), t.err_code = 0;
t.restimestamp = a(), n(t)
},onerror: function(r, s) {
try {
var c = e.util.parseJSON(r.responseText)
} catch (u) {
return i.options.error(u, r), void 0
}
var s = new o(c);
i.options.error(s, r), t.err_code = s.code, t.err_msg = s.message, t.restimestamp = a(), n(t)
}};
return e.util.mix(s, r)
},uploadFile: function(n, o, i) {
var s = {};
s.action_name = "personalStorage.uploadFile", s.timestamp = a();
var c = this;
if (i = i || {}, c._configure(i), c._checkParams([{value: n,type: "file"}, {value: o,type: "string"}], "personalStorage.uploadFile")) {
i.method = "upload";
var u = e.getCurrentAccount();
u && (accessToken = u.getAccessToken()), i.access_token = accessToken;
var f = t(o, i, ["success", "error"]), l = r("file?", f.query), p = c._createAjaxOpt(s, {contentType: "multipart/form-data"}), h = e.ajax, d = new FormData;
d.append("baidu_frontia_file", n), h.post(l, d, "json", p)
}
},uploadTextFile: function(text, target, options) {
var s = {};
s.action_name = "personalStorage.uploadFile", s.timestamp = a();
var c = this;
if (options = options || {}, c._configure(options), c._checkParams([{value: text,type: "string"}, {value: target,type: "string"}], "personalStorage.uploadFile")) {
options.method = "upload";
var u = e.getCurrentAccount();
u && (accessToken = u.getAccessToken()), options.access_token = accessToken;
var f = t(target, options, ["success", "error"]), l = r("file?", f.query), p = c._createAjaxOpt(s, {contentType: "multipart/form-data"}), h = e.ajax, d = new FormData;
var blob = new Blob([text], {type: 'text/plain'});
d.append("baidu_frontia_file", blob), h.post(l, d, "json", p);
}
},getFileUrl: function(i, s) {
var c = {};
c.action_name = "personalStorage.getFileUrl", c.timestamp = a();
var u = this;
if (s = s || {}, u._configure(s), u._checkParams([{value: i,type: "string"}], "personalStorage.getFileUrl")) {
var f = e.getCurrentAccount();
f && (accessToken = f.getAccessToken()), s.access_token = accessToken, s.method = "download";
var l = t(i, s, ["success", "error"]), p = r("file?", l.query);
s.method = "meta", l = t(i, s, ["success", "error"]);
var h = r("file?", l.query), d = {callback: function(e) {
if (e.error_code) {
var t = new o(e);
u.options.error(t), c.err_code = t.code, c.err_msg = t.message
} else
(s.success || u.options.success)(p), c.err_code = 0;
c.restimestamp = a(), n(c)
},onerror: function(t, r) {
try {
var i = e.util.parseJSON(t.responseText)
} catch (ss) {
return (s.error || u.options.error)(ss, t), void 0
}
var r = new o(i);
u.options.error(r, t), c.err_code = r.code, c.err_msg = r.message, c.restimestamp = a(), n(c)
},dataType: "json"}, g = e.ajax;
g.get(h, {}, d)
}
},deleteFile: function(n, o) {
var i = {};
i.action_name = "personalStorage.deleteFile", i.timestamp = a();
var s = this;
if (o = o || {}, s._configure(o), s._checkParams([{value: n,type: "array"}], "personalStorage.deleteFile")) {
o.method = "delete";
var c = e.getCurrentAccount();
c && (accessToken = c.getAccessToken()), o.access_token = accessToken;
var u = t(n, o, ["success", "error"]), f = r("file?", u.query), l = s._createAjaxOpt(i), p = e.ajax;
p.post(f, {param: u.body}, "json", l)
}
},listFile: function(n, o) {
var i = {};
i.action_name = "personalStorage.listFile", i.timestamp = a();
var s = this;
if (o = o || {}, s._configure(o), s._checkParams([{value: n,type: "string"}], "personalStorage.listFile")) {
o.method = "list";
var c = e.getCurrentAccount();
c && (accessToken = c.getAccessToken()), o.access_token = accessToken;
var u = t(n, o, ["success", "error"]), f = r("file?", u.query), l = s._createAjaxOpt(i, {dataType: "json"}, o), p = e.ajax;
p.get(f, {}, l)
}
},listStreamFile: function(n) {
var o = {};
o.action_name = "personalStorage.listStreamFile", o.timestamp = a();
var i = this;
n = n || {}, i._configure(n), n.method = "list";
var s = e.getCurrentAccount();
s && (accessToken = s.getAccessToken()), n.access_token = accessToken;
var c = t(null, n, ["success", "error"]);
n.filter_path && (c.query.filter_path = n.filter_path);
var u = r("stream?", c.query), f = i._createAjaxOpt(o, {dataType: "json"}), l = e.ajax;
l.get(u, {}, f)
},makeDir: function(n, o) {
var i = {};
i.action_name = "personalStorage.makeDir", i.timestamp = a();
var s = this;
if (o = o || {}, s._configure(o), s._checkParams([{value: n,type: "string"}], "personalStorage.makeDir")) {
o.method = "mkdir";
var c = e.getCurrentAccount();
c && (accessToken = c.getAccessToken()), o.access_token = accessToken;
var u = t(n, o, ["success", "error"]), f = r("file?", u.query), l = s._createAjaxOpt({dataType: "json"}), p = e.ajax;
p.post(f, {}, "json", l)
}
},getQuota: function(n) {
var o = {};
o.action_name = "personalStorage.getQuota", o.timestamp = a();
var i = this;
if (n = n || {}, i._configure(n), i._checkParams([], "psersonalStorage.getQuota")) {
n.method = "info";
var s = e.getCurrentAccount();
s && (accessToken = s.getAccessToken()), n.access_token = accessToken;
var c = t(null, n, ["success", "error"]), u = r("quota?", c.query), f = i._createAjaxOpt(o, {dataType: "json"}), l = e.ajax;
l.get(u, {}, f)
}
}}, u.constant = {ONDUP_OVERWRITE: "overwrite",ONDUP_NEWCOPY: "newcopy",BY_NAME: "name",BY_TIME: "time",BY_SIZE: "size",ORDER_ASC: "asc",ORDER_DESC: "desc",TYPE_STREAM_VIDEO: "video",TYPE_STREAM_AUDIO: "audio",TYPE_STREAM_IMAGE: "image",TYPE_STREAM_DOC: "doc"}, e.personalStorage = u
}(baidu.frontia), baidu.frontia.store = baidu.frontia.store || {}, function(e) {
function t(t) {
var r = e.util.toBase64("Application:" + t);
return "Basic " + r
}
function r() {
var e = Math.floor((new Date).getTime() / 1e3);
return e
}
var n = e.error;
e.ERR_MSG;
var a = e.DomainManager.getFrontiaDomain() + "/push";
e.DomainManager.getPBLogDomain() + "/pushlog";
var o = {options: {error: function() {
},success: function() {
}},_configure: function(e) {
e = e || {}, e.error && (this.options.error = e.error), e.success && (this.options.success = e.success)
},send: function(n, o) {
var i = {};
i.action_name = "Push.list", i.timestamp = r();
var s = this;
o = o || {}, s._configure(o);
var c = a, u = {method: "pushmsg",messages: n.messages,msg_keys: n.msg_keys};
for (var f in o)
o.hasOwnProperty(f) && "success" !== f && "error" !== f && (u[f] = o[f]);
var l = s._createAjaxOpt({header: {authorization: t(e.getApiKey())},contentType: "application/json"}), p = e.ajax;
p.post(c, JSON.stringify(u), "json", l)
},_createAjaxOpt: function(t) {
var r = this, a = {callback: function(e) {
e.error_code ? r.options.error(new n(e)) : e && e.error_code ? r.options.error(new n(e)) : r.options.success(e)
},onerror: function(t) {
try {
var a = e.util.parseJSON(t.responseText)
} catch (o) {
return r.options.error(o, t), void 0
}
r.options.error(new n(a), t)
}};
return e.util.mix(a, t)
}};
e.Push = o
}(baidu.frontia);
/*
Copyright (c) 2012 Gildas Lormeau. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.
* JZlib is based on zlib-1.1.3, so all credit should go authors
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
* and contributors of zlib.
*/
(function(obj) {
// Global
var MAX_BITS = 15;
var Z_OK = 0;
var Z_STREAM_END = 1;
var Z_NEED_DICT = 2;
var Z_STREAM_ERROR = -2;
var Z_DATA_ERROR = -3;
var Z_MEM_ERROR = -4;
var Z_BUF_ERROR = -5;
var inflate_mask = [ 0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,
0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff ];
var MANY = 1440;
// JZlib version : "1.0.2"
var Z_NO_FLUSH = 0;
var Z_FINISH = 4;
// InfTree
var fixed_bl = 9;
var fixed_bd = 5;
var fixed_tl = [ 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 160, 0, 8, 0,
0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40,
0, 9, 176, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13,
0, 8, 100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 0, 8, 60,
0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7,
35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 228, 80, 7, 7, 0, 8, 90, 0, 8,
26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80,
7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0,
8, 70, 0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 188, 0,
8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 194, 80, 7, 10, 0, 8, 97,
0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210,
81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117,
0, 8, 53, 0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154,
84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 3, 0, 8, 83,
0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 230,
80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139,
0, 8, 75, 0, 9, 246, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174,
0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 111,
0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9,
193, 80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 0, 8,
120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8,
227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8,
92, 0, 8, 28, 0, 9, 153, 84, 7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9,
249, 80, 7, 3, 0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8,
130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9,
181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 205, 81, 7, 15, 0, 8,
102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9,
221, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0,
8, 113, 0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9,
147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 243, 80, 7, 4, 0, 8,
85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9,
235, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8,
141, 0, 8, 77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9,
167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 82, 7, 19, 0, 8,
107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 0, 9,
207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8,
127, 0, 8, 63, 0, 9, 223, 82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 255 ];
var fixed_td = [ 80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 5, 513, 84, 5, 33, 92, 5,
8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 7, 89, 5, 1537, 85, 5, 97, 93, 5,
24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577 ];
// Tables for deflate from PKZIP's appnote.txt.
var cplens = [ // Copy lengths for literal codes 257..285
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 ];
// see note #13 above about 258
var cplext = [ // Extra bits for literal codes 257..285
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112 // 112==invalid
];
var cpdist = [ // Copy offsets for distance codes 0..29
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ];
var cpdext = [ // Extra bits for distance codes
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 ];
// If BMAX needs to be larger than 16, then h and x[] should be uLong.
var BMAX = 15; // maximum bit length of any code
function InfTree() {
var that = this;
var hn; // hufts used in space
var v; // work area for huft_build
var c; // bit length count table
var r; // table entry for structure assignment
var u; // table stack
var x; // bit offsets, then code stack
function huft_build(b, // code lengths in bits (all assumed <=
// BMAX)
bindex, n, // number of codes (assumed <= 288)
s, // number of simple-valued codes (0..s-1)
d, // list of base values for non-simple codes
e, // list of extra bits for non-simple codes
t, // result: starting table
m, // maximum lookup bits, returns actual
hp,// space for trees
hn,// hufts used in space
v // working area: values in order of bit length
) {
// Given a list of code lengths and a maximum table size, make a set of
// tables to decode that set of codes. Return Z_OK on success,
// Z_BUF_ERROR
// if the given code set is incomplete (the tables are still built in
// this
// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set
// of
// lengths), or Z_MEM_ERROR if not enough memory.
var a; // counter for codes of length k
var f; // i repeats in table every f entries
var g; // maximum code length
var h; // table level
var i; // counter, current code
var j; // counter
var k; // number of bits in current code
var l; // bits per table (returned in m)
var mask; // (1 << w) - 1, to avoid cc -O bug on HP
var p; // pointer into c[], b[], or v[]
var q; // points to current table
var w; // bits before this table == (l * h)
var xp; // pointer into x
var y; // number of dummy codes added
var z; // number of entries in current table
// Generate counts for each bit length
p = 0;
i = n;
do {
c[b[bindex + p]]++;
p++;
i--; // assume all entries <= BMAX
} while (i !== 0);
if (c[0] == n) { // null input--all zero length codes
t[0] = -1;
m[0] = 0;
return Z_OK;
}
// Find minimum and maximum length, bound *m by those
l = m[0];
for (j = 1; j <= BMAX; j++)
if (c[j] !== 0)
break;
k = j; // minimum code length
if (l < j) {
l = j;
}
for (i = BMAX; i !== 0; i--) {
if (c[i] !== 0)
break;
}
g = i; // maximum code length
if (l > i) {
l = i;
}
m[0] = l;
// Adjust last length count to fill out codes, if needed
for (y = 1 << j; j < i; j++, y <<= 1) {
if ((y -= c[j]) < 0) {
return Z_DATA_ERROR;
}
}
if ((y -= c[i]) < 0) {
return Z_DATA_ERROR;
}
c[i] += y;
// Generate starting offsets into the value table for each length
x[1] = j = 0;
p = 1;
xp = 2;
while (--i !== 0) { // note that i == g from above
x[xp] = (j += c[p]);
xp++;
p++;
}
// Make a table of values in order of bit lengths
i = 0;
p = 0;
do {
if ((j = b[bindex + p]) !== 0) {
v[x[j]++] = i;
}
p++;
} while (++i < n);
n = x[g]; // set n to length of v
// Generate the Huffman codes and for each, make the table entries
x[0] = i = 0; // first Huffman code is zero
p = 0; // grab values in bit order
h = -1; // no tables yet--level -1
w = -l; // bits decoded == (l * h)
u[0] = 0; // just to keep compilers happy
q = 0; // ditto
z = 0; // ditto
// go through the bit lengths (k already is bits in shortest code)
for (; k <= g; k++) {
a = c[k];
while (a-- !== 0) {
// here i is the Huffman code of length k bits for value *p
// make tables up to required level
while (k > w + l) {
h++;
w += l; // previous table always l bits
// compute minimum size table less than or equal to l bits
z = g - w;
z = (z > l) ? l : z; // table size upper limit
if ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table
// too few codes for
// k-w bit table
f -= a + 1; // deduct codes from patterns left
xp = k;
if (j < z) {
while (++j < z) { // try smaller tables up to z bits
if ((f <<= 1) <= c[++xp])
break; // enough codes to use up j bits
f -= c[xp]; // else deduct codes from patterns
}
}
}
z = 1 << j; // table entries for j-bit table
// allocate new table
if (hn[0] + z > MANY) { // (note: doesn't matter for fixed)
return Z_DATA_ERROR; // overflow of MANY
}
u[h] = q = /* hp+ */hn[0]; // DEBUG
hn[0] += z;
// connect to last table, if there is one
if (h !== 0) {
x[h] = i; // save pattern for backing up
r[0] = /* (byte) */j; // bits in this table
r[1] = /* (byte) */l; // bits to dump before this table
j = i >>> (w - l);
r[2] = /* (int) */(q - u[h - 1] - j); // offset to this table
hp.set(r, (u[h - 1] + j) * 3);
// to
// last
// table
} else {
t[0] = q; // first table is returned result
}
}
// set up table entry in r
r[1] = /* (byte) */(k - w);
if (p >= n) {
r[0] = 128 + 64; // out of values--invalid code
} else if (v[p] < s) {
r[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is
// end-of-block
r[2] = v[p++]; // simple code is just the value
} else {
r[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look
// up in lists
r[2] = d[v[p++] - s];
}
// fill code-like entries with r
f = 1 << (k - w);
for (j = i >>> w; j < z; j += f) {
hp.set(r, (q + j) * 3);
}
// backwards increment the k-bit code i
for (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {
i ^= j;
}
i ^= j;
// backup over finished tables
mask = (1 << w) - 1; // needed on HP, cc -O bug
while ((i & mask) != x[h]) {
h--; // don't need to update q
w -= l;
mask = (1 << w) - 1;
}
}
}
// Return Z_BUF_ERROR if we were given an incomplete table
return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;
}
function initWorkArea(vsize) {
var i;
if (!hn) {
hn = []; // []; //new Array(1);
v = []; // new Array(vsize);
c = new Int32Array(BMAX + 1); // new Array(BMAX + 1);
r = []; // new Array(3);
u = new Int32Array(BMAX); // new Array(BMAX);
x = new Int32Array(BMAX + 1); // new Array(BMAX + 1);
}
if (v.length < vsize) {
v = []; // new Array(vsize);
}
for (i = 0; i < vsize; i++) {
v[i] = 0;
}
for (i = 0; i < BMAX + 1; i++) {
c[i] = 0;
}
for (i = 0; i < 3; i++) {
r[i] = 0;
}
// for(int i=0; i<BMAX; i++){u[i]=0;}
u.set(c.subarray(0, BMAX), 0);
// for(int i=0; i<BMAX+1; i++){x[i]=0;}
x.set(c.subarray(0, BMAX + 1), 0);
}
that.inflate_trees_bits = function(c, // 19 code lengths
bb, // bits tree desired/actual depth
tb, // bits tree result
hp, // space for trees
z // for messages
) {
var result;
initWorkArea(19);
hn[0] = 0;
result = huft_build(c, 0, 19, 19, null, null, tb, bb, hp, hn, v);
if (result == Z_DATA_ERROR) {
z.msg = "oversubscribed dynamic bit lengths tree";
} else if (result == Z_BUF_ERROR || bb[0] === 0) {
z.msg = "incomplete dynamic bit lengths tree";
result = Z_DATA_ERROR;
}
return result;
};
that.inflate_trees_dynamic = function(nl, // number of literal/length codes
nd, // number of distance codes
c, // that many (total) code lengths
bl, // literal desired/actual bit depth
bd, // distance desired/actual bit depth
tl, // literal/length tree result
td, // distance tree result
hp, // space for trees
z // for messages
) {
var result;
// build literal/length tree
initWorkArea(288);
hn[0] = 0;
result = huft_build(c, 0, nl, 257, cplens, cplext, tl, bl, hp, hn, v);
if (result != Z_OK || bl[0] === 0) {
if (result == Z_DATA_ERROR) {
z.msg = "oversubscribed literal/length tree";
} else if (result != Z_MEM_ERROR) {
z.msg = "incomplete literal/length tree";
result = Z_DATA_ERROR;
}
return result;
}
// build distance tree
initWorkArea(288);
result = huft_build(c, nl, nd, 0, cpdist, cpdext, td, bd, hp, hn, v);
if (result != Z_OK || (bd[0] === 0 && nl > 257)) {
if (result == Z_DATA_ERROR) {
z.msg = "oversubscribed distance tree";
} else if (result == Z_BUF_ERROR) {
z.msg = "incomplete distance tree";
result = Z_DATA_ERROR;
} else if (result != Z_MEM_ERROR) {
z.msg = "empty distance tree with lengths";
result = Z_DATA_ERROR;
}
return result;
}
return Z_OK;
};
}
InfTree.inflate_trees_fixed = function(bl, // literal desired/actual bit depth
bd, // distance desired/actual bit depth
tl,// literal/length tree result
td// distance tree result
) {
bl[0] = fixed_bl;
bd[0] = fixed_bd;
tl[0] = fixed_tl;
td[0] = fixed_td;
return Z_OK;
};
// InfCodes
// waiting for "i:"=input,
// "o:"=output,
// "x:"=nothing
var START = 0; // x: set up for LEN
var LEN = 1; // i: get length/literal/eob next
var LENEXT = 2; // i: getting length extra (have base)
var DIST = 3; // i: get distance next
var DISTEXT = 4;// i: getting distance extra
var COPY = 5; // o: copying bytes in window, waiting
// for space
var LIT = 6; // o: got literal, waiting for output
// space
var WASH = 7; // o: got eob, possibly still output
// waiting
var END = 8; // x: got eob and all data flushed
var BADCODE = 9;// x: got error
function InfCodes() {
var that = this;
var mode; // current inflate_codes mode
// mode dependent information
var len = 0;
var tree; // pointer into tree
var tree_index = 0;
var need = 0; // bits needed
var lit = 0;
// if EXT or COPY, where and how much
var get = 0; // bits to get for extra
var dist = 0; // distance back to copy from
var lbits = 0; // ltree bits decoded per branch
var dbits = 0; // dtree bits decoder per branch
var ltree; // literal/length/eob tree
var ltree_index = 0; // literal/length/eob tree
var dtree; // distance tree
var dtree_index = 0; // distance tree
// Called with number of bytes left to write in window at least 258
// (the maximum string length) and number of input bytes available
// at least ten. The ten bytes are six bytes for the longest length/
// distance pair plus four bytes for overloading the bit buffer.
function inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {
var t; // temporary pointer
var tp; // temporary pointer
var tp_index; // temporary pointer
var e; // extra bits or operation
var b; // bit buffer
var k; // bits in bit buffer
var p; // input data pointer
var n; // bytes available there
var q; // output window write pointer
var m; // bytes to end of window or read pointer
var ml; // mask for literal/length tree
var md; // mask for distance tree
var c; // bytes to copy
var d; // distance back to copy from
var r; // copy source pointer
var tp_index_t_3; // (tp_index+t)*3
// load input, output, bit values
p = z.next_in_index;
n = z.avail_in;
b = s.bitb;
k = s.bitk;
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
// initialize masks
ml = inflate_mask[bl];
md = inflate_mask[bd];
// do until not enough input or output space for fast loop
do { // assume called with m >= 258 && n >= 10
// get literal/length code
while (k < (20)) { // max bits for literal/length code
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
t = b & ml;
tp = tl;
tp_index = tl_index;
tp_index_t_3 = (tp_index + t) * 3;
if ((e = tp[tp_index_t_3]) === 0) {
b >>= (tp[tp_index_t_3 + 1]);
k -= (tp[tp_index_t_3 + 1]);
s.window[q++] = /* (byte) */tp[tp_index_t_3 + 2];
m--;
continue;
}
do {
b >>= (tp[tp_index_t_3 + 1]);
k -= (tp[tp_index_t_3 + 1]);
if ((e & 16) !== 0) {
e &= 15;
c = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);
b >>= e;
k -= e;
// decode distance base of block to copy
while (k < (15)) { // max bits for distance code
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
t = b & md;
tp = td;
tp_index = td_index;
tp_index_t_3 = (tp_index + t) * 3;
e = tp[tp_index_t_3];
do {
b >>= (tp[tp_index_t_3 + 1]);
k -= (tp[tp_index_t_3 + 1]);
if ((e & 16) !== 0) {
// get extra bits to add to distance base
e &= 15;
while (k < (e)) { // get extra bits (up to 13)
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
d = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);
b >>= (e);
k -= (e);
// do the copy
m -= c;
if (q >= d) { // offset before dest
// just copy
r = q - d;
if (q - r > 0 && 2 > (q - r)) {
s.window[q++] = s.window[r++]; // minimum
// count is
// three,
s.window[q++] = s.window[r++]; // so unroll
// loop a
// little
c -= 2;
} else {
s.window.set(s.window.subarray(r, r + 2), q);
q += 2;
r += 2;
c -= 2;
}
} else { // else offset after destination
r = q - d;
do {
r += s.end; // force pointer in window
} while (r < 0); // covers invalid distances
e = s.end - r;
if (c > e) { // if source crosses,
c -= e; // wrapped copy
if (q - r > 0 && e > (q - r)) {
do {
s.window[q++] = s.window[r++];
} while (--e !== 0);
} else {
s.window.set(s.window.subarray(r, r + e), q);
q += e;
r += e;
e = 0;
}
r = 0; // copy rest from start of window
}
}
// copy all or what's left
if (q - r > 0 && c > (q - r)) {
do {
s.window[q++] = s.window[r++];
} while (--c !== 0);
} else {
s.window.set(s.window.subarray(r, r + c), q);
q += c;
r += c;
c = 0;
}
break;
} else if ((e & 64) === 0) {
t += tp[tp_index_t_3 + 2];
t += (b & inflate_mask[e]);
tp_index_t_3 = (tp_index + t) * 3;
e = tp[tp_index_t_3];
} else {
z.msg = "invalid distance code";
c = z.avail_in - n;
c = (k >> 3) < c ? k >> 3 : c;
n += c;
p -= c;
k -= c << 3;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return Z_DATA_ERROR;
}
} while (true);
break;
}
if ((e & 64) === 0) {
t += tp[tp_index_t_3 + 2];
t += (b & inflate_mask[e]);
tp_index_t_3 = (tp_index + t) * 3;
if ((e = tp[tp_index_t_3]) === 0) {
b >>= (tp[tp_index_t_3 + 1]);
k -= (tp[tp_index_t_3 + 1]);
s.window[q++] = /* (byte) */tp[tp_index_t_3 + 2];
m--;
break;
}
} else if ((e & 32) !== 0) {
c = z.avail_in - n;
c = (k >> 3) < c ? k >> 3 : c;
n += c;
p -= c;
k -= c << 3;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return Z_STREAM_END;
} else {
z.msg = "invalid literal/length code";
c = z.avail_in - n;
c = (k >> 3) < c ? k >> 3 : c;
n += c;
p -= c;
k -= c << 3;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return Z_DATA_ERROR;
}
} while (true);
} while (m >= 258 && n >= 10);
// not enough input or output--restore pointers and return
c = z.avail_in - n;
c = (k >> 3) < c ? k >> 3 : c;
n += c;
p -= c;
k -= c << 3;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return Z_OK;
}
that.init = function(bl, bd, tl, tl_index, td, td_index) {
mode = START;
lbits = /* (byte) */bl;
dbits = /* (byte) */bd;
ltree = tl;
ltree_index = tl_index;
dtree = td;
dtree_index = td_index;
tree = null;
};
that.proc = function(s, z, r) {
var j; // temporary storage
var tindex; // temporary pointer
var e; // extra bits or operation
var b = 0; // bit buffer
var k = 0; // bits in bit buffer
var p = 0; // input data pointer
var n; // bytes available there
var q; // output window write pointer
var m; // bytes to end of window or read pointer
var f; // pointer to copy strings from
// copy input/output information to locals (UPDATE macro restores)
p = z.next_in_index;
n = z.avail_in;
b = s.bitb;
k = s.bitk;
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
// process input and output based on current state
while (true) {
switch (mode) {
// waiting for "i:"=input, "o:"=output, "x:"=nothing
case START: // x: set up for LEN
if (m >= 258 && n >= 10) {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
r = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);
p = z.next_in_index;
n = z.avail_in;
b = s.bitb;
k = s.bitk;
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
if (r != Z_OK) {
mode = r == Z_STREAM_END ? WASH : BADCODE;
break;
}
}
need = lbits;
tree = ltree;
tree_index = ltree_index;
mode = LEN;
case LEN: // i: get length/literal/eob next
j = need;
while (k < (j)) {
if (n !== 0)
r = Z_OK;
else {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
tindex = (tree_index + (b & inflate_mask[j])) * 3;
b >>>= (tree[tindex + 1]);
k -= (tree[tindex + 1]);
e = tree[tindex];
if (e === 0) { // literal
lit = tree[tindex + 2];
mode = LIT;
break;
}
if ((e & 16) !== 0) { // length
get = e & 15;
len = tree[tindex + 2];
mode = LENEXT;
break;
}
if ((e & 64) === 0) { // next table
need = e;
tree_index = tindex / 3 + tree[tindex + 2];
break;
}
if ((e & 32) !== 0) { // end of block
mode = WASH;
break;
}
mode = BADCODE; // invalid code
z.msg = "invalid literal/length code";
r = Z_DATA_ERROR;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
case LENEXT: // i: getting length extra (have base)
j = get;
while (k < (j)) {
if (n !== 0)
r = Z_OK;
else {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
len += (b & inflate_mask[j]);
b >>= j;
k -= j;
need = dbits;
tree = dtree;
tree_index = dtree_index;
mode = DIST;
case DIST: // i: get distance next
j = need;
while (k < (j)) {
if (n !== 0)
r = Z_OK;
else {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
tindex = (tree_index + (b & inflate_mask[j])) * 3;
b >>= tree[tindex + 1];
k -= tree[tindex + 1];
e = (tree[tindex]);
if ((e & 16) !== 0) { // distance
get = e & 15;
dist = tree[tindex + 2];
mode = DISTEXT;
break;
}
if ((e & 64) === 0) { // next table
need = e;
tree_index = tindex / 3 + tree[tindex + 2];
break;
}
mode = BADCODE; // invalid code
z.msg = "invalid distance code";
r = Z_DATA_ERROR;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
case DISTEXT: // i: getting distance extra
j = get;
while (k < (j)) {
if (n !== 0)
r = Z_OK;
else {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
dist += (b & inflate_mask[j]);
b >>= j;
k -= j;
mode = COPY;
case COPY: // o: copying bytes in window, waiting for space
f = q - dist;
while (f < 0) { // modulo window size-"while" instead
f += s.end; // of "if" handles invalid distances
}
while (len !== 0) {
if (m === 0) {
if (q == s.end && s.read !== 0) {
q = 0;
m = q < s.read ? s.read - q - 1 : s.end - q;
}
if (m === 0) {
s.write = q;
r = s.inflate_flush(z, r);
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
if (q == s.end && s.read !== 0) {
q = 0;
m = q < s.read ? s.read - q - 1 : s.end - q;
}
if (m === 0) {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
}
}
s.window[q++] = s.window[f++];
m--;
if (f == s.end)
f = 0;
len--;
}
mode = START;
break;
case LIT: // o: got literal, waiting for output space
if (m === 0) {
if (q == s.end && s.read !== 0) {
q = 0;
m = q < s.read ? s.read - q - 1 : s.end - q;
}
if (m === 0) {
s.write = q;
r = s.inflate_flush(z, r);
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
if (q == s.end && s.read !== 0) {
q = 0;
m = q < s.read ? s.read - q - 1 : s.end - q;
}
if (m === 0) {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
}
}
r = Z_OK;
s.window[q++] = /* (byte) */lit;
m--;
mode = START;
break;
case WASH: // o: got eob, possibly more output
if (k > 7) { // return unused byte, if any
k -= 8;
n++;
p--; // can always return one
}
s.write = q;
r = s.inflate_flush(z, r);
q = s.write;
m = q < s.read ? s.read - q - 1 : s.end - q;
if (s.read != s.write) {
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
mode = END;
case END:
r = Z_STREAM_END;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
case BADCODE: // x: got error
r = Z_DATA_ERROR;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
default:
r = Z_STREAM_ERROR;
s.bitb = b;
s.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
s.write = q;
return s.inflate_flush(z, r);
}
}
};
that.free = function() {
// ZFREE(z, c);
};
}
// InfBlocks
// Table for deflate from PKZIP's appnote.txt.
var border = [ // Order of the bit length code lengths
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
var TYPE = 0; // get type bits (3, including end bit)
var LENS = 1; // get lengths for stored
var STORED = 2;// processing stored block
var TABLE = 3; // get table lengths
var BTREE = 4; // get bit lengths tree for a dynamic
// block
var DTREE = 5; // get length, distance trees for a
// dynamic block
var CODES = 6; // processing fixed or dynamic block
var DRY = 7; // output remaining window bytes
var DONELOCKS = 8; // finished last block, done
var BADBLOCKS = 9; // ot a data error--stuck here
function InfBlocks(z, w) {
var that = this;
var mode = TYPE; // current inflate_block mode
var left = 0; // if STORED, bytes left to copy
var table = 0; // table lengths (14 bits)
var index = 0; // index into blens (or border)
var blens; // bit lengths of codes
var bb = [ 0 ]; // bit length tree depth
var tb = [ 0 ]; // bit length decoding tree
var codes = new InfCodes(); // if CODES, current state
var last = 0; // true if this block is the last block
var hufts = new Int32Array(MANY * 3); // single malloc for tree space
var check = 0; // check on output
var inftree = new InfTree();
that.bitk = 0; // bits in bit buffer
that.bitb = 0; // bit buffer
that.window = new Uint8Array(w); // sliding window
that.end = w; // one byte after sliding window
that.read = 0; // window read pointer
that.write = 0; // window write pointer
that.reset = function(z, c) {
if (c)
c[0] = check;
// if (mode == BTREE || mode == DTREE) {
// }
if (mode == CODES) {
codes.free(z);
}
mode = TYPE;
that.bitk = 0;
that.bitb = 0;
that.read = that.write = 0;
};
that.reset(z, null);
// copy as much as possible from the sliding window to the output area
that.inflate_flush = function(z, r) {
var n;
var p;
var q;
// local copies of source and destination pointers
p = z.next_out_index;
q = that.read;
// compute number of bytes to copy as far as end of window
n = /* (int) */((q <= that.write ? that.write : that.end) - q);
if (n > z.avail_out)
n = z.avail_out;
if (n !== 0 && r == Z_BUF_ERROR)
r = Z_OK;
// update counters
z.avail_out -= n;
z.total_out += n;
// copy as far as end of window
z.next_out.set(that.window.subarray(q, q + n), p);
p += n;
q += n;
// see if more to copy at beginning of window
if (q == that.end) {
// wrap pointers
q = 0;
if (that.write == that.end)
that.write = 0;
// compute bytes to copy
n = that.write - q;
if (n > z.avail_out)
n = z.avail_out;
if (n !== 0 && r == Z_BUF_ERROR)
r = Z_OK;
// update counters
z.avail_out -= n;
z.total_out += n;
// copy
z.next_out.set(that.window.subarray(q, q + n), p);
p += n;
q += n;
}
// update pointers
z.next_out_index = p;
that.read = q;
// done
return r;
};
that.proc = function(z, r) {
var t; // temporary storage
var b; // bit buffer
var k; // bits in bit buffer
var p; // input data pointer
var n; // bytes available there
var q; // output window write pointer
var m; // bytes to end of window or read pointer
var i;
// copy input/output information to locals (UPDATE macro restores)
// {
p = z.next_in_index;
n = z.avail_in;
b = that.bitb;
k = that.bitk;
// }
// {
q = that.write;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
// }
// process input based on current state
// DEBUG dtree
while (true) {
switch (mode) {
case TYPE:
while (k < (3)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
t = /* (int) */(b & 7);
last = t & 1;
switch (t >>> 1) {
case 0: // stored
// {
b >>>= (3);
k -= (3);
// }
t = k & 7; // go to byte boundary
// {
b >>>= (t);
k -= (t);
// }
mode = LENS; // get length of stored block
break;
case 1: // fixed
// {
var bl = []; // new Array(1);
var bd = []; // new Array(1);
var tl = [ [] ]; // new Array(1);
var td = [ [] ]; // new Array(1);
InfTree.inflate_trees_fixed(bl, bd, tl, td);
codes.init(bl[0], bd[0], tl[0], 0, td[0], 0);
// }
// {
b >>>= (3);
k -= (3);
// }
mode = CODES;
break;
case 2: // dynamic
// {
b >>>= (3);
k -= (3);
// }
mode = TABLE;
break;
case 3: // illegal
// {
b >>>= (3);
k -= (3);
// }
mode = BADBLOCKS;
z.msg = "invalid block type";
r = Z_DATA_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
break;
case LENS:
while (k < (32)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {
mode = BADBLOCKS;
z.msg = "invalid stored block lengths";
r = Z_DATA_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
left = (b & 0xffff);
b = k = 0; // dump bits
mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);
break;
case STORED:
if (n === 0) {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
if (m === 0) {
if (q == that.end && that.read !== 0) {
q = 0;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
}
if (m === 0) {
that.write = q;
r = that.inflate_flush(z, r);
q = that.write;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
if (q == that.end && that.read !== 0) {
q = 0;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
}
if (m === 0) {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
}
}
r = Z_OK;
t = left;
if (t > n)
t = n;
if (t > m)
t = m;
that.window.set(z.read_buf(p, t), q);
p += t;
n -= t;
q += t;
m -= t;
if ((left -= t) !== 0)
break;
mode = last !== 0 ? DRY : TYPE;
break;
case TABLE:
while (k < (14)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
table = t = (b & 0x3fff);
if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {
mode = BADBLOCKS;
z.msg = "too many length or distance symbols";
r = Z_DATA_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
if (!blens || blens.length < t) {
blens = []; // new Array(t);
} else {
for (i = 0; i < t; i++) {
blens[i] = 0;
}
}
// {
b >>>= (14);
k -= (14);
// }
index = 0;
mode = BTREE;
case BTREE:
while (index < 4 + (table >>> 10)) {
while (k < (3)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
blens[border[index++]] = b & 7;
// {
b >>>= (3);
k -= (3);
// }
}
while (index < 19) {
blens[border[index++]] = 0;
}
bb[0] = 7;
t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);
if (t != Z_OK) {
r = t;
if (r == Z_DATA_ERROR) {
blens = null;
mode = BADBLOCKS;
}
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
index = 0;
mode = DTREE;
case DTREE:
while (true) {
t = table;
if (!(index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))) {
break;
}
var j, c;
t = bb[0];
while (k < (t)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
// if (tb[0] == -1) {
// System.err.println("null...");
// }
t = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];
c = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];
if (c < 16) {
b >>>= (t);
k -= (t);
blens[index++] = c;
} else { // c == 16..18
i = c == 18 ? 7 : c - 14;
j = c == 18 ? 11 : 3;
while (k < (t + i)) {
if (n !== 0) {
r = Z_OK;
} else {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
n--;
b |= (z.read_byte(p++) & 0xff) << k;
k += 8;
}
b >>>= (t);
k -= (t);
j += (b & inflate_mask[i]);
b >>>= (i);
k -= (i);
i = index;
t = table;
if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {
blens = null;
mode = BADBLOCKS;
z.msg = "invalid bit length repeat";
r = Z_DATA_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
c = c == 16 ? blens[i - 1] : 0;
do {
blens[i++] = c;
} while (--j !== 0);
index = i;
}
}
tb[0] = -1;
// {
var bl_ = []; // new Array(1);
var bd_ = []; // new Array(1);
var tl_ = []; // new Array(1);
var td_ = []; // new Array(1);
bl_[0] = 9; // must be <= 9 for lookahead assumptions
bd_[0] = 6; // must be <= 9 for lookahead assumptions
t = table;
t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);
if (t != Z_OK) {
if (t == Z_DATA_ERROR) {
blens = null;
mode = BADBLOCKS;
}
r = t;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
codes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);
// }
mode = CODES;
case CODES:
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
if ((r = codes.proc(that, z, r)) != Z_STREAM_END) {
return that.inflate_flush(z, r);
}
r = Z_OK;
codes.free(z);
p = z.next_in_index;
n = z.avail_in;
b = that.bitb;
k = that.bitk;
q = that.write;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
if (last === 0) {
mode = TYPE;
break;
}
mode = DRY;
case DRY:
that.write = q;
r = that.inflate_flush(z, r);
q = that.write;
m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);
if (that.read != that.write) {
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
mode = DONELOCKS;
case DONELOCKS:
r = Z_STREAM_END;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
case BADBLOCKS:
r = Z_DATA_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
default:
r = Z_STREAM_ERROR;
that.bitb = b;
that.bitk = k;
z.avail_in = n;
z.total_in += p - z.next_in_index;
z.next_in_index = p;
that.write = q;
return that.inflate_flush(z, r);
}
}
};
that.free = function(z) {
that.reset(z, null);
that.window = null;
hufts = null;
// ZFREE(z, s);
};
that.set_dictionary = function(d, start, n) {
that.window.set(d.subarray(start, start + n), 0);
that.read = that.write = n;
};
// Returns true if inflate is currently at the end of a block generated
// by Z_SYNC_FLUSH or Z_FULL_FLUSH.
that.sync_point = function() {
return mode == LENS ? 1 : 0;
};
}
// Inflate
// preset dictionary flag in zlib header
var PRESET_DICT = 0x20;
var Z_DEFLATED = 8;
var METHOD = 0; // waiting for method byte
var FLAG = 1; // waiting for flag byte
var DICT4 = 2; // four dictionary check bytes to go
var DICT3 = 3; // three dictionary check bytes to go
var DICT2 = 4; // two dictionary check bytes to go
var DICT1 = 5; // one dictionary check byte to go
var DICT0 = 6; // waiting for inflateSetDictionary
var BLOCKS = 7; // decompressing blocks
var DONE = 12; // finished check, done
var BAD = 13; // got an error--stay here
var mark = [ 0, 0, 0xff, 0xff ];
function Inflate() {
var that = this;
that.mode = 0; // current inflate mode
// mode dependent information
that.method = 0; // if FLAGS, method byte
// if CHECK, check values to compare
that.was = [ 0 ]; // new Array(1); // computed check value
that.need = 0; // stream check value
// if BAD, inflateSync's marker bytes count
that.marker = 0;
// mode independent information
that.wbits = 0; // log2(window size) (8..15, defaults to 15)
// this.blocks; // current inflate_blocks state
function inflateReset(z) {
if (!z || !z.istate)
return Z_STREAM_ERROR;
z.total_in = z.total_out = 0;
z.msg = null;
z.istate.mode = BLOCKS;
z.istate.blocks.reset(z, null);
return Z_OK;
}
that.inflateEnd = function(z) {
if (that.blocks)
that.blocks.free(z);
that.blocks = null;
// ZFREE(z, z->state);
return Z_OK;
};
that.inflateInit = function(z, w) {
z.msg = null;
that.blocks = null;
// set window size
if (w < 8 || w > 15) {
that.inflateEnd(z);
return Z_STREAM_ERROR;
}
that.wbits = w;
z.istate.blocks = new InfBlocks(z, 1 << w);
// reset state
inflateReset(z);
return Z_OK;
};
that.inflate = function(z, f) {
var r;
var b;
if (!z || !z.istate || !z.next_in)
return Z_STREAM_ERROR;
f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
r = Z_BUF_ERROR;
while (true) {
// System.out.println("mode: "+z.istate.mode);
switch (z.istate.mode) {
case METHOD:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
if (((z.istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {
z.istate.mode = BAD;
z.msg = "unknown compression method";
z.istate.marker = 5; // can't try inflateSync
break;
}
if ((z.istate.method >> 4) + 8 > z.istate.wbits) {
z.istate.mode = BAD;
z.msg = "invalid window size";
z.istate.marker = 5; // can't try inflateSync
break;
}
z.istate.mode = FLAG;
case FLAG:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
b = (z.read_byte(z.next_in_index++)) & 0xff;
if ((((z.istate.method << 8) + b) % 31) !== 0) {
z.istate.mode = BAD;
z.msg = "incorrect header check";
z.istate.marker = 5; // can't try inflateSync
break;
}
if ((b & PRESET_DICT) === 0) {
z.istate.mode = BLOCKS;
break;
}
z.istate.mode = DICT4;
case DICT4:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
z.istate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;
z.istate.mode = DICT3;
case DICT3:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
z.istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;
z.istate.mode = DICT2;
case DICT2:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
z.istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;
z.istate.mode = DICT1;
case DICT1:
if (z.avail_in === 0)
return r;
r = f;
z.avail_in--;
z.total_in++;
z.istate.need += (z.read_byte(z.next_in_index++) & 0xff);
z.istate.mode = DICT0;
return Z_NEED_DICT;
case DICT0:
z.istate.mode = BAD;
z.msg = "need dictionary";
z.istate.marker = 0; // can try inflateSync
return Z_STREAM_ERROR;
case BLOCKS:
r = z.istate.blocks.proc(z, r);
if (r == Z_DATA_ERROR) {
z.istate.mode = BAD;
z.istate.marker = 0; // can try inflateSync
break;
}
if (r == Z_OK) {
r = f;
}
if (r != Z_STREAM_END) {
return r;
}
r = f;
z.istate.blocks.reset(z, z.istate.was);
z.istate.mode = DONE;
case DONE:
return Z_STREAM_END;
case BAD:
return Z_DATA_ERROR;
default:
return Z_STREAM_ERROR;
}
}
};
that.inflateSetDictionary = function(z, dictionary, dictLength) {
var index = 0;
var length = dictLength;
if (!z || !z.istate || z.istate.mode != DICT0)
return Z_STREAM_ERROR;
if (length >= (1 << z.istate.wbits)) {
length = (1 << z.istate.wbits) - 1;
index = dictLength - length;
}
z.istate.blocks.set_dictionary(dictionary, index, length);
z.istate.mode = BLOCKS;
return Z_OK;
};
that.inflateSync = function(z) {
var n; // number of bytes to look at
var p; // pointer to bytes
var m; // number of marker bytes found in a row
var r, w; // temporaries to save total_in and total_out
// set up
if (!z || !z.istate)
return Z_STREAM_ERROR;
if (z.istate.mode != BAD) {
z.istate.mode = BAD;
z.istate.marker = 0;
}
if ((n = z.avail_in) === 0)
return Z_BUF_ERROR;
p = z.next_in_index;
m = z.istate.marker;
// search
while (n !== 0 && m < 4) {
if (z.read_byte(p) == mark[m]) {
m++;
} else if (z.read_byte(p) !== 0) {
m = 0;
} else {
m = 4 - m;
}
p++;
n--;
}
// restore
z.total_in += p - z.next_in_index;
z.next_in_index = p;
z.avail_in = n;
z.istate.marker = m;
// return no joy or set up to restart on a new block
if (m != 4) {
return Z_DATA_ERROR;
}
r = z.total_in;
w = z.total_out;
inflateReset(z);
z.total_in = r;
z.total_out = w;
z.istate.mode = BLOCKS;
return Z_OK;
};
// Returns true if inflate is currently at the end of a block generated
// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
// implementation to provide an additional safety check. PPP uses
// Z_SYNC_FLUSH
// but removes the length bytes of the resulting empty stored block. When
// decompressing, PPP checks that at the end of input packet, inflate is
// waiting for these length bytes.
that.inflateSyncPoint = function(z) {
if (!z || !z.istate || !z.istate.blocks)
return Z_STREAM_ERROR;
return z.istate.blocks.sync_point();
};
}
// ZStream
function ZStream() {
}
ZStream.prototype = {
inflateInit : function(bits) {
var that = this;
that.istate = new Inflate();
if (!bits)
bits = MAX_BITS;
return that.istate.inflateInit(that, bits);
},
inflate : function(f) {
var that = this;
if (!that.istate)
return Z_STREAM_ERROR;
return that.istate.inflate(that, f);
},
inflateEnd : function() {
var that = this;
if (!that.istate)
return Z_STREAM_ERROR;
var ret = that.istate.inflateEnd(that);
that.istate = null;
return ret;
},
inflateSync : function() {
var that = this;
if (!that.istate)
return Z_STREAM_ERROR;
return that.istate.inflateSync(that);
},
inflateSetDictionary : function(dictionary, dictLength) {
var that = this;
if (!that.istate)
return Z_STREAM_ERROR;
return that.istate.inflateSetDictionary(that, dictionary, dictLength);
},
read_byte : function(start) {
var that = this;
return that.next_in.subarray(start, start + 1)[0];
},
read_buf : function(start, size) {
var that = this;
return that.next_in.subarray(start, start + size);
}
};
// Inflater
function Inflater() {
var that = this;
var z = new ZStream();
var bufsize = 512;
var flush = Z_NO_FLUSH;
var buf = new Uint8Array(bufsize);
var nomoreinput = false;
z.inflateInit();
z.next_out = buf;
that.append = function(data, onprogress) {
var err, buffers = [], lastIndex = 0, bufferIndex = 0, bufferSize = 0, array;
if (data.length === 0)
return;
z.next_in_index = 0;
z.next_in = data;
z.avail_in = data.length;
do {
z.next_out_index = 0;
z.avail_out = bufsize;
if ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it
z.next_in_index = 0;
nomoreinput = true;
}
err = z.inflate(flush);
if (nomoreinput && (err == Z_BUF_ERROR))
return -1;
if (err != Z_OK && err != Z_STREAM_END)
throw "inflating: " + z.msg;
if ((nomoreinput || err == Z_STREAM_END) && (z.avail_in == data.length))
return -1;
if (z.next_out_index)
if (z.next_out_index == bufsize)
buffers.push(new Uint8Array(buf));
else
buffers.push(new Uint8Array(buf.subarray(0, z.next_out_index)));
bufferSize += z.next_out_index;
if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {
onprogress(z.next_in_index);
lastIndex = z.next_in_index;
}
} while (z.avail_in > 0 || z.avail_out === 0);
array = new Uint8Array(bufferSize);
buffers.forEach(function(chunk) {
array.set(chunk, bufferIndex);
bufferIndex += chunk.length;
});
return array;
};
that.flush = function() {
z.inflateEnd();
};
}
var inflater;
if (obj.zip)
obj.zip.Inflater = Inflater;
else {
inflater = new Inflater();
obj.addEventListener("message", function(event) {
var message = event.data;
if (message.append)
obj.postMessage({
onappend : true,
data : inflater.append(message.data, function(current) {
obj.postMessage({
progress : true,
current : current
});
})
});
if (message.flush) {
inflater.flush();
obj.postMessage({
onflush : true
});
}
}, false);
}
})(this);
\ No newline at end of file
/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;
while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?o.queue(this[0],a):void 0===b?this:this.each(function(){var c=o.queue(this,a,b);o._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&o.dequeue(this,a)})},dequeue:function(a){return this.each(function(){o.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=o.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===o.css(a,"display")||!o.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=m.createDocumentFragment(),b=a.appendChild(m.createElement("div"));b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||m,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[o.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new o.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=m),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return o.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=o.extend(new o.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?o.event.trigger(e,null,b):o.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},o.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},o.Event=function(a,b){return this instanceof o.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.getPreventDefault&&a.getPreventDefault()?Z:$):this.type=a,b&&o.extend(this,b),this.timeStamp=a&&a.timeStamp||o.now(),void(this[o.expando]=!0)):new o.Event(a,b)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){o.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!o.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){o.event.simulate(b,a.target,o.event.fix(a),!0)};o.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),o.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return o().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=o.guid++)),this.each(function(){o.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,o(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){o.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){o.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?o.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||o.contains(a.ownerDocument,a)||(g=o.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",e=m.documentElement,f=m.createElement("div"),g=m.createElement("div");g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",f.appendChild(g);function h(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",e.appendChild(f);var d=a.getComputedStyle(g,null);b="1%"!==d.top,c="4px"===d.width,e.removeChild(f)}a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return h(),b},boxSizingReliable:function(){return null==c&&h(),c},reliableMarginRight:function(){var b,c=g.appendChild(m.createElement("div"));return c.style.cssText=g.style.cssText=d,c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.innerHTML="",b}})}(),o.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=o.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=o.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=o.css(a,"border"+R[f]+"Width",!0,e))):(g+=o.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=o.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===o.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):f[g]||(e=S(d),(c&&"none"!==c||!e)&&L.set(d,"olddisplay",e?c:o.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}o.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=o.camelCase(b),i=a.style;return b=o.cssProps[h]||(o.cssProps[h]=Fb(i,h)),g=o.cssHooks[b]||o.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(o.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||o.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]="",i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=o.camelCase(b);return b=o.cssProps[h]||(o.cssProps[h]=Fb(a.style,h)),g=o.cssHooks[b]||o.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||o.isNumeric(f)?f||0:e):e}}),o.each(["height","width"],function(a,b){o.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&zb.test(o.css(a,"display"))?o.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===o.css(a,"boxSizing",!1,e),e):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(a,b){return b?o.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(a,b){o.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(o.cssHooks[a+b].set=Gb)}),o.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(o.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=o.css(a,b[g],!1,d);return f}return void 0!==c?o.style(a,b,c):o.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(o.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?o.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=o.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){o.fx.step[a.prop]?o.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[o.cssProps[a.prop]]||o.cssHooks[a.prop])?o.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},o.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(o.cssNumber[a]?"":"px"),g=(o.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(o.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,o.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&S(a),p=L.get(a,"fxshow");c.queue||(h=o._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,o.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=o.css(a,"display"),"none"===j&&(j=tb(a.nodeName)),"inline"===j&&"none"===o.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;n=!0}l[d]=p&&p[d]||o.style(a,d)}if(!o.isEmptyObject(l)){p?"hidden"in p&&(n=p.hidden):p=L.access(a,"fxshow",{}),f&&(p.hidden=!n),n?o(a).show():k.done(function(){o(a).hide()}),k.done(function(){var b;L.remove(a,"fxshow");for(b in l)o.style(a,b,l[b])});for(d in l)g=Ub(n?p[d]:0,d,k),d in p||(p[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=o.camelCase(c),e=b[d],f=a[c],o.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=o.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=o.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:o.extend({},b),opts:o.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=o.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return o.map(k,Ub,j),o.isFunction(j.opts.start)&&j.opts.start.call(a,j),o.fx.timer(o.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}o.Animation=o.extend(Xb,{tweener:function(a,b){o.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),o.speed=function(a,b,c){var d=a&&"object"==typeof a?o.extend({},a):{complete:c||!c&&b||o.isFunction(a)&&a,duration:a,easing:c&&b||b&&!o.isFunction(b)&&b};return d.duration=o.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in o.fx.speeds?o.fx.speeds[d.duration]:o.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){o.isFunction(d.old)&&d.old.call(this),d.queue&&o.dequeue(this,d.queue)},d},o.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=o.isEmptyObject(a),f=o.speed(b,c,d),g=function(){var b=Xb(this,o.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=o.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&o.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=o.timers,g=d?d.length:0;for(c.finish=!0,o.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),o.each(["toggle","show","hide"],function(a,b){var c=o.fn[b];o.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){o.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),o.timers=[],o.fx.tick=function(){var a,b=0,c=o.timers;for(Lb=o.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(a){o.timers.push(a),a()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(a,b){return a=o.fx?o.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=m.createElement("input"),b=m.createElement("select"),c=b.appendChild(m.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=m.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(a,b){return J(this,o.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){o.removeAttr(this,a)})}}),o.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?o.prop(a,b,c):(1===f&&o.isXMLDoc(a)||(b=b.toLowerCase(),d=o.attrHooks[b]||(o.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=o.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void o.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=o.propFix[c]||c,o.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&o.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?o.removeAttr(a,c):a.setAttribute(c,c),c}},o.each(o.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||o.find.attr;$b[b]=function(a,b,d){var e,f;
return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(a,b){return J(this,o.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[o.propFix[a]||a]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!o.isXMLDoc(a),f&&(b=o.propFix[b]||b,e=o.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=o.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?o.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(o.isFunction(a)?function(c){o(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=o(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=o.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,o(this).val()):a,null==e?e="":"number"==typeof e?e+="":o.isArray(e)&&(e=o.map(e,function(a){return null==a?"":a+""})),b=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=o.valHooks[e.type]||o.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),o.extend({valHooks:{select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&o.nodeName(c.parentNode,"optgroup"))){if(b=o(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=o.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=o.inArray(o(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(a,b){return o.isArray(b)?a.checked=o.inArray(o(a).val(),b)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){o.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),o.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(a){return JSON.parse(a+"")},o.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(o.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,o.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=o.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&o.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,o.ajaxSettings),b):tc(o.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=o.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?o(l):o.event,n=o.Deferred(),p=o.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(n.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=o.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=o.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===o.active++&&o.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(o.lastModified[d]&&v.setRequestHeader("If-Modified-Since",o.lastModified[d]),o.etag[d]&&v.setRequestHeader("If-None-Match",o.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(o.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(o.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?n.resolveWith(l,[r,x,v]):n.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--o.active||o.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return o.get(a,b,c,"json")},getScript:function(a,b){return o.get(a,void 0,b,"script")}}),o.each(["get","post"],function(a,b){o[b]=function(a,c,d,e){return o.isFunction(c)&&(e=e||d,d=c,c=void 0),o.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){o.fn[b]=function(a){return this.on(b,a)}}),o._evalUrl=function(a){return o.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(a){var b;return o.isFunction(a)?this.each(function(b){o(this).wrapAll(a.call(this,b))}):(this[0]&&(b=o(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(o.isFunction(a)?function(b){o(this).wrapInner(a.call(this,b))}:function(){var b=o(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=o.isFunction(a);return this.each(function(c){o(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},o.expr.filters.visible=function(a){return!o.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(o.isArray(b))o.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==o.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}o.param=function(a,b){var c,d=[],e=function(a,b){b=o.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(a)||a.jquery&&!o.isPlainObject(a))o.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=o.prop(this,"elements");return a?o.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=o(this).val();return null==c?null:o.isArray(c)?o.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var a in Dc)Dc[a]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(a){var b;return l.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort"),f.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return o.globalEval(a),a}}}),o.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),o.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=o("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),m.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||o.expando+"_"+cc++;return this[a]=!0,a}}),o.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=o.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||o.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&o.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||m;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=o.buildFragment([a],b,e),e&&e.length&&o(e).remove(),o.merge([],d.childNodes))};var Ic=o.fn.load;o.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),o.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&o.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?o("<div>").append(o.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},o.expr.filters.animated=function(a){return o.grep(o.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return o.isWindow(a)?a:9===a.nodeType&&a.defaultView}o.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=o.css(a,"position"),l=o(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=o.css(a,"top"),i=o.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),o.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},o.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){o.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,o.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===o.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),o.nodeName(a[0],"html")||(d=a.offset()),d.top+=o.css(a[0],"borderTopWidth",!0),d.left+=o.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-o.css(c,"marginTop",!0),left:b.left-d.left-o.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!o.nodeName(a,"html")&&"static"===o.css(a,"position"))a=a.offsetParent;return a||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;o.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),o.each(["top","left"],function(a,b){o.cssHooks[b]=yb(l.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?o(a).position()[b]+"px":c):void 0})}),o.each({Height:"height",Width:"width"},function(a,b){o.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){o.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return o.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?o.css(b,c,g):o.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(b){return a.$===o&&(a.$=Mc),b&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o});
/*
### jQuery XML to JSON Plugin v1.3 - 2013-02-18 ###
* http://www.fyneworks.com/ - diego@fyneworks.com
* Licensed under http://en.wikipedia.org/wiki/MIT_License
###
Website: http://www.fyneworks.com/jquery/xml-to-json/
*//*
# INSPIRED BY: http://www.terracoder.com/
AND: http://www.thomasfrank.se/xml_to_json.html
AND: http://www.kawa.net/works/js/xml/objtree-e.html
*//*
This simple script converts XML (document of code) into a JSON object. It is the combination of 2
'xml to json' great parsers (see below) which allows for both 'simple' and 'extended' parsing modes.
*/
// Avoid collisions
;if(window.jQuery) (function($){
// Add function to jQuery namespace
$.extend({
// converts xml documents and xml text to json object
xml2json: function(xml, extended) {
if(!xml) return {}; // quick fail
//### PARSER LIBRARY
// Core function
function parseXML(node, simple){
if(!node) return null;
var txt = '', obj = null, att = null;
var nt = node.nodeType, nn = jsVar(node.localName || node.nodeName);
var nv = node.text || node.nodeValue || '';
/*DBG*/ //if(window.console) console.log(['x2j',nn,nt,nv.length+' bytes']);
if(node.childNodes){
if(node.childNodes.length>0){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'CHILDREN',node.childNodes]);
$.each(node.childNodes, function(n,cn){
var cnt = cn.nodeType, cnn = jsVar(cn.localName || cn.nodeName);
var cnv = cn.text || cn.nodeValue || '';
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>a',cnn,cnt,cnv]);
if(cnt == 8){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>b',cnn,'COMMENT (ignore)']);
return; // ignore comment node
}
else if(cnt == 3 || cnt == 4 || !cnn){
// ignore white-space in between tags
if(cnv.match(/^\s+$/)){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>c',cnn,'WHITE-SPACE (ignore)']);
return;
};
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>d',cnn,'TEXT']);
txt += cnv.replace(/^\s+/,'').replace(/\s+$/,'');
// make sure we ditch trailing spaces from markup
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>e',cnn,'OBJECT']);
obj = obj || {};
if(obj[cnn]){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>f',cnn,'ARRAY']);
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
if(!obj[cnn].length) obj[cnn] = myArr(obj[cnn]);
obj[cnn] = myArr(obj[cnn]);
obj[cnn][ obj[cnn].length ] = parseXML(cn, true/* simple */);
obj[cnn].length = obj[cnn].length;
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>g',cnn,'dig deeper...']);
obj[cnn] = parseXML(cn);
};
};
});
};//node.childNodes.length>0
};//node.childNodes
if(node.attributes){
if(node.attributes.length>0){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'ATTRIBUTES',node.attributes])
att = {}; obj = obj || {};
$.each(node.attributes, function(a,at){
var atn = jsVar(at.name), atv = at.value;
att[atn] = atv;
if(obj[atn]){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'ARRAY']);
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
//if(!obj[atn].length) obj[atn] = myArr(obj[atn]);//[ obj[ atn ] ];
obj[cnn] = myArr(obj[cnn]);
obj[atn][ obj[atn].length ] = atv;
obj[atn].length = obj[atn].length;
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'TEXT']);
obj[atn] = atv;
};
});
//obj['attributes'] = att;
};//node.attributes.length>0
};//node.attributes
if(obj){
obj = $.extend( (txt!='' ? new String(txt) : {}),/* {text:txt},*/ obj || {}/*, att || {}*/);
//txt = (obj.text) ? (typeof(obj.text)=='object' ? obj.text : [obj.text || '']).concat([txt]) : txt;
txt = (obj.text) ? ([obj.text || '']).concat([txt]) : txt;
if(txt) obj.text = txt;
txt = '';
};
var out = obj || txt;
//console.log([extended, simple, out]);
if(extended){
if(txt) out = {};//new String(out);
txt = out.text || txt || '';
if(txt) out.text = txt;
if(!simple) out = myArr(out);
};
return out;
};// parseXML
// Core Function End
// Utility functions
var jsVar = function(s){ return String(s || '').replace(/-/g,"_"); };
// NEW isNum function: 01/09/2010
// Thanks to Emile Grau, GigaTecnologies S.L., www.gigatransfer.com, www.mygigamail.com
function isNum(s){
// based on utility function isNum from xml2json plugin (http://www.fyneworks.com/ - diego@fyneworks.com)
// few bugs corrected from original function :
// - syntax error : regexp.test(string) instead of string.test(reg)
// - regexp modified to accept comma as decimal mark (latin syntax : 25,24 )
// - regexp modified to reject if no number before decimal mark : ".7" is not accepted
// - string is "trimmed", allowing to accept space at the beginning and end of string
var regexp=/^((-)?([0-9]+)(([\.\,]{0,1})([0-9]+))?$)/
return (typeof s == "number") || regexp.test(String((s && typeof s == "string") ? jQuery.trim(s) : ''));
};
// OLD isNum function: (for reference only)
//var isNum = function(s){ return (typeof s == "number") || String((s && typeof s == "string") ? s : '').test(/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/); };
var myArr = function(o){
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
//if(!o.length) o = [ o ]; o.length=o.length;
if(!$.isArray(o)) o = [ o ]; o.length=o.length;
// here is where you can attach additional functionality, such as searching and sorting...
return o;
};
// Utility functions End
//### PARSER LIBRARY END
// Convert plain text to xml
if(typeof xml=='string') xml = $.text2xml(xml);
// Quick fail if not xml (or if this is a node)
if(!xml.nodeType) return;
if(xml.nodeType == 3 || xml.nodeType == 4) return xml.nodeValue;
// Find xml root node
var root = (xml.nodeType == 9) ? xml.documentElement : xml;
// Convert xml to json
var out = parseXML(root, true /* simple */);
// Clean-up memory
xml = null; root = null;
// Send output
return out;
},
// Convert text to XML DOM
text2xml: function(str) {
// NOTE: I'd like to use jQuery for this, but jQuery makes all tags uppercase
//return $(xml)[0];
/* prior to jquery 1.9 */
/*
var out;
try{
var xml = ((!$.support.opacity && !$.support.style))?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();
xml.async = false;
}catch(e){ throw new Error("XML Parser could not be instantiated") };
try{
if((!$.support.opacity && !$.support.style)) out = (xml.loadXML(str))?xml:false;
else out = xml.parseFromString(str, "text/xml");
}catch(e){ throw new Error("Error parsing XML string") };
return out;
*/
/* jquery 1.9+ */
return $.parseXML(str);
}
}); // extend $
})(jQuery);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(){var a,b,c,d;!function(){var e={},f={};a=function(a,b,c){e[a]={deps:b,callback:c}},d=c=b=function(a){function c(b){if("."!==b.charAt(0))return b;for(var c=b.split("/"),d=a.split("/").slice(0,-1),e=0,f=c.length;f>e;e++){var g=c[e];if(".."===g)d.pop();else{if("."===g)continue;d.push(g)}}return d.join("/")}if(d._eak_seen=e,f[a])return f[a];if(f[a]={},!e[a])throw new Error("Could not find module "+a);for(var g,h=e[a],i=h.deps,j=h.callback,k=[],l=0,m=i.length;m>l;l++)"exports"===i[l]?k.push(g={}):k.push(b(c(i[l])));var n=j.apply(this,k);return f[a]=g||n}}(),a("promise/all",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){f(a,b)}}function f(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&e(g.then)?g.then(d(j),c):f(j,g)})}var d=a.isArray,e=a.isFunction;b.all=c}),a("promise/asap",["exports"],function(a){"use strict";function b(){return function(){process.nextTick(e)}}function c(){var a=0,b=new i(e),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function d(){return function(){j.setTimeout(e,1)}}function e(){for(var a=0;a<k.length;a++){var b=k[a],c=b[0],d=b[1];c(d)}k=[]}function f(a,b){var c=k.push([a,b]);1===c&&g()}var g,h="undefined"!=typeof window?window:{},i=h.MutationObserver||h.WebKitMutationObserver,j="undefined"!=typeof global?global:this,k=[];g="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?b():i?c():d(),a.asap=f}),a("promise/cast",["exports"],function(a){"use strict";function b(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}a.cast=b}),a("promise/config",["exports"],function(a){"use strict";function b(a,b){return 2!==arguments.length?c[a]:(c[a]=b,void 0)}var c={instrument:!1};a.config=c,a.configure=b}),a("promise/polyfill",["./promise","./utils","exports"],function(a,b,c){"use strict";function d(){var a="Promise"in window&&"cast"in window.Promise&&"resolve"in window.Promise&&"reject"in window.Promise&&"all"in window.Promise&&"race"in window.Promise&&function(){var a;return new window.Promise(function(b){a=b}),f(a)}();a||(window.Promise=e)}var e=a.Promise,f=b.isFunction;c.polyfill=d}),a("promise/promise",["./config","./utils","./cast","./all","./race","./resolve","./reject","./asap","exports"],function(a,b,c,d,e,f,g,h,i){"use strict";function j(a){if(!w(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof j))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],k(a,this)}function k(a,b){function c(a){p(b,a)}function d(a){r(b,a)}try{a(c,d)}catch(e){d(e)}}function l(a,b,c,d){var e,f,g,h,i=w(c);if(i)try{e=c(d),g=!0}catch(j){h=!0,f=j}else e=d,g=!0;o(b,e)||(i&&g?p(b,e):h?r(b,f):a===F?p(b,e):a===G&&r(b,e))}function m(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+F]=c,e[f+G]=d}function n(a,b){for(var c,d,e=a._subscribers,f=a._detail,g=0;g<e.length;g+=3)c=e[g],d=e[g+b],l(b,c,d,f);a._subscribers=null}function o(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(v(b)&&(d=b.then,w(d)))return d.call(b,function(d){return c?!0:(c=!0,b!==d?p(a,d):q(a,d),void 0)},function(b){return c?!0:(c=!0,r(a,b),void 0)}),!0}catch(e){return c?!0:(r(a,e),!0)}return!1}function p(a,b){a===b?q(a,b):o(a,b)||q(a,b)}function q(a,b){a._state===D&&(a._state=E,a._detail=b,u.async(s,a))}function r(a,b){a._state===D&&(a._state=E,a._detail=b,u.async(t,a))}function s(a){n(a,a._state=F)}function t(a){n(a,a._state=G)}var u=a.config,v=(a.configure,b.objectOrFunction),w=b.isFunction,x=(b.now,c.cast),y=d.all,z=e.race,A=f.resolve,B=g.reject,C=h.asap;u.async=C;var D=void 0,E=0,F=1,G=2;j.prototype={constructor:j,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;u.async(function(){l(c._state,d,e[c._state-1],c._detail)})}else m(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},j.all=y,j.cast=x,j.race=z,j.resolve=A,j.reject=B,i.Promise=j}),a("promise/race",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var d=a.isArray;b.race=c}),a("promise/reject",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b,c){c(a)})}a.reject=b}),a("promise/resolve",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b){b(a)})}a.resolve=b}),a("promise/utils",["exports"],function(a){"use strict";function b(a){return c(a)||"object"==typeof a&&null!==a}function c(a){return"function"==typeof a}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}var e=Date.now||function(){return(new Date).getTime()};a.objectOrFunction=b,a.isFunction=c,a.isArray=d,a.now=e}),b("promise/polyfill").polyfill()}();
\ No newline at end of file
/*
Copyright (c) 2012 Gildas Lormeau. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function(obj) {
var ERR_BAD_FORMAT = "File format is not recognized.";
var ERR_ENCRYPTED = "File contains encrypted entry.";
var ERR_ZIP64 = "File is using Zip64 (4gb+ file size).";
var ERR_READ = "Error while reading zip file.";
var ERR_WRITE = "Error while writing zip file.";
var ERR_WRITE_DATA = "Error while writing file data.";
var ERR_READ_DATA = "Error while reading file data.";
var ERR_DUPLICATED_NAME = "File already exists.";
var ERR_HTTP_RANGE = "HTTP Range not supported.";
var CHUNK_SIZE = 512 * 1024;
var INFLATE_JS = "inflate.js";
var DEFLATE_JS = "deflate.js";
var appendABViewSupported;
try {
appendABViewSupported = new Blob([ getDataHelper(0).view ]).size == 0;
} catch (e) {
}
function Crc32() {
var crc = -1, that = this;
that.append = function(data) {
var offset, table = that.table;
for (offset = 0; offset < data.length; offset++)
crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];
};
that.get = function() {
return ~crc;
};
}
Crc32.prototype.table = (function() {
var i, j, t, table = [];
for (i = 0; i < 256; i++) {
t = i;
for (j = 0; j < 8; j++)
if (t & 1)
t = (t >>> 1) ^ 0xEDB88320;
else
t = t >>> 1;
table[i] = t;
}
return table;
})();
function blobSlice(blob, index, length) {
if (blob.slice)
return blob.slice(index, index + length);
else if (blob.webkitSlice)
return blob.webkitSlice(index, index + length);
else if (blob.mozSlice)
return blob.mozSlice(index, index + length);
else if (blob.msSlice)
return blob.msSlice(index, index + length);
}
function getDataHelper(byteLength, bytes) {
var dataBuffer, dataArray;
dataBuffer = new ArrayBuffer(byteLength);
dataArray = new Uint8Array(dataBuffer);
if (bytes)
dataArray.set(bytes, 0);
return {
buffer : dataBuffer,
array : dataArray,
view : new DataView(dataBuffer)
};
}
// Readers
function Reader() {
}
function TextReader(text) {
var that = this, blobReader;
function init(callback, onerror) {
var blob = new Blob([ text ], {
type : "text/plain"
});
blobReader = new BlobReader(blob);
blobReader.init(function() {
that.size = blobReader.size;
callback();
}, onerror);
}
function readUint8Array(index, length, callback, onerror) {
blobReader.readUint8Array(index, length, callback, onerror);
}
that.size = 0;
that.init = init;
that.readUint8Array = readUint8Array;
}
TextReader.prototype = new Reader();
TextReader.prototype.constructor = TextReader;
function Data64URIReader(dataURI) {
var that = this, dataStart;
function init(callback) {
var dataEnd = dataURI.length;
while (dataURI.charAt(dataEnd - 1) == "=")
dataEnd--;
dataStart = dataURI.indexOf(",") + 1;
that.size = Math.floor((dataEnd - dataStart) * 0.75);
callback();
}
function readUint8Array(index, length, callback) {
var i, data = getDataHelper(length);
var start = Math.floor(index / 3) * 4;
var end = Math.ceil((index + length) / 3) * 4;
var bytes = obj.atob(dataURI.substring(start + dataStart, end + dataStart));
var delta = index - Math.floor(start / 4) * 3;
for (i = delta; i < delta + length; i++)
data.array[i - delta] = bytes.charCodeAt(i);
callback(data.array);
}
that.size = 0;
that.init = init;
that.readUint8Array = readUint8Array;
}
Data64URIReader.prototype = new Reader();
Data64URIReader.prototype.constructor = Data64URIReader;
function BlobReader(blob) {
var that = this;
function init(callback) {
this.size = blob.size;
callback();
}
function readUint8Array(index, length, callback, onerror) {
var reader = new FileReader();
reader.onload = function(e) {
callback(new Uint8Array(e.target.result));
};
reader.onerror = onerror;
reader.readAsArrayBuffer(blobSlice(blob, index, length));
}
that.size = 0;
that.init = init;
that.readUint8Array = readUint8Array;
}
BlobReader.prototype = new Reader();
BlobReader.prototype.constructor = BlobReader;
function HttpReader(url) {
var that = this;
function getData(callback, onerror) {
var request;
if (!that.data) {
request = new XMLHttpRequest();
request.addEventListener("load", function() {
if (!that.size)
that.size = Number(request.getResponseHeader("Content-Length"));
that.data = new Uint8Array(request.response);
callback();
}, false);
request.addEventListener("error", onerror, false);
request.open("GET", url);
request.responseType = "arraybuffer";
request.send();
} else
callback();
}
function init(callback, onerror) {
var request = new XMLHttpRequest();
request.addEventListener("load", function() {
that.size = Number(request.getResponseHeader("Content-Length"));
callback();
}, false);
request.addEventListener("error", onerror, false);
request.open("HEAD", url);
request.send();
}
function readUint8Array(index, length, callback, onerror) {
getData(function() {
callback(new Uint8Array(that.data.subarray(index, index + length)));
}, onerror);
}
that.size = 0;
that.init = init;
that.readUint8Array = readUint8Array;
}
HttpReader.prototype = new Reader();
HttpReader.prototype.constructor = HttpReader;
function HttpRangeReader(url) {
var that = this;
function init(callback, onerror) {
var request = new XMLHttpRequest();
request.addEventListener("load", function() {
that.size = Number(request.getResponseHeader("Content-Length"));
if (request.getResponseHeader("Accept-Ranges") == "bytes")
callback();
else
onerror(ERR_HTTP_RANGE);
}, false);
request.addEventListener("error", onerror, false);
request.open("HEAD", url);
request.send();
}
function readArrayBuffer(index, length, callback, onerror) {
var request = new XMLHttpRequest();
request.open("GET", url);
request.responseType = "arraybuffer";
request.setRequestHeader("Range", "bytes=" + index + "-" + (index + length - 1));
request.addEventListener("load", function() {
callback(request.response);
}, false);
request.addEventListener("error", onerror, false);
request.send();
}
function readUint8Array(index, length, callback, onerror) {
readArrayBuffer(index, length, function(arraybuffer) {
callback(new Uint8Array(arraybuffer));
}, onerror);
}
that.size = 0;
that.init = init;
that.readUint8Array = readUint8Array;
}
HttpRangeReader.prototype = new Reader();
HttpRangeReader.prototype.constructor = HttpRangeReader;
// Writers
function Writer() {
}
Writer.prototype.getData = function(callback) {
callback(this.data);
};
function TextWriter() {
var that = this, blob;
function init(callback) {
blob = new Blob([], {
type : "text/plain"
});
callback();
}
function writeUint8Array(array, callback) {
blob = new Blob([ blob, appendABViewSupported ? array : array.buffer ], {
type : "text/plain"
});
callback();
}
function getData(callback, onerror) {
var reader = new FileReader();
reader.onload = function(e) {
callback(e.target.result);
};
reader.onerror = onerror;
reader.readAsText(blob);
}
that.init = init;
that.writeUint8Array = writeUint8Array;
that.getData = getData;
}
TextWriter.prototype = new Writer();
TextWriter.prototype.constructor = TextWriter;
function Data64URIWriter(contentType) {
var that = this, data = "", pending = "";
function init(callback) {
data += "data:" + (contentType || "") + ";base64,";
callback();
}
function writeUint8Array(array, callback) {
var i, delta = pending.length, dataString = pending;
pending = "";
for (i = 0; i < (Math.floor((delta + array.length) / 3) * 3) - delta; i++)
dataString += String.fromCharCode(array[i]);
for (; i < array.length; i++)
pending += String.fromCharCode(array[i]);
if (dataString.length > 2)
data += obj.btoa(dataString);
else
pending = dataString;
callback();
}
function getData(callback) {
callback(data + obj.btoa(pending));
}
that.init = init;
that.writeUint8Array = writeUint8Array;
that.getData = getData;
}
Data64URIWriter.prototype = new Writer();
Data64URIWriter.prototype.constructor = Data64URIWriter;
function FileWriter(fileEntry, contentType) {
var writer, that = this;
function init(callback, onerror) {
fileEntry.createWriter(function(fileWriter) {
writer = fileWriter;
callback();
}, onerror);
}
function writeUint8Array(array, callback, onerror) {
var blob = new Blob([ appendABViewSupported ? array : array.buffer ], {
type : contentType
});
writer.onwrite = function() {
writer.onwrite = null;
callback();
};
writer.onerror = onerror;
writer.write(blob);
}
function getData(callback) {
fileEntry.file(callback);
}
that.init = init;
that.writeUint8Array = writeUint8Array;
that.getData = getData;
}
FileWriter.prototype = new Writer();
FileWriter.prototype.constructor = FileWriter;
function BlobWriter(contentType) {
var blob, that = this;
function init(callback) {
blob = new Blob([], {
type : contentType
});
callback();
}
function writeUint8Array(array, callback) {
blob = new Blob([ blob, appendABViewSupported ? array : array.buffer ], {
type : contentType
});
callback();
}
function getData(callback) {
callback(blob);
}
that.init = init;
that.writeUint8Array = writeUint8Array;
that.getData = getData;
}
BlobWriter.prototype = new Writer();
BlobWriter.prototype.constructor = BlobWriter;
// inflate/deflate core functions
function launchWorkerProcess(worker, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
var chunkIndex = 0, index, outputSize;
function onflush() {
worker.removeEventListener("message", onmessage, false);
onend(outputSize);
}
function onmessage(event) {
var message = event.data, data = message.data;
if (message.onappend) {
outputSize += data.length;
writer.writeUint8Array(data, function() {
onappend(false, data);
step();
}, onwriteerror);
}
if (message.onflush)
if (data) {
outputSize += data.length;
writer.writeUint8Array(data, function() {
onappend(false, data);
onflush();
}, onwriteerror);
} else
onflush();
if (message.progress && onprogress)
onprogress(index + message.current, size);
}
function step() {
index = chunkIndex * CHUNK_SIZE;
if (index < size)
reader.readUint8Array(offset + index, Math.min(CHUNK_SIZE, size - index), function(array) {
worker.postMessage({
append : true,
data : array
});
chunkIndex++;
if (onprogress)
onprogress(index, size);
onappend(true, array);
}, onreaderror);
else
worker.postMessage({
flush : true
});
}
outputSize = 0;
worker.addEventListener("message", onmessage, false);
step();
}
function launchProcess(process, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
var chunkIndex = 0, index, outputSize = 0;
function step() {
var outputData;
index = chunkIndex * CHUNK_SIZE;
if (index < size)
reader.readUint8Array(offset + index, Math.min(CHUNK_SIZE, size - index), function(inputData) {
var outputData = process.append(inputData, function() {
if (onprogress)
onprogress(offset + index, size);
});
outputSize += outputData.length;
onappend(true, inputData);
writer.writeUint8Array(outputData, function() {
onappend(false, outputData);
chunkIndex++;
setTimeout(step, 1);
}, onwriteerror);
if (onprogress)
onprogress(index, size);
}, onreaderror);
else {
outputData = process.flush();
if (outputData) {
outputSize += outputData.length;
writer.writeUint8Array(outputData, function() {
onappend(false, outputData);
onend(outputSize);
}, onwriteerror);
} else
onend(outputSize);
}
}
step();
}
function inflate(reader, writer, offset, size, computeCrc32, onend, onprogress, onreaderror, onwriteerror) {
var worker, crc32 = new Crc32();
function oninflateappend(sending, array) {
if (computeCrc32 && !sending)
crc32.append(array);
}
function oninflateend(outputSize) {
onend(outputSize, crc32.get());
}
if (obj.zip.useWebWorkers) {
worker = new Worker(obj.zip.inflateJSPath || INFLATE_JS);//INFLATE_JS
launchWorkerProcess(worker, reader, writer, offset, size, oninflateappend, onprogress, oninflateend, onreaderror, onwriteerror);
} else
launchProcess(new obj.zip.Inflater(), reader, writer, offset, size, oninflateappend, onprogress, oninflateend, onreaderror, onwriteerror);
return worker;
}
function deflate(reader, writer, level, onend, onprogress, onreaderror, onwriteerror) {
var worker, crc32 = new Crc32();
function ondeflateappend(sending, array) {
if (sending)
crc32.append(array);
}
function ondeflateend(outputSize) {
onend(outputSize, crc32.get());
}
function onmessage() {
worker.removeEventListener("message", onmessage, false);
launchWorkerProcess(worker, reader, writer, 0, reader.size, ondeflateappend, onprogress, ondeflateend, onreaderror, onwriteerror);
}
if (obj.zip.useWebWorkers) {
worker = new Worker(obj.zip.workerScriptsPath + DEFLATE_JS);
worker.addEventListener("message", onmessage, false);
worker.postMessage({
init : true,
level : level
});
} else
launchProcess(new obj.zip.Deflater(), reader, writer, 0, reader.size, ondeflateappend, onprogress, ondeflateend, onreaderror, onwriteerror);
return worker;
}
function copy(reader, writer, offset, size, computeCrc32, onend, onprogress, onreaderror, onwriteerror) {
var chunkIndex = 0, crc32 = new Crc32();
function step() {
var index = chunkIndex * CHUNK_SIZE;
if (index < size)
reader.readUint8Array(offset + index, Math.min(CHUNK_SIZE, size - index), function(array) {
if (computeCrc32)
crc32.append(array);
if (onprogress)
onprogress(index, size, array);
writer.writeUint8Array(array, function() {
chunkIndex++;
step();
}, onwriteerror);
}, onreaderror);
else
onend(size, crc32.get());
}
step();
}
// ZipReader
function decodeASCII(str) {
var i, out = "", charCode, extendedASCII = [ '\u00C7', '\u00FC', '\u00E9', '\u00E2', '\u00E4', '\u00E0', '\u00E5', '\u00E7', '\u00EA', '\u00EB',
'\u00E8', '\u00EF', '\u00EE', '\u00EC', '\u00C4', '\u00C5', '\u00C9', '\u00E6', '\u00C6', '\u00F4', '\u00F6', '\u00F2', '\u00FB', '\u00F9',
'\u00FF', '\u00D6', '\u00DC', '\u00F8', '\u00A3', '\u00D8', '\u00D7', '\u0192', '\u00E1', '\u00ED', '\u00F3', '\u00FA', '\u00F1', '\u00D1',
'\u00AA', '\u00BA', '\u00BF', '\u00AE', '\u00AC', '\u00BD', '\u00BC', '\u00A1', '\u00AB', '\u00BB', '_', '_', '_', '\u00A6', '\u00A6',
'\u00C1', '\u00C2', '\u00C0', '\u00A9', '\u00A6', '\u00A6', '+', '+', '\u00A2', '\u00A5', '+', '+', '-', '-', '+', '-', '+', '\u00E3',
'\u00C3', '+', '+', '-', '-', '\u00A6', '-', '+', '\u00A4', '\u00F0', '\u00D0', '\u00CA', '\u00CB', '\u00C8', 'i', '\u00CD', '\u00CE',
'\u00CF', '+', '+', '_', '_', '\u00A6', '\u00CC', '_', '\u00D3', '\u00DF', '\u00D4', '\u00D2', '\u00F5', '\u00D5', '\u00B5', '\u00FE',
'\u00DE', '\u00DA', '\u00DB', '\u00D9', '\u00FD', '\u00DD', '\u00AF', '\u00B4', '\u00AD', '\u00B1', '_', '\u00BE', '\u00B6', '\u00A7',
'\u00F7', '\u00B8', '\u00B0', '\u00A8', '\u00B7', '\u00B9', '\u00B3', '\u00B2', '_', ' ' ];
for (i = 0; i < str.length; i++) {
charCode = str.charCodeAt(i) & 0xFF;
if (charCode > 127)
out += extendedASCII[charCode - 128];
else
out += String.fromCharCode(charCode);
}
return out;
}
function decodeUTF8(str_data) {
var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0;
str_data += '';
while (i < str_data.length) {
c1 = str_data.charCodeAt(i);
if (c1 < 128) {
tmp_arr[ac++] = String.fromCharCode(c1);
i++;
} else if (c1 > 191 && c1 < 224) {
c2 = str_data.charCodeAt(i + 1);
tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
i += 2;
} else {
c2 = str_data.charCodeAt(i + 1);
c3 = str_data.charCodeAt(i + 2);
tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return tmp_arr.join('');
}
function getString(bytes) {
var i, str = "";
for (i = 0; i < bytes.length; i++)
str += String.fromCharCode(bytes[i]);
return str;
}
function getDate(timeRaw) {
var date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;
try {
return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5,
(time & 0x001F) * 2, 0);
} catch (e) {
}
}
function readCommonHeader(entry, data, index, centralDirectory, onerror) {
entry.version = data.view.getUint16(index, true);
entry.bitFlag = data.view.getUint16(index + 2, true);
entry.compressionMethod = data.view.getUint16(index + 4, true);
entry.lastModDateRaw = data.view.getUint32(index + 6, true);
entry.lastModDate = getDate(entry.lastModDateRaw);
if ((entry.bitFlag & 0x01) === 0x01) {
onerror(ERR_ENCRYPTED);
return;
}
if (centralDirectory || (entry.bitFlag & 0x0008) != 0x0008) {
entry.crc32 = data.view.getUint32(index + 10, true);
entry.compressedSize = data.view.getUint32(index + 14, true);
entry.uncompressedSize = data.view.getUint32(index + 18, true);
}
if (entry.compressedSize === 0xFFFFFFFF || entry.uncompressedSize === 0xFFFFFFFF) {
onerror(ERR_ZIP64);
return;
}
entry.filenameLength = data.view.getUint16(index + 22, true);
entry.extraFieldLength = data.view.getUint16(index + 24, true);
}
function createZipReader(reader, onerror) {
function Entry() {
}
Entry.prototype.getData = function(writer, onend, onprogress, checkCrc32) {
var that = this, worker;
function terminate(callback, param) {
if (worker)
worker.terminate();
worker = null;
if (callback)
callback(param);
}
function testCrc32(crc32) {
var dataCrc32 = getDataHelper(4);
dataCrc32.view.setUint32(0, crc32);
return that.crc32 == dataCrc32.view.getUint32(0);
}
function getWriterData(uncompressedSize, crc32) {
if (checkCrc32 && !testCrc32(crc32))
onreaderror();
else
writer.getData(function(data) {
terminate(onend, data);
});
}
function onreaderror() {
terminate(onerror, ERR_READ_DATA);
}
function onwriteerror() {
terminate(onerror, ERR_WRITE_DATA);
}
reader.readUint8Array(that.offset, 30, function(bytes) {
var data = getDataHelper(bytes.length, bytes), dataOffset;
if (data.view.getUint32(0) != 0x504b0304) {
onerror(ERR_BAD_FORMAT);
return;
}
readCommonHeader(that, data, 4, false, function(error) {
onerror(error);
return;
});
dataOffset = that.offset + 30 + that.filenameLength + that.extraFieldLength;
writer.init(function() {
if (that.compressionMethod === 0)
copy(reader, writer, dataOffset, that.compressedSize, checkCrc32, getWriterData, onprogress, onreaderror, onwriteerror);
else
worker = inflate(reader, writer, dataOffset, that.compressedSize, checkCrc32, getWriterData, onprogress, onreaderror, onwriteerror);
}, onwriteerror);
}, onreaderror);
};
function seekEOCDR(offset, entriesCallback) {
reader.readUint8Array(reader.size - offset, offset, function(bytes) {
var dataView = getDataHelper(bytes.length, bytes).view;
try{
if (dataView.getUint32(0) != 0x504b0506) {
seekEOCDR(offset + 1, entriesCallback);
} else {
entriesCallback(dataView);
}
}catch(e){
console.log(e);
onerror(ERR_READ);
}
}, function() {
onerror(ERR_READ);
});
}
return {
getEntries : function(callback) {
if (reader.size < 22) {
onerror(ERR_BAD_FORMAT);
return;
}
// look for End of central directory record
seekEOCDR(22, function(dataView) {
var datalength, fileslength;
datalength = dataView.getUint32(16, true);
fileslength = dataView.getUint16(8, true);
reader.readUint8Array(datalength, reader.size - datalength, function(bytes) {
var i, index = 0, entries = [], entry, filename, comment, data = getDataHelper(bytes.length, bytes);
for (i = 0; i < fileslength; i++) {
entry = new Entry();
if (data.view.getUint32(index) != 0x504b0102) {
onerror(ERR_BAD_FORMAT);
return;
}
readCommonHeader(entry, data, index + 6, true, function(error) {
onerror(error);
return;
});
entry.commentLength = data.view.getUint16(index + 32, true);
entry.directory = ((data.view.getUint8(index + 38) & 0x10) == 0x10);
entry.offset = data.view.getUint32(index + 42, true);
filename = getString(data.array.subarray(index + 46, index + 46 + entry.filenameLength));
entry.filename = ((entry.bitFlag & 0x0800) === 0x0800) ? decodeUTF8(filename) : decodeASCII(filename);
if (!entry.directory && entry.filename.charAt(entry.filename.length - 1) == "/")
entry.directory = true;
comment = getString(data.array.subarray(index + 46 + entry.filenameLength + entry.extraFieldLength, index + 46
+ entry.filenameLength + entry.extraFieldLength + entry.commentLength));
entry.comment = ((entry.bitFlag & 0x0800) === 0x0800) ? decodeUTF8(comment) : decodeASCII(comment);
entries.push(entry);
index += 46 + entry.filenameLength + entry.extraFieldLength + entry.commentLength;
}
callback(entries);
}, function() {
onerror(ERR_READ);
});
});
},
close : function(callback) {
if (callback)
callback();
}
};
}
// ZipWriter
function encodeUTF8(string) {
var n, c1, enc, utftext = [], start = 0, end = 0, stringl = string.length;
for (n = 0; n < stringl; n++) {
c1 = string.charCodeAt(n);
enc = null;
if (c1 < 128)
end++;
else if (c1 > 127 && c1 < 2048)
enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);
else
enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);
if (enc != null) {
if (end > start)
utftext += string.slice(start, end);
utftext += enc;
start = end = n + 1;
}
}
if (end > start)
utftext += string.slice(start, stringl);
return utftext;
}
function getBytes(str) {
var i, array = [];
for (i = 0; i < str.length; i++)
array.push(str.charCodeAt(i));
return array;
}
function createZipWriter(writer, onerror, dontDeflate) {
var worker, files = [], filenames = [], datalength = 0;
function terminate(callback, message) {
if (worker)
worker.terminate();
worker = null;
if (callback)
callback(message);
}
function onwriteerror() {
terminate(onerror, ERR_WRITE);
}
function onreaderror() {
terminate(onerror, ERR_READ_DATA);
}
return {
add : function(name, reader, onend, onprogress, options) {
var header, filename, date;
function writeHeader(callback) {
var data;
date = options.lastModDate || new Date();
header = getDataHelper(26);
files[name] = {
headerArray : header.array,
directory : options.directory,
filename : filename,
offset : datalength,
comment : getBytes(encodeUTF8(options.comment || ""))
};
header.view.setUint32(0, 0x14000808);
if (options.version)
header.view.setUint8(0, options.version);
if (!dontDeflate && options.level != 0 && !options.directory)
header.view.setUint16(4, 0x0800);
header.view.setUint16(6, (((date.getHours() << 6) | date.getMinutes()) << 5) | date.getSeconds() / 2, true);
header.view.setUint16(8, ((((date.getFullYear() - 1980) << 4) | (date.getMonth() + 1)) << 5) | date.getDate(), true);
header.view.setUint16(22, filename.length, true);
data = getDataHelper(30 + filename.length);
data.view.setUint32(0, 0x504b0304);
data.array.set(header.array, 4);
data.array.set(filename, 30);
datalength += data.array.length;
writer.writeUint8Array(data.array, callback, onwriteerror);
}
function writeFooter(compressedLength, crc32) {
var footer = getDataHelper(16);
datalength += compressedLength || 0;
footer.view.setUint32(0, 0x504b0708);
if (typeof crc32 != "undefined") {
header.view.setUint32(10, crc32, true);
footer.view.setUint32(4, crc32, true);
}
if (reader) {
footer.view.setUint32(8, compressedLength, true);
header.view.setUint32(14, compressedLength, true);
footer.view.setUint32(12, reader.size, true);
header.view.setUint32(18, reader.size, true);
}
writer.writeUint8Array(footer.array, function() {
datalength += 16;
terminate(onend);
}, onwriteerror);
}
function writeFile() {
options = options || {};
name = name.trim();
if (options.directory && name.charAt(name.length - 1) != "/")
name += "/";
if (files[name])
throw ERR_DUPLICATED_NAME;
filename = getBytes(encodeUTF8(name));
filenames.push(name);
writeHeader(function() {
if (reader)
if (dontDeflate || options.level == 0)
copy(reader, writer, 0, reader.size, true, writeFooter, onprogress, onreaderror, onwriteerror);
else
worker = deflate(reader, writer, options.level, writeFooter, onprogress, onreaderror, onwriteerror);
else
writeFooter();
}, onwriteerror);
}
if (reader)
reader.init(writeFile, onreaderror);
else
writeFile();
},
close : function(callback) {
var data, length = 0, index = 0;
filenames.forEach(function(name) {
var file = files[name];
length += 46 + file.filename.length + file.comment.length;
});
data = getDataHelper(length + 22);
filenames.forEach(function(name) {
var file = files[name];
data.view.setUint32(index, 0x504b0102);
data.view.setUint16(index + 4, 0x1400);
data.array.set(file.headerArray, index + 6);
data.view.setUint16(index + 32, file.comment.length, true);
if (file.directory)
data.view.setUint8(index + 38, 0x10);
data.view.setUint32(index + 42, file.offset, true);
data.array.set(file.filename, index + 46);
data.array.set(file.comment, index + 46 + file.filename.length);
index += 46 + file.filename.length + file.comment.length;
});
data.view.setUint32(index, 0x504b0506);
data.view.setUint16(index + 8, filenames.length, true);
data.view.setUint16(index + 10, filenames.length, true);
data.view.setUint32(index + 12, length, true);
data.view.setUint32(index + 16, datalength, true);
writer.writeUint8Array(data.array, function() {
terminate(function() {
writer.getData(callback);
});
}, onwriteerror);
}
};
}
obj.zip = {
Reader : Reader,
Writer : Writer,
BlobReader : BlobReader,
HttpReader : HttpReader,
HttpRangeReader : HttpRangeReader,
Data64URIReader : Data64URIReader,
TextReader : TextReader,
BlobWriter : BlobWriter,
FileWriter : FileWriter,
Data64URIWriter : Data64URIWriter,
TextWriter : TextWriter,
createReader : function(reader, callback, onerror) {
reader.init(function() {
callback(createZipReader(reader, onerror));
}, onerror);
},
createWriter : function(writer, callback, onerror, dontDeflate) {
writer.init(function() {
callback(createZipWriter(writer, onerror, dontDeflate));
}, onerror);
},
workerScriptsPath : "",
inflateJSPath:"",
useWebWorkers : true
};
})(this);
function DraftManager( minder ) {
var current = null,
localStorage = window.localStorage,
drafts,
MAX_SIZE = 15;
init();
function init() {
drafts = localStorage.getItem( 'drafts' );
drafts = drafts ? JSON.parse( drafts ) : [];
}
function store() {
localStorage.setItem( 'drafts', JSON.stringify( drafts.slice( 0, MAX_SIZE ) ) );
}
function create( path ) {
current = {
path: path || 'local/' + ( +new Date() )
};
drafts.unshift( current );
save();
}
function open( index ) {
current = drafts[ index ];
if ( !current ) return false;
// bring it first
drafts.splice( index, 1 );
drafts.unshift( current );
store();
return current;
}
function load() {
if ( current ) {
minder.importData( current.data, 'json' );
}
return current;
}
function getCurrent() {
return current;
}
function openByPath( path ) {
for ( var i = 0; i < drafts.length; i++ ) {
if ( drafts[ i ].path == path ) return open( i );
}
return false;
}
function save( path ) {
if ( !current ) {
create();
} else {
current.path = path || current.path;
current.name = minder.getMinderTitle();
var data = minder.exportData( 'json' );
current.sync = current.sync && (data == current.data);
current.data = data;
current.update = new Date();
store();
}
return current;
}
function sync() {
current.sync = true;
store();
}
function list() {
return drafts.slice( 0, 15 );
}
function remove( remove_index ) {
drafts.splice( remove_index, 1 );
store();
}
function clear() {
drafts.splice( 1 );
store();
}
return {
open: open,
openByPath: openByPath,
load: load,
save: save,
create: create,
list: list,
remove: remove,
clear: clear,
getCurrent: getCurrent,
sync: sync
};
}
\ No newline at end of file
.niceblue{color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}
.dropdown{padding-right:28px;position:relative}.dropdown:after{content:' ';display:block;position:absolute;right:10px;top:12px;width:0;height:0;border:solid;border-width:4px 5px;border-color:#333 transparent transparent transparent}
.dropdown:active:after,.dropdown.active:after{border-color:#fff transparent transparent transparent}
button{font-family:Arial,"Heiti SC","Microsoft Yahei";outline:none;display:inline-block;vertical-align:middle;padding:0 15px;height:30px;font-size:13px;line-height:30px;text-align:center;color:#000;text-decoration:none;border:none;margin-left:5px;background:none;color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}button:hover,button.hover{background:#009fff}
button:active,button.active{background:#007fcc;box-shadow:inset 0 2px 3px rgba(0,0,0,0.2)}
button[disabled]{cursor:default;background:#ccc}
.draft-menu.kmui-dropdown-menu{margin-top:24px;margin-left:1px}.draft-menu.kmui-dropdown-menu span.update-time{float:right;color:#ccc;margin-left:40px;padding-right:16px}
.draft-menu.kmui-dropdown-menu li.draft-item a{position:relative}.draft-menu.kmui-dropdown-menu li.draft-item a:before{content:' ';display:block;width:24px;height:24px;background:url(../themes/default/images/draft.png) no-repeat 0 -24px;position:absolute;left:4px;top:2px}
.draft-menu.kmui-dropdown-menu li.draft-item:hover a:before{background-position:0 -48px}
.draft-menu.kmui-dropdown-menu li.draft-item{position:relative}.draft-menu.kmui-dropdown-menu li.draft-item:hover a.delete{display:block}
.draft-menu.kmui-dropdown-menu li.draft-item a.delete{display:none;cursor:pointer;position:absolute;width:20px;height:20px;right:4px;top:4px;padding:0;background:url(../themes/default/images/close-button.png) no-repeat 0 0}.draft-menu.kmui-dropdown-menu li.draft-item a.delete:before{display:none}
.draft-menu.kmui-dropdown-menu li.draft-item a.delete:hover{background-position:0 -20px}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked{overflow:hidden;opacity:1;color:#ccc}.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked .kmui-combobox-icon{float:left;margin:5px 0;width:28px;background-position:center 0;opacity:.3}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked .kmui-combobox-item-label{display:block;margin-left:28px}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked:hover{color:#ccc}.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked:hover .kmui-combobox-icon{background-position:center 0}
.file-menu.kmui-dropdown-menu{margin-top:24px;margin-left:1px;box-shadow:0 1px 5px rgba(0,0,0,0.3)}.file-menu.kmui-dropdown-menu #save-button,.file-menu.kmui-dropdown-menu #manage-file-button{display:none}
.file-menu.kmui-dropdown-menu.logined #save-button,.file-menu.kmui-dropdown-menu.logined #manage-file-button{display:block}
.file-menu.kmui-dropdown-menu.logined #net-hint-buttom{display:none}
.user-menu.kmui-dropdown-menu{margin-top:24px;margin-left:-25px;min-width:130px;box-shadow:0 1px 5px rgba(0,0,0,0.3)}.user-menu.kmui-dropdown-menu li a{padding-left:40px}
#share-dialog{position:absolute;padding:20px;left:50%;top:40%;margin-left:-175px;margin-top:-100px;background:#fff;width:350px;box-shadow:1px 2px 16px rgba(0,0,0,0.5);display:none}#share-dialog h3{margin:0;font-size:16px;color:#666}
#share-dialog input{width:255px;height:22px;line-height:22px;padding:4px 4px 0;border:1px solid #999;vertical-align:middle;margin-right:3px;background:#eee}#share-dialog input:focus{border:1px solid #99f;outline:none}
#share-dialog p,#share-dialog #share-platform{margin:20px 0 30px}
#share-dialog #copy-share-url{display:inline-block;margin:0;width:75px;height:28px;line-height:28px;vertical-align:middle;color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}#share-dialog #copy-share-url:hover,#share-dialog #copy-share-url.hover{background:#009fff}
#share-dialog #copy-share-url:active,#share-dialog #copy-share-url.active{background:#007fcc;box-shadow:inset 0 2px 3px rgba(0,0,0,0.2)}
#share-dialog #share-platform{margin-bottom:0}
{"version":3,"file":"social.css","sources":["social.less"],"names":[],"mappings":"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"}
\ No newline at end of file
/* global Promise: true */
/**
* 百度脑图社会化功能
*
* 1. 百度账号登录
* 2. 百度云存储
* 3. 分享
* 4. 草稿箱同步
* 5. 配置文件同步
* @author techird
*/
$.extend($.fn, {
disabled: function(value) {
if (value === undefined) return !!this.attr('disabled');
if (value) {
this.attr('disabled', 'disabled');
} else {
this.removeAttr('disabled');
}
return this;
},
loading: function(text) {
if (text) {
this.disabled(true);
this.attr('origin-text', this.text());
this.text(text);
} else {
this.text(this.attr('origin-text'));
this.removeAttr('origin-text');
this.disabled(false);
}
return this;
},
text: (function() {
var originFn = $.fn.text;
return function() {
var textSpan = this.children('span.text');
if (textSpan.length) {
return originFn.apply(textSpan, arguments);
} else {
return originFn.apply(this, arguments);
}
};
})()
});
/**
* 核心业务逻辑
*/
$(function() {
// UI 元素
var $panel, $title, $menu, $user, $share_btn, $save_btn, $file_btn, $tool_btn, $file_menu, $login_btn, $user_btn, $user_menu,
$draft_btn, $draft_menu, $share_dialog, $share_url, $copy_url_btn,
// 当前文件的远端路径
remotePath = null,
// 当前登录的账户
currentAccount,
// 当前连接是否指示要加载一个分享的脑图
isShareLink,
isPathLink,
uuid = function() {
return ((+new Date() * 10000) + (Math.random() * 9999)).toString(36);
},
// 当前脑图的分享ID
shareId = uuid(),
titleSuffix = document.title || '百度脑图',
// 脑图实例
minder = window.km,
// 草稿箱实例
draftManager,
// 当前是否要检测文档内容是否变化的开关
watchingChanges = true,
notice = (function() {
return window.alert;
})(),
wordLimit = function(word, limit) {
limit = limit || 15;
return word.length > limit ? (word.substr(0, limit - 3) + '...') : word;
};
start();
function start() {
initUI();
initFrontia();
if (checkLogin()) {
return;
}
loadShare();
bindShortCuts();
bindDraft();
if (draftManager) watchChanges();
if (draftManager && !loadPath() && !isShareLink) loadDraft(0);
}
function createFileMenu() {
var menus = [{
label: '新建',
click: newFile
}, {
divider: true
}];
// 导入菜单组
var acceptFiles = [];
KityMinder.getSupportedProtocals().forEach(function(name) {
var p = KityMinder.findProtocal(name);
if (p.decode) {
acceptFiles.push(p.fileExtension);
}
});
function importUseEncoding(encoding) {
return function() {
$('<input type="file" />')
.attr('accept', acceptFiles.join(','))
.on('change', function(e) {
e = e.originalEvent;
minder.importFile(e.target.files[0], encoding);
}).click();
};
}
menus = menus.concat([{
label: '导入...',
click: importUseEncoding('utf8')
}, {
label: '以 GBK 编码导入...',
click: importUseEncoding('gbk')
}, {
divider: true
}]);
// 导出菜单组
KityMinder.getSupportedProtocals().forEach(function(name) {
var p = KityMinder.findProtocal(name);
if (p.encode) {
var text = p.fileDescription + '(' + p.fileExtension + ')';
menus.push({
label: '导出 ' + text,
click: function() {
minder.exportFile(name);
}
});
}
});
menus = menus.concat([{
divider: true,
}, {
label: '请登录',
click: login,
id: 'net-hint-buttom'
}, {
label: '保存到百度云 (Ctrl + S)',
click: save,
id: 'save-button'
}, {
divider: true
}]);
return menus;
}
// 创建 UI
function initUI() {
$panel = $('#panel');
$menu = $('<div id="menu"></div>').appendTo($panel);
$user = $('<div id="user"></div>').appendTo($panel);
$title = $('<h1 id="title"></h1>').appendTo($panel);
$file_btn = $('<button id="file-btn">文件</button>').addClass('dropdown').appendTo($menu);
$file_menu = $.kmuidropmenu({
data: createFileMenu()
})
.addClass('file-menu')
.appendTo('body');
$file_menu.kmui().attachTo($file_btn);
$save_btn = $('#save-btn').find('a');
$share_btn = $('<button id="share-btn">分享</button>').click(share).appendTo($user);
$draft_btn = $('<button id="draft-btn">草稿箱</button>').addClass('dropdown').appendTo($menu);
$draft_menu = $.kmuidropmenu().addClass('draft-menu kmui-combobox-menu').appendTo('body');
$draft_menu.kmui().attachTo($draft_btn);
$draft_menu.on('aftershow', showDraftList);
$tool_btn = $('<button id="tool-btn" title="打开/收起工具箱">工具箱</button>').appendTo($menu);
$tool_btn.click(function() {
var hide = !localStorage.hide_toolbar;
$('#kityminder div.kmui-btn-toolbar').css('display', hide ? 'none' : 'block');
if (hide) {
$tool_btn.removeClass('active');
localStorage.hide_toolbar = true;
} else {
$tool_btn.addClass('active');
delete localStorage.hide_toolbar;
}
}).click().click();
$login_btn = $('<button id="login-btn">登录</button>').appendTo($user).click(login);
$user_btn = $('<button id="user-btn">用户</button>').addClass('dropdown').appendTo($user);
$user_menu = $.kmuidropmenu({
data: [{
label: '个人中心',
click: function() {
window.open('http://i.baidu.com/', '_blank');
}
}, {
label: '管理云文件',
click: function() {
window.open('http://pan.baidu.com/disk/home#dir/path=/apps/kityminder');
},
id: 'manage-file-button'
}, {
divider: true,
}, {
label: '注销',
click: logout
}]
}).addClass('user-menu').appendTo('body').kmui().attachTo($user_btn);
$share_dialog = $('#share-dialog');
$share_url = $('#share-url');
$copy_url_btn = $('#copy-share-url');
$share_dialog.mousedown(function(e) {
e.stopPropagation();
});
$('body').delegate('#global-zeroclipboard-html-bridge', 'mousedown', function(e) {
e.stopPropagation();
});
var copyTrickTimer = 0;
$('body').on('mousedown', function(e) {
copyTrickTimer = setTimeout(function() {
$share_dialog.hide();
$share_btn.loading(false);
$copy_url_btn.loading(false);
}, 30);
});
if (window.ZeroClipboard) {
var clip = new window.ZeroClipboard($copy_url_btn, {
hoverClass: 'hover',
activeClass: 'active'
});
clip.on('dataRequested', function(client, args) {
$copy_url_btn.loading('已复制');
clearTimeout(copyTrickTimer);
});
}
}
// 初始化云平台 frontia
function initFrontia() {
var AK = 'wiE55BGOG8BkGnpPs6UNtPbb';
baidu.frontia.init(AK);
baidu.frontia.social.setLoginCallback({
success: setAccount,
error: function(error) {
notice('登录失败!');
}
});
}
// 检查 URL 是否分享连接,是则加载分享内容
function loadShare() {
var pattern = /(?:shareId|share_id)=(\w+)([&#]|$)/;
var match = pattern.exec(window.location) || pattern.exec(document.referrer);
if (!match) return;
var shareId = match[1];
$.ajax({
url: 'http://naotu.baidu.com/mongo.php',
data: {
action: 'find',
id: shareId
},
dataType: 'json',
success: function(data) {
if (data.error) {
return notice(data.error);
}
if (draftManager) {
var draft = draftManager.openByPath('share/' + shareId);
if (draft) {
draftManager.load();
} else {
draftManager.create('share/' + shareId);
minder.importData(data.shareMinder.data, 'json');
}
} else {
minder.importData(data.shareMinder.data, 'json');
}
$title.loading(false);
setRemotePath(null, false);
},
error: function() {
notice('请求分享文件失败,请重试!');
}
});
$title.loading('正在加载分享内容...');
isShareLink = true;
}
// 检查 URL 是否请求加载用户文件,是则加载
function loadPath() {
var pattern = /path=(.+?)([&#]|$)/;
// documemt.referrer 是为了支持被嵌在 iframe 里的情况
var match = pattern.exec(window.location) || pattern.exec(document.referrer);
if (!match) return;
if (!currentAccount) {
setTimeout(function() {
if (!currentAccount) return login();
setRemotePath(decodeURIComponent(match[1], true));
loadRemote();
}, 1000);
return false;
}
setRemotePath(decodeURIComponent(match[1], true));
loadRemote();
return true;
}
function setRemotePath(path, saved) {
var filename;
remotePath = path;
filename = remotePath ? getFileName(remotePath) : minder.getMinderTitle();
if (!saved) filename = '* ' + filename;
$title.text(filename)
document.title = [filename, titleSuffix].join(' - ');
}
// 检查是否在 Cookie 中登录过了
function checkLogin() {
var account = baidu.frontia.getCurrentAccount();
if (account) {
login();
return true;
}
return false;
}
// 用户点击登录按钮主动登录
function login() {
baidu.frontia.social.login({
response_type: 'token',
media_type: 'baidu',
redirect_uri: window.location.href,
client_type: 'web'
});
$login_btn.text('正在登录...').css('text-decoration', 'none');
}
function logout() {
baidu.frontia.logOutCurrentAccount();
setAccount(null);
$file_menu.removeClass('logined');
$user.removeClass('logined');
}
// 设置用户后为其初始化
function setAccount(account) {
currentAccount = account;
if (account) {
loadAvator();
loadUserFiles();
window.location.hash = '';
$user_btn.text(account.accountName);
}
$file_menu.addClass('logined');
$user.addClass('logined');
}
// 加载用户头像
function loadAvator() {
currentAccount.getDetailInfo({
success: function(user) {
$('<img />').attr({
'src': user.extra.headurl,
'width': 32,
'height': 32
}).prependTo($user_btn);
}
});
}
// 加载用户最近使用的文件
function loadUserFiles() {
if (loadUserFiles.tryCount) {
console.warn('加载用户最近使用的文件失败:第 ' + loadUserFiles.tryCount + '次');
}
if (loadUserFiles.tryCount > 3) {
notice('加载最近脑图失败!');
loadUserFiles.tryCount = 0;
}
var sto = baidu.frontia.personalStorage;
if (loadUserFiles.tryCount === 0) {
loadUserFiles.$loadingMenuItem = $file_menu.kmui().appendItem({
item: {
label: '正在加载最近脑图...',
disabled: 'disabled'
}
});
}
sto.listFile('apps/kityminder/', {
by: 'time',
success: function(result) {
if (result.list.length) {
loadUserFiles.$loadingMenuItem.remove();
addToRecentMenu(result.list.filter(function(file) {
return getFileFormat(file.path) in fileLoader;
}));
//syncPreference(result.list);
}
},
error: loadUserFiles
});
loadUserFiles.tryCount++;
}
loadUserFiles.tryCount = 0;
// 同步用户配置文件
function syncPreference(fileList) {
// frontia 接口对象引用
var sto = baidu.frontia.personalStorage;
// 配置文件在网盘的路径
var remotePreferencesPath = '/apps/kityminder/app.preferences';
// 检查是否存在线上的配置文件
var hasRemotePreferences = ~fileList.map(function(file) {
return file.path;
}).indexOf(remotePreferencesPath);
// 记录远端配置的和本地配置的版本
// - 远端配置保存在 json 内容的 version 字段中
// - 本地配置用 localStorage 来记录
var remoteVersion = 0,
localVersion = localStorage.preferencesVersion || 0;
// 远端配置和本地配置的内容
var remotePreferences, localPreferences;
// 远端有配置,下载远端配置
if (hasRemotePreferences) {
downloadPreferences();
}
// 绑定实例上配置改变的事件,配置有变需要上传
minder.on('preferenceschange', function() {
localStorage.preferencesVersion = ++localVersion;
uploadPreferences();
});
// 下载远端配置
function downloadPreferences() {
// 比较远端和本地版本
// - 远端版本较新则设置本地版本为远端版本
// - 本地版本较新则上传本地版本
function merge(remote) {
remoteVersion = remote.version;
remotePreferences = remote.preferences;
localPreferences = minder.getPreferences();
if (localVersion < remoteVersion) {
minder.resetPreferences(remotePreferences);
} else if (localVersion > remoteVersion) {
uploadPreferences();
}
}
// 下载配置的过程
// 需要先获得下载的 URL 再使用 ajax 请求内容
sto.getFileUrl(remotePreferencesPath, {
success: function(url) {
$.ajax({
url: url,
cache: false,
dataType: 'json',
success: merge,
error: function() {
notice('下载配置失败!');
}
});
}
});
}
// 上传本地配置
function uploadPreferences() {
localPreferences = minder.getPreferences();
// 上传的数据需要附带版本信息
var data = {
version: localVersion,
preferences: localPreferences
};
var text = JSON.stringify(data);
sto.uploadTextFile(text, remotePreferencesPath, {
// 文件重复选择覆盖
ondup: sto.constant.ONDUP_OVERWRITE,
success: function(savedFile) {
console && console.log('配置已上传');
},
error: function(e) {
notice('上传配置失败');
}
});
}
}
// 加载当前 remoteUrl 中制定的文件
function loadRemote() {
if (loadRemote.tryCount) {
console.warn('加载用户文件失败:第 ' + loadUserFiles.tryCount + '次');
}
// 失败重试判断
if (loadRemote.tryCount > 3) {
notice('加载脑图失败!');
loadRemote.tryCount = 0;
}
var sto = baidu.frontia.personalStorage;
$title.loading('加载“' + getFileName(remotePath) + '”...');
sto.getFileUrl(remotePath, {
success: function(url) {
// the url to download the file on cloud dist
var format = getFileFormat(remotePath);
if (format in fileLoader) {
fileLoader[format](url);
}
loadRemote.tryCount = 0;
},
error: loadRemote
});
loadRemote.tryCount++;
}
loadRemote.tryCount = 0;
function getFileFormat(fileUrl) {
return fileUrl.split('.').pop();
}
var fileLoader = {
'km': loadPlainType,
'json': loadPlainType,
'xmind': loadXMind,
'mmap': loadMindManager,
'mm': loadFreeMind
};
function loadPlainType(url) {
$.ajax({
cache: false,
url: url,
dataType: 'text',
success: function(result) {
importFile(result, 'json');
}
});
}
function loadXMind(url) {
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob";
xhr.onload = function() {
if (this.status == 200 && this.readyState) {
var blob = this.response;
importFile(blob, 'xmind');
}
};
xhr.send();
}
function loadMindManager(url) {
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob";
xhr.onload = function() {
if (this.status == 200 && this.readyState) {
var blob = this.response;
importFile(blob, 'mindmanager');
}
};
xhr.send();
}
function loadFreeMind(url) {
$.ajax({
cache: false,
url: url,
dataType: 'text',
success: function(result) {
importFile(result, 'freemind');
}
});
}
// 见文件数据导入minder
function importFile(data, format) {
watchingChanges = false;
minder.importData(data, format);
if (draftManager) {
if (!draftManager.openByPath(remotePath)) {
draftManager.create();
}
draftManager.save(remotePath);
draftManager.sync();
}
minder.execCommand('camera', minder.getRoot(), 300);
$title.loading(false).text(getFileName(remotePath));
watchingChanges = true;
}
// 添加文件到最近文件列表
function addToRecentMenu(list) {
list.splice(12);
list.forEach(function(file) {
$file_menu.kmui().appendItem({
item: {
label: getFileName(file.path),
value: file.path
},
click: openFile
});
});
}
// 从路径中抽取文件名
function getFileName(path) {
return path.split('/').pop();
}
// 点击文件菜单
function openFile(e) {
var path = $(this).data('value');
var draft = draftManager && draftManager.getCurrent();
if (draft && draft.path == path) {
if (!draft.sync && window.confirm('“' + getFileName(path) + '”在草稿箱包含未保存的更改,确定加载网盘版本覆盖草稿箱中的版本吗?')) {
setRemotePath(path, true);
loadRemote();
}
} else if (draftManager) {
draft = draftManager.openByPath(path);
setRemotePath(path, !draft || draft.sync);
if (draft) {
watchingChanges = false;
draftManager.load();
watchingChanges = true;
} else {
loadRemote();
}
} else {
setRemotePath(path, true);
loadRemote();
}
}
// 新建文件
function newFile() {
setRemotePath(null, true);
draftManager.create();
minder.importData('新建脑图', 'plain');
minder.execCommand('camera', minder.getRoot(), 300);
}
function generateRemotePath(filename) {
return '/apps/kityminder/' + filename + '.km';
}
function save() {
if (!currentAccount) return alert('请先登录!');
if (save.busy) {
return;
}
var uploadPath, filename;
// 确定上传文件名
if (!remotePath) {
filename = window.prompt('请输入文件名: ', minder.getMinderTitle().replace(/[\/\\\:\?\|\<\>\"\'\*]/g, ''));
if (!filename) return;
filename = filename.replace(/[\/\\\:\?\|\<\>\"\'\*]/g, '');
uploadPath = generateRemotePath(filename);
} else {
uploadPath = remotePath;
}
save.busy = true;
var data = minder.exportData('json');
var sto = baidu.frontia.personalStorage;
function error(reason) {
notice('保存到云盘失败,可能是网络问题导致!\n建议您将脑图以 .km 格式导出到本地!');
$title.loading(false);
clearTimeout(timeout);
save.busy = false;
}
var timeout = setTimeout(function() {
error('保存到云盘超时,可能是网络不稳定导致。');
}, 15000);
function upload() {
if (upload.tryCount) {
console.warn('保存文件失败!(第 ' + upload.tryCount + ' 次)');
}
if (upload.tryCount > 3) {
error();
upload.tryCount = 0;
return;
}
$title.loading('正在保存 “' + getFileName(uploadPath) + '” ...');
sto.uploadTextFile(data, uploadPath, {
ondup: remotePath ? sto.constant.ONDUP_OVERWRITE : sto.constant.ONDUP_NEWCOPY,
success: function(savedFile) {
if (savedFile.path) {
if (!remotePath) {
addToRecentMenu([savedFile]);
}
setRemotePath(savedFile.path, true);
if (draftManager) {
draftManager.save(remotePath);
draftManager.sync();
}
clearTimeout(timeout);
save.busy = false;
upload.tryCount = 0;
} else {
upload();
}
},
error: upload
});
upload.tryCount++;
}
upload.tryCount = 0;
upload();
}
function share() {
if ($share_btn.disabled()) {
return;
}
var baseUrl = /^(.*?)(\?|\#|$)/.exec(window.location.href)[1];
var shareUrl = baseUrl + '?shareId=' + shareId,
shareData = new baidu.frontia.Data({
shareMinder: {
id: shareId,
data: minder.exportData('json')
}
});
var shareConfig = window._bd_share_config.common,
resetShare = window._bd_share_main.init;
$share_btn.loading('正在分享...');
$.ajax({
url: 'http://naotu.baidu.com/mongo.php',
type: 'POST',
data: {
action: 'insert',
record: JSON.stringify({
shareMinder: {
id: shareId,
data: minder.exportData('json')
}
})
},
success: function(result) {
if (result.error) {
notice(result.error);
} else {
$share_dialog.show();
$share_url.val(shareUrl)[0].select();
}
$share_btn.loading(false);
},
error: function() {
notice('分享失败,可能是当前的环境不支持该操作。');
$share_btn.loading(false);
}
});
shareConfig.bdTitle = shareConfig.bdText = minder.getMinderTitle();
shareConfig.bdDesc = shareConfig.bdText = '“' + minder.getMinderTitle() + '” - 我用百度脑图制作的思维导图,快看看吧!(地址:' + shareUrl + ')';
shareConfig.bdUrl = shareUrl;
resetShare();
}
function bindShortCuts() {
$(document.body).keydown(function(e) {
var keyCode = e.keyCode || e.which;
//添加快捷键
if ((e.ctrlKey || e.metaKey)) {
switch (keyCode) {
//保存
case KM.keymap.s:
e.preventDefault();
if (e.shiftKey) {
share();
} else {
setTimeout(function() {
save();
});
}
break;
case KM.keymap.n:
e.preventDefault();
setTimeout(function() {
newFile();
});
break;
}
}
});
}
function watchChanges() {
var lastContent = minder.exportData('json');
minder.on('contentchange', function() {
if (!watchingChanges || lastContent == minder.exportData('json')) return;
var current = draftManager.save();
setRemotePath(remotePath, current.sync);
lastContent = minder.exportData('json');
});
}
function showDraftList() {
var list = draftManager.list(),
draft, $draft, index;
if (!list.length) {
draftManager.create();
list = draftManager.list();
}
$draft_menu.empty();
if (draftManager.getCurrent()) {
draft = list.shift();
$draft_menu.append('<li disabled="disabled" class="current-draft kmui-combobox-item kmui-combobox-item-disabled kmui-combobox-checked">' +
'<span class="kmui-combobox-icon"></span>' +
'<label class="kmui-combobox-item-label">' +
'<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) +
'</label>' +
'</li>');
$draft_menu.append('<li class="kmui-divider"></li>');
index = 1;
} else {
index = 0;
}
while (list.length) {
draft = list.shift();
$draft = $('<li class="draft-item">' +
'<a href="#">' + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) + '</a><a class="delete" title="删除该草稿"></a></li>');
$draft.data('draft-index', index++);
$draft.appendTo($draft_menu);
}
if (index > 1) {
$draft_menu.append('<li class="kmui-divider"></li>');
$draft_menu.append('<li class="draft-clear"><a href="#">清空草稿箱</a></li>');
}
//adjustDraftMenu();
}
function adjustDraftMenu() {
var pos = $draft_btn.offset();
pos.top -= $draft_menu.outerHeight() + 5;
$draft_menu.offset(pos);
}
function bindDraft() {
draftManager = window.draftManager;
if (!draftManager) {
if (window.DraftManager) {
draftManager = window.draftManager = new window.DraftManager(minder);
}
}
$draft_menu.delegate('a.delete', 'click', function(e) {
var $li = $(this).closest('li.draft-item');
draftManager.remove(+$li.data('draft-index'));
$li.remove();
showDraftList();
e.stopPropagation();
})
.delegate('li.draft-clear', 'click', function(e) {
if (window.confirm('确认清除草稿箱吗?')) {
draftManager.clear();
showDraftList();
}
e.stopPropagation();
})
.delegate('li.draft-item', 'click', function(e) {
loadDraft(+$(this).data('draft-index'));
});
}
function loadDraft(index) {
var draft = draftManager.open(index),
isRemote;
if (!draft) return;
isRemote = draft.path.indexOf('/apps/kityminder') === 0;
if (isRemote) {
setRemotePath(draft.path, draft.sync);
}
watchingChanges = false;
draftManager.load();
watchingChanges = true;
if (!isRemote) {
setRemotePath(null, false);
}
minder.execCommand('camera', null, 300);
}
function getFriendlyTimeSpan(t1_in_ms, t2_in_ms) {
var ms = Math.abs(t1_in_ms - t2_in_ms),
s = ms / 1000,
m = s / 60,
h = m / 60,
d = h / 24;
if (s < 60) return "刚刚";
if (m < 60) return (m | 0) + "分钟前";
if (h < 24) return (h | 0) + "小时前";
if (d <= 30) return (d | 0) + "天前";
return "很久之前";
}
window.social = {
setRemotePath: setRemotePath,
watchChanges: function(value) {
watchingChanges = value;
}
};
});
\ No newline at end of file
.niceblue {
color: white;
background: -moz-linear-gradient(top, #0099f2 0%, #4096ee 0%, #0076dd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0099f2), color-stop(0%,#4096ee), color-stop(100%,#0076dd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: linear-gradient(to bottom, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* W3C */
}
.dropdown {
padding-right: 28px;
position: relative;
&:after {
content: ' ';
display: block;
position: absolute;
right: 10px;
top: 12px;
width: 0;
height: 0;
border: solid;
border-width: 4px 5px;
border-color: #333 transparent transparent transparent;
}
&:active, &.active {
&:after {
border-color: #fff transparent transparent transparent;
}
}
}
button {
font-family: Arial, "Heiti SC", "Microsoft Yahei";
outline: none;
display: inline-block;
vertical-align: middle;
padding: 0 15px;
height: 30px;
font-size: 13px;
line-height: 30px;
text-align: center;
color: #000;
text-decoration: none;
border: none;
margin-left: 5px;
background: none;
.niceblue;
&:hover, &.hover {
background: #009fff;
}
&:active, &.active {
background: darken(#009fff, 10%);
box-shadow: inset 0 2px 3px rgba(0,0,0, .2);
}
&[disabled] {
cursor: default;
background: #ccc;
}
}
.draft-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: 1px;
span.update-time {
float: right;
color: #CCC;
margin-left: 40px;
padding-right: 16px;
}
li.draft-item a {
position: relative;
&:before {
content: ' ';
display: block;
width: 24px;
height: 24px;
background: url(../themes/default/images/draft.png) no-repeat 0 -24px;
position: absolute;
left: 4px;
top: 2px;
}
}
li.draft-item:hover a:before {
background-position: 0 -48px;
}
li.draft-item {
position: relative;
&:hover a.delete{
display: block;
}
a.delete {
display: none;
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
right: 4px;
top: 4px;
padding: 0;
background: url(../themes/default/images/close-button.png) no-repeat 0 0;
&:before {
display: none;
}
&:hover {
background-position: 0 -20px;
}
}
}
&.kmui-combobox-menu .kmui-combobox-checked {
overflow: hidden;
opacity: 1;
color: #CCC;
.kmui-combobox-icon {
float: left;
margin: 5px 0;
width: 28px;
background-position: center 0;
opacity: .3;
}
.kmui-combobox-item-label {
display: block;
margin-left: 28px;
}
&:hover {
color: #CCC;
.kmui-combobox-icon {
background-position: center 0;
}
}
}
}
.file-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: 1px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
#save-button, #manage-file-button {
display: none;
}
&.logined {
#save-button, #manage-file-button{
display: block;
}
#net-hint-buttom {
display: none;
}
}
}
.user-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: -25px;
min-width: 130px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
li a {
padding-left: 40px;
}
}
#share-dialog {
position: absolute;
padding: 20px;
left: 50%;
top: 40%;
margin-left: -175px;
margin-top: -100px;
background: white;
width: 350px;
box-shadow: 1px 2px 16px rgba(0, 0, 0, .5);
display: none;
h3 {
margin: 0;
font-size: 16px;
color: #666;
}
input {
width: 255px;
height: 22px;
line-height: 22px;
padding: 4px 4px 0;
border: 1px solid #999;
vertical-align: middle;
margin-right: 3px;
background: #EEE;
&:focus {
border: 1px solid #99f;
outline: none;
}
}
p, #share-platform {
margin: 20px 0 30px;
}
#copy-share-url {
display: inline-block;
margin: 0;
width: 75px;
height: 28px;
line-height: 28px;
vertical-align: middle;
color: white;
.niceblue;
&:hover, &.hover {
background: #009fff;
}
&:active, &.active {
background: darken(#009fff, 10%);
box-shadow: inset 0 2px 3px rgba(0,0,0, .2);
}
}
#share-platform {
margin-bottom: 0;
}
}
\ No newline at end of file
/*普通按钮*/
.kmui-btn-toolbar .kmui-btn{
position: relative;
display: inline-block;
vertical-align: middle;
*display: inline;
*zoom:1;
width:auto;
margin: 0 1px;
padding:1px;
border:none;
background: none;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon{
width: 20px;
height: 20px;
margin: 0;
padding:0;
background-repeat: no-repeat;
background-image: url(../images/icons.png);
background-image: url(../images/icons.gif) \9;
}
/*状态反射*/
.kmui-btn-toolbar .kmui-btn.kmui-hover,
.kmui-btn-toolbar .kmui-btn.kmui-active{
background-color: #d5e1f2;
border: 1px solid #a3bde3;
padding: 0;
_z-index: 1;
}
.kmui-btn-toolbar .kmui-btn.kmui-disabled{
opacity: 0.3;
filter: alpha(opacity = 30);
}
\ No newline at end of file
.kmui-btn-toolbar .kmui-btn .kmui-icon-undo {
background-position: -160px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-redo {
background-position: -100px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-bold{
background-position: 0 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-italic {
background-position: -60px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-font, .kmui-btn-toolbar .kmui-btn .kmui-icon-forecolor {
background-position: -720px 1px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-image {
background: url(../images/picture_add.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-removeimage {
background: url(../images/picture_delete.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-hand {
background: url(../images/hand.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-markers {
background: url(../images/flag.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-clock {
background: url(../images/clock.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-zoom-in {
background: url(../images/zoom_in.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-zoom-out {
background: url(../images/zoom_out.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-help {
background: url(../images/help.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-preference {
background: url(../images/setting.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-expandnode {
background: url(../images/expand.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-collapsenode {
background: url(../images/contract.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-hyperlink {
background: url(../images/link.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-unhyperlink {
background: url(../images/unlink.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-resource {
background: url(../images/resource.png) no-repeat 2px 2px;
}
\ No newline at end of file
.kmui-splitbutton-color-label {
width: 16px;
height: 3px;
position: absolute;
bottom: 2px;
left: 50%;
margin-left: -8px;
overflow: hidden;
line-height: 3px;
}
.kmui-popup .kmui-colorpicker {
margin: 10px;
font-size: 12px;
}
.kmui-colorpicker .kmui-colorpicker-topbar{
height: 27px;
width: 200px;
overflow: hidden;
}
.kmui-colorpicker .kmui-colorpicker-topbar .kmui-colorpicker-preview{
height: 20px;
border: 1px inset black;
margin-left: 1px;
width: 128px;
float: left;
}
.kmui-colorpicker .kmui-colorpicker-topbar .kmui-colorpicker-nocolor{
float: right;
margin-right: 1px;
font-size: 12px;
line-height: 14px;
height: 14px;
border: 1px solid #333;
padding: 3px 5px;
cursor: pointer;
}
.kmui-colorpicker table{
border-collapse: collapse;
border-spacing: 2px;
}
.kmui-colorpicker tr.kmui-colorpicker-firstrow{
height: 30px;
}
.kmui-colorpicker table td{
padding: 0 2px;
}
.kmui-colorpicker table td .kmui-colorpicker-colorcell{
display: block;
text-decoration: none;
color: black;
width: 14px;
height: 14px;
margin: 0;
cursor: pointer;
}
\ No newline at end of file
.kmui-btn-toolbar .kmui-combobox{
border: 1px solid transparent;
padding:0;
margin:0 2px;
line-height: 20px;
font-family: Arial, "Heiti SC", "Microsoft Yahei";
}
.kmui-combobox .kmui-button-label{
position: relative;
display: inline-block;
vertical-align: middle;
*display: inline ;
*zoom:1;
height:20px;
line-height: 20px;
padding: 2px 5px;
margin: 0;
font-size: 12px;
text-align: center;
cursor: default;
}
.kmui-combobox .kmui-button-spacing{
position: relative;
display: inline-block ;
vertical-align: middle;
*display: inline ;
*zoom:1;
height:20px;
margin: 0;
/*padding:0 3px;*/
padding: 0;
}
.kmui-combobox .kmui-caret{
position: relative;
display: inline-block ;
vertical-align: middle;
*display: inline ;
*zoom:1;
height:20px;
width: 12px;
margin: 0;
padding: 0;
background: url(../images/icons.png) -740px 2px no-repeat;
_background: url(../images/icons.gif) -740px 2px no-repeat;
padding: 2px 0;
border-left: 1px solid transparent;
}
.kmui-combobox:hover .kmui-caret {
border-left-color: #a3bde3;
}
.kmui-btn-toolbar .kmui-combobox.kmui-disabled{
opacity: 0.2;
filter: alpha(opacity = 20);
}
.kmui-combobox-menu{
position: absolute;
display: none;
list-style: none;
text-decoration: none;
margin: 0;
padding: 5px 0;
background-color: #ffffff;
font-size: 12px;
box-shadow: 0 1px 5px hsla(0, 0%, 0%, 0.3);
/* border-radius: 3px; */
min-width: 160px;
_width: 160px;
-webkit-transform: translateX(2px);
font-family: Arial, "Heiti SC", "Microsoft Yahei";
/* border-top: 3px solid hsl(224, 16%, 27%); */
}
.kmui-combobox-menu .kmui-combobox-item {
display: block;
padding: 2px 15px 2px 2px;
white-space:nowrap;
}
.kmui-combobox-menu .kmui-combobox-item:first-child:last-child {
border-radius: 2px;
}
.kmui-combobox-menu .kmui-combobox-item-label {
height: 25px;
line-height: 25px;
display: inline-block;
vertical-align: middle;
_display: inline;
_zoom: 1;
}
.kmui-combobox-menu .kmui-combobox-item:hover, .kmui-combobox-menu .kmui-combobox-stack-item:hover, .kmui-combobox-menu .kmui-combobox-item-hover {
background: #0099f2; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwOTlmMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDA5NmVlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwNzZkZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, #0099f2 0%, #4096ee 0%, #0076dd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0099f2), color-stop(0%,#4096ee), color-stop(100%,#0076dd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: linear-gradient(to bottom, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099f2', endColorstr='#0076dd',GradientType=0 ); /* IE6-8 */
color: white;
background: hsl(222, 14%, 41%);
/*border: 1px solid #a3bde3;*/
}
.kmui-combobox-menu .kmui-combobox-item .kmui-combobox-icon {
display: inline-block;
*zoom: 1;
*display: inline;
width: 30px;
height: 12px;
line-height: 12px;
vertical-align: middle;
background: url(../images/check.png) no-repeat 1000px 1000px;
}
.kmui-combobox-menu .kmui-combobox-checked .kmui-combobox-icon {
background-position: center 0;
}
.kmui-combobox-menu .kmui-combobox-checked:hover .kmui-combobox-icon {
background-position: center -12px;
}
.kmui-combobox-menu .kmui-combobox-item-separator {
min-width: 160px;
height: 1px;
line-height: 1px;
overflow: hidden;
background: #d3d3d3;
margin: 5px 0;
*margin-top: -8px;
}
/* 字体样式校正 */
.kmui-combobox-menu .kmui-combobox-item-disabled {
color: black;
opacity: 0.3;
}
.kmui-combobox-menu .kmui-combobox-item-disabled:hover {
border-color: #fff;
background: #fff;
color: black;
}
\ No newline at end of file
.kmui-modal {
position: fixed;
top: 140px;
right:10px;
background-color: #fff;
outline: 0;
/* border-radius: 5px; */
box-shadow: 3px 3px 8px rgba(0,0,0, .5);
}
.kmui-modal input[type=text] {
width: 75%;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
vertical-align: middle;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.kmui-modal input[type=text]:focus {
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}
.kmui-modal-header {
padding: 5px 10px;
border-bottom: 1px solid #eee;
cursor: move;
}
.kmui-modal-header .kmui-close {
float: right;
width:20px;
height:20px;
margin-top: 2px;
padding: 1px;
border: 0;
background: url("../images/close.png") no-repeat center center;
cursor: pointer;
}
.kmui-modal-header .kmui-close.kmui-hover {
background-color: #d5e1f2;
padding:0;
border: 1px solid #a3bde3;
}
.kmui-modal-header .kmui-title {
margin: 0;
line-height: 25px;
font-size: 20px;
}
.kmui-modal-body {
position: relative;
max-height: 400px;
font-size: 12px;
overflow-y: auto;
overflow-x: hidden;
}
.kmui-modal-footer {
float: right;
padding: 5px 15px 15px;
overflow: hidden;
}
.kmui-modal-footer .kmui-btn {
float: left;
height: 24px;
width: 96px;
margin: 0 10px;
background-color: #ffffff;
padding: 0;
border: 1px solid #ababab;
font-size: 12px;
line-height: 24px;
text-align: center;
cursor: pointer;
}
.kmui-modal-footer .kmui-btn.kmui-hover{
background-color: #d5e1f2;
border: 1px solid #a3bde3;
}
.kmui-modal-backdrop{
opacity: 0.5;
filter: alpha(opacity=50);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #c6c6c6;
}
.kmui-modal .kmui-modal-tip {
color: red;
position: absolute;
bottom: 10px;
left: 10px;
height: 30px;
line-height: 30px;
display: none;
}
\ No newline at end of file
.kmui-dropdown-menu {
position: absolute;
z-index: 99999999999;
display: none;
min-width: 160px;
padding: 5px 0;
font-size: 12px;
list-style: none;
background-color: #ffffff;
border-radius: 0;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
background-clip: padding-box;
font-family: Arial, "Heiti SC", "Microsoft Yahei";
}
.kmui-dropdown-menu.pull-right {
right: 0;
left: auto;
}
.kmui-dropdown-menu .kmui-divider {
height: 1px;
margin: 5px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.kmui-dropdown-menu .kmui-divider:first-child,
.kmui-dropdown-menu .kmui-divider:last-child {
display: none;
}
.kmui-dropdown-menu > li > a {
display: block;
padding: 2px 15px 2px 30px;
height: 25px;
line-height: 25px;
clear: both;
font-weight: normal;
color: #333333;
white-space: nowrap;
text-decoration: none;
}
.kmui-dropdown-menu > li:hover > a,
.kmui-dropdown-menu > li:focus > a {
background: #0099f2; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwOTlmMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDA5NmVlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwNzZkZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, #0099f2 0%, #4096ee 0%, #0076dd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0099f2), color-stop(0%,#4096ee), color-stop(100%,#0076dd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: hsl(222, 14%, 41%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099f2', endColorstr='#0076dd',GradientType=0 ); /* IE6-8 */
color: white;
}
.kmui-dropdown-menu > .active > a,
.kmui-dropdown-menu > .active > a:hover,
.kmui-dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
background-color: #428bca;
outline: 0;
}
.kmui-dropdown-menu > .disabled > a,
.kmui-dropdown-menu > .disabled > a:hover,
.kmui-dropdown-menu > .disabled > a:focus {
color: #999999;
}
.kmui-dropdown-menu > .disabled > a:hover,
.kmui-dropdown-menu > .disabled > a:focus {
text-decoration: none;
cursor: not-allowed;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.kmui-dropdown-menu >li > a:active, .kmui-dropdown-menu >li > a:hover {
outline: 0;
}
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-mz-filter: blur(5px);
-o-filter: blur(5px);
filter: blur(5px);
filter: url(../images/blur.svg#blur);
/* transition: all ease 0.5s; */
}
.kmui-modal.kmui-dialog-help .kmui-modal-header {
display: none;
}
.kmui-modal.kmui-dialog-help .kmui-modal-body {
position: fixed;
left: 0;
top: 85px;
right: 0;
bottom: 0;
max-height: 1000000px;
background: hsla(222, 14%, 41%, 0.8);
}
.shortcuts-opt {
margin: 0px 7px;
background-color: #fff;
font-size: 14px;
}
.shortcuts-group {
padding-right: 15px;
width: 200px;
text-shadow: none;
}
.shortcuts-thead {
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
#div1 {
display: none;
}
/*.help-container {
width: 586px;
float: left;
}*/
.shortcuts-use {
width: 160px;
font-size: 14px;
font-weight: lighter;
}
.help-header {
padding-bottom: 9px;
margin: 20px 20px 30px;
border-bottom: 1px solid #EEE;
display: none;
}
.shortcuts-table {
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0px;
float: left;
margin-left: 10px;
margin-top: 30px;
}
.shortcuts-table tr:first-child td span{
padding: 10px 0;
font-size: 18px;
display: block;
color: white;
}
.shortcuts-table td {
display: table-cell;
float: none;
margin-left: 0px;
padding-bottom: 7px;
}
.shortcuts-table td[colspan] {
text-align: center;
}
.shortcuts-table h2 {
font-size: 31.5px;
line-height: 40px;
}
.help-container {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 20px;
color: hsl(0, 100%, 100%);
text-shadow: 0 1px black;
margin: 30px;
}
.shortcuts-key {
display: inline-block;
padding: 3px 8px 5px;
font-size: 14px;
font-weight: normal;
line-height: 14px;
color: hsl(0, 0%, 43%);
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
white-space: nowrap;
vertical-align: baseline;
background-color: hsl(0, 0%, 99%);
border-radius: 3px;
/* border: 1px solid hsl(0, 0%, 60%); */
text-transform: capitalize;
box-shadow: inset 0 -2px hsl(0, 0%, 92%), inset 0 -3px hsl(0, 100%, 100%), 0 1px 2px rgba(255, 255, 255, 0.3);
}
.mac .shortcuts-key.ctrl,
.mac .shortcuts-key.shift,
.mac .shortcuts-key.alt,
.shortcuts-key.up,
.shortcuts-key.down,
.shortcuts-key.left,
.shortcuts-key.right {
text-indent: -1000px;
position: relative;
width: 9px;
}
.mac .shortcuts-key.ctrl:after,
.mac .shortcuts-key.shift:after,
.mac .shortcuts-key.alt:after,
.shortcuts-key.up:after,
.shortcuts-key.down:after,
.shortcuts-key.left:after,
.shortcuts-key.right:after {
display: block;
position: absolute;
text-align: center;
left: 5px;
top: 4px;
width: 16px;
height: 16px;
text-indent: 0;
}
.mac .shortcuts-key.ctrl:after {
content: '⌘';
}
.mac .shortcuts-key.shift:after {
content: '⇧';
}
.mac .shortcuts-key.alt:after {
content: '⌥';
}
.shortcuts-key.up:after {
content: '↑';
top: 2px;
}
.shortcuts-key.down:after {
content: '↓';
top: 2px;
}
.shortcuts-key.left:after {
content: '←';
top: 2px;
}
.shortcuts-key.right:after {
content: '→';
top: 2px;
}
div.right {
float: right;
}
\ No newline at end of file
@import "kityminder.css";
@import "button.css";
@import "buttonicon.css";
@import "splitbutton.css";
@import "combobox.css";
@import "comboboxmenu.css";
@import "dialog.css";
@import "dialogsize.css";
@import "popup.css";
@import "tab.css";
@import "tooltip.css";
@import "colorpicker.css";
@import "separator.css";
@import "markers.css";
@import "help.css";
@import "dropmenu.css";
@import "resource.dialog.css"
\ No newline at end of file
html, body, div {
margin: 0;
padding: 0;
}
html, body, #kityminder, div.kmui-editor-body {
overflow: hidden;
-moz-user-select: none;
width: 100%;
}
#content-wrapper {
overflow: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#title, #panel {
background: hsl(224, 16%, 27%);
font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei';
/* -webkit-font-smoothing: antialiased; */
}
#title {
height: 40px;
line-height: 45px;
padding: 0;
margin: 0;
padding: 0;
font-size: 14px;
color: #DBDBDB;
text-align: center;
font-weight: 300;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
white-space: nowrap;
}
#panel {
height: 40px;
overflow: visible;
padding: 0 15px;
position: relative;
border-bottom: 8px solid #5A6378;
}
#panel button {
font-size: 14px;
height: 24px;
line-height: 28px;
padding-right: 7px;
padding-left: 30px;
cursor: pointer;
color: #a3a6ae;
margin: 0 8px;
background: url(../images/menu-icons.png) no-repeat;
vertical-align: middle;
margin-top: -3px;
}
#menu, #user {
height: 40px;
line-height: 40px;
}
#menu {
float: left;
}
#panel button:hover, #panel button.active {
color: white;
box-shadow: none;
}
button.dropdown {
padding-right: 28px !important;
position: relative;
}
button.dropdown:after {
content: ' ';
display: block;
position: absolute;
right: 10px;
top: 12px;
width: 0;
height: 0;
border: solid;
border-width: 4px 5px;
border-color: #a3a6ae transparent transparent transparent;
}
button.dropdown:hover:after, button.dropdown.active:after {
border-color: #fff transparent transparent transparent;
}
#file-btn:hover, #file-btn.active {
background-position: 0 -24px;
}
button#tool-btn {
background-position: 0 -48px;
}
#tool-btn:hover, #tool-btn.active {
background-position: 0 -72px;
}
#tool-btn.active:after {
content: ' ';
display: block;
position: absolute;
top: 21px;
left: 40px;
width: 0;
height: 0;
border: solid;
border-width: 11px 11px;
border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #FFF rgba(0, 0, 0, 0);
}
#panel button#tool-btn {
padding-right: 20px;
position: relative;
overflow: visible;
}
#panel button#tool-btn.active:before {
content: ' ';
display: block;
position: absolute;
width: 12px;
height: 12px;
background: url(../images/check.png) 0 -12px;
border: none;
right: 2px;
top: 8px;
}
#user {
/* position: absolute; */
/* top: 0; */
/* right: 10px; */
float: right;
}
#user-btn, #logout-btn, #user.logined #login-btn {
display: none;
}
#user.logined #user-btn, #user.logined #logout-btn {
display: inline-block;
}
button#user-btn {
position: relative;
margin-right: 0;
}
button#user-btn, button#login-btn {
background-position: 0 -96px;
}
button#user-btn:hover, button#login-btn:hover,
button#user-btn.active, button#login-btn.active {
background-position: 0 -120px;
}
#user-btn img {
position: absolute;
left: 4px;
top: 4px;
width: 18px;
height: 18px;
/* display: none; */
}
button#logout-btn {
background: none;
margin: none;
padding-left: 0;
}
button#draft-btn {
background-position: 0 -144px;
}
button#draft-btn:hover,
button#draft-btn.active {
background-position: 0 -168px;
}
li#manage-file-button {
position: relative;
}
li#manage-file-button:before {
content: ' ';
display: block;
position: absolute;
width: 24px;
height: 24px;
left: 5px;
background: url(../images/baiducloud.png) no-repeat 3px 0;
}
li#manage-file-button:hover:before {
background-position: 3px -24px;
}
button#share-btn {
background-position: 0 -192px;
}
button#share-btn:hover {
background-position: 0 -216px;
}
#kityminder {
position: absolute;
left: 0;
top: 48px;
right: 0;
bottom: 0;
}
.km_receiver{
width:0;
height:0;
}
.km-minderNode{
cursor:default;
}
.kmui-container {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.kmui-editor-body {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.kmui-container .kmui-toolbar{
background-color: #fff;
z-index: 999;
}
.kmui-container .kmui-toolbar:after {
}
.kmui-toolbar .kmui-btn-toolbar{
padding: 5px;
border-bottom: 1px solid #f0f0f0;
}
.kmui-toolbar {
position: absolute;
left: 0;
right: 0;
top: 0;
}
.kmui-container .kmui-editor-body {
background: #fbfbfb;
/*line-height: 0;*/
overflow: hidden;
}
svg, body {
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif;
}
#about {
position: absolute;
bottom: 0;
right: 0;
height: 40px;
line-height: 40px;
background: #5d697a;
color: #eee;
font-family:Arial;
font-size: 13px;
font-weight:normal;
margin:0;
text-align: right;
padding: 0 15px 0 60px;
border-bottom: 5px solid #393F4F;
transition: all ease .3s 0.3s;
-webkit-transform: translate(100%);
-moz-transform: translate(100%);
-ms-transform: translate(100%);
-o-transform: translate(100%);
transform: translate(100%);
}
#about:hover, #about:hover #km-cat {
-webkit-transform: translate(0);
-moz-transform: translate(0);
-ms-transform: translate(0);
-o-transform: translate(0);
transform: translate(0);
}
#about a {
color: #eee;
}
#about #km-cat {
position: absolute;
left: 15px;
top: 5px;
transition: all ease 1.3s 0.3s;
-webkit-transform: translate(-60px, 0);
-moz-transform: translate(-60px, 0);
-ms-transform: translate(-60px, 0);
-o-transform: translate(-60px, 0);
transform: translate(-60px, 0);
cursor: pointer;
}
#about #cat-face {
fill: #393F4F;
}
#km-version.new-version{position:relative;padding-right:30px}
#km-version.new-version:after{content:'NEW';color:#ff0;position:absolute;top:-10px;right:-5px;display:block;background:#f00;padding:0 5px;border-radius:4px;text-shadow:none;box-shadow:-1px 1px 3px rgba(0,0,0,0.3);-webkit-transform:scale(.6);-moz-transform:scale(.6);-ms-transform:scale(.6);transform:scale(.6)}
.kmui-modal-header .kmui-title{
font-size: 14px;
}
.kmui-dialog-markers-body {
padding-bottom: 5px
}
.icon-list{
margin: 0;
padding: 0
}
.icon-list li{
padding: 5px 10px;
margin: 0;
list-style: none;
cursor: pointer;
color: #333;
font-family:Arial, "Heiti SC", "Microsoft Yahei";
}
.icon-list li:hover,.icon-list li.active{
background: #cfe0f7
}
.icon-list li span.icon{
display: inline-block;
width: 20px;
height: 20px;
vertical-align: middle;
margin-right: 10px;
}
\ No newline at end of file
.kmui-popup{
display: none;
/*background: url('../images/pop-bg.png') repeat #fff;*/
background: white;
padding: 2px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, .5);
}
.kmui-popup .kmui-popup-body{
/*border: 1px solid #bfbfbf;*/
background-color: #fff;
}
.kmui-popup .kmui-popup-caret{
width: 21px;
height: 11px;
}
.kmui-popup .kmui-popup-caret.up{
/*background:url('../images/caret.png') no-repeat 0 0;*/
}
.kmui-popup .kmui-popup-caret.down{
/*background:url('../images/caret.png') no-repeat 0 0;*/
}
.kmui-dialog-resource{width:300px}.kmui-dialog-resource .add-resource{padding:10px}.kmui-dialog-resource .add-resource input[type=text]{width:142px}
.kmui-dialog-resource .add-resource button{margin-right:0}
.kmui-dialog-resource .add-resource .global-resource{list-style:none;margin:0;padding:5px 0 0}.kmui-dialog-resource .add-resource .global-resource li{margin:0 10px 5px 0;display:inline-block;border-radius:5px}.kmui-dialog-resource .add-resource .global-resource li label{padding:4px 8px 4px 6px;display:block}
.kmui-dialog-resource .no-selected{padding:10px}
.kmui-dialog-resource {
width: 300px;
.add-resource {
padding: 10px;
input[type=text] {
width: 142px;
}
button {
margin-right: 0;
}
.global-resource {
list-style: none;
margin: 0;
padding: 5px 0 0;
li {
margin: 0 10px 5px 0;
display: inline-block;
label {
padding: 4px 8px 4px 6px;
display: block;
}
border-radius: 5px;
}
}
}
.no-selected {
padding: 10px;
}
}
\ No newline at end of file
.kmui-toolbar .kmui-separator{
width: 2px;
height: 20px;
padding: 1px 2px;
background: url(../images/icons.png) -179px 1px;
background: url(../images/icons.gif) -179px 1px \9;
display: inline-block ;
vertical-align: middle;
*display: inline ;
*zoom:1;
border:none;
}
\ No newline at end of file
.kmui-btn-toolbar .kmui-splitbutton{
position: relative;
display: inline-block ;
vertical-align: middle;
*display: inline ;
*zoom:1;
margin:0 2px;
}
.kmui-splitbutton .kmui-btn{
margin: 0;
}
.kmui-splitbutton .kmui-caret{
position: relative;
display: inline-block ;
vertical-align: middle;
*display: inline ;
*zoom:1;
width: 8px;
height: 20px;
background: url(../images/icons.png) -741px 0;
_background: url(../images/icons.gif) -741px 0;
}
.kmui-btn-toolbar .kmui-splitbutton {
border: 1px solid transparent;
}
.kmui-btn-toolbar .kmui-splitbutton .kmui-dropdown-toggle {
padding: 1px 2px;
margin-left: -1px;
border-left: 1px solid transparent;
}
.kmui-btn-toolbar .kmui-splitbutton .kmui-dropdown-toggle:hover {
border-left-color: #a3bde3;
background-color: #dbe7f8;
}
/*状态反射*/
.kmui-btn-toolbar .kmui-splitbutton.kmui-hover {
background-color: #d5e1f2;
border: 1px solid #a3bde3;
}
.kmui-btn-toolbar .kmui-splitbutton.kmui-disabled{
opacity: 0.3;
filter: alpha(opacity = 30);
}
.kmui-tab-nav {
margin: 0;
padding:0;
border-bottom: 1px solid #ddd;
list-style: none;
height:30px;
}
.kmui-tab-nav .kmui-tab-item {
float:left;
margin-bottom: -1px;
margin-top: 1px;
margin-top: 0\9;
}
.kmui-tab-nav .kmui-tab-item .kmui-tab-text{
display: block;
padding:8px 12px;
border: 1px solid transparent;
color: #0088cc;
text-decoration: none;
outline: 0;
_border:1px solid #fff ;
cursor: pointer;
}
.kmui-tab-nav .kmui-tab-item .kmui-tab-text:FOCUS {
outline: none;
}
.kmui-tab-nav .kmui-tab-item.kmui-active .kmui-tab-text{
border: 1px solid #ddd;
border-bottom-color: transparent;
background-color: #fff;
padding:8px 12px;
color: #555555;
cursor: default;
}
.kmui-tab-content .kmui-tab-pane{
padding: 1px;
position: relative;
display: none;
background-color: #fff;
clear: both;
}
.kmui-tab-content .kmui-tab-pane.kmui-active{
display: block;
}
.kmui-btn-toolbar .kmui-tooltip{
position: absolute;
padding: 5px 0;
display: none;
/*opacity: 0.8;*/
/*filter: alpha(opacity=80);*/
z-index: 99999;
}
.kmui-tooltip .kmui-tooltip-arrow{
position: absolute;
top: 0;
_top: -19px;
left: 50%;
width: 0;
height: 0;
padding: 0;
margin-left: -5px;
border-color: transparent;
border-style: dashed dashed solid dashed;
border-bottom-color: #000000;
border-width: 0 5px 5px;
background: transparent;
}
.kmui-tooltip .kmui-tooltip-inner{
padding: 6px;
color: #ffffff;
text-align: center;
text-decoration: none;
font-size: 10px;
background-color: #000000;
white-space: nowrap;
line-height: 12px;
}
\ No newline at end of file
<svg viewBox="0 0 1200 1200" width="32px" height="32px">
<g id="cat-face">
<path style="fill:#272B2D;" d="M1066.769,368.482L1119.5,80L830,131.611C760.552,97.29,682.35,77.999,599.641,77.999
c-82.424,0-160.371,19.161-229.641,53.26L81,81l50.769,289l0,0c-33.792,69.019-52.77,146.612-52.77,228.641
c0,287.542,233.099,520.642,520.642,520.642s520.642-233.099,520.642-520.642C1120.282,516.011,1101.028,437.88,1066.769,368.482z"
/>
</g>
<g id="cat-eye">
<path style="fill:#FFFFFF;" d="M920.255,371C794.746,371,693,472.746,693,598.255s101.746,227.255,227.255,227.255
s227.255-101.746,227.255-227.255S1045.765,371,920.255,371z M920,746c-80.081,0-145-64.919-145-145s64.919-145,145-145
s145,64.919,145,145S1000.081,746,920,746z"/>
<path style="fill:#FFFFFF;" d="M276.255,371C150.746,371,49,472.746,49,598.255s101.746,227.255,227.255,227.255
s227.255-101.746,227.255-227.255S401.765,371,276.255,371z M276,745c-80.081,0-145-64.919-145-145s64.919-145,145-145
s145,64.919,145,145S356.081,745,276,745z"/>
</g>
</svg>
/**
* 所有构件样式规则
**/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-widget {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
color: #000000;
line-height: 1.5;
font-size: 12px;
font-family: "ff-tisa-web-pro-1", "ff-tisa-web-pro-2", "Lucida Grande", "Hiragino Sans GB", "Hiragino Sans GB W3", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
-webkit-font-smoothing: antialiased;
outline: none;
display: inline-block;
vertical-align: top;
position: relative;
top: 0;
left: 0;
}
.fui-widget.fui-selectable {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
-webkit-user-drag: text;
}
.fui-widget * {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
.fui-widget.fui-disabled {
opacity: 0.3;
}
.fui-widget.fui-hide {
display: none !important;
}
.fui-widget.fui-mask-animate {
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
transition: all 0.2s;
}
.fui-widget.fui-mask-hint {
-webkit-transform: perspective(600px) translateZ(30px);
-moz-transform: perspective(600px) translateZ(30px);
transform: perspective(600px) translateZ(30px);
}
/**
* 容器类通用样式
**/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-container {
overflow: hidden;
position: relative;
top: 0;
left: 0;
}
.fui-container.fui-disabled {
opacity: 1;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-button-menu {
border: 1px solid white;
}
.fui-button-menu:HOVER {
border-color: #d5e1f2;
}
.fui-button-menu.fui-button-active {
border-color: #d5e1f2;
background: #d5e1f2;
}
.fui-button-menu.fui-button-active .fui-button {
background: #d5e1f2;
}
.fui-button-menu.fui-layout-top,
.fui-button-menu.fui-layout-bottom {
text-align: center;
}
.fui-button-menu.fui-layout-top .fui-open-btn,
.fui-button-menu.fui-layout-bottom .fui-open-btn {
display: block;
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-button {
overflow: hidden;
cursor: default;
font-size: 0;
}
.fui-button ._layout .fui-label {
display: block;
}
.fui-button ._layout .fui-icon {
display: block;
}
.fui-button .fui-icon {
display: inline-block;
vertical-align: middle;
}
.fui-button .fui-label {
display: inline-block;
vertical-align: middle;
}
.fui-button.fui-button-layout-top .fui-label {
display: block;
}
.fui-button.fui-button-layout-top .fui-icon {
display: block;
}
.fui-button.fui-button-layout-bottom .fui-label {
display: block;
}
.fui-button.fui-button-layout-bottom .fui-icon {
display: block;
}
.fui-button:HOVER {
background-color: #d5e1f2;
color: #000000;
}
.fui-button:ACTIVE {
background-color: #87a9da;
color: #000000;
}
.fui-button.fui-disabled:HOVER {
background-color: #ffffff;
color: #000000;
}
.fui-button.fui-disabled:ACTIVE {
background-color: #ffffff;
color: #000000;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-colorpicker {
background-color: #fff;
}
.fui-colorpicker-container {
border: 1px solid #d3d3d3;
}
.fui-colorpicker-container .fui-colorpicker-title {
background: #eee;
padding: 2px 4px;
}
.fui-colorpicker-container .fui-colorpicker-colors {
margin: 0;
padding: 0;
font-size: 0;
line-height: 0;
}
.fui-colorpicker-container .fui-colorpicker-colors-line0 {
margin-bottom: 3px;
}
.fui-colorpicker-container .fui-colorpicker-item {
display: inline-block;
margin: 0 2px;
width: 13px;
height: 13px;
border-style: solid;
border-width: 1px;
}
.fui-colorpicker-container .fui-colorpicker-commoncolor,
.fui-colorpicker-container .fui-colorpicker-standardcolor {
margin: 4px 3px;
white-space: nowrap;
}
.fui-colorpicker-container .fui-colorpicker-toolbar {
margin: 4px;
height: 27px;
}
.fui-colorpicker-container .fui-colorpicker-toolbar .fui-colorpicker-preview {
display: inline-block;
height: 25px;
line-height: 25px;
width: 120px;
border: 1px solid #d3d3d3;
}
.fui-colorpicker-container .fui-colorpicker-toolbar .fui-colorpicker-clear {
display: inline-block;
height: 25px;
line-height: 25px;
width: 60px;
border: 1px solid #d3d3d3;
font-size: 12px;
text-align: center;
position: absolute;
right: 5px;
cursor: pointer;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-dialog {
position: fixed;
top: -1000000px;
left: -100000px;
border: 1px solid #B1B1B1;
background: #fff;
}
.fui-dialog .fui-panel-content {
width: auto;
height: auto;
padding: 2px;
}
.fui-dialog .fui-dialog-caption {
margin: 0;
padding: 5px;
font-size: 16px;
font-weight: normal;
line-height: 1;
display: inline-block;
}
.fui-dialog .fui-dialog-head .fui-close-button {
float: right;
}
.fui-dialog .fui-dialog-head .fui-close-button .fui-close-button-icon {
width: 16px;
height: 16px;
background: url("images/close.png") no-repeat 0 0;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-drop-panel {
border: 1px solid #d3d3d3;
overflow: hidden;
position: relative;
}
.fui-drop-panel .fui-drop-panel-content {
display: inline-block;
}
.fui-drop-panel .fui-drop-panel-placeholder {
display: none;
}
.fui-drop-panel .fui-drop-panel-button {
border-left: 1px solid #d3d3d3;
visibility: visible;
}
.fui-drop-panel .fui-drop-panel-button:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel .fui-drop-panel-button:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel:HOVER .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel:ACTIVE .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel.fui-drop-panel-open {
overflow: visible;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-content {
border: 1px solid #d3d3d3;
position: absolute;
top: -1px;
left: -1px;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-button {
visibility: hidden;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-placeholder {
display: inline-block;
}
.fui-drop-panel-popup {
border: 1px solid #d3d3d3;
}
.fui-drop-panel-popup:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel-popup:HOVER .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel-popup:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel-popup:ACTIVE .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-icon {
text-align: center;
font-size: 0;
}
.fui-icon img {
display: inline-block;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-input-button {
border: 1px solid #ababab;
}
.fui-input-button .fui-input {
vertical-align: middle;
border: none;
}
.fui-input-button .fui-button {
vertical-align: middle;
}
.fui-input-button:HOVER {
border-color: #87a9da;
}
.fui-input-button:ACTIVE {
border-color: #87a9da;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-input {
border: 1px solid #d3d3d3;
padding: 1px;
margin: 0;
}
.fui-input:HOVER,
.fui-input:FOCUS {
border-color: #4d90fe;
}
.fui-input.fui-disabled {
border-color: #d3d3d3;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-item {
font-size: 0;
}
.fui-item .fui-icon {
vertical-align: middle;
}
.fui-item .fui-label {
vertical-align: middle;
}
.fui-item.fui-item-selected {
background: #87a9da;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-label-panel .fui-label-panel-label {
width: 100%;
color: #666;
}
.fui-label-panel.fui-no-position .fui-label-panel-label {
position: static;
}
.fui-label-panel.fui-layout-bottom .fui-label-panel-label {
position: absolute;
bottom: 0;
left: 0;
top: auto;
z-index: 2;
}
.fui-label {
cursor: default;
display: inline-block;
white-space: nowrap;
}
/**
* 通用button
*/
.fui-mask {
position: fixed;
z-index: 99998;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-menu {
background-color: #fff;
border: 1px solid #d3d3d3;
}
.fui-menu .fui-item {
padding: 2px 5px;
display: block;
}
.fui-menu .fui-item:HOVER {
background: #d5e1f2;
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-panel {
display: inline-block;
vertical-align: top;
overflow-y: auto;
overflow-x: hidden;
}
.fui-panel .fui-panel-content {
position: relative;
top: 0;
left: 0;
}
.fui-panel .fui-panel-content {
width: 100%;
height: 100%;
}
.fui-panel.fui-container-column {
font-size: 0;
}
.fui-panel.fui-container-column .fui-column {
display: block;
}
/**
* 通用button
*/
.fui-ppanel::-webkit-scrollbar {
width: 15px;
}
.fui-ppanel::-webkit-scrollbar-button:start:decrement,
.fui-ppanel::-webkit-scrollbar-button:end:decrement,
.fui-ppanel::-webkit-scrollbar-button:start:increment,
.fui-ppanel::-webkit-scrollbar-button:end:increment,
.fui-ppanel::-webkit-scrollbar-thumb {
border: 1px solid #e7e7e7;
}
.fui-ppanel.fui-ppanel-position {
position: fixed;
z-index: 99999;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-separator {
background: #6d6d6d;
}
/**
* Spin-button
*/
.fui-spin-button .fui-spin-up-btn .fui-icon,
.fui-spin-button .fui-spin-down-btn .fui-icon {
width: 16px;
height: 9px;
background: url("images/up.png") no-repeat 3px 1.5px;
}
.fui-spin-button .fui-spin-down-btn .fui-icon {
background-image: url("images/down.png");
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-tabs .fui-selected {
background-color: #d5e1f2;
}
/**
* 可切换Button (ToggleButton)
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-toggle-button.fui-button-pressed {
background-color: #aec5e6;
}
.fui-toggle-button.fui-button-pressed.fui-disabled {
background-color: #aec5e6;
}
.fui-toggle-button:HOVER {
background-color: #d5e1f2;
color: #000000;
}
.fui-toggle-button:ACTIVE {
background-color: #87a9da;
color: #000000;
}
.triangle {
content: ' ';
display: block;
width: 0;
height: 0;
padding: 0 !important;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
}
#tab-container .fui-button {
display: inline-block;
padding: 2px 5px 2px 3px;
}
#tab-container .fui-button .fui-label {
color: #5a6378;
font-size: 12px;
vertical-align: baseline;
}
#tab-container .fui-button.command-button {
margin-bottom: 3px;
}
#tab-container .fui-button.command-button .fui-icon {
width: 20px;
height: 20px;
margin-right: 3px;
display: inline-block;
vertical-align: baseline;
}
#tab-container .fui-button.command-button.large {
width: 50px;
height: 50px;
padding: 0;
}
#tab-container .fui-button.command-button.large .fui-icon {
width: 25px;
height: 25px;
margin-left: 12px;
margin-bottom: 3px;
margin-top: 4px;
}
#tab-container .fui-button.command-button.large .fui-label {
display: block;
text-align: center;
}
#tab-container .fui-button:hover {
background-color: #eff3fa;
}
#tab-container .fui-button:active {
background-color: #c4d0ee;
}
#tab-container .fui-button.fui-disabled:hover,
#tab-container .fui-button.fui-disabled:active {
background-color: transparent;
}
#tab-container .fui-button.active {
background-color: #d7e0f4;
}
.command-buttonset .fui-toggle-button:hover {
background-color: #eff3fa;
}
.fui-disabled.command-buttonset .fui-toggle-button:hover {
background-color: transparent;
}
.command-buttonset .fui-toggle-button:active {
-webkit-transform: scale(0.9);
-moz-transform: scale(0.9);
-ms-transform: scale(0.9);
-o-transform: scale(0.9);
tranform: scale(0.9);
}
.command-buttonset .fui-toggle-button:active:hover {
background-color: #c4d0ee;
}
.fui-disabled.command-buttonset .fui-toggle-button:active:hover {
background-color: transparent;
}
.command-buttonset .fui-toggle-button.fui-button-pressed {
background-color: #d7e0f4;
}
.command-inputmenu > .fui-input-button {
position: relative;
border-color: #c9ced1;
margin: 2px 0;
}
.command-inputmenu > .fui-input-button .fui-input {
width: 100px;
}
.command-inputmenu > .fui-input-button > .fui-button {
position: absolute;
left: auto;
right: 0;
top: 0;
bottom: 0;
width: 20px;
border-left: 1px solid #c9ced1;
padding: 0 !important;
}
.command-inputmenu > .fui-input-button > .fui-button .fui-icon {
position: absolute;
left: auto;
right: 6px;
top: 50%;
margin-top: -2px;
content: ' ';
display: block;
width: 0;
height: 0;
padding: 0 !important;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
border-width: 4px 4px;
border-top-color: #5a6378;
}
#tab-container .fui-drop-panel {
padding-right: 10px;
border-color: #c9ced1;
}
#tab-container .fui-drop-panel > .fui-button {
position: absolute;
display: block;
right: 1px;
left: auto;
top: 1px;
bottom: 1px;
width: 10px;
padding: 0;
}
#tab-container .fui-drop-panel > .fui-button:hover {
background: #eff3fa;
}
#tab-container .fui-drop-panel > .fui-button:active {
background: #c4d0ee;
}
#tab-container .fui-drop-panel > .fui-button > .fui-icon {
position: absolute;
content: ' ';
display: block;
width: 0;
height: 0;
padding: 0 !important;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
border-width: 4px 3px;
border-top-color: #5a6378;
top: auto;
bottom: 2px;
left: 2px;
}
.fui-drop-panel-popup {
background: white;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
padding-right: 5px;
padding-bottom: 5px;
max-width: 300px;
}
#tab-container .fui-button-menu {
border: 1px solid transparent;
width: 40px;
height: 50px;
display: inline-block;
margin-top: 5px;
}
#tab-container .fui-button-menu:hover {
border-color: #eff3fa;
}
#tab-container .fui-button-menu .fui-button:first-child {
display: block;
width: 40px;
height: 25px;
padding: 0;
}
#tab-container .fui-button-menu .fui-button:last-child {
display: block;
width: 40px;
height: 25px;
padding: 0;
}
#tab-container .fui-button-menu .fui-button:last-child .fui-label {
font-size: 12px;
}
#tab-container .fui-button-menu .fui-button:last-child .fui-icon {
content: ' ';
width: 0;
height: 0;
padding: 0 !important;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
border-width: 4px 3px;
border-top-color: #5a6378;
display: block;
position: absolute;
top: auto;
bottom: -2px;
left: 50%;
margin-left: -3px;
}
.fui-dialog {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
border: none;
}
.fui-dialog > .fui-panel-content {
padding: 0;
}
.fui-dialog .fui-dialog-head {
background-color: #393f4f;
color: white;
padding: 5px;
}
.fui-dialog .fui-dialog-head h1 {
font-size: 14px;
font-weight: normal;
}
.fui-dialog .fui-dialog-head .fui-close-button {
position: absolute;
right: 6px;
top: 7px;
left: auto;
display: block;
width: 20px;
height: 20px;
cursor: pointer;
border-radius: 100%;
}
.fui-dialog .fui-dialog-head .fui-close-button .fui-close-button-icon {
display: none;
}
.fui-dialog .fui-dialog-head .fui-close-button:hover {
background-color: #e66060;
}
.fui-dialog .fui-dialog-head .fui-close-button:active {
background-color: #e34f4f;
}
.fui-dialog .fui-dialog-head .fui-close-button:after {
content: 'x';
display: block;
width: 16px;
height: 16px;
font-family: inherit;
color: white;
font-size: 14px;
position: absolute;
left: 2px;
top: 1px;
line-height: 16px;
text-align: center;
}
.fui-dialog .fui-dialog-body {
padding: 20px;
}
.fui-dialog .fui-dialog-body p {
margin: 0;
height: 40px;
}
.fui-dialog .fui-dialog-body input[type=text],
.fui-dialog .fui-dialog-body input[type=url] {
border: 1px solid #c9ced1;
outline: none;
height: 20px;
padding: 2px 4px;
width: 300px;
}
.fui-dialog .fui-dialog-foot {
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: auto;
height: 50px;
border-top: 1px solid #c9ced1;
text-align: right;
}
.fui-dialog .fui-dialog-foot .fui-button {
width: 80px;
height: 30px;
line-height: 30px;
text-align: center;
border: 1px solid #c9ced1;
border-radius: 4px;
margin: 8px 8px 0 0;
}
.fui-dialog .fui-dialog-foot .fui-button:hover {
background: #d7dbe3;
}
.fui-dialog .fui-dialog-foot .fui-button:active {
background: #c9cdd8;
}
.fui-dialog .fui-dialog-foot .fui-button.fui-xdialog-ok-btn {
background: #393f4f;
border-color: transparent;
}
.fui-dialog .fui-dialog-foot .fui-button.fui-xdialog-ok-btn:hover {
background: #444b5e;
}
.fui-dialog .fui-dialog-foot .fui-button.fui-xdialog-ok-btn:active {
background: #333846;
}
.fui-dialog .fui-dialog-foot .fui-button.fui-xdialog-ok-btn .fui-label {
color: white;
}
.fui-dialog .fui-dialog-foot .fui-button .fui-label {
font-size: 14px;
line-height: 30px;
height: 30px;
}
.validate-error {
color: red;
border-color: red !important;
}
/**
* 基本页面样式
*/
html,
body,
div {
margin: 0;
padding: 0;
overflow: hidden;
}
body,
svg {
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif;
}
html,
body {
height: 100%;
}
#content-wrapper {
overflow: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#kityminder {
position: absolute;
left: 0;
top: 40px;
right: 0;
bottom: 0;
-moz-user-select: none;
}
#panel {
background: #3a4050;
font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei';
height: 40px;
overflow: visible;
position: relative;
}
.fui-widget {
-webkit-font-smoothing: auto;
}
#main-menu-btn {
display: block;
float: left;
height: 40px;
line-height: 40px;
padding: 0 30px 0 15px;
z-index: 11;
background-color: #ff6e6e;
}
#main-menu-btn:hover {
background-color: #ff8888 !important;
}
#main-menu-btn:active {
background-color: #ff5555 !important;
}
#main-menu-btn .fui-label {
height: 40px;
line-height: 40px;
font-size: 14px;
color: white;
}
#main-menu-btn:after {
content: ' ';
display: block;
position: absolute;
width: 0;
height: 0;
line-height: 0;
font-size: 0;
border: 6px solid;
border-color: white transparent transparent transparent;
right: 12px;
top: 16px;
}
#main-menu {
position: absolute;
background: gray;
top: 0;
left: 0;
right: 0;
opacity: 0;
-webkit-transition: opacity ease 0.2s;
-moz-transition: opacity ease 0.2s;
-ms-transition: opacity ease 0.2s;
-o-transition: opacity ease 0.2s;
transition: opacity ease 0.2s;
}
#main-menu.show {
bottom: 0;
opacity: 1;
}
.command-button.undo,
.command-button.redo {
float: left;
border: none;
width: 40px;
height: 40px;
line-height: 40px;
padding: 0;
margin: 0;
}
.command-button.undo .fui-label,
.command-button.redo .fui-label {
display: none;
}
.command-button.undo .fui-icon,
.command-button.redo .fui-icon {
display: block;
width: 40px;
height: 40px;
background: url(../images/history.png) no-repeat;
}
.command-button.undo:hover,
.command-button.redo:hover {
background: #5a6378;
}
.command-button.undo:hover .fui-icon,
.command-button.redo:hover .fui-icon {
background-position-y: -40px;
}
.command-button.undo:active,
.command-button.redo:active {
background: #444b5b;
}
.command-button.undo.fui-disabled:hover,
.command-button.redo.fui-disabled:hover,
.command-button.undo.fui-disabled:active,
.command-button.redo.fui-disabled:active {
background: none;
}
.command-button.undo.fui-disabled .fui-icon,
.command-button.redo.fui-disabled .fui-icon {
background-position-y: 0;
}
.command-button.undo {
margin-left: 10px;
}
.command-button.redo .fui-icon {
background-position-x: -40px;
}
#tab-select {
height: 40px;
line-height: 40px;
margin-left: 10px;
float: left;
}
#tab-select .fui-button {
width: 60px;
height: 40px;
line-height: 40px;
text-align: 50px;
display: inline-block;
}
#tab-select .fui-button:hover {
background: #5a6378 !important;
}
#tab-select .fui-button:active {
background: #444b5b !important;
}
#tab-select .fui-button .fui-icon {
display: none;
}
#tab-select .fui-button .fui-label {
height: 40px;
line-height: 40px;
text-align: center;
display: block;
color: #c9cbcf;
font-size: 14px;
}
#tab-select .fui-button .fui-label:hover {
background: #5a6378;
}
#tab-select .fui-button .fui-label:active {
background: #2e333e;
}
#tab-select .fui-button.fui-selected .fui-label {
color: white;
}
#tab-select .fui-button.fui-selected:after {
content: ' ';
height: 0;
line-height: 0;
font-size: 0;
display: block;
position: absolute;
border: 6px solid;
border-color: transparent transparent white transparent;
bottom: 0;
left: 50%;
margin-left: -3px;
z-index: 11;
}
#tab-select.collapsed .fui-button.fui-selected .fui-label {
color: #c9cbcf;
}
#tab-select.collapsed .fui-button.fui-selected:after {
display: none;
}
#tab-container {
position: absolute;
top: 40px;
height: 89px;
left: 0;
right: 0;
background: white;
z-index: 10;
border-bottom: 1px solid #dbdbdb;
box-shadow: 0 -3px 3px rgba(0, 0, 0, 0.05);
/* 每一个 Tab 面板 */
-webkit-transition: all 0.15s ease;
-moz-transition: all 0.15s ease;
-ms-transition: all 0.15s ease;
-o-transition: all 0.15s ease;
transition: all 0.15s ease;
}
#tab-container > .fui-panel {
display: block;
height: 100%;
/* 每一个小节 */
}
#tab-container > .fui-panel > .fui-panel-content > .fui-panel {
height: 100%;
padding: 0 5px;
border-right: 1px dashed #eee;
}
#tab-container > .fui-panel > .fui-panel-content > .fui-panel > .fui-panel-content > .fui-label {
text-align: center;
display: block;
width: 100%;
padding: 1px 0;
position: absolute;
bottom: 0;
top: auto;
}
#tab-container > .fui-panel > .fui-panel-content > .fui-panel > .fui-panel-content > .fui-label-panel-content {
padding: 5px;
}
#tab-container.collapsed {
opacity: 0;
height: 0;
}
#tab-container .command-buttonset.priority {
width: 140px;
}
#tab-container .command-buttonset.priority .fui-button {
width: 20px;
height: 20px;
margin: 1px;
padding: 3px;
border-radius: 4px;
}
#tab-container .command-buttonset.priority .fui-button .fui-label {
display: none;
}
#tab-container .command-buttonset.priority .fui-button .fui-icon {
display: block;
height: 20px;
width: 20px;
background: url(../images/iconpriority.png) repeat-x;
background-color: transparent;
}
#tab-container .command-buttonset.priority .fui-button.priority-0 .fui-icon {
background-position: 20px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-1 .fui-icon {
background-position: 0px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-2 .fui-icon {
background-position: -20px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-3 .fui-icon {
background-position: -40px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-4 .fui-icon {
background-position: -60px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-5 .fui-icon {
background-position: -80px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-6 .fui-icon {
background-position: -100px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-7 .fui-icon {
background-position: -120px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-8 .fui-icon {
background-position: -140px 0;
}
#tab-container .command-buttonset.priority .fui-button.priority-9 .fui-icon {
background-position: -160px 0;
}
#tab-container .command-buttonset.priority .fui-button.fui-button-pressed {
background-color: #c4d0ee;
}
#tab-container .command-buttonset.progress {
width: 140px;
}
#tab-container .command-buttonset.progress .fui-button {
width: 20px;
height: 20px;
margin: 1px;
padding: 3px;
border-radius: 4px;
}
#tab-container .command-buttonset.progress .fui-button .fui-label {
display: none;
}
#tab-container .command-buttonset.progress .fui-button .fui-icon {
display: block;
height: 20px;
width: 20px;
background: url(../images/iconprogress.png) repeat-x;
background-color: transparent;
}
#tab-container .command-buttonset.progress .fui-button.progress-0 .fui-icon {
background-position: 20px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-1 .fui-icon {
background-position: 0px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-2 .fui-icon {
background-position: -20px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-3 .fui-icon {
background-position: -40px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-4 .fui-icon {
background-position: -60px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-5 .fui-icon {
background-position: -80px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-6 .fui-icon {
background-position: -100px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-7 .fui-icon {
background-position: -120px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-8 .fui-icon {
background-position: -140px 0;
}
#tab-container .command-buttonset.progress .fui-button.progress-9 .fui-icon {
background-position: -160px 0;
}
#tab-container .command-buttonset.progress .fui-button.fui-button-pressed {
background-color: #c4d0ee;
}
#resource-panel > .fui-panel-content > .fui-label-panel-content {
position: relative;
}
#resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-input {
width: 148px;
margin: 5px 0 0;
vertical-align: middle;
}
#resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-button {
left: auto;
right: 6px;
top: 11px;
padding: 1px 3px;
vertical-align: middle;
position: absolute;
}
#resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-drop-panel {
display: block;
height: 30px;
margin-top: -1px;
width: 140px;
}
#image-button-menu .fui-button:first-child {
background-image: url(../images/icons.png);
background-position: center -125px;
background-repeat: no-repeat;
}
#link-button-menu .fui-button:first-child {
background-image: url(../images/icons.png);
background-position: center -100px;
background-repeat: no-repeat;
}
ul.resource-list {
margin: 0;
padding: 0;
list-style: none;
}
ul.resource-list li {
display: inline-block;
padding: 1px 2px;
border-radius: 4px;
margin: 5px 0px 5px 5px;
}
#template-panel > .fui-panel-content > .fui-label-panel-content > .fui-drop-panel {
width: 65px;
height: 50px;
}
#theme-panel > .fui-panel-content > .fui-label-panel-content > .fui-drop-panel {
width: 90px;
height: 50px;
}
#layout-panel > .fui-panel-content > .fui-label-panel-content > .fui-drop-panel {
width: 65px;
height: 50px;
margin-right: 10px;
}
.fui-button.template {
width: 50px;
height: 40px;
padding: 0 2px !important;
margin: 5px 0 0 5px !important;
}
.fui-button.template .fui-label {
display: none;
}
.fui-button.template .fui-icon {
display: block;
width: 50px;
height: 40px;
background-image: url(../images/template.png);
background-repeat: no-repeat;
}
.fui-button.template.default .fui-icon {
background-position: 0 0;
}
.fui-button.template.structure .fui-icon {
background-position: -50px 0;
}
.fui-button.template.filetree .fui-icon {
background-position: -100px 0;
}
.fui-button.theme {
padding: 5px !important;
margin: 5px 0 0 5px !important;
}
.fui-button.theme .fui-label {
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
padding: 0 5px;
}
.fui-button.layout {
width: 50px;
height: 40px;
padding: 0 2px !important;
margin: 5px 0 0 5px !important;
}
.fui-button.layout .fui-label {
display: none;
}
.fui-button.layout .fui-icon {
display: block;
width: 50px;
height: 40px;
background-image: url(../images/layout.png);
background-repeat: no-repeat;
}
.fui-button.layout.default .fui-icon {
background-position: 0 0;
}
.fui-button.layout.bottom .fui-icon {
background-position: -100px 0;
}
.fui-button.layout.filetree .fui-icon {
background-position: -200px 0;
}
#font-panel .command-button {
padding: 0;
width: 20px;
height: 20px;
border: 1px solid transparent;
background: transparent;
border-radius: 11px;
margin-left: 5px;
margin-top: 2px;
margin-bottom: 2px !important;
}
#font-panel .command-button.active {
border: 1px solid #ccd0d3;
background: #fafcff;
}
#font-panel .command-button:hover {
border: 1px solid #ccd0d3;
background: #fff;
}
#font-panel .command-button:active {
background: #e1edff;
}
#font-panel .command-button .fui-label {
display: none;
}
.command-buttonset.color-picker {
width: 100px;
}
.command-buttonset.color-picker .fui-toggle-button {
margin: 3px 3px 0 0 !important;
padding: 2px !important;
border-radius: 100%;
border: 1px solid #efefef;
background: transparent;
}
.command-buttonset.color-picker .fui-toggle-button.fui-button-pressed {
border: 1px solid #c4d0ee;
background: #fafcff;
}
.command-buttonset.color-picker .fui-toggle-button:hover {
border: 1px solid #ccd0d3;
background: #fff;
}
.command-buttonset.color-picker .fui-toggle-button .fui-label {
display: none;
}
.command-buttonset.color-picker .fui-toggle-button .fui-icon {
width: 16px;
height: 16px;
border-radius: 100%;
}
/**
* 页面下方 “关于” 面板的样式
*/
#about {
position: absolute;
bottom: 0;
right: 0;
height: 40px;
line-height: 40px;
background: #5d697a;
color: #eee;
font-family: Arial;
font-size: 13px;
font-weight: normal;
margin: 0;
text-align: right;
padding: 0 15px 0 60px;
border-bottom: 5px solid #393F4F;
overflow: visible;
-webkit-transition: all ease 0.3s 0.3s;
-moz-transition: all ease 0.3s 0.3s;
-ms-transition: all ease 0.3s 0.3s;
-o-transition: all ease 0.3s 0.3s;
transition: all ease 0.3s 0.3s;
-webkit-transform: translate(100%);
-moz-transform: translate(100%);
-ms-transform: translate(100%);
-o-transform: translate(100%);
tranform: translate(100%);
}
#about a {
color: #eee;
}
#about #km-cat {
position: absolute;
left: 15px;
top: 5px;
-webkit-transition: all ease 1.3s 0.3s;
-moz-transition: all ease 1.3s 0.3s;
-ms-transition: all ease 1.3s 0.3s;
-o-transition: all ease 1.3s 0.3s;
transition: all ease 1.3s 0.3s;
-webkit-transform: translate(-60px, 0);
-moz-transform: translate(-60px, 0);
-ms-transform: translate(-60px, 0);
-o-transform: translate(-60px, 0);
tranform: translate(-60px, 0);
cursor: pointer;
}
#about #cat-face {
fill: #393F4F;
}
#about:hover,
#about:hover #km-cat {
-webkit-transform: translate(0);
-moz-transform: translate(0);
-ms-transform: translate(0);
-o-transform: translate(0);
tranform: translate(0);
}
#about #km-version.new-version {
position: relative;
padding-right: 30px;
}
#about #km-version.new-version:after {
content: 'NEW';
color: #ff0;
position: absolute;
top: -10px;
right: -5px;
display: block;
background: #f00;
padding: 0 5px;
border-radius: 4px;
text-shadow: none;
box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.3);
-webkit-transform: scale(0.6);
-moz-transform: scale(0.6);
-ms-transform: scale(0.6);
-o-transform: scale(0.6);
tranform: scale(0.6);
}
.km_receiver {
width: 0;
height: 0;
}
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-mz-filter: blur(5px);
-o-filter: blur(5px);
filter: blur(5px);
filter: url(../images/blur.svg#blur);
}
.shortcuts-opt {
margin: 0px 7px;
background-color: #fff;
font-size: 14px;
}
.shortcuts-group {
padding-right: 15px;
width: 200px;
text-shadow: none;
}
.shortcuts-thead {
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
#div1 {
display: none;
}
/*.help-container {
width: 586px;
float: left;
}*/
.shortcuts-use {
width: 160px;
font-size: 14px;
font-weight: lighter;
}
.help-header {
padding-bottom: 9px;
margin: 20px 20px 30px;
border-bottom: 1px solid #EEE;
display: none;
}
.shortcuts-table {
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0px;
float: left;
margin-left: 10px;
margin-top: 30px;
}
.shortcuts-table tr:first-child td span {
padding: 10px 0;
font-size: 18px;
display: block;
color: white;
}
.shortcuts-table td {
display: table-cell;
float: none;
margin-left: 0px;
padding-bottom: 7px;
}
.shortcuts-table td[colspan] {
text-align: center;
}
.shortcuts-table h2 {
font-size: 31.5px;
line-height: 40px;
}
.help-container {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
color: #ffffff;
text-shadow: 0 1px black;
margin: 30px;
}
.shortcuts-key {
display: inline-block;
padding: 3px 8px 5px;
font-size: 14px;
font-weight: normal;
line-height: 14px;
color: #6e6e6e;
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
white-space: nowrap;
vertical-align: baseline;
background-color: #fcfcfc;
border-radius: 3px;
/* border: 1px solid hsl(0, 0%, 60%); */
text-transform: capitalize;
box-shadow: inset 0 -2px #ebebeb, inset 0 -3px #ffffff, 0 1px 2px rgba(255, 255, 255, 0.3);
}
.mac .shortcuts-key.ctrl,
.mac .shortcuts-key.shift,
.mac .shortcuts-key.alt,
.shortcuts-key.up,
.shortcuts-key.down,
.shortcuts-key.left,
.shortcuts-key.right {
text-indent: -1000px;
position: relative;
width: 9px;
}
.mac .shortcuts-key.ctrl:after,
.mac .shortcuts-key.shift:after,
.mac .shortcuts-key.alt:after,
.shortcuts-key.up:after,
.shortcuts-key.down:after,
.shortcuts-key.left:after,
.shortcuts-key.right:after {
display: block;
position: absolute;
text-align: center;
left: 5px;
top: 4px;
width: 16px;
height: 16px;
text-indent: 0;
}
.mac .shortcuts-key.ctrl:after {
content: '⌘';
}
.mac .shortcuts-key.shift:after {
content: '⇧';
}
.mac .shortcuts-key.alt:after {
content: '⌥';
}
.shortcuts-key.up:after {
content: '↑';
top: 2px;
}
.shortcuts-key.down:after {
content: '↓';
top: 2px;
}
.shortcuts-key.left:after {
content: '←';
top: 2px;
}
.shortcuts-key.right:after {
content: '→';
top: 2px;
}
div.right {
float: right;
}
#share-dialog {
display: none;
}
.command-button .fui-icon {
background: url(../images/icons.png) no-repeat;
background-position: 0 20px;
}
.appendchildnode.command-button .fui-icon {
background-position: 0 0px;
}
.appendsiblingnode.command-button .fui-icon {
background-position: 0 -20px;
}
.editnode.command-button .fui-icon {
background-position: 0 -60px;
}
.removenode.command-button .fui-icon {
background-position: 0 -80px;
}
.resetlayout.command-button .fui-icon {
background-position: 0 -150px;
}
.clearstyle.command-button .fui-icon {
background-position: 0 -175px;
}
.copystyle.command-button .fui-icon {
background-position: 0 -200px;
}
.pastestyle.command-button .fui-icon {
background-position: 0 -220px;
}
.bold.command-button .fui-icon {
background-position: 0 -240px;
}
.italic.command-button .fui-icon {
background-position: 0 -260px;
}
.arrangeup.command-button .fui-icon {
background-position: 0 -280px;
}
.arrangedown.command-button .fui-icon {
background-position: 0 -300px;
}
/*# sourceMappingURL=default.all.css.map */
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" id="km-cat" viewBox="0 0 1200 1200" width="500" height="500">
<g id="cat-face">
<path d="M1066.769,368.482L1119.5,80L830,131.611C760.552,97.29,682.35,77.999,599.641,77.999
c-82.424,0-160.371,19.161-229.641,53.26L81,81l50.769,289l0,0c-33.792,69.019-52.77,146.612-52.77,228.641
c0,287.542,233.099,520.642,520.642,520.642s520.642-233.099,520.642-520.642C1120.282,516.011,1101.028,437.88,1066.769,368.482z"
/>
</g>
<g id="cat-eye">
<path style="fill:#FFFFFF;" d="M920.255,371C794.746,371,693,472.746,693,598.255s101.746,227.255,227.255,227.255
s227.255-101.746,227.255-227.255S1045.765,371,920.255,371z M920,746c-80.081,0-145-64.919-145-145s64.919-145,145-145
s145,64.919,145,145S1000.081,746,920,746z"/>
<path style="fill:#FFFFFF;" d="M276.255,371C150.746,371,49,472.746,49,598.255s101.746,227.255,227.255,227.255
s227.255-101.746,227.255-227.255S401.765,371,276.255,371z M276,745c-80.081,0-145-64.919-145-145s64.919-145,145-145
s145,64.919,145,145S356.081,745,276,745z"/>
</g>
</svg>
\ No newline at end of file
...@@ -102,13 +102,17 @@ ...@@ -102,13 +102,17 @@
'ui/ui.js', 'ui/ui.js',
'ui/fuix.js', 'ui/fuix.js',
'ui/mainmenu.js', 'ui/mainmenu.js',
'ui/mainmenu.header.js',
'ui/mainmenu.level1.js',
'ui/commandbutton.js', 'ui/commandbutton.js',
'ui/commandbuttonset.js', 'ui/commandbuttonset.js',
'ui/commandinputmenu.js', 'ui/commandinputmenu.js',
'ui/history.js', 'ui/history.js',
'ui/tabs.js', 'ui/tabs.js',
'ui/user.js',
'ui/search.js',
'ui/title.js', 'ui/title.js',
'ui/account.js',
'ui/template.js', 'ui/template.js',
'ui/theme.js', 'ui/theme.js',
'ui/layout.js', 'ui/layout.js',
...@@ -118,12 +122,12 @@ ...@@ -118,12 +122,12 @@
'ui/insertnode.js', 'ui/insertnode.js',
'ui/arrange.js', 'ui/arrange.js',
'ui/nodeop.js', 'ui/nodeop.js',
'ui/priority.js',
'ui/progress.js',
'ui/resource.js',
'ui/attachment.js', 'ui/attachment.js',
'ui/link.js', 'ui/link.js',
'ui/image.js' 'ui/image.js',
'ui/priority.js',
'ui/progress.js',
'ui/resource.js'
]; ];
if (typeof(module) === 'object' && module.exports) { if (typeof(module) === 'object' && module.exports) {
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<script src="kityminder.config.js" charset="utf-8"></script> <script src="kityminder.config.js" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js" charset="utf-8"></script> <script src="lang/zh-cn/zh-cn.js" charset="utf-8"></script>
<link rel="stylesheet" href="lib/fui/theme/default/fui.all.css" />
<link href="ui/theme/default/css/default.all.css" type="text/css" rel="stylesheet" /> <link href="ui/theme/default/css/default.all.css" type="text/css" rel="stylesheet" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"> <link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
......
...@@ -34,8 +34,33 @@ KityMinder.LANG['zh-cn'] = { ...@@ -34,8 +34,33 @@ KityMinder.LANG['zh-cn'] = {
'attachment': '附件' 'attachment': '附件'
}, },
'ui': { 'ui': {
'back': '返回',
'undo': '撤销', 'undo': '撤销',
'redo': '重做', 'redo': '重做',
'tabs': {
'idea': '思路',
'appearence': '展现',
'view': '视图'
},
'menu': {
'level1': {
'open': '打开',
'save': '保存',
'share': '分享',
'help': '帮助',
'setting': '设置'
}
},
'login': '登录',
'logout': '注销',
'switchuser': '切换账户',
'userinfo': '个人信息',
'gotonetdisk': '我的网盘',
'bold': '加粗', 'bold': '加粗',
'italic': '斜体', 'italic': '斜体',
'forecolor': '字体颜色', 'forecolor': '字体颜色',
......
Subproject commit 1d06c3d95c08e412abc67e7abd063db75d731867 Subproject commit 1b4c5224cb6d7517971869571694b87d562ab0fa
utils.extend(KityMinder, function() {
var _kityminderUI = {},
_kityminderToolbarUI = {},
_activeWidget = null,
_widgetData = {},
_widgetCallBack = {};
return {
registerUI: function(uiname, fn) {
utils.each(uiname.split(/\s+/), function(i, name) {
_kityminderUI[name] = fn;
});
},
registerToolbarUI: function(uiname, fn) {
utils.each(uiname.split(/\s+/), function(i, name) {
_kityminderToolbarUI[name] = fn;
});
},
loadUI: function(km) {
utils.each(_kityminderUI, function(i, fn) {
fn.call(km);
});
},
_createUI: function(id) {
var $cont = $('<div class="kmui-container"></div>'),
$toolbar = $.kmuitoolbar(),
$kmbody = $('<div class="kmui-editor-body"></div>'),
$statusbar = $('<div class="kmui-statusbar"></div>');
$cont.append($toolbar).append($kmbody).append($statusbar);
$(utils.isString(id) ? '#' + id : id).append($cont);
return {
'$container': $cont,
'$toolbar': $toolbar,
'$body': $kmbody,
'$statusbar': $statusbar
};
},
_createToolbar: function($toolbar, km) {
var toolbars = km.getOptions('toolbars');
if (toolbars && toolbars.length) {
var btns = [];
$.each(toolbars, function(i, uiNames) {
$.each(uiNames.split(/\s+/), function(index, name) {
if (name == '|') {
if ($.kmuiseparator) btns.push($.kmuiseparator());
} else {
if (_kityminderToolbarUI[name]) {
var ui = _kityminderToolbarUI[name].call(km, name);
if (ui) btns.push(ui);
}
}
});
if (btns.length) $toolbar.kmui().appendToBtnmenu(btns);
});
$toolbar.append($('<div class="kmui-dialog-container"></div>'));
} else {
$toolbar.hide();
}
},
_createStatusbar: function($statusbar, km) {
},
getKityMinder: function(id, options) {
var containers = this._createUI(id);
var km = this.getMinder(containers.$body.get(0), options);
this._createToolbar(containers.$toolbar, km);
this._createStatusbar(containers.$statusbar, km);
km.$container = containers.$container;
this.loadUI(km);
return km.fire('interactchange');
},
registerWidget: function(name, pro, cb) {
_widgetData[name] = $.extend2(pro, {
$root: '',
_preventDefault: false,
root: function($el) {
return this.$root || (this.$root = $el);
},
preventDefault: function() {
this._preventDefault = true;
},
clear: false
});
if (cb) {
_widgetCallBack[name] = cb;
}
},
getWidgetData: function(name) {
return _widgetData[name];
},
setWidgetBody: function(name, $widget, km) {
if (!km._widgetData) {
utils.extend(km, {
_widgetData: {},
getWidgetData: function(name) {
return this._widgetData[name];
},
getWidgetCallback: function(widgetName) {
var me = this;
return function() {
return _widgetCallBack[widgetName].apply(me, [me, $widget].concat(utils.argsToArray(arguments, 0)));
};
}
});
}
var pro = _widgetData[name];
if (!pro) {
return null;
}
pro = km._widgetData[name];
if (!pro) {
pro = _widgetData[name];
pro = km._widgetData[name] = $.type(pro) == 'function' ? pro : utils.clone(pro);
}
pro.root($widget.kmui().getBodyContainer());
//清除光标
km.fire('selectionclear');
pro.initContent(km, $widget);
//在dialog上阻止键盘冒泡,导致跟编辑输入冲突的问题
$widget.on('keydown keyup keypress', function(e) {
e.stopPropagation();
});
if (!pro._preventDefault) {
pro.initEvent(km, $widget);
}
if (pro.width) $widget.width(pro.width);
},
setActiveWidget: function($widget) {
_activeWidget = $widget;
}
};
}());
\ No newline at end of file
KM.registerToolbarUI( 'bold italic redo undo unhyperlink removeimage expandnode collapsenode hand zoom-in zoom-out',
function ( name ) {
var me = this;
var $btn = $.kmuibutton( {
icon: name,
click: function () {
me.execCommand( name );
},
title: this.getLang( 'tooltips' )[ name ] || ''
} );
this.on( 'interactchange', function () {
var state = this.queryCommandState( name );
$btn.kmui().disabled( state == -1 ).active( state == 1 );
} );
return $btn;
}
);
\ No newline at end of file
KM.registerToolbarUI('forecolor', function (name) {
function getCurrentColor() {
return $colorLabel.css('background-color');
}
var me = this,
$colorPickerWidget = null,
$colorLabel = null,
$btn = null;
this.on('interactchange', function () {
var state = this.queryCommandState(name);
$btn.kmui().disabled(state == -1).active(state == 1);
});
$btn = $.kmuicolorsplitbutton({
icon: name,
caret: true,
name: name,
title: this.getLang('tooltips')[name] || '',
click: function () {
var color = kity.Color.parse(getCurrentColor()).toHEX();
if (color != '#000000') {
me.execCommand(name, color);
}
}
});
$colorLabel = $btn.kmui().colorLabel();
$colorPickerWidget = $.kmuicolorpicker({
name: name,
lang_clearColor: me.getLang('popupcolor')['clearColor'] || '',
lang_themeColor: me.getLang('popupcolor')['themeColor'] || '',
lang_standardColor: me.getLang('popupcolor')['standardColor'] || ''
}).on('pickcolor', function (evt, color) {
window.setTimeout(function () {
$colorLabel.css("backgroundColor", color);
me.execCommand(name, color);
}, 0);
}).on('show', function () {
KM.setActiveWidget($colorPickerWidget.kmui().root());
}).css('zIndex', me.getOptions('zIndex') + 1);
$btn.kmui().on('arrowclick', function () {
if (!$colorPickerWidget.parent().length) {
me.$container.find('.kmui-dialog-container').append($colorPickerWidget);
}
$colorPickerWidget.kmui().show($btn, {
caretDir: "down",
offsetTop: -5,
offsetLeft: 8,
caretLeft: 11,
caretTop: -8
});
}).register('click', $btn, function () {
$colorPickerWidget.kmui().hide()
});
return $btn;
});
\ No newline at end of file
KM.registerToolbarUI('fontfamily fontsize', function (name) {
var me = this,
label = me.getLang('tooltips.' + name),
options = {
label: label,
title: label,
comboboxName: name,
items: me.getOptions(name) || [],
itemStyles: [],
value: [],
autowidthitem: []
},
$combox = null,
comboboxWidget = null;
if (options.items.length == 0) {
return null;
}
switch (name) {
case 'fontfamily':
options = transForFontfamily(options);
break;
case 'fontsize':
options = transForFontsize(options);
break;
}
//实例化
$combox = $.kmuibuttoncombobox(options).css('zIndex', me.getOptions('zIndex') + 1);
comboboxWidget = $combox.kmui();
comboboxWidget.on('comboboxselect', function (evt, res) {
me.execCommand(name, res.value);
}).on("beforeshow", function () {
if ($combox.parent().length === 0) {
$combox.appendTo(me.$container.find('.kmui-dialog-container'));
}
});
//状态反射
this.on('interactchange', function () {
var state = this.queryCommandState(name),
value = this.queryCommandValue(name);
//设置按钮状态
comboboxWidget.button().kmui().disabled(state == -1).active(state == 1);
if (value) {
//设置label
value = value.replace(/['"]/g, '').toLowerCase().split(/['|"]?\s*,\s*[\1]?/);
comboboxWidget.selectItemByLabel(value);
}
});
return comboboxWidget.button().addClass('kmui-combobox');
//字体参数转换
function transForFontfamily(options) {
var temp = null,
tempItems = [];
for (var i = 0, len = options.items.length; i < len; i++) {
temp = options.items[i].val;
tempItems.push(temp.split(/\s*,\s*/)[0]);
options.itemStyles.push('font-family: ' + temp);
options.value.push(temp);
options.autowidthitem.push($.wordCountAdaptive(tempItems[i]));
}
options.items = tempItems;
return options;
}
//字体大小参数转换
function transForFontsize(options) {
var temp = null,
tempItems = [];
options.itemStyles = [];
options.value = [];
for (var i = 0, len = options.items.length; i < len; i++) {
temp = options.items[i];
tempItems.push(temp);
options.itemStyles.push('font-size: ' + temp + 'px; height:' + (temp + 2) + 'px; line-height: ' + (temp + 2) + 'px');
}
options.value = options.items;
options.items = tempItems;
options.autoRecord = false;
return options;
}
});
\ No newline at end of file
KM.registerUI( 'contextmenu', function () {
var me = this;
function getItemByLabel(label){
var result;
utils.each(me.getContextmenu(),function(i,item){
if(item.label == label){
result = item;
return false;
}
});
return result;
}
var $menu = $.kmuidropmenu({
click:function(e,v,l){
var item = getItemByLabel(l);
if(item.exec){
item.exec.apply(km)
}else{
me.execCommand(item.cmdName);
}
this.hide();
}
});
me.$container.append($menu);
me.on('contextmenu', function(e) {
e.preventDefault();
});
me.on('mouseup', function (e) {
//e.preventDefault();
if (me.getStatus() == 'hand' || !e.isRightMB()) return;
var node = e.getTargetNode();
if(node){
this.removeAllSelectedNodes();
this.select(node);
}
var items = me.getContextmenu();
var data = [];
utils.each(items,function(i,item){
if(item.divider){
data.length && data.push(item);
return;
}
if(me.queryCommandState(item.cmdName)!=-1){
data.push({
label:item.label,
value:item.cmdName
})
}
});
if(data.length){
var item = data[data.length-1];
if(item.divider){
data.pop();
}
var pos = e.getPosition('screen');
var offset = $(me.getPaper().container).offset();
pos.y -= offset.top;
pos.x -= offset.left;
$menu.kmui().setData({
data:data
}).position(pos).show();
}
});
me.on('afterclick',function(){
$menu.kmui().hide();
});
me.on('beforemousedown',function(e){
if(e.isRightMB()){
//e.stopPropagationImmediately();
}
})
} );
KM.registerToolbarUI('markers help preference resource', function(name) {
var me = this,
currentRange, $dialog,
opt = {
title: this.getLang('tooltips')[name] || '',
url: me.getOptions('KITYMINDER_HOME_URL') + 'dialogs/' + name + '/' + name + '.js',
};
var $btn = $.kmuibutton({
icon: name,
title: this.getLang('tooltips')[name] || ''
});
//加载模版数据
utils.loadFile(document, {
src: opt.url,
tag: 'script',
type: 'text/javascript',
defer: 'defer'
}, function() {
$dialog = $.kmuimodal(opt);
$dialog.attr('id', 'kmui-dialog-' + name).addClass('kmui-dialog-' + name)
.find('.kmui-modal-body').addClass('kmui-dialog-' + name + '-body');
$dialog.kmui().on('beforeshow', function() {
var $root = this.root(),
win = null,
offset = null;
if (!$root.parent()[0]) {
me.$container.find('.kmui-dialog-container').append($root);
}
KM.setWidgetBody(name, $dialog, me);
}).attachTo($btn);
if (name == 'help') {
$dialog.kmui().on('beforeshow', function() {
$btn.kmui().active(true);
$('.kmui-editor-body').addClass('blur');
}).on('beforehide', function() {
$btn.kmui().active(false);
$('.kmui-editor-body').removeClass('blur');
});
}
});
me.on('interactchange', function() {
var state = this.queryCommandState(name);
$btn.kmui().disabled(state == -1).active(state == 1);
});
switch (name) {
case 'markers':
me.addContextmenu([{
label: me.getLang('marker.marker'),
exec: function() {
$dialog.kmui().show();
},
cmdName: 'markers'
}]);
break;
case 'resource':
me.addContextmenu([{
label: me.getLang('resource.resource'),
exec: function() {
$dialog.kmui().show();
},
cmdName: 'resource'
}]);
}
return $btn;
});
\ No newline at end of file
KM.registerToolbarUI('template theme', function(name) {
var values = utils.keys(name == 'template' ? KM.getTemplateList() : KM.getThemeList());
var me = this,
label = me.getLang('tooltips.' + name),
options = {
label: label,
title: label,
comboboxName: name,
items: values.map(function(value) {
return me.getLang(name)[value];
}),
itemStyles: [],
value: values,
autowidthitem: [],
enabledRecord: false
},
$combox = null;
//实例化
$combox = $.kmuibuttoncombobox(options).css('zIndex', me.getOptions('zIndex') + 1);
var comboboxWidget = $combox.kmui();
comboboxWidget.on('comboboxselect', function(evt, res) {
me.execCommand(name, res.value);
}).on('beforeshow', function() {
if ($combox.parent().length === 0) {
$combox.appendTo(me.$container.find('.kmui-dialog-container'));
}
});
var lastState, lastValue;
//状态反射
me.on('interactchange', function() {
var state = this.queryCommandState(name),
value = this.queryCommandValue(name);
//设置按钮状态
if (lastState != state)
comboboxWidget.button().kmui().disabled(state == -1).active(state == 1);
if (value && value != lastValue) {
// 此处貌似性能很差,加入缓存
comboboxWidget.selectItemByValue(value);
}
lastState = state;
lastValue = value;
});
return comboboxWidget.button().addClass('kmui-combobox');
});
\ No newline at end of file
KM.registerToolbarUI( 'hyperlink', function ( name ) {
var me = this,
currentRange, $dialog,
opt = {
title: this.getLang( 'tooltips' )[ name ] || '',
url: me.getOptions( 'KITYMINDER_HOME_URL' ) + 'dialogs/' + name + '/' + name + '.js'
};
var $btn = $.kmuibutton( {
icon: name,
title: this.getLang( 'tooltips' )[ name ] || ''
} );
//加载模版数据
utils.loadFile( document, {
src: opt.url,
tag: "script",
type: "text/javascript",
defer: "defer"
}, function () {
$dialog = $.kmuimodal( opt );
$dialog.attr( 'id', 'kmui-dialog-' + name ).addClass( 'kmui-dialog-' + name )
.find( '.kmui-modal-body' ).addClass( 'kmui-dialog-' + name + '-body' );
$dialog.kmui().on( 'beforeshow', function () {
var $root = this.root(),
win = null,
offset = null;
if ( !$root.parent()[ 0 ] ) {
me.$container.find( '.kmui-dialog-container' ).append( $root );
}
KM.setWidgetBody( name, $dialog, me );
} ).attachTo( $btn );
} );
me.addContextmenu( [ {
label: me.getLang( 'hyperlink.hyperlink' ),
exec: function (url) {
$dialog.kmui().show();
},
cmdName: 'hyperlink'
},{
label: me.getLang( 'hyperlink.unhyperlink' ),
exec: function () {
this.execCommand( 'unhyperlink' )
},
cmdName: 'unhyperlink'
}
]);
me.on( 'interactchange', function () {
var state = this.queryCommandState( name );
$btn.kmui().disabled( state == -1 ).active( state == 1 )
} );
return $btn;
} );
\ No newline at end of file
KM.registerToolbarUI( 'image', function ( name ) {
var me = this,
currentRange, $dialog,
opt = {
title: this.getLang( 'tooltips' )[ name ] || '',
url: me.getOptions( 'KITYMINDER_HOME_URL' ) + 'dialogs/' + name + '/' + name + '.js'
};
var $btn = $.kmuibutton( {
icon: name,
title: this.getLang( 'tooltips' )[ name ] || ''
} );
//加载模版数据
utils.loadFile( document, {
src: opt.url,
tag: "script",
type: "text/javascript",
defer: "defer"
}, function () {
$dialog = $.kmuimodal( opt );
$dialog.attr( 'id', 'kmui-dialog-' + name ).addClass( 'kmui-dialog-' + name )
.find( '.kmui-modal-body' ).addClass( 'kmui-dialog-' + name + '-body' );
$dialog.kmui().on( 'beforeshow', function () {
var $root = this.root(),
win = null,
offset = null;
if ( !$root.parent()[ 0 ] ) {
me.$container.find( '.kmui-dialog-container' ).append( $root );
}
KM.setWidgetBody( name, $dialog, me );
} ).attachTo( $btn );
} );
me.addContextmenu( [ {
label: me.getLang( 'image.image' ),
exec: function (url) {
$dialog.kmui().show();
},
cmdName: 'image'
},{
label: me.getLang( 'image.removeimage' ),
exec: function () {
this.execCommand( 'removeimage' );
},
cmdName: 'removeimage'
}
]);
me.on( 'interactchange', function () {
var state = this.queryCommandState( name );
$btn.kmui().disabled( state == -1 ).active( state == 1 );
} );
return $btn;
} );
\ No newline at end of file
KM.registerToolbarUI('node', function(name) {
var shortcutKeys = {
'appendsiblingnode': 'Enter',
'appendchildnode': 'Tab',
'removenode': 'Del',
'editnode': 'F2'
};
var me = this,
msg = me.getLang('node'),
label = me.getLang('tooltips.' + name),
options = {
label: label,
title: label,
comboboxName: name,
items: {
'appendsiblingnode': 'appendsiblingnode',
'appendchildnode': 'appendchildnode',
'editnode': 'editnode',
'removenode': 'removenode'
},
itemStyles: [],
value: [],
autowidthitem: [],
enabledRecord: false,
enabledSelected: false
},
$combox = null;
if (options.items.length === 0) {
return null;
}
//实例化
$combox = $.kmuibuttoncombobox(transForInserttopic(options)).css('zIndex', me.getOptions('zIndex') + 1);
var comboboxWidget = $combox.kmui();
comboboxWidget.on('comboboxselect', function(evt, res) {
me.execCommand(res.value, me.getLang().topic);
}).on('beforeshow', function() {
if ($combox.parent().length === 0) {
$combox.appendTo(me.$container.find('.kmui-dialog-container'));
}
var combox = $combox.kmui();
combox.traverseItems(function(label, value) {
if (me.queryCommandState(value) == -1) {
combox.disableItemByLabel(label);
} else {
combox.enableItemByLabel(label);
}
});
});
//状态反射
me.on('interactchange', function() {
var state = 0;
utils.each(shortcutKeys, function(k) {
state = me.queryCommandState(k);
if (state != -1) {
return false;
}
});
//设置按钮状态
comboboxWidget.button().kmui().disabled(state == -1).active(state == 1);
});
//comboboxWidget.button().kmui().disabled(-1);
return comboboxWidget.button().addClass('kmui-combobox');
function transForInserttopic(options) {
var tempItems = [];
utils.each(options.items, function(k, v) {
options.value.push(v);
tempItems.push((msg[k] || k) + ' (' + shortcutKeys[v] + ')');
options.autowidthitem.push($.wordCountAdaptive(tempItems[tempItems.length - 1]));
});
options.items = tempItems;
return options;
}
});
\ No newline at end of file
(function() {
function doDownload(url, filename, type) {
var content = url.split(',')[1];
var $form = $('<form></form>').attr({
'action': 'download.php',
'method': 'POST',
'accept-charset': 'utf-8'
});
var $content = $('<input />').attr({
name: 'content',
type: 'hidden',
value: decodeURIComponent(content)
}).appendTo($form);
var $type = $('<input />').attr({
name: 'type',
type: 'hidden',
value: type
}).appendTo($form);
var $filename = $('<input />').attr({
name: 'filename',
type: 'hidden',
value: filename
}).appendTo($form);
$('<input name="iehack" value="&#9760;" />').appendTo($form);
$form.appendTo('body').submit().remove();
}
function buildDataUrl(mineType, data) {
return 'data:' + mineType + '; utf-8,' + encodeURIComponent(data);
}
function doExport(minder, type) {
var data = minder.exportData(type);
var protocal = KityMinder.findProtocal(type);
var filename = minder.getMinderTitle() + protocal.fileExtension;
var mineType = protocal.mineType || 'text/plain';
if (typeof(data) == 'string') {
doDownload(buildDataUrl(mineType, data), filename, 'text');
} else if (data && data.then) {
data.then(function(url) {
doDownload(url, filename, 'base64');
});
}
}
kity.extendClass(Minder, {
exportFile: function(type) {
doExport(this, type);
return this;
}
});
KM.registerToolbarUI('saveto', function(name) {
var me = this,
label = me.getLang('tooltips.' + name),
options = {
label: label,
title: label,
comboboxName: name,
items: [],
itemStyles: [],
value: [],
autowidthitem: [],
enabledRecord: false,
enabledSelected: false
},
$combox = null,
comboboxWidget = null;
utils.each(KityMinder.getAllRegisteredProtocals(), function(k) {
var p = KityMinder.findProtocal(k);
if (p.encode) {
var text = p.fileDescription + '(' + p.fileExtension + ')';
options.value.push(k);
options.items.push(text);
options.autowidthitem.push($.wordCountAdaptive(text), true);
}
});
//实例化
$combox = $.kmuibuttoncombobox(options).css('zIndex', me.getOptions('zIndex') + 1);
comboboxWidget = $combox.kmui();
comboboxWidget.on('comboboxselect', function(evt, res) {
doExport(me, res.value);
}).on('beforeshow', function() {
if ($combox.parent().length === 0) {
$combox.appendTo(me.$container.find('.kmui-dialog-container'));
}
}).on('aftercomboboxselect', function() {
this.setLabelWithDefaultValue();
});
return comboboxWidget.button().addClass('kmui-combobox');
});
})();
\ No newline at end of file
KM.registerUI( 'tooltips',
function ( name ) {
var km = this;
//添加tooltip;
if($.kmuitooltip){
$("[data-original-title]",km.$container).each(function(i,n){
var tooltips = km.getLang('tooltips');
var tooltip = $(n).data('original-title');
utils.each(tooltips,function(v,k){
if(k == tooltip && km.getShortcutKey(v)){
$(n).attr('data-original-title',tooltip + ' (' + km.getShortcutKey(v).toUpperCase() + ')');
}
})
});
$.kmuitooltip('attachTo', $("[data-original-title]",km.$container)).css('z-index',km.getOptions('zIndex')+1);
}
km.$container.find('a').click(function(evt){
evt.preventDefault()
});
}
);
\ No newline at end of file
/**
* 宽度自适应工具函数
* @param word 单词内容
* @param hasSuffix 是否含有后缀
*/
$.wordCountAdaptive = function( word, hasSuffix ) {
var $tmpNode = $('<span>' ).html( word ).css( {
display: 'inline',
position: 'absolute',
top: -10000000,
left: -100000
} ).appendTo( document.body),
width = $tmpNode.width();
$tmpNode.remove();
$tmpNode = null;
if( width < 50 ) {
return word;
} else {
word = word.slice( 0, hasSuffix ? -4 : -1 );
if( !word.length ) {
return '...';
}
return $.wordCountAdaptive( word + '...', true );
}
};
\ No newline at end of file
KM.registerToolbarUI( 'zoom', function ( name ) {
var me = this,
label = me.getLang( 'tooltips.' + name ),
options = {
label: label,
title: label,
comboboxName: name,
items: me.getOptions( name ) || [],
itemStyles: [],
value: me.getOptions( name ),
autowidthitem: [],
enabledRecord: false
},
$combox = null;
if ( options.items.length == 0 ) {
return null;
}
//实例化
$combox = $.kmuibuttoncombobox( transForInserttopic( options ) ).css( 'zIndex', me.getOptions( 'zIndex' ) + 1 );
var comboboxWidget = $combox.kmui();
comboboxWidget.on( 'comboboxselect', function ( evt, res ) {
me.execCommand('zoom', res.value );
} ).on( "beforeshow", function () {
if ( $combox.parent().length === 0 ) {
$combox.appendTo( me.$container.find( '.kmui-dialog-container' ) );
}
} );
var lastState, lastValue;
//状态反射
me.on( 'interactchange', function () {
var state = this.queryCommandState( name ),
value = this.queryCommandValue( name );
if (state != lastState) {
//设置按钮状态
comboboxWidget.button().kmui().disabled( state == -1 ).active( state == 1 );
}
if ( value && value != lastValue ) {
//设置label
comboboxWidget.selectItemByLabel( value + '%' );
}
lastState = state;
lastValue = value;
} );
//comboboxWidget.button().kmui().disabled(-1);
return comboboxWidget.button().addClass( 'kmui-combobox' );
function transForInserttopic( options ) {
var tempItems = [];
utils.each( options.items, function ( k, v ) {
options.value.push( v );
tempItems.push( v + '%' );
options.autowidthitem.push( $.wordCountAdaptive( tempItems[ tempItems.length - 1 ] ) );
} );
options.items = tempItems;
return options;
}
} );
\ No newline at end of file
//button 类
KM.ui.define('button', {
tpl: '<<%if(!texttype){%>div class="kmui-btn kmui-btn-<%=icon%> <%if(name){%>kmui-btn-name-<%=name%><%}%>" unselectable="on" onmousedown="return false" <%}else{%>a class="kmui-text-btn"<%}%><% if(title) {%> data-original-title="<%=title%>" <%};%>> ' +
'<% if(icon) {%><div unselectable="on" class="kmui-icon-<%=icon%> kmui-icon"></div><% }; %><%if(text) {%><span unselectable="on" onmousedown="return false" class="kmui-button-label"><%=text%></span><%}%>' +
'<%if(caret && text){%><span class="kmui-button-spacing"></span><%}%>' +
'<% if(caret) {%><span unselectable="on" onmousedown="return false" class="kmui-caret"></span><% };%></<%if(!texttype){%>div<%}else{%>a<%}%>>',
defaultOpt: {
text: '',
title: '',
icon: '',
width: '',
caret: false,
texttype: false,
click: function () {
}
},
init: function (options) {
var me = this;
me.root($($.parseTmpl(me.tpl, options)))
.click(function (evt) {
me.wrapclick(options.click, evt)
});
me.root().hover(function () {
if(!me.root().hasClass("kmui-disabled")){
me.root().toggleClass('kmui-hover')
}
})
return me;
},
wrapclick: function (fn, evt) {
if (!this.disabled()) {
this.root().trigger('wrapclick');
$.proxy(fn, this, evt)()
}
return this;
},
label: function (text) {
if (text === undefined) {
return this.root().find('.kmui-button-label').text();
} else {
this.root().find('.kmui-button-label').text(text);
return this;
}
},
disabled: function (state) {
if (state === undefined) {
return this.root().hasClass('kmui-disabled')
}
this.root().toggleClass('kmui-disabled', state);
if(this.root().hasClass('kmui-disabled')){
this.root().removeClass('kmui-hover')
}
return this;
},
active: function (state) {
if (state === undefined) {
return this.root().hasClass('kmui-active')
}
this.root().toggleClass('kmui-active', state)
return this;
},
mergeWith: function ($obj) {
var me = this;
me.data('$mergeObj', $obj);
$obj.kmui().data('$mergeObj', me.root());
if (!$.contains(document.body, $obj[0])) {
$obj.appendTo(me.root());
}
me.on('click',function () {
me.wrapclick(function () {
$obj.kmui().show();
})
}).register('click', me.root(), function (evt) {
$obj.hide()
});
}
});
\ No newline at end of file
/**
* Combox 抽象基类
* User: hn
* Date: 13-5-29
* Time: 下午8:01
* To change this template use File | Settings | File Templates.
*/
(function(){
var widgetName = 'buttoncombobox';
KM.ui.define( widgetName, ( function(){
return {
defaultOpt: {
//按钮初始文字
label: '',
title: ''
},
init: function( options ) {
var me = this;
var btnWidget = $.kmuibutton({
caret: true,
name: options.comboboxName,
title: options.title,
text: options.label,
click: function(){
me.show( this.root() );
}
});
me.supper.init.call( me, options );
//监听change, 改变button显示内容
me.on('changebefore', function( e, label ){
btnWidget.kmuibutton('label', label );
});
me.data( 'button', btnWidget );
me.attachTo(btnWidget)
},
button: function(){
return this.data( 'button' );
}
}
} )(), 'combobox' );
})();
//colorpicker 类
KM.ui.define('colorpicker', {
tpl: function (opt) {
var COLORS = (
'ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,' +
'f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,' +
'd8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,' +
'bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,' +
'a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,' +
'7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,' +
'c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,').split(',');
var html = '<div unselectable="on" onmousedown="return false" class="kmui-colorpicker<%if (name){%> kmui-colorpicker-<%=name%><%}%>" >' +
'<table unselectable="on" onmousedown="return false">' +
'<tr><td colspan="10">'+opt.lang_themeColor+'</td> </tr>' +
'<tr class="kmui-colorpicker-firstrow" >';
for (var i = 0; i < COLORS.length; i++) {
if (i && i % 10 === 0) {
html += '</tr>' + (i == 60 ? '<tr><td colspan="10">'+opt.lang_standardColor+'</td></tr>' : '') + '<tr' + (i == 60 ? ' class="kmui-colorpicker-firstrow"' : '') + '>';
}
html += i < 70 ? '<td><a unselectable="on" onmousedown="return false" title="' + COLORS[i] + '" class="kmui-colorpicker-colorcell"' +
' data-color="#' + COLORS[i] + '"' +
' style="background-color:#' + COLORS[i] + ';border:solid #ccc;' +
(i < 10 || i >= 60 ? 'border-width:1px;' :
i >= 10 && i < 20 ? 'border-width:1px 1px 0 1px;' :
'border-width:0 1px 0 1px;') +
'"' +
'></a></td>' : '';
}
html += '</tr></table></div>';
return html;
},
init: function (options) {
var me = this;
me.root($($.parseTmpl(me.supper.mergeTpl(me.tpl(options)),options)));
me.root().on("click",function (e) {
me.trigger('pickcolor', $(e.target).data('color'));
});
}
}, 'popup');
\ No newline at end of file
/**
* Created with JetBrains PhpStorm.
* User: hn
* Date: 13-7-10
* Time: 下午3:07
* To change this template use File | Settings | File Templates.
*/
KM.ui.define('colorsplitbutton',{
tpl : '<div class="kmui-splitbutton <%if (name){%>kmui-splitbutton-<%= name %><%}%>" unselectable="on" <%if(title){%>data-original-title="<%=title%>"<%}%>><div class="kmui-btn" unselectable="on" ><%if(icon){%><div unselectable="on" class="kmui-icon-<%=icon%> kmui-icon"></div><%}%><div class="kmui-splitbutton-color-label" <%if (color) {%>style="background: <%=color%>"<%}%>></div><%if(text){%><%=text%><%}%></div>'+
'<div unselectable="on" class="kmui-btn kmui-dropdown-toggle" >'+
'<div unselectable="on" class="kmui-caret"><\/div>'+
'</div>'+
'</div>',
defaultOpt: {
color: ''
},
init: function( options ){
var me = this;
me.supper.init.call( me, options );
},
colorLabel: function(){
return this.root().find('.kmui-splitbutton-color-label');
}
}, 'splitbutton');
\ No newline at end of file
/**
* Created with JetBrains PhpStorm.
* User: hn
* Date: 13-5-29
* Time: 下午8:01
* To change this template use File | Settings | File Templates.
*/
(function(){
var widgetName = 'combobox',
itemClassName = 'kmui-combobox-item',
HOVER_CLASS = 'kmui-combobox-item-hover',
ICON_CLASS = 'kmui-combobox-checked-icon',
labelClassName = 'kmui-combobox-item-label';
KM.ui.define( widgetName, ( function(){
return {
tpl: "<ul class=\"dropdown-menu kmui-combobox-menu<%if (comboboxName!=='') {%> kmui-combobox-<%=comboboxName%><%}%>\" unselectable=\"on\" onmousedown=\"return false\" role=\"menu\" aria-labelledby=\"dropdownMenu\">" +
"<%if(autoRecord) {%>" +
"<%for( var i=0, len = recordStack.length; i<len; i++ ) {%>" +
"<%var index = recordStack[i];%>" +
"<li class=\"<%=itemClassName%><%if( selected == index ) {%> kmui-combobox-checked<%}%><%if( disabled[ index ] === true ) {%> kmui-combobox-item-disabled<%}%>\" data-item-index=\"<%=index%>\" unselectable=\"on\" onmousedown=\"return false\">" +
"<span class=\"kmui-combobox-icon\" unselectable=\"on\" onmousedown=\"return false\"></span>" +
"<label class=\"<%=labelClassName%>\" style=\"<%=itemStyles[ index ]%>\" unselectable=\"on\" onmousedown=\"return false\"><%=items[index]%></label>" +
"</li>" +
"<%}%>" +
"<%if( i ) {%>" +
"<li class=\"kmui-combobox-item-separator\"></li>" +
"<%}%>" +
"<%}%>" +
"<%for( var i=0, label; label = items[i]; i++ ) {%>" +
"<li class=\"<%=itemClassName%><%if( selected == i && enabledSelected ) {%> kmui-combobox-checked<%}%> kmui-combobox-item-<%=i%><%if( disabled[ i ] === true ) {%> kmui-combobox-item-disabled<%}%>\" data-item-index=\"<%=i%>\" unselectable=\"on\" onmousedown=\"return false\">" +
"<span class=\"kmui-combobox-icon\" unselectable=\"on\" onmousedown=\"return false\"></span>" +
"<label class=\"<%=labelClassName%>\" style=\"<%=itemStyles[ i ]%>\" unselectable=\"on\" onmousedown=\"return false\"><%=label%></label>" +
"</li>" +
"<%}%>" +
"</ul>",
defaultOpt: {
//记录栈初始列表
recordStack: [],
//可用项列表
items: [],
//item对应的值列表
value: [],
comboboxName: '',
selected: '',
//初始禁用状态
disabled: {},
//自动记录
autoRecord: true,
//最多记录条数
recordCount: 5,
enabledRecord:true,
enabledSelected:true
},
init: function( options ){
var me = this;
$.extend( me._optionAdaptation( options ), me._createItemMapping( options.recordStack, options.items ), {
itemClassName: itemClassName,
iconClass: ICON_CLASS,
labelClassName: labelClassName
} );
this._transStack( options );
me.root( $( $.parseTmpl( me.tpl, options ) ) );
this.data( 'options', options ).initEvent();
},
initEvent: function(){
var me = this;
me.initSelectItem();
this.initItemActive();
},
setLabelWithDefaultValue : function(){
var $btn = this.data('button');
$btn.kmui().label($btn.data('original-title'))
},
/**
* 初始化选择项
*/
initSelectItem: function(){
var me = this,
options = me.data( "options" ),
labelClass = "."+labelClassName;
me.root().delegate('.' + itemClassName, 'click', function(){
var $li = $(this),
index = $li.attr('data-item-index');
if ( options.disabled[ index ] ) {
return false;
}
me.trigger('comboboxselect', {
index: index,
label: $li.find(labelClass).text(),
value: me.data('options').value[ index ]
}).select( index );
me.hide();
me.trigger('aftercomboboxselect');
return false;
});
},
initItemActive: function(){
var fn = {
mouseenter: 'addClass',
mouseleave: 'removeClass'
};
if ($.IE6) {
this.root().delegate( '.'+itemClassName, 'mouseenter mouseleave', function( evt ){
$(this)[ fn[ evt.type ] ]( HOVER_CLASS );
}).one('afterhide', function(){
});
}
},
/**
* 选择给定索引的项
* @param index 项索引
* @returns {*} 如果存在对应索引的项,则返回该项;否则返回null
*/
select: function( index ){
var options = this.data( 'options' ),
itemCount = options.itemCount,
items = options.autowidthitem;
if ( items && !items.length ) {
items = options.items;
}
// 禁用
if ( options.disabled[ index ] ) {
return null;
}
if( itemCount == 0 ) {
return null;
}
if( index < 0 ) {
index = itemCount + index % itemCount;
} else if ( index >= itemCount ) {
index = itemCount-1;
}
this.trigger( 'changebefore', items[ index ] );
this._update( index );
this.trigger( 'changeafter', items[ index ] );
return null;
},
selectItemByLabel: function( label ){
var itemMapping = this.data('options').itemMapping,
me = this,
index = null;
!$.isArray( label ) && ( label = [ label ] );
$.each( label, function( i, item ){
index = itemMapping[ item ];
if( index !== undefined ) {
me.select( index );
return false;
}
} );
},
selectItemByValue: function( value ){
var values = this.data('options').value,
me = this,
i;
for (i = 0; i < values.length; i++) {
if (values[i] == value) return me.select(i);
}
return false;
},
getItems: function () {
return this.data( "options" ).items;
},
traverseItems:function(fn){
var values = this.data('options').value;
var labels = this.data('options').items;
$.each(labels,function(i,label){
fn(label,values[i])
});
return this;
},
getItemMapping: function () {
return this.data( "options" ).itemMapping;
},
disableItemByIndex: function ( index ) {
var options = this.data( "options" );
options.disabled[ index ] = true;
this._repaint();
},
disableItemByLabel: function ( label ) {
var itemMapping = this.data('options').itemMapping,
index = itemMapping[ label ];
if ( typeof index === "number" ) {
return this.disableItemByIndex( index );
}
return false;
},
enableItemByIndex: function ( index ) {
var options = this.data( "options" );
delete options.disabled[ index ];
this._repaint();
},
enableItemByLabel: function ( label ) {
var itemMapping = this.data('options').itemMapping,
index = itemMapping[ label ];
if ( typeof index === "number" ) {
return this.enableItemByIndex( index );
}
return false;
},
/**
* 转换记录栈
*/
_transStack: function( options ) {
var temp = [],
itemIndex = -1,
selected = -1;
$.each( options.recordStack, function( index, item ){
itemIndex = options.itemMapping[ item ];
if( $.isNumeric( itemIndex ) ) {
temp.push( itemIndex );
//selected的合法性检测
if( item == options.selected ) {
selected = itemIndex;
}
}
} );
options.recordStack = temp;
options.selected = selected;
temp = null;
},
_optionAdaptation: function( options ) {
if( !( 'itemStyles' in options ) ) {
options.itemStyles = [];
for( var i = 0, len = options.items.length; i < len; i++ ) {
options.itemStyles.push('');
}
}
options.autowidthitem = options.autowidthitem || options.items;
options.itemCount = options.items.length;
return options;
},
_createItemMapping: function( stackItem, items ){
var temp = {},
result = {
recordStack: [],
mapping: {}
};
$.each( items, function( index, item ){
temp[ item ] = index;
} );
result.itemMapping = temp;
$.each( stackItem, function( index, item ){
if( temp[ item ] !== undefined ) {
result.recordStack.push( temp[ item ] );
result.mapping[ item ] = temp[ item ];
}
} );
return result;
},
_update: function ( index ) {
var options = this.data("options"),
newStack = [];
if(this.data('options').enabledRecord){
$.each( options.recordStack, function( i, item ){
if( item != index ) {
newStack.push( item );
}
} );
//压入最新的记录
newStack.unshift( index );
if( newStack.length > options.recordCount ) {
newStack.length = options.recordCount;
}
options.recordStack = newStack;
}
options.selected = index;
this._repaint();
newStack = null;
},
_repaint: function () {
var newChilds = $( $.parseTmpl( this.tpl, this.data("options") ) );
//重新渲染
this.root().html( newChilds.html() );
newChilds = null;
}
};
} )(), 'menu' );
})();
//dropmenu 类
KM.ui.define( 'dropmenu', {
tmpl: '<ul class="kmui-dropdown-menu" aria-labelledby="dropdownMenu" >' +
'<%if(data && data.length){for(var i=0,ci;ci=data[i++];){%>' +
'<%if(ci.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li id="<%= ci.id%>" <%if(ci.active||ci.disabled){%>class="<%= ci.active|| \'\' %> <%=ci.disabled||\'\' %>" <%}%> data-value="<%= ci.value%>" data-label="<%= ci.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= ci.label%></a>' +
'</li><%}}%>' +
'<%}%>' +
'</ul>',
subTmpl: '<%if(data && data.length){for(var i=0,ci;ci=data[i++];){%>' +
'<%if(ci.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li <%if(ci.active||ci.disabled){%>class="<%= ci.active|| \'\' %> <%=ci.disabled||\'\' %>" <%}%> data-value="<%= ci.value%>" data-label="<%= ci.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= ci.label%></a>' +
'</li><%}}%>' +
'<%}%>',
defaultOpt: {
data: [],
anchor: 'top',
click: function () {}
},
setData: function ( items ) {
this.root().html( $.parseTmpl( this.subTmpl, items ) );
return this;
},
position: function ( offset ) {
this.root().css( {
left: offset.x,
top: offset.y
} );
return this;
},
show: function () {
if ( this.trigger( 'beforeshow' ) === false ) {
return;
} else {
this.root().css( {
display: 'block'
} );
this.trigger( 'aftershow' );
}
return this;
},
init: function ( options ) {
var me = this;
var eventName = {
click: 1,
mouseover: 1,
mouseout: 1
};
this.root( $( $.parseTmpl( this.tmpl, options ) ) ).on( 'click', 'li[class!="kmui-disabled kmui-divider kmui-dropdown-submenu"]', function ( evt ) {
$.proxy( options.click, me, evt, $( this ).data( 'value' ), $( this ).data( 'label' ), $( this ) )();
} ).find( 'li' ).each( function ( i, el ) {
var $this = $( this );
if ( !$this.hasClass( "kmui-disabled kmui-divider kmui-dropdown-submenu" ) ) {
var data = options.data[ i ];
$.each( eventName, function ( k ) {
if ( data[ k ] ) {
$this[ k ]( function ( evt ) {
$.proxy( data[ k ], el )( evt, data, me.root );
} );
}
} );
}
} );
},
_initEvent: function () {
this.root().on( 'mouseover', 'li[class="kmui-dropdown-submenu', function ( e ) {
var $submenu = $( this ).data( 'widget' );
$submenu.kmui().show( $( this ), 'right', 'position', 5, 2 );
} );
},
disabled: function ( cb ) {
$( 'li[class!=kmui-divider]', this.root() ).each( function () {
var $el = $( this );
if ( cb === true ) {
$el.addClass( 'kmui-disabled' );
} else if ( $.isFunction( cb ) ) {
$el.toggleClass( 'kmui-disabled', cb( $el ) );
} else {
$el.removeClass( 'kmui-disabled' );
}
} );
},
val: function ( val ) {
var currentVal;
$( 'li[class!="kmui-divider kmui-disabled kmui-dropdown-submenu"]', this.root() ).each( function () {
var $el = $( this );
if ( val === undefined ) {
if ( $el.find( 'em.kmui-dropmenu-checked' ).length ) {
currentVal = $el.data( 'value' );
return false;
}
} else {
$el.find( 'em' ).toggleClass( 'kmui-dropmenu-checked', $el.data( 'value' ) == val );
}
} );
if ( val === undefined ) {
return currentVal;
}
},
appendItem: function ( item ) {
var itemTpl = '<%if(item.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li id="<%= item.id%>" <%if(item.active||item.disabled){%>class="<%= item.active|| \'\' %> <%=item.disabled||\'\' %>" <%}%> data-value="<%= item.value%>" data-label="<%= item.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= item.label%></a>' +
'</li><%}%>';
var html = $.parseTmpl( itemTpl, item );
var $item = $( html ).click( item.click );
this.root().append( $item );
return $item;
},
addSubmenu: function ( label, menu, index ) {
index = index || 0;
var $list = $( 'li[class!=kmui-divider]', this.root() );
var $node = $( '<li class="kmui-dropdown-submenu"><a tabindex="-1" href="#">' + label + '</a></li>' ).append( menu );
$node.data( 'widget', menu );
if ( index >= 0 && index < $list.length ) {
$node.insertBefore( $list[ index ] );
} else if ( index < 0 ) {
$node.insertBefore( $list[ 0 ] );
} else if ( index >= $list.length ) {
$node.appendTo( $list );
}
}
}, 'menu' );
\ No newline at end of file
/*! jQuery UI - v1.10.4 - 2014-02-18
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);
\ No newline at end of file
//menu 类
KM.ui.define('menu',{
show : function($obj,dir,fnname,topOffset,leftOffset){
fnname = fnname || 'position';
if(this.trigger('beforeshow') === false){
return;
}else{
this.root().css($.extend({display:'block'},$obj ? {
top : $obj[fnname]().top + ( dir == 'right' ? 0 : $obj.outerHeight()) - (topOffset || 0),
left : $obj[fnname]().left + (dir == 'right' ? $obj.outerWidth() : 0) - (leftOffset || 0)
}:{}))
this.trigger('aftershow');
}
$obj.addClass('active');
},
hide : function(all){
var $parentmenu;
if(this.trigger('beforehide') === false){
return;
} else {
if($parentmenu = this.root().data('parentmenu')){
if($parentmenu.data('parentmenu')|| all)
$parentmenu.kmui().hide();
}
this.root().css('display','none');
this.trigger('afterhide');
}
var $obj = this.data('$mergeObj');
if ($obj) $obj.removeClass('active');
},
attachTo : function($obj){
var me = this;
if(!$obj.data('$mergeObj')){
$obj.data('$mergeObj',me.root());
if($obj.kmui()){
$obj.on('wrapclick',function(evt){
me.supper.show.call(me,$obj,'','offset',15)
});
}else{
$obj.on('click',function(evt){
me.supper.show.call(me,$obj,'','offset',15)
})
}
me.register('click',$obj,function(evt){
me.hide()
});
me.data('$mergeObj',$obj)
}
}
});
\ No newline at end of file
/*modal 类*/
KM.ui.define( 'modal', {
tpl: '<div class="kmui-modal" tabindex="-1" >' +
'<div class="kmui-modal-header">' +
'<div class="kmui-close" data-hide="modal"></div>' +
'<h3 class="kmui-title"><%=title%></h3>' +
'</div>' +
'<div class="kmui-modal-body" style="<%if(width){%>width:<%=width%>px;<%}%>' +
'<%if(height){%>height:<%=height%>px;<%}%>">' +
' </div>' +
'<% if(cancellabel || oklabel) {%>' +
'<div class="kmui-modal-footer">' +
'<div class="kmui-modal-tip"></div>' +
'<%if(oklabel){%><div class="kmui-btn kmui-btn-primary" data-ok="modal"><%=oklabel%></div><%}%>' +
'<%if(cancellabel){%><div class="kmui-btn" data-hide="modal"><%=cancellabel%></div><%}%>' +
'</div>' +
'<%}%></div>',
defaultOpt: {
title: "",
cancellabel: "",
oklabel: "",
width: '',
height: '',
backdrop: true,
keyboard: true
},
init: function ( options ) {
var me = this;
me.root( $( $.parseTmpl( me.tpl, options || {} ) ) );
me.data( "options", options );
if ( options.okFn ) {
me.on( 'ok', $.proxy( options.okFn, me ) )
}
if ( options.cancelFn ) {
me.on( 'beforehide', $.proxy( options.cancelFn, me ) )
}
me.root().delegate( '[data-hide="modal"]', 'click', $.proxy( me.hide, me ) )
.delegate( '[data-ok="modal"]', 'click', $.proxy( me.ok, me ) );
$( '[data-hide="modal"],[data-ok="modal"]', me.root() ).hover( function () {
$( this ).toggleClass( 'kmui-hover' )
} );
setTimeout( function () {
$( '.kmui-modal' ).draggable( {
handle: '.kmui-modal-header'
} );
}, 100 );
},
toggle: function () {
var me = this;
return me[ !me.data( "isShown" ) ? 'show' : 'hide' ]();
},
show: function () {
var me = this;
me.trigger( "beforeshow" );
if ( me.data( "isShown" ) ) return;
me.data( "isShown", true );
me.escape();
me.backdrop( function () {
me.autoCenter();
me.root()
.show()
.focus()
.trigger( 'aftershow' );
} );
$( '.kmui-modal' ).draggable( {
handle: '.kmui-modal-header'
} );
},
showTip: function ( text ) {
$( '.kmui-modal-tip', this.root() ).html( text ).fadeIn();
},
hideTip: function ( text ) {
$( '.kmui-modal-tip', this.root() ).fadeOut( function () {
$( this ).html( '' );
} );
},
autoCenter: function () {
//ie6下不用处理了
!$.IE6 && this.root().css( "margin-left", -( this.root().width() / 2 ) );
},
hide: function () {
var me = this;
me.trigger( "beforehide" );
if ( !me.data( "isShown" ) ) return;
me.data( "isShown", false );
me.escape();
me.hideModal();
},
escape: function () {
var me = this;
if ( me.data( "isShown" ) && me.data( "options" ).keyboard ) {
me.root().on( 'keyup', function ( e ) {
e.which == 27 && me.hide();
} )
} else if ( !me.data( "isShown" ) ) {
me.root().off( 'keyup' );
}
},
hideModal: function () {
var me = this;
me.root().hide();
me.backdrop( function () {
me.removeBackdrop();
me.trigger( 'afterhide' );
} )
},
removeBackdrop: function () {
this.$backdrop && this.$backdrop.remove();
this.$backdrop = null;
},
backdrop: function ( callback ) {
var me = this;
if ( me.data( "isShown" ) && me.data( "options" ).backdrop ) {
me.$backdrop = $( '<div class="kmui-modal-backdrop" />' ).click(
me.data( "options" ).backdrop == 'static' ?
$.proxy( me.root()[ 0 ].focus, me.root()[ 0 ] ) : $.proxy( me.hide, me )
)
}
me.trigger( 'afterbackdrop' );
callback && callback();
},
attachTo: function ( $obj ) {
var me = this
if ( !$obj.data( '$mergeObj' ) ) {
$obj.data( '$mergeObj', me.root() );
$obj.on( 'wrapclick', function () {
me.toggle( $obj )
} );
me.data( '$mergeObj', $obj )
}
},
ok: function () {
var me = this;
me.trigger( 'beforeok' );
if ( me.trigger( "ok", me ) === false ) {
return;
}
me.hide();
},
getBodyContainer: function () {
return this.root().find( '.kmui-modal-body' )
}
} );
\ No newline at end of file
//popup 类
KM.ui.define('popup', {
tpl: '<div class="kmui-dropdown-menu kmui-popup"'+
'<%if(!<%=stopprop%>){%>onmousedown="return false"<%}%>'+
'><div class="kmui-popup-body" unselectable="on" onmousedown="return false"><%=subtpl%></div>' +
'<div class="kmui-popup-caret"></div>' +
'</div>',
defaultOpt: {
stopprop:false,
subtpl: '',
width: '',
height: ''
},
init: function (options) {
this.root($($.parseTmpl(this.tpl, options)));
return this;
},
mergeTpl: function (data) {
return $.parseTmpl(this.tpl, {subtpl: data});
},
show: function ($obj, posObj) {
if (!posObj) posObj = {};
var fnname = posObj.fnname || 'position';
if (this.trigger('beforeshow') === false) {
return;
} else {
this.root().css($.extend({display: 'block'}, $obj ? {
top: $obj[fnname]().top + ( posObj.dir == 'right' ? 0 : $obj.outerHeight()) - (posObj.offsetTop || 0),
left: $obj[fnname]().left + (posObj.dir == 'right' ? $obj.outerWidth() : 0) - (posObj.offsetLeft || 0),
position: 'absolute'
} : {}));
this.root().find('.kmui-popup-caret').css({
top: posObj.caretTop || 0,
left: posObj.caretLeft || 0,
position: 'absolute'
}).addClass(posObj.caretDir || "up")
}
this.trigger("aftershow");
},
hide: function () {
this.root().css('display', 'none');
this.trigger('afterhide');
},
attachTo: function ($obj, posObj) {
var me = this
if (!$obj.data('$mergeObj')) {
$obj.data('$mergeObj', me.root());
$obj.on('wrapclick', function (evt) {
me.show($obj, posObj)
});
me.register('click', $obj, function (evt) {
me.hide()
});
me.data('$mergeObj', $obj)
}
},
getBodyContainer: function () {
return this.root().find(".kmui-popup-body");
}
});
\ No newline at end of file
//scale 类
KM.ui.define('scale', {
tpl: '<div class="kmui-scale" unselectable="on">' +
'<span class="kmui-scale-hand0"></span>' +
'<span class="kmui-scale-hand1"></span>' +
'<span class="kmui-scale-hand2"></span>' +
'<span class="kmui-scale-hand3"></span>' +
'<span class="kmui-scale-hand4"></span>' +
'<span class="kmui-scale-hand5"></span>' +
'<span class="kmui-scale-hand6"></span>' +
'<span class="kmui-scale-hand7"></span>' +
'</div>',
defaultOpt: {
$doc: $(document),
$wrap: $(document)
},
init: function (options) {
if(options.$doc) this.defaultOpt.$doc = options.$doc;
if(options.$wrap) this.defaultOpt.$wrap = options.$wrap;
this.root($($.parseTmpl(this.tpl, options)));
this.initStyle();
this.startPos = this.prePos = {x: 0, y: 0};
this.dragId = -1;
return this;
},
initStyle: function () {
utils.cssRule('kmui-style-scale', '.kmui-scale{display:none;position:absolute;border:1px solid #38B2CE;cursor:hand;}' +
'.kmui-scale span{position:absolute;left:0;top:0;width:7px;height:7px;overflow:hidden;font-size:0px;display:block;background-color:#3C9DD0;}'
+ '.kmui-scale .kmui-scale-hand0{cursor:nw-resize;top:0;margin-top:-4px;left:0;margin-left:-4px;}'
+ '.kmui-scale .kmui-scale-hand1{cursor:n-resize;top:0;margin-top:-4px;left:50%;margin-left:-4px;}'
+ '.kmui-scale .kmui-scale-hand2{cursor:ne-resize;top:0;margin-top:-4px;left:100%;margin-left:-3px;}'
+ '.kmui-scale .kmui-scale-hand3{cursor:w-resize;top:50%;margin-top:-4px;left:0;margin-left:-4px;}'
+ '.kmui-scale .kmui-scale-hand4{cursor:e-resize;top:50%;margin-top:-4px;left:100%;margin-left:-3px;}'
+ '.kmui-scale .kmui-scale-hand5{cursor:sw-resize;top:100%;margin-top:-3px;left:0;margin-left:-4px;}'
+ '.kmui-scale .kmui-scale-hand6{cursor:s-resize;top:100%;margin-top:-3px;left:50%;margin-left:-4px;}'
+ '.kmui-scale .kmui-scale-hand7{cursor:se-resize;top:100%;margin-top:-3px;left:100%;margin-left:-3px;}');
},
_eventHandler: function (e) {
var me = this,
$doc = me.defaultOpt.$doc;
switch (e.type) {
case 'mousedown':
var hand = e.target || e.srcElement, hand;
if (hand.className.indexOf('kmui-scale-hand') != -1) {
me.dragId = hand.className.slice(-1);
me.startPos.x = me.prePos.x = e.clientX;
me.startPos.y = me.prePos.y = e.clientY;
$doc.bind('mousemove', $.proxy(me._eventHandler, me));
}
break;
case 'mousemove':
if (me.dragId != -1) {
me.updateContainerStyle(me.dragId, {x: e.clientX - me.prePos.x, y: e.clientY - me.prePos.y});
me.prePos.x = e.clientX;
me.prePos.y = e.clientY;
me.updateTargetElement();
}
break;
case 'mouseup':
if (me.dragId != -1) {
me.dragId = -1;
me.updateTargetElement();
var $target = me.data('$scaleTarget');
if ($target.parent()) me.attachTo(me.data('$scaleTarget'));
}
$doc.unbind('mousemove', $.proxy(me._eventHandler, me));
break;
default:
break;
}
},
updateTargetElement: function () {
var me = this,
$root = me.root(),
$target = me.data('$scaleTarget');
$target.css({width: $root.width(), height: $root.height()});
me.attachTo($target);
},
updateContainerStyle: function (dir, offset) {
var me = this,
$dom = me.root(),
tmp,
rect = [
//[left, top, width, height]
[0, 0, -1, -1],
[0, 0, 0, -1],
[0, 0, 1, -1],
[0, 0, -1, 0],
[0, 0, 1, 0],
[0, 0, -1, 1],
[0, 0, 0, 1],
[0, 0, 1, 1]
];
if (rect[dir][0] != 0) {
tmp = parseInt($dom.offset().left) + offset.x;
$dom.css('left', me._validScaledProp('left', tmp));
}
if (rect[dir][1] != 0) {
tmp = parseInt($dom.offset().top) + offset.y;
$dom.css('top', me._validScaledProp('top', tmp));
}
if (rect[dir][2] != 0) {
tmp = $dom.width() + rect[dir][2] * offset.x;
$dom.css('width', me._validScaledProp('width', tmp));
}
if (rect[dir][3] != 0) {
tmp = $dom.height() + rect[dir][3] * offset.y;
$dom.css('height', me._validScaledProp('height', tmp));
}
},
_validScaledProp: function (prop, value) {
var $ele = this.root(),
$wrap = this.defaultOpt.$doc,
calc = function(val, a, b){
return (val + a) > b ? b - a : value;
};
value = isNaN(value) ? 0 : value;
switch (prop) {
case 'left':
return value < 0 ? 0 : calc(value, $ele.width(), $wrap.width());
case 'top':
return value < 0 ? 0 : calc(value, $ele.height(),$wrap.height());
case 'width':
return value <= 0 ? 1 : calc(value, $ele.offset().left, $wrap.width());
case 'height':
return value <= 0 ? 1 : calc(value, $ele.offset().top, $wrap.height());
}
},
show: function ($obj) {
var me = this;
if ($obj) me.attachTo($obj);
me.root().bind('mousedown', $.proxy(me._eventHandler, me));
me.defaultOpt.$doc.bind('mouseup', $.proxy(me._eventHandler, me));
me.root().show();
me.trigger("aftershow");
},
hide: function () {
var me = this;
me.root().unbind('mousedown', $.proxy(me._eventHandler, me));
me.defaultOpt.$doc.unbind('mouseup', $.proxy(me._eventHandler, me));
me.root().hide();
me.trigger('afterhide')
},
attachTo: function ($obj) {
var me = this,
imgPos = $obj.offset(),
$root = me.root(),
$wrap = me.defaultOpt.$wrap,
posObj = $wrap.offset();
me.data('$scaleTarget', $obj);
me.root().css({
position: 'absolute',
width: $obj.width(),
height: $obj.height(),
left: imgPos.left - posObj.left - parseInt($wrap.css('border-left-width')) - parseInt($root.css('border-left-width')),
top: imgPos.top - posObj.top - parseInt($wrap.css('border-top-width')) - parseInt($root.css('border-top-width'))
});
},
getScaleTarget: function () {
return this.data('$scaleTarget')[0];
}
});
\ No newline at end of file
//button 类
KM.ui.define('separator', {
tpl: '<div class="kmui-separator" unselectable="on" onmousedown="return false" ></div>',
init: function (options) {
var me = this;
me.root($($.parseTmpl(me.tpl, options)));
return me;
}
});
\ No newline at end of file
//splitbutton 类
///import button
KM.ui.define('splitbutton',{
tpl :'<div class="kmui-splitbutton <%if (name){%>kmui-splitbutton-<%= name %><%}%>" unselectable="on" <%if(title){%>data-original-title="<%=title%>"<%}%>><div class="kmui-btn" unselectable="on" ><%if(icon){%><div unselectable="on" class="kmui-icon-<%=icon%> kmui-icon"></div><%}%><%if(text){%><%=text%><%}%></div>'+
'<div unselectable="on" class="kmui-btn kmui-dropdown-toggle" >'+
'<div unselectable="on" class="kmui-caret"><\/div>'+
'</div>'+
'</div>',
defaultOpt:{
text:'',
title:'',
click:function(){}
},
init : function(options){
var me = this;
me.root( $($.parseTmpl(me.tpl,options)));
me.root().find('.kmui-btn:first').click(function(evt){
if(!me.disabled()){
$.proxy(options.click,me)();
}
});
me.root().find('.kmui-dropdown-toggle').click(function(){
if(!me.disabled()){
me.trigger('arrowclick')
}
});
me.root().hover(function () {
if(!me.root().hasClass("kmui-disabled")){
me.root().toggleClass('kmui-hover')
}
});
return me;
},
wrapclick:function(fn,evt){
if(!this.disabled()){
$.proxy(fn,this,evt)()
}
return this;
},
disabled : function(state){
if(state === undefined){
return this.root().hasClass('kmui-disabled')
}
this.root().toggleClass('kmui-disabled',state).find('.kmui-btn').toggleClass('kmui-disabled',state);
return this;
},
active:function(state){
if(state === undefined){
return this.root().hasClass('kmui-active')
}
this.root().toggleClass('kmui-active',state).find('.kmui-btn:first').toggleClass('kmui-active',state);
return this;
},
mergeWith:function($obj){
var me = this;
me.data('$mergeObj',$obj);
$obj.kmui().data('$mergeObj',me.root());
if(!$.contains(document.body,$obj[0])){
$obj.appendTo(me.root());
}
me.root().delegate('.kmui-dropdown-toggle','click',function(){
me.wrapclick(function(){
$obj.kmui().show();
})
});
me.register('click',me.root().find('.kmui-dropdown-toggle'),function(evt){
$obj.hide()
});
}
});
\ No newline at end of file
/*tab 类*/
KM.ui.define('tab', {
init: function (options) {
var me = this,
slr = options.selector;
if ($.type(slr)) {
me.root($(slr, options.context));
me.data("context", options.context);
$(slr, me.data("context")).on('click', function (e) {
me.show(e);
});
}
},
show: function (e) {
var me = this,
$cur = $(e.target),
$ul = $cur.closest('ul'),
selector,
previous,
$target,
e;
selector = $cur.attr('data-context');
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '');
var $tmp = $cur.parent('li');
if (!$tmp.length || $tmp.hasClass('kmui-active')) return;
previous = $ul.find('.kmui-active:last a')[0];
e = $.Event('beforeshow', {
target: $cur[0],
relatedTarget: previous
});
me.trigger(e);
if (e.isDefaultPrevented()) return;
$target = $(selector, me.data("context"));
me.activate($cur.parent('li'), $ul);
me.activate($target, $target.parent(), function () {
me.trigger({
type: 'aftershow', relatedTarget: previous
})
});
},
activate: function (element, container, callback) {
if (element === undefined) {
return $(".kmui-tab-item.kmui-active",this.root()).index();
}
var $active = container.find('> .kmui-active');
$active.removeClass('kmui-active');
element.addClass('kmui-active');
callback && callback();
}
});
//toolbar 类
(function () {
KM.ui.define('toolbar', {
tpl: '<div class="kmui-toolbar" ><div class="kmui-btn-toolbar" unselectable="on" onmousedown="return false" ></div></div>'
,
init: function () {
var $root = this.root($(this.tpl));
this.data('$btnToolbar', $root.find('.kmui-btn-toolbar'))
},
appendToBtnmenu : function(data){
var $cont = this.data('$btnToolbar');
data = $.isArray(data) ? data : [data];
$.each(data,function(i,$item){
$cont.append($item)
})
}
});
})();
/*tooltip 类*/
KM.ui.define('tooltip', {
tpl: '<div class="kmui-tooltip" unselectable="on" onmousedown="return false"><div class="kmui-tooltip-arrow" unselectable="on" onmousedown="return false"></div><div class="kmui-tooltip-inner" unselectable="on" onmousedown="return false"></div></div>',
init: function (options) {
var me = this;
me.root($($.parseTmpl(me.tpl, options || {})));
},
content: function (e) {
var me = this,
title = $(e.currentTarget).attr("data-original-title");
me.root().find('.kmui-tooltip-inner')['text'](title);
},
position: function (e) {
var me = this,
$obj = $(e.currentTarget);
me.root().css($.extend({display: 'block'}, $obj ? {
top: $obj.outerHeight(),
left: (($obj.outerWidth() - me.root().outerWidth()) / 2)
} : {}))
},
show: function (e) {
if ($(e.currentTarget).hasClass('kmui-disabled')) return;
var me = this;
me.content(e);
me.root().appendTo($(e.currentTarget));
me.position(e);
me.root().css('display', 'block');
},
hide: function () {
var me = this;
me.root().css('display', 'none')
},
attachTo: function ($obj) {
var me = this;
function tmp($obj) {
var me = this;
if (!$.contains(document.body, me.root()[0])) {
me.root().appendTo($obj);
}
me.data('tooltip', me.root());
$obj.each(function () {
if ($(this).attr("data-original-title")) {
$(this).on('mouseenter', $.proxy(me.show, me))
.on('mouseleave click', $.proxy(me.hide, me))
}
});
}
if ($.type($obj) === "undefined") {
$("[data-original-title]").each(function (i, el) {
tmp.call(me, $(el));
})
} else {
if (!$obj.data('tooltip')) {
tmp.call(me, $obj);
}
}
}
});
(function ($) {
//对jquery的扩展
$.parseTmpl = function parse(str, data) {
var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' + 'with(obj||{}){__p.push(\'' + str.replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/<%=([\s\S]+?)%>/g,function (match, code) {
return "'," + code.replace(/\\'/g, "'") + ",'";
}).replace(/<%([\s\S]+?)%>/g,function (match, code) {
return "');" + code.replace(/\\'/g, "'").replace(/[\r\n\t]/g, ' ') + "__p.push('";
}).replace(/\r/g, '\\r').replace(/\n/g, '\\n').replace(/\t/g, '\\t') + "');}return __p.join('');";
var func = new Function('obj', tmpl);
return data ? func(data) : func;
};
$.extend2 = function (t, s) {
var a = arguments,
notCover = $.type(a[a.length - 1]) == 'boolean' ? a[a.length - 1] : false,
len = $.type(a[a.length - 1]) == 'boolean' ? a.length - 1 : a.length;
for (var i = 1; i < len; i++) {
var x = a[i];
for (var k in x) {
if (!notCover || !t.hasOwnProperty(k)) {
t[k] = x[k];
}
}
}
return t;
};
$.IE6 = !!window.ActiveXObject && parseFloat(navigator.userAgent.match(/msie (\d+)/i)[1]) == 6;
//所有ui的基类
var _eventHandler = [];
var _widget = function () {
};
var _prefix = 'kmui';
_widget.prototype = {
on: function (ev, cb) {
this.root().on(ev, $.proxy(cb, this));
return this;
},
off: function (ev, cb) {
this.root().off(ev, $.proxy(cb, this));
return this;
},
trigger: function (ev, data) {
return this.root().trigger(ev, data) === false ? false : this;
},
root: function ($el) {
return this._$el || (this._$el = $el);
},
destroy: function () {
},
data: function (key, val) {
if (val !== undefined) {
this.root().data(_prefix + key, val);
return this;
} else {
return this.root().data(_prefix + key)
}
},
register: function (eventName, $el, fn) {
_eventHandler.push({
'evtname': eventName,
'$els': $.isArray($el) ? $el : [$el],
handler: $.proxy(fn, $el)
})
}
};
//从jq实例上拿到绑定的widget实例
$.fn.kmui = function (obj) {
return obj ? this.data('kmuiwidget', obj) : this.data('kmuiwidget');
};
function _createClass(ClassObj, properties, supperClass) {
ClassObj.prototype = $.extend2(
$.extend({}, properties),
(KM.ui[supperClass] || _widget).prototype,
true
);
ClassObj.prototype.supper = (KM.ui[supperClass] || _widget).prototype;
//父class的defaultOpt 合并
if( KM.ui[supperClass] && KM.ui[supperClass].prototype.defaultOpt ) {
var parentDefaultOptions = KM.ui[supperClass].prototype.defaultOpt,
subDefaultOptions = ClassObj.prototype.defaultOpt;
ClassObj.prototype.defaultOpt = $.extend( {}, parentDefaultOptions, subDefaultOptions || {} );
}
return ClassObj
}
var _guid = 1;
function mergeToJQ(ClassObj, className) {
$[_prefix + className] = ClassObj;
$.fn[_prefix + className] = function (opt) {
var result, args = Array.prototype.slice.call(arguments, 1);
this.each(function (i, el) {
var $this = $(el);
var obj = $this.kmui();
if (!obj) {
ClassObj(!opt || !$.isPlainObject(opt) ? {} : opt, $this);
$this.kmui(obj)
}
if ($.type(opt) == 'string') {
if (opt == 'this') {
result = obj;
} else {
result = obj[opt].apply(obj, args);
if (result !== obj && result !== undefined) {
return false;
}
result = null;
}
}
});
return result !== null ? result : this;
}
}
KM.ui = {
define: function (className, properties, supperClass) {
var ClassObj = KM.ui[className] = _createClass(function (options, $el) {
var _obj = function () {
};
$.extend(_obj.prototype, ClassObj.prototype, {
guid: className + _guid++,
widgetName: className
}
);
var obj = new _obj;
if ($.type(options) == 'string') {
obj.init && obj.init({});
obj.root().kmui(obj);
obj.root().find('a').click(function (evt) {
evt.preventDefault()
});
return obj.root()[_prefix + className].apply(obj.root(), arguments)
} else {
$el && obj.root($el);
obj.init && obj.init(utils.clonePlainObject(!options || $.isPlainObject(options) ? $.extend2(options || {}, obj.defaultOpt || {}, true) : options));
try{
obj.root().find('a').click(function (evt) {
evt.preventDefault()
});
}catch(e){
}
return obj.root().kmui(obj);
}
},properties, supperClass);
mergeToJQ(ClassObj, className);
}
};
$(function () {
$(document).on('click mouseup mousedown dblclick mouseover', function (evt) {
$.each(_eventHandler, function (i, obj) {
if (obj.evtname == evt.type) {
$.each(obj.$els, function (i, $el) {
if ($el[0] !== evt.target && !$.contains($el[0], evt.target)) {
obj.handler(evt);
}
})
}
})
})
})
})(jQuery);
\ No newline at end of file
KityMinder.registerUI('account', function(minder) {
});
\ No newline at end of file
KityMinder.registerUI('mainmenu.header', ['mainmenu'], function (minder, $mainmenu) {
var $header = $('<div class="main-menu-header"></div>').appendTo($mainmenu);
var $backPanel = $('<div class="main-menu-back-panel"></div>').appendTo($header);
var $titlePanel = $('<div class="main-menu-title"></div>').appendTo($header);
var $backButton = new FUI.Button({
className: 'main-menu-back-button',
label: minder.getLang('ui.back')
}).appendTo($backPanel[0]).on('click', function() {
$mainmenu.removeClass('show');
});
return $header;
});
\ No newline at end of file
KityMinder.registerUI('mainmenu', function(minder) { KityMinder.registerUI('mainmenu', function(minder) {
var $button = new FUI.Button({ var $mainMenuButton = new FUI.Button({
id: 'main-menu-btn' id: 'main-menu-btn'
}); });
var $panel; var $panel;
$button.setLabel('百度脑图'); $mainMenuButton.setLabel('百度脑图');
$button.appendTo(document.getElementById('panel')); $mainMenuButton.appendTo(document.getElementById('panel'));
$button.on('click', function(e) { $mainMenuButton.on('click', function(e) {
$panel.addClass('show'); $panel.addClass('show');
}); });
$panel = $('<div id="main-menu"></div>').appendTo('body'); $panel = $('<div id="main-menu"></div>').appendTo('body');
$panel.click(function() {
$panel.removeClass('show');
});
return $panel; return $panel.addClass('show');
}); });
\ No newline at end of file
KityMinder.registerUI('mainmenu.level1', ['mainmenu'], function (minder, $mainmenu) {
var tabs = ['open', 'save', 'share', 'help'];
var $l1_tabs = new FUI.Tabs({
buttons: tabs.map(function(key) {
return minder.getLang('ui.menu.level1.' + key);
}),
className: 'main-menu-level-1'
});
$l1_tabs.appendTo($mainmenu[0]);
$l1_tabs.select(0);
var ret = {};
tabs.forEach(function(key, index) {
ret[key] = $l1_tabs.getPanel(index);
});
return ret;
});
\ No newline at end of file
KityMinder.registerUI('popupmenu', function() {
$('body').on('mousedown', function() {
$('.popup-menu').removeClass('show');
});
function update() {
}
return {
generate: function(list) {
var $ul = $('<ul>').addClass('popup-menu');
return {
update: function(list) {
}
};
}
};
});
\ No newline at end of file
KityMinder.registerUI('search', function(minder) {
var $search = $('<div id="search"><input type="search" /></div>').appendTo('#panel');
return $search;
});
\ No newline at end of file
KityMinder.registerUI('tabs', function(minder) { KityMinder.registerUI('tabs', function(minder) {
var $tab = new FUI.Tabs({ var $tab = new FUI.Tabs({
buttons: ['思路', '展现', '视图'] buttons: ['idea', 'appearence', 'view'].map(function(key) {
return minder.getLang('ui.tabs.' + key);
})
}); });
var $header = $('<div id="tab-select"></div>').appendTo('#panel'); var $header = $('<div id="tab-select"></div>').appendTo('#panel');
......
...@@ -38,11 +38,21 @@ html, body { ...@@ -38,11 +38,21 @@ html, body {
} }
#panel { #panel {
background: hsl(224, 16%, 27%); background: @ui-color;
font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei'; font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei';
height: @panel-height; height: @panel-height;
overflow: visible; overflow: visible;
position: relative; position: relative;
h1 {
font-size: 14px;
height: @panel-height;
line-height: @panel-height;
margin: 0;
text-align: center;
font-weight: normal;
color: @ui-fore;
}
} }
.fui-widget { .fui-widget {
......
@import "_vars"; @import "_vars";
@main-menu-btn-color: #ff6e6e;
#main-menu-btn { #main-menu-btn {
display: block; display: block;
float: left; float: left;
...@@ -10,12 +8,12 @@ ...@@ -10,12 +8,12 @@
padding: 0 30px 0 15px; padding: 0 30px 0 15px;
z-index: 11; z-index: 11;
background-color: @main-menu-btn-color; background-color: @main-menu-theme-color;
&:hover { &:hover {
background-color: lighten(@main-menu-btn-color, 5%) !important; background-color: lighten(@main-menu-theme-color, 5%) !important;
} }
&:active { &:active {
background-color: darken(@main-menu-btn-color, 5%) !important; background-color: darken(@main-menu-theme-color, 5%) !important;
} }
.fui-label { .fui-label {
...@@ -41,16 +39,120 @@ ...@@ -41,16 +39,120 @@
} }
#main-menu { #main-menu {
@left-width: 200px;
position: absolute; position: absolute;
background: gray; background: gray;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0;
overflow: hidden;
opacity: 0; opacity: 0;
.transition(opacity ease 0.2s); .transition(all ease 0.2s);
.transform(translateX(-100%));
&.show { &.show {
bottom: 0; bottom: 0;
opacity: 1; opacity: 1;
.transform(translateX(0));
}
&:before {
content: ' ';
display: block;
position: absolute;
top: 0;
left: @left-width;
right: 0;
bottom: 10px;
box-shadow: 0 -3px 8px rgba(0,0,0,.15);
z-index: 1;
}
.main-menu- {
&header {
background: white;
height: @panel-height;
}
&back-panel {
background-color: @main-menu-theme-color;
float: left;
width: @left-width;
height: @panel-height;
.main-menu-back-button {
.fui-label {
display: none;
}
.fui-icon {
display: block;
width: 25px;
height: 25px;
background: url(../images/icons.png) -1px -370px;
}
width: 25px;
height: 25px;
border-radius: 100%;
border: 2px solid white;
left: 5px;
top: 5px;
cursor: pointer;
&:hover {
background-color: rgba(255,255,255,.3);
}
&:active {
background-color: rgba(0,0,0,.05);
}
}
}
&title {
margin-left: @left-width;
height: @panel-height;
display: block;
background: white;
z-index: 2;
}
&level-1 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: @panel-height;
.fui-tabs- {
&button-wrap {
width: @left-width;
position: absolute;
background-color: @main-menu-theme-color;
left: 0;
top: 0;
bottom: 0;
.fui-button {
display: block;
text-align: right;
height: 50px;
.fui-label {
height: 50px;
line-height: 50px;
color: white;
padding-right: 20px;
font-size: 16px;
}
}
}
&panel-wrap {
position: absolute;
top: 0;
left: @left-width;
right: 0;
bottom: 0;
background-color: white;
z-index: 2;
}
}
}
} }
} }
\ No newline at end of file
@import "_vars";
@import "_vendor";
#search {
float: right;
position: relative;
&:after {
content: ' ';
display: block;
position: absolute;
width: 24px;
height: 24px;
left: 5px;
top: 7px;
background: url(../images/icons.png) no-repeat 0 -345px;
}
input[type=search] {
background: @tab-hover;
border: none;
height: 20px;
line-height: 20px;
border-radius: 15px;
outline: none;
color: @ui-fore;
padding: 5px 10px 5px 30px;
box-sizing: content-box;
margin-top: 5px;
margin-right: 3px;
width: 30px;
.transition(width .5s ease);
.transform(translateZ(0));
&:focus {
width: 150px;
}
}
}
\ No newline at end of file
#panel div.user-panel {
float: right;
height: @panel-height;
line-height: @panel-height;
.fui-button {
padding: 5px 10px;
height: @panel-height - 10px;
line-height: @panel-height - 10px;
&:hover {
background-color: @tab-hover;
}
&:active {
background-color: @tab-active;
}
.fui-label {
font-size: 14px;
color: @ui-fore;
vertical-align: baseline;
}
&.user-button .fui-label {
display: none;
}
.fui-icon {
vertical-align: baseline;
border-radius: 100%;
img {
width: 30px;
height: 30px;
}
}
&.login-button .fui-icon {
width: 25px;
height: 25px;
margin-right: 3px;
vertical-align: baseline;
background: url(../images/icons.png) 0 -320px;
}
}
}
\ No newline at end of file
@panel-height: 40px; @panel-height: 40px;
@main-menu-theme-color: hsl(0, 95%, 75%);
@tab-hover: #5a6378; @tab-hover: #5a6378;
@tab-active: darken(@tab-hover, 10%); @tab-active: darken(@tab-hover, 10%);
@button-border: #c9ced1; @button-border: #c9ced1;
...@@ -8,3 +9,4 @@ ...@@ -8,3 +9,4 @@
@button-pressed: hsl(222, 55%, 90%); @button-pressed: hsl(222, 55%, 90%);
@border-color: #c9ced1; @border-color: #c9ced1;
@ui-color: #393f4f; @ui-color: #393f4f;
@ui-fore: white;
\ No newline at end of file
...@@ -198,7 +198,10 @@ ...@@ -198,7 +198,10 @@
padding: 5px; padding: 5px;
.fui-close-button { .fui-close-button {
.fui-close-button-icon { display: none; } .fui-close-button-icon {
display: none;
background: none;
}
position: absolute; position: absolute;
right: 6px; right: 6px;
top: 7px; top: 7px;
......
/**
* 所有构件样式规则
**/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-widget {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
color: #000000;
line-height: 1.5;
font-size: 12px;
font-family: "ff-tisa-web-pro-1", "ff-tisa-web-pro-2", "Lucida Grande", "Hiragino Sans GB", "Hiragino Sans GB W3", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
-webkit-font-smoothing: antialiased;
outline: none;
display: inline-block;
vertical-align: top;
position: relative;
top: 0;
left: 0;
}
.fui-widget.fui-selectable {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
-webkit-user-drag: text;
}
.fui-widget * {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
.fui-widget.fui-disabled {
opacity: 0.3;
}
.fui-widget.fui-hide {
display: none !important;
}
.fui-widget.fui-mask-animate {
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
transition: all 0.2s;
}
.fui-widget.fui-mask-hint {
-webkit-transform: perspective(600px) translateZ(30px);
-moz-transform: perspective(600px) translateZ(30px);
transform: perspective(600px) translateZ(30px);
}
/**
* 容器类通用样式
**/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-container {
overflow: hidden;
position: relative;
top: 0;
left: 0;
}
.fui-container.fui-disabled {
opacity: 1;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-button-menu {
border: 1px solid white;
}
.fui-button-menu:HOVER {
border-color: #d5e1f2;
}
.fui-button-menu.fui-button-active {
border-color: #d5e1f2;
background: #d5e1f2;
}
.fui-button-menu.fui-button-active .fui-button {
background: #d5e1f2;
}
.fui-button-menu.fui-layout-top,
.fui-button-menu.fui-layout-bottom {
text-align: center;
}
.fui-button-menu.fui-layout-top .fui-open-btn,
.fui-button-menu.fui-layout-bottom .fui-open-btn {
display: block;
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-button {
overflow: hidden;
cursor: default;
font-size: 0;
}
.fui-button ._layout .fui-label {
display: block;
}
.fui-button ._layout .fui-icon {
display: block;
}
.fui-button .fui-icon {
display: inline-block;
vertical-align: middle;
}
.fui-button .fui-label {
display: inline-block;
vertical-align: middle;
}
.fui-button.fui-button-layout-top .fui-label {
display: block;
}
.fui-button.fui-button-layout-top .fui-icon {
display: block;
}
.fui-button.fui-button-layout-bottom .fui-label {
display: block;
}
.fui-button.fui-button-layout-bottom .fui-icon {
display: block;
}
.fui-button:HOVER {
background-color: #d5e1f2;
color: #000000;
}
.fui-button:ACTIVE {
background-color: #87a9da;
color: #000000;
}
.fui-button.fui-disabled:HOVER {
background-color: #ffffff;
color: #000000;
}
.fui-button.fui-disabled:ACTIVE {
background-color: #ffffff;
color: #000000;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-colorpicker {
background-color: #fff;
}
.fui-colorpicker-container {
border: 1px solid #d3d3d3;
}
.fui-colorpicker-container .fui-colorpicker-title {
background: #eee;
padding: 2px 4px;
}
.fui-colorpicker-container .fui-colorpicker-colors {
margin: 0;
padding: 0;
font-size: 0;
line-height: 0;
}
.fui-colorpicker-container .fui-colorpicker-colors-line0 {
margin-bottom: 3px;
}
.fui-colorpicker-container .fui-colorpicker-item {
display: inline-block;
margin: 0 2px;
width: 13px;
height: 13px;
border-style: solid;
border-width: 1px;
}
.fui-colorpicker-container .fui-colorpicker-commoncolor,
.fui-colorpicker-container .fui-colorpicker-standardcolor {
margin: 4px 3px;
white-space: nowrap;
}
.fui-colorpicker-container .fui-colorpicker-toolbar {
margin: 4px;
height: 27px;
}
.fui-colorpicker-container .fui-colorpicker-toolbar .fui-colorpicker-preview {
display: inline-block;
height: 25px;
line-height: 25px;
width: 120px;
border: 1px solid #d3d3d3;
}
.fui-colorpicker-container .fui-colorpicker-toolbar .fui-colorpicker-clear {
display: inline-block;
height: 25px;
line-height: 25px;
width: 60px;
border: 1px solid #d3d3d3;
font-size: 12px;
text-align: center;
position: absolute;
right: 5px;
cursor: pointer;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-dialog {
position: fixed;
top: -1000000px;
left: -100000px;
border: 1px solid #B1B1B1;
background: #fff;
}
.fui-dialog .fui-panel-content {
width: auto;
height: auto;
padding: 2px;
}
.fui-dialog .fui-dialog-caption {
margin: 0;
padding: 5px;
font-size: 16px;
font-weight: normal;
line-height: 1;
display: inline-block;
}
.fui-dialog .fui-dialog-head .fui-close-button {
float: right;
}
.fui-dialog .fui-dialog-head .fui-close-button .fui-close-button-icon {
width: 16px;
height: 16px;
background: url("images/close.png") no-repeat 0 0;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-drop-panel {
border: 1px solid #d3d3d3;
overflow: hidden;
position: relative;
}
.fui-drop-panel .fui-drop-panel-content {
display: inline-block;
}
.fui-drop-panel .fui-drop-panel-placeholder {
display: none;
}
.fui-drop-panel .fui-drop-panel-button {
border-left: 1px solid #d3d3d3;
visibility: visible;
}
.fui-drop-panel .fui-drop-panel-button:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel .fui-drop-panel-button:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel:HOVER .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel:ACTIVE .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel.fui-drop-panel-open {
overflow: visible;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-content {
border: 1px solid #d3d3d3;
position: absolute;
top: -1px;
left: -1px;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-button {
visibility: hidden;
}
.fui-drop-panel.fui-drop-panel-open .fui-drop-panel-placeholder {
display: inline-block;
}
.fui-drop-panel-popup {
border: 1px solid #d3d3d3;
}
.fui-drop-panel-popup:HOVER {
border-color: #d5e1f2;
}
.fui-drop-panel-popup:HOVER .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-drop-panel-popup:ACTIVE {
border-color: #87a9da;
}
.fui-drop-panel-popup:ACTIVE .fui-drop-panel-button {
border-left-color: #d5e1f2;
}
.fui-icon {
text-align: center;
font-size: 0;
}
.fui-icon img {
display: inline-block;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-input-button {
border: 1px solid #ababab;
}
.fui-input-button .fui-input {
vertical-align: middle;
border: none;
}
.fui-input-button .fui-button {
vertical-align: middle;
}
.fui-input-button:HOVER {
border-color: #87a9da;
}
.fui-input-button:ACTIVE {
border-color: #87a9da;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-input {
border: 1px solid #d3d3d3;
padding: 1px;
margin: 0;
}
.fui-input:HOVER,
.fui-input:FOCUS {
border-color: #4d90fe;
}
.fui-input.fui-disabled {
border-color: #d3d3d3;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-item {
font-size: 0;
}
.fui-item .fui-icon {
vertical-align: middle;
}
.fui-item .fui-label {
vertical-align: middle;
}
.fui-item.fui-item-selected {
background: #87a9da;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-label-panel .fui-label-panel-label {
width: 100%;
color: #666;
}
.fui-label-panel.fui-no-position .fui-label-panel-label {
position: static;
}
.fui-label-panel.fui-layout-bottom .fui-label-panel-label {
position: absolute;
bottom: 0;
left: 0;
top: auto;
z-index: 2;
}
.fui-label {
cursor: default;
display: inline-block;
white-space: nowrap;
}
/**
* 通用button
*/
.fui-mask {
position: fixed;
z-index: 99998;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-menu {
background-color: #fff;
border: 1px solid #d3d3d3;
}
.fui-menu .fui-item {
padding: 2px 5px;
display: block;
}
.fui-menu .fui-item:HOVER {
background: #d5e1f2;
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-panel {
display: inline-block;
vertical-align: top;
overflow-y: auto;
overflow-x: hidden;
}
.fui-panel .fui-panel-content {
position: relative;
top: 0;
left: 0;
}
.fui-panel .fui-panel-content {
width: 100%;
height: 100%;
}
.fui-panel.fui-container-column {
font-size: 0;
}
.fui-panel.fui-container-column .fui-column {
display: block;
}
/**
* 通用button
*/
.fui-ppanel::-webkit-scrollbar {
width: 15px;
}
.fui-ppanel::-webkit-scrollbar-button:start:decrement,
.fui-ppanel::-webkit-scrollbar-button:end:decrement,
.fui-ppanel::-webkit-scrollbar-button:start:increment,
.fui-ppanel::-webkit-scrollbar-button:end:increment,
.fui-ppanel::-webkit-scrollbar-thumb {
border: 1px solid #e7e7e7;
}
.fui-ppanel.fui-ppanel-position {
position: fixed;
z-index: 99999;
}
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-separator {
background: #6d6d6d;
}
/**
* Spin-button
*/
.fui-spin-button .fui-spin-up-btn .fui-icon,
.fui-spin-button .fui-spin-down-btn .fui-icon {
width: 16px;
height: 9px;
background: url("images/up.png") no-repeat 3px 1.5px;
}
.fui-spin-button .fui-spin-down-btn .fui-icon {
background-image: url("images/down.png");
}
/**
* 通用button
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-tabs .fui-selected {
background-color: #d5e1f2;
}
/**
* 可切换Button (ToggleButton)
*/
/**
* FUI 通用样式定义
*/
/*------------ var*/
/*------------ mixin*/
.fui-toggle-button.fui-button-pressed {
background-color: #aec5e6;
}
.fui-toggle-button.fui-button-pressed.fui-disabled {
background-color: #aec5e6;
}
.fui-toggle-button:HOVER {
background-color: #d5e1f2;
color: #000000;
}
.fui-toggle-button:ACTIVE {
background-color: #87a9da;
color: #000000;
}
.triangle { .triangle {
content: ' '; content: ' ';
display: block; display: block;
...@@ -231,6 +768,7 @@ ...@@ -231,6 +768,7 @@
} }
.fui-dialog .fui-dialog-head .fui-close-button .fui-close-button-icon { .fui-dialog .fui-dialog-head .fui-close-button .fui-close-button-icon {
display: none; display: none;
background: none;
} }
.fui-dialog .fui-dialog-head .fui-close-button:hover { .fui-dialog .fui-dialog-head .fui-close-button:hover {
background-color: #e66060; background-color: #e66060;
...@@ -349,12 +887,21 @@ body { ...@@ -349,12 +887,21 @@ body {
-moz-user-select: none; -moz-user-select: none;
} }
#panel { #panel {
background: #3a4050; background: #393f4f;
font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei'; font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei';
height: 40px; height: 40px;
overflow: visible; overflow: visible;
position: relative; position: relative;
} }
#panel h1 {
font-size: 14px;
height: 40px;
line-height: 40px;
margin: 0;
text-align: center;
font-weight: normal;
color: #ffffff;
}
.fui-widget { .fui-widget {
-webkit-font-smoothing: auto; -webkit-font-smoothing: auto;
} }
...@@ -365,13 +912,13 @@ body { ...@@ -365,13 +912,13 @@ body {
line-height: 40px; line-height: 40px;
padding: 0 30px 0 15px; padding: 0 30px 0 15px;
z-index: 11; z-index: 11;
background-color: #ff6e6e; background-color: #fc8383;
} }
#main-menu-btn:hover { #main-menu-btn:hover {
background-color: #ff8888 !important; background-color: #fc9c9c !important;
} }
#main-menu-btn:active { #main-menu-btn:active {
background-color: #ff5555 !important; background-color: #fb6a6a !important;
} }
#main-menu-btn .fui-label { #main-menu-btn .fui-label {
height: 40px; height: 40px;
...@@ -398,16 +945,116 @@ body { ...@@ -398,16 +945,116 @@ body {
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0;
overflow: hidden;
opacity: 0; opacity: 0;
-webkit-transition: opacity ease 0.2s; -webkit-transition: all ease 0.2s;
-moz-transition: opacity ease 0.2s; -moz-transition: all ease 0.2s;
-ms-transition: opacity ease 0.2s; -ms-transition: all ease 0.2s;
-o-transition: opacity ease 0.2s; -o-transition: all ease 0.2s;
transition: opacity ease 0.2s; transition: all ease 0.2s;
-webkit-transform: translateX(-100%);
-moz-transform: translateX(-100%);
-ms-transform: translateX(-100%);
-o-transform: translateX(-100%);
tranform: translateX(-100%);
} }
#main-menu.show { #main-menu.show {
bottom: 0; bottom: 0;
opacity: 1; opacity: 1;
-webkit-transform: translateX(0);
-moz-transform: translateX(0);
-ms-transform: translateX(0);
-o-transform: translateX(0);
tranform: translateX(0);
}
#main-menu:before {
content: ' ';
display: block;
position: absolute;
top: 0;
left: 200px;
right: 0;
bottom: 10px;
box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.15);
z-index: 1;
}
#main-menu .main-menu-header {
background: white;
height: 40px;
}
#main-menu .main-menu-back-panel {
background-color: #fc8383;
float: left;
width: 200px;
height: 40px;
}
#main-menu .main-menu-back-panel .main-menu-back-button {
width: 25px;
height: 25px;
border-radius: 100%;
border: 2px solid white;
left: 5px;
top: 5px;
cursor: pointer;
}
#main-menu .main-menu-back-panel .main-menu-back-button .fui-label {
display: none;
}
#main-menu .main-menu-back-panel .main-menu-back-button .fui-icon {
display: block;
width: 25px;
height: 25px;
background: url(../images/icons.png) -1px -370px;
}
#main-menu .main-menu-back-panel .main-menu-back-button:hover {
background-color: rgba(255, 255, 255, 0.3);
}
#main-menu .main-menu-back-panel .main-menu-back-button:active {
background-color: rgba(0, 0, 0, 0.05);
}
#main-menu .main-menu-title {
margin-left: 200px;
height: 40px;
display: block;
background: white;
z-index: 2;
}
#main-menu .main-menu-level-1 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 40px;
}
#main-menu .main-menu-level-1 .fui-tabs-button-wrap {
width: 200px;
position: absolute;
background-color: #fc8383;
left: 0;
top: 0;
bottom: 0;
}
#main-menu .main-menu-level-1 .fui-tabs-button-wrap .fui-button {
display: block;
text-align: right;
height: 50px;
}
#main-menu .main-menu-level-1 .fui-tabs-button-wrap .fui-button .fui-label {
height: 50px;
line-height: 50px;
color: white;
padding-right: 20px;
font-size: 16px;
}
#main-menu .main-menu-level-1 .fui-tabs-panel-wrap {
position: absolute;
top: 0;
left: 200px;
right: 0;
bottom: 0;
background-color: white;
z-index: 2;
} }
.command-button.undo, .command-button.undo,
.command-button.redo { .command-button.redo {
...@@ -560,6 +1207,86 @@ body { ...@@ -560,6 +1207,86 @@ body {
opacity: 0; opacity: 0;
height: 0; height: 0;
} }
#search {
float: right;
position: relative;
}
#search:after {
content: ' ';
display: block;
position: absolute;
width: 24px;
height: 24px;
left: 5px;
top: 7px;
background: url(../images/icons.png) no-repeat 0 -345px;
}
#search input[type=search] {
background: #5a6378;
border: none;
height: 20px;
line-height: 20px;
border-radius: 15px;
outline: none;
color: #ffffff;
padding: 5px 10px 5px 30px;
box-sizing: content-box;
margin-top: 5px;
margin-right: 3px;
width: 30px;
-webkit-transition: width 0.5s ease;
-moz-transition: width 0.5s ease;
-ms-transition: width 0.5s ease;
-o-transition: width 0.5s ease;
transition: width 0.5s ease;
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
tranform: translateZ(0);
}
#search input[type=search]:focus {
width: 150px;
}
#panel div.user-panel {
float: right;
height: 40px;
line-height: 40px;
}
#panel div.user-panel .fui-button {
padding: 5px 10px;
height: 30px;
line-height: 30px;
}
#panel div.user-panel .fui-button:hover {
background-color: #5a6378;
}
#panel div.user-panel .fui-button:active {
background-color: #444b5b;
}
#panel div.user-panel .fui-button .fui-label {
font-size: 14px;
color: #ffffff;
vertical-align: baseline;
}
#panel div.user-panel .fui-button.user-button .fui-label {
display: none;
}
#panel div.user-panel .fui-button .fui-icon {
vertical-align: baseline;
border-radius: 100%;
}
#panel div.user-panel .fui-button .fui-icon img {
width: 30px;
height: 30px;
}
#panel div.user-panel .fui-button.login-button .fui-icon {
width: 25px;
height: 25px;
margin-right: 3px;
vertical-align: baseline;
background: url(../images/icons.png) 0 -320px;
}
#tab-container .command-buttonset.priority { #tab-container .command-buttonset.priority {
width: 140px; width: 140px;
} }
......
{"version":3,"sources":["_triangle.less","_widgets.less","_vendor.less","_kityminder.less","_mainmenu.less","_history.less","_tab.less","_priority_panel.less","_progress_panel.less","_resource_panel.less","_themepanel.less","_fontpanel.less","_colorpanel.less","_about.less","_receiver.less","_help.less","_share.less","_icons.less"],"names":[],"mappings":"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"} {"version":3,"sources":["lib/fui/theme/default/fui.all.css","_triangle.less","_widgets.less","_vendor.less","_kityminder.less","_mainmenu.less","_history.less","_tab.less","_search.less","_user.less","_priority_panel.less","_progress_panel.less","_resource_panel.less","_themepanel.less","_fontpanel.less","_colorpanel.less","_about.less","_receiver.less","_help.less","_share.less","_icons.less"],"names":[],"mappings":"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"}
\ No newline at end of file \ No newline at end of file
@import (less) "../../../../lib/fui/theme/default/fui.all.css";
@import "_widgets"; @import "_widgets";
@import "_kityminder"; @import "_kityminder";
@import "_mainmenu"; @import "_mainmenu";
@import "_history"; @import "_history";
@import "_tab"; @import "_tab";
@import "_search";
@import "_user";
@import "_priority_panel"; @import "_priority_panel";
@import "_progress_panel"; @import "_progress_panel";
......
ui/theme/default/images/icons.png

5.42 KB | W: | H:

ui/theme/default/images/icons.png

6.2 KB | W: | H:

ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
  • 2-up
  • Swipe
  • Onion skin
KityMinder.registerUI('user', function(minder) {
var $userPanel = $('<div class="user-panel"></div>').appendTo('#panel');
/* 登录按钮 */
var $loginButton = new FUI.Button({
label: minder.getLang('ui.login'),
text: minder.getLang('ui.login'),
className: 'login-button'
}).appendTo($userPanel[0]).hide();
/* 用户按钮 */
var $userButton = new FUI.Button({
icon: {
img: 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs='
},
className: 'user-button'
}).appendTo($userPanel[0]).hide();
/* 用户菜单 */
var $userMenu = new FUI.PopupMenu().appendTo(document.getElementById('content-wrapper')).positionTo($userButton);
var menu = $userMenu.getMenuWidget().show();
['userinfo', 'gotonetdisk', 'fui-spliter', 'switchuser', 'logout'].forEach(function(name) {
menu.appendItem(new FUI.Item({
label: minder.getLang('ui.' + name),
className: name,
value: name
}));
});
$userButton.on('click', function() {
$userMenu.open();
});
menu.on('select', function(e, info) {
switch (info.value) {
case 'userinfo':
window.open('http://i.baidu.com');
break;
case 'gotonetdisk':
window.open('http://pan.baidu.com');
break;
case 'switchuser':
switchUser();
break;
case 'logout':
logout();
break;
}
menu.clearSelect();
$userMenu.hide();
});
/* 初始化网盘使用的 APP 身份 */
fio.provider.init('netdisk', {
apiKey: 'wiE55BGOG8BkGnpPs6UNtPbb'
});
fio.user.check().then(check);
$loginButton.on('click', login);
function check(user) {
if (user) {
$userButton.setLabel(user.username);
$userButton.getIconWidget().setImage(user.smallImage);
$userButton.show();
$loginButton.hide();
} else {
$loginButton.show();
$userButton.hide();
}
}
function logout() {
fio.user.logout();
$loginButton.show();
$userButton.hide();
}
function login() {
fio.user.login({
remember: 7 * 24 * 60 * 60 // remember 7 days
}).then(check);
}
function switchUser() {
fio.user.login({
remember: 7 * 24 * 60 * 60, // remember 7 days
force: true
}).then(check);
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment