Commit 9edc2e35 authored by liujiangnan's avatar liujiangnan

feat: 功能录入

parent 9d944887
.edit-data{ html, body{
padding: 10px; height: 100%;
}
body{
margin: 0;
}
.page{
padding: 15px;
box-sizing: border-box;
height: 100vh;
background: #f5f7fa;
}
[v-cloak]{
display: none;
}
.split{
height: calc(100vh - 30px);
display: flex;
gap: 15px;
position: relative;
}
.split > .el-col{
float: none;
flex: 1;
max-width: none;
}
.panel{
background: #fff;
border-radius: 6px;
padding: 16px;
box-sizing: border-box;
height: 100%;
overflow: auto;
border: 1px solid #ebeef5;
}
.panel-title{
font-size: 16px;
font-weight: 600;
margin-bottom: 16px;
color: #303133;
display: flex;
align-items: center;
justify-content: space-between;
}
.panel-side-toggle{
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 5;
}
.panel-side-toggle.left{
left: -6px;
}
.panel-side-toggle.right{
right: -6px;
}
.panel-side-toggle .el-button{
writing-mode: vertical-rl;
text-orientation: mixed;
padding: 6px 4px;
}
.panel-actions{
margin-bottom: 12px;
}
.group-card{
padding: 12px;
border: 1px solid #ebeef5;
border-radius: 6px;
margin-bottom: 12px;
background: #fafafa;
}
.group-row{
display: flex;
align-items: center;
gap: 12px;
padding: 6px 4px;
flex-wrap: wrap;
}
.group-title{
font-size: 14px;
font-weight: 600;
color: #303133;
}
.group-row-item{
display: flex;
align-items: center;
}
.group-row-actions{
margin-left: auto;
display: flex;
gap: 8px;
}
.image-thumb{
width: 52px;
height: 52px;
border-radius: 4px;
object-fit: cover;
border: 1px solid #dcdfe6;
cursor: pointer;
}
.audio-icon{
width: 40px;
height: 40px;
border-radius: 50%;
background: #f2f6fc;
display: flex;
align-items: center;
justify-content: center;
color: #409eff;
border: 1px solid #dcdfe6;
cursor: pointer;
}
.audio-icon.playing{
background: #ecf5ff;
border-color: #b3d8ff;
}
.hidden-audio{
display: none;
}
.group-progress{
margin-top: 8px;
}
.group-detail{
margin-top: 8px;
}
.ai-tag-content{
margin-top: 8px;
font-size: 12px;
color: #606266;
background: #fff;
border: 1px dashed #dcdfe6;
border-radius: 4px;
padding: 8px;
line-height: 18px;
}
.ai-status{
font-size: 12px;
color: #409eff;
margin-bottom: 6px;
}
.ai-status.error{
color: #f56c6c;
}
.empty-text{
color: #909399;
}
.json-editor{
display: block;
}
.json-node{
margin-bottom: 6px;
}
.json-children{
padding-left: 12px;
border-left: 1px dashed #ebeef5;
margin-left: 4px;
}
.json-leaf{
display: flex;
align-items: center;
gap: 8px;
margin: 4px 0;
}
.json-label{
min-width: 90px;
color: #303133;
font-size: 12px;
word-break: break-all;
}
.json-table{
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.json-table th,
.json-table td{
border: 1px solid #ebeef5;
padding: 6px 8px;
vertical-align: top;
}
.json-col-index{
width: 60px;
text-align: center;
color: #606266;
}
.json-col-action{
width: 80px;
text-align: center;
}
.json-nested-hint{
color: #909399;
}
.json-table-detail td{
background: #fafafa;
}
.ai-dialog-table{
margin-top: 8px;
}
.ai-table{
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.ai-table th,
.ai-table td{
border: 1px solid #ebeef5;
padding: 6px 8px;
vertical-align: top;
}
.ai-col-index{
width: 60px;
text-align: center;
color: #606266;
}
.ai-col-text{
width: 180px;
}
.ai-col-time{
width: 110px;
}
.ai-subtable{
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.ai-subtable th,
.ai-subtable td{
border: 1px solid #ebeef5;
padding: 4px 6px;
}
.quiz-toolbar{
display: flex;
gap: 8px;
margin-bottom: 12px;
flex-wrap: wrap;
}
.quiz-dialog .el-dialog{
height: 70vh;
display: flex;
flex-direction: column;
}
.quiz-dialog .el-dialog__body{
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.quiz-list{
display: flex;
flex-direction: column;
gap: 12px;
overflow: auto;
padding-right: 6px;
flex: 1;
}
.quiz-item{
border: 1px solid #ebeef5;
border-radius: 6px;
padding: 12px;
background: #fafafa;
}
.quiz-item.dragging{
opacity: 0.6;
border-style: dashed;
}
.quiz-item-head{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.quiz-item-title{
font-weight: 600;
color: #303133;
}
.quiz-item-actions{
display: flex;
gap: 8px;
align-items: center;
}
.quiz-item-type{
font-size: 12px;
color: #606266;
}
.quiz-item-body{
display: flex;
flex-direction: column;
gap: 10px;
}
.quiz-row{
display: flex;
gap: 10px;
align-items: flex-start;
}
.quiz-label{
width: 70px;
font-size: 12px;
color: #606266;
padding-top: 6px;
}
.quiz-inline{
flex: 1;
display: flex;
gap: 8px;
align-items: center;
}
.uploader .hint{
margin-left: 10px;
color: #909399;
font-size: 12px;
}
.upload-progress{
width: 100%;
}
.upload-progress .progress-info{
display: flex;
justify-content: space-between;
color: #606266;
font-size: 12px;
margin-bottom: 6px;
}
.image-preview{
width: 100%;
max-height: 260px;
object-fit: contain;
background: #f2f2f2;
cursor: pointer;
}
.audio-preview{
width: 100%;
}
.image-preview-dialog .el-message-box__content{
text-align: center;
}
.meta{
font-size: 13px;
color: #606266;
line-height: 22px;
}
.json-alert{
margin-top: 12px;
} }
\ No newline at end of file
...@@ -9,17 +9,307 @@ ...@@ -9,17 +9,307 @@
<script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/jquery-1.12.3.min.js"></script> <script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script> <script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script>
<script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/vue.min.js"></script> <script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/vue.min.js"></script>
<script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/crypto-js.min.js"></script>
<script type="text/javascript" src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/aliyun-oss-sdk-6.18.1.min.js"></script>
<!-- 引入样式 --> <!-- 引入样式 -->
<link href="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/theme-chalk/index.css" rel="stylesheet"> <link href="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/theme-chalk/index.css" rel="stylesheet">
<!-- 引入组件库 --> <!-- 引入组件库 -->
<script src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/index.js"></script> <script src="//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/index.js"></script>
</head> </head>
<body> <body>
<div class="edit-data"> <div id="app" v-cloak class="page">
<!-- 简单的例子,一个输入框+一个按钮,保存输入框的信息 --> <el-row :gutter="0" class="split">
test: <input type="text" name="test" /> <div class="panel-side-toggle left" v-if="!leftPanelVisible">
<input id="save" type="button" value="保存" > <el-button
</div> size="mini"
type="primary"
plain
@click="toggleLeftPanel">展开内容录入区</el-button>
</div>
<el-col
:span="leftPanelSpan"
class="panel"
v-show="leftPanelVisible">
<div class="panel-title">
<span>内容录入区</span>
<el-button type="text" size="mini" @click="toggleLeftPanel">收起</el-button>
</div>
<el-form label-width="90px" size="small">
<el-form-item label="上传图片">
<el-upload
v-if="!imagePreviewUrl"
ref="imageUpload"
class="uploader"
:show-file-list="false"
:before-upload="beforeImageUpload"
:on-change="handleImageChange"
:on-error="handleUploadError"
accept="image/*">
<el-button type="primary" :disabled="uploading">选择图片</el-button>
<span class="hint">支持重复上传,会覆盖当前图片</span>
</el-upload>
<el-button
v-else
type="warning"
:disabled="uploading"
@click="confirmImageReupload">重新上传</el-button>
</el-form-item>
<el-form-item label="图片预览" v-if="imagePreviewUrl">
<img
class="image-preview"
:src="imagePreviewUrl"
alt="图片预览"
@click="openImagePreview"></img>
</el-form-item>
<el-form-item label="上传音频">
<el-upload
v-if="!audioPreviewUrl"
ref="audioUpload"
class="uploader"
:show-file-list="false"
:before-upload="beforeAudioUpload"
:on-change="handleAudioChange"
:on-error="handleUploadError"
accept="audio/*">
<el-button type="primary" :disabled="uploading">选择音频</el-button>
<span class="hint">支持重复上传,会覆盖当前音频</span>
</el-upload>
<el-button
v-else
type="warning"
:disabled="uploading"
@click="confirmAudioReupload">重新上传</el-button>
</el-form-item>
<el-form-item label="上传进度" v-if="uploading">
<div class="upload-progress">
<div class="progress-info">
<span>正在上传{{ currentUploadType === 'image' ? '图片' : '音频' }}...</span>
<span>{{ uploadProgress }}%</span>
</div>
<el-progress
:percentage="uploadProgress"
:stroke-width="8"
:show-text="false"
status="success">
</el-progress>
</div>
</el-form-item>
<el-form-item label="音频试听" v-if="audioPreviewUrl">
<audio
class="audio-preview"
controls
:src="audioPreviewUrl"></audio>
</el-form-item>
<el-form-item label="操作">
<el-button type="success" @click="handleAiTag">AI打点</el-button>
<el-button type="info" @click="openAiDialog">编辑AI打点内容</el-button>
<el-button type="success" plain @click="handleAiImage">AI图片理解</el-button>
<el-button type="info" plain @click="openAiImageDialog">编辑AI图片理解内容</el-button>
<el-button type="primary" plain @click="openQuizDialog">录入习题</el-button>
</el-form-item>
</el-form>
</el-col>
<el-dialog
title="打点信息"
:visible.sync="aiDialogVisible"
width="70%"
@close="closeAiDialog">
<div>
<div class="ai-status" v-if="aiLoading">AI打点处理中...</div>
<div class="ai-status error" v-else-if="aiError">{{ aiError }}</div>
<div v-if="aiTagData && aiTagData.length" class="ai-dialog-table">
<table class="ai-table">
<thead>
<tr>
<th class="ai-col-index">序号</th>
<th class="ai-col-text">文本</th>
<th class="ai-col-time">开始时间</th>
<th class="ai-col-time">结束时间</th>
<th class="ai-col-words">单词</th>
</tr>
</thead>
<tbody>
<tr v-for="(row, rowIndex) in aiTagData" :key="rowIndex">
<td class="ai-col-index">{{ rowIndex + 1 }}</td>
<td class="ai-col-text">
<el-input size="mini" v-model="row.text" @input="saveData"></el-input>
</td>
<td class="ai-col-time">
<el-input size="mini" v-model="row.start" @input="saveData"></el-input>
</td>
<td class="ai-col-time">
<el-input size="mini" v-model="row.end" @input="saveData"></el-input>
</td>
<td class="ai-col-words">
<table class="ai-subtable" v-if="row.words && row.words.length">
<thead>
<tr>
<th>单词</th>
<th>开始时间</th>
<th>结束时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(word, wordIndex) in row.words" :key="wordIndex">
<td>
<el-input size="mini" v-model="word.word" @input="saveData"></el-input>
</td>
<td>
<el-input size="mini" v-model="word.start" @input="saveData"></el-input>
</td>
<td>
<el-input size="mini" v-model="word.end" @input="saveData"></el-input>
</td>
</tr>
</tbody>
</table>
<div v-else class="empty-text">暂无单词</div>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else class="empty-text">暂无打点内容</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeAiDialog">取消</el-button>
<el-button type="primary" @click="saveAiDialog">保存</el-button>
</span>
</el-dialog>
<el-dialog
title="AI图片理解"
:visible.sync="aiImageDialogVisible"
width="60%"
@close="closeAiImageDialog">
<div>
<div class="ai-status" v-if="aiImageLoading">AI图片理解处理中...</div>
<div class="ai-status error" v-else-if="aiImageError">{{ aiImageError }}</div>
<el-input
type="textarea"
:rows="10"
v-model="aiImageContent"
placeholder="请输入 AI 图片理解内容"
></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeAiImageDialog">取消</el-button>
<el-button type="primary" @click="saveAiImageDialog">保存</el-button>
</span>
</el-dialog>
<el-dialog
title="录入习题"
:visible.sync="quizDialogVisible"
width="90%"
class="quiz-dialog"
@close="closeQuizDialog">
<div class="quiz-toolbar">
<el-button size="mini" type="primary" @click="addQuestion">新增问答题</el-button>
</div>
<div class="quiz-list" v-if="quizList.length">
<div
class="quiz-item"
v-for="(q, qIndex) in quizList"
:key="q.id"
:class="{ dragging: dragIndex === qIndex }"
draggable="true"
@dragstart="onQuizDragStart(qIndex, $event)"
@dragover="onQuizDragOver(qIndex, $event)"
@dragend="onQuizDragEnd"
@drop="onQuizDrop(qIndex, $event)">
<div class="quiz-item-head">
<div class="quiz-item-title">第{{ qIndex + 1 }}题</div>
<div class="quiz-item-actions">
<span class="quiz-item-type">问答题</span>
<el-button size="mini" type="danger" @click="removeQuestion(qIndex)">删除</el-button>
</div>
</div>
<div class="quiz-item-body">
<div class="quiz-row">
<div class="quiz-label">题干</div>
<el-input
size="mini"
:ref="'quizQuestionInput_' + qIndex"
v-model="q.question"
@input="saveData"></el-input>
</div>
<div class="quiz-row">
<div class="quiz-label">参考答案</div>
<el-input size="mini" v-model="q.answer" @input="saveData"></el-input>
</div>
<div class="quiz-row">
<div class="quiz-label">备注</div>
<div class="quiz-inline">
<el-input
type="textarea"
:rows="3"
v-model="q.hint"
@input="saveData"></el-input>
<el-button size="mini" type="primary" plain @click="fillQueryHint(q)">一键填入图片理解内容</el-button>
</div>
</div>
<div class="quiz-row">
<div class="quiz-label">提示</div>
<el-input
type="textarea"
:rows="3"
v-model="q.tip"
@input="saveData"></el-input>
</div>
</div>
</div>
</div>
<div v-else class="empty-text">暂无习题,请新增</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeQuizDialog">取消</el-button>
<el-button type="primary" @click="saveQuizDialog">保存</el-button>
</span>
</el-dialog>
<el-col
:span="rightPanelSpan"
class="panel"
v-show="rightPanelVisible">
<div class="panel-title">
<span>AI 编排脚本区</span>
<el-button type="text" size="mini" @click="toggleRightPanel">收起</el-button>
</div>
<el-input
type="textarea"
:rows="16"
v-model="scriptText"
placeholder="请输入 JSON"></el-input>
<el-alert
v-if="jsonError"
type="error"
:closable="false"
class="json-alert"
:title="jsonError"></el-alert>
<el-alert
v-else
type="success"
:closable="false"
class="json-alert"
title="JSON 格式正确"></el-alert>
</el-col>
<div class="panel-side-toggle right" v-if="!rightPanelVisible">
<el-button
size="mini"
type="primary"
plain
@click="toggleRightPanel">展开AI编排脚本区</el-button>
</div>
</el-row>
</div>
</body> </body>
<script src="./index.js"></script> <script src="./index.js"></script>
</html> </html>
\ No newline at end of file
/* /*
window.courseware.getData(callback, key); //用于获取数据
window.courseware.getData(callback,key); //用于获取数据 window.courseware.setData(data, callback, key); //用于存储数据
window.courseware.setData(data,callback,key); //用于存储数据
var uploadUrl = window.courseware.uploadUrl(); //上传文件的路径 var uploadUrl = window.courseware.uploadUrl(); //上传文件的路径
var uploadData = window.courseware.uploadData(); //上传文件必须要的参数 var uploadData = window.courseware.uploadData(); //上传文件必须要的参数
*/ */
//对应模板的名称,这个可以不写,但是最好是能写上,同时开发多个模板的情况下如果不写这个,本地缓存可能会存在混乱 var key = 'yl14_aicourse';
var key = "h5_test";
$(function(){
window.courseware.getData(function(data){
//数据加载完,才算页面加载完成 var callServerMethod = function (method, data) {
//获取数据 return new Promise(function (resolve) {
if(data&&data.test){ window.courseware.onEvent(method, function (result, next) {
$("[name='test']").val(data.test); resolve(result);
} next();
}, key);
//绑定点击事件 window.courseware.sendEvent(method, data || {}, key);
$('#save').on('click',function(){ });
var test = $("[name='test']").val(); };
//保存新增或修改的数据 new Vue({
window.courseware.setData({test: test},function(){ el: '#app',
//保存数据也是异步的 data: function () {
alert("保存成功!"); return {
},key); imagePreviewUrl: '',
audioPreviewUrl: '',
}) aiTagData: [],
},key); aiLoading: false,
}) aiError: '',
\ No newline at end of file aiImageContent: '',
aiImageLoading: false,
aiImageError: '',
quizList: [],
quizDialogVisible: false,
dragIndex: -1,
leftPanelVisible: true,
rightPanelVisible: true,
uploading: false,
uploadProgress: 0,
currentUploadId: 0,
currentUploadType: '',
audioPlaying: false,
aiDialogVisible: false,
aiImageDialogVisible: false,
scriptText: '',
jsonError: ''
};
},
watch: {
scriptText: function () {
this.validateJson();
this.saveData();
}
},
computed: {
leftPanelSpan: function () {
if (this.leftPanelVisible && this.rightPanelVisible) {
return 12;
}
if (this.leftPanelVisible && !this.rightPanelVisible) {
return 24;
}
return 0;
},
rightPanelSpan: function () {
if (this.leftPanelVisible && this.rightPanelVisible) {
return 12;
}
if (!this.leftPanelVisible && this.rightPanelVisible) {
return 24;
}
return 0;
}
},
mounted: function () {
var _this = this;
if (window.courseware && window.courseware.getData) {
window.courseware.getData(function (data) {
if (window.air && window.air.hideAirClassLoading) {
window.air.hideAirClassLoading(key, data);
}
if (data) {
if (data.image) {
_this.imagePreviewUrl = data.image;
}
if (typeof data.aiImageContent === 'string') {
_this.aiImageContent = data.aiImageContent;
}
if (data.ai_script) {
_this.scriptText = data.ai_script;
}
if (Array.isArray(data.action)) {
_this.quizList = [];
data.action.forEach(function (item) {
if (!item || !item.type) {
return;
}
if (item.type === 'lyrics') {
var content = Array.isArray(item.content) ? item.content[0] : null;
if (content && content.audio_url) {
_this.audioPreviewUrl = content.audio_url;
}
if (content && Array.isArray(content.points)) {
_this.aiTagData = content.points;
}
return;
}
if (item.type === 'query') {
_this.quizList.push({
id: 'q_' + Date.now() + '_' + Math.random().toString(16).slice(2),
type: 'query',
question: item.text || '',
answer: item.answer || '',
hint: item.hint || '',
tip: item.tip || ''
});
}
});
}
}
_this.validateJson();
}, key);
} else {
this.validateJson();
}
},
methods: {
toggleLeftPanel: function () {
this.leftPanelVisible = !this.leftPanelVisible;
if (!this.leftPanelVisible && !this.rightPanelVisible) {
this.rightPanelVisible = true;
}
},
toggleRightPanel: function () {
this.rightPanelVisible = !this.rightPanelVisible;
if (!this.leftPanelVisible && !this.rightPanelVisible) {
this.leftPanelVisible = true;
}
},
// 环境基地址
getApiBase() {
const host = (window.location && window.location.hostname || '').toLowerCase();
const isStaging = host.includes('staging') || host.includes('localhost') || host.includes('127.0.0.1');
return isStaging ? 'https://stagingopensource.iteachabc.com' : 'https://opensource.iteachabc.com';
},
openAiDialog: function () {
this.aiDialogVisible = true;
},
closeAiDialog: function () {
this.aiDialogVisible = false;
},
saveAiDialog: function () {
this.saveData();
this.closeAiDialog();
},
openAiImageDialog: function () {
this.aiImageDialogVisible = true;
},
closeAiImageDialog: function () {
this.aiImageDialogVisible = false;
},
saveAiImageDialog: function () {
this.saveData();
this.closeAiImageDialog();
},
openQuizDialog: function () {
this.quizDialogVisible = true;
},
closeQuizDialog: function () {
this.quizDialogVisible = false;
},
saveQuizDialog: function () {
this.saveData();
this.closeQuizDialog();
},
addQuestion: function () {
var item = {
id: 'q_' + Date.now() + '_' + Math.random().toString(16).slice(2),
type: 'query',
question: '',
answer: '',
hint: '',
tip: ''
};
this.quizList.push(item);
this.saveData();
this.$nextTick(function () {
this.focusNewQuestionInput(this.quizList.length - 1);
}.bind(this));
},
removeQuestion: function (index) {
if (index < 0 || index >= this.quizList.length) {
return;
}
this.$confirm('删除后无法恢复,确定删除该题吗?', '确认删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
this.quizList.splice(index, 1);
this.saveData();
}.bind(this)).catch(function () {});
},
focusNewQuestionInput: function (index) {
var refName = 'quizQuestionInput_' + index;
var ref = this.$refs[refName];
var inputRef = Array.isArray(ref) ? ref[0] : ref;
if (inputRef && inputRef.$el) {
var inputEl = inputRef.$el.querySelector('input');
if (inputEl) {
inputEl.focus();
}
}
},
fillQueryHint: function (item) {
if (!item || item.type !== 'query') {
return;
}
if (!this.aiImageContent) {
this.$message.warning('请先进行AI图片理解');
return;
}
item.hint = this.aiImageContent;
this.saveData();
},
onQuizDragStart: function (index, event) {
this.dragIndex = index;
if (event && event.dataTransfer) {
event.dataTransfer.effectAllowed = 'move';
event.dataTransfer.setData('text/plain', String(index));
}
},
onQuizDragOver: function (index, event) {
if (event) {
event.preventDefault();
}
},
onQuizDrop: function (index, event) {
if (event) {
event.preventDefault();
}
var fromIndex = this.dragIndex;
if (fromIndex < 0 || fromIndex === index) {
return;
}
var moved = this.quizList.splice(fromIndex, 1)[0];
this.quizList.splice(index, 0, moved);
this.dragIndex = -1;
this.saveData();
},
onQuizDragEnd: function () {
this.dragIndex = -1;
},
getUploadInput: function (refName, index) {
var ref = this.$refs[refName];
if (!ref) {
return null;
}
var uploadRef = Array.isArray(ref) ? ref[0] : ref;
return uploadRef && uploadRef.$el ? uploadRef.$el.querySelector('input[type="file"]') : null;
},
beforeImageUpload: function (file) {
if (this.uploading) {
this.$message.warning('正在处理,请稍候再试');
return false;
}
if (!file || !file.type || file.type.indexOf('image/') !== 0) {
this.$message.error('只能上传图片文件');
return false;
}
this.currentUploadId += 1;
var uploadId = this.currentUploadId;
this.currentUploadType = 'image';
this.handleImageChange(file);
this.uploading = true;
this.uploadProgress = 0;
this.uploadToOssWithSignature(file, uploadId, 'image');
return false;
},
handleImageChange: function (file) {
var rawFile = file && file.raw ? file.raw : file;
if (!rawFile) {
return;
}
if (this.imagePreviewUrl && this.imagePreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.imagePreviewUrl);
}
this.imagePreviewUrl = URL.createObjectURL(rawFile);
},
beforeAudioUpload: function (file) {
if (this.uploading) {
this.$message.warning('正在处理,请稍候再试');
return false;
}
if (!file || !file.type || file.type.indexOf('audio/') !== 0) {
this.$message.error('只能上传音频文件');
return false;
}
this.currentUploadId += 1;
var uploadId = this.currentUploadId;
this.currentUploadType = 'audio';
this.handleAudioChange(file);
this.uploading = true;
this.uploadProgress = 0;
this.uploadToOssWithSignature(file, uploadId, 'audio');
return false;
},
handleAudioChange: function (file) {
var rawFile = file && file.raw ? file.raw : file;
if (!rawFile) {
return;
}
if (this.audioPreviewUrl && this.audioPreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.audioPreviewUrl);
}
this.audioPreviewUrl = URL.createObjectURL(rawFile);
},
handleUploadError: function (uploadId) {
if (uploadId && uploadId !== this.currentUploadId) {
return;
}
this.uploading = false;
this.uploadProgress = 0;
this.currentUploadType = '';
this.$message.error('上传失败,请重试');
},
confirmImageReupload: function () {
if (this.uploading) {
this.$message.warning('正在处理,请稍候再试');
return;
}
this.$confirm('重新上传会覆盖当前图片,确定继续吗?', '确认重新上传', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
this.reuploadImage();
}.bind(this)).catch(function () {});
},
reuploadImage: function () {
if (this.imagePreviewUrl && this.imagePreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.imagePreviewUrl);
}
this.imagePreviewUrl = '';
this.saveData();
var input = this.getUploadInput('imageUpload');
if (input) {
input.value = '';
input.click();
}
},
confirmAudioReupload: function () {
if (this.uploading) {
this.$message.warning('正在处理,请稍候再试');
return;
}
this.$confirm('重新上传会覆盖当前音频,确定继续吗?', '确认重新上传', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
this.reuploadAudio();
}.bind(this)).catch(function () {});
},
reuploadAudio: function () {
if (this.audioPreviewUrl && this.audioPreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.audioPreviewUrl);
}
this.audioPreviewUrl = '';
this.saveData();
var input = this.getUploadInput('audioUpload');
if (input) {
input.value = '';
input.click();
}
},
openImagePreview: function () {
if (!this.imagePreviewUrl) {
return;
}
this.$alert('<img src="' + this.imagePreviewUrl + '" style="width:100%;">', '图片预览', {
dangerouslyUseHTMLString: true,
customClass: 'image-preview-dialog'
});
},
toggleAudio: function () {},
onAudioEnded: function () {},
calculateMD5: function (file) {
return new Promise(function (resolve, reject) {
var reader = new FileReader();
reader.onload = function (e) {
try {
var wordArray = CryptoJS.lib.WordArray.create(e.target.result);
var hash = CryptoJS.MD5(wordArray);
resolve(hash.toString());
} catch (err) {
reject(err);
}
};
reader.onerror = function (error) {
reject(error);
};
reader.readAsArrayBuffer(file);
});
},
uploadToOssWithSignature: async function (file, uploadId, targetType) {
this.$message.info('正在获取上传凭证...');
try {
var ossSignature = await callServerMethod('getOSSSignature');
if (uploadId !== this.currentUploadId) {
return;
}
if (!ossSignature || !ossSignature.data) {
this.handleUploadError(uploadId);
return;
}
await this.uploadToOSS(file, ossSignature.data, uploadId, targetType);
} catch (err) {
this.handleUploadError(uploadId);
}
},
uploadToOSS: async function (file, ossConfig, uploadId, targetType) {
var client = new OSS({
region: ossConfig.region,
accessKeyId: ossConfig.accessKeyId,
accessKeySecret: ossConfig.accessKeySecret,
stsToken: ossConfig.securityToken,
bucket: ossConfig.bucket,
cors: true,
secure: true,
silent: true
});
this.$message.info('正在计算文件 MD5 值...');
try {
var md5 = await this.calculateMD5(file);
if (uploadId !== this.currentUploadId) {
return;
}
var ext = file.name.split('.').pop().toLowerCase();
var newFileName = md5 + '.' + ext;
await client.multipartUpload(newFileName, file, {
progress: function (p) {
if (uploadId === this.currentUploadId) {
this.uploadProgress = Math.floor(p * 100);
}
}.bind(this)
});
if (uploadId !== this.currentUploadId) {
return;
}
var url = (ossConfig.domain || '').replace('http://', 'https://') + newFileName;
this.uploadProgress = 100;
this.uploading = false;
this.currentUploadType = '';
if (targetType === 'image') {
if (this.imagePreviewUrl && this.imagePreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.imagePreviewUrl);
}
this.imagePreviewUrl = url;
} else if (targetType === 'audio') {
if (this.audioPreviewUrl && this.audioPreviewUrl.indexOf('blob:') === 0) {
URL.revokeObjectURL(this.audioPreviewUrl);
}
this.audioPreviewUrl = url;
}
this.saveData();
this.$message.success('上传成功');
} catch (err) {
this.handleUploadError(uploadId);
}
},
handleAiTag: async function () {
if (!this.audioPreviewUrl) {
this.$message.warning('请先上传音频');
return;
}
var base = this.getApiBase();
this.aiLoading = true;
this.aiError = '';
var loadingInstance = this.$loading({
lock: true,
text: 'AI打点处理中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.4)'
});
this.$message.info('AI打点处理中...');
try {
var resp = await fetch(base + '/open/api/ai/dpe/v1/audio/audiopoint', {
method: 'POST',
mode: 'cors',
cache: 'no-cache',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
audio_url: this.audioPreviewUrl
})
});
var json = await resp.json();
this.aiLoading = false;
if (json && json.code === 200 && json.data) {
this.aiTagData = Array.isArray(json.data.point_data) ? json.data.point_data : [];
if (json.data.audio_url) {
this.audioPreviewUrl = json.data.audio_url;
}
this.openAiDialog();
this.saveData();
this.$message.success('AI打点完成');
return;
}
this.aiError = (json && (json.msg || json.message)) ? (json.msg || json.message) : 'AI打点失败';
this.$message.error(this.aiError);
} catch (err) {
this.aiLoading = false;
this.aiError = 'AI打点请求失败';
this.$message.error(this.aiError);
} finally {
if (loadingInstance) {
loadingInstance.close();
}
}
},
handleAiImage: async function () {
if (!this.imagePreviewUrl) {
this.$message.warning('请先上传图片');
return;
}
var base = this.getApiBase();
this.aiImageLoading = true;
this.aiImageError = '';
var loadingInstance = this.$loading({
lock: true,
text: 'AI图片理解处理中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.4)'
});
this.$message.info('AI图片理解处理中...');
try {
var resp = await fetch(base + '/open/api/ai/dpe/v1/imagethinking', {
method: 'POST',
mode: 'cors',
cache: 'no-cache',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
image_url: this.imagePreviewUrl,
prompt: `
# Role Definition
You are a senior expert in children's picture book analysis. Your task is to carefully observe the provided single-page image of a picture book and convert it into a structured, highly detailed text description.
These descriptions will serve as the underlying data for an "AI Picture Book Teacher", allowing the AI to "read" and understand the visual content of the page just like a real human.
# Extraction Requirements
Please conduct an in-depth analysis of the image and extract information strictly according to the following 5 dimensions:
1. Original Book Text: If there is any original text printed on the image, please use your OCR capability to extract it completely. If there is no text, simply write "None".
2. Main Scene Description: Who is in the picture? Where are they? What are they doing? (Be specific, including the types of characters, their clothing, and core actions).
3. Character Emotions and Status: What are the facial expressions and body language of the characters? What emotional state are they in (e.g., happy, sad, scared, curious, surprised)? If there are no obvious characters, write "None".
4. Environment and Hidden Details: What is the background environment like? Are there any easily overlooked small details that a child might find interesting (e.g., a small animal hiding in a corner, a dropped object on the floor, the weather outside the window)?
5. Atmosphere and Colors: What is the overall color palette of the image (e.g., bright and warm, dark and gloomy, vibrant and colorful)? What kind of atmosphere does it convey?
# Output Format Restrictions
Please strictly follow the format below for your output. Do not include any extra greetings, Markdown formatting, or concluding explanations:
Original Book Text: [Fill in content]
Main Scene Description: [Fill in content]
Character Emotions and Status: [Fill in content]
Environment and Hidden Details: [Fill in content]
Atmosphere and Colors: [Fill in content]
`
})
});
var json = await resp.json();
this.aiImageLoading = false;
if (json && json.code === 200) {
this.aiImageContent = typeof json.data === 'string' ? json.data : '';
this.openAiImageDialog();
this.saveData();
this.$message.success('AI图片理解完成');
return;
}
this.aiImageError = (json && (json.msg || json.message)) ? (json.msg || json.message) : 'AI图片理解失败';
this.$message.error(this.aiImageError);
} catch (err) {
this.aiImageLoading = false;
this.aiImageError = 'AI图片理解请求失败';
this.$message.error(this.aiImageError);
} finally {
if (loadingInstance) {
loadingInstance.close();
}
}
},
saveData: function () {
if (!window.courseware || !window.courseware.setData) {
return;
}
var action = [];
if (this.audioPreviewUrl || (this.aiTagData && this.aiTagData.length)) {
action.push({
type: 'lyrics',
content: [
{
audio_url: this.audioPreviewUrl,
points: this.aiTagData || []
}
]
});
}
if (Array.isArray(this.quizList)) {
this.quizList.forEach(function (item) {
if (!item || item.type !== 'query') {
return;
}
action.push({
type: 'query',
text: item.question || '',
answer: item.answer || '',
hint: item.hint || '',
tip: item.tip || ''
});
});
}
var data = {
image: this.imagePreviewUrl,
action: action,
aiImageContent: this.aiImageContent,
ai_script: this.scriptText
};
// console.log('saveData payload', JSON.stringify(data, null, 2));
window.courseware.setData(data, function () {}, key);
},
validateJson: function () {
if (!this.scriptText) {
this.jsonError = '';
return;
}
try {
JSON.parse(this.scriptText);
this.jsonError = '';
} catch (err) {
this.jsonError = err.message || 'JSON 语法错误';
}
}
}
});
\ No newline at end of file
{ {
"name": "h5-template-generator", "name": "h5-template-generator",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 3,
"requires": true, "requires": true,
"dependencies": { "packages": {
"bl": { "": {
"name": "h5-template-generator",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"compressing": "^1.5.0"
}
},
"node_modules/bl": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
"requires": { "dependencies": {
"readable-stream": "^2.3.5", "readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1" "safe-buffer": "^5.1.1"
} }
}, },
"buffer-alloc": { "node_modules/buffer-alloc": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"requires": { "dependencies": {
"buffer-alloc-unsafe": "^1.1.0", "buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0" "buffer-fill": "^1.0.0"
} }
}, },
"buffer-alloc-unsafe": { "node_modules/buffer-alloc-unsafe": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
}, },
"buffer-crc32": { "node_modules/buffer-crc32": {
"version": "0.2.13", "version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
"engines": {
"node": "*"
}
}, },
"buffer-fill": { "node_modules/buffer-fill": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
}, },
"compressing": { "node_modules/compressing": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/compressing/-/compressing-1.5.0.tgz", "resolved": "https://registry.npmjs.org/compressing/-/compressing-1.5.0.tgz",
"integrity": "sha512-CPMzMd/MswJh7CPRo605FQhXQlP0JbwCjPteh9GZ0jYTQcDBrYJLEW7Fm1dpTdOHk0/2ZE2C8SO5EX4Dp7KZ8w==", "integrity": "sha512-CPMzMd/MswJh7CPRo605FQhXQlP0JbwCjPteh9GZ0jYTQcDBrYJLEW7Fm1dpTdOHk0/2ZE2C8SO5EX4Dp7KZ8w==",
"requires": { "dependencies": {
"flushwritable": "^1.0.0", "flushwritable": "^1.0.0",
"get-ready": "^1.0.0", "get-ready": "^1.0.0",
"iconv-lite": "^0.5.0", "iconv-lite": "^0.5.0",
...@@ -51,107 +62,117 @@ ...@@ -51,107 +62,117 @@
"tar-stream": "^1.5.2", "tar-stream": "^1.5.2",
"yauzl": "^2.7.0", "yauzl": "^2.7.0",
"yazl": "^2.4.2" "yazl": "^2.4.2"
},
"engines": {
"node": ">= 4.0.0"
} }
}, },
"core-util-is": { "node_modules/core-util-is": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
}, },
"end-of-stream": { "node_modules/end-of-stream": {
"version": "1.4.4", "version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"requires": { "dependencies": {
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"fd-slicer": { "node_modules/fd-slicer": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
"requires": { "dependencies": {
"pend": "~1.2.0" "pend": "~1.2.0"
} }
}, },
"flushwritable": { "node_modules/flushwritable": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz", "resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz",
"integrity": "sha1-PjKNj95BKtR+c44751C00pAENJg=" "integrity": "sha1-PjKNj95BKtR+c44751C00pAENJg="
}, },
"fs-constants": { "node_modules/fs-constants": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
}, },
"get-ready": { "node_modules/get-ready": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz", "resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz",
"integrity": "sha1-+RgX8emt7P6hOlYq38jeiDqzR4I=" "integrity": "sha1-+RgX8emt7P6hOlYq38jeiDqzR4I="
}, },
"iconv-lite": { "node_modules/iconv-lite": {
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.0.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.0.tgz",
"integrity": "sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==", "integrity": "sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==",
"requires": { "dependencies": {
"safer-buffer": ">= 2.1.2 < 3" "safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
} }
}, },
"inherits": { "node_modules/inherits": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
}, },
"isarray": { "node_modules/isarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
}, },
"minimist": { "node_modules/minimist": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}, },
"mkdirp": { "node_modules/mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": { "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
"dependencies": {
"minimist": "0.0.8" "minimist": "0.0.8"
},
"bin": {
"mkdirp": "bin/cmd.js"
} }
}, },
"once": { "node_modules/once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": { "dependencies": {
"wrappy": "1" "wrappy": "1"
} }
}, },
"pend": { "node_modules/pend": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
}, },
"process-nextick-args": { "node_modules/process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
}, },
"pump": { "node_modules/pump": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"requires": { "dependencies": {
"end-of-stream": "^1.1.0", "end-of-stream": "^1.1.0",
"once": "^1.3.1" "once": "^1.3.1"
} }
}, },
"readable-stream": { "node_modules/readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": { "dependencies": {
"core-util-is": "~1.0.0", "core-util-is": "~1.0.0",
"inherits": "~2.0.3", "inherits": "~2.0.3",
"isarray": "~1.0.0", "isarray": "~1.0.0",
...@@ -159,50 +180,49 @@ ...@@ -159,50 +180,49 @@
"safe-buffer": "~5.1.1", "safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1", "string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1" "util-deprecate": "~1.0.1"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
} }
}, },
"safe-buffer": { "node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/safe-buffer": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
"integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg=="
}, },
"safer-buffer": { "node_modules/safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
}, },
"streamifier": { "node_modules/streamifier": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz",
"integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=" "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=",
"engines": {
"node": ">=0.10"
}
}, },
"string_decoder": { "node_modules/string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": { "dependencies": {
"safe-buffer": { "safe-buffer": "~5.1.0"
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
} }
}, },
"tar-stream": { "node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/tar-stream": {
"version": "1.6.2", "version": "1.6.2",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
"requires": { "dependencies": {
"bl": "^1.0.0", "bl": "^1.0.0",
"buffer-alloc": "^1.2.0", "buffer-alloc": "^1.2.0",
"end-of-stream": "^1.0.0", "end-of-stream": "^1.0.0",
...@@ -210,42 +230,48 @@ ...@@ -210,42 +230,48 @@
"readable-stream": "^2.3.0", "readable-stream": "^2.3.0",
"to-buffer": "^1.1.1", "to-buffer": "^1.1.1",
"xtend": "^4.0.0" "xtend": "^4.0.0"
},
"engines": {
"node": ">= 0.8.0"
} }
}, },
"to-buffer": { "node_modules/to-buffer": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
}, },
"util-deprecate": { "node_modules/util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
}, },
"wrappy": { "node_modules/wrappy": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"xtend": { "node_modules/xtend": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"engines": {
"node": ">=0.4"
}
}, },
"yauzl": { "node_modules/yauzl": {
"version": "2.10.0", "version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
"requires": { "dependencies": {
"buffer-crc32": "~0.2.3", "buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0" "fd-slicer": "~1.1.0"
} }
}, },
"yazl": { "node_modules/yazl": {
"version": "2.5.1", "version": "2.5.1",
"resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz",
"integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==",
"requires": { "dependencies": {
"buffer-crc32": "~0.2.3" "buffer-crc32": "~0.2.3"
} }
} }
......
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