"use strict";function pad(e,s=2){return e>10**s?String(e):`${new Array(s).join("0")}${e}`.slice(-s)}function getPrintTime(){const e=new Date;return`${String(e.getFullYear())}-${pad(e.getMonth()+1)}-${pad(e.getDate())} ${pad(e.getHours())}:${pad(e.getMinutes())}:${pad(e.getSeconds())}.${pad(e.getMilliseconds(),3)}`}Object.defineProperty(exports,"__esModule",{value:!0}),exports.IOSBuildMessageCache=exports.TransformTipsURL=exports.silentRecorder=exports.Recorder=void 0,exports.getPrintTime=getPrintTime;let taskId=5e7;function genTaskId(){return taskId++}class Recorder{message(e,s){const t=genTaskId();this.sendProgress(t,e,s)}constructor(e){this.sendProgress=e}start(e){const s=genTaskId(),t=e.startsWith("!");t||this.sendProgress(s,"doing",e);const r=(e,r)=>{if(e)t||this.sendProgress(s,"error",e.message);else if(!t){let e=(null==r?void 0:r.message)||"";!e&&(null==r?void 0:r.targetPath)&&(e=null==r?void 0:r.targetPath),this.sendProgress(s,"success",e)}};return r.id=s,this.progress=e=>{this.sendProgress(s,"doing",e)},this.message=(e,t)=>{this.sendProgress(s,e,t)},r}async run(e,s){const t=this.start(e);let r=null,n=null;try{return n=await s(),n}catch(e){throw r=e,e}finally{t(r,n)}}}exports.Recorder=Recorder,exports.silentRecorder=new Recorder(()=>{}),exports.TransformTipsURL="https://web-v2-1g8g0y2x3197301a-1304825656.tcloudbaseapp.com/important_miniapp/MiniAppBuildTips.json?sign=0f07b014a760d699cf2c8a9bb84845bf&t=1724920547",exports.IOSBuildMessageCache={};