ul-question-test-ui 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -451,4 +451,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
451
451
  `,Ye+=Oe+`
452
452
  `,Ye+=Se[1]+`
453
453
  `,Ye+=Se[0]+`
454
- `,Ye+="UNSIGNED-PAYLOAD",pe+="X-Amz-Signature="+Ft(Gf(me,ke,this.sk,this.region,Ye)),{ActualSignedRequestHeaders:oe,SignedUrl:(this.isSecure?"https":"http")+"://"+ge+":"+this.port+pe}},ct.prototype.createPostSignatureSync=function(b){var T=b.signatureContext||this.signatureContext;if(T.signature==="v4")return this.createV4PostSignatureSync(b);var R=(b=b||{}).Bucket?String(b.Bucket):null,j=b.Key?String(b.Key):null,Z=b.Expires?parseInt(b.Expires,10):300,G={};if(b.FormParams&&b.FormParams instanceof Object&&!(b.FormParams instanceof Array))for(var V in b.FormParams)({}).hasOwnProperty.call(b.FormParams,V)&&(G[V]=b.FormParams[V]);this.securityToken&&!G[T.headerPrefix+"security-token"]&&(G[T.headerPrefix+"security-token"]=this.securityToken);var oe=new Date;oe.setTime(parseInt(new Date().getTime(),10)+1e3*Z),oe=Hf(oe.toUTCString()),R&&(G.bucket=R),j&&(G.key=j);var ie=[];ie.push('{"expiration":"'),ie.push(oe),ie.push('", "conditions":[');var le=!0,ve=!0,pe=["acl","bucket","key","success_action_redirect","redirect","success_action_status"];for(var de in G)if(de){var ge=G[de];(de=String(de).toLowerCase())==="bucket"?le=!1:de==="key"&&(ve=!1),Ut.indexOf(de)<0&&pe.indexOf(de)<0&&de.indexOf(T.headerPrefix)!==0||(ie.push('{"'),ie.push(de),ie.push('":"'),ie.push(ge!==null?String(ge):""),ie.push('"},'))}le&&ie.push('["starts-with", "$bucket", ""],'),ve&&ie.push('["starts-with", "$key", ""],'),ie.push("]}");var we=ie.join("");ie=window.btoa?window.btoa(we):Lo.encode(we);var me=et("sha1",this.sk).update(ie).digest("base64");return{OriginPolicy:we,Policy:ie,Signature:me,Token:this.ak+":"+me+":"+ie}},ct.prototype.createV4PostSignatureSync=function(b){var T=(b=b||{}).signatureContext||this.signatureContext,R=b.Bucket?String(b.Bucket):null,j=b.Key?String(b.Key):null,Z=b.Expires?parseInt(b.Expires,10):300,G={};if(b.FormParams&&b.FormParams instanceof Object&&!(b.FormParams instanceof Array))for(var V in b.FormParams)({}).hasOwnProperty.call(b.FormParams,V)&&(G[V]=b.FormParams[V]);this.securityToken&&!G[T.headerPrefix+"security-token"]&&(G[T.headerPrefix+"security-token"]=this.securityToken);var oe=vc(new Date().toUTCString()),ie=oe[0],le=oe[1],ve=this.ak+"/"+ie+"/"+this.region+"/s3/aws4_request",pe=new Date;pe.setTime(parseInt(new Date().getTime(),10)+1e3*Z),pe=Hf(pe.toUTCString()),G["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",G["X-Amz-Date"]=le,G["X-Amz-Credential"]=ve,R&&(G.bucket=R),j&&(G.key=j);var de=[];de.push('{"expiration":"'),de.push(pe),de.push('", "conditions":[');var ge=!0,we=!0,me=["acl","bucket","key","success_action_redirect","redirect","success_action_status"];for(var ke in G)if(ke){var Se=G[ke];(ke=String(ke).toLowerCase())==="bucket"?ge=!1:ke==="key"&&(we=!1),Ut.indexOf(ke)<0&&me.indexOf(ke)<0&&ke.indexOf(T.headerPrefix)!==0||(de.push('{"'),de.push(ke),de.push('":"'),de.push(Se!==null?String(Se):""),de.push('"},'))}ge&&de.push('["starts-with", "$bucket", ""],'),we&&de.push('["starts-with", "$key", ""],'),de.push("]}");var Me=de.join("");de=window.btoa?window.btoa(Me):Lo.encode(Me);var Pe=Kf(ie,this.sk,this.region,de);return{OriginPolicy:Me,Policy:de,Algorithm:G["X-Amz-Algorithm"],Credential:G["X-Amz-Credential"],Date:G["X-Amz-Date"],Signature:Pe}};var Zk=ct,Wf=Number.MAX_VALUE;function Md(){this.consoleLog=window.console,this._level=Wf}Md.prototype.setLevel=function(b){b&&(b=(b=String(b).toLowerCase())==="info"?20:b==="warn"?30:b==="error"?40:b==="debug"?10:Wf,this._level=b)},Md.prototype.runLog=function(b,T,R){if(b){var j=[new Date().toLocaleString(),b.toLowerCase(),T,R].join("|");b.toLowerCase()==="debug"&&this._level<=10?this.consoleLog.debug(j):b.toLowerCase()==="info"&&this._level<=20?this.consoleLog.info(j):b.toLowerCase()==="warn"&&this._level<=30?this.consoleLog.warn(j):b.toLowerCase()==="error"&&this._level<=40&&this.consoleLog.error(j)}};var Jk=Md,eC=u(1062),tC=u.t(eC,2),Yf=function(b){return Object.prototype.toString.call(b)==="[object String]"&&b.lastIndexOf("/")!==b.length-1&&(b+="/"),b},nC={extend:function(b){b.prototype.dropFile=function(T,R){this.deleteObject(T,R)},b.prototype.dropFolder=function(T,R){var j=this;T=T||{};var Z=(function(de,ge,we){de=de||function(){};var me=new Date().getTime();return function(ke,Se){return ge.runLog("info","dropFolder","ObsClient cost "+(new Date().getTime()-me)+" ms"),Object.prototype.toString.call(ke)==="[object String]"?de(new Error(ke),Se):de(ke,Se)}})(R,j.log),G=(function(de){return de=de||function(){},function(ge,we,me){return Object.prototype.toString.call(me)==="[object Error]"?de(ge,we,me):Object.prototype.toString.call(me)==="[object String]"?de(ge,we,new Error(me)):me?me.CommonMsg.Status>300?de(ge,we,new Error("status:"+me.CommonMsg.Status+", code:"+me.CommonMsg.Code+", message:"+me.CommonMsg.Message)):void de(ge,we,me):void 0}})(T.EventCallback),V=T.TaskNum||1,oe=0,ie=[],le=function(de,ge,we,me){if(me)return ge.finished++,void we(ge);var ke=function(){oe++,j.dropFile({Bucket:ge.bucket,Key:de},function(Se,Me){oe--,ge.finished++,(function(){for(;oe<V&&ie.length>0;)ie.shift()()})(),Se?(G("dropFileFailed",de,Se),ge.subDeleted=!1):Me.CommonMsg.Status>=300?(G("dropFileFailed",de,Me),ge.subDeleted=!1):G("dropFileSucceed",de,Me),we(ge)})};oe<V?ke():ie.push(ke)},ve=function(de,ge,we){return function(me){!me.isTruncated&&me.finished===me.total&&me.subDeleted&&le(de,ge,we,!1)}},pe=Yf(T.Prefix);(function de(ge,we,me,ke,Se){oe++,j.listObjects({Bucket:we,Prefix:me,Delimiter:"/",Marker:ke},function(Me,Pe){if(oe--,Me)return Z(Me);if(Pe.CommonMsg.Status>=300)return Z(null,Pe);if(ge.total+=Pe.InterfaceResult.Contents.length,ge.total+=Pe.InterfaceResult.CommonPrefixes.length,ge.total!==0){ge.isTruncated=Pe.InterfaceResult.IsTruncated==="true";for(var Le=function(Je){return function(){de({total:0,finished:0,isTruncated:!1,bucket:we,subDeleted:!0},we,Je,null,ve(Je,ge,Se))}},Ve=0;Ve<Pe.InterfaceResult.CommonPrefixes.length;Ve++){var Oe=Yf(Pe.InterfaceResult.CommonPrefixes[Ve].Prefix);oe<V?de({total:0,finished:0,isTruncated:!1,bucket:we,subDeleted:!0},we,Oe,null,ve(Oe,ge,Se)):ie.push(Le(Oe))}for(var He=0;He<Pe.InterfaceResult.Contents.length;He++){var Ye=Pe.InterfaceResult.Contents[He].Key;le(Ye,ge,Se,Ye.lastIndexOf("/")===Ye.length-1)}ge.isTruncated&&(oe<V?de(ge,we,me,Pe.InterfaceResult.NextMarker,Se):ie.push(function(){de(ge,we,me,Pe.InterfaceResult.NextMarker,Se)}))}else Se(ge)})})({total:0,finished:0,isTruncated:!1,bucket:T.Bucket,subDeleted:!0},T.Bucket,pe,null,function(de){if(!de.isTruncated&&de.finished===de.total)if(de.subDeleted)j.dropFile({Bucket:de.bucket,Key:pe},function(we,me){return we?(G("dropFileFailed",pe,we),Z(we)):me.CommonMsg.Status>=300?(G("dropFileFailed",pe,me),Z(null,me)):(G("dropFileSucceed",pe,me),Z(null,me))});else{var ge="drop folder "+pe+" failed due to child file deletion failed";G("dropFileFailed",pe,new Error(ge)),Z(ge)}})}}},oC=nC,Ld=5368709120,yc=function(b){var T=[];if(T.push(b.bucket),T.push(b.key),T.push(b.sourceFile.name),T.push(String(b.partSize)),T.push(String(b.partCount)),T.push(String(b.fileStat.fileSize)),T.push(String(b.fileStat.lastModified)),b.uploadId&&T.push(b.uploadId),b.sseC&&T.push(b.sseC),b.sseCKey&&T.push(b.sseCKey),b.parts)for(var R=0;R<b.parts.length;R++){var j=b.parts[R];j&&(T.push(String(j.partNumber)),T.push(String(j.offset)),T.push(String(j.partSize)),T.push(String(j.isCompleted)),j.etag&&T.push(String(j.etag)))}return window.btoa(Rn()(T.join(""),!1,!0))},Id=function(b,T,R){b&&b.uploadId&&R.abortMultipartUpload({Bucket:b.bucket,Key:b.key,RequestDate:b.requestDate,UploadId:b.uploadId},function(j,Z){j?R.log.runLog("warn",T,"abort multipart upload failed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId+", err:"+j):Z.CommonMsg.Status>=300?R.log.runLog("warn",T,"abort multipart upload failed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId+", status:"+Z.CommonMsg.Status+", code:"+Z.CommonMsg.Code+", message:"+Z.CommonMsg.Message):(delete b.uploadId,R.log.runLog("warn",T,"abort multipart upload succeed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId))})},Xf=function(b){if(!(b.finishedCount<b.uploadCheckpoint.partCount)){if(b.isAbort)return Id(b.uploadCheckpoint,b.funcName,b.that),b.callback("uploadFile failed the upload task is aborted");if(b.isSuspend)return b.callback("the process of uploadFile is suspened, you can retry with the uploadCheckpoint");if(b.hasError)return b.callback("uploadFile finished with error, you can retry with the uploadCheckpoint");for(var T=[],R=0;R<b.uploadCheckpoint.partCount;R++){var j=b.uploadCheckpoint.parts[R];T.push({PartNumber:j.partNumber,ETag:j.etag})}b.that.completeMultipartUpload({Bucket:b.uploadCheckpoint.bucket,Key:b.uploadCheckpoint.key,RequestDate:b.uploadCheckpoint.requestDate,UploadId:b.uploadCheckpoint.uploadId,Parts:T,CallbackUrl:b.callbackUrl,CallbackHost:b.callbackHost,CallbackBody:b.callbackBody,CallbackBodyType:b.callbackBodyType},function(Z,G){var V={bucket:b.uploadCheckpoint.bucket,key:b.uploadCheckpoint.key,uploadId:b.uploadCheckpoint.uploadId};return Z?(b.eventCallback("completeMultipartUploadFailed",V,Z),b.callback(Z)):G.CommonMsg.Status>=500?(b.eventCallback("completeMultipartUploadFailed",V,G),b.callback(null,G)):G.CommonMsg.Status>=300&&G.CommonMsg.Status<500?(b.eventCallback("completeMultipartUploadAborted",V,G),Id(b.uploadCheckpoint,b.funcName,b.that),b.callback(null,G)):(b.eventCallback("completeMultipartUploadSucceed",V,G),void b.callback(null,G))})}},Zf=function(b){b.resumeCallback({cancel:function(){b.isSuspend=!0;for(var oe=0;oe<b.uploadPartParams.length;oe++){var ie=b.uploadPartParams[oe].cancelHook;le=ie,Object.prototype.toString.call(le)==="[object Function]"&&ie()}var le}},b.uploadCheckpoint);var T=[],R=function(){for(;b.runningTask<b.taskNum&&T.length>0;)T.shift()();T.length===0&&Xf(b)},j=window.btoa?window.btoa:Lo.encode,Z=function(oe){return function(){if(b.runningTask++,b.isSuspend||b.isAbort)return b.runningTask--,b.finishedCount++,b.finishedCount+=T.length,T=[],R();var ie,le,ve,pe,de=0,ge=function(ke){if(!de){de=1;var Se,Me={Bucket:b.uploadCheckpoint.bucket,Key:b.uploadCheckpoint.key,RequestDate:b.uploadCheckpoint.requestDate,PartNumber:oe.partNumber,UploadId:b.uploadCheckpoint.uploadId,SourceFile:b.uploadCheckpoint.sourceFile,Offset:oe.offset,PartSize:oe.partSize,SseC:b.uploadCheckpoint.sseC,SseCKey:b.uploadCheckpoint.sseCKey,ProgressCallback:(Se=oe.partNumber,function(Pe,Le,Ve){b.progressCallback(Se,Pe)}),ContentMD5:ke};b.uploadPartParams.push(Me),b.that.uploadPart(Me,function(Pe,Le){if(b.runningTask--,b.finishedCount++,b.isSuspend)return R();var Ve={partNumber:oe.partNumber,bucket:b.uploadCheckpoint.bucket,key:b.uploadCheckpoint.key,uploadId:b.uploadCheckpoint.uploadId};Pe?(b.eventCallback("uploadPartFailed",Ve,Pe),b.hasError=!0):Le.CommonMsg.Status>=500||Le.CommonMsg.Status===400&&Le.CommonMsg.Code==="BadDigest"?(b.eventCallback("uploadPartFailed",Ve,Le),b.hasError=!0):Le.CommonMsg.Status>=300&&Le.CommonMsg.Status<500?(b.isAbort=!0,b.hasError=!0,b.eventCallback("uploadPartAborted",Ve,Le)):(oe.etag=Le.InterfaceResult.ETag,oe.isCompleted=!0,Ve.etag=oe.etag,b.uploadCheckpoint.md5=yc(b.uploadCheckpoint),b.eventCallback("uploadPartSucceed",Ve,Le),b.that.log.runLog("debug",b.funcName,"Part "+String(oe.partNumber)+" is finished, uploadId "+b.uploadCheckpoint.uploadId)),R()})}};if(b.verifyMd5&&window.FileReader&&(b.uploadCheckpoint.sourceFile instanceof window.File||b.uploadCheckpoint.sourceFile instanceof window.Blob)){var we=(ie=b.uploadCheckpoint.sourceFile,le=oe.offset,ve=oe.offset+oe.partSize,pe=pe||ie.type,ie.mozSlice?ie.mozSlice(le,ve,pe):ie.webkitSlice?ie.webkitSlice(le,ve,pe):ie.slice(le,ve,pe)),me=new window.FileReader;return me.onload=function(ke){var Se=(function(Pe){Pe=new Uint8Array(Pe);for(var Le,Ve=0;Ve<Pe.length;){var Oe=Ve+16384;Oe=Oe<=Pe.length?Oe:Pe.length,Le?Le+=String.fromCharCode.apply(null,Pe.slice(Ve,Oe)):Le=String.fromCharCode.apply(null,Pe.slice(Ve,Oe)),Ve=Oe}return Pe=null,Le})(ke.target.result),Me=j(Rn()(Se,!1,!0));Se=null,ge(Me)},me.onerror=function(ke){b.that.log.runLog("error",b.funcName,"Caculate md5 for part "+String(oe.partNumber)+" failed"),ge()},void me.readAsArrayBuffer(we)}ge()}};if(!b.isSuspend){for(var G=0;G<b.uploadCheckpoint.partCount;G++){var V=b.uploadCheckpoint.parts[G];V.isCompleted?(b.finishedCount++,b.finishedBytes+=V.partSize):T.push(Z(V))}return T.length===0?Xf(b):R()}b.callback("the process of uploadFile is suspened, you can retry with the uploadCheckpoint")},rC={extend:function(b){b.prototype.uploadFile=function(T,R){var j=this;T=T||{};var Z="uploadFile",G=(function(Oe,He,Ye){Oe=Oe||function(){};var Je=new Date().getTime();return function(xt,Tt){return He.runLog("info","uploadFile","ObsClient cost "+(new Date().getTime()-Je)+" ms"),Object.prototype.toString.call(xt)==="[object String]"?Oe(new Error(xt),Tt):Oe(xt,Tt)}})(R,j.log),V=(function(Oe){return Oe=Oe||function(){},function(He,Ye,Je){return Object.prototype.toString.call(Je)==="[object Error]"?Oe(He,Ye,Je):Object.prototype.toString.call(Je)==="[object String]"?Oe(He,Ye,new Error(Je)):Je?Je.CommonMsg.Status>300?Oe(He,Ye,new Error("status:"+Je.CommonMsg.Status+", code:"+Je.CommonMsg.Code+", message:"+Je.CommonMsg.Message)):void Oe(He,Ye,Je):void 0}})(T.EventCallback),oe=T.TaskNum||1,ie=T.ProgressCallback||function(){},le=T.ResumeCallback||function(){},ve=T.VerifyMd5||!1;j.log.runLog("info",Z,"enter uploadFile...");var pe=null;if(T.UploadCheckpoint&&T.UploadCheckpoint.sourceFile&&T.UploadCheckpoint.fileStat&&T.UploadCheckpoint.uploadId&&T.UploadCheckpoint.md5===yc(T.UploadCheckpoint)?pe=T.UploadCheckpoint:Id(T.UploadCheckpoint,Z,j),pe){var de=pe.sourceFile;if(!(de instanceof window.File||de instanceof window.Blob))return G("source file is not valid, must be an instanceof [File | Blob]");if(!de.mozSlice&&!de.webkitSlice&&!de.slice)return G("your browser cannot support the slice method for [File | Blob]")}else{var ge=T.SourceFile;if(!(ge instanceof window.File||ge instanceof window.Blob))return G("source file is not valid, must be an instanceof [File | Blob]");if(!ge.mozSlice&&!ge.webkitSlice&&!ge.slice)return G("your browser cannot support the slice method for [File | Blob]");j.log.runLog("debug",Z,"Begin to uploadFile to OBS from file:"+ge.name);var we=ge.size,me=parseInt(T.PartSize,10),ke=0,Se=[];if(we===0)me=0,ke=1,Se.push({partNumber:1,offset:0,partSize:0,isCompleted:!1});else{if(me=isNaN(me)||me<102400?9437184:me>Ld?Ld:me,(ke=Math.floor(we/me))>=1e4&&(me=Math.floor(we/1e4),we%1e4!=0&&(me+=1),ke=Math.floor(we/me)),me>Ld)return G("The source file "+ge.name+" is too large");var Me=we%me;Me!==0&&ke++;for(var Pe=0;Pe<ke;Pe++)Se.push({partNumber:Pe+1,offset:Pe*me,partSize:me,isCompleted:!1});Me!==0&&(Se[ke-1].partSize=Me)}j.log.runLog("debug",Z,"Total parts count "+ke),(pe={bucket:T.Bucket,key:T.Key,sourceFile:ge,partSize:me,partCount:ke,parts:Se}).fileStat={fileSize:we,lastModified:ge.lastModified},T.SseC&&T.SseCKey&&(pe.sseC=T.SseC,pe.sseCKey=T.SseCKey),pe.md5=yc(pe)}pe.requestDate=T.RequestDate;var Le={start:new Date().getTime(),uploadCheckpoint:pe,funcName:Z,taskNum:oe,callback:G,that:j,runningTask:0,finishedCount:0,hasError:!1,finishedBytes:0,isAbort:!1,resumeCallback:le,isSuspend:!1,partsLoaded:{},requestDate:T.RequestDate,uploadPartParams:[],verifyMd5:ve,callbackUrl:T.CallbackUrl,callbackHost:T.CallbackHost,callbackBody:T.CallbackBody,callbackBodyType:T.CallbackBodyType,eventCallback:function(Oe,He,Ye){Le.isSuspend||V(Oe,He,Ye)},progressCallback:function(Oe,He){Le.isSuspend||(Le.finishedBytes+=He,Le.partsLoaded[Oe]&&(Le.finishedBytes-=Le.partsLoaded[Oe]),Le.partsLoaded[Oe]=He,ie(Le.finishedBytes,Le.uploadCheckpoint.fileStat.fileSize,(new Date().getTime()-Le.start)/1e3))}};if(!pe.uploadId){var Ve=T.ContentType;return!Ve&&pe.key&&(Ve=j.util.mimeTypes[pe.key.substring(pe.key.lastIndexOf(".")+1)]),!Ve&&pe.sourceFile.name&&(Ve=j.util.mimeTypes[pe.sourceFile.name.substring(pe.sourceFile.name.lastIndexOf(".")+1)]),void j.initiateMultipartUpload({Bucket:T.Bucket,Key:T.Key,RequestDate:T.RequestDate,ACL:T.ACL,Metadata:T.Metadata,WebsiteRedirectLocation:T.WebsiteRedirectLocation,StorageClass:T.StorageClass,ContentType:Ve,Expires:T.Expires,SseKms:T.SseKms,SseKmsKey:T.SseKmsKey,SseC:T.SseC,SseCKey:T.SseCKey},function(Oe,He){var Ye={bucket:T.Bucket,key:T.Key};if(Oe)return Le.eventCallback("initiateMultipartUploadFailed",Ye,Oe),G(Oe);if(He.CommonMsg.Status>=300)return Le.eventCallback("initiateMultipartUploadFailed",Ye,He),G(null,He);var Je=He.InterfaceResult.UploadId;pe.uploadId=Je,pe.md5=yc(pe),Le.uploadCheckpoint=pe,Ye.uploadId=Je,j.log.runLog("info",Z,"Claim a new upload id "+Je),Le.eventCallback("initiateMultipartUploadSucceed",Ye,He),Zf(Le)})}Zf(Le)}}},iC=rC;function ze(b){this.factory(b)}function Jf(b){return b.slice(0,1).toUpperCase()+b.slice(1)}var eg=["createBucket","listBuckets","getBucketMetadata","headBucket","deleteBucket","setBucketQuota","getBucketQuota","getBucketStorageInfo","setBucketPolicy","getBucketPolicy","deleteBucketPolicy","setBucketVersioningConfiguration","getBucketVersioningConfiguration","putBackToSource","deleteBackToSource","getBackToSource","getBucketLocation","listVersions","listObjects","setBucketLifecycleConfiguration","getBucketLifecycleConfiguration","deleteBucketLifecycleConfiguration","setBucketAcl","getBucketAcl","setBucketLoggingConfiguration","getBucketLoggingConfiguration","setBucketWebsiteConfiguration","getBucketWebsiteConfiguration","deleteBucketWebsiteConfiguration","setBucketNotification","getBucketNotification","setBucketTagging","getBucketTagging","deleteBucketTagging","getBucketCors","deleteBucketCors","setBucketStoragePolicy","getBucketStoragePolicy","getObject","getObjectMetadata","setObjectMetadata","setObjectAcl","getObjectAcl","deleteObject","deleteObjects","listMultipartUploads","listParts","abortMultipartUpload","completeMultipartUpload","getBucketInventory","setBucketInventory","deleteBucketInventory","getBucketEncryption","setBucketEncryption","deleteBucketEncryption","getBucketRequesterPay","setBucketRequesterPay","setMirrorBackToSource","getMirrorBackToSource","deleteMirrorBackToSource","getWorkflowTrigger","deleteWorkflowTrigger","createWorkflowTrigger","restoreFailedWorkflowExecution","createTemplate","createWorkflow","getWorkflowList","deleteWorkflow","getWorkflowTemplateList","getWorkflowInstanceList","deleteTemplate","updateWorkflow","getActionTemplates","getWorkflowAuthorization","openWorkflowAuthorization","getBucketDirectColdAccess","setBucketDirectColdAccess","deleteBucketDirectColdAccess","getBucketCustomDomain","setBucketCustomDomain","deleteBucketCustomDomain","setBucketCors","getBucketReplication","setBucketReplication","deleteBucketReplication","getCDNNotifyConfiguration","setCdnNotifyConfiguration","getQuota","getBucketDisPolicy","setBucketDisPolicy","deleteBucketDisPolicy","createOnlineDecom","getOnlineDecom","getWorkflowAgreements","openWorkflowAgreements","deleteOnlineDecom","getMyActionTemplates","createMyActionTemplate","getMyactiontemplateDetail","updateMyActionTemplate","deleteMyActionTemplate","forbidMyActionTemplate","updatePublicActionTemplate","getOmPublicActionTemplates","setSFSAcl","getSFSAcl","deleteSFSAcl","setBucketAlias","bindBucketAlias","unbindBucketAlias","deleteBucketAlias","listBucketsAlias","getBucketAlias"];function aC(b){return function(T,R){this.exec(Jf(b),T,R)}}for(var Nd=0;Nd<eg.length;Nd++){var tg=eg[Nd];ze.prototype[tg]=aC(tg)}function Od(b){return Object.prototype.toString.call(b)==="[object Function]"}function sC(b){return function(T,R){if(Od(T))b.call(this,null,T);else{if(!Od(R)){var j=this;return new Promise(function(Z,G){b.call(j,T,function(V,oe){if(V)return G(V);Z(oe)})})}b.call(this,T,R)}}}if(ze.prototype.createTemplate=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("CreateTemplate",b,T)},ze.prototype.createWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("CreateWorkflow",b,T)},ze.prototype.restoreFailedWorkflowExecution=function(b,T){b.ApiPath="v2/workflowexecutions",this.exec("RestoreFailedWorkflowExecution",b,T)},ze.prototype.getWorkflowList=function(b,T){b.ApiPath="v2/workflows",this.exec("GetWorkflowList",b,T)},ze.prototype.deleteWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("DeleteWorkflow",b,T)},ze.prototype.deleteTemplate=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("DeleteTemplate",b,T)},ze.prototype.getWorkflowTemplateList=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("GetWorkflowTemplateList",b,T)},ze.prototype.getWorkflowInstanceList=function(b,T){b.ApiPath="v2/workflowexecutions",this.exec("GetWorkflowInstanceList",b,T)},ze.prototype.updateWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("UpdateWorkflow",b,T)},ze.prototype.getActionTemplates=function(b,T){b.ApiPath="v2/actiontemplates",this.exec("GetActionTemplates",b,T)},ze.prototype.getWorkflowAuthorization=function(b,T){b.ApiPath="v2/workflow-authorization",this.exec("GetWorkflowAuthorization",b,T)},ze.prototype.openWorkflowAuthorization=function(b,T){b.ApiPath="v2/workflow-authorization",this.exec("OpenWorkflowAuthorization",b,T)},ze.prototype.getPublicationTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/publicactiontemplates",this.exec("GetPublicationTemplates",b,T),this.util.pathStyle=!1},ze.prototype.getPublicationTemplateDetail=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/publicactiontemplates",this.exec("GetPublicationTemplateDetail",b,T),this.util.pathStyle=!1},ze.prototype.getWorkflowAgreements=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/workflow-agreements",this.exec("GetWorkflowAgreements",b,T),this.util.pathStyle=!1},ze.prototype.openWorkflowAgreements=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/workflow-agreements",this.exec("OpenWorkflowAgreements",b,T),this.util.pathStyle=!1},ze.prototype.createMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("CreateMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.getMyActionTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("GetMyActionTemplates",b,T),this.util.pathStyle=!1},ze.prototype.getMyactiontemplateDetail=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("GetMyactiontemplateDetail",b,T),this.util.pathStyle=!1},ze.prototype.updateMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("UpdateMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.deleteMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("DeleteMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.forbidMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("ForbidMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.updatePublicActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/ompublicactiontemplates",this.exec("UpdatePublicActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.getOmPublicActionTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/ompublicactiontemplates",this.exec("GetOmPublicActionTemplates",b,T),this.util.pathStyle=!1},ze.prototype.putObject=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time,please specify one of eigther a string or file to be send!";return this.log.runLog("error","PutObject",R),T(new Error(R),null)}if(!("ContentType"in b)&&("Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),!b.ContentType&&"SourceFile"in b)){var j=b.SourceFile.name;b.ContentType=this.util.mimeTypes[j.substring(j.lastIndexOf(".")+1)]}this.exec("PutObject",b,T)},ze.prototype.appendObject=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time,please specify one of eigther a string or file to be send!";return this.log.isLevelEnabled("error")&&this.log.runLog("error","PutObject",R),T(new Error(R),null)}"ContentType"in b||("Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),!b.ContentType&&"SourceFile"in b&&(b.ContentType=this.util.mimeTypes[b.SourceFile.substring(b.SourceFile.lastIndexOf(".")+1)])),this.exec("AppendObject",b,T)},ze.prototype.copyObject=function(b,T){var R="CopySource";if(R in b){var j=b[R],Z=j.lastIndexOf("?versionId=");b[R]=Z>0?this.util.encodeURIWithSafe(j.slice(0,Z))+j.slice(Z):this.util.encodeURIWithSafe(j)}this.exec("CopyObject",b,T)},ze.prototype.copyPart=function(b,T){var R="CopySource";if(R in b){var j=b[R],Z=j.lastIndexOf("?versionId=");b[R]=Z>0?this.util.encodeURIWithSafe(j.slice(0,Z))+j.slice(Z):this.util.encodeURIWithSafe(j)}this.exec("CopyPart",b,T)},ze.prototype.restoreObject=function(b,T){this.exec("RestoreObject",b,function(R,j){!R&&j.InterfaceResult&&j.CommonMsg.Status<300&&(j.InterfaceResult.RestoreStatus=j.CommonMsg.Status===200?"AVALIABLE":"INPROGRESS"),T(R,j)})},ze.prototype.initiateMultipartUpload=function(b,T){"ContentType"in b||"Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),this.exec("InitiateMultipartUpload",b,T)},ze.prototype.uploadPart=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time, please specify one of eigther a string or file to be send!";return this.log.runLog("error","UploadPart",R),T(new Error(R),null)}this.exec("UploadPart",b,T)},oC.extend(ze),iC.extend(ze),Od(Promise)){for(var Dd in ze.prototype)if({}.hasOwnProperty.call(ze.prototype,Dd)){var lC=ze.prototype[Dd];ze.prototype[Dd]=sC(lC)}}for(var Bd in ze.prototype.exec=function(b,T,R){var j=this.log;j.runLog("info",b,"enter "+b+"...");var Z=new Date().getTime();T=T||{},R=R||function(){},this.util.exec(b,T,function G(V,oe){G.$called||(G.$called=!0,!V||V instanceof Error||(V=new Error(V)),j.runLog("debug",b,"ObsClient cost "+(new Date().getTime()-Z)+" ms"),R(V,oe))})},ze.prototype.initLog=function(b){b=b||{},this.log.setLevel(b.level);var T=["[OBS SDK Version="+this.util.obsSdkVersion];if(this.util.server){var R=this.util.port?":"+this.util.port:"";T.push("Endpoint="+(this.util.is_secure?"https":"http")+"://"+this.util.server+R)}T.push("Access Mode="+(this.util.path_style?"Path":"Virtual Hosting")+"]"),this.log.runLog("warn","init",T.join("];["))},ze.prototype.factory=function(b){this.log=new Jk,this.util=new Zk(this.log),b=b||{},this.util.initFactory(b.access_key_id,b.secret_access_key,b.is_secure,b.server,b.path_style,b.signature,b.region,b.port,b.timeout,b.security_token,b.is_signature_negotiation,b.is_cname,b.url_prefix,b.region_domains,b.setRequestHeaderHook,b.useRawXhr)},ze.prototype.refresh=function(b,T,R){this.util.refresh(b,T,R)},ze.prototype.createSignedUrlSync=function(b){return this.util.createSignedUrlSync(b)},ze.prototype.createV2SignedUrlSync=function(b){return this.util.createV2SignedUrlSync(b)},ze.prototype.createV4SignedUrlSync=function(b){return this.util.createV4SignedUrlSync(b)},ze.prototype.createPostSignatureSync=function(b){return this.util.createPostSignatureSync(b)},ze.prototype.createV4PostSignatureSync=function(b){return this.util.createV4PostSignatureSync(b)},ze.prototype.enums=tC,ze.prototype)({}).hasOwnProperty.call(ze.prototype,Bd)&&(ze.prototype[Jf(Bd)]=ze.prototype[Bd]);for(var Ys in ze.prototype)if({}.hasOwnProperty.call(ze.prototype,Ys)){var qd=Ys.indexOf("Configuration");qd>0&&qd+13===Ys.length&&(ze.prototype[Ys.slice(0,qd)]=ze.prototype[Ys])}var cC=ze})(),m.default})()}).call(this,r(5),r(4).Buffer)},function(n,o,r){var i="";i=r(6);var a={document:"doc,docx,xls,xlsx,ppt,pptx,pdf,txt,epub,pps,psd,xmind,dwg",image:"png,jpg,gif,jpeg,bmp",video:"mp4,avi,wmv,rm,rmvb,mpeg,mpg,mkv,mov,flv",audio:"mp3,wav,wma",zip:"zip,rar,7z",flash:"swf",srt:"srt",favico:"ico"},l=["document","image","video","audio","zip","flash","srt"];function s(d,u,m){if(d.indexOf(u)>-1){var h=new RegExp("("+u+"=)([^&]*)","gi");d=d.replace(h,u+"="+m)}else{var p=u+"="+m,g=d.indexOf("?");g<0?d+="?":g>=0&&g!=d.length-1&&(d+="&"),d+=p}return d}function c(d){d=d||{},this.multiple=!!d.multiple,this.maxSize=d.maxSize||512,this.fileTypes=d.fileTypes&&d.fileTypes.length>0?d.fileTypes:l,this.exts=d.exts||"",this.accetp="",this.mode=d.mode||"huawei",this.files=[],this.$trigger="",this.uptokenHost=d.uptokenHost||"https://courseapi.tongshike.cn",this.obsHost=d.obsHost||"",this.m3u8=d.m3u8,this.authorization=d.authorization,this.obsSign=d.obsSign,this.config=d.config||{},this.putExtra=d.putExtra||{},this.config.uphost||(this.config.uphost=""),this.obsHost&&this.obsHost.charAt(this.obsHost.length-1)=="/"&&(this.obsHost=this.obsHost.substring(0,this.obsHost.length-1))}c.prototype.initUpBtn=function(d){this.$trigger=d;var u=this,m=[];if(this.fileTypes.length>0)for(var h=0;h<this.fileTypes.length;h++){var p=this.fileTypes[h];m.push(a[p])}for(m=m.join(","),this.exts&&(m=this.exts),m=m.split(","),h=0;h<m.length;h++)m[h]="."+m[h];this.accetp=m.join(","),this.$el=document.createElement("input"),this.$el.style.display="none",this.$el.type="file",this.multiple&&this.$el.setAttribute("multiple",!0),this.$el.accept=this.accetp,document.body.appendChild(this.$el),this.$el.onchange=function(){this.files.length>0&&(u.handleFileChange(this.files),u.$el.value="")},this.$trigger.onclick=function(){u.$el.click()}},c.prototype.handleFileChange=function(d){this.uploadFiles(d)},c.prototype.uploadFiles=function(d){for(var u=0;u<d.length;u++){var m=d[u];if(m.ext=m.name.substring(m.name.lastIndexOf(".")).toLowerCase(),m.key="resources/web/"+Date.now()+Math.round(1e4*Math.random())+m.ext,m.percent=0,this.accetp.indexOf(m.ext)===-1)return this.error(m,{code:50001,msg:"不支持该类型文件"});if(1024*this.maxSize*1024<m.size)return this.error(m,{code:50002,msg:"文件不能超过"+this.maxSize+"mb"});this.onBeforeUpload&&this.onBeforeUpload(m),this.startUpload(m)}},c.prototype.startUpload=function(d){var u=this;switch(u.files.push(d),this.mode){case"qiniu":u.getToken(d,function(m){u.qiniuUploadByToken(d,m)});break;case"huawei":d.ext=d.ext||d.name.substring(d.name.lastIndexOf(".")),d.key=d.key||"resources/web/"+Date.now()+Math.round(1e4*Math.random())+d.ext,u.getObsClient(d.key,function(){u.putObject(d)})}},c.prototype.qiniuUploadByToken=function(d,u){var m=this;d.obsHost=m.obsHost,d.size>4194304&&(m.config.chunkSize=5);var h="".upload(d,d.key,u,m.putExtra,m.config);d.subscription=h.subscribe({next:function(p){m.onProgress&&m.onProgress(d,p.total.percent),d.onProgress&&d.onProgress(p.total.percent)},error:function(p){m.error(d,{code:50071,msg:"上传失败",err:p})},complete:function(p){d.duration=p.duration,d.key=p.key,m.success(d)}})},c.prototype.putObject=function(d){var u=this;this.obsClient.putObject({Bucket:u.obsClientConfig.bucket,Key:d.key,Metadata:{property:"property-value"},SourceFile:d,ProgressCallback:function(m,h,p){var g=Math.floor(100*m/h);g=g>99?99:g,d.percent=g,u.onProgress&&u.onProgress(d,g),d.onProgress&&d.onProgress(g)}}).then(function(m){if(console.log(m),m.CommonMsg.Status<300){d.obsHost=u.obsHost,d.ext.toLowerCase().includes("wma")&&(d.originKey=d.key,d.key=d.key.substring(0,d.key.lastIndexOf("."))+".mp3",u.hwAudioTranscoding(d)),d.ext.toLowerCase().includes("mp3")&&u.hwMp3Transcoding(d),d.ext.substring(1).toLowerCase();var h=u.getFileType(d.key);h=="video"?(u.m3u8&&(d.m3u8Key="resources/web/"+Date.now()+Math.round(1e4*Math.random())+".m3u8"),u.hwVideoTranscoding(d)):h=="audio"?u.getHuaweiMetadata(d.originKey||d.key,function(p){d.duration=p.duration,u.success(d)}):u.success(d)}}).catch(function(m){u.error(d,{code:50081,msg:"上传失败",err:m})})},c.prototype.download=function(d,u){var m=d.substring(d.lastIndexOf("/")+1);if(d.indexOf("?")>-1){var h=d.substring(0,d.lastIndexOf("?"));m=h.substring(h.lastIndexOf("/")+1)}u=u||m,this.mode=="qiniu"?this.qiniuDownload(d,u):this.huaweiDownload(d,u)},c.prototype.getDownloadUrl=function(d,u,m){var h=d.substring(d.lastIndexOf("/")+1);if(d.indexOf("?")>-1){var p=d.substring(0,d.lastIndexOf("?"));h=p.substring(p.lastIndexOf("/")+1)}u=u||h,this.mode=="qiniu"?m(s(d,"attname",u)):this.getHuaweiDownloadUrl(d,u,m)},c.prototype.getHuaweiDownloadUrl=function(d,u,m){var h=this,p=d.replace(/^(http|https):\/\/[^/]+\//,"");this.getDownloadObsClient(p,function(){h.getFileType(p)=="video"&&(p=p.substring(0,p.lastIndexOf("."))+".mp4",u=u.substring(0,u.lastIndexOf("."))+".mp4");var g=h.obsClient.createSignedUrlSync({Method:"GET",Bucket:h.obsClientConfig.bucket,Key:p,QueryParams:{"response-content-disposition":"attachment;fileName="+encodeURIComponent(u)},Expires:3600});m(g.SignedUrl)})},c.prototype.qiniuDownload=function(d,u){var m=s(d,"attname",u);window.open(m)},c.prototype.huaweiDownload=function(d,u){this.getHuaweiDownloadUrl(d,u,function(m){var h=document.createElement("a");h.style.display="none",h.href=m,document.body.appendChild(h),h.click()})},c.prototype.cancelUpload=function(d){switch(this.mode){case"qiniu":d.subscription.unsubscribe()}},c.prototype.error=function(d,u){this.onError&&this.onError(d,u),d&&d.onError&&d.onError(u)},c.prototype.success=function(d){d.isSuccessCalled||(d.percent=100,this.onProgress&&this.onProgress(d,100),d.onProgress&&d.onProgress(100),this.onSuccess&&this.onSuccess(d),d.onSuccess&&d.onSuccess(d),d.isSuccessCalled=!0)},c.prototype.getToken=function(d,u){var m=this;d.name&&d.name!=""||(d.name=String(new Date().getTime()+d.ext));var h=this.uptokenHost+"/files/getUptoken?fileName="+encodeURIComponent(d.name),p=new XMLHttpRequest;p.open("get",h),p.setRequestHeader("AUTHORIZATION",this.authorization),p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){var g=JSON.parse(p.responseText).uptoken;u&&u(g)}else m.error(d,{code:50070,msg:"上传失败"})},p.send(),console.log(p)},c.prototype.getObsClient=function(d,u){var m=this,h=this.uptokenHost+"/obs/uploadToken",p=new XMLHttpRequest;this.obsSign&&(h=this.uptokenHost+"/obs/uploadToken/sign"),p.open("get",h+"?path="+d,!0),this.obsSign?p.setRequestHeader("obsSign",this.obsSign):p.setRequestHeader("authorization",this.authorization),p.onreadystatechange=function(){m.getObsConfigCb(p,u)},p.send()},c.prototype.getDownloadObsClient=function(d,u){var m=this,h=this.uptokenHost+"/obs/downloadToken",p=new XMLHttpRequest;p.open("get",h+"?path="+d,!0),p.onreadystatechange=function(){m.getObsConfigCb(p,u)},p.send()},c.prototype.getObsConfigCb=function(d,u){if(d.readyState===4)if(d.status===200){var m=JSON.parse(d.responseText);m.code==1?(this.obsClientConfig=m.result,this.obsClient=new i({access_key_id:m.result.ak,secret_access_key:m.result.sk,security_token:m.result.securitytoken,server:m.result.endpoint,timeout:1800}),this.obsHost=this.obsClientConfig.domain,u&&u()):this.error("",{code:50080,msg:"上传失败"})}else this.error("",{code:50080,msg:"上传失败"})},c.prototype.getObjectData=function(d,u,m){var h=this;this.getDownloadObsClient(d,function(){h.obsClient.getObject({Bucket:h.obsClientConfig.bucket,Key:d},function(p,g){p?(console.error("Error-->"+p),m&&m(p)):g.CommonMsg.Status==200&&g.InterfaceResult&&u&&u(g.InterfaceResult)})})},c.prototype.dataURLtoBlob=function(d){for(var u=d.split(","),m=u[0].match(/:(.*?);/)[1],h=atob(u[1]),p=h.length,g=new Uint8Array(p);p--;)g[p]=h.charCodeAt(p);return new Blob([g],{type:m})},c.prototype.hwVideoTranscoding=function(d){var u=this,m=d.key.substring(d.key.indexOf("resources/")),h=m.substring(m.lastIndexOf("/")+1);h=h.substring(0,h.lastIndexOf("."));var p=this.uptokenHost+"/obs/transcoding/video/multi?path="+m,g=[{outputFileName:h,outputFormat:"mp4"}];if(this.m3u8){var f=d.m3u8Key.substring(d.m3u8Key.lastIndexOf("/")+1);f=f.substring(0,f.lastIndexOf(".")),g.push({outputFileName:f,outputFormat:"m3u8"})}var y=new XMLHttpRequest;y.onreadystatechange=function(){if(y.readyState===4){var x=JSON.parse(y.responseText);x.code==1?u.getVideoMetadata(d,function(){u.success(d)},function(){var w=setInterval(function(){console.log(Date.now()),u.getMediaLength(d.key,function(A){d.duration=A,u.success(d),clearInterval(w)})},3e3)}):x.code==2?(d.m3u8Key="",u.success(d)):x.code==0?u.error(d,{code:50082,msg:"文件编码格式无法解析,请尝试转码成mp4后再上传。"}):u.error(d,{code:50081,msg:"上传失败"})}},y.open("POST",p,!0),y.setRequestHeader("Content-Type","application/json"),y.send(JSON.stringify(g))},c.prototype.hwAudioTranscoding=function(d){if(d.ext.toLowerCase().includes("wma")){var u=d.key.substring(0,d.key.lastIndexOf("."))+d.ext,m=u.substring(u.lastIndexOf("/")+1);m=m.substring(0,m.lastIndexOf("."));var h=this.uptokenHost+"/obs/transcoding/audio?path="+u+"&outputFileName="+m,p=new XMLHttpRequest;p.onreadystatechange=function(){if(p.readyState===4){var g=JSON.parse(p.responseText);console.log(g)}},p.open("POST",h,!0),p.setRequestHeader("Content-Type","application/json"),p.send()}},c.prototype.hwMp3Transcoding=function(d){var u=this.uptokenHost+"/obs/transcoding/mp3?path="+d.key,m=new XMLHttpRequest;m.onreadystatechange=function(){if(m.readyState===4){var h=JSON.parse(m.responseText);console.log(h)}},m.open("POST",u,!0),m.setRequestHeader("authorization",this.authorization),m.setRequestHeader("Content-Type","application/json"),m.send()},c.prototype.getFileType=function(d){var u=d.substring(d.lastIndexOf(".")+1).toLowerCase();for(var m in a)if(a[m].includes(u))return m;return""},c.prototype.getVideoMetadata=function(d,u,m){var h=document.createElement("video");h.src=URL.createObjectURL(d),h.addEventListener("loadedmetadata",function(){console.log(h),h.duration!=1/0?(d.duration=h.duration,u&&u()):m&&m()}),h.addEventListener("error",function(p){console.log(p),m&&m()})},c.prototype.getHuaweiMetadata=function(d,u){var m=this.uptokenHost+"/obs/video/info?path="+d,h=new XMLHttpRequest;h.open("GET",m,!0),h.onreadystatechange=function(){if(h.readyState===4){var p=JSON.parse(h.responseText);p.code==1&&u&&u(p.result)}},h.send()},c.prototype.getMediaLength=function(d,u){var m=this.uptokenHost+"/obs/video/length?path="+d,h=new XMLHttpRequest;h.onreadystatechange=function(){if(h.readyState===4){var p=JSON.parse(h.responseText);p.code==1&&u&&u(p.result)}},h.open("GET",m,!0),h.send()},n.exports=c}])})})(Fp)),Fp.exports}var zsn=jsn();const Gk=uf(zsn),Usn=$e.defineComponent({name:"FileList",components:{Preview:Rsn,TinyBaseSelect:ps,TinyOption:Ki},props:{list:{type:Array,default:()=>[]},mode:{type:String,default:"edit"},type:{type:String,default:"block"},isPreview:{type:Boolean,default:!0},isShowLimitTimes:{type:Boolean,default:!0},canPreview:{type:Boolean,default:!0},editorble:{type:Boolean,default:!1},showDownLoad:{type:Boolean,default:!0},isQuestionBank:{type:Boolean,default:!1},hideFullScreen:{type:Boolean,default:!1},customFullSreen:{type:Boolean,default:!0},audioMode:{type:String,default:"bar"},isMobile:{type:Boolean,default:!1},audioTime:{type:Number,default:0},actionIndex:{type:Number,default:0}},setup(t,{emit:e}){const n=mc();return{...$e.reactive({obs:{},currentFile:{},playerTimes:[-1,1,2,3,4,5]}),t:n,fileIcon:vsn,getFileSvg:msn,formatSize:gsn,cancelUpload:(d,u)=>{d.cancel&&d.cancel(),e("deleteFile",d,u)},deleteFile:(d,u)=>{vn.confirm(n("confirmDelete")).then(m=>{console.log(m,"res"),m==="confirm"&&(d.actionIndex=t.actionIndex,e("deleteFile",d,u))})},download:d=>{new Gk(t.uploadOptions).download(d)},showPreview:d=>{},isFileCanPreview:d=>{const u=oa(d.fileUrl);return["audio","video","image","document"].includes(u)},isAudio:d=>oa(d.fileUrl)==="audio"}}});var Vsn=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"files-component"},[e.list&&e.list.length>0&&e.type==="block"?n("ul",{staticClass:"file-list-block"},e._l(e.list,function(o,r){return n("li",{key:r+o.fileUrl+o.fileKey},[!e.isPreview||o.status===1||o.status===3?[n("div",{staticClass:"icon-wrapper"},[n("img",{staticClass:"svg-img",attrs:{src:e.getFileSvg(o.fileUrl),alt:""}})]),n("div",{staticClass:"detail"},[n("div",{staticClass:"name"},[e._v(e._s(o.fileName))]),n("div",{staticClass:"info"},[n("span",{staticClass:"size"},[e._v(e._s(e.formatSize(o.fileSize)))]),e.mode==="edit"&&o.progress>=0&&o.progress<100&&o.status!==3?n("div",{staticClass:"progress-wrapper"},[n("div",{staticClass:"progress-bar"},[n("div",{staticClass:"bar",style:{width:o.progress+"%"}})]),n("span",{staticClass:"progress-value"},[e._v(e._s(o.progress)+"%")]),n("span",{staticClass:"cancel",on:{click:function(i){return e.cancelUpload(o,r)}}},[e._v(e._s(e.t("cancel")))])]):n("div",{staticClass:"operations"},[e.canPreview&&e.isFileCanPreview(o)&&o.status!==3?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.showPreview(o)}}},[e._v(" "+e._s(e.t("view"))+" ")]):e._e(),o.status===3?n("span",{staticClass:"upload-fail"},[e._v(e._s(o.errMessage))]):e._e(),e.mode==="edit"?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return i.stopPropagation(),e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")]):n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.download(o.fileUrl)}}},[e._v(" "+e._s(e.t("download"))+" ")])])])])]:e.isPreview&&o.status!==3?n("div",{staticClass:"preview-container"},[n("div",{staticClass:"preview-content",class:{"audio-preview":e.isAudio(o)}},[n("Preview",{attrs:{resource:o,times:e.isShowLimitTimes?o.lisCount:0,"is-question-bank":e.isQuestionBank,showDownLoad:e.showDownLoad,customFullSreen:e.customFullSreen,audioMode:e.audioMode,isMobile:e.isMobile,audioTime:e.audioTime}}),e.mode==="edit"?n("div",{staticClass:"operations"},[n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return i.stopPropagation(),e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")])]):e._e()],1)]):e._e()],2)}),0):e._e(),e.list&&e.list.length>0&&e.type==="inline"?n("div",[n("ul",{staticClass:"file-list-inline"},e._l(e.list,function(o,r){return n("li",{key:r},[n("img",{staticClass:"svg-img",attrs:{src:e.getFileSvg(o.fileUrl),alt:""}}),n("span",{staticClass:"name"},[e._v(e._s(o.fileName))]),n("span",{staticClass:"size"},[e._v(e._s(e.formatSize(o.fileSize)))]),e.mode==="edit"&&o.progress>=0&&o.progress<100?n("div",{staticClass:"progress-wrapper"},[n("div",{staticClass:"progress-bar"},[n("div",{staticClass:"bar",style:{width:o.progress+"%"}})]),n("span",{staticClass:"progress-value"},[e._v(e._s(o.progress)+"%")]),n("span",{staticClass:"cancel",on:{click:function(i){return e.cancelUpload(o,r)}}},[e._v(e._s(e.t("cancel")))])]):e._e(),e.canPreview&&e.isFileCanPreview(o)&&o.status!==3?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.showPreview(o)}}},[e._v(" "+e._s(e.t("view"))+" ")]):e._e(),o.status===3?n("span",{staticClass:"upload-fail"},[e._v(e._s(o.errMessage))]):e._e(),e.mode==="edit"?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")]):n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.download(o.fileUrl)}}},[e._v(" "+e._s(e.t("download"))+" ")])])}),0)]):e._e()])},Hsn=[],Qsn=Bn(Usn,Vsn,Hsn,!1,null,"f950fdeb");const fc=Qsn.exports,Ksn={obsHost:Hk,uptokenHost:Vle,authorization:no.get("token")||no.get("authorization")};class Gsn{constructor({id:e=0,fileName:n="",fileSize:o="",fileType:r="",fileUrl:i="",srt:a="",avatar:l="",lisCount:s=-1,progress:c=0,status:d=0,markedImage:u="",angle:m=0,location:h,title:p,contentSize:g,type:f}){this.id=e||Uu(),this.fileName=n||p,this.fileSize=o||g,this.fileType=r||f,this.fileUrl=i||h,this.srt=a,this.avatar=l||"",this.lisCount=s,this.progress=c,this.status=d,this.markedImage=u,this.angle=m}handleOldAttach(e){let n={contentSize:e.contentSize||e.fileSize,title:e.title||e.fileName,location:e.location||e.fileUrl,duration:e.duration||0},o="";return n.location&&n.location.length>0&&(o=n.location.substring(n.location.lastIndexOf(".")+1).toLowerCase()),n.mimeType=e.mimeType||o,n.type=e.type||oa(n.location),{...e,...n}}}const Wsn=$e.defineComponent({name:"RichTextarea",components:{TinyFluentEditor:ys,FileList:fc},model:{prop:"value",event:"change"},props:{value:String,list:{type:Array,default(){return[]}},maxNum:{type:Number,default:1},isShowLimitTimes:{type:Boolean,default:!0},actionIndex:{type:Number,default:0},placeholderText:{type:String,default:""},isQuestionBank:{type:Boolean,default:!1},type:{type:Number,default:0}},emits:["change","addFile","deleteFile"],setup(t,{emit:e}){const n=$e.ref(null),o=$e.ref(t.value||""),r=$e.ref(null),i=$e.ref(Uu());$e.onMounted(()=>{const m=r.value.state.quill.getModule("toolbar");n.value=new Gk({...Ksn});const h=document.getElementById("upload");n.value.initUpBtn(h),n.value.onBeforeUpload=p=>{let g=new Gsn({fileName:p.name,fileSize:p.size,fileUrl:p.name,status:1,lisCount:-1}),f=oa(g.fileUrl);p.onProgress=y=>{g.progress=_m(y,2,"floor")},p.onSuccess=()=>{g.fileUrl=p.obsHost+"/"+p.key,g.status=2,f=="image"&&a(`<img src="${g.fileUrl}" devui-editorx-image="true" data-image-id=${g.key} />`)},p.onError=y=>{g.errMessage=ysn(y.code),g.status=3},g.cancel=()=>{n.value.cancelUpload(p)},g.key=Uu(),f!="image"&&e("addFile",g,t.actionIndex)},m.addHandler("image1",function(p){n.value.$el.accept=Bp(["image"]),h.click()}),m.addHandler("video1",function(p){n.value.$el.accept=Bp(["video"]),h.click()}),m.addHandler("audio",function(p){n.value.$el.accept=Bp(["audio"]),h.click()})}),$e.onUnmounted(()=>{var u;(u=n.value)!=null&&u.$el&&n.value.$el.parentNode&&n.value.$el.parentNode.removeChild(n.value.$el)});const a=u=>{if(!r.value)return;const m=r.value.state.quill,h=m.getSelection(),p=h?h.index:0;m.clipboard.dangerouslyPasteHTML(p,u);const g=new DOMParser().parseFromString(u,"text/html").body.textContent.length;m.setSelection(p+g)};$e.watch(o,(u,m)=>{if(t.type==3){const h=/\s*\(\s*\)\s*/g;u=u.replace(h,"(&nbsp;)")}e("change",u)});const l=$e.ref({placeholder:t.placeholderText,modules:{toolbar:[[{font:["yahei","songti","kaiti","heiti","lishu","mono","arial","arialblack","comic","impact","times"]},{size:["12px","13px","14px","15px","16px","17px","18px","19px","20px","22px","24px","26px","29px","32px","36px","40px","48px","72px"]},{lineheight:["1","1.2","1.5","2","2.5","3","4","5"]}],["bold","italic","underline","strike",{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{align:[]}],[{script:"sub"},{script:"super"}],["image1","audio","video1","better-table"]]}});return{content:o,initSrtUploder:(u,m)=>{const h=document.getElementById(u);h&&(console.log("字幕上传按钮已找到",h),h.onclick=()=>{console.warn("字幕上传功能暂时不可用")})},deleteFile:(u,m)=>{e("deleteFile",m,t.actionIndex)},options:l,fluentEditorRef:r,insertContent:a,beforeEditorInit:u=>{const m='<svg t="1734490908682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5918" width="200" height="200"><path d="M1084.416 32c52.288 0 95.296 40.064 99.84 91.136l0.448 9.152v764.288c0 52.288-40.064 95.232-91.136 99.84l-9.152 0.448H132.288a100.288 100.288 0 0 1-99.84-91.2L32 896.64V132.288c0-52.288 40.064-95.296 91.136-99.84L132.288 32h952.128z m-221.568 474.24l-223.808 167.872 87.936 62.336a41.216 41.216 0 0 1 12.992 51.584l-3.392 5.76a41.216 41.216 0 0 1-51.584 12.928l-5.76-3.392-275.2-196.096-290.112 201.856v87.488c0 8.768 5.952 16 14.08 17.92l4.288 0.448h952.128c8.832 0 16-5.952 17.92-14.08l0.448-4.288 3.136-176.448-2.688-1.472a35.2 35.2 0 0 1-4.672-2.944L862.848 506.24z m221.568-392.32H132.288a18.176 18.176 0 0 0-17.92 14.08l-0.448 4.288v579.712l266.368-188.608a40.32 40.32 0 0 1 41.792-3.392l5.376 3.392 141.888 100.928 271.104-203.392a41.28 41.28 0 0 1 46.784-1.792l4.992 3.84 210.56 187.008V132.288a18.176 18.176 0 0 0-14.08-17.92l-4.288-0.448z m-703.296 51.2a144 144 0 1 1-0.128 288.128 144 144 0 0 1 0.128-288.128z m0 69.12c-41.472 0-74.88 33.408-74.88 74.88 0 41.472 33.408 74.88 74.88 74.88 41.472 0 74.88-33.408 74.88-74.88 0-41.472-33.408-74.88-74.88-74.88z" fill-rule="nonzero"></path></svg>',h='<svg t="1734490908682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5918" width="200" height="200"><path d="M992 705.6c-4.992 26.88-14.528 50.88-28.8 72.064-12.032 18.368-30.08 35.008-54.272 49.856-24.128 14.784-56.768 22.208-97.92 22.208-27.008 0-52.48-1.728-76.672-5.248a233.728 233.728 0 0 1-63.872-18.048 128.96 128.96 0 0 1-45.248-33.408 90.688 90.688 0 0 1-20.8-50.304 137.6 137.6 0 0 1 8.512-62.08c7.808-21.504 19.52-41.152 35.2-58.816a188.8 188.8 0 0 1 56.96-43.456 159.36 159.36 0 0 1 72.96-16.96c44.672 0 83.712 7.808 117.12 23.36V141.696L411.648 211.648l4.288 590.4v26.496c0 21.184-4.288 41.856-12.8 62.016a170.56 170.56 0 0 1-35.648 53.504 169.088 169.088 0 0 1-55.36 37.12 182.144 182.144 0 0 1-71.872 13.76c-28.416 0-54.656-2.624-78.784-7.936a234.688 234.688 0 0 1-63.872-23.296 139.072 139.072 0 0 1-44.8-38.144 104.64 104.64 0 0 1-20.16-52.48c-2.176-19.84 0.64-39.04 8.512-57.792 7.808-18.752 19.712-35.52 35.648-50.368 16-14.848 35.2-27.392 57.472-37.632 22.4-10.24 46.72-16.768 72.96-19.584a216.96 216.96 0 0 1 58.56-0.512c19.2 2.432 37.248 6.528 54.272 12.16V127.872L992 31.424v674.176z"></path></svg>',p='<svg t="1734491308472" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3380" width="200" height="200"><path d="M752.384 479.168a40.96 40.96 0 0 1 0 70.464l-205.696 122.88a41.28 41.28 0 0 1-62.08-35.2v-245.76a41.28 41.28 0 0 1 62.08-35.2l205.696 122.88z m-185.536-15.104v100.736l84.736-50.368-84.736-50.368z m534.848 450.88V113.92H114.304v801.024h987.392z m0 81.92H114.304c-45.44 0-82.304-36.672-82.304-81.92V113.92C32 68.672 68.864 32 114.304 32h987.392c45.44 0 82.304 36.672 82.304 81.92v801.024c0 45.248-36.864 81.92-82.304 81.92zM196.544 72.96c0-22.592 18.432-40.96 41.152-40.96 22.72 0 41.152 18.368 41.152 40.96v841.984c0 22.592-18.432 40.96-41.152 40.96a41.024 41.024 0 0 1-41.152-40.96V72.96z m41.152 277.632c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96H73.152a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544z m0 245.76c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96H73.152a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544zM937.152 72.96c0-22.592 18.432-40.96 41.152-40.96 22.72 0 41.152 18.368 41.152 40.96v841.984c0 22.592-18.432 40.96-41.152 40.96a41.024 41.024 0 0 1-41.152-40.96V72.96z m41.152 359.552a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96h-164.544z m0 245.76a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96h-164.544z"></path></svg>',g=u.import("ui/icons");g.image1=m,g.audio=h,g.video1=p;const f=u.import("parchment"),y=new f.StyleAttributor("image1","color",{scope:f.Scope.INLINE}),x=new f.StyleAttributor("video1","color",{scope:f.Scope.INLINE}),w=new f.StyleAttributor("audio","color",{scope:f.Scope.INLINE});u.register("formats/image1",y),u.register("formats/video1",x),u.register("formats/audio",w)},containerId:i}}});var Ysn=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"ritchtextarea-container",attrs:{id:e.containerId}},[n("TinyFluentEditor",{ref:"fluentEditorRef",attrs:{"data-type":!1,"data-upgrade":!1,options:e.options,"before-editor-init":e.beforeEditorInit},model:{value:e.content,callback:function(o){e.content=o},expression:"content"}}),n("FileList",{ref:"fileList",attrs:{mode:"edit",type:"block",isPreview:!0,list:e.list,isShowLimitTimes:e.isShowLimitTimes,"is-question-bank":e.isQuestionBank},on:{deleteFile:e.deleteFile}}),n("button",{staticStyle:{display:"none"},attrs:{id:"upload"}})],1)},Xsn=[],Zsn=Bn(Wsn,Ysn,Xsn,!1,null,null);const Wk=Zsn.exports,Jsn=$e.defineComponent({name:"Base",components:{RichTextarea:Wk,FileList:fc,TinyButton:vt},props:{question:{type:Object,required:!0,default:()=>{}},mode:{type:Number,default:0},isQuestionBank:{type:Boolean,default:!1},isSubmitted:{type:Boolean,default:!1}},emits:["blankAnswerChange"],setup(t,{emit:e}){const n=mc(),o=$e.ref(null),r=$e.ref([]),i=$e.computed(()=>{if(t.question.type!==3||!t.question.title)return[{type:"text",content:t.question.title||""}];const h=/\(&nbsp;\)/g,p=[];let g=0,f,y=t.question.title.replace(/^<p>|<\/p>$/g,"");for(;(f=h.exec(y))!==null;)f.index>g&&p.push({type:"text",content:y.slice(g,f.index)}),p.push({type:"blank",content:f[0]}),g=h.lastIndex;return g<y.length&&p.push({type:"text",content:y.slice(g)}),p}),a=$e.computed(()=>i.value.filter(h=>h.type==="blank").length);t.question.record||(t.question.record={}),$e.watch(i,()=>{const h=i.value.filter(p=>p.type==="blank").length;if(h>r.value.length)for(let p=r.value.length;p<h;p++)r.value.push("");else h<r.value.length&&(r.value=r.value.slice(0,h));t.mode==3&&(r.value=t.question.record.answer)},{immediate:!0,deep:!0}),$e.watch(()=>t.mode,h=>{var p,g;try{if(t.question.type==3)if(h==3&&((p=t.question.record)==null?void 0:p.answer.length)>0){const f=(g=t.question.record)==null?void 0:g.answer;Array.isArray(f)?r.value=[...f]:r.value=f.split(";")}else h==2&&(r.value=[])}catch(f){console.error("Failed to parse record answer:",f)}});const l=h=>i.value.slice(0,h).filter(p=>p.type==="blank").length,s=h=>{$e.nextTick(()=>{Gle(h.target,h.target.value)})},c=h=>{t.question.link.push(h)},d=h=>{t.question.link.splice(h,1)},u=()=>{o.value&&o.value.insertContent("(&nbsp;)")};return $e.watch(r,(h,p)=>{e("blankAnswerChange",h),t.question.record&&(t.question.record.answer=h)},{deep:!0}),{t:n,insert:u,richTextareaRef:o,titleParts:i,blankCount:a,userAnswers:r,editWidth:s,checkAnswerCorrect:h=>{var y,x;const p=i.value.slice(0,h).filter(w=>w.type==="blank").length,g=(y=r.value[p])==null?void 0:y.trim();if(!g)return!1;let f=t.question.correctAnswer||[];if(t.question.allowExchange){const w=new Set;return f.forEach(A=>{A!=null&&A.trim().includes("//")?A.split("//").map($=>$.trim()).forEach($=>w.add($)):A!=null&&A.trim()&&w.add(A.trim())}),w.has(g)}else{const w=(x=f[p])==null?void 0:x.trim();return w&&w.includes("//")?w.split("//").map(E=>E.trim()).includes(g):w===g}},blankIndex:l,addTitleFile:c,deleteTitleFile:d}}});var eln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"base-container"},[e.mode==2||e.mode==3?[e.question.type==3?n("div",{staticClass:"completion-preview"},[e.mode==2?n("div",{staticClass:"preview-title"},[e._l(e.titleParts,function(o,r){return[o.type==="text"?n("span",{domProps:{innerHTML:e._s(o.content)}}):n("div",[n("span",{staticClass:"blank-index"},[e._v("["+e._s(e.blankIndex(r)+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.userAnswers[e.blankIndex(r)],expression:"userAnswers[blankIndex(index)]"}],staticClass:"completion-input",class:{"answer-correct":e.mode===3&&e.isSubmitted&&e.checkAnswerCorrect(r),"answer-error":e.mode===3&&e.isSubmitted&&!e.checkAnswerCorrect(r)},staticStyle:{margin:"0 2px"},attrs:{type:"text",disabled:!0},domProps:{value:e.userAnswers[e.blankIndex(r)]},on:{input:[function(i){i.target.composing||e.$set(e.userAnswers,e.blankIndex(r),i.target.value)},e.editWidth]}})])]})],2):e._e(),e.mode==3?n("div",{staticClass:"preview-title"},[e._l(e.titleParts,function(o,r){return[o.type==="text"?n("span",{domProps:{innerHTML:e._s(o.content)}}):n("div",[n("span",{staticClass:"blank-index"},[e._v("["+e._s(e.blankIndex(r)+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.userAnswers[e.blankIndex(r)],expression:"userAnswers[blankIndex(index)]"}],staticClass:"completion-input",class:{"answer-correct":e.mode===3&&e.isSubmitted&&e.checkAnswerCorrect(r),"answer-error":e.mode===3&&e.isSubmitted&&!e.checkAnswerCorrect(r)},staticStyle:{margin:"0 2px"},attrs:{type:"text",disabled:e.mode==3&&e.isSubmitted},domProps:{value:e.userAnswers[e.blankIndex(r)]},on:{input:[function(i){i.target.composing||e.$set(e.userAnswers,e.blankIndex(r),i.target.value)},e.editWidth]}})])]})],2):e._e(),e.question.allowExchange?n("div",{staticClass:"can-exchange"},[e._v("*"+e._s(e.t("answerCanChangeTip")))]):e._e()]):n("div",{staticClass:"preview-title",domProps:{innerHTML:e._s(e.question.title||"")}}),n("FileList",{attrs:{mode:"view",type:"block",isPreview:!0,list:e.question.link},on:{deleteFile:function(o){}}})]:n("RichTextarea",{ref:"richTextareaRef",attrs:{placeholderText:e.t("inputQuestionTitle"),list:e.question.link,maxNum:5,"is-question-bank":e.isQuestionBank,type:e.question.type},on:{addFile:e.addTitleFile,deleteFile:e.deleteTitleFile},model:{value:e.question.title,callback:function(o){e.$set(e.question,"title",o)},expression:"question.title"}}),e.question.type==3&&e.mode==1?n("TinyButton",{staticClass:"insert-blank",on:{click:e.insert}},[e._v(" "+e._s(e.t("insertQue"))+" ")]):e._e(),e._t("default")],2)},tln=[],nln=Bn(Jsn,eln,tln,!1,null,"abd23e08");const jf=nln.exports;class so{constructor({id:e,questionId:n="",type:o=0,title:r="",score:i=1,correctAnswer:a=[],reply:l="",record:s={},lisCount:c=-1,link:d=[],analyLinkList:u=[],answerlink:m="",correctChoiceIds:h=[],tags:p=[],hardlevel:g=3,knowledgeDTOS:f=[]}){this.id=e||n,this.questionid=this.id,this.type=o,this.title=r,this.score=i,this.correctAnswer=a,this.reply=l,this.record=new oln(s),this.lisCount=c,this.link=d||[],this.analyLinkList=u||[],this.answerlink=m,this.correctChoiceIds=h,this.tags=p||[],this.hardlevel=g,this.knowledgeDTOS=f||[]}scoring(){console.error("子类自行实现接口")}getOption(e){return String.fromCharCode(65+e)}getAnswer(){const e=this.record.answer;return e&&e.length>0?e[0]:""}getCorrectAnswer(){}}class oln{constructor({id:e="",answer:n=[],attachments:o=[],grade:r,reply:i="",remark1:a=""}){this.id=e,this.answer=n,this.attachments=o,this.score=r,this.reply=i||a}}let Rp=class{constructor({id:e="",questionID:n="",choiceId:o=0,text:r="",attachments:i=[],record:a={}}){this.id=e||n,this.choiceId=o,this.text=r,this.attachments=i,this.record=a}};class rln extends so{constructor(e){super(e),this.choices=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new Rp({id:Math.random(),choiceId:o.choiceId||0,text:o.title,attachments:o.link?[{fileUrl:o.link}]:[]}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new Rp({id:Math.random(),text:""}))}scoring(){}createChoice(){this.choices.push(new Rp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}getAnswer(){return Array.isArray(this.record.answer)?this.record.answer.join(""):this.record.answer}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join(""):this.correctAnswer}handleAnswer(e,n){if(!e||this.getAnswer().length===0)return"";const o=this.getOption(n),r=this.correctAnswer&&this.correctAnswer.includes(o);return this.record.answer&&this.record.answer.includes(o)?r?"correct":"error":r&&this.type===2?"no-select error":""}}let qb=class{constructor({id:e="",correctAnswer:n=""}){this.id=e,this.correctAnswer=n}},iln=class extends so{constructor(e){super(e),this.allowExchange=e.allowExchange||e.blankOrder||e.blackOrder||0,this.blanks=[];let n=0;this.title.replace(/[((](\s|&nbsp;)+[))]|_{5,}/gi,()=>{this.createBlank(),this.blanks[n].correctAnswer=this.correctAnswer[n],this.blanks[n].blankIndex=n+1,n++}),this.oldNums=this.blanks.length}createBlank(){this.blanks.push(new qb({id:Math.random(),correctAnswer:""})),this.correctAnswer.length<this.blanks.length&&this.correctAnswer.push("")}deleteBlank(e,n=1){this.blanks.splice(e,n),this.correctAnswer.splice(e,n)}createBlankByIndex(e,n){let o=new qb({id:Math.random(),correctAnswer:""});o.blankIndex=n,this.blanks.splice(e,0,o),this.correctAnswer.splice(e,0,"")}};class aln extends so{constructor(e){super(e)}scoring(){}getAnswerResult(e){return e&&e.length>0&&e[0]?e[0].toLowerCase()==="true"||e[0]===!0:""}handleAnswer(e,n){const o=this.getAnswerResult(this.record.answer)===n;if(!e)return o?"select":"";const r=this.getAnswerResult(this.correctAnswer)===n;return o?r?"correct":"error":""}}class sln extends so{constructor(e){super(e),this.answerLinkList=e.answerLinkList||[],this.answerLinkList.length==0&&this.answerlink&&this.answerLinkList.push({fileUrl:this.answerlink})}scoring(){}getAnswer(){return(this.record.answer.join("")||"").trim()}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer[0]:this.correctAnswer}}class lln extends so{constructor(e){super(e),this.subQuestions=[];for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];o.type=1,o=zf(o),o.qIndex=n+1,this.subQuestions.push(o)}this.oldNums=this.subQuestions.length}scoring(){}createSubQuestion(){this.subQuestions.push(ec(1))}deleteSubQuestion(e,n){this.subQuestions.splice(e,n||1)}createSubQuestionByIndex(e,n){let o=ec(1);o.qIndex=n,o.isNew=1,this.subQuestions.splice(e,0,o)}getAnswerText(e){if(e.correctAnswer.length===0)return"";let n=e.correctAnswer[0].charCodeAt(0)-65;return e.choices[n].text}}let jp=class{constructor({id:e="",text:n="",option:o="",attachments:r=[]}){this.id=e,this.text=n,this.option=o,this.attachments=r}};class cln extends so{constructor(e){super(e),this.choices=[],this.subQuestions=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new jp({id:Math.random(),text:o.title}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new jp({id:Math.random(),text:""}));for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];o=zf(o),o.qIndex=n+1,this.subQuestions.push(o)}this.oldNums=this.subQuestions.length}scoring(){}createChoice(){this.choices.push(new jp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}createSubQuestion(){this.subQuestions.push(ec(1))}deleteSubQuestion(e,n){this.subQuestions.splice(e,n||1)}createSubQuestionByIndex(e,n){let o=ec(1);o.qIndex=n,o.isNew=1,this.subQuestions.splice(e,0,o)}getAnswerText(e){if(e.correctAnswer.length===0||!e.correctAnswer[0])return"";let n=e.correctAnswer[0].charCodeAt(0)-65;return this.choices[n].text}getAnswer(){return Array.isArray(this.record.answer)?this.record.answer.join(""):this.record.answer}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join(""):this.correctAnswer}handleAnswer(e,n){if(!e)return"";const o=this.getOption(n),r=this.correctAnswer&&this.correctAnswer.includes(o);return this.record.answer&&this.record.answer.includes(o)?r?"correct":"error":""}}class uln extends so{constructor(e){super(e),this.subQuestions=[];for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];this.subQuestions.push(zf(o))}}scoring(){}createSubQuestion(e){let n=ec(e);n.isEdit=!0,n.isNew=1,this.subQuestions.push(n)}deleteSubQuestion(e){this.subQuestions.splice(e,1)}}let zp=class{constructor({id:e="",text:n="",option:o=""}){this.id=e,this.text=n,this.option=o}};class dln extends so{constructor(e){super(e),this.choices=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new zp({id:Math.random(),text:o.title}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new zp({id:Math.random(),text:""}))}scoring(){this.record.score=0}createChoice(){this.choices.push(new zp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}getAnswer(){const e=Array.isArray(this.record.answer)?this.record.answer:[this.record.answer];return e.filter(o=>o&&o.length>0).length>0?e.join("-"):""}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join("-"):this.correctAnswer}handleAnswer(e,n){return e&&this.record.answer&&this.record.answer[n]?this.correctAnswer[n]===this.record.answer[n]?"correct":"error":""}}class pln extends so{constructor(e){super(e)}scoring(){}getAnswer(){return this.record.answer.join("")||""}}class hln extends so{constructor(e){super(e)}scoring(){}}class Fb{constructor({name:e="",precision:n,max:o,min:r}){this.name=e,this.precision=n||1,this.max=o,this.min=r}}class Up{constructor({formula:e="",answerRange:n=0,precision:o=1}){this.formula=e,this.answerRange=n,this.precision=o}}class mln extends so{constructor(e){super(e),this.variables=[],this.blanks=[],this.scope={},this.desc1=e.desc1;try{for(let o=0;e.formulaVar&&o<e.formulaVar.length;o++){let r=e.formulaVar[o];this.variables.push(new Fb(r)),r.value!==void 0&&(this.scope[r.name]=r.value)}}catch(o){console.log(o)}let n=0;this.title.replace(/[((](\s|&nbsp;)+[))]|_{5,}/gi,()=>{let o={};const r=this.correctAnswer[n];r&&(o=typeof r=="string"&&r.length>0?JSON.parse(r):r);let i=new Up(o);i.blankIndex=n+1,this.blanks.push(i),n++}),this.oldNums=this.blanks.length}createVariable(e){this.variables.push(new Fb({name:e}))}deleteVariable(e){for(let n=0;n<this.variables.length;n++)if(this.variables[n].name===e){this.variables.splice(n,1);return}}createBlank(){this.blanks.push(new Up({}))}deleteBlank(e,n){this.blanks.splice(e,n||1)}createBlankByIndex(e,n){let o=new Up({});o.blankIndex=n,this.blanks.splice(e,0,o)}initVariables(e){let n={};for(let o=0;o<this.variables.length;o++){let r=this.variables[o],i=r.min*1+Math.random()*(r.max-r.min);i=new Number(i);let a=0;r.precision!=1&&(a=(Math.round(.1/r.precision)+"").length),i=i.toFixed(a);let l=new RegExp("\\>"+r.name+"\\*\\<","g");e=e.replace(l,">"+i+"<"),n[r.name]=i}return this.scope=n,e}initDomVariables(e){for(let n in this.scope){let o=new RegExp("\\>"+n+"\\*\\<","g");e=e.replace(o,">"+this.scope[n]+"<")}return e}checkAnswer(e){let n=[];for(let i=0;i<this.blanks.length;i++)n.push({text:this.record.answer[i]||""});let o={scope:this.scope,answerResult:[]},r=0;for(let i=0;Object.values(this.scope).length>0&&i<n.length;i++)if(n[i].text&&n[i].text.trim().length>0){let a=this.blanks[i],l=a.formula,s=e.format(e.evaluate(l,this.scope),{precision:14})*1,c=n[i].text*1,d=0;a.precision!=1&&(d=(Math.round(.1/a.precision)+"").length),s=s.toFixed(d)*1,c=c.toFixed(d)*1,c>=s-a.answerRange*1&&c<=s+a.answerRange*1?(o.answerResult[i]=!0,r++):o.answerResult[i]=!1}else o.answerResult[i]=!1;this.record.extraAnswer=o,this.record.grade=this.score*(r/this.blanks.length),this.checkResult=o.answerResult}}function gc(t){let e=null;switch(t.type){case 1:case 2:e=new rln(t);break;case 3:e=new iln(t);break;case 4:e=new aln(t);break;case 5:e=new sln(t);break;case 12:e=new dln(t);break;case 11:case 23:e=new lln(t);break;case 17:e=new cln(t);break;case 16:e=new pln(t);break;case 19:e=new hln(t);break;case 24:e=new uln(t);break;case 25:e=new mln(t);break;default:e=new so(t)}return e}function ec(t){let e=gc({id:Math.random(),type:t});return e.key=Math.random(),e}function zf(t){if(t.id=t.id||t.questionid,t.allowExchange=t.allowExchange||t.blankOrder||t.blackOrder||0,t.correctAnswerAndReplay){let{correctAnswer:e,correctReplay:n,correctChoiceIds:o}=t.correctAnswerAndReplay;t.correctAnswer=e||t.correctAnswer,t.reply=n||t.reply,t.correctChoiceIds=o||[]}else t.correctAnswer=t.correctAnswer||t.correctanswer,t.reply=t.reply||t.correctreply;return t.correctAnswer=t.correctAnswer||t.correctanswer,t.reply=t.reply||t.correctreply,t.subQuestions=t.questionlist||t.subQuestions,t.subQuestions&&t.subQuestions.length>0&&(t.score=0,t.subQuestions.forEach((e,n)=>{e.score=e.score===0||e.score>0?Number(_m(e.score,2)):1,t.score+=e.score})),t.score=t.score===0||t.score>0?Number(_m(t.score,2)):1,t.type==25&&!t.formulaVar&&t.desc1&&(t.formulaVar=JSON.parse(t.desc1)),gc(t)}const Yk="data:image/png;base64,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",fln="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='18'%20height='18'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.57917%2015.9145C8.70747%2016.0428%208.8824%2016.1134%209.06382%2016.1102C9.43813%2016.1092%209.74175%2015.8068%209.74422%2015.4325V9.67071H15.5051C15.8805%209.66972%2016.1845%209.36568%2016.1855%208.99031C16.1887%208.8089%2016.118%208.63397%2015.9897%208.50567C15.8614%208.37737%2015.6865%208.30671%2015.5051%208.30991H9.74422V2.57151C9.74422%202.19574%209.43959%201.89111%209.06382%201.89111C8.68804%201.89111%208.38342%202.19574%208.38342%202.57151V8.30991H2.645C2.26923%208.30991%201.9646%208.61454%201.9646%208.99031C1.9646%209.36609%202.26923%209.67071%202.645%209.67071H8.38342V15.4298C8.38021%2015.6112%208.45087%2015.7862%208.57917%2015.9145ZM8.38342%209.67071H9.74422V8.30991H8.38342V9.67071Z'%20fill='%23529FFF'/%3e%3c/svg%3e",gln=$e.defineComponent({name:"Choice",components:{TinyButton:vt,TinyRadioGroup:Xi,TinyRadio:to,TinyCheckboxGroup:Gr,TinyCheckbox:En,FileList:fc,Base:jf,RichTextarea:Wk},props:{oriQuestion:{type:Object,required:!0,default:()=>({type:1,choices:[],correctAnswer:null,record:{answer:null}})},mode:{type:Number,default:1,validator:t=>[1,2,3].includes(t)},needRichText:{type:Boolean,default:!0},isSubmitted:{type:Boolean,default:!1},showAnswer:{type:Boolean,default:!1}},emits:["save","cancel","change"],setup(t,{emit:e}){const n=mc(),o=$e.ref(null),r=$e.ref({}),i=$e.ref(""),a=$e.ref([]),l=$e.ref(),s=()=>{var A,E,$,B;t.mode===3?(A=r.value.record)!=null&&A.answer?r.value.type===1?(i.value=r.value.record.answer,l.value=r.value.record.answer):(a.value=Array.isArray(r.value.record.answer)?r.value.record.answer:((E=r.value.record.answer)==null?void 0:E.split(","))||[],l.value=Array.isArray(r.value.record.answer)?r.value.record.answer:(($=r.value.record.answer)==null?void 0:$.split(","))||[]):(i.value="",a.value=[]):r.value.correctAnswer?r.value.type===1?i.value=r.value.correctAnswer[0]:a.value=Array.isArray(r.value.correctAnswer)?r.value.correctAnswer:((B=r.value.correctAnswer)==null?void 0:B.split(","))||[]:(i.value="",a.value=[])};$e.watch(()=>t.oriQuestion,A=>{r.value=gc(A),s(),console.log(r.value,"--------Choice--------",A)},{immediate:!0}),$e.watch([()=>t.mode,()=>t.isSubmitted],()=>{s()});const c=A=>String.fromCharCode(65+A),d=A=>A?Array.isArray(A)?A.join(","):A:"-",u=A=>{var W;if(t.mode!==3||!t.isSubmitted)return"";const E=c(A),$=((W=r.value.record)==null?void 0:W.answer)||"",B=r.value.correctAnswer||"",q=Array.isArray($)?$:($==null?void 0:$.split(","))||[],P=Array.isArray(B)?B:(B==null?void 0:B.split(","))||[],N=q.includes(E),D=P.includes(E);return D&&N?"correct":!D&&N?"wrong":D&&!N?"missed":""},m=()=>{t.mode===1&&(r.value.choices.length<20?h():console.warn(n("optionLimit")||"选项数量已达上限(20个)"))},h=()=>{r.value.choices||(r.value.choices=[]),r.value.choices.push({id:Date.now(),text:"",attachments:[]})},p=A=>{t.mode===1&&t.needRichText&&(o.value=A)},g=(A,E)=>{t.mode===1&&r.value.choices[E].attachments.splice(A,1)},f=(A,E)=>{console.log(A,E,r.value,"question.valuequestion.value"),t.mode===1&&r.value.choices[E].attachments.push(A)},y=(A,E)=>{if(t.mode===1)if(r.value.choices&&Array.isArray(r.value.choices)&&r.value.choices.length>2){if(r.value.choices.splice(E,1),r.value.correctAnswer){const B=(Array.isArray(r.value.correctAnswer)?r.value.correctAnswer:r.value.correctAnswer.split(",")).filter(q=>{const P=q.charCodeAt(0)-65;return P!==E&&P<r.value.choices.length});r.value.correctAnswer=r.value.type===1?B[0]||"":B}}else console.warn(n("atLeastTwo")||"至少需要两个选项")},x=()=>{if(t.mode!==1)return;if(!r.value.correctAnswer){console.warn(n("pleaseSetCorrectAnswer")||"请设置正确答案");return}const A=JSON.parse(JSON.stringify(r.value));e("save",A)},w=()=>{e("cancel")};return $e.watch(i,A=>{r.value.type===1&&(t.mode===1?r.value.correctAnswer=A:t.mode===3&&(r.value.record||(r.value.record={}),r.value.record.answer=A,e("change",r.value)))}),$e.watch(a,A=>{r.value.type===2&&(t.mode===1?r.value.correctAnswer=A:t.mode===3&&!t.isSubmitted&&(r.value.record||(r.value.record={}),r.value.record.answer=A,e("change",r.value)))}),{t:n,question:r,radioAnswer:i,checkboxAnswer:a,getOption:c,formatAnswer:d,handleAnswerClass:u,addChoice:m,saveQuestion:x,cancel:w,createChoice:h,activeIndex:o,activeRichText:p,deleteFile:g,addFile:f,deleteChoice:y,userAnswer:l}}});var vln=function(){var o;var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{staticClass:"choice-container",attrs:{question:e.question,mode:e.mode}},[e.mode===1?n("div",{staticClass:"edit-mode"},[n("div",{staticClass:"choice-list-base"},[e._l(e.question.choices,function(r,i){return n("div",{key:r.id},[n("div",{staticClass:"choice-item"},[n("span",{staticClass:"choice-option"},[e._v(e._s(e.getOption(i)))]),e.activeIndex===i?n("RichTextarea",{staticClass:"choice-input-wrap",attrs:{placeholder:e.t("optionContent"),list:r.attachments,isShowLimitTimes:!1,actionIndex:i,placeholderText:e.t("optionContent")},on:{addFile:e.addFile,deleteFile:e.deleteFile},model:{value:r.text,callback:function(a){e.$set(r,"text",a)},expression:"choice.text"}}):n("div",{staticClass:"choice-input-wrap"},[e.needRichText?n("div",{staticClass:"choice-input",on:{click:function(a){return e.activeRichText(i)}}},[r.text||r.attachments&&r.attachments.length>0?e._e():n("span",{staticClass:"no-content-tip"},[e._v(e._s(e.t("optionContent")))]),r.text?n("div",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}):e._e(),n("FileList",{ref:"fileList",refInFor:!0,attrs:{mode:"edit",type:"block",isPreview:!0,list:r.attachments||[],isShowLimitTimes:!1,actionIndex:i},on:{deleteFile:e.deleteFile}})],1):n("input",{directives:[{name:"model",rawName:"v-model",value:r.text,expression:"choice.text"}],staticClass:"choice-input",attrs:{type:"text",placeholder:e.t("optionContent")},domProps:{value:r.text},on:{input:function(a){a.target.composing||e.$set(r,"text",a.target.value)}}})]),i>1?n("img",{staticClass:"btn-delete",attrs:{src:Yk,alt:""},on:{click:function(a){return e.deleteChoice(r,i)}}}):e._e()],1)])}),n("div",{staticClass:"btn-add",on:{click:e.addChoice}},[n("img",{attrs:{src:fln,alt:""}}),e._v(e._s(e.t("addOption"))+" ")])],2),n("div",{staticClass:"choice-list"},[n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("answer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])]),e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i)))])])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i)))])])}),1):e._e()],1),n("div",{staticClass:"btn-save"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)]):e._e(),e.mode===2?n("div",{staticClass:"preview-mode"},[n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",attrs:{disabled:""},model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",attrs:{disabled:""},model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1}}):e._e()],1)])}),1):e._e()],1),n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("answer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])])]):e._e(),e.mode===3?n("div",{staticClass:"answer-mode"},[e.isSubmitted?n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",attrs:{disabled:!0},model:{value:e.userAnswer,callback:function(r){e.userAnswer=r},expression:"userAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",class:e.handleAnswerClass(i),attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",attrs:{disabled:!0},model:{value:e.userAnswer,callback:function(r){e.userAnswer=r},expression:"userAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",class:e.handleAnswerClass(i),attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e()],1):n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e()],1),e.isSubmitted&&e.showAnswer?n("div",[n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("stuAnswer"))+":")]),n("span",[e._v(e._s(e.formatAnswer((o=e.question.record)==null?void 0:o.answer)))])]),n("div",{staticClass:"correct-answer"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])])]):e._e()]):e._e()])},yln=[],bln=Bn(gln,vln,yln,!1,null,"ef3b5da6");const Bl=bln.exports;Bl.install=t=>t.component(Bl.name,Bl);const wln=$e.defineComponent({name:"Completion",components:{Base:jf,FileList:fc,TinyButton:vt,TinyCheckbox:En},props:{mode:{type:Number,default:1},oriQuestion:{type:Object,default:()=>({})},isSubmitted:{type:Boolean,default:!1},showAnswer:{type:Boolean,default:!1}},emits:["save","cancel","submit"],setup(t,{emit:e}){const n=$e.ref({}),o=$e.ref([]),r=u=>{var N,D,W,M;if(t.mode!==1)return;const m=/\(&nbsp;\)/g;let h;const p=[];let g=0,f="<p>";for(;(h=m.exec(u))!==null;)p.push(h.index-5*g-f.length),g++;let y=0;if((N=c.value)!=null&&N.richTextareaRef){const k=(W=(D=c.value.richTextareaRef.$refs.fluentEditorRef.state.quill)==null?void 0:D.getSelection)==null?void 0:W.call(D);y=(k==null?void 0:k.index)??((M=n.value.title)==null?void 0:M.length)??0}let x=0;for(let k=0;k<p.length&&y>p[k];k++)x=k;const w=[...n.value.blanks||[]].sort((k,U)=>(k.orderIndex||0)-(U.orderIndex||0)),A=w.map(k=>k.correctAnswer||""),E=[];let $=0;const B=p.length,q=w.length,P=Array(B).fill("");if(q>0){const k=B>q;if(k)for(let U=0;U<B;U++)if(k&&U===x)P[U]="";else if(U<x)U<A.length&&(P[U]=A[U]);else{const C=U-1;C<A.length&&(P[U]=A[C])}else for(let U=0;U<B;U++)P[U]=A[U]}for(let k=0;k<p.length;k++)E.push({id:Uu(),blankIndex:p[k],orderIndex:$,correctAnswer:P[k]}),$++;n.value.blanks=E,o.value=n.value.blanks.map(()=>""),i()};$e.watch(()=>n.value.title,r),$e.watch(()=>t.oriQuestion,u=>{n.value=gc(u)},{immediate:!0});const i=()=>{if(t.mode!==1)return;let u=[];if(n.value.blanks)for(let m=0;m<n.value.blanks.length;m++){let h=n.value.blanks[m];u.push(h.correctAnswer||"")}n.value.correctAnswer=u},a=()=>{if(t.mode!==1)return;if(i(),!n.value.title||!n.value.blanks||n.value.blanks.length===0){console.warn("请输入题目内容并添加空格");return}let u=!1;for(let m=0;m<n.value.blanks.length;m++)if(!n.value.blanks[m].correctAnswer||n.value.blanks[m].correctAnswer.trim()===""){u=!0;break}if(u){console.warn("请为所有空格填写答案");return}console.log("save-completion",n.value),e("save",n.value)},l=()=>{e("cancel")},s=u=>{t.mode===3&&(n.value.record.answer=u,e("change",n.value))},c=$e.ref(null);return{t:Wa,question:n,userAnswers:o,saveQuestion:a,cancel:l,answerChange:i,blankAnswerChange:s,deleteBlank:(u,m)=>{var x;if(t.mode!==1)return;const h=n.value.blanks.findIndex(w=>w.id===u.id);if(h===-1)return;n.value.blanks.splice(h,1);let p=n.value.title;const g=/\(&nbsp;\)/g;let f,y=[];for(;(f=g.exec(p))!==null;)y.push(f.index);if(m>=0&&m<y.length){const w=y[m];p=p.substring(0,w)+p.substring(w+8),n.value.title=p,(x=c.value)!=null&&x.richTextareaRef&&(c.value.richTextareaRef.content=p);const A=/\(&nbsp;\)/g;let E,$=[];for(;(E=A.exec(p))!==null;)$.push(E.index);n.value.blanks.forEach((B,q)=>{$[q]!==void 0&&(B.blankIndex=$[q])})}o.value=n.value.blanks.map(()=>""),i()},baseComponent:c}}});var xln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{ref:"baseComponent",staticClass:"completion-question",attrs:{question:e.question,mode:e.mode,isSubmitted:e.isSubmitted},on:{blankAnswerChange:e.blankAnswerChange}},[e.mode===1?[n("div",{staticClass:"edit-mode"},[n("div",{staticClass:"title"}),n("div",{staticClass:"correct-answer"},[n("span",{staticClass:"tip"},[e._v(e._s(e.t("answer"))+":")]),n("span",{staticClass:"correct-answer-tip"},[e._v("( "+e._s(e.t("inputAnswerTip2"))+" )")]),e._l(e.question.blanks,function(o,r){return n("div",{key:o.id||r},[n("div",{staticClass:"answer-item"},[n("span",{staticClass:"answer-option"},[e._v("["+e._s(r+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:o.correctAnswer,expression:"blank.correctAnswer"}],staticClass:"answer-input",attrs:{placeholder:e.t("inputAnswer"),type:"text"},domProps:{value:o.correctAnswer},on:{change:e.answerChange,input:function(i){i.target.composing||e.$set(o,"correctAnswer",i.target.value)}}}),n("div",{staticClass:"btn-delete"},[n("img",{attrs:{src:Yk,alt:""},on:{click:function(i){return e.deleteBlank(o,r)}}})])])])}),n("div",{staticClass:"can-exchange"},[n("TinyCheckbox",{attrs:{"false-label":0,"true-label":1},model:{value:e.question.allowExchange,callback:function(o){e.$set(e.question,"allowExchange",o)},expression:"question.allowExchange"}},[e._v("答案可互换顺序")])],1),n("div",{staticClass:"btn-save"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)],2)])]:(e.mode===2||e.mode===3)&&e.showAnswer?[n("div",{staticClass:"preview-mode"},[n("FileList",{attrs:{list:e.question.link}}),n("div",{staticClass:"correct-answer-preview"},[n("div",{class:{title:e.mode===3}},[e._v(e._s(e.t("correctAnswer"))+":")]),e._l(e.question.blanks,function(o,r){return n("span",{key:o.id||r,staticClass:"answer-item"},[n("span",{staticClass:"answer-option"},[e._v("["+e._s(r+1)+"]")]),n("span",{staticClass:"answer-value"},[e._v(e._s(`${o.correctAnswer}${r!==e.question.blanks.length-1?"、":""}`||"-"))])])})],2)],1)]:e._e()],2)},Tln=[],kln=Bn(wln,xln,Tln,!1,null,"aba71d4d");const ql=kln.exports;ql.install=t=>t.component(ql.name,ql);const ll="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='18'%20height='18'%20fill='%23475467'/%3e%3cpath%20d='M6.77719%2012.6257L2.59039%207.87367C2.34614%207.5802%201.96178%207.44255%201.58677%207.51423C1.21175%207.58592%200.905259%207.85563%200.786475%208.21849C0.66769%208.58135%200.755358%208.98009%201.01539%209.25967L5.96539%2014.8865C6.16186%2015.1092%206.4434%2015.2385%206.74039%2015.2422C7.03739%2015.246%207.32212%2015.124%207.52419%2014.9063L17.2712%204.40687C17.5406%204.13474%2017.6404%203.73748%2017.5316%203.37035C17.4227%203.00321%2017.1226%202.7245%2016.7484%202.64313C16.3742%202.56177%2015.9854%202.69067%2015.734%202.97947L6.77719%2012.6275V12.6257Z'%20fill='%23475467'/%3e%3c/svg%3e",cl="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='16'%20height='16'%20fill='%23475467'/%3e%3cpath%20d='M9.48719%208.00012L15.2562%202.23012C15.6662%201.82112%2015.6662%201.15012%2015.2562%200.741117C14.8462%200.331117%2014.1762%200.331117%2013.7662%200.741117L7.99719%206.51112L2.22719%200.740117C1.81819%200.330117%201.14719%200.330117%200.738187%200.740117C0.328187%201.15012%200.328187%201.82012%200.738187%202.23012L6.50819%208.00012L0.737188%2013.7701C0.327188%2014.1791%200.327188%2014.8501%200.737188%2015.2591C1.14719%2015.6691%201.81719%2015.6691%202.22719%2015.2591L7.99719%209.48912L13.7672%2015.2591C14.1762%2015.6691%2014.8472%2015.6691%2015.2562%2015.2591C15.6662%2014.8491%2015.6662%2014.1791%2015.2562%2013.7691L9.48619%208.00012H9.48719Z'%20fill='%23475467'/%3e%3c/svg%3e",Cln=$e.defineComponent({name:"JudgeQuestion",components:{Base:jf,TinyRadio:to,TinyRadioGroup:Xi,TinyButton:vt,FileList:fc},props:{mode:{type:Number,default:1},oriQuestion:{type:Object,default:()=>({})},showAnswer:{type:Boolean,default:!1},isSubmitted:{type:Boolean,default:!1}},emits:["save","cancel","change"],setup(t,{emit:e}){const n=mc(),o=$e.ref({}),r=$e.ref(""),i=$e.ref(""),a=$e.computed(()=>t.isSubmitted&&r.value===i.value);$e.watch(()=>t.oriQuestion,u=>{var m;o.value=gc(u),o.value.correctAnswer&&o.value.correctAnswer.length>0&&(i.value=o.value.correctAnswer[0]),t.mode===3&&((m=o.value.record)!=null&&m.answer?r.value=o.value.record.answer:r.value=""),console.log(o.value,"--------Judge--------")},{immediate:!0}),$e.watch(()=>t.mode,u=>{var m;u!==3?r.value="":(m=o.value.record)!=null&&m.answer?r.value=o.value.record.answer:r.value=""}),$e.watch(()=>t.isSubmitted,u=>{var m;u&&((m=o.value.record)!=null&&m.answer)&&(r.value=o.value.record.answer)});const l=()=>{if(t.mode===1){if(!o.value.title||!o.value.title.trim()){console.warn("请输入题目内容");return}if(!i.value){console.warn("请选择正确答案");return}o.value.correctAnswer||(o.value.correctAnswer=[]),o.value.correctAnswer[0]=i.value,e("save",o.value)}},s=()=>{e("cancel")};return $e.watch(r,u=>{t.mode===3&&u&&(o.value.record||(o.value.record={}),o.value.record.answer=u,e("change",o.value))}),{t:n,cancel:s,question:o,userAnswer:r,correctAnswer:i,isCorrect:a,saveQuestion:l,handleAnswerClass:u=>{if(!t.isSubmitted)return"";const m=(u?"true":"false")==r.value,h=(u?"true":"false")==i.value;return m?h?"correct":"wrong":""},handleCorrectAnswerClass:u=>t.isSubmitted&&(u?"true":"false")==i.value?"correct":""}}});var Sln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{staticClass:"true-or-false-question",attrs:{question:e.question,mode:e.mode}},[e.mode===1?[n("div",{staticClass:"correct-answer"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("TinyRadioGroup",{model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1),n("div",{staticClass:"action-buttons"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)]:e.mode===2?[n("div",{staticClass:"preview-mode"},[n("div",{staticClass:"correct-answer-preview"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1)])]:e.mode===3?[n("div",{staticClass:"answer-mode"},[n("div",{staticClass:"user-answer"},[e.isSubmitted?n("div",{staticClass:"submit-result"},[n("div",{staticClass:"user-answer-display"},[n("span",[e._v(e._s(e.t("yourAnswer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.userAnswer,callback:function(o){e.userAnswer=o},expression:"userAnswer"}},[n("TinyRadio",{class:e.handleAnswerClass(!0),attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{class:e.handleAnswerClass(!1),attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1),e.showAnswer?n("div",{staticClass:"correct-answer-hint"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{class:e.handleCorrectAnswerClass(!0),attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{class:e.handleCorrectAnswerClass(!1),attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1):e._e()]):n("div",[n("TinyRadioGroup",{model:{value:e.userAnswer,callback:function(o){e.userAnswer=o},expression:"userAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1)])])]:e._e()],2)},Aln=[],Eln=Bn(Cln,Sln,Aln,!1,null,"3aa4a60c");const Fl=Eln.exports;Fl.install=t=>t.component(Fl.name,Fl);const $ln=[yl,Nl,Ol,Bl,ql,Fl],Pln=t=>{$ln.forEach(e=>t.use(e))},_ln={install:Pln};exports.Choice=Bl;exports.Completion=ql;exports.Judge=Fl;exports.MyButton=yl;exports.MyTinyButton=Nl;exports.MyTinyRadio=Ol;exports.default=_ln;
454
+ `,Ye+="UNSIGNED-PAYLOAD",pe+="X-Amz-Signature="+Ft(Gf(me,ke,this.sk,this.region,Ye)),{ActualSignedRequestHeaders:oe,SignedUrl:(this.isSecure?"https":"http")+"://"+ge+":"+this.port+pe}},ct.prototype.createPostSignatureSync=function(b){var T=b.signatureContext||this.signatureContext;if(T.signature==="v4")return this.createV4PostSignatureSync(b);var R=(b=b||{}).Bucket?String(b.Bucket):null,j=b.Key?String(b.Key):null,Z=b.Expires?parseInt(b.Expires,10):300,G={};if(b.FormParams&&b.FormParams instanceof Object&&!(b.FormParams instanceof Array))for(var V in b.FormParams)({}).hasOwnProperty.call(b.FormParams,V)&&(G[V]=b.FormParams[V]);this.securityToken&&!G[T.headerPrefix+"security-token"]&&(G[T.headerPrefix+"security-token"]=this.securityToken);var oe=new Date;oe.setTime(parseInt(new Date().getTime(),10)+1e3*Z),oe=Hf(oe.toUTCString()),R&&(G.bucket=R),j&&(G.key=j);var ie=[];ie.push('{"expiration":"'),ie.push(oe),ie.push('", "conditions":[');var le=!0,ve=!0,pe=["acl","bucket","key","success_action_redirect","redirect","success_action_status"];for(var de in G)if(de){var ge=G[de];(de=String(de).toLowerCase())==="bucket"?le=!1:de==="key"&&(ve=!1),Ut.indexOf(de)<0&&pe.indexOf(de)<0&&de.indexOf(T.headerPrefix)!==0||(ie.push('{"'),ie.push(de),ie.push('":"'),ie.push(ge!==null?String(ge):""),ie.push('"},'))}le&&ie.push('["starts-with", "$bucket", ""],'),ve&&ie.push('["starts-with", "$key", ""],'),ie.push("]}");var we=ie.join("");ie=window.btoa?window.btoa(we):Lo.encode(we);var me=et("sha1",this.sk).update(ie).digest("base64");return{OriginPolicy:we,Policy:ie,Signature:me,Token:this.ak+":"+me+":"+ie}},ct.prototype.createV4PostSignatureSync=function(b){var T=(b=b||{}).signatureContext||this.signatureContext,R=b.Bucket?String(b.Bucket):null,j=b.Key?String(b.Key):null,Z=b.Expires?parseInt(b.Expires,10):300,G={};if(b.FormParams&&b.FormParams instanceof Object&&!(b.FormParams instanceof Array))for(var V in b.FormParams)({}).hasOwnProperty.call(b.FormParams,V)&&(G[V]=b.FormParams[V]);this.securityToken&&!G[T.headerPrefix+"security-token"]&&(G[T.headerPrefix+"security-token"]=this.securityToken);var oe=vc(new Date().toUTCString()),ie=oe[0],le=oe[1],ve=this.ak+"/"+ie+"/"+this.region+"/s3/aws4_request",pe=new Date;pe.setTime(parseInt(new Date().getTime(),10)+1e3*Z),pe=Hf(pe.toUTCString()),G["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",G["X-Amz-Date"]=le,G["X-Amz-Credential"]=ve,R&&(G.bucket=R),j&&(G.key=j);var de=[];de.push('{"expiration":"'),de.push(pe),de.push('", "conditions":[');var ge=!0,we=!0,me=["acl","bucket","key","success_action_redirect","redirect","success_action_status"];for(var ke in G)if(ke){var Se=G[ke];(ke=String(ke).toLowerCase())==="bucket"?ge=!1:ke==="key"&&(we=!1),Ut.indexOf(ke)<0&&me.indexOf(ke)<0&&ke.indexOf(T.headerPrefix)!==0||(de.push('{"'),de.push(ke),de.push('":"'),de.push(Se!==null?String(Se):""),de.push('"},'))}ge&&de.push('["starts-with", "$bucket", ""],'),we&&de.push('["starts-with", "$key", ""],'),de.push("]}");var Me=de.join("");de=window.btoa?window.btoa(Me):Lo.encode(Me);var Pe=Kf(ie,this.sk,this.region,de);return{OriginPolicy:Me,Policy:de,Algorithm:G["X-Amz-Algorithm"],Credential:G["X-Amz-Credential"],Date:G["X-Amz-Date"],Signature:Pe}};var Zk=ct,Wf=Number.MAX_VALUE;function Md(){this.consoleLog=window.console,this._level=Wf}Md.prototype.setLevel=function(b){b&&(b=(b=String(b).toLowerCase())==="info"?20:b==="warn"?30:b==="error"?40:b==="debug"?10:Wf,this._level=b)},Md.prototype.runLog=function(b,T,R){if(b){var j=[new Date().toLocaleString(),b.toLowerCase(),T,R].join("|");b.toLowerCase()==="debug"&&this._level<=10?this.consoleLog.debug(j):b.toLowerCase()==="info"&&this._level<=20?this.consoleLog.info(j):b.toLowerCase()==="warn"&&this._level<=30?this.consoleLog.warn(j):b.toLowerCase()==="error"&&this._level<=40&&this.consoleLog.error(j)}};var Jk=Md,eC=u(1062),tC=u.t(eC,2),Yf=function(b){return Object.prototype.toString.call(b)==="[object String]"&&b.lastIndexOf("/")!==b.length-1&&(b+="/"),b},nC={extend:function(b){b.prototype.dropFile=function(T,R){this.deleteObject(T,R)},b.prototype.dropFolder=function(T,R){var j=this;T=T||{};var Z=(function(de,ge,we){de=de||function(){};var me=new Date().getTime();return function(ke,Se){return ge.runLog("info","dropFolder","ObsClient cost "+(new Date().getTime()-me)+" ms"),Object.prototype.toString.call(ke)==="[object String]"?de(new Error(ke),Se):de(ke,Se)}})(R,j.log),G=(function(de){return de=de||function(){},function(ge,we,me){return Object.prototype.toString.call(me)==="[object Error]"?de(ge,we,me):Object.prototype.toString.call(me)==="[object String]"?de(ge,we,new Error(me)):me?me.CommonMsg.Status>300?de(ge,we,new Error("status:"+me.CommonMsg.Status+", code:"+me.CommonMsg.Code+", message:"+me.CommonMsg.Message)):void de(ge,we,me):void 0}})(T.EventCallback),V=T.TaskNum||1,oe=0,ie=[],le=function(de,ge,we,me){if(me)return ge.finished++,void we(ge);var ke=function(){oe++,j.dropFile({Bucket:ge.bucket,Key:de},function(Se,Me){oe--,ge.finished++,(function(){for(;oe<V&&ie.length>0;)ie.shift()()})(),Se?(G("dropFileFailed",de,Se),ge.subDeleted=!1):Me.CommonMsg.Status>=300?(G("dropFileFailed",de,Me),ge.subDeleted=!1):G("dropFileSucceed",de,Me),we(ge)})};oe<V?ke():ie.push(ke)},ve=function(de,ge,we){return function(me){!me.isTruncated&&me.finished===me.total&&me.subDeleted&&le(de,ge,we,!1)}},pe=Yf(T.Prefix);(function de(ge,we,me,ke,Se){oe++,j.listObjects({Bucket:we,Prefix:me,Delimiter:"/",Marker:ke},function(Me,Pe){if(oe--,Me)return Z(Me);if(Pe.CommonMsg.Status>=300)return Z(null,Pe);if(ge.total+=Pe.InterfaceResult.Contents.length,ge.total+=Pe.InterfaceResult.CommonPrefixes.length,ge.total!==0){ge.isTruncated=Pe.InterfaceResult.IsTruncated==="true";for(var Le=function(Je){return function(){de({total:0,finished:0,isTruncated:!1,bucket:we,subDeleted:!0},we,Je,null,ve(Je,ge,Se))}},Ve=0;Ve<Pe.InterfaceResult.CommonPrefixes.length;Ve++){var Oe=Yf(Pe.InterfaceResult.CommonPrefixes[Ve].Prefix);oe<V?de({total:0,finished:0,isTruncated:!1,bucket:we,subDeleted:!0},we,Oe,null,ve(Oe,ge,Se)):ie.push(Le(Oe))}for(var He=0;He<Pe.InterfaceResult.Contents.length;He++){var Ye=Pe.InterfaceResult.Contents[He].Key;le(Ye,ge,Se,Ye.lastIndexOf("/")===Ye.length-1)}ge.isTruncated&&(oe<V?de(ge,we,me,Pe.InterfaceResult.NextMarker,Se):ie.push(function(){de(ge,we,me,Pe.InterfaceResult.NextMarker,Se)}))}else Se(ge)})})({total:0,finished:0,isTruncated:!1,bucket:T.Bucket,subDeleted:!0},T.Bucket,pe,null,function(de){if(!de.isTruncated&&de.finished===de.total)if(de.subDeleted)j.dropFile({Bucket:de.bucket,Key:pe},function(we,me){return we?(G("dropFileFailed",pe,we),Z(we)):me.CommonMsg.Status>=300?(G("dropFileFailed",pe,me),Z(null,me)):(G("dropFileSucceed",pe,me),Z(null,me))});else{var ge="drop folder "+pe+" failed due to child file deletion failed";G("dropFileFailed",pe,new Error(ge)),Z(ge)}})}}},oC=nC,Ld=5368709120,yc=function(b){var T=[];if(T.push(b.bucket),T.push(b.key),T.push(b.sourceFile.name),T.push(String(b.partSize)),T.push(String(b.partCount)),T.push(String(b.fileStat.fileSize)),T.push(String(b.fileStat.lastModified)),b.uploadId&&T.push(b.uploadId),b.sseC&&T.push(b.sseC),b.sseCKey&&T.push(b.sseCKey),b.parts)for(var R=0;R<b.parts.length;R++){var j=b.parts[R];j&&(T.push(String(j.partNumber)),T.push(String(j.offset)),T.push(String(j.partSize)),T.push(String(j.isCompleted)),j.etag&&T.push(String(j.etag)))}return window.btoa(Rn()(T.join(""),!1,!0))},Id=function(b,T,R){b&&b.uploadId&&R.abortMultipartUpload({Bucket:b.bucket,Key:b.key,RequestDate:b.requestDate,UploadId:b.uploadId},function(j,Z){j?R.log.runLog("warn",T,"abort multipart upload failed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId+", err:"+j):Z.CommonMsg.Status>=300?R.log.runLog("warn",T,"abort multipart upload failed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId+", status:"+Z.CommonMsg.Status+", code:"+Z.CommonMsg.Code+", message:"+Z.CommonMsg.Message):(delete b.uploadId,R.log.runLog("warn",T,"abort multipart upload succeed, bucket:"+b.bucket+", key:"+b.key+", uploadId:"+b.uploadId))})},Xf=function(b){if(!(b.finishedCount<b.uploadCheckpoint.partCount)){if(b.isAbort)return Id(b.uploadCheckpoint,b.funcName,b.that),b.callback("uploadFile failed the upload task is aborted");if(b.isSuspend)return b.callback("the process of uploadFile is suspened, you can retry with the uploadCheckpoint");if(b.hasError)return b.callback("uploadFile finished with error, you can retry with the uploadCheckpoint");for(var T=[],R=0;R<b.uploadCheckpoint.partCount;R++){var j=b.uploadCheckpoint.parts[R];T.push({PartNumber:j.partNumber,ETag:j.etag})}b.that.completeMultipartUpload({Bucket:b.uploadCheckpoint.bucket,Key:b.uploadCheckpoint.key,RequestDate:b.uploadCheckpoint.requestDate,UploadId:b.uploadCheckpoint.uploadId,Parts:T,CallbackUrl:b.callbackUrl,CallbackHost:b.callbackHost,CallbackBody:b.callbackBody,CallbackBodyType:b.callbackBodyType},function(Z,G){var V={bucket:b.uploadCheckpoint.bucket,key:b.uploadCheckpoint.key,uploadId:b.uploadCheckpoint.uploadId};return Z?(b.eventCallback("completeMultipartUploadFailed",V,Z),b.callback(Z)):G.CommonMsg.Status>=500?(b.eventCallback("completeMultipartUploadFailed",V,G),b.callback(null,G)):G.CommonMsg.Status>=300&&G.CommonMsg.Status<500?(b.eventCallback("completeMultipartUploadAborted",V,G),Id(b.uploadCheckpoint,b.funcName,b.that),b.callback(null,G)):(b.eventCallback("completeMultipartUploadSucceed",V,G),void b.callback(null,G))})}},Zf=function(b){b.resumeCallback({cancel:function(){b.isSuspend=!0;for(var oe=0;oe<b.uploadPartParams.length;oe++){var ie=b.uploadPartParams[oe].cancelHook;le=ie,Object.prototype.toString.call(le)==="[object Function]"&&ie()}var le}},b.uploadCheckpoint);var T=[],R=function(){for(;b.runningTask<b.taskNum&&T.length>0;)T.shift()();T.length===0&&Xf(b)},j=window.btoa?window.btoa:Lo.encode,Z=function(oe){return function(){if(b.runningTask++,b.isSuspend||b.isAbort)return b.runningTask--,b.finishedCount++,b.finishedCount+=T.length,T=[],R();var ie,le,ve,pe,de=0,ge=function(ke){if(!de){de=1;var Se,Me={Bucket:b.uploadCheckpoint.bucket,Key:b.uploadCheckpoint.key,RequestDate:b.uploadCheckpoint.requestDate,PartNumber:oe.partNumber,UploadId:b.uploadCheckpoint.uploadId,SourceFile:b.uploadCheckpoint.sourceFile,Offset:oe.offset,PartSize:oe.partSize,SseC:b.uploadCheckpoint.sseC,SseCKey:b.uploadCheckpoint.sseCKey,ProgressCallback:(Se=oe.partNumber,function(Pe,Le,Ve){b.progressCallback(Se,Pe)}),ContentMD5:ke};b.uploadPartParams.push(Me),b.that.uploadPart(Me,function(Pe,Le){if(b.runningTask--,b.finishedCount++,b.isSuspend)return R();var Ve={partNumber:oe.partNumber,bucket:b.uploadCheckpoint.bucket,key:b.uploadCheckpoint.key,uploadId:b.uploadCheckpoint.uploadId};Pe?(b.eventCallback("uploadPartFailed",Ve,Pe),b.hasError=!0):Le.CommonMsg.Status>=500||Le.CommonMsg.Status===400&&Le.CommonMsg.Code==="BadDigest"?(b.eventCallback("uploadPartFailed",Ve,Le),b.hasError=!0):Le.CommonMsg.Status>=300&&Le.CommonMsg.Status<500?(b.isAbort=!0,b.hasError=!0,b.eventCallback("uploadPartAborted",Ve,Le)):(oe.etag=Le.InterfaceResult.ETag,oe.isCompleted=!0,Ve.etag=oe.etag,b.uploadCheckpoint.md5=yc(b.uploadCheckpoint),b.eventCallback("uploadPartSucceed",Ve,Le),b.that.log.runLog("debug",b.funcName,"Part "+String(oe.partNumber)+" is finished, uploadId "+b.uploadCheckpoint.uploadId)),R()})}};if(b.verifyMd5&&window.FileReader&&(b.uploadCheckpoint.sourceFile instanceof window.File||b.uploadCheckpoint.sourceFile instanceof window.Blob)){var we=(ie=b.uploadCheckpoint.sourceFile,le=oe.offset,ve=oe.offset+oe.partSize,pe=pe||ie.type,ie.mozSlice?ie.mozSlice(le,ve,pe):ie.webkitSlice?ie.webkitSlice(le,ve,pe):ie.slice(le,ve,pe)),me=new window.FileReader;return me.onload=function(ke){var Se=(function(Pe){Pe=new Uint8Array(Pe);for(var Le,Ve=0;Ve<Pe.length;){var Oe=Ve+16384;Oe=Oe<=Pe.length?Oe:Pe.length,Le?Le+=String.fromCharCode.apply(null,Pe.slice(Ve,Oe)):Le=String.fromCharCode.apply(null,Pe.slice(Ve,Oe)),Ve=Oe}return Pe=null,Le})(ke.target.result),Me=j(Rn()(Se,!1,!0));Se=null,ge(Me)},me.onerror=function(ke){b.that.log.runLog("error",b.funcName,"Caculate md5 for part "+String(oe.partNumber)+" failed"),ge()},void me.readAsArrayBuffer(we)}ge()}};if(!b.isSuspend){for(var G=0;G<b.uploadCheckpoint.partCount;G++){var V=b.uploadCheckpoint.parts[G];V.isCompleted?(b.finishedCount++,b.finishedBytes+=V.partSize):T.push(Z(V))}return T.length===0?Xf(b):R()}b.callback("the process of uploadFile is suspened, you can retry with the uploadCheckpoint")},rC={extend:function(b){b.prototype.uploadFile=function(T,R){var j=this;T=T||{};var Z="uploadFile",G=(function(Oe,He,Ye){Oe=Oe||function(){};var Je=new Date().getTime();return function(xt,Tt){return He.runLog("info","uploadFile","ObsClient cost "+(new Date().getTime()-Je)+" ms"),Object.prototype.toString.call(xt)==="[object String]"?Oe(new Error(xt),Tt):Oe(xt,Tt)}})(R,j.log),V=(function(Oe){return Oe=Oe||function(){},function(He,Ye,Je){return Object.prototype.toString.call(Je)==="[object Error]"?Oe(He,Ye,Je):Object.prototype.toString.call(Je)==="[object String]"?Oe(He,Ye,new Error(Je)):Je?Je.CommonMsg.Status>300?Oe(He,Ye,new Error("status:"+Je.CommonMsg.Status+", code:"+Je.CommonMsg.Code+", message:"+Je.CommonMsg.Message)):void Oe(He,Ye,Je):void 0}})(T.EventCallback),oe=T.TaskNum||1,ie=T.ProgressCallback||function(){},le=T.ResumeCallback||function(){},ve=T.VerifyMd5||!1;j.log.runLog("info",Z,"enter uploadFile...");var pe=null;if(T.UploadCheckpoint&&T.UploadCheckpoint.sourceFile&&T.UploadCheckpoint.fileStat&&T.UploadCheckpoint.uploadId&&T.UploadCheckpoint.md5===yc(T.UploadCheckpoint)?pe=T.UploadCheckpoint:Id(T.UploadCheckpoint,Z,j),pe){var de=pe.sourceFile;if(!(de instanceof window.File||de instanceof window.Blob))return G("source file is not valid, must be an instanceof [File | Blob]");if(!de.mozSlice&&!de.webkitSlice&&!de.slice)return G("your browser cannot support the slice method for [File | Blob]")}else{var ge=T.SourceFile;if(!(ge instanceof window.File||ge instanceof window.Blob))return G("source file is not valid, must be an instanceof [File | Blob]");if(!ge.mozSlice&&!ge.webkitSlice&&!ge.slice)return G("your browser cannot support the slice method for [File | Blob]");j.log.runLog("debug",Z,"Begin to uploadFile to OBS from file:"+ge.name);var we=ge.size,me=parseInt(T.PartSize,10),ke=0,Se=[];if(we===0)me=0,ke=1,Se.push({partNumber:1,offset:0,partSize:0,isCompleted:!1});else{if(me=isNaN(me)||me<102400?9437184:me>Ld?Ld:me,(ke=Math.floor(we/me))>=1e4&&(me=Math.floor(we/1e4),we%1e4!=0&&(me+=1),ke=Math.floor(we/me)),me>Ld)return G("The source file "+ge.name+" is too large");var Me=we%me;Me!==0&&ke++;for(var Pe=0;Pe<ke;Pe++)Se.push({partNumber:Pe+1,offset:Pe*me,partSize:me,isCompleted:!1});Me!==0&&(Se[ke-1].partSize=Me)}j.log.runLog("debug",Z,"Total parts count "+ke),(pe={bucket:T.Bucket,key:T.Key,sourceFile:ge,partSize:me,partCount:ke,parts:Se}).fileStat={fileSize:we,lastModified:ge.lastModified},T.SseC&&T.SseCKey&&(pe.sseC=T.SseC,pe.sseCKey=T.SseCKey),pe.md5=yc(pe)}pe.requestDate=T.RequestDate;var Le={start:new Date().getTime(),uploadCheckpoint:pe,funcName:Z,taskNum:oe,callback:G,that:j,runningTask:0,finishedCount:0,hasError:!1,finishedBytes:0,isAbort:!1,resumeCallback:le,isSuspend:!1,partsLoaded:{},requestDate:T.RequestDate,uploadPartParams:[],verifyMd5:ve,callbackUrl:T.CallbackUrl,callbackHost:T.CallbackHost,callbackBody:T.CallbackBody,callbackBodyType:T.CallbackBodyType,eventCallback:function(Oe,He,Ye){Le.isSuspend||V(Oe,He,Ye)},progressCallback:function(Oe,He){Le.isSuspend||(Le.finishedBytes+=He,Le.partsLoaded[Oe]&&(Le.finishedBytes-=Le.partsLoaded[Oe]),Le.partsLoaded[Oe]=He,ie(Le.finishedBytes,Le.uploadCheckpoint.fileStat.fileSize,(new Date().getTime()-Le.start)/1e3))}};if(!pe.uploadId){var Ve=T.ContentType;return!Ve&&pe.key&&(Ve=j.util.mimeTypes[pe.key.substring(pe.key.lastIndexOf(".")+1)]),!Ve&&pe.sourceFile.name&&(Ve=j.util.mimeTypes[pe.sourceFile.name.substring(pe.sourceFile.name.lastIndexOf(".")+1)]),void j.initiateMultipartUpload({Bucket:T.Bucket,Key:T.Key,RequestDate:T.RequestDate,ACL:T.ACL,Metadata:T.Metadata,WebsiteRedirectLocation:T.WebsiteRedirectLocation,StorageClass:T.StorageClass,ContentType:Ve,Expires:T.Expires,SseKms:T.SseKms,SseKmsKey:T.SseKmsKey,SseC:T.SseC,SseCKey:T.SseCKey},function(Oe,He){var Ye={bucket:T.Bucket,key:T.Key};if(Oe)return Le.eventCallback("initiateMultipartUploadFailed",Ye,Oe),G(Oe);if(He.CommonMsg.Status>=300)return Le.eventCallback("initiateMultipartUploadFailed",Ye,He),G(null,He);var Je=He.InterfaceResult.UploadId;pe.uploadId=Je,pe.md5=yc(pe),Le.uploadCheckpoint=pe,Ye.uploadId=Je,j.log.runLog("info",Z,"Claim a new upload id "+Je),Le.eventCallback("initiateMultipartUploadSucceed",Ye,He),Zf(Le)})}Zf(Le)}}},iC=rC;function ze(b){this.factory(b)}function Jf(b){return b.slice(0,1).toUpperCase()+b.slice(1)}var eg=["createBucket","listBuckets","getBucketMetadata","headBucket","deleteBucket","setBucketQuota","getBucketQuota","getBucketStorageInfo","setBucketPolicy","getBucketPolicy","deleteBucketPolicy","setBucketVersioningConfiguration","getBucketVersioningConfiguration","putBackToSource","deleteBackToSource","getBackToSource","getBucketLocation","listVersions","listObjects","setBucketLifecycleConfiguration","getBucketLifecycleConfiguration","deleteBucketLifecycleConfiguration","setBucketAcl","getBucketAcl","setBucketLoggingConfiguration","getBucketLoggingConfiguration","setBucketWebsiteConfiguration","getBucketWebsiteConfiguration","deleteBucketWebsiteConfiguration","setBucketNotification","getBucketNotification","setBucketTagging","getBucketTagging","deleteBucketTagging","getBucketCors","deleteBucketCors","setBucketStoragePolicy","getBucketStoragePolicy","getObject","getObjectMetadata","setObjectMetadata","setObjectAcl","getObjectAcl","deleteObject","deleteObjects","listMultipartUploads","listParts","abortMultipartUpload","completeMultipartUpload","getBucketInventory","setBucketInventory","deleteBucketInventory","getBucketEncryption","setBucketEncryption","deleteBucketEncryption","getBucketRequesterPay","setBucketRequesterPay","setMirrorBackToSource","getMirrorBackToSource","deleteMirrorBackToSource","getWorkflowTrigger","deleteWorkflowTrigger","createWorkflowTrigger","restoreFailedWorkflowExecution","createTemplate","createWorkflow","getWorkflowList","deleteWorkflow","getWorkflowTemplateList","getWorkflowInstanceList","deleteTemplate","updateWorkflow","getActionTemplates","getWorkflowAuthorization","openWorkflowAuthorization","getBucketDirectColdAccess","setBucketDirectColdAccess","deleteBucketDirectColdAccess","getBucketCustomDomain","setBucketCustomDomain","deleteBucketCustomDomain","setBucketCors","getBucketReplication","setBucketReplication","deleteBucketReplication","getCDNNotifyConfiguration","setCdnNotifyConfiguration","getQuota","getBucketDisPolicy","setBucketDisPolicy","deleteBucketDisPolicy","createOnlineDecom","getOnlineDecom","getWorkflowAgreements","openWorkflowAgreements","deleteOnlineDecom","getMyActionTemplates","createMyActionTemplate","getMyactiontemplateDetail","updateMyActionTemplate","deleteMyActionTemplate","forbidMyActionTemplate","updatePublicActionTemplate","getOmPublicActionTemplates","setSFSAcl","getSFSAcl","deleteSFSAcl","setBucketAlias","bindBucketAlias","unbindBucketAlias","deleteBucketAlias","listBucketsAlias","getBucketAlias"];function aC(b){return function(T,R){this.exec(Jf(b),T,R)}}for(var Nd=0;Nd<eg.length;Nd++){var tg=eg[Nd];ze.prototype[tg]=aC(tg)}function Od(b){return Object.prototype.toString.call(b)==="[object Function]"}function sC(b){return function(T,R){if(Od(T))b.call(this,null,T);else{if(!Od(R)){var j=this;return new Promise(function(Z,G){b.call(j,T,function(V,oe){if(V)return G(V);Z(oe)})})}b.call(this,T,R)}}}if(ze.prototype.createTemplate=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("CreateTemplate",b,T)},ze.prototype.createWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("CreateWorkflow",b,T)},ze.prototype.restoreFailedWorkflowExecution=function(b,T){b.ApiPath="v2/workflowexecutions",this.exec("RestoreFailedWorkflowExecution",b,T)},ze.prototype.getWorkflowList=function(b,T){b.ApiPath="v2/workflows",this.exec("GetWorkflowList",b,T)},ze.prototype.deleteWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("DeleteWorkflow",b,T)},ze.prototype.deleteTemplate=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("DeleteTemplate",b,T)},ze.prototype.getWorkflowTemplateList=function(b,T){b.ApiPath="v2/workflowtemplates",this.exec("GetWorkflowTemplateList",b,T)},ze.prototype.getWorkflowInstanceList=function(b,T){b.ApiPath="v2/workflowexecutions",this.exec("GetWorkflowInstanceList",b,T)},ze.prototype.updateWorkflow=function(b,T){b.ApiPath="v2/workflows",this.exec("UpdateWorkflow",b,T)},ze.prototype.getActionTemplates=function(b,T){b.ApiPath="v2/actiontemplates",this.exec("GetActionTemplates",b,T)},ze.prototype.getWorkflowAuthorization=function(b,T){b.ApiPath="v2/workflow-authorization",this.exec("GetWorkflowAuthorization",b,T)},ze.prototype.openWorkflowAuthorization=function(b,T){b.ApiPath="v2/workflow-authorization",this.exec("OpenWorkflowAuthorization",b,T)},ze.prototype.getPublicationTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/publicactiontemplates",this.exec("GetPublicationTemplates",b,T),this.util.pathStyle=!1},ze.prototype.getPublicationTemplateDetail=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/publicactiontemplates",this.exec("GetPublicationTemplateDetail",b,T),this.util.pathStyle=!1},ze.prototype.getWorkflowAgreements=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/workflow-agreements",this.exec("GetWorkflowAgreements",b,T),this.util.pathStyle=!1},ze.prototype.openWorkflowAgreements=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/workflow-agreements",this.exec("OpenWorkflowAgreements",b,T),this.util.pathStyle=!1},ze.prototype.createMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("CreateMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.getMyActionTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("GetMyActionTemplates",b,T),this.util.pathStyle=!1},ze.prototype.getMyactiontemplateDetail=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("GetMyactiontemplateDetail",b,T),this.util.pathStyle=!1},ze.prototype.updateMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("UpdateMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.deleteMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("DeleteMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.forbidMyActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/myactiontemplates",this.exec("ForbidMyActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.updatePublicActionTemplate=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/ompublicactiontemplates",this.exec("UpdatePublicActionTemplate",b,T),this.util.pathStyle=!1},ze.prototype.getOmPublicActionTemplates=function(b,T){this.util.pathStyle=!0,b.ApiPath="v2/ompublicactiontemplates",this.exec("GetOmPublicActionTemplates",b,T),this.util.pathStyle=!1},ze.prototype.putObject=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time,please specify one of eigther a string or file to be send!";return this.log.runLog("error","PutObject",R),T(new Error(R),null)}if(!("ContentType"in b)&&("Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),!b.ContentType&&"SourceFile"in b)){var j=b.SourceFile.name;b.ContentType=this.util.mimeTypes[j.substring(j.lastIndexOf(".")+1)]}this.exec("PutObject",b,T)},ze.prototype.appendObject=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time,please specify one of eigther a string or file to be send!";return this.log.isLevelEnabled("error")&&this.log.runLog("error","PutObject",R),T(new Error(R),null)}"ContentType"in b||("Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),!b.ContentType&&"SourceFile"in b&&(b.ContentType=this.util.mimeTypes[b.SourceFile.substring(b.SourceFile.lastIndexOf(".")+1)])),this.exec("AppendObject",b,T)},ze.prototype.copyObject=function(b,T){var R="CopySource";if(R in b){var j=b[R],Z=j.lastIndexOf("?versionId=");b[R]=Z>0?this.util.encodeURIWithSafe(j.slice(0,Z))+j.slice(Z):this.util.encodeURIWithSafe(j)}this.exec("CopyObject",b,T)},ze.prototype.copyPart=function(b,T){var R="CopySource";if(R in b){var j=b[R],Z=j.lastIndexOf("?versionId=");b[R]=Z>0?this.util.encodeURIWithSafe(j.slice(0,Z))+j.slice(Z):this.util.encodeURIWithSafe(j)}this.exec("CopyPart",b,T)},ze.prototype.restoreObject=function(b,T){this.exec("RestoreObject",b,function(R,j){!R&&j.InterfaceResult&&j.CommonMsg.Status<300&&(j.InterfaceResult.RestoreStatus=j.CommonMsg.Status===200?"AVALIABLE":"INPROGRESS"),T(R,j)})},ze.prototype.initiateMultipartUpload=function(b,T){"ContentType"in b||"Key"in b&&(b.ContentType=this.util.mimeTypes[b.Key.substring(b.Key.lastIndexOf(".")+1)]),this.exec("InitiateMultipartUpload",b,T)},ze.prototype.uploadPart=function(b,T){if("Body"in b&&"SourceFile"in b){var R="the input body and sourcefile exist at same time, please specify one of eigther a string or file to be send!";return this.log.runLog("error","UploadPart",R),T(new Error(R),null)}this.exec("UploadPart",b,T)},oC.extend(ze),iC.extend(ze),Od(Promise)){for(var Dd in ze.prototype)if({}.hasOwnProperty.call(ze.prototype,Dd)){var lC=ze.prototype[Dd];ze.prototype[Dd]=sC(lC)}}for(var Bd in ze.prototype.exec=function(b,T,R){var j=this.log;j.runLog("info",b,"enter "+b+"...");var Z=new Date().getTime();T=T||{},R=R||function(){},this.util.exec(b,T,function G(V,oe){G.$called||(G.$called=!0,!V||V instanceof Error||(V=new Error(V)),j.runLog("debug",b,"ObsClient cost "+(new Date().getTime()-Z)+" ms"),R(V,oe))})},ze.prototype.initLog=function(b){b=b||{},this.log.setLevel(b.level);var T=["[OBS SDK Version="+this.util.obsSdkVersion];if(this.util.server){var R=this.util.port?":"+this.util.port:"";T.push("Endpoint="+(this.util.is_secure?"https":"http")+"://"+this.util.server+R)}T.push("Access Mode="+(this.util.path_style?"Path":"Virtual Hosting")+"]"),this.log.runLog("warn","init",T.join("];["))},ze.prototype.factory=function(b){this.log=new Jk,this.util=new Zk(this.log),b=b||{},this.util.initFactory(b.access_key_id,b.secret_access_key,b.is_secure,b.server,b.path_style,b.signature,b.region,b.port,b.timeout,b.security_token,b.is_signature_negotiation,b.is_cname,b.url_prefix,b.region_domains,b.setRequestHeaderHook,b.useRawXhr)},ze.prototype.refresh=function(b,T,R){this.util.refresh(b,T,R)},ze.prototype.createSignedUrlSync=function(b){return this.util.createSignedUrlSync(b)},ze.prototype.createV2SignedUrlSync=function(b){return this.util.createV2SignedUrlSync(b)},ze.prototype.createV4SignedUrlSync=function(b){return this.util.createV4SignedUrlSync(b)},ze.prototype.createPostSignatureSync=function(b){return this.util.createPostSignatureSync(b)},ze.prototype.createV4PostSignatureSync=function(b){return this.util.createV4PostSignatureSync(b)},ze.prototype.enums=tC,ze.prototype)({}).hasOwnProperty.call(ze.prototype,Bd)&&(ze.prototype[Jf(Bd)]=ze.prototype[Bd]);for(var Ys in ze.prototype)if({}.hasOwnProperty.call(ze.prototype,Ys)){var qd=Ys.indexOf("Configuration");qd>0&&qd+13===Ys.length&&(ze.prototype[Ys.slice(0,qd)]=ze.prototype[Ys])}var cC=ze})(),m.default})()}).call(this,r(5),r(4).Buffer)},function(n,o,r){var i="";i=r(6);var a={document:"doc,docx,xls,xlsx,ppt,pptx,pdf,txt,epub,pps,psd,xmind,dwg",image:"png,jpg,gif,jpeg,bmp",video:"mp4,avi,wmv,rm,rmvb,mpeg,mpg,mkv,mov,flv",audio:"mp3,wav,wma",zip:"zip,rar,7z",flash:"swf",srt:"srt",favico:"ico"},l=["document","image","video","audio","zip","flash","srt"];function s(d,u,m){if(d.indexOf(u)>-1){var h=new RegExp("("+u+"=)([^&]*)","gi");d=d.replace(h,u+"="+m)}else{var p=u+"="+m,g=d.indexOf("?");g<0?d+="?":g>=0&&g!=d.length-1&&(d+="&"),d+=p}return d}function c(d){d=d||{},this.multiple=!!d.multiple,this.maxSize=d.maxSize||512,this.fileTypes=d.fileTypes&&d.fileTypes.length>0?d.fileTypes:l,this.exts=d.exts||"",this.accetp="",this.mode=d.mode||"huawei",this.files=[],this.$trigger="",this.uptokenHost=d.uptokenHost||"https://courseapi.tongshike.cn",this.obsHost=d.obsHost||"",this.m3u8=d.m3u8,this.authorization=d.authorization,this.obsSign=d.obsSign,this.config=d.config||{},this.putExtra=d.putExtra||{},this.config.uphost||(this.config.uphost=""),this.obsHost&&this.obsHost.charAt(this.obsHost.length-1)=="/"&&(this.obsHost=this.obsHost.substring(0,this.obsHost.length-1))}c.prototype.initUpBtn=function(d){this.$trigger=d;var u=this,m=[];if(this.fileTypes.length>0)for(var h=0;h<this.fileTypes.length;h++){var p=this.fileTypes[h];m.push(a[p])}for(m=m.join(","),this.exts&&(m=this.exts),m=m.split(","),h=0;h<m.length;h++)m[h]="."+m[h];this.accetp=m.join(","),this.$el=document.createElement("input"),this.$el.style.display="none",this.$el.type="file",this.multiple&&this.$el.setAttribute("multiple",!0),this.$el.accept=this.accetp,document.body.appendChild(this.$el),this.$el.onchange=function(){this.files.length>0&&(u.handleFileChange(this.files),u.$el.value="")},this.$trigger.onclick=function(){u.$el.click()}},c.prototype.handleFileChange=function(d){this.uploadFiles(d)},c.prototype.uploadFiles=function(d){for(var u=0;u<d.length;u++){var m=d[u];if(m.ext=m.name.substring(m.name.lastIndexOf(".")).toLowerCase(),m.key="resources/web/"+Date.now()+Math.round(1e4*Math.random())+m.ext,m.percent=0,this.accetp.indexOf(m.ext)===-1)return this.error(m,{code:50001,msg:"不支持该类型文件"});if(1024*this.maxSize*1024<m.size)return this.error(m,{code:50002,msg:"文件不能超过"+this.maxSize+"mb"});this.onBeforeUpload&&this.onBeforeUpload(m),this.startUpload(m)}},c.prototype.startUpload=function(d){var u=this;switch(u.files.push(d),this.mode){case"qiniu":u.getToken(d,function(m){u.qiniuUploadByToken(d,m)});break;case"huawei":d.ext=d.ext||d.name.substring(d.name.lastIndexOf(".")),d.key=d.key||"resources/web/"+Date.now()+Math.round(1e4*Math.random())+d.ext,u.getObsClient(d.key,function(){u.putObject(d)})}},c.prototype.qiniuUploadByToken=function(d,u){var m=this;d.obsHost=m.obsHost,d.size>4194304&&(m.config.chunkSize=5);var h="".upload(d,d.key,u,m.putExtra,m.config);d.subscription=h.subscribe({next:function(p){m.onProgress&&m.onProgress(d,p.total.percent),d.onProgress&&d.onProgress(p.total.percent)},error:function(p){m.error(d,{code:50071,msg:"上传失败",err:p})},complete:function(p){d.duration=p.duration,d.key=p.key,m.success(d)}})},c.prototype.putObject=function(d){var u=this;this.obsClient.putObject({Bucket:u.obsClientConfig.bucket,Key:d.key,Metadata:{property:"property-value"},SourceFile:d,ProgressCallback:function(m,h,p){var g=Math.floor(100*m/h);g=g>99?99:g,d.percent=g,u.onProgress&&u.onProgress(d,g),d.onProgress&&d.onProgress(g)}}).then(function(m){if(console.log(m),m.CommonMsg.Status<300){d.obsHost=u.obsHost,d.ext.toLowerCase().includes("wma")&&(d.originKey=d.key,d.key=d.key.substring(0,d.key.lastIndexOf("."))+".mp3",u.hwAudioTranscoding(d)),d.ext.toLowerCase().includes("mp3")&&u.hwMp3Transcoding(d),d.ext.substring(1).toLowerCase();var h=u.getFileType(d.key);h=="video"?(u.m3u8&&(d.m3u8Key="resources/web/"+Date.now()+Math.round(1e4*Math.random())+".m3u8"),u.hwVideoTranscoding(d)):h=="audio"?u.getHuaweiMetadata(d.originKey||d.key,function(p){d.duration=p.duration,u.success(d)}):u.success(d)}}).catch(function(m){u.error(d,{code:50081,msg:"上传失败",err:m})})},c.prototype.download=function(d,u){var m=d.substring(d.lastIndexOf("/")+1);if(d.indexOf("?")>-1){var h=d.substring(0,d.lastIndexOf("?"));m=h.substring(h.lastIndexOf("/")+1)}u=u||m,this.mode=="qiniu"?this.qiniuDownload(d,u):this.huaweiDownload(d,u)},c.prototype.getDownloadUrl=function(d,u,m){var h=d.substring(d.lastIndexOf("/")+1);if(d.indexOf("?")>-1){var p=d.substring(0,d.lastIndexOf("?"));h=p.substring(p.lastIndexOf("/")+1)}u=u||h,this.mode=="qiniu"?m(s(d,"attname",u)):this.getHuaweiDownloadUrl(d,u,m)},c.prototype.getHuaweiDownloadUrl=function(d,u,m){var h=this,p=d.replace(/^(http|https):\/\/[^/]+\//,"");this.getDownloadObsClient(p,function(){h.getFileType(p)=="video"&&(p=p.substring(0,p.lastIndexOf("."))+".mp4",u=u.substring(0,u.lastIndexOf("."))+".mp4");var g=h.obsClient.createSignedUrlSync({Method:"GET",Bucket:h.obsClientConfig.bucket,Key:p,QueryParams:{"response-content-disposition":"attachment;fileName="+encodeURIComponent(u)},Expires:3600});m(g.SignedUrl)})},c.prototype.qiniuDownload=function(d,u){var m=s(d,"attname",u);window.open(m)},c.prototype.huaweiDownload=function(d,u){this.getHuaweiDownloadUrl(d,u,function(m){var h=document.createElement("a");h.style.display="none",h.href=m,document.body.appendChild(h),h.click()})},c.prototype.cancelUpload=function(d){switch(this.mode){case"qiniu":d.subscription.unsubscribe()}},c.prototype.error=function(d,u){this.onError&&this.onError(d,u),d&&d.onError&&d.onError(u)},c.prototype.success=function(d){d.isSuccessCalled||(d.percent=100,this.onProgress&&this.onProgress(d,100),d.onProgress&&d.onProgress(100),this.onSuccess&&this.onSuccess(d),d.onSuccess&&d.onSuccess(d),d.isSuccessCalled=!0)},c.prototype.getToken=function(d,u){var m=this;d.name&&d.name!=""||(d.name=String(new Date().getTime()+d.ext));var h=this.uptokenHost+"/files/getUptoken?fileName="+encodeURIComponent(d.name),p=new XMLHttpRequest;p.open("get",h),p.setRequestHeader("AUTHORIZATION",this.authorization),p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){var g=JSON.parse(p.responseText).uptoken;u&&u(g)}else m.error(d,{code:50070,msg:"上传失败"})},p.send(),console.log(p)},c.prototype.getObsClient=function(d,u){var m=this,h=this.uptokenHost+"/obs/uploadToken",p=new XMLHttpRequest;this.obsSign&&(h=this.uptokenHost+"/obs/uploadToken/sign"),p.open("get",h+"?path="+d,!0),this.obsSign?p.setRequestHeader("obsSign",this.obsSign):p.setRequestHeader("authorization",this.authorization),p.onreadystatechange=function(){m.getObsConfigCb(p,u)},p.send()},c.prototype.getDownloadObsClient=function(d,u){var m=this,h=this.uptokenHost+"/obs/downloadToken",p=new XMLHttpRequest;p.open("get",h+"?path="+d,!0),p.onreadystatechange=function(){m.getObsConfigCb(p,u)},p.send()},c.prototype.getObsConfigCb=function(d,u){if(d.readyState===4)if(d.status===200){var m=JSON.parse(d.responseText);m.code==1?(this.obsClientConfig=m.result,this.obsClient=new i({access_key_id:m.result.ak,secret_access_key:m.result.sk,security_token:m.result.securitytoken,server:m.result.endpoint,timeout:1800}),this.obsHost=this.obsClientConfig.domain,u&&u()):this.error("",{code:50080,msg:"上传失败"})}else this.error("",{code:50080,msg:"上传失败"})},c.prototype.getObjectData=function(d,u,m){var h=this;this.getDownloadObsClient(d,function(){h.obsClient.getObject({Bucket:h.obsClientConfig.bucket,Key:d},function(p,g){p?(console.error("Error-->"+p),m&&m(p)):g.CommonMsg.Status==200&&g.InterfaceResult&&u&&u(g.InterfaceResult)})})},c.prototype.dataURLtoBlob=function(d){for(var u=d.split(","),m=u[0].match(/:(.*?);/)[1],h=atob(u[1]),p=h.length,g=new Uint8Array(p);p--;)g[p]=h.charCodeAt(p);return new Blob([g],{type:m})},c.prototype.hwVideoTranscoding=function(d){var u=this,m=d.key.substring(d.key.indexOf("resources/")),h=m.substring(m.lastIndexOf("/")+1);h=h.substring(0,h.lastIndexOf("."));var p=this.uptokenHost+"/obs/transcoding/video/multi?path="+m,g=[{outputFileName:h,outputFormat:"mp4"}];if(this.m3u8){var f=d.m3u8Key.substring(d.m3u8Key.lastIndexOf("/")+1);f=f.substring(0,f.lastIndexOf(".")),g.push({outputFileName:f,outputFormat:"m3u8"})}var y=new XMLHttpRequest;y.onreadystatechange=function(){if(y.readyState===4){var x=JSON.parse(y.responseText);x.code==1?u.getVideoMetadata(d,function(){u.success(d)},function(){var w=setInterval(function(){console.log(Date.now()),u.getMediaLength(d.key,function(A){d.duration=A,u.success(d),clearInterval(w)})},3e3)}):x.code==2?(d.m3u8Key="",u.success(d)):x.code==0?u.error(d,{code:50082,msg:"文件编码格式无法解析,请尝试转码成mp4后再上传。"}):u.error(d,{code:50081,msg:"上传失败"})}},y.open("POST",p,!0),y.setRequestHeader("Content-Type","application/json"),y.send(JSON.stringify(g))},c.prototype.hwAudioTranscoding=function(d){if(d.ext.toLowerCase().includes("wma")){var u=d.key.substring(0,d.key.lastIndexOf("."))+d.ext,m=u.substring(u.lastIndexOf("/")+1);m=m.substring(0,m.lastIndexOf("."));var h=this.uptokenHost+"/obs/transcoding/audio?path="+u+"&outputFileName="+m,p=new XMLHttpRequest;p.onreadystatechange=function(){if(p.readyState===4){var g=JSON.parse(p.responseText);console.log(g)}},p.open("POST",h,!0),p.setRequestHeader("Content-Type","application/json"),p.send()}},c.prototype.hwMp3Transcoding=function(d){var u=this.uptokenHost+"/obs/transcoding/mp3?path="+d.key,m=new XMLHttpRequest;m.onreadystatechange=function(){if(m.readyState===4){var h=JSON.parse(m.responseText);console.log(h)}},m.open("POST",u,!0),m.setRequestHeader("authorization",this.authorization),m.setRequestHeader("Content-Type","application/json"),m.send()},c.prototype.getFileType=function(d){var u=d.substring(d.lastIndexOf(".")+1).toLowerCase();for(var m in a)if(a[m].includes(u))return m;return""},c.prototype.getVideoMetadata=function(d,u,m){var h=document.createElement("video");h.src=URL.createObjectURL(d),h.addEventListener("loadedmetadata",function(){console.log(h),h.duration!=1/0?(d.duration=h.duration,u&&u()):m&&m()}),h.addEventListener("error",function(p){console.log(p),m&&m()})},c.prototype.getHuaweiMetadata=function(d,u){var m=this.uptokenHost+"/obs/video/info?path="+d,h=new XMLHttpRequest;h.open("GET",m,!0),h.onreadystatechange=function(){if(h.readyState===4){var p=JSON.parse(h.responseText);p.code==1&&u&&u(p.result)}},h.send()},c.prototype.getMediaLength=function(d,u){var m=this.uptokenHost+"/obs/video/length?path="+d,h=new XMLHttpRequest;h.onreadystatechange=function(){if(h.readyState===4){var p=JSON.parse(h.responseText);p.code==1&&u&&u(p.result)}},h.open("GET",m,!0),h.send()},n.exports=c}])})})(Fp)),Fp.exports}var zsn=jsn();const Gk=uf(zsn),Usn=$e.defineComponent({name:"FileList",components:{Preview:Rsn,TinyBaseSelect:ps,TinyOption:Ki},props:{list:{type:Array,default:()=>[]},mode:{type:String,default:"edit"},type:{type:String,default:"block"},isPreview:{type:Boolean,default:!0},isShowLimitTimes:{type:Boolean,default:!0},canPreview:{type:Boolean,default:!0},editorble:{type:Boolean,default:!1},showDownLoad:{type:Boolean,default:!0},isQuestionBank:{type:Boolean,default:!1},hideFullScreen:{type:Boolean,default:!1},customFullSreen:{type:Boolean,default:!0},audioMode:{type:String,default:"bar"},isMobile:{type:Boolean,default:!1},audioTime:{type:Number,default:0},actionIndex:{type:Number,default:0}},setup(t,{emit:e}){const n=mc();return{...$e.reactive({obs:{},currentFile:{},playerTimes:[-1,1,2,3,4,5]}),t:n,fileIcon:vsn,getFileSvg:msn,formatSize:gsn,cancelUpload:(d,u)=>{d.cancel&&d.cancel(),e("deleteFile",d,u)},deleteFile:(d,u)=>{vn.confirm(n("confirmDelete")).then(m=>{console.log(m,"res"),m==="confirm"&&(d.actionIndex=t.actionIndex,e("deleteFile",d,u))})},download:d=>{new Gk(t.uploadOptions).download(d)},showPreview:d=>{},isFileCanPreview:d=>{const u=oa(d.fileUrl);return["audio","video","image","document"].includes(u)},isAudio:d=>oa(d.fileUrl)==="audio"}}});var Vsn=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"files-component"},[e.list&&e.list.length>0&&e.type==="block"?n("ul",{staticClass:"file-list-block"},e._l(e.list,function(o,r){return n("li",{key:r+o.fileUrl+o.fileKey},[!e.isPreview||o.status===1||o.status===3?[n("div",{staticClass:"icon-wrapper"},[n("img",{staticClass:"svg-img",attrs:{src:e.getFileSvg(o.fileUrl),alt:""}})]),n("div",{staticClass:"detail"},[n("div",{staticClass:"name"},[e._v(e._s(o.fileName))]),n("div",{staticClass:"info"},[n("span",{staticClass:"size"},[e._v(e._s(e.formatSize(o.fileSize)))]),e.mode==="edit"&&o.progress>=0&&o.progress<100&&o.status!==3?n("div",{staticClass:"progress-wrapper"},[n("div",{staticClass:"progress-bar"},[n("div",{staticClass:"bar",style:{width:o.progress+"%"}})]),n("span",{staticClass:"progress-value"},[e._v(e._s(o.progress)+"%")]),n("span",{staticClass:"cancel",on:{click:function(i){return e.cancelUpload(o,r)}}},[e._v(e._s(e.t("cancel")))])]):n("div",{staticClass:"operations"},[e.canPreview&&e.isFileCanPreview(o)&&o.status!==3?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.showPreview(o)}}},[e._v(" "+e._s(e.t("view"))+" ")]):e._e(),o.status===3?n("span",{staticClass:"upload-fail"},[e._v(e._s(o.errMessage))]):e._e(),e.mode==="edit"?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return i.stopPropagation(),e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")]):n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.download(o.fileUrl)}}},[e._v(" "+e._s(e.t("download"))+" ")])])])])]:e.isPreview&&o.status!==3?n("div",{staticClass:"preview-container"},[n("div",{staticClass:"preview-content",class:{"audio-preview":e.isAudio(o)}},[n("Preview",{attrs:{resource:o,times:e.isShowLimitTimes?o.lisCount:0,"is-question-bank":e.isQuestionBank,showDownLoad:e.showDownLoad,customFullSreen:e.customFullSreen,audioMode:e.audioMode,isMobile:e.isMobile,audioTime:e.audioTime}}),e.mode==="edit"?n("div",{staticClass:"operations"},[n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return i.stopPropagation(),e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")])]):e._e()],1)]):e._e()],2)}),0):e._e(),e.list&&e.list.length>0&&e.type==="inline"?n("div",[n("ul",{staticClass:"file-list-inline"},e._l(e.list,function(o,r){return n("li",{key:r},[n("img",{staticClass:"svg-img",attrs:{src:e.getFileSvg(o.fileUrl),alt:""}}),n("span",{staticClass:"name"},[e._v(e._s(o.fileName))]),n("span",{staticClass:"size"},[e._v(e._s(e.formatSize(o.fileSize)))]),e.mode==="edit"&&o.progress>=0&&o.progress<100?n("div",{staticClass:"progress-wrapper"},[n("div",{staticClass:"progress-bar"},[n("div",{staticClass:"bar",style:{width:o.progress+"%"}})]),n("span",{staticClass:"progress-value"},[e._v(e._s(o.progress)+"%")]),n("span",{staticClass:"cancel",on:{click:function(i){return e.cancelUpload(o,r)}}},[e._v(e._s(e.t("cancel")))])]):e._e(),e.canPreview&&e.isFileCanPreview(o)&&o.status!==3?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.showPreview(o)}}},[e._v(" "+e._s(e.t("view"))+" ")]):e._e(),o.status===3?n("span",{staticClass:"upload-fail"},[e._v(e._s(o.errMessage))]):e._e(),e.mode==="edit"?n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.deleteFile(o,r)}}},[e._v(" "+e._s(e.t("delete"))+" ")]):n("a",{staticClass:"ul-link",attrs:{href:"javascript:;"},on:{click:function(i){return e.download(o.fileUrl)}}},[e._v(" "+e._s(e.t("download"))+" ")])])}),0)]):e._e()])},Hsn=[],Qsn=Bn(Usn,Vsn,Hsn,!1,null,"f950fdeb");const fc=Qsn.exports,Ksn={obsHost:Hk,uptokenHost:Vle,authorization:no.get("token")||no.get("authorization")};class Gsn{constructor({id:e=0,fileName:n="",fileSize:o="",fileType:r="",fileUrl:i="",srt:a="",avatar:l="",lisCount:s=-1,progress:c=0,status:d=0,markedImage:u="",angle:m=0,location:h,title:p,contentSize:g,type:f}){this.id=e||Uu(),this.fileName=n||p,this.fileSize=o||g,this.fileType=r||f,this.fileUrl=i||h,this.srt=a,this.avatar=l||"",this.lisCount=s,this.progress=c,this.status=d,this.markedImage=u,this.angle=m}handleOldAttach(e){let n={contentSize:e.contentSize||e.fileSize,title:e.title||e.fileName,location:e.location||e.fileUrl,duration:e.duration||0},o="";return n.location&&n.location.length>0&&(o=n.location.substring(n.location.lastIndexOf(".")+1).toLowerCase()),n.mimeType=e.mimeType||o,n.type=e.type||oa(n.location),{...e,...n}}}const Wsn=$e.defineComponent({name:"RichTextarea",components:{TinyFluentEditor:ys,FileList:fc},model:{prop:"value",event:"change"},props:{value:String,list:{type:Array,default(){return[]}},maxNum:{type:Number,default:1},isShowLimitTimes:{type:Boolean,default:!0},actionIndex:{type:Number,default:0},placeholderText:{type:String,default:""},isQuestionBank:{type:Boolean,default:!1},type:{type:Number,default:0}},emits:["change","addFile","deleteFile"],setup(t,{emit:e}){const n=$e.ref(null),o=$e.ref(t.value||""),r=$e.ref(null),i=$e.ref(Uu());$e.onMounted(()=>{const m=r.value.state.quill.getModule("toolbar");n.value=new Gk({...Ksn});const h=document.getElementById("upload");n.value.initUpBtn(h),n.value.onBeforeUpload=p=>{let g=new Gsn({fileName:p.name,fileSize:p.size,fileUrl:p.name,status:1,lisCount:-1}),f=oa(g.fileUrl);p.onProgress=y=>{g.progress=_m(y,2,"floor")},p.onSuccess=()=>{g.fileUrl=p.obsHost+"/"+p.key,g.status=2,f=="image"&&a(`<img src="${g.fileUrl}" devui-editorx-image="true" data-image-id=${g.key} />`)},p.onError=y=>{g.errMessage=ysn(y.code),g.status=3},g.cancel=()=>{n.value.cancelUpload(p)},g.key=Uu(),f!="image"&&e("addFile",g,t.actionIndex)},m.addHandler("image1",function(p){n.value.$el.accept=Bp(["image"]),h.click()}),m.addHandler("video1",function(p){n.value.$el.accept=Bp(["video"]),h.click()}),m.addHandler("audio",function(p){n.value.$el.accept=Bp(["audio"]),h.click()})}),$e.onUnmounted(()=>{var u;(u=n.value)!=null&&u.$el&&n.value.$el.parentNode&&n.value.$el.parentNode.removeChild(n.value.$el)});const a=u=>{if(!r.value)return;const m=r.value.state.quill,h=m.getSelection(),p=h?h.index:0;m.clipboard.dangerouslyPasteHTML(p,u);const g=new DOMParser().parseFromString(u,"text/html").body.textContent.length;m.setSelection(p+g)};$e.watch(o,(u,m)=>{if(t.type==3){const h=/\s*\(\s*\)\s*/g;u=u.replace(h,"(&nbsp;)")}e("change",u)});const l=$e.ref({placeholder:t.placeholderText,modules:{toolbar:[[{font:["yahei","songti","kaiti","heiti","lishu","mono","arial","arialblack","comic","impact","times"]},{size:["12px","13px","14px","15px","16px","17px","18px","19px","20px","22px","24px","26px","29px","32px","36px","40px","48px","72px"]},{lineheight:["1","1.2","1.5","2","2.5","3","4","5"]}],["bold","italic","underline","strike",{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{align:[]}],[{script:"sub"},{script:"super"}],["image1","audio","video1","better-table"]]}});return{content:o,initSrtUploder:(u,m)=>{const h=document.getElementById(u);h&&(console.log("字幕上传按钮已找到",h),h.onclick=()=>{console.warn("字幕上传功能暂时不可用")})},deleteFile:(u,m)=>{e("deleteFile",m,t.actionIndex)},options:l,fluentEditorRef:r,insertContent:a,beforeEditorInit:u=>{const m='<svg t="1734490908682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5918" width="200" height="200"><path d="M1084.416 32c52.288 0 95.296 40.064 99.84 91.136l0.448 9.152v764.288c0 52.288-40.064 95.232-91.136 99.84l-9.152 0.448H132.288a100.288 100.288 0 0 1-99.84-91.2L32 896.64V132.288c0-52.288 40.064-95.296 91.136-99.84L132.288 32h952.128z m-221.568 474.24l-223.808 167.872 87.936 62.336a41.216 41.216 0 0 1 12.992 51.584l-3.392 5.76a41.216 41.216 0 0 1-51.584 12.928l-5.76-3.392-275.2-196.096-290.112 201.856v87.488c0 8.768 5.952 16 14.08 17.92l4.288 0.448h952.128c8.832 0 16-5.952 17.92-14.08l0.448-4.288 3.136-176.448-2.688-1.472a35.2 35.2 0 0 1-4.672-2.944L862.848 506.24z m221.568-392.32H132.288a18.176 18.176 0 0 0-17.92 14.08l-0.448 4.288v579.712l266.368-188.608a40.32 40.32 0 0 1 41.792-3.392l5.376 3.392 141.888 100.928 271.104-203.392a41.28 41.28 0 0 1 46.784-1.792l4.992 3.84 210.56 187.008V132.288a18.176 18.176 0 0 0-14.08-17.92l-4.288-0.448z m-703.296 51.2a144 144 0 1 1-0.128 288.128 144 144 0 0 1 0.128-288.128z m0 69.12c-41.472 0-74.88 33.408-74.88 74.88 0 41.472 33.408 74.88 74.88 74.88 41.472 0 74.88-33.408 74.88-74.88 0-41.472-33.408-74.88-74.88-74.88z" fill-rule="nonzero"></path></svg>',h='<svg t="1734490908682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5918" width="200" height="200"><path d="M992 705.6c-4.992 26.88-14.528 50.88-28.8 72.064-12.032 18.368-30.08 35.008-54.272 49.856-24.128 14.784-56.768 22.208-97.92 22.208-27.008 0-52.48-1.728-76.672-5.248a233.728 233.728 0 0 1-63.872-18.048 128.96 128.96 0 0 1-45.248-33.408 90.688 90.688 0 0 1-20.8-50.304 137.6 137.6 0 0 1 8.512-62.08c7.808-21.504 19.52-41.152 35.2-58.816a188.8 188.8 0 0 1 56.96-43.456 159.36 159.36 0 0 1 72.96-16.96c44.672 0 83.712 7.808 117.12 23.36V141.696L411.648 211.648l4.288 590.4v26.496c0 21.184-4.288 41.856-12.8 62.016a170.56 170.56 0 0 1-35.648 53.504 169.088 169.088 0 0 1-55.36 37.12 182.144 182.144 0 0 1-71.872 13.76c-28.416 0-54.656-2.624-78.784-7.936a234.688 234.688 0 0 1-63.872-23.296 139.072 139.072 0 0 1-44.8-38.144 104.64 104.64 0 0 1-20.16-52.48c-2.176-19.84 0.64-39.04 8.512-57.792 7.808-18.752 19.712-35.52 35.648-50.368 16-14.848 35.2-27.392 57.472-37.632 22.4-10.24 46.72-16.768 72.96-19.584a216.96 216.96 0 0 1 58.56-0.512c19.2 2.432 37.248 6.528 54.272 12.16V127.872L992 31.424v674.176z"></path></svg>',p='<svg t="1734491308472" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3380" width="200" height="200"><path d="M752.384 479.168a40.96 40.96 0 0 1 0 70.464l-205.696 122.88a41.28 41.28 0 0 1-62.08-35.2v-245.76a41.28 41.28 0 0 1 62.08-35.2l205.696 122.88z m-185.536-15.104v100.736l84.736-50.368-84.736-50.368z m534.848 450.88V113.92H114.304v801.024h987.392z m0 81.92H114.304c-45.44 0-82.304-36.672-82.304-81.92V113.92C32 68.672 68.864 32 114.304 32h987.392c45.44 0 82.304 36.672 82.304 81.92v801.024c0 45.248-36.864 81.92-82.304 81.92zM196.544 72.96c0-22.592 18.432-40.96 41.152-40.96 22.72 0 41.152 18.368 41.152 40.96v841.984c0 22.592-18.432 40.96-41.152 40.96a41.024 41.024 0 0 1-41.152-40.96V72.96z m41.152 277.632c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96H73.152a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544z m0 245.76c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96H73.152a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544zM937.152 72.96c0-22.592 18.432-40.96 41.152-40.96 22.72 0 41.152 18.368 41.152 40.96v841.984c0 22.592-18.432 40.96-41.152 40.96a41.024 41.024 0 0 1-41.152-40.96V72.96z m41.152 359.552a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96h-164.544z m0 245.76a41.024 41.024 0 0 1-41.152-40.96c0-22.656 18.432-40.96 41.152-40.96h164.544c22.72 0 41.152 18.304 41.152 40.96 0 22.592-18.432 40.96-41.152 40.96h-164.544z"></path></svg>',g=u.import("ui/icons");g.image1=m,g.audio=h,g.video1=p;const f=u.import("parchment"),y=new f.StyleAttributor("image1","color",{scope:f.Scope.INLINE}),x=new f.StyleAttributor("video1","color",{scope:f.Scope.INLINE}),w=new f.StyleAttributor("audio","color",{scope:f.Scope.INLINE});u.register("formats/image1",y),u.register("formats/video1",x),u.register("formats/audio",w)},containerId:i}}});var Ysn=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"ritchtextarea-container",attrs:{id:e.containerId}},[n("TinyFluentEditor",{ref:"fluentEditorRef",attrs:{"data-type":!1,"data-upgrade":!1,options:e.options,"before-editor-init":e.beforeEditorInit},model:{value:e.content,callback:function(o){e.content=o},expression:"content"}}),n("FileList",{ref:"fileList",attrs:{mode:"edit",type:"block",isPreview:!0,list:e.list,isShowLimitTimes:e.isShowLimitTimes,"is-question-bank":e.isQuestionBank},on:{deleteFile:e.deleteFile}}),n("button",{staticStyle:{display:"none"},attrs:{id:"upload"}})],1)},Xsn=[],Zsn=Bn(Wsn,Ysn,Xsn,!1,null,null);const Wk=Zsn.exports,Jsn=$e.defineComponent({name:"Base",components:{RichTextarea:Wk,FileList:fc,TinyButton:vt},props:{question:{type:Object,required:!0,default:()=>{}},mode:{type:Number,default:0},isQuestionBank:{type:Boolean,default:!1},isSubmitted:{type:Boolean,default:!1}},emits:["blankAnswerChange"],setup(t,{emit:e}){const n=mc(),o=$e.ref(null),r=$e.ref([]),i=$e.computed(()=>{if(t.question.type!==3||!t.question.title)return[{type:"text",content:t.question.title||""}];const h=/\(&nbsp;\)/g,p=[];let g=0,f,y=t.question.title.replace(/^<p>|<\/p>$/g,"");for(;(f=h.exec(y))!==null;)f.index>g&&p.push({type:"text",content:y.slice(g,f.index)}),p.push({type:"blank",content:f[0]}),g=h.lastIndex;return g<y.length&&p.push({type:"text",content:y.slice(g)}),p}),a=$e.computed(()=>i.value.filter(h=>h.type==="blank").length);t.question.record||(t.question.record={}),$e.watch(i,()=>{const h=i.value.filter(p=>p.type==="blank").length;if(h>r.value.length)for(let p=r.value.length;p<h;p++)r.value.push("");else h<r.value.length&&(r.value=r.value.slice(0,h));t.mode==3&&(r.value=t.question.record.answer)},{immediate:!0,deep:!0}),$e.watch(()=>t.mode,h=>{var p,g;try{if(t.question.type==3)if(h==3&&((p=t.question.record)==null?void 0:p.answer.length)>0){const f=(g=t.question.record)==null?void 0:g.answer;Array.isArray(f)?r.value=[...f]:r.value=f.split(";")}else h==2&&(r.value=[])}catch(f){console.error("Failed to parse record answer:",f)}});const l=h=>i.value.slice(0,h).filter(p=>p.type==="blank").length,s=h=>{$e.nextTick(()=>{Gle(h.target,h.target.value)})},c=h=>{t.question.link.push(h)},d=h=>{t.question.link.splice(h,1)},u=()=>{o.value&&o.value.insertContent("(&nbsp;)")};return $e.watch(r,(h,p)=>{e("blankAnswerChange",h),t.question.record&&(t.question.record.answer=h)},{deep:!0}),{t:n,insert:u,richTextareaRef:o,titleParts:i,blankCount:a,userAnswers:r,editWidth:s,checkAnswerCorrect:h=>{var y,x;const p=i.value.slice(0,h).filter(w=>w.type==="blank").length,g=(y=r.value[p])==null?void 0:y.trim();if(!g)return!1;let f=t.question.correctAnswer||[];if(t.question.allowExchange){const w=new Set;return f.forEach(A=>{A!=null&&A.trim().includes("//")?A.split("//").map($=>$.trim()).forEach($=>w.add($)):A!=null&&A.trim()&&w.add(A.trim())}),w.has(g)}else{const w=(x=f[p])==null?void 0:x.trim();return w&&w.includes("//")?w.split("//").map(E=>E.trim()).includes(g):w===g}},blankIndex:l,addTitleFile:c,deleteTitleFile:d}}});var eln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{staticClass:"base-container"},[e.mode==2||e.mode==3?[e.question.type==3?n("div",{staticClass:"completion-preview"},[e.mode==2?n("div",{staticClass:"preview-title"},[e._l(e.titleParts,function(o,r){return[o.type==="text"?n("span",{domProps:{innerHTML:e._s(o.content)}}):n("div",[n("span",{staticClass:"blank-index"},[e._v("["+e._s(e.blankIndex(r)+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.userAnswers[e.blankIndex(r)],expression:"userAnswers[blankIndex(index)]"}],staticClass:"completion-input",class:{"answer-correct":e.mode===3&&e.isSubmitted&&e.checkAnswerCorrect(r),"answer-error":e.mode===3&&e.isSubmitted&&!e.checkAnswerCorrect(r)},staticStyle:{margin:"0 2px"},attrs:{type:"text",disabled:!0},domProps:{value:e.userAnswers[e.blankIndex(r)]},on:{input:[function(i){i.target.composing||e.$set(e.userAnswers,e.blankIndex(r),i.target.value)},e.editWidth]}})])]})],2):e._e(),e.mode==3?n("div",{staticClass:"preview-title"},[e._l(e.titleParts,function(o,r){return[o.type==="text"?n("span",{domProps:{innerHTML:e._s(o.content)}}):n("div",[n("span",{staticClass:"blank-index"},[e._v("["+e._s(e.blankIndex(r)+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.userAnswers[e.blankIndex(r)],expression:"userAnswers[blankIndex(index)]"}],staticClass:"completion-input",class:{"answer-correct":e.mode===3&&e.isSubmitted&&e.checkAnswerCorrect(r),"answer-error":e.mode===3&&e.isSubmitted&&!e.checkAnswerCorrect(r)},staticStyle:{margin:"0 2px"},attrs:{type:"text",disabled:e.mode==3&&e.isSubmitted},domProps:{value:e.userAnswers[e.blankIndex(r)]},on:{input:[function(i){i.target.composing||e.$set(e.userAnswers,e.blankIndex(r),i.target.value)},e.editWidth]}})])]})],2):e._e(),e.question.allowExchange?n("div",{staticClass:"can-exchange"},[e._v("*"+e._s(e.t("answerCanChangeTip")))]):e._e()]):n("div",{staticClass:"preview-title",domProps:{innerHTML:e._s(e.question.title||"")}}),n("FileList",{attrs:{mode:"view",type:"block",isPreview:!0,list:e.question.link},on:{deleteFile:function(o){}}})]:n("RichTextarea",{ref:"richTextareaRef",attrs:{placeholderText:e.t("inputQuestionTitle"),list:e.question.link,maxNum:5,"is-question-bank":e.isQuestionBank,type:e.question.type},on:{addFile:e.addTitleFile,deleteFile:e.deleteTitleFile},model:{value:e.question.title,callback:function(o){e.$set(e.question,"title",o)},expression:"question.title"}}),e.question.type==3&&e.mode==1?n("TinyButton",{staticClass:"insert-blank",on:{click:e.insert}},[e._v(" "+e._s(e.t("insertQue"))+" ")]):e._e(),e._t("default")],2)},tln=[],nln=Bn(Jsn,eln,tln,!1,null,"549bd002");const jf=nln.exports;class so{constructor({id:e,questionId:n="",type:o=0,title:r="",score:i=1,correctAnswer:a=[],reply:l="",record:s={},lisCount:c=-1,link:d=[],analyLinkList:u=[],answerlink:m="",correctChoiceIds:h=[],tags:p=[],hardlevel:g=3,knowledgeDTOS:f=[]}){this.id=e||n,this.questionid=this.id,this.type=o,this.title=r,this.score=i,this.correctAnswer=a,this.reply=l,this.record=new oln(s),this.lisCount=c,this.link=d||[],this.analyLinkList=u||[],this.answerlink=m,this.correctChoiceIds=h,this.tags=p||[],this.hardlevel=g,this.knowledgeDTOS=f||[]}scoring(){console.error("子类自行实现接口")}getOption(e){return String.fromCharCode(65+e)}getAnswer(){const e=this.record.answer;return e&&e.length>0?e[0]:""}getCorrectAnswer(){}}class oln{constructor({id:e="",answer:n=[],attachments:o=[],grade:r,reply:i="",remark1:a=""}){this.id=e,this.answer=n,this.attachments=o,this.score=r,this.reply=i||a}}let Rp=class{constructor({id:e="",questionID:n="",choiceId:o=0,text:r="",attachments:i=[],record:a={}}){this.id=e||n,this.choiceId=o,this.text=r,this.attachments=i,this.record=a}};class rln extends so{constructor(e){super(e),this.choices=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new Rp({id:Math.random(),choiceId:o.choiceId||0,text:o.title,attachments:o.link?[{fileUrl:o.link}]:[]}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new Rp({id:Math.random(),text:""}))}scoring(){}createChoice(){this.choices.push(new Rp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}getAnswer(){return Array.isArray(this.record.answer)?this.record.answer.join(""):this.record.answer}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join(""):this.correctAnswer}handleAnswer(e,n){if(!e||this.getAnswer().length===0)return"";const o=this.getOption(n),r=this.correctAnswer&&this.correctAnswer.includes(o);return this.record.answer&&this.record.answer.includes(o)?r?"correct":"error":r&&this.type===2?"no-select error":""}}let qb=class{constructor({id:e="",correctAnswer:n=""}){this.id=e,this.correctAnswer=n}},iln=class extends so{constructor(e){super(e),this.allowExchange=e.allowExchange||e.blankOrder||e.blackOrder||0,this.blanks=[];let n=0;this.title.replace(/[((](\s|&nbsp;)+[))]|_{5,}/gi,()=>{this.createBlank(),this.blanks[n].correctAnswer=this.correctAnswer[n],this.blanks[n].blankIndex=n+1,n++}),this.oldNums=this.blanks.length}createBlank(){this.blanks.push(new qb({id:Math.random(),correctAnswer:""})),this.correctAnswer.length<this.blanks.length&&this.correctAnswer.push("")}deleteBlank(e,n=1){this.blanks.splice(e,n),this.correctAnswer.splice(e,n)}createBlankByIndex(e,n){let o=new qb({id:Math.random(),correctAnswer:""});o.blankIndex=n,this.blanks.splice(e,0,o),this.correctAnswer.splice(e,0,"")}};class aln extends so{constructor(e){super(e)}scoring(){}getAnswerResult(e){return e&&e.length>0&&e[0]?e[0].toLowerCase()==="true"||e[0]===!0:""}handleAnswer(e,n){const o=this.getAnswerResult(this.record.answer)===n;if(!e)return o?"select":"";const r=this.getAnswerResult(this.correctAnswer)===n;return o?r?"correct":"error":""}}class sln extends so{constructor(e){super(e),this.answerLinkList=e.answerLinkList||[],this.answerLinkList.length==0&&this.answerlink&&this.answerLinkList.push({fileUrl:this.answerlink})}scoring(){}getAnswer(){return(this.record.answer.join("")||"").trim()}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer[0]:this.correctAnswer}}class lln extends so{constructor(e){super(e),this.subQuestions=[];for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];o.type=1,o=zf(o),o.qIndex=n+1,this.subQuestions.push(o)}this.oldNums=this.subQuestions.length}scoring(){}createSubQuestion(){this.subQuestions.push(ec(1))}deleteSubQuestion(e,n){this.subQuestions.splice(e,n||1)}createSubQuestionByIndex(e,n){let o=ec(1);o.qIndex=n,o.isNew=1,this.subQuestions.splice(e,0,o)}getAnswerText(e){if(e.correctAnswer.length===0)return"";let n=e.correctAnswer[0].charCodeAt(0)-65;return e.choices[n].text}}let jp=class{constructor({id:e="",text:n="",option:o="",attachments:r=[]}){this.id=e,this.text=n,this.option=o,this.attachments=r}};class cln extends so{constructor(e){super(e),this.choices=[],this.subQuestions=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new jp({id:Math.random(),text:o.title}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new jp({id:Math.random(),text:""}));for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];o=zf(o),o.qIndex=n+1,this.subQuestions.push(o)}this.oldNums=this.subQuestions.length}scoring(){}createChoice(){this.choices.push(new jp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}createSubQuestion(){this.subQuestions.push(ec(1))}deleteSubQuestion(e,n){this.subQuestions.splice(e,n||1)}createSubQuestionByIndex(e,n){let o=ec(1);o.qIndex=n,o.isNew=1,this.subQuestions.splice(e,0,o)}getAnswerText(e){if(e.correctAnswer.length===0||!e.correctAnswer[0])return"";let n=e.correctAnswer[0].charCodeAt(0)-65;return this.choices[n].text}getAnswer(){return Array.isArray(this.record.answer)?this.record.answer.join(""):this.record.answer}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join(""):this.correctAnswer}handleAnswer(e,n){if(!e)return"";const o=this.getOption(n),r=this.correctAnswer&&this.correctAnswer.includes(o);return this.record.answer&&this.record.answer.includes(o)?r?"correct":"error":""}}class uln extends so{constructor(e){super(e),this.subQuestions=[];for(let n=0;e.subQuestions&&n<e.subQuestions.length;n++){let o=e.subQuestions[n];this.subQuestions.push(zf(o))}}scoring(){}createSubQuestion(e){let n=ec(e);n.isEdit=!0,n.isNew=1,this.subQuestions.push(n)}deleteSubQuestion(e){this.subQuestions.splice(e,1)}}let zp=class{constructor({id:e="",text:n="",option:o=""}){this.id=e,this.text=n,this.option=o}};class dln extends so{constructor(e){super(e),this.choices=[];for(let n=0;e.item&&n<e.item.length;n++){let o=e.item[n];this.choices.push(new zp({id:Math.random(),text:o.title}))}if(this.choices.length===0)for(let n=1;n<=4;n++)this.choices.push(new zp({id:Math.random(),text:""}))}scoring(){this.record.score=0}createChoice(){this.choices.push(new zp({id:Math.random()}))}deleteChoice(e,n){this.choices.splice(n,1)}getAnswer(){const e=Array.isArray(this.record.answer)?this.record.answer:[this.record.answer];return e.filter(o=>o&&o.length>0).length>0?e.join("-"):""}getCorrectAnswer(){return Array.isArray(this.correctAnswer)?this.correctAnswer.join("-"):this.correctAnswer}handleAnswer(e,n){return e&&this.record.answer&&this.record.answer[n]?this.correctAnswer[n]===this.record.answer[n]?"correct":"error":""}}class pln extends so{constructor(e){super(e)}scoring(){}getAnswer(){return this.record.answer.join("")||""}}class hln extends so{constructor(e){super(e)}scoring(){}}class Fb{constructor({name:e="",precision:n,max:o,min:r}){this.name=e,this.precision=n||1,this.max=o,this.min=r}}class Up{constructor({formula:e="",answerRange:n=0,precision:o=1}){this.formula=e,this.answerRange=n,this.precision=o}}class mln extends so{constructor(e){super(e),this.variables=[],this.blanks=[],this.scope={},this.desc1=e.desc1;try{for(let o=0;e.formulaVar&&o<e.formulaVar.length;o++){let r=e.formulaVar[o];this.variables.push(new Fb(r)),r.value!==void 0&&(this.scope[r.name]=r.value)}}catch(o){console.log(o)}let n=0;this.title.replace(/[((](\s|&nbsp;)+[))]|_{5,}/gi,()=>{let o={};const r=this.correctAnswer[n];r&&(o=typeof r=="string"&&r.length>0?JSON.parse(r):r);let i=new Up(o);i.blankIndex=n+1,this.blanks.push(i),n++}),this.oldNums=this.blanks.length}createVariable(e){this.variables.push(new Fb({name:e}))}deleteVariable(e){for(let n=0;n<this.variables.length;n++)if(this.variables[n].name===e){this.variables.splice(n,1);return}}createBlank(){this.blanks.push(new Up({}))}deleteBlank(e,n){this.blanks.splice(e,n||1)}createBlankByIndex(e,n){let o=new Up({});o.blankIndex=n,this.blanks.splice(e,0,o)}initVariables(e){let n={};for(let o=0;o<this.variables.length;o++){let r=this.variables[o],i=r.min*1+Math.random()*(r.max-r.min);i=new Number(i);let a=0;r.precision!=1&&(a=(Math.round(.1/r.precision)+"").length),i=i.toFixed(a);let l=new RegExp("\\>"+r.name+"\\*\\<","g");e=e.replace(l,">"+i+"<"),n[r.name]=i}return this.scope=n,e}initDomVariables(e){for(let n in this.scope){let o=new RegExp("\\>"+n+"\\*\\<","g");e=e.replace(o,">"+this.scope[n]+"<")}return e}checkAnswer(e){let n=[];for(let i=0;i<this.blanks.length;i++)n.push({text:this.record.answer[i]||""});let o={scope:this.scope,answerResult:[]},r=0;for(let i=0;Object.values(this.scope).length>0&&i<n.length;i++)if(n[i].text&&n[i].text.trim().length>0){let a=this.blanks[i],l=a.formula,s=e.format(e.evaluate(l,this.scope),{precision:14})*1,c=n[i].text*1,d=0;a.precision!=1&&(d=(Math.round(.1/a.precision)+"").length),s=s.toFixed(d)*1,c=c.toFixed(d)*1,c>=s-a.answerRange*1&&c<=s+a.answerRange*1?(o.answerResult[i]=!0,r++):o.answerResult[i]=!1}else o.answerResult[i]=!1;this.record.extraAnswer=o,this.record.grade=this.score*(r/this.blanks.length),this.checkResult=o.answerResult}}function gc(t){let e=null;switch(t.type){case 1:case 2:e=new rln(t);break;case 3:e=new iln(t);break;case 4:e=new aln(t);break;case 5:e=new sln(t);break;case 12:e=new dln(t);break;case 11:case 23:e=new lln(t);break;case 17:e=new cln(t);break;case 16:e=new pln(t);break;case 19:e=new hln(t);break;case 24:e=new uln(t);break;case 25:e=new mln(t);break;default:e=new so(t)}return e}function ec(t){let e=gc({id:Math.random(),type:t});return e.key=Math.random(),e}function zf(t){if(t.id=t.id||t.questionid,t.allowExchange=t.allowExchange||t.blankOrder||t.blackOrder||0,t.correctAnswerAndReplay){let{correctAnswer:e,correctReplay:n,correctChoiceIds:o}=t.correctAnswerAndReplay;t.correctAnswer=e||t.correctAnswer,t.reply=n||t.reply,t.correctChoiceIds=o||[]}else t.correctAnswer=t.correctAnswer||t.correctanswer,t.reply=t.reply||t.correctreply;return t.correctAnswer=t.correctAnswer||t.correctanswer,t.reply=t.reply||t.correctreply,t.subQuestions=t.questionlist||t.subQuestions,t.subQuestions&&t.subQuestions.length>0&&(t.score=0,t.subQuestions.forEach((e,n)=>{e.score=e.score===0||e.score>0?Number(_m(e.score,2)):1,t.score+=e.score})),t.score=t.score===0||t.score>0?Number(_m(t.score,2)):1,t.type==25&&!t.formulaVar&&t.desc1&&(t.formulaVar=JSON.parse(t.desc1)),gc(t)}const Yk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydWawsVRWGj/MMzgIKgoCKODGqiIhMivOEPvigbxqJcYgGjJpANBEhEeODxieNMSYoogKigKCgqAiCE06IIqA4oSLiBA7/1zfFOefe7hp3rdpV9Zu1uqq7au+117/XV6vv9ZzLndf8PytgBVYqYEBWSuMLVmBtzYC4CqxAiQIGpEQcX7ICBsQ1YAVKFOgRkJKovmQFRqKAARnJRnmZwyjQFpCjtNzj5KfJfya/WX6+/L3yV8m3l9usQKQC1NyrFfAD8ovkt8h/JP+o/M3yI+WNrSkg91CEk+Xnyk+Sv0K+p3w7+RHy4+WfkF8gP1puswIRClBr1NzHFOyN8kPk95XvJX+N/P3y8+TULjWs03rWBJDDNOWF8rfJq2w/3XCO/N1ymxXoUwFqjFqj5qriULvUMLVcde/iel1A3qS7IfQgHZvYO3Xzp+RpzbNZgS0KUFvU2JZ39V6pYWr5tXVurwPI/proVHlbO0YDSUQHmxVIpgA1RW21nfB9GriDvNTqAHJK6Qz1LpIICdW723dZgXIFqCVqqvyu8qv8ob6y+1QBcoJiHCpPYSREYinm8hzzVYAaopZSKHCsJuFvZHVYblWA7L18WOtPSYwEW0/ggbNWgNqhhlKKsE/ZZFWA8OePsvFtrpEgibYZ2/sYB8hWAWqG2km9wH3LJiwDZEcN3FXeh5EoCfcxt+ecngLUCjXTR2atOwiA9LGgYk4SJvHivY9WYJkC1Ai1suxais9K67ysg3xf0W+T92kkjgB9xvDc41WA2qBG+szgirLJywC5XQO/Le/bEAAh+o7j+celADVBbfS96ivLApQBwrjv8RLgCIEgAaEGC+HA9RWgFqiJ+iPa39kJEH5al07SPnz9kQiCMPVH+M4pKkANUAsRuf1YQc6Wr7SqDnKxRr5LHmUIg0BR8RwnLwXYe2ogalX8RPpNZcGqAGEsk5zFSZAjEEIFhXOYTBRgz9n7qOUQ7+NVweoAwhz8nsdVnAQ5QpFAUDiHGVgB9po9j1oGtXxinWB1AeE3s/jlKCauM2+KexAM4VLMNfE5Rp0ee8xeRyVBDVPL1HRlzLqAMBETMjEBeB/hCIeAEbEcI14B9pY9jor8QwUiHrWs02prAgizMbEhQQl7VwWGgIPa5W+uaq+9KSBMbEhQwd5FgWg4fqDF0jkawaExrf/pUUOCevY2CkTDwY9M0Tl+0maxbTpIEceQFEpM+Zg2t1HBQepdAGG8IUEFex0FouHgx6ToHD+ts7hV93QFhHkNCSrYyxQYJRwklAIQ5jEkqGBfpkA0HN/VIvgDOf/ip067WSpAWIUhQQX7RgWGgIOvVVdvXESX85SAsA5Dggp2FKiEg5sSOj+2TudIBgdrSw0IcxoSVJi3DwEHnePnqWXvAxDWaEhQYZ4eDQe/MkvnSA4H29cXIMxtSFBhXh4Nx3ckL53jGh17sT4BYcGGBBXm4ZODg23rGxBiGBJUmLZHw3G55ORr1S90XGbJPosAhMUaElSYpg8BB1+rfhkhZxQg5GJIUGFaHg3HZZKPzhECh2K1/mlexrZxQ9JGtTzHDAEHnePaSDkiO0iRlyEplBjvMRoO/gFDOkcoHGzPEIAQ15Cgwjg9Go5LJROd41c6htu2gMQtwZDEaZ0q0qzgQLQhASG+IUGFcXg0HN+SLHSO63QczIYGhMQNCSrk7bOEgy3JARDWYUhQIU+PhuObkoE/kF+v4+CWCyAIYUhQIS8fAg6+Vt2QiwyhgNRI2pDUECnolmg4vqG86BzZwKH1hP8fhcSsckNSpVD/14eAg87x6/5TaxYhtw5SrN6QFErEH6PhuEQp0jmyg0PryrKDsC7ckKBCrEfD8XWlR+f4jY5ZWq4dpBDLkBRK9H80HEs0zh0QllwHEu5L6bR8CiblnDnPRa7kHLXGrykQ8W7UMWsbAyAIaEhQoR8fAg6+Vv22n3TSzjoWQMjakKBCWo+Gg//mJZ1jFHAg9ZgAYb2GBBXS+BBw0Dl+l2b5MbOMDRBUMSSo0M2j4bhIy6VzjAoOrTnrv+Zlfas8EJI7lsAGU1h3fDDSE3Igl6jlAwed4/dRAVPGGWMHKfI3JIUS9Y/RcHxVSwPGUcKhtY+2g7B23JCgQj2PhuMrWhad4w86jtbG3EEK0Q1JocTqo+FYrU3plSkAQoKGBBWWezQcF2oZfK36o46jt6kAwkaMDxJW3a8PAQdfq27qN6242acECKoZElTY4tFwXKCwdI7JwKF8Rv+HdHLY2g3J2toQcNA5/rT1Zoz9/dQ6SLEfc4YkGo4vS/Rj5JODQzlNsoOQFz5HSKLhOF9C0zn+rOMkbaodpNisOUGyCY5CgB6Pk4cD7aYOCDnOAZJoOM6TsHyt+ouOk7Y5AMIGThmSIeDga9XNCDt1nwsg7OMUIYmG41wJSeeYBRzKddJ/SCe/rX1KkAwBB53jr1uLOuX3c+ogxT5OAZJoOL4k8egcwKHT+dgcAWF3xwzJEHDQOW5BuLn5XAFhn8cISTQcX5RQdI5ZwqHcZ/dnEHLe6GOCJBqOcyQUneNvOs7W5txBik0fAySGo9it4KMB2SJ4zpBEw/EFScLXqlt1DLb8whmQ9T3JEZIh4OBr1d/XZZn3mQHZvP85QRINx9mSgs5hOCREYQakUGL9mAMkQ8BB5/jHugw+QwEDggrb+pCQRMNxltKncxgOCbG1GZCtFVl/PxQkFOv6Kvo9Aw46xz/7DZPB7C2XYEDKhRsCkvIVpbt6pqYCRsMhIVaZAVmlzPrnU4Tk80oPOP6lo61EAQNSIs6GS1OCBDj4WvXvDfn5dIUCBmSFMEs+ngIkn1NedA7DISHqmAGpo9L6PWOGBDjoHLetp+OzKgXqAFI1x9yujxGSz2qT6ByGQ0I0MQPSRK31e8cECXDQOW5fX77P6ipgQOoqte19Y4DkDC2bzmE4JEQbMyBtVFsfkzMkwEHn+M/6cn3WVAED0lSxbe/PEZLPaJl0DsMhIbrYwIB0WXpWY3OC5HQpAxz/1dHWUQED0lHADcNzgAQ4+Fr1vw3r8mkHBQxIB/GWDB0Skk9rPXQOwyEhUpkBSaWk55mkAgYk7bY+TtPx+xx76xhtdA9iR8eddLzpAhK/bXsp5GnyIeBQ2IUZkoUM6V4MSBotgYOn9+PTTNdpFkPSSb7Ngw3IZj3avHusBtE5coBDS1mYIVnI0P3FgHTT8DEaDhxP0DE3MyQJdsSAtBcROPha9cT2U/Q+0pB0lNiAtBBQQx4tp3PkDIeWuDBDspCh3YsBaa4bcNA5ntR86GAjDElL6Q1IM+H21O10jjHBoSUvzJAsZGj2YkDq6wUcdI4n1x+S3Z2GpOGWGJB6gu2h2+gcY4ZDKSzMkCxkqPdiQKp12l23AMc+OvZtUfMbkppKG5ByoYCDr1X7lt82yquGpMa2GZDVIj1Kl+gckXBcpZi4DiFmSCpkNiDLBQIOOsd+yy/38ilg8MtOOOe9BFkyqSFZIkrxkQEplFg/7qZTOscQcPALV7gh0SbkYAZk8y4AB51j/80f9/qObgEQgFEE4pzPuFZ81vFYOdydZIlEBmRdlF11SucYGg4tY2GGZCHDsC8GZIv+wEHnOGDL25BXugNdAhBWBeQa93DvqntSf+5OskFRA7K29kjpQefIDQ4ta2GGZCHDMC9zB2QXyQ4cB+oYZXQDugKFXzcm9zKGsXXHdL3PnUQKzhkQ4OBr1VOkQ5RR4BQ6Bd80JmMYyxxNx7a9vx4kbWcfwbi5ArKz9obOMRY4tNyFGZKFDHEvcwQEOOgcT42TeY2nPk9/CrxrWOZgLubsOlfd8bPtJHMD5BGqCDrHWOHQ8hdmSBYy9P8yJ0CAg87xtP5lvSMCT3me9hT0HR8mOmFO5iZGoikrp5ldJ5kLIA/X1tM5pgKH0lnY5CFZZDngyxwAAQ46x0GBOvNU5+lOAfcdlhjEImbfsYr5Z9NJpg7ITtpROsdU4VB6CzMkCxnSv0wZkB0lF3A8Xcco4ynO05yCjYpZxCEmsVlD8Vnfx8l3kqkCAhx8rTq47wrZMD+FSYFSqBs+Dj0lNmtgLVGBJw3JFAHZQZVB55gbHEp7YYZkIUPlS60bpgYIcNA5nlEr+zQ38bTmqU1hppmx+yyshTWxtu6z1Zthkp1kSoA8TPtI55g7HJJhYYZkIUO3l6kAAhx0jkO6ydFoNE9nntIUYqOBgTezNtbIWqPCTqqTTAGQh2rn6RyGQ0IsMUOyRJS6H40dkIcoUTrHM3WMMp7GPJUpvKiYXeOwVtbM2rvOVXf8JDpJO0DqStTvfYajmb6GpJlei7vHCsiDtXq+Vh2qY5Tx9OUpTKFFxUwdh7WTA7mknnvVfKPuJGMEBDj4WvWsVTvSw+cUFIVFgfUwfeiU5EAu5BQVeLSQjA2QB2lH6RyGQ0J0MENSU7wxAQIcdI7DauaW4jaesjxtKagU8+U0BzmRGzlGrWt0nSQ7QFbs1AP1OZ3DcEiIhGZIKsQcAyDAQec4vCKXlJd5qvJ0pYBSzpvjXORIruQctb7RdJLcAXmAdozOYTgkRI9mSFaImzMg99ea6RxH6BhlPEV5mlIwUTFziUPO5I4GUWvKvpPkCojhiCrRzXEMyWY91nIEZHutka9VR+qY0srm4qnJ05MCKbtvDtfQAC3QJCrfbDtJboAAB1+rjoraGcWhECgICkNvbVIALdAEbfQ2xLKEJCdAttM20DkMh4TIwAyJNiEXQICDzvFsrSnKeDrylKQQomKOLQ7aoBFaRa09q06SAyD3k/J0DsMhITK0WUMyNCD3VUHQOZ6jY5TxNOSpyMYnijn5adAKzdAuKtksOsmQgBiOqFJLE2eWkAwFyH20Z3ytOlrHKOPpx1OQjY6KObU4aIeGaBmV26CdZAhAgIOvVc+NUlhx2FA2lg3WW1sHBdAQLdG0wzSNhg4GSTQg95YsdA7DISFGbLOBJBIQ4KBzPC+wMHjK8bRjQwPDJgyV71RoirZoHLXK8E4SBci9pCCdw3BIiAnZ5CGJAAQ46BzPDywMnmo83djAwLCzDIXGaI3mUQKEdZK+AbmnFKNzGA4JMWGbLCR9AnIPFQSd4wU6RhlPMZ5mbFhUTMfZogCaoz17sOWT/l977yR9AWI4+i+OzhF6mGBykPQByN0lPF+rXqhjlPHU4unFBkXFdJzlCrAH7AV7svyO9J/21klSAwIcfK16UXoNVs7IRrAhbMzKm3whVAH2gj1hb6IC9wJJSkDuJiXoHIZDQtjWJgFJKkCAg87x4sDC4OnEU4qNCAzrUA0UYG/YI/aqwbBOtybtJCkAuavSoXMYDglhWyiw8WXUkHQFBDjoHC/ZqEjP5zyNeCohfM+hPH0iBdgr9oy9SzRl5TRJOkkXQO6iJdI5DIeEsFUqMEpI2gLCODrHSytlSXcDTx+eQgidblbPFKkAe8cespdRcTt1Egq96UIZYziaqub7CwVGBQnFXiy8zvFOd3Og1wAAAx9JREFUuomvVS/TMcp42vDUQdiomI7TrwLsJXvK3jaM1Pr2Vp2kCSDAQed4eeslNh+IgAiJoM1He0TOCrCn7C17HLXOxpA0AYTOYTiitnIecbKHpC4gH9R+QZ8OIcZThacLAoYEdJDBFGCP2Wv2PGoR1PIpdYLVAeSVmugN8ihDKARDuKiYjjOsAuw1e87eR63krQpU+V9JrgJkZ03yHnmUIRBCIVhUTMfJQwH2nL2nBqJWdPymQEveVAHyeo3ZQx5hCINACBURzzHyU4C9pwaohYjV8c/dlv5/eVWA7BKxSsVAEIRBIL21zVgBaoBaoCYiZNi3LEgVILuXDU50DSEQBGESTelpRq4AtUBNUBt9p7JPWYAqQPYsG5zgGgIgBIIkmM5TTEgBaoLaoEb6TKsTIH0ujMQRACH6jOO5x6sAtUGNUCuDZFHVQa6uuaqmt5EwiSNA07G+f14KUCPUCjXTR+ZXlk1aBcg1ZYNbXiNREibxllN42MwUoFaoGWondeqdALku8WpIkERJOPHUnm7iClAz1A41lDLVK8omq+ogH9bga+UpjMRIkERTzOc55qcAtUMNUUspsj9bk5whX2lVgNBB3rFydP0LJERiJFh/lO+0AtsqQA1RS9TUtlebfVL5UyJVgBDuk3qhk+jQykiEhEisxQQeYgW2UYBaoqaorW0u1vzgZN13qbzU6gDCBPzIyVt0cqu8iZ2lm0mEhHRqswLJFKCmqC1qrMmk1DC1fFydQXUBYa5T9XK4/Hx5ld2uG94u558fJRGd2qxAcgWoLWqMWqPmqgJQu9QwtVx17+J6E0AYQEs6Sicnys+UXy8v7DadXCL/kJxFnKSjzQpEKECtUXMfUbDL5Bth4S+ZTtdnJ8ipXWpYp/WsKSDFrATjnxjlhxn5kfj9dIH/xNrBOh4rv1huswKRClBzr1PAA+X8R5sO0HEn+W5yfkGKh7pOm1lbQDZGuUFv+LvkjdTqoxGYlzhVBajFy5XcjfJOlgKQTgvwYCuQswIGJOfd8doGV8CADL4FXkDOChiQnHfHaxtcAQPS0xZ42mko8H8AAAD//4/S4zYAAAAGSURBVAMApkn0vv0gIcoAAAAASUVORK5CYII=",fln="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='18'%20height='18'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.57917%2015.9145C8.70747%2016.0428%208.8824%2016.1134%209.06382%2016.1102C9.43813%2016.1092%209.74175%2015.8068%209.74422%2015.4325V9.67071H15.5051C15.8805%209.66972%2016.1845%209.36568%2016.1855%208.99031C16.1887%208.8089%2016.118%208.63397%2015.9897%208.50567C15.8614%208.37737%2015.6865%208.30671%2015.5051%208.30991H9.74422V2.57151C9.74422%202.19574%209.43959%201.89111%209.06382%201.89111C8.68804%201.89111%208.38342%202.19574%208.38342%202.57151V8.30991H2.645C2.26923%208.30991%201.9646%208.61454%201.9646%208.99031C1.9646%209.36609%202.26923%209.67071%202.645%209.67071H8.38342V15.4298C8.38021%2015.6112%208.45087%2015.7862%208.57917%2015.9145ZM8.38342%209.67071H9.74422V8.30991H8.38342V9.67071Z'%20fill='%23529FFF'/%3e%3c/svg%3e",gln=$e.defineComponent({name:"Choice",components:{TinyButton:vt,TinyRadioGroup:Xi,TinyRadio:to,TinyCheckboxGroup:Gr,TinyCheckbox:En,FileList:fc,Base:jf,RichTextarea:Wk},props:{oriQuestion:{type:Object,required:!0,default:()=>({type:1,choices:[],correctAnswer:null,record:{answer:null}})},mode:{type:Number,default:1,validator:t=>[1,2,3].includes(t)},needRichText:{type:Boolean,default:!0},isSubmitted:{type:Boolean,default:!1},showAnswer:{type:Boolean,default:!1}},emits:["save","cancel","change"],setup(t,{emit:e}){const n=mc(),o=$e.ref(null),r=$e.ref({}),i=$e.ref(""),a=$e.ref([]),l=$e.ref(),s=()=>{var A,E,$,B;t.mode===3?(A=r.value.record)!=null&&A.answer?r.value.type===1?(i.value=r.value.record.answer,l.value=r.value.record.answer):(a.value=Array.isArray(r.value.record.answer)?r.value.record.answer:((E=r.value.record.answer)==null?void 0:E.split(","))||[],l.value=Array.isArray(r.value.record.answer)?r.value.record.answer:(($=r.value.record.answer)==null?void 0:$.split(","))||[]):(i.value="",a.value=[]):r.value.correctAnswer?r.value.type===1?i.value=r.value.correctAnswer[0]:a.value=Array.isArray(r.value.correctAnswer)?r.value.correctAnswer:((B=r.value.correctAnswer)==null?void 0:B.split(","))||[]:(i.value="",a.value=[])};$e.watch(()=>t.oriQuestion,A=>{r.value=gc(A),s(),console.log(r.value,"--------Choice--------",A)},{immediate:!0}),$e.watch([()=>t.mode,()=>t.isSubmitted],()=>{s()});const c=A=>String.fromCharCode(65+A),d=A=>A?Array.isArray(A)?A.join(","):A:"-",u=A=>{var W;if(t.mode!==3||!t.isSubmitted)return"";const E=c(A),$=((W=r.value.record)==null?void 0:W.answer)||"",B=r.value.correctAnswer||"",q=Array.isArray($)?$:($==null?void 0:$.split(","))||[],P=Array.isArray(B)?B:(B==null?void 0:B.split(","))||[],N=q.includes(E),D=P.includes(E);return D&&N?"correct":!D&&N?"wrong":D&&!N?"missed":""},m=()=>{t.mode===1&&(r.value.choices.length<20?h():console.warn(n("optionLimit")||"选项数量已达上限(20个)"))},h=()=>{r.value.choices||(r.value.choices=[]),r.value.choices.push({id:Date.now(),text:"",attachments:[]})},p=A=>{t.mode===1&&t.needRichText&&(o.value=A)},g=(A,E)=>{t.mode===1&&r.value.choices[E].attachments.splice(A,1)},f=(A,E)=>{console.log(A,E,r.value,"question.valuequestion.value"),t.mode===1&&r.value.choices[E].attachments.push(A)},y=(A,E)=>{if(t.mode===1)if(r.value.choices&&Array.isArray(r.value.choices)&&r.value.choices.length>2){if(r.value.choices.splice(E,1),r.value.correctAnswer){const B=(Array.isArray(r.value.correctAnswer)?r.value.correctAnswer:r.value.correctAnswer.split(",")).filter(q=>{const P=q.charCodeAt(0)-65;return P!==E&&P<r.value.choices.length});r.value.correctAnswer=r.value.type===1?B[0]||"":B}}else console.warn(n("atLeastTwo")||"至少需要两个选项")},x=()=>{if(t.mode!==1)return;if(!r.value.correctAnswer){console.warn(n("pleaseSetCorrectAnswer")||"请设置正确答案");return}const A=JSON.parse(JSON.stringify(r.value));e("save",A)},w=()=>{e("cancel")};return $e.watch(i,A=>{r.value.type===1&&(t.mode===1?r.value.correctAnswer=A:t.mode===3&&(r.value.record||(r.value.record={}),r.value.record.answer=A,e("change",r.value)))}),$e.watch(a,A=>{r.value.type===2&&(t.mode===1?r.value.correctAnswer=A:t.mode===3&&!t.isSubmitted&&(r.value.record||(r.value.record={}),r.value.record.answer=A,e("change",r.value)))}),{t:n,question:r,radioAnswer:i,checkboxAnswer:a,getOption:c,formatAnswer:d,handleAnswerClass:u,addChoice:m,saveQuestion:x,cancel:w,createChoice:h,activeIndex:o,activeRichText:p,deleteFile:g,addFile:f,deleteChoice:y,userAnswer:l}}});var vln=function(){var o;var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{staticClass:"choice-container",attrs:{question:e.question,mode:e.mode}},[e.mode===1?n("div",{staticClass:"edit-mode"},[n("div",{staticClass:"choice-list-base"},[e._l(e.question.choices,function(r,i){return n("div",{key:r.id},[n("div",{staticClass:"choice-item"},[n("span",{staticClass:"choice-option"},[e._v(e._s(e.getOption(i)))]),e.activeIndex===i?n("RichTextarea",{staticClass:"choice-input-wrap",attrs:{placeholder:e.t("optionContent"),list:r.attachments,isShowLimitTimes:!1,actionIndex:i,placeholderText:e.t("optionContent")},on:{addFile:e.addFile,deleteFile:e.deleteFile},model:{value:r.text,callback:function(a){e.$set(r,"text",a)},expression:"choice.text"}}):n("div",{staticClass:"choice-input-wrap"},[e.needRichText?n("div",{staticClass:"choice-input",on:{click:function(a){return e.activeRichText(i)}}},[r.text||r.attachments&&r.attachments.length>0?e._e():n("span",{staticClass:"no-content-tip"},[e._v(e._s(e.t("optionContent")))]),r.text?n("div",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}):e._e(),n("FileList",{ref:"fileList",refInFor:!0,attrs:{mode:"edit",type:"block",isPreview:!0,list:r.attachments||[],isShowLimitTimes:!1,actionIndex:i},on:{deleteFile:e.deleteFile}})],1):n("input",{directives:[{name:"model",rawName:"v-model",value:r.text,expression:"choice.text"}],staticClass:"choice-input",attrs:{type:"text",placeholder:e.t("optionContent")},domProps:{value:r.text},on:{input:function(a){a.target.composing||e.$set(r,"text",a.target.value)}}})]),i>1?n("img",{staticClass:"btn-delete",attrs:{src:Yk,alt:""},on:{click:function(a){return e.deleteChoice(r,i)}}}):e._e()],1)])}),n("div",{staticClass:"btn-add",on:{click:e.addChoice}},[n("img",{attrs:{src:fln,alt:""}}),e._v(e._s(e.t("addOption"))+" ")])],2),n("div",{staticClass:"choice-list"},[n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("answer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])]),e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i)))])])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i)))])])}),1):e._e()],1),n("div",{staticClass:"btn-save"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)]):e._e(),e.mode===2?n("div",{staticClass:"preview-mode"},[n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",attrs:{disabled:""},model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",attrs:{disabled:""},model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1}}):e._e()],1)])}),1):e._e()],1),n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("answer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])])]):e._e(),e.mode===3?n("div",{staticClass:"answer-mode"},[e.isSubmitted?n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",attrs:{disabled:!0},model:{value:e.userAnswer,callback:function(r){e.userAnswer=r},expression:"userAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",class:e.handleAnswerClass(i),attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",attrs:{disabled:!0},model:{value:e.userAnswer,callback:function(r){e.userAnswer=r},expression:"userAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",class:e.handleAnswerClass(i),attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e()],1):n("div",{staticClass:"choice-list"},[e.question.type===1?n("TinyRadioGroup",{staticClass:"choices",model:{value:e.radioAnswer,callback:function(r){e.radioAnswer=r},expression:"radioAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyRadio",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e(),e.question.type===2?n("TinyCheckboxGroup",{staticClass:"choices",model:{value:e.checkboxAnswer,callback:function(r){e.checkboxAnswer=r},expression:"checkboxAnswer"}},e._l(e.question.choices,function(r,i){var a;return n("TinyCheckbox",{key:r.id,staticClass:"choice-item",attrs:{label:e.getOption(i)}},[n("span",{staticClass:"index"},[e._v(e._s(e.getOption(i))+". ")]),n("div",{staticClass:"choice-content"},[n("span",{staticClass:"rich-text",domProps:{innerHTML:e._s(r.text)}}),(a=r.attachments)!=null&&a.length?n("FileList",{staticClass:"choice-file-list",attrs:{mode:"preview",type:"block",isPreview:!0,list:r.attachments,isShowLimitTimes:!1,showDownLoad:e.mode!==3}}):e._e()],1)])}),1):e._e()],1),e.isSubmitted&&e.showAnswer?n("div",[n("div",{staticClass:"answer-display"},[n("span",[e._v(e._s(e.t("stuAnswer"))+":")]),n("span",[e._v(e._s(e.formatAnswer((o=e.question.record)==null?void 0:o.answer)))])]),n("div",{staticClass:"correct-answer"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("span",[e._v(e._s(e.formatAnswer(e.question.correctAnswer)))])])]):e._e()]):e._e()])},yln=[],bln=Bn(gln,vln,yln,!1,null,"ef3b5da6");const Bl=bln.exports;Bl.install=t=>t.component(Bl.name,Bl);const wln=$e.defineComponent({name:"Completion",components:{Base:jf,FileList:fc,TinyButton:vt,TinyCheckbox:En},props:{mode:{type:Number,default:1},oriQuestion:{type:Object,default:()=>({})},isSubmitted:{type:Boolean,default:!1},showAnswer:{type:Boolean,default:!1}},emits:["save","cancel","submit"],setup(t,{emit:e}){const n=$e.ref({}),o=$e.ref([]),r=u=>{var N,D,W,M;if(t.mode!==1)return;const m=/\(&nbsp;\)/g;let h;const p=[];let g=0,f="<p>";for(;(h=m.exec(u))!==null;)p.push(h.index-5*g-f.length),g++;let y=0;if((N=c.value)!=null&&N.richTextareaRef){const k=(W=(D=c.value.richTextareaRef.$refs.fluentEditorRef.state.quill)==null?void 0:D.getSelection)==null?void 0:W.call(D);y=(k==null?void 0:k.index)??((M=n.value.title)==null?void 0:M.length)??0}let x=0;for(let k=0;k<p.length&&y>p[k];k++)x=k;const w=[...n.value.blanks||[]].sort((k,U)=>(k.orderIndex||0)-(U.orderIndex||0)),A=w.map(k=>k.correctAnswer||""),E=[];let $=0;const B=p.length,q=w.length,P=Array(B).fill("");if(q>0){const k=B>q;if(k)for(let U=0;U<B;U++)if(k&&U===x)P[U]="";else if(U<x)U<A.length&&(P[U]=A[U]);else{const C=U-1;C<A.length&&(P[U]=A[C])}else for(let U=0;U<B;U++)P[U]=A[U]}for(let k=0;k<p.length;k++)E.push({id:Uu(),blankIndex:p[k],orderIndex:$,correctAnswer:P[k]}),$++;n.value.blanks=E,o.value=n.value.blanks.map(()=>""),i()};$e.watch(()=>n.value.title,r),$e.watch(()=>t.oriQuestion,u=>{n.value=gc(u)},{immediate:!0});const i=()=>{if(t.mode!==1)return;let u=[];if(n.value.blanks)for(let m=0;m<n.value.blanks.length;m++){let h=n.value.blanks[m];u.push(h.correctAnswer||"")}n.value.correctAnswer=u},a=()=>{if(t.mode!==1)return;if(i(),!n.value.title||!n.value.blanks||n.value.blanks.length===0){console.warn("请输入题目内容并添加空格");return}let u=!1;for(let m=0;m<n.value.blanks.length;m++)if(!n.value.blanks[m].correctAnswer||n.value.blanks[m].correctAnswer.trim()===""){u=!0;break}if(u){console.warn("请为所有空格填写答案");return}console.log("save-completion",n.value),e("save",n.value)},l=()=>{e("cancel")},s=u=>{t.mode===3&&(n.value.record.answer=u,e("change",n.value))},c=$e.ref(null);return{t:Wa,question:n,userAnswers:o,saveQuestion:a,cancel:l,answerChange:i,blankAnswerChange:s,deleteBlank:(u,m)=>{var x;if(t.mode!==1)return;const h=n.value.blanks.findIndex(w=>w.id===u.id);if(h===-1)return;n.value.blanks.splice(h,1);let p=n.value.title;const g=/\(&nbsp;\)/g;let f,y=[];for(;(f=g.exec(p))!==null;)y.push(f.index);if(m>=0&&m<y.length){const w=y[m];p=p.substring(0,w)+p.substring(w+8),n.value.title=p,(x=c.value)!=null&&x.richTextareaRef&&(c.value.richTextareaRef.content=p);const A=/\(&nbsp;\)/g;let E,$=[];for(;(E=A.exec(p))!==null;)$.push(E.index);n.value.blanks.forEach((B,q)=>{$[q]!==void 0&&(B.blankIndex=$[q])})}o.value=n.value.blanks.map(()=>""),i()},baseComponent:c}}});var xln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{ref:"baseComponent",staticClass:"completion-question",attrs:{question:e.question,mode:e.mode,isSubmitted:e.isSubmitted},on:{blankAnswerChange:e.blankAnswerChange}},[e.mode===1?[n("div",{staticClass:"edit-mode"},[n("div",{staticClass:"title"}),n("div",{staticClass:"correct-answer"},[n("span",{staticClass:"tip"},[e._v(e._s(e.t("answer"))+":")]),n("span",{staticClass:"correct-answer-tip"},[e._v("( "+e._s(e.t("inputAnswerTip2"))+" )")]),e._l(e.question.blanks,function(o,r){return n("div",{key:o.id||r},[n("div",{staticClass:"answer-item"},[n("span",{staticClass:"answer-option"},[e._v("["+e._s(r+1)+"]")]),n("input",{directives:[{name:"model",rawName:"v-model",value:o.correctAnswer,expression:"blank.correctAnswer"}],staticClass:"answer-input",attrs:{placeholder:e.t("inputAnswer"),type:"text"},domProps:{value:o.correctAnswer},on:{change:e.answerChange,input:function(i){i.target.composing||e.$set(o,"correctAnswer",i.target.value)}}}),n("div",{staticClass:"btn-delete"},[n("img",{attrs:{src:Yk,alt:""},on:{click:function(i){return e.deleteBlank(o,r)}}})])])])}),n("div",{staticClass:"can-exchange"},[n("TinyCheckbox",{attrs:{"false-label":0,"true-label":1},model:{value:e.question.allowExchange,callback:function(o){e.$set(e.question,"allowExchange",o)},expression:"question.allowExchange"}},[e._v("答案可互换顺序")])],1),n("div",{staticClass:"btn-save"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)],2)])]:(e.mode===2||e.mode===3)&&e.showAnswer?[n("div",{staticClass:"preview-mode"},[n("FileList",{attrs:{list:e.question.link}}),n("div",{staticClass:"correct-answer-preview"},[n("div",{class:{title:e.mode===3}},[e._v(e._s(e.t("correctAnswer"))+":")]),e._l(e.question.blanks,function(o,r){return n("span",{key:o.id||r,staticClass:"answer-item"},[n("span",{staticClass:"answer-option"},[e._v("["+e._s(r+1)+"]")]),n("span",{staticClass:"answer-value"},[e._v(e._s(`${o.correctAnswer}${r!==e.question.blanks.length-1?"、":""}`||"-"))])])})],2)],1)]:e._e()],2)},Tln=[],kln=Bn(wln,xln,Tln,!1,null,"d0321ce2");const ql=kln.exports;ql.install=t=>t.component(ql.name,ql);const ll="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='18'%20height='18'%20fill='%23475467'/%3e%3cpath%20d='M6.77719%2012.6257L2.59039%207.87367C2.34614%207.5802%201.96178%207.44255%201.58677%207.51423C1.21175%207.58592%200.905259%207.85563%200.786475%208.21849C0.66769%208.58135%200.755358%208.98009%201.01539%209.25967L5.96539%2014.8865C6.16186%2015.1092%206.4434%2015.2385%206.74039%2015.2422C7.03739%2015.246%207.32212%2015.124%207.52419%2014.9063L17.2712%204.40687C17.5406%204.13474%2017.6404%203.73748%2017.5316%203.37035C17.4227%203.00321%2017.1226%202.7245%2016.7484%202.64313C16.3742%202.56177%2015.9854%202.69067%2015.734%202.97947L6.77719%2012.6275V12.6257Z'%20fill='%23475467'/%3e%3c/svg%3e",cl="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20width='16'%20height='16'%20fill='%23475467'/%3e%3cpath%20d='M9.48719%208.00012L15.2562%202.23012C15.6662%201.82112%2015.6662%201.15012%2015.2562%200.741117C14.8462%200.331117%2014.1762%200.331117%2013.7662%200.741117L7.99719%206.51112L2.22719%200.740117C1.81819%200.330117%201.14719%200.330117%200.738187%200.740117C0.328187%201.15012%200.328187%201.82012%200.738187%202.23012L6.50819%208.00012L0.737188%2013.7701C0.327188%2014.1791%200.327188%2014.8501%200.737188%2015.2591C1.14719%2015.6691%201.81719%2015.6691%202.22719%2015.2591L7.99719%209.48912L13.7672%2015.2591C14.1762%2015.6691%2014.8472%2015.6691%2015.2562%2015.2591C15.6662%2014.8491%2015.6662%2014.1791%2015.2562%2013.7691L9.48619%208.00012H9.48719Z'%20fill='%23475467'/%3e%3c/svg%3e",Cln=$e.defineComponent({name:"JudgeQuestion",components:{Base:jf,TinyRadio:to,TinyRadioGroup:Xi,TinyButton:vt,FileList:fc},props:{mode:{type:Number,default:1},oriQuestion:{type:Object,default:()=>({})},showAnswer:{type:Boolean,default:!1},isSubmitted:{type:Boolean,default:!1}},emits:["save","cancel","change"],setup(t,{emit:e}){const n=mc(),o=$e.ref({}),r=$e.ref(""),i=$e.ref(""),a=$e.computed(()=>t.isSubmitted&&r.value===i.value);$e.watch(()=>t.oriQuestion,u=>{var m;o.value=gc(u),o.value.correctAnswer&&o.value.correctAnswer.length>0&&(i.value=o.value.correctAnswer[0]),t.mode===3&&((m=o.value.record)!=null&&m.answer?r.value=o.value.record.answer:r.value=""),console.log(o.value,"--------Judge--------")},{immediate:!0}),$e.watch(()=>t.mode,u=>{var m;u!==3?r.value="":(m=o.value.record)!=null&&m.answer?r.value=o.value.record.answer:r.value=""}),$e.watch(()=>t.isSubmitted,u=>{var m;u&&((m=o.value.record)!=null&&m.answer)&&(r.value=o.value.record.answer)});const l=()=>{if(t.mode===1){if(!o.value.title||!o.value.title.trim()){console.warn("请输入题目内容");return}if(!i.value){console.warn("请选择正确答案");return}o.value.correctAnswer||(o.value.correctAnswer=[]),o.value.correctAnswer[0]=i.value,e("save",o.value)}},s=()=>{e("cancel")};return $e.watch(r,u=>{t.mode===3&&u&&(o.value.record||(o.value.record={}),o.value.record.answer=u,e("change",o.value))}),{t:n,cancel:s,question:o,userAnswer:r,correctAnswer:i,isCorrect:a,saveQuestion:l,handleAnswerClass:u=>{if(!t.isSubmitted)return"";const m=(u?"true":"false")==r.value,h=(u?"true":"false")==i.value;return m?h?"correct":"wrong":""},handleCorrectAnswerClass:u=>t.isSubmitted&&(u?"true":"false")==i.value?"correct":""}}});var Sln=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("Base",{staticClass:"true-or-false-question",attrs:{question:e.question,mode:e.mode}},[e.mode===1?[n("div",{staticClass:"correct-answer"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("TinyRadioGroup",{model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1),n("div",{staticClass:"action-buttons"},[n("TinyButton",{attrs:{type:"info"},on:{click:e.saveQuestion}},[e._v(e._s(e.t("save")))]),n("TinyButton",{on:{click:e.cancel}},[e._v(e._s(e.t("cancel")))])],1)]:e.mode===2?[n("div",{staticClass:"preview-mode"},[n("div",{staticClass:"correct-answer-preview"},[n("span",[e._v(e._s(e.t("answer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1)])]:e.mode===3?[n("div",{staticClass:"answer-mode"},[n("div",{staticClass:"user-answer"},[e.isSubmitted?n("div",{staticClass:"submit-result"},[n("div",{staticClass:"user-answer-display"},[n("span",[e._v(e._s(e.t("yourAnswer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.userAnswer,callback:function(o){e.userAnswer=o},expression:"userAnswer"}},[n("TinyRadio",{class:e.handleAnswerClass(!0),attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{class:e.handleAnswerClass(!1),attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1),e.showAnswer?n("div",{staticClass:"correct-answer-hint"},[n("span",[e._v(e._s(e.t("correctAnswer"))+":")]),n("TinyRadioGroup",{attrs:{disabled:""},model:{value:e.correctAnswer,callback:function(o){e.correctAnswer=o},expression:"correctAnswer"}},[n("TinyRadio",{class:e.handleCorrectAnswerClass(!0),attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{class:e.handleCorrectAnswerClass(!1),attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1):e._e()]):n("div",[n("TinyRadioGroup",{model:{value:e.userAnswer,callback:function(o){e.userAnswer=o},expression:"userAnswer"}},[n("TinyRadio",{attrs:{label:"true"}},[n("img",{attrs:{src:ll,alt:""}})]),n("TinyRadio",{attrs:{label:"false"}},[n("img",{attrs:{src:cl,alt:""}})])],1)],1)])])]:e._e()],2)},Aln=[],Eln=Bn(Cln,Sln,Aln,!1,null,"d7bb764d");const Fl=Eln.exports;Fl.install=t=>t.component(Fl.name,Fl);const $ln=[yl,Nl,Ol,Bl,ql,Fl],Pln=t=>{$ln.forEach(e=>t.use(e))},_ln={install:Pln};exports.Choice=Bl;exports.Completion=ql;exports.Judge=Fl;exports.MyButton=yl;exports.MyTinyButton=Nl;exports.MyTinyRadio=Ol;exports.default=_ln;
@@ -65514,7 +65514,7 @@ var dln = function() {
65514
65514
  pln,
65515
65515
  !1,
65516
65516
  null,
65517
- "abd23e08"
65517
+ "549bd002"
65518
65518
  );
65519
65519
  const Qf = hln.exports;
65520
65520
  class lo {
@@ -66375,7 +66375,7 @@ var Lln = function() {
66375
66375
  Iln,
66376
66376
  !1,
66377
66377
  null,
66378
- "aba71d4d"
66378
+ "d0321ce2"
66379
66379
  );
66380
66380
  const vu = Nln.exports;
66381
66381
  vu.install = (t) => t.component(vu.name, vu);
@@ -66458,7 +66458,7 @@ var Dln = function() {
66458
66458
  var e = this, n = e._self._c;
66459
66459
  return e._self._setupProxy, n("Base", { staticClass: "true-or-false-question", attrs: { question: e.question, mode: e.mode } }, [e.mode === 1 ? [n("div", { staticClass: "correct-answer" }, [n("span", [e._v(e._s(e.t("correctAnswer")) + ":")]), n("TinyRadioGroup", { model: { value: e.correctAnswer, callback: function(o) {
66460
66460
  e.correctAnswer = o;
66461
- }, expression: "correctAnswer" } }, [n("TinyRadio", { attrs: { label: "true" } }, [n("img", { attrs: { src: dl, alt: "" } })]), n("TinyRadio", { attrs: { label: "false" } }, [n("img", { attrs: { src: pl, alt: "" } })])], 1)], 1), n("div", { staticClass: "action-buttons" }, [n("TinyButton", { attrs: { type: "info" }, on: { click: e.saveQuestion } }, [e._v(e._s(e.t("save")))]), n("TinyButton", { on: { click: e.cancel } }, [e._v(e._s(e.t("cancel")))])], 1)] : e.mode === 2 ? [n("div", { staticClass: "preview-mode" }, [n("div", { staticClass: "correct-answer-preview" }, [n("span", [e._v(e._s(e.t("correctAnswer")) + ":")]), n("TinyRadioGroup", { attrs: { disabled: "" }, model: { value: e.correctAnswer, callback: function(o) {
66461
+ }, expression: "correctAnswer" } }, [n("TinyRadio", { attrs: { label: "true" } }, [n("img", { attrs: { src: dl, alt: "" } })]), n("TinyRadio", { attrs: { label: "false" } }, [n("img", { attrs: { src: pl, alt: "" } })])], 1)], 1), n("div", { staticClass: "action-buttons" }, [n("TinyButton", { attrs: { type: "info" }, on: { click: e.saveQuestion } }, [e._v(e._s(e.t("save")))]), n("TinyButton", { on: { click: e.cancel } }, [e._v(e._s(e.t("cancel")))])], 1)] : e.mode === 2 ? [n("div", { staticClass: "preview-mode" }, [n("div", { staticClass: "correct-answer-preview" }, [n("span", [e._v(e._s(e.t("answer")) + ":")]), n("TinyRadioGroup", { attrs: { disabled: "" }, model: { value: e.correctAnswer, callback: function(o) {
66462
66462
  e.correctAnswer = o;
66463
66463
  }, expression: "correctAnswer" } }, [n("TinyRadio", { attrs: { label: "true" } }, [n("img", { attrs: { src: dl, alt: "" } })]), n("TinyRadio", { attrs: { label: "false" } }, [n("img", { attrs: { src: pl, alt: "" } })])], 1)], 1)])] : e.mode === 3 ? [n("div", { staticClass: "answer-mode" }, [n("div", { staticClass: "user-answer" }, [e.isSubmitted ? n("div", { staticClass: "submit-result" }, [n("div", { staticClass: "user-answer-display" }, [n("span", [e._v(e._s(e.t("yourAnswer")) + ":")]), n("TinyRadioGroup", { attrs: { disabled: "" }, model: { value: e.userAnswer, callback: function(o) {
66464
66464
  e.userAnswer = o;
@@ -66473,7 +66473,7 @@ var Dln = function() {
66473
66473
  Bln,
66474
66474
  !1,
66475
66475
  null,
66476
- "3aa4a60c"
66476
+ "d7bb764d"
66477
66477
  );
66478
66478
  const yu = qln.exports;
66479
66479
  yu.install = (t) => t.component(yu.name, yu);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ul-question-test-ui",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"