voxflow 1.5.4 → 1.7.0

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.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (()=>{var e={839:e=>{const t={opening:{speed:1,volume:1},explain:{speed:.95,volume:1},question:{speed:1.05,volume:1.05},react:{speed:1,volume:.95},debate:{speed:1.1,volume:1.1},summary:{speed:.9,volume:1},summarize:{speed:.9,volume:1},transition:{speed:1.1,volume:.9},joke:{speed:1.05,volume:1.05},closing:{speed:.95,volume:.95}};function getIntentParams(e){if(!e||typeof e!=="string"){return{speed:1,volume:1}}return t[e]||{speed:1,volume:1}}e.exports={INTENT_TTS_PARAMS:t,getIntentParams:getIntentParams}},6:(e,t,o)=>{const{getToken:n,clearToken:s,getTokenInfo:r}=o(986);const{story:a,ApiError:i}=o(214);const{podcast:l,ApiError:c}=o(35);const{synthesize:u}=o(383);const{narrate:p}=o(80);const{voices:d}=o(784);const{dub:f}=o(944);const{asr:g,ASR_DEFAULTS:m}=o(929);const{translate:h}=o(585);const{videoTranslate:w}=o(863);const{publish:v}=o(360);const{explain:x}=o(484);const{present:y,VALID_SCHEMES:S}=o(712);const{warnIfMissingFfmpeg:$}=o(297);const{API_BASE:b,WEB_BASE:k,DASHBOARD_URL:T,STORY_DEFAULTS:F,PODCAST_DEFAULTS:E,SYNTHESIZE_DEFAULTS:_,NARRATE_DEFAULTS:A,DUB_DEFAULTS:I,ASR_DEFAULTS:M,TRANSLATE_DEFAULTS:P,VIDEO_TRANSLATE_DEFAULTS:L,EXPLAIN_DEFAULTS:O,PRESENT_DEFAULTS:N,getConfigDir:C}=o(782);const D=o(330);const R=i;async function run(e){const t=e||process.argv.slice(2);const o=t[0];if(!o||o==="--help"||o==="-h"){printHelp();return}if(o==="--version"||o==="-v"){console.log(D.version);return}if(t.includes("--help")||t.includes("-h")){printSubcommandHelp(o);return}switch(o){case"login":return handleLogin(t.slice(1));case"logout":return handleLogout();case"status":return handleStatus();case"story":case"generate":return handleStory(t.slice(1));case"podcast":return handlePodcast(t.slice(1));case"synthesize":case"say":return handleSynthesize(t.slice(1));case"narrate":return handleNarrate(t.slice(1));case"voices":return handleVoices(t.slice(1));case"dub":return handleDub(t.slice(1));case"asr":case"transcribe":return handleAsr(t.slice(1));case"translate":return handleTranslate(t.slice(1));case"video-translate":return handleVideoTranslate(t.slice(1));case"publish":return handlePublish(t.slice(1));case"explain":return handleExplain(t.slice(1));case"present":return handlePresent(t.slice(1));case"dashboard":return handleDashboard();default:console.error(`Unknown command: ${o}\nRun voxflow --help for usage.`);process.exit(1)}}async function handleLogin(e){const t=parseFlag(e,"--api")||b;console.log("Logging in...");const o=await n({api:t,force:true});const s=r();if(s){console.log(`\nLogged in as ${s.email}`);console.log(`Token expires: ${s.expiresAt}`);console.log(`API: ${s.api}`)}}function handleLogout(){s();console.log("Logged out. Token cache cleared.")}function handleStatus(){const e=r();if(!e){console.log("Not logged in. Run: voxflow login");return}console.log(`Email: ${e.email}`);console.log(`API: ${e.api}`);console.log(`Expires: ${e.expiresAt}`);console.log(`Valid: ${e.valid?"yes":"expired"}`);if(!e.valid){console.log("\nToken expired. Run: voxflow login")}console.log(`\nDashboard: ${T}`);console.log("Run voxflow dashboard to open in browser.")}async function handleStory(e){const t=parseFlag(e,"--api")||b;const o=parseFlag(e,"--token");let s;if(o){s=o}else{s=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const i=parseIntFlag(e,"--paragraphs");const l=parseFloatFlag(e,"--speed");const c=parseFloatFlag(e,"--silence");const u=parseFlag(e,"--output");if(i!==undefined){if(isNaN(i)||i<1||i>20){console.error(`Error: --paragraphs must be an integer between 1 and 20 (got: "${parseFlag(e,"--paragraphs")}")`);process.exit(1)}}validateSpeed(e,l);validateSilence(e,c);validateOutput(u);const p={token:s,api:t,topic:parseFlag(e,"--topic"),voice:parseFlag(e,"--voice"),output:u,paragraphs:i,speed:l,silence:c};await runWithRetry(a,p,t,o)}async function handlePodcast(e){const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");const a=parseBoolFlag(e,"--no-tts");const i=parseFlag(e,"--input");let c;if(s){c=s}else{c=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const u=parseIntFlag(e,"--exchanges");const p=parseFloatFlag(e,"--speed");const d=parseFloatFlag(e,"--silence");const f=parseFloatFlag(e,"--ducking");const g=parseFlag(e,"--output");const m=parseIntFlag(e,"--speakers");if(u!==undefined){if(isNaN(u)||u<2||u>30){console.error(`Error: --exchanges must be an integer between 2 and 30 (got: "${parseFlag(e,"--exchanges")}")`);process.exit(1)}}validateSpeed(e,p);validateSilence(e,d);if(g){const e=[".wav",".mp3",".txt",".json"];const t=e.some((e=>g.toLowerCase().endsWith(e)));if(!t){console.error(`Error: --output path must end with ${e.join(", ")}`);process.exit(1)}}const h=parseFlag(e,"--length");if(h&&!["short","medium","long"].includes(h)){console.error(`Error: --length must be one of: short, medium, long (got: "${h}")`);process.exit(1)}const w=parseFlag(e,"--engine");if(w&&!["auto","legacy","ai-sdk"].includes(w)){console.error(`Error: --engine must be one of: auto, legacy, ai-sdk (got: "${w}")`);process.exit(1)}const v=parseFlag(e,"--colloquial");if(v&&!["low","medium","high"].includes(v)){console.error(`Error: --colloquial must be one of: low, medium, high (got: "${v}")`);process.exit(1)}if(m!==undefined){if(isNaN(m)||m<1||m>3){console.error(`Error: --speakers must be 1, 2, or 3 (got: "${parseFlag(e,"--speakers")}")`);process.exit(1)}}const x=parseFlag(e,"--language");if(x&&!["zh-CN","en","ja"].includes(x)){console.error(`Error: --language must be one of: zh-CN, en, ja (got: "${x}")`);process.exit(1)}const y=parseFlag(e,"--template");if(y&&!["interview","discussion","news","story","tutorial"].includes(y)){console.error(`Error: --template must be one of: interview, discussion, news, story, tutorial (got: "${y}")`);process.exit(1)}const S=parseFlag(e,"--format");if(S&&!["json"].includes(S)){console.error(`Error: --format must be: json (got: "${S}")`);process.exit(1)}if(i){const e=o(896);const t=o(928);const n=t.resolve(i);if(!e.existsSync(n)){console.error(`Error: Input file not found: ${n}`);process.exit(1)}}const $=parseFlag(e,"--script");if($){const e=o(896);const t=o(928);const n=t.resolve($);if(!e.existsSync(n)){console.error(`Error: Script file not found: ${n}`);process.exit(1)}}const k=parseFlag(e,"--bgm");if(k){const e=o(896);const t=o(928);const n=t.resolve(k);if(!e.existsSync(n)){console.error(`Error: BGM file not found: ${n}`);process.exit(1)}}if(f!==undefined){if(isNaN(f)||f<0||f>1){console.error(`Error: --ducking must be between 0 and 1.0 (got: "${parseFlag(e,"--ducking")}")`);process.exit(1)}}const T={token:c,api:t,topic:parseFlag(e,"--topic"),style:parseFlag(e,"--style")||y,template:y,length:h,exchanges:u,output:g,speed:p,silence:d,engine:w||undefined,colloquial:v||undefined,speakers:m||undefined,language:x||undefined,format:S||undefined,input:i||undefined,noTts:a,voice:parseFlag(e,"--voice"),script:$,bgm:k,ducking:f};await runWithRetry(l,T,t,s)}async function handleSynthesize(e){const t=parseFlag(e,"--api")||b;const o=parseFlag(e,"--token");let s;if(o){s=o}else{s=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}let a=parseFlag(e,"--text");if(!a){const t=new Set(["--text","--voice","--speed","--volume","--pitch","--output","--token","--api","--format"]);for(let o=0;o<e.length;o++){if(e[o].startsWith("--")){if(t.has(e[o]))o++;continue}a=e[o];break}}if(!a){console.error('Error: No text provided. Usage: voxflow synthesize "your text here"');process.exit(1)}const i=parseFloatFlag(e,"--speed");const l=parseFloatFlag(e,"--volume");const c=parseFloatFlag(e,"--pitch");const p=parseFlag(e,"--output");const d=parseFlag(e,"--format");validateSpeed(e,i);validateOutput(p,d);validateFormat(d);if(l!==undefined){if(isNaN(l)||l<.1||l>2){console.error(`Error: --volume must be between 0.1 and 2.0 (got: "${parseFlag(e,"--volume")}")`);process.exit(1)}}if(c!==undefined){if(isNaN(c)||c<-12||c>12){console.error(`Error: --pitch must be between -12 and 12 (got: "${parseFlag(e,"--pitch")}")`);process.exit(1)}}const f={token:s,api:t,text:a,voice:parseFlag(e,"--voice"),output:p,speed:i,volume:l,pitch:c,format:d||undefined};await runWithRetry(u,f,t,o)}async function handleNarrate(e){const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");let a;if(s){a=s}else{a=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const i=parseFlag(e,"--input");const l=parseFlag(e,"--text");const c=parseFlag(e,"--script");const u=parseFloatFlag(e,"--speed");const d=parseFloatFlag(e,"--silence");const f=parseFlag(e,"--output");const g=parseFlag(e,"--format");validateSpeed(e,u);validateSilence(e,d);validateOutput(f,g);validateFormat(g);if(i){const e=o(896);const t=o(928);const n=t.resolve(i);if(!e.existsSync(n)){console.error(`Error: Input file not found: ${n}`);process.exit(1)}}if(c){const e=o(896);const t=o(928);const n=t.resolve(c);if(!e.existsSync(n)){console.error(`Error: Script file not found: ${n}`);process.exit(1)}}const m={token:a,api:t,input:i,text:l,script:c,voice:parseFlag(e,"--voice"),output:f,speed:u,silence:d,format:g||undefined};await runWithRetry(p,m,t,s)}async function handleVoices(e){const t=parseFlag(e,"--api")||b;const o={api:t,search:parseFlag(e,"--search"),gender:parseFlag(e,"--gender"),language:parseFlag(e,"--language"),json:parseBoolFlag(e,"--json"),extended:parseBoolFlag(e,"--extended")};await d(o)}async function handleDub(e){await $(C(),"dub");const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");let a;if(s){a=s}else{a=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const i=parseFlag(e,"--srt");const l=parseFlag(e,"--video");const c=parseFlag(e,"--output");const u=parseFloatFlag(e,"--speed");const p=parseFloatFlag(e,"--ducking");const d=parseIntFlag(e,"--patch");if(!i&&!parseBoolFlag(e,"--help")){console.error("Error: --srt <file> is required. Usage: voxflow dub --srt <file.srt>");process.exit(1)}if(i){const e=o(896);const t=o(928);const n=t.resolve(i);if(!e.existsSync(n)){console.error(`Error: SRT file not found: ${n}`);process.exit(1)}}if(l){const e=o(896);const t=o(928);const n=t.resolve(l);if(!e.existsSync(n)){console.error(`Error: Video file not found: ${n}`);process.exit(1)}}const g=parseFlag(e,"--voices");if(g){const e=o(896);const t=o(928);const n=t.resolve(g);if(!e.existsSync(n)){console.error(`Error: Voices map file not found: ${n}`);process.exit(1)}}const m=parseFlag(e,"--bgm");if(m){const e=o(896);const t=o(928);const n=t.resolve(m);if(!e.existsSync(n)){console.error(`Error: BGM file not found: ${n}`);process.exit(1)}}validateSpeed(e,u);if(c){const e=l?[".mp4",".mkv",".mov"]:[".wav",".mp3"];const t=e.some((e=>c.toLowerCase().endsWith(e)));if(!t){const t=e.join(", ");console.error(`Error: --output path must end with ${t}`);process.exit(1)}}if(p!==undefined){if(isNaN(p)||p<0||p>1){console.error(`Error: --ducking must be between 0 and 1.0 (got: "${parseFlag(e,"--ducking")}")`);process.exit(1)}}const h={token:a,api:t,srt:i,video:l,output:c,speed:u,patch:d,voice:parseFlag(e,"--voice"),voicesMap:g,speedAuto:parseBoolFlag(e,"--speed-auto"),bgm:m,ducking:p};await runWithRetry(f,h,t,s)}async function handleAsr(e){await $(C(),"asr");const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");const a=parseFlag(e,"--engine")||M.engine;const i=parseFlag(e,"--model")||M.model;if(a&&!["auto","local","cloud","whisper","tencent"].includes(a)){console.error(`Error: --engine must be one of: auto, local, cloud (got: "${a}")`);process.exit(1)}if(i&&!["tiny","base","small","medium","large"].includes(i)){console.error(`Error: --model must be one of: tiny, base, small, medium, large (got: "${i}")`);process.exit(1)}const l=a==="local"||a==="whisper";let c;if(l){c=null}else if(s){c=s}else{c=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const u=parseFlag(e,"--input");const p=parseFlag(e,"--url");const d=parseBoolFlag(e,"--mic");const f=parseFlag(e,"--mode")||m.mode;const h=parseFlag(e,"--lang")||parseFlag(e,"--language")||m.lang;const w=parseFlag(e,"--format")||m.format;const v=parseFlag(e,"--output");const x=parseBoolFlag(e,"--speakers");const y=parseIntFlag(e,"--speaker-number");const S=parseIntFlag(e,"--task-id");if(f&&!["auto","sentence","flash","file"].includes(f)){console.error(`Error: --mode must be one of: auto, sentence, flash, file (got: "${f}")`);process.exit(1)}if(w&&!["srt","txt","json"].includes(w)){console.error(`Error: --format must be one of: srt, txt, json (got: "${w}")`);process.exit(1)}if(u){const e=o(896);const t=o(928);const n=t.resolve(u);if(!e.existsSync(n)){console.error(`Error: Input file not found: ${n}`);process.exit(1)}}const k={token:c,api:t,input:u,url:p,mic:d,mode:f,lang:h,format:w,output:v,speakers:x,speakerNumber:y,taskId:S,engine:a,model:i};if(l){await g(k)}else{await runWithRetry(g,k,t,s)}}async function handleTranslate(e){const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");let a;if(s){a=s}else{a=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const i=parseFlag(e,"--srt");const l=parseFlag(e,"--text");const c=parseFlag(e,"--input");const u=parseFlag(e,"--from");const p=parseFlag(e,"--to");const d=parseFlag(e,"--output");const f=parseBoolFlag(e,"--realign");const g=parseIntFlag(e,"--batch-size");if(!p&&!parseBoolFlag(e,"--help")){console.error("Error: --to <lang> is required. Example: voxflow translate --srt file.srt --to en");process.exit(1)}const m=["zh","en","ja","ko","fr","de","es","pt","ru","ar","th","vi","it"];if(p&&!m.includes(p)){console.error(`Error: --to must be one of: ${m.join(", ")} (got: "${p}")`);process.exit(1)}if(u&&!m.includes(u)&&u!=="auto"){console.error(`Error: --from must be one of: auto, ${m.join(", ")} (got: "${u}")`);process.exit(1)}const w=[i,l,c].filter(Boolean).length;if(w===0&&!parseBoolFlag(e,"--help")){console.error("Error: Provide one of: --srt <file>, --text <text>, --input <file>");process.exit(1)}if(w>1){console.error("Error: Specify only one input: --srt, --text, or --input");process.exit(1)}if(i){const e=o(896);const t=o(928);const n=t.resolve(i);if(!e.existsSync(n)){console.error(`Error: SRT file not found: ${n}`);process.exit(1)}}if(c){const e=o(896);const t=o(928);const n=t.resolve(c);if(!e.existsSync(n)){console.error(`Error: Input file not found: ${n}`);process.exit(1)}}if(g!==undefined){if(isNaN(g)||g<1||g>20){console.error(`Error: --batch-size must be between 1 and 20 (got: "${parseFlag(e,"--batch-size")}")`);process.exit(1)}}const v={token:a,api:t,srt:i,text:l,input:c,from:u,to:p,output:d,realign:f,batchSize:g};await runWithRetry(h,v,t,s)}async function handleVideoTranslate(e){if(parseBoolFlag(e,"--help")||parseBoolFlag(e,"-h")){printHelp();return}const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");let a;if(s){a=s}else{a=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const i=parseFlag(e,"--input");const l=parseFlag(e,"--from");const c=parseFlag(e,"--to");const u=parseFlag(e,"--voice");const p=parseFlag(e,"--voices");const d=parseFlag(e,"--output");const f=parseBoolFlag(e,"--realign");const g=parseBoolFlag(e,"--keep-intermediates");const m=parseIntFlag(e,"--batch-size");const h=parseFloatFlag(e,"--speed");const v=parseFlag(e,"--asr-mode");const x=parseFlag(e,"--asr-lang");if(!i){console.error("Error: --input <video-file> is required. Example: voxflow video-translate --input video.mp4 --to en");process.exit(1)}if(!c){console.error("Error: --to <lang> is required. Example: voxflow video-translate --input video.mp4 --to en");process.exit(1)}const y=["zh","en","ja","ko","fr","de","es","pt","ru","ar","th","vi","it"];if(c&&!y.includes(c)){console.error(`Error: --to must be one of: ${y.join(", ")} (got: "${c}")`);process.exit(1)}if(l&&!y.includes(l)&&l!=="auto"){console.error(`Error: --from must be one of: auto, ${y.join(", ")} (got: "${l}")`);process.exit(1)}if(i){const e=o(896);const t=o(928);const n=t.resolve(i);if(!e.existsSync(n)){console.error(`Error: Video file not found: ${n}`);process.exit(1)}}if(h!==undefined&&(isNaN(h)||h<.5||h>2)){console.error(`Error: --speed must be between 0.5 and 2.0 (got: "${parseFlag(e,"--speed")}")`);process.exit(1)}if(m!==undefined&&(isNaN(m)||m<1||m>20)){console.error(`Error: --batch-size must be between 1 and 20 (got: "${parseFlag(e,"--batch-size")}")`);process.exit(1)}const S=["auto","sentence","flash","file"];if(v&&!S.includes(v)){console.error(`Error: --asr-mode must be one of: ${S.join(", ")} (got: "${v}")`);process.exit(1)}if(p){const e=o(896);const t=o(928);const n=t.resolve(p);if(!e.existsSync(n)){console.error(`Error: Voices map file not found: ${n}`);process.exit(1)}}const $={token:a,api:t,input:i,from:l,to:c,voice:u,voicesMap:p,output:d,realign:f,keepIntermediates:g,batchSize:m,speed:h,asrMode:v,asrLang:x};await runWithRetry(w,$,t,s)}async function handlePublish(e){await $(C(),"dub");const t=parseFlag(e,"--api")||b;const o=parseFlag(e,"--token");const s=parseFlag(e,"--input");const a=parseFlag(e,"--to");const i=parseFlag(e,"--video");const l=parseFlag(e,"--srt");const c=parseFlag(e,"--audio");const u=parseFlag(e,"--output");const p=parseFlag(e,"--publish")||"local";const d=parseFlag(e,"--publish-webhook");if(s)assertFileExists(s,"Input video");if(i)assertFileExists(i,"Video");if(l)assertFileExists(l,"SRT");if(c)assertFileExists(c,"Audio");if(p&&!["local","webhook","none"].includes(p)){console.error(`Error: --publish must be one of: local, webhook, none (got: "${p}")`);process.exit(1)}if(p==="webhook"&&!d){console.error("Error: --publish webhook requires --publish-webhook <url>");process.exit(1)}if(u&&!u.toLowerCase().endsWith(".mp4")){console.error("Error: --output path must end with .mp4");process.exit(1)}const f=!!(i&&c&&!l&&!s);let g=null;if(!f){if(o){g=o}else{g=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}}const m={token:g,api:t,input:s,from:parseFlag(e,"--from"),to:a,srt:l,video:i,audio:c,voice:parseFlag(e,"--voice"),voicesMap:parseFlag(e,"--voices"),output:u,speed:parseFloatFlag(e,"--speed"),realign:parseBoolFlag(e,"--realign"),keepIntermediates:parseBoolFlag(e,"--keep-intermediates"),batchSize:parseIntFlag(e,"--batch-size"),publishTarget:p,publishDir:parseFlag(e,"--publish-dir"),publishWebhook:d,platform:parseFlag(e,"--platform")||undefined,title:parseFlag(e,"--title")||undefined};try{const n=f?await v(m):await runWithRetry(v,m,t,o);if(parseBoolFlag(e,"--json")){console.log(JSON.stringify(n,null,2))}}catch(e){const t=e.message||e.code||String(e);console.error(`\nFatal error: ${t}`);process.exit(1)}}async function handleExplain(e){const t=parseFlag(e,"--api")||b;const o=parseFlag(e,"--token");const s=parseFloatFlag(e,"--speed");const a=parseFlag(e,"--output");const i=parseIntFlag(e,"--scenes");validateSpeed(e,s);if(a){const e=[".wav",".mp3",".mp4"];const t=e.some((e=>a.toLowerCase().endsWith(e)));if(!t){console.error("Error: --output path must end with .wav, .mp3, or .mp4");process.exit(1)}}const l=parseFlag(e,"--style");if(l&&!["modern","playful","corporate","chalkboard"].includes(l)){console.error(`Error: --style must be one of: modern, playful, corporate, chalkboard (got: "${l}")`);process.exit(1)}if(i!==undefined){if(isNaN(i)||i<3||i>12){console.error(`Error: --scenes must be between 3 and 12 (got: "${parseFlag(e,"--scenes")}")`);process.exit(1)}}let c;if(o){c=o}else{c=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const u={token:c,api:t,topic:parseFlag(e,"--topic")||undefined,voice:parseFlag(e,"--voice")||undefined,style:l||undefined,language:parseFlag(e,"--language")||undefined,output:a,speed:s,scenes:i,audioOnly:parseBoolFlag(e,"--audio-only"),cloud:parseBoolFlag(e,"--cloud")};await runWithRetry(x,u,t,o)}async function handlePresent(e){const t=parseFlag(e,"--api")||b;const s=parseFlag(e,"--token");const a=parseFloatFlag(e,"--speed");const i=parseFlag(e,"--output");validateSpeed(e,a);if(i){const e=[".mp4",".wav"].some((e=>i.toLowerCase().endsWith(e)));if(!e){console.error("Error: --output path must end with .mp4 or .wav");process.exit(1)}}const l=parseFlag(e,"--scheme");if(l&&!S.includes(l)){console.error(`Error: --scheme must be one of: ${S.join(", ")} (got: "${l}")`);process.exit(1)}const c=parseFlag(e,"--text");const u=parseFlag(e,"--url");const p=parseFlag(e,"--cards");if(!c&&!u&&!p){console.error("Error: provide one of --text, --url, or --cards");process.exit(1)}if(p&&!o(896).existsSync(p)){console.error(`Error: cards file not found: ${p}`);process.exit(1)}let d;if(s){d=s}else{d=await n({api:t});const e=r();if(e){console.log(`Logged in as ${e.email}`)}}const f={token:d,api:t,text:c,url:u,cards:p,scheme:l||undefined,voice:parseFlag(e,"--voice")||undefined,speed:a,output:i,noAudio:parseBoolFlag(e,"--no-audio")};await runWithRetry(y,f,t,s)}async function handleDashboard(){const e=T;console.log(`\nOpening dashboard: ${e}`);try{const t=(await o.e(935).then(o.bind(o,935))).default;const n=await t(e);if(n&&typeof n.on==="function"){n.on("error",(()=>{console.log("Failed to open browser. Visit manually:");console.log(` ${e}`)}))}}catch{console.log("Failed to open browser. Visit manually:");console.log(` ${e}`)}}async function runWithRetry(e,t,o,s){try{return await e(t)}catch(r){if(r instanceof R&&r.code==="token_expired"&&!s){console.log("\nToken expired, re-authenticating...");t.token=await n({api:o,force:true});return await e(t)}else{throw r}}}function validateSpeed(e,t){if(t!==undefined){if(isNaN(t)||t<.5||t>2){console.error(`Error: --speed must be between 0.5 and 2.0 (got: "${parseFlag(e,"--speed")}")`);process.exit(1)}}}function validateSilence(e,t){if(t!==undefined){if(isNaN(t)||t<0||t>5){console.error(`Error: --silence must be between 0 and 5.0 (got: "${parseFlag(e,"--silence")}")`);process.exit(1)}}}function validateOutput(e,t){if(e){const t=[".wav",".mp3"];const o=t.some((t=>e.toLowerCase().endsWith(t)));if(!o){console.error("Error: --output path must end with .wav or .mp3");process.exit(1)}}}function validateFormat(e){if(e&&!["pcm","wav","mp3"].includes(e)){console.error(`Error: --format must be one of: pcm, wav, mp3 (got: "${e}")`);process.exit(1)}}function assertFileExists(e,t){const n=o(928).resolve(e);if(!o(896).existsSync(n)){console.error(`Error: ${t} file not found: ${n}`);process.exit(1)}}function parseFlag(e,t){const o=e.indexOf(t);if(o===-1||o+1>=e.length)return null;return e[o+1]}function parseIntFlag(e,t){const o=parseFlag(e,t);return o!=null?parseInt(o,10):undefined}function parseFloatFlag(e,t){const o=parseFlag(e,t);return o!=null?parseFloat(o):undefined}function parseBoolFlag(e,t){return e.includes(t)}function printHelp(){const e=[`\nvoxflow v${D.version} — AI audio content creation CLI`,"","Usage:"," voxflow <command> [options]","","Commands:"];for(const[t,o]of Object.entries(q)){if(o.alias)continue;const n=(t+(o.usage?" "+o.usage:"")).padEnd(18);e.push(` ${n} ${o.description}`)}e.push("");for(const[t,o]of Object.entries(q)){if(o.alias||!o.options)continue;const n=o.aliasOf?`${t} options (alias: ${o.aliasOf}):`:`${t} options:`;e.push(n.charAt(0).toUpperCase()+n.slice(1));e.push(...o.options.map((e=>" "+e)));e.push("")}e.push("Common options:"," --help, -h Show help (use with a command for command-specific help)"," --version, -v Show version","","Advanced options:"," --api <url> Override API endpoint (for self-hosted servers)"," --token <jwt> Use explicit token (CI/CD, skip browser login)","","Examples:");for(const[,t]of Object.entries(q)){if(t.alias||!t.examples)continue;e.push(...t.examples.map((e=>" "+e)))}console.log(e.join("\n"))}function printSubcommandHelp(e){const t=q[e];if(!t){printHelp();return}const o=t.alias?q[t.alias]:t;if(!o||!o.options){printHelp();return}const n=t.alias||e;const s=[`\nvoxflow ${n} — ${o.description}`,"","Usage:",` voxflow ${n}${o.usage?" "+o.usage:""}`,"","Options:",...o.options.map((e=>" "+e))," --api <url> Override API endpoint"," --token <jwt> Use explicit token (skip browser login)"];if(o.examples&&o.examples.length>0){s.push("","Examples:",...o.examples.map((e=>" "+e)))}console.log(s.join("\n"))}const q={login:{usage:"",description:"Open browser to login and cache token"},logout:{usage:"",description:"Clear cached token"},status:{usage:"",description:"Show login status and token info"},dashboard:{usage:"",description:"Open Web dashboard in browser"},story:{usage:"[opts]",description:"Generate a story with TTS narration",options:[`--topic <text> Story topic (default: children's story)`,`--voice <id> TTS voice ID (default: ${F.voice})`,`--output <path> Output WAV path (default: ./story-<timestamp>.wav)`,`--paragraphs <n> Paragraph count, 1-20 (default: ${F.paragraphs})`,`--speed <n> TTS speed 0.5-2.0 (default: ${F.speed})`,`--silence <sec> Silence between paragraphs, 0-5.0 (default: ${F.silence})`],examples:['voxflow story --topic "三只小猪"','voxflow story --topic "space adventure" --voice v-male-Bk7vD3xP --paragraphs 10']},podcast:{usage:"[opts]",description:"Generate a multi-speaker podcast/dialogue",options:[`--topic <text> Podcast topic (default: tech trends)`,`--engine <type> auto | legacy | ai-sdk (default: auto → ai-sdk)`,`--template <name> interview | discussion | news | story | tutorial`,`--colloquial <lvl> low | medium | high (default: medium)`,`--speakers <n> Speaker count: 1, 2, or 3 (default: ${E.speakers})`,`--language <code> zh-CN | en | ja (default: zh-CN)`,`--style <style> Legacy: dialogue style (maps to --template)`,`--length <len> short | medium | long (default: ${E.length})`,`--exchanges <n> Number of exchanges, 2-30 (legacy, default: ${E.exchanges})`,`--format json Output .podcast.json alongside audio`,`--input <file> Load .podcast.json and synthesize from it`,`--no-tts Generate script only, skip TTS synthesis`,`--script <file> Pre-written script JSON (skips LLM generation)`,`--voice <id> Override TTS voice for all speakers`,`--bgm <file> Background music file to mix in`,`--ducking <n> BGM volume ducking 0-1.0 (default: ${E.ducking})`,`--output <path> Output WAV path (default: ./podcast-<timestamp>.wav)`,`--speed <n> TTS speed 0.5-2.0 (default: ${E.speed})`,`--silence <sec> Silence between segments, 0-5.0 (default: ${E.silence})`],examples:['voxflow podcast --topic "AI in healthcare"','voxflow podcast --topic "climate change" --colloquial high --speakers 3','voxflow podcast --topic "tech news" --template news --language en','voxflow podcast --topic "AI" --format json --no-tts',"voxflow podcast --input podcast.podcast.json",'voxflow podcast --topic "debate" --engine legacy --length long --exchanges 20',"voxflow podcast --script dialogue.json --voice v-male-Bk7vD3xP",'voxflow podcast --topic "music history" --bgm background.mp3 --ducking 0.15']},synthesize:{usage:"<text>",description:"Synthesize a single text snippet to audio (alias: say)",aliasOf:"say",options:[`<text> Text to synthesize (positional arg or --text)`,`--text <text> Text to synthesize (alternative to positional)`,`--voice <id> TTS voice ID (default: ${_.voice})`,`--format <fmt> Output format: pcm, wav, mp3 (default: pcm → WAV)`,`--speed <n> TTS speed 0.5-2.0 (default: ${_.speed})`,`--volume <n> TTS volume 0.1-2.0 (default: ${_.volume})`,`--pitch <n> TTS pitch -12 to 12 (default: ${_.pitch})`,`--output <path> Output file path (default: ./tts-<timestamp>.wav)`],examples:['voxflow say "你好世界"','voxflow say "你好世界" --format mp3','voxflow synthesize "Welcome" --voice v-male-Bk7vD3xP --format mp3']},narrate:{usage:"[opts]",description:"Narrate a file, text, or script to audio",options:[`--input <file> Input .txt or .md file`,`--text <text> Inline text to narrate`,`--script <file> JSON script with per-segment voice/speed control`,`--voice <id> Default voice ID (default: ${A.voice})`,`--format <fmt> Output format: pcm, wav, mp3 (default: pcm → WAV)`,`--speed <n> TTS speed 0.5-2.0 (default: ${A.speed})`,`--silence <sec> Silence between segments, 0-5.0 (default: ${A.silence})`,`--output <path> Output file path (default: ./narration-<timestamp>.wav)`],examples:["voxflow narrate --input article.txt --voice v-female-R2s4N9qJ","voxflow narrate --script narration-script.json",'echo "Hello" | voxflow narrate --output hello.wav']},voices:{usage:"[opts]",description:"Browse and search available TTS voices",options:[`--search <query> Search by name, tone, style, description`,`--gender <m|f> Filter by gender: male/m or female/f`,`--language <code> Filter by language: zh, en, etc.`,`--extended Include extended voice library (380+ voices)`,`--json Output raw JSON instead of table`],examples:['voxflow voices --search "温柔" --gender female',"voxflow voices --extended --json"]},dub:{usage:"[opts]",description:"Dub video/audio from SRT subtitles (timeline-aligned TTS)",options:[`--srt <file> SRT subtitle file (required)`,`--video <file> Video file — merge dubbed audio into video`,`--voice <id> Default TTS voice ID (default: ${I.voice})`,`--voices <file> JSON speaker→voiceId map for multi-speaker dubbing`,`--speed <n> TTS speed 0.5-2.0 (default: ${I.speed})`,`--speed-auto Auto-adjust speed when audio overflows time slot`,`--bgm <file> Background music file to mix in`,`--ducking <n> BGM volume ducking 0-1.0 (default: ${I.ducking})`,`--patch <id> Re-synthesize a single caption by ID (patch mode)`,`--output <path> Output file path (default: ./dub-<timestamp>.wav)`],examples:["voxflow dub --srt subtitles.srt","voxflow dub --srt subtitles.srt --video input.mp4 --output dubbed.mp4","voxflow dub --srt subtitles.srt --voices speakers.json --speed-auto","voxflow dub --srt subtitles.srt --bgm music.mp3 --ducking 0.3","voxflow dub --srt subtitles.srt --patch 5 --output dub-existing.wav"]},asr:{usage:"[opts]",description:"Transcribe audio/video to text (alias: transcribe)",aliasOf:"transcribe",options:[`--input <file> Local audio or video file to transcribe`,`--url <url> Remote audio URL to transcribe (cloud only)`,`--mic Record from microphone (cloud only, requires sox)`,`--engine <type> auto (default) | local | cloud`,`--model <name> Whisper model: tiny, base (default), small, medium, large`,`--mode <type> auto (default) | sentence | flash | file (cloud only)`,`--lang <model> Language: 16k_zh (default), 16k_en, 16k_zh_en, 16k_ja, 16k_ko`,`--format <fmt> Output format: srt (default), txt, json`,`--output <path> Output file path (default: <input>.<format>)`,`--speakers Enable speaker diarization (cloud flash/file mode)`,`--speaker-number <n> Expected number of speakers (with --speakers)`,`--task-id <id> Resume polling an existing async task (cloud only)`],examples:["voxflow asr --input recording.mp3","voxflow asr --input recording.mp3 --engine local --model small","voxflow asr --input video.mp4 --format srt --lang 16k_zh","voxflow transcribe --input meeting.wav --speakers --speaker-number 3"]},translate:{usage:"[opts]",description:"Translate SRT subtitles, text, or files",options:[`--srt <file> SRT subtitle file to translate`,`--text <text> Inline text to translate`,`--input <file> Text file (.txt, .md) to translate`,`--from <lang> Source language code (default: auto-detect)`,`--to <lang> Target language code (required)`,`--output <path> Output file path (default: <input>-<lang>.<ext>)`,`--realign Adjust subtitle timing for target language length`,`--batch-size <n> Captions per LLM call, 1-20 (default: ${P.batchSize})`],examples:["voxflow translate --srt subtitles.srt --to en",'voxflow translate --text "你好世界" --to en',"voxflow translate --input article.txt --to en --output article-en.txt"]},"video-translate":{usage:"[opts]",description:"Translate entire video: ASR → translate → dub → merge",options:[`--input <file> Input video file (required)`,`--to <lang> Target language code (required)`,`--from <lang> Source language code (default: auto-detect)`,`--voice <id> TTS voice ID for dubbed audio`,`--voices <file> JSON speaker→voiceId map for multi-speaker dubbing`,`--realign Adjust subtitle timing for target language length`,`--speed <n> TTS speed 0.5-2.0 (default: ${L.speed})`,`--batch-size <n> Translation batch size, 1-20 (default: ${L.batchSize})`,`--keep-intermediates Keep intermediate files (SRT, audio) for debugging`,`--output <path> Output MP4 path (default: <input>-<lang>.mp4)`,`--asr-mode <mode> Override ASR mode: auto, sentence, flash, file`,`--asr-lang <engine> Override ASR engine: 16k_zh, 16k_en, 16k_ja, 16k_ko, etc.`],examples:["voxflow video-translate --input video.mp4 --to en","voxflow video-translate --input video.mp4 --from zh --to en --realign","voxflow video-translate --input video.mp4 --to ja --voice v-male-Bk7vD3xP"]},publish:{usage:"[opts]",description:"One-command build+merge+publish for Skill/Web orchestration",options:["--input <video> Mode A: video-translate then publish (requires --to)","--to <lang> Target language for Mode A","--from <lang> Source language for Mode A (default: auto)","--srt <file> Mode B: dub existing subtitles into video (requires --video)","--video <file> Video file for Mode B/Mode C","--audio <file> Mode C: merge existing audio into video","--voice <id> TTS voice for Mode A/B","--voices <file> Multi-speaker voice map for Mode A/B","--output <path> Final MP4 output path","--publish <target> local (default) | webhook | none","--publish-dir <dir> Local publish directory (for --publish local)","--publish-webhook <url> Webhook URL (for --publish webhook)","--platform <name> Platform metadata tag (default: generic)","--title <text> Title metadata","--json Print structured JSON result (recommended for skills)"],examples:["voxflow publish --input video.mp4 --to en --publish local","voxflow publish --srt captions.srt --video input.mp4 --publish local","voxflow publish --video input.mp4 --audio narration.mp3 --publish local","voxflow publish --input video.mp4 --to ja --publish webhook --publish-webhook https://publisher.example.com/hook --json"]},explain:{usage:"[opts]",description:"Generate an AI explainer video from a topic",options:[`--topic <text> Topic to explain (use "demo" for built-in demo)`,`--style <style> Visual style: modern (default), playful, corporate, chalkboard`,`--language <code> Script language: en (default), zh, ja, ko, etc.`,`--voice <id> TTS voice ID (default: ${O.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${O.speed})`,`--scenes <n> Number of scenes, 3-12 (default: ${O.sceneCount})`,`--audio-only Skip video render, output WAV narration only`,`--cloud Render on cloud instead of local Remotion`,`--output <path> Output file path (default: ./explain-<timestamp>.mp4)`],examples:['voxflow explain --topic "What is React?"',"voxflow explain --topic demo --output demo.mp4",'voxflow explain --topic "区块链入门" --style chalkboard --voice v-male-Bk7vD3xP','voxflow explain --topic "Machine Learning" --audio-only']},present:{usage:"<--text|--url|--cards> [opts]",description:"Generate a short video from text or URL content",options:[`--text <text> Input text content`,`--url <url> URL to fetch and convert`,`--cards <path> Pre-generated cards.json (skip LLM)`,`--scheme <name> Visual scheme: noir, neon, editorial, aurora (default), brutalist`,`--voice <id> TTS voice ID (default: ${N.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${N.speed})`,`--no-audio Skip TTS, render silent video only`,`--output <path> Output file path (default: ./present-<timestamp>.mp4)`],examples:['voxflow present --text "Claude Code 是一个 AI 编程工具" --scheme aurora',"voxflow present --url https://example.com/article --scheme noir","voxflow present --cards my-cards.json --no-audio",'voxflow present --text "React 入门指南" --voice v-male-Bk7vD3xP --output react.mp4']},say:{alias:"synthesize",description:"Alias for synthesize"},generate:{alias:"story",description:"Alias for story"},transcribe:{alias:"asr",description:"Alias for asr"}};e.exports={run:run}},929:(e,t,o)=>{const n=o(896);const s=o(928);const{API_BASE:r}=o(782);const{ApiError:a}=o(852);const{getMediaInfo:i,extractAudioForAsr:l}=o(388);const{uploadFileToCos:c}=o(567);const{recognize:u,detectMode:p,SENTENCE_MAX_MS:d,FLASH_MAX_MS:f,BASE64_MAX_BYTES:g,TASK_STATUS:m}=o(514);const{formatSrt:h,formatPlainText:w,formatJson:v,buildCaptionsFromFlash:x,buildCaptionsFromSentence:y,buildCaptionsFromFile:S}=o(813);const{checkWhisperAvailable:$,transcribeLocal:b}=o(126);const k={lang:"16k_zh",mode:"auto",format:"srt"};const T={"16k_zh":"Chinese (16kHz)","16k_en":"English (16kHz)","16k_zh_en":"Chinese-English (16kHz)","16k_ja":"Japanese (16kHz)","16k_ko":"Korean (16kHz)","16k_zh_dialect":"Chinese dialect (16kHz)","8k_zh":"Chinese (8kHz phone)","8k_en":"English (8kHz phone)"};const F={srt:".srt",txt:".txt",json:".json"};async function asr(e){let t=false;let o=[];const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nASR cancelled.");for(const e of o){try{n.unlinkSync(e)}catch{}}process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _asr(e,o)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _asr(e,t){const{token:a,api:d=r,input:f,url:$,mic:b=false,mode:E=k.mode,lang:_=k.lang,format:A=k.format,output:I,speakers:M=false,speakerNumber:P=0,taskId:L,engine:O="auto",model:N="base"}=e;if(L){return await resumePoll({apiBase:d,token:a,taskId:L,format:A,output:I,lang:_})}const C=resolveEngine(O);if(C==="local"){return await _asrLocal({input:f,format:A,output:I,model:N,lang:_})}const D=[f,$,b].filter(Boolean).length;if(D===0){throw new Error("No input specified. Provide one of:\n"+" --input <file> Local audio/video file\n"+" --url <url> Remote audio URL\n"+" --mic Record from microphone")}if(D>1){throw new Error("Specify only one input source: --input, --url, or --mic")}console.log("\n=== VoxFlow ASR ===");let R=f?s.resolve(f):null;if(b){R=await handleMicInput();t.push(R)}try{if(R&&!n.existsSync(R)){throw new Error(`Input file not found: ${R}`)}let e=0;let r=0;let k=$||null;if(R){console.log(`Input: ${s.basename(R)}`);const o=await i(R);e=o.durationMs;r=n.statSync(R).size;const a=formatDuration(e);const c=formatSize(r);console.log(`Duration: ${a}`);console.log(`Size: ${c}`);if(!o.hasAudio){throw new Error("Input file has no audio track.")}console.log(`\n[1/3] Extracting audio (16kHz mono WAV)...`);const u=await l(R);t.push(u.wavPath);e=u.durationMs;r=n.statSync(u.wavPath).size;R=u.wavPath;console.log(` OK (${formatSize(r)}, ${formatDuration(e)})`)}else{console.log(`Input: ${$}`);console.log(`(Remote URL — duration will be detected by ASR API)`)}const L=!!k;const O=E==="auto"?p(e,L||!!R,r):E;console.log(`Mode: ${O}`);console.log(`Language: ${T[_]||_}`);console.log(`Format: ${A}`);if(R&&!k){const e=O==="flash"||O==="file"&&r>g||O==="sentence"&&r>g;if(e){console.log(`\n[2/3] Uploading to COS...`);const e=await c(R,d,a);k=e.cosUrl;console.log(` OK (${e.key})`)}else{console.log(`\n[2/3] Uploading to COS... (skipped, using base64)`)}}else if(!R&&k){console.log(`\n[2/3] Uploading to COS... (skipped, using remote URL)`)}console.log(`\n[3/3] ASR speech recognition (${O})...`);const N=Date.now();const C=await u({apiBase:d,token:a,mode:O,url:k,filePath:O==="sentence"&&!k?R:undefined,durationMs:e,fileSize:r,lang:_,speakerDiarization:M,speakerNumber:P,wordInfo:A==="srt",onProgress:(e,t)=>{const o=e===m.WAITING?"Queued":e===m.PROCESSING?"Recognizing":"Unknown";process.stdout.write(`\r ${o}... (${Math.round(t/1e3)}s)`)}});const D=((Date.now()-N)/1e3).toFixed(1);console.log(`\n OK (${D}s)`);const q=C.audioTime||e/1e3||0;let z;switch(C.mode){case"flash":z=x(C.flashResult||[]);break;case"sentence":z=y(C.result,q,C.wordList);break;case"file":z=S(C.result,q);break;default:z=[{id:1,startMs:0,endMs:0,text:C.result||""}]}let j;switch(A){case"srt":j=h(z);break;case"txt":j=w(z,{includeSpeakers:M});break;case"json":j=v(z);break;default:throw new Error(`Unknown format: ${A}. Use: srt, txt, json`)}const U=F[A]||".txt";let B;if(I){B=s.resolve(I)}else if(f){const e=s.basename(f,s.extname(f));B=o.ab+"cli/"+s.dirname(f)+"/"+e+""+U}else if(b){B=s.resolve(`mic-${Date.now()}${U}`)}else{try{const e=new URL($);const t=s.basename(e.pathname,s.extname(e.pathname))||"asr";B=o.ab+"cli/"+t+""+U}catch{B=s.resolve(`asr-${Date.now()}${U}`)}}n.writeFileSync(B,j,"utf8");const W=C.quota||{};const V=1;const G=W.remaining??"?";console.log(`\n=== Done ===`);console.log(`Output: ${B}`);console.log(`Captions: ${z.length}`);console.log(`Duration: ${formatDuration(e||(C.audioTime||0)*1e3)}`);console.log(`Mode: ${C.mode}`);console.log(`Quota: ${V} used, ${G} remaining`);if(z.length>0&&A!=="json"){console.log(`\n--- Preview ---`);const e=z.slice(0,3);for(const t of e){const e=formatDuration(t.startMs);const o=t.speakerId?`[${t.speakerId}] `:"";const n=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${e} ${o}${n}`)}if(z.length>3){console.log(` ... (${z.length-3} more)`)}}return{outputPath:B,mode:C.mode,duration:e/1e3,captionCount:z.length,quotaUsed:V}}finally{for(const e of t){try{n.unlinkSync(e)}catch{}}}}async function _asrLocal(e){const{input:t,format:r=k.format,output:a,model:c="base",lang:u=k.lang}=e;console.log("\n=== VoxFlow ASR (Local Whisper) ===");if(!t){throw new Error("Local whisper engine requires --input <file>.\n"+"URL and microphone input are cloud-only features.\n"+"Use: voxflow asr --input <file> --engine local")}const p=s.resolve(t);if(!n.existsSync(p)){throw new Error(`Input file not found: ${p}`)}const d=await i(p);console.log(`Input: ${s.basename(p)}`);console.log(`Duration: ${formatDuration(d.durationMs)}`);console.log(`Engine: whisper (local)`);console.log(`Model: ${c}`);console.log(`\n[1/2] Extracting audio (16kHz mono WAV)...`);const f=await l(p);console.log(` OK (${formatSize(n.statSync(f.wavPath).size)})`);console.log(`[2/2] Whisper local recognition...`);const g=Date.now();const m=await b(f.wavPath,{model:c,lang:u});const x=((Date.now()-g)/1e3).toFixed(1);console.log(` OK (${x}s, ${m.length} segments)`);try{n.unlinkSync(f.wavPath)}catch{}let y;switch(r){case"srt":y=h(m);break;case"txt":y=w(m);break;case"json":y=v(m);break;default:throw new Error(`Unknown format: ${r}. Use: srt, txt, json`)}const S=F[r]||".txt";const $=a?s.resolve(a):o.ab+"cli/"+s.dirname(t)+"/"+s.basename(t,s.extname(t))+""+S;n.writeFileSync($,y,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${$}`);console.log(`Captions: ${m.length}`);console.log(`Duration: ${formatDuration(d.durationMs)}`);console.log(`Engine: whisper (local, no quota used)`);if(m.length>0&&r!=="json"){console.log(`\n--- Preview ---`);const e=m.slice(0,3);for(const t of e){const e=formatDuration(t.startMs);const o=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${e} ${o}`)}if(m.length>3){console.log(` ... (${m.length-3} more)`)}}return{outputPath:$,mode:"local",duration:d.durationMs/1e3,captionCount:m.length,quotaUsed:0}}function resolveEngine(e){if(e==="local"||e==="whisper"){const e=$();if(!e.available){throw new Error("Local whisper engine requires nodejs-whisper.\n"+"Install: npm install -g nodejs-whisper\n"+"Download a model: npx nodejs-whisper download\n"+"Or use: --engine cloud")}return"local"}if(e==="cloud"||e==="tencent")return"cloud";if(e==="auto"){const{available:e}=$();return e?"local":"cloud"}return"cloud"}async function resumePoll({apiBase:e,token:t,taskId:r,format:a,output:i,lang:l}){console.log(`\n=== VoxFlow ASR — Resume Task ===`);console.log(`Task ID: ${r}`);const{pollTaskResult:c,TASK_STATUS:u}=o(514);console.log(`Polling...`);const p=await c({apiBase:e,token:t,taskId:r,onProgress:(e,t)=>{const o=e===u.WAITING?"Queued":e===u.PROCESSING?"Recognizing":"?";process.stdout.write(`\r ${o}... (${Math.round(t/1e3)}s)`)}});console.log(`\n OK`);const d=S(p.result,p.audioTime);let f;switch(a){case"srt":f=h(d);break;case"txt":f=w(d);break;case"json":f=v(d);break;default:f=w(d)}const g=F[a]||".txt";const m=i?s.resolve(i):s.resolve(`task-${r}${g}`);n.writeFileSync(m,f,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${m}`);console.log(`Captions: ${d.length}`);console.log(`Duration: ${formatDuration((p.audioTime||0)*1e3)}`);return{outputPath:m,mode:"file",duration:p.audioTime,captionCount:d.length}}async function handleMicInput(){const{recordMic:e,checkRecAvailable:t}=o(384);const n=await t();if(!n.available){throw new Error(n.error)}console.log(`\nRecording from microphone...`);console.log(` Press Enter or Q to stop recording.`);console.log(` Max duration: 5 minutes.\n`);const{wavPath:s,durationMs:r,stopped:a}=await e({maxSeconds:300});console.log(`\n Recording ${a==="user"?"stopped":"finished"}: ${formatDuration(r)}`);return s}function formatDuration(e){if(!e||e<=0)return"0s";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const o=Math.floor(t/60);const n=t%60;if(o<60)return`${o}m${n>0?n+"s":""}`;const s=Math.floor(o/60);const r=o%60;return`${s}h${r>0?r+"m":""}`}function formatSize(e){if(e<1024)return`${e} B`;if(e<1024*1024)return`${(e/1024).toFixed(1)} KB`;return`${(e/1024/1024).toFixed(1)} MB`}e.exports={asr:asr,ASR_DEFAULTS:k,ApiError:a}},944:(e,t,o)=>{const n=o(896);const s=o(928);const{DUB_DEFAULTS:r}=o(782);const{ApiError:a}=o(852);const{buildWav:i,getFileExtension:l}=o(56);const{parseSrt:c,formatSrt:u}=o(813);const{buildTimelinePcm:p,buildTimelineAudio:d,msToBytes:f,BYTES_PER_MS:g}=o(907);const{startSpinner:m}=o(339);const{synthesizeTTS:h}=o(675);function parseVoicesMap(e){if(!n.existsSync(e)){throw new Error(`Voices map file not found: ${e}`)}let t;try{t=JSON.parse(n.readFileSync(e,"utf8"))}catch(e){throw new Error(`Invalid JSON in voices map: ${e.message}`)}if(typeof t!=="object"||t===null||Array.isArray(t)){throw new Error('Voices map must be a JSON object: { "SpeakerName": "voiceId", ... }')}for(const[e,o]of Object.entries(t)){if(typeof o!=="string"||o.trim().length===0){throw new Error(`Invalid voice ID for speaker "${e}": must be a non-empty string`)}}return t}async function synthesizeCaption(e,t,o,n,s,r,a,i){const l=await h({apiBase:e,token:t,text:o,voiceId:n,speed:s??1,format:r||"pcm",index:a,total:i});const c=l.audio.length/g;console.log(` OK (${(l.audio.length/1024).toFixed(0)} KB, ${(c/1e3).toFixed(1)}s)`);return{audio:l.audio,quota:l.quota,durationMs:c}}async function dub(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nDubbing cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _dub(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _dub(e){const t=e.srt;if(!t){throw new Error("No SRT file provided. Usage: voxflow dub --srt <file.srt>")}const a=s.resolve(t);if(!n.existsSync(a)){throw new Error(`SRT file not found: ${a}`)}const i=n.readFileSync(a,"utf8");const l=c(i);if(l.length===0){throw new Error("SRT file contains no valid captions")}const u=e.voice||r.voice;const p=e.speed??r.speed;const f=e.speedAuto||false;const g=r.toleranceMs;const m=e.api;const h=e.token;const w=e.patch;const v=[];let x=null;if(e.voicesMap){x=parseVoicesMap(s.resolve(e.voicesMap))}let y=e.output;const S=!!e.video;const $=S?".mp4":".wav";if(!y){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);y=s.resolve(`dub-${e}${$}`)}console.log("\n=== VoxFlow Dub ===");console.log(`SRT: ${t} (${l.length} captions)`);console.log(`Voice: ${u}${x?` + voices map (${Object.keys(x).length} speakers)`:""}`);console.log(`Speed: ${p}${f?" (auto-compensate)":""}`);if(S)console.log(`Video: ${e.video}`);if(e.bgm)console.log(`BGM: ${e.bgm} (ducking: ${e.ducking??r.ducking})`);if(w!=null)console.log(`Patch: caption #${w}`);console.log(`Output: ${y}`);if(w!=null){return _dubPatch(e,l,y,v)}console.log(`\n[1/2] Synthesizing TTS audio (${l.length} captions)...`);const b=[];let k=null;let T=0;for(let e=0;e<l.length;e++){const t=l[e];const o=t.endMs-t.startMs;let n=u;if(x&&t.speakerId&&x[t.speakerId]){n=x[t.speakerId]}let s=await synthesizeCaption(m,h,t.text,n,p,"pcm",e,l.length);T++;k=s.quota;if(f&&s.durationMs>o+g){const r=s.durationMs/o;if(r<=2){const a=Math.min(p*r,2);process.stdout.write(` ↳ Re-synth #${t.id} (${(s.durationMs/1e3).toFixed(1)}s > ${(o/1e3).toFixed(1)}s, speed: ${a.toFixed(2)})...`);s=await synthesizeCaption(m,h,t.text,n,a,"pcm",e,l.length);T++;k=s.quota}else{const a=`Caption #${t.id}: audio too long (${(s.durationMs/1e3).toFixed(1)}s for ${(o/1e3).toFixed(1)}s slot, alpha=${r.toFixed(1)}). Consider shortening text.`;v.push(a);console.log(` ⚠ OVERFLOW: ${a}`);const i=await synthesizeCaption(m,h,t.text,n,2,"pcm",e,l.length);T++;k=i.quota;s=i}}b.push({startMs:t.startMs,endMs:t.endMs,audioBuffer:s.audio})}console.log("\n[2/2] Building timeline audio...");const{wav:F,duration:E}=d(b);const _=S?y.replace(/\.[^.]+$/,".wav"):y;const A=s.dirname(_);n.mkdirSync(A,{recursive:true});n.writeFileSync(_,F);const I=_.replace(/\.(wav|mp3|mp4)$/i,".txt");const M=l.map((e=>{const t=e.speakerId?`|${e.speakerId}`:"";const o=x&&e.speakerId&&x[e.speakerId]?`|${x[e.speakerId]}`:"";return`[${e.id}${t}${o}] ${e.text}`})).join("\n\n");n.writeFileSync(I,M,"utf8");const P=S||e.bgm;if(P){const{checkFfmpeg:t,mergeAudioVideo:s,mixWithBgm:a}=o(297);const i=await t();if(!i.available){throw new Error("ffmpeg is required for BGM mixing / video merging. Install it:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}let l=_;if(e.bgm){const t=_.replace(".wav","-mixed.wav");console.log(` Mixing BGM (ducking: ${e.ducking??r.ducking})...`);await a(_,e.bgm,t,{ducking:e.ducking??r.ducking});l=t;if(!S){n.copyFileSync(l,_);try{n.unlinkSync(l)}catch{}l=_}}if(S){console.log(" Merging with video...");await s(e.video,l,y);try{if(_!==y)n.unlinkSync(_);if(e.bgm){const e=_.replace(".wav","-mixed.wav");if(n.existsSync(e))n.unlinkSync(e)}}catch{}}}console.log(`\n=== Done ===`);console.log(`Output: ${y} (${(n.statSync(y).size/1024).toFixed(1)} KB)`);console.log(`Duration: ${E.toFixed(1)}s`);console.log(`Transcript: ${I}`);console.log(`Captions: ${l.length}`);console.log(`Quota: ${T} used, ${k?.remaining??"?"} remaining`);if(v.length>0){console.log(`\nWarnings (${v.length}):`);for(const e of v){console.log(` ⚠ ${e}`)}}return{outputPath:y,textPath:I,duration:E,quotaUsed:T,segmentCount:l.length,warnings:v}}async function _dubPatch(e,t,o,a){const l=e.patch;const c=e.api;const u=e.token;const p=e.voice||r.voice;const d=e.speed??r.speed;let g=null;if(e.voicesMap){g=parseVoicesMap(s.resolve(e.voicesMap))}const m=t.findIndex((e=>e.id===l));if(m===-1){throw new Error(`Caption #${l} not found in SRT. Available IDs: ${t.map((e=>e.id)).join(", ")}`)}const h=t[m];const w=o.replace(/\.[^.]+$/,".wav");if(!n.existsSync(w)){throw new Error(`Patch mode requires an existing output file. `+`Run a full dub first, then use --patch to update individual captions.`)}let v=p;if(g&&h.speakerId&&g[h.speakerId]){v=g[h.speakerId]}console.log(`\n[Patch] Re-synthesizing caption #${l}: "${h.text.slice(0,40)}..."`);const x=await synthesizeCaption(c,u,h.text,v,d,"pcm",0,1);const y=n.readFileSync(w);const S=y.subarray(44);const $=f(h.startMs);const b=f(h.endMs);S.fill(0,$,Math.min(b,S.length));const k=Math.min(x.audio.length,b-$,S.length-$);if(k>0){x.audio.copy(S,$,0,k)}const{wav:T}=i([S],0);n.writeFileSync(w,T);console.log(`\n=== Patch Done ===`);console.log(`Updated: caption #${l} in ${w}`);console.log(`Quota: 1 used, ${x.quota?.remaining??"?"} remaining`);return{outputPath:w,textPath:w.replace(/\.wav$/i,".txt"),duration:S.length/(24e3*2),quotaUsed:1,segmentCount:1,warnings:a}}e.exports={dub:dub,ApiError:a,_test:{parseVoicesMap:parseVoicesMap}}},484:(e,t,o)=>{const n=o(896);const s=o(928);const{EXPLAIN_DEFAULTS:r}=o(782);const{request:a,throwApiError:i,throwNetworkError:l}=o(852);const{buildWav:c}=o(56);const{mergeAudioVideo:u}=o(297);const{startSpinner:p}=o(339);const d={title:"What is React?",language:"en",style:"modern",scenes:[{type:"title",title:"What is React?",subtitle:"A JavaScript library for building user interfaces",narration:"Welcome to this quick explainer on React, one of the most popular frontend libraries in the world."},{type:"bullets",heading:"Core Concepts",bullets:["Component-based architecture","Virtual DOM for efficient updates","Declarative UI with JSX","Unidirectional data flow"],narration:"React is built around several core concepts. First, everything is a component. Second, it uses a virtual DOM for efficient rendering. Third, you write declarative UI with JSX syntax. And fourth, data flows in one direction, from parent to child."},{type:"bullets",heading:"Why Use React?",bullets:["Massive ecosystem and community","Reusable component library","Excellent developer tools"],narration:"So why choose React? It has a massive ecosystem with thousands of libraries. You can build reusable component libraries. And the developer tools are some of the best in the industry."},{type:"summary",heading:"Key Takeaways",points:["React makes UI development predictable and efficient","Components are the building blocks of React apps","The virtual DOM optimizes rendering performance"],narration:"To summarize: React makes UI development predictable and efficient. Components are the fundamental building blocks. And the virtual DOM ensures your app stays fast, even as it grows. Thanks for watching!"}]};async function synthesizeScene(e,t,o,n,s,r,c){process.stdout.write(` TTS scene [${r+1}/${c}]...`);let u,p;try{({status:u,data:p}=await a(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:o,voiceId:n,speed:s,volume:1}))}catch(t){console.log(" FAIL");l(t,e)}if(u!==200||p.code!=="success"){console.log(" FAIL");i(u,p,`TTS scene ${r+1}`)}const d=Buffer.from(p.audio,"base64");const f=Math.round(d.length/48);console.log(` OK (${(d.length/1024).toFixed(0)} KB, ${(f/1e3).toFixed(1)}s)`);return{pcm:d,durationMs:f,quota:p.quota}}function buildNarrationWav(e,t){const o=c(e,t);return o.wav}async function generateScript(e,t,o,{language:n="en",sceneCount:s=5,style:r="modern"}={}){let i,l;try{({status:i,data:l}=await a(`${e}/api/llm/generate-explain-script`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{topic:o,language:n,sceneCount:s,style:r}))}catch(e){console.log(` ⚠ LLM request failed: ${e.message}`);console.log(" Falling back to demo script template.");return buildFallbackScript(o,r)}if(i!==200||l.code!=="success"||!l.script){const e=l?.message||`HTTP ${i}`;console.log(` ⚠ LLM generation failed: ${e}`);console.log(" Falling back to demo script template.");return buildFallbackScript(o,r)}console.log(` ✓ Script generated: "${l.script.title}" (${l.script.scenes.length} scenes)`);return l.script}function buildFallbackScript(e,t){const o={...d,title:e,style:t};o.scenes=[{...d.scenes[0],title:e,narration:`Welcome to this explainer on ${e}.`},...d.scenes.slice(1)];return o}function findRemotionDir(){let e=__dirname;for(let t=0;t<5;t++){const t=s.join(e,"remotion");if(n.existsSync(s.join(t,"package.json"))){return t}e=s.dirname(e)}return null}function isRemotionAvailable(){const e=findRemotionDir();if(!e)return false;return n.existsSync(s.join(e,"node_modules","remotion"))}async function renderVideo(e,t,r,a){const i=findRemotionDir();if(!i){throw new Error("Remotion directory not found. Ensure remotion/ exists at the repo root with dependencies installed.")}const l=n.mkdtempSync(s.join(o(857).tmpdir(),"voxflow-explain-"));const c=s.join(l,"props.json");const u={fps:30,script:e,scenes:t};n.writeFileSync(c,JSON.stringify(u,null,2));const p=s.join(i,"render.ts");const{execFile:d}=o(317);const f=s.join(i,"node_modules",".bin","ts-node");return new Promise(((e,t)=>{const o=d(f,[p,"--props",c,"--output",r],{cwd:i,maxBuffer:50*1024*1024,timeout:6e5},((o,s,a)=>{try{n.unlinkSync(c);n.rmdirSync(l)}catch{}if(o){t(new Error(`Remotion render failed: ${o.message}\n${a}`));return}try{const t=s.trim().split("\n");const o=t[t.length-1];const n=JSON.parse(o);e(n)}catch{e({output:r})}}));if(o.stderr&&a){let e="";o.stderr.on("data",(t=>{e+=t.toString();const o=e.split("\n");e=o.pop()||"";for(const e of o){try{const t=JSON.parse(e);if(t.type==="progress"&&a){a(t.percent)}}catch{}}}))}}))}async function explain(e){const{token:t,api:o,topic:s="demo",voice:a=r.voice,style:i=r.style,language:l=r.language,speed:c=r.speed,scenes:f=r.sceneCount,audioOnly:g=false,cloud:m=false}=e;if(e.output&&e.output.endsWith(".mp3")){console.error("Error: MP3 output is not supported for explain. Use .wav or .mp4");process.exit(1)}const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{let h;const w=s==="demo"||s==="Demo";if(w){console.log("\n[1/4] Using demo script (hardcoded)...");h={...d,style:i}}else{console.log("\n[1/4] Generating script via LLM...");console.log(` Topic: "${s}" (${l}, ${f} scenes)`);h=await generateScript(o,t,s,{language:l,sceneCount:f,style:i})}console.log(` Script: ${h.scenes.length} scenes, style: ${h.style}`);console.log(`\n[2/4] Synthesizing narration (${h.scenes.length} scenes)...`);const v=[];const x=[];let y=null;let S=null;for(let e=0;e<h.scenes.length;e++){const n=h.scenes[e];const s=await synthesizeScene(o,t,n.narration,a,c,e,h.scenes.length);v.push(s.pcm);if(!y&&s.quota)y=s.quota;S=s.quota;x.push({scene:n,durationMs:s.durationMs,audioSrc:""})}const $=buildNarrationWav(v,r.silence);const b=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);let k;if(g||!isRemotionAvailable()){if(!g&&!isRemotionAvailable()){console.log("\n[3/4] Remotion not available. Falling back to audio-only output.");console.log(" To enable video rendering, install Remotion:");console.log(" cd remotion && npm install")}else{console.log("\n[3/4] Building audio-only output...")}k=e.output||`explain-${b}.wav`;n.writeFileSync(k,$)}else{if(m){console.log("\n[3/4] Cloud rendering coming in Phase 2. Using local render.")}k=e.output||`explain-${b}.mp4`;const t=p(m?" Rendering video...":"\n[3/4] Rendering video...");try{const e=k+".silent.mp4";await renderVideo(h,x,e,(e=>{t.update(` Rendering video... ${e}%`)}));t.stop("OK");console.log(" Merging narration audio...");const o=k+".narration.wav";n.writeFileSync(o,$);await u(e,o,k);try{n.unlinkSync(e)}catch{}try{n.unlinkSync(o)}catch{}console.log(" Audio merged OK")}catch(e){t.stop("FAIL");console.log(` Video render failed: ${e.message}`);console.log(" Falling back to audio-only...");k=k.replace(/\.mp4$/,".wav");n.writeFileSync(k,$)}}const T=k.replace(/\.(mp4|wav)$/,".json");n.writeFileSync(T,JSON.stringify(h,null,2));const F=x.reduce(((e,t)=>e+t.durationMs),0);const E=n.statSync(k);const _=(E.size/(1024*1024)).toFixed(1);const A=formatDuration(F);console.log("\n[4/4] Done!");console.log(`\n=== Output ===`);console.log(` File: ${k} (${_} MB, ${A})`);console.log(` Script: ${T}`);console.log(` Scenes: ${h.scenes.length}`);console.log(` Style: ${h.style}`);if(S){const e=y&&S?y.remaining-S.remaining:h.scenes.length*100;console.log(` Quota: ${e} used, ${S.remaining??"?"} remaining`)}return{outputPath:k,scriptPath:T,duration:F}}finally{process.removeListener("SIGINT",sigintHandler)}}function formatDuration(e){const t=Math.round(e/1e3);const o=Math.floor(t/60);const n=t%60;if(o===0)return`${n}s`;return`${o}m${n.toString().padStart(2,"0")}s`}e.exports={explain:explain}},80:(e,t,o)=>{const n=o(896);const s=o(928);const{NARRATE_DEFAULTS:r}=o(782);const{ApiError:a}=o(852);const{parseParagraphs:i,buildWav:l,concatAudioBuffers:c,getFileExtension:u}=o(56);const{startSpinner:p}=o(339);const{synthesizeTTS:d}=o(675);function parseScript(e){if(!n.existsSync(e)){throw new Error(`Script file not found: ${e}`)}let t;try{t=JSON.parse(n.readFileSync(e,"utf8"))}catch(e){throw new Error(`Invalid JSON in script file: ${e.message}`)}if(!t.segments||!Array.isArray(t.segments)||t.segments.length===0){throw new Error('Script must have a non-empty "segments" array')}for(let e=0;e<t.segments.length;e++){const o=t.segments[e];if(!o.text||typeof o.text!=="string"||o.text.trim().length===0){throw new Error(`Segment ${e+1} must have a non-empty "text" field`)}}return{segments:t.segments.map((e=>({text:e.text.trim(),voiceId:e.voiceId||undefined,speed:e.speed!=null?Number(e.speed):undefined,volume:e.volume!=null?Number(e.volume):undefined,pitch:e.pitch!=null?Number(e.pitch):undefined}))),silence:t.silence!=null?Number(t.silence):r.silence,output:t.output||undefined}}function stripMarkdown(e){return e.replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/\*{1,3}([^*]+)\*{1,3}/g,"$1").replace(/_{1,3}([^_]+)_{1,3}/g,"$1").replace(/^[-*_]{3,}\s*$/gm,"").replace(/^>\s?/gm,"").replace(/\n{3,}/g,"\n\n").trim()}async function readStdin(){const e=[];for await(const t of process.stdin){e.push(t)}return Buffer.concat(e).toString("utf8")}async function synthesizeSegment(e,t,o,n,s,r,a,i,l,c){const u=await d({apiBase:e,token:t,text:o,voiceId:n,speed:s??1,volume:r??1,pitch:a,format:i||"pcm",index:l,total:c});const p=i==="mp3"?"MP3":i==="wav"?"WAV":"PCM";console.log(` OK (${(u.audio.length/1024).toFixed(0)} KB ${p})`);return u}async function narrate(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nNarration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _narrate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _narrate(e){const t=e.voice||r.voice;const o=e.speed??r.speed;const a=e.format||"pcm";const p=e.api;const d=e.token;let f;let g;let m;let h;if(e.script){const t=parseScript(e.script);f=t.segments;g=e.silence??t.silence;m=e.output||t.output;h=`script: ${e.script} (${f.length} segments)`}else if(e.input){const t=s.resolve(e.input);if(!n.existsSync(t)){throw new Error(`Input file not found: ${t}`)}let o=n.readFileSync(t,"utf8");const a=s.extname(t).toLowerCase();if(a===".md"||a===".markdown"){o=stripMarkdown(o)}const l=i(o);if(l.length===0){throw new Error("No text content found in input file")}f=l.map((e=>({text:e})));g=e.silence??r.silence;m=e.output;h=`file: ${e.input} (${f.length} paragraphs)`}else if(e.text){const t=i(e.text);if(t.length===0){throw new Error("No text content provided")}f=t.map((e=>({text:e})));g=e.silence??r.silence;m=e.output;h=`text: ${e.text.length} chars (${f.length} paragraphs)`}else if(!process.stdin.isTTY){const t=await readStdin();if(!t||t.trim().length===0){throw new Error("No input provided via stdin")}const o=i(t);if(o.length===0){throw new Error("No text content found in stdin input")}f=o.map((e=>({text:e})));g=e.silence??r.silence;h=`stdin (${f.length} paragraphs)`}else{throw new Error("No input provided. Use one of:\n"+" --input <file.txt> Read a text or markdown file\n"+' --text "text" Provide inline text\n'+" --script <file.json> Use a script with per-segment control\n"+' echo "text" | voxflow narrate Pipe from stdin')}const w=u(a);if(!m){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);m=s.resolve(`narration-${e}${w}`)}if(!m.endsWith(w)){m=m.replace(/\.(wav|mp3|pcm)$/i,"")+w}console.log("\n=== VoxFlow Narrate ===");console.log(`Input: ${h}`);console.log(`Voice: ${t}${e.script?" (may be overridden per segment)":""}`);console.log(`Format: ${a==="pcm"?"wav (pcm)":a}`);console.log(`Speed: ${o}`);if(a==="mp3"){console.log(`Output: ${m}`);console.log(` (MP3 mode: no silence inserted between segments)`)}else{console.log(`Silence: ${g}s`);console.log(`Output: ${m}`)}console.log(`\n[1/2] Synthesizing TTS audio (${f.length} segments)...`);const v=[];let x=null;for(let e=0;e<f.length;e++){const n=f[e];const s=await synthesizeSegment(p,d,n.text,n.voiceId||t,n.speed??o,n.volume,n.pitch,a,e,f.length);v.push(s.audio);x=s.quota}console.log("\n[2/2] Merging audio...");const{audio:y,wav:S,duration:$}=a==="mp3"||a==="wav"?c(v,a,g):l(v,g);const b=y||S;const k=s.dirname(m);n.mkdirSync(k,{recursive:true});n.writeFileSync(m,b);const T=m.replace(/\.(wav|mp3)$/i,".txt");const F=f.map(((e,t)=>{const o=e.voiceId?`[${t+1}|${e.voiceId}]`:`[${t+1}]`;return`${o} ${e.text}`})).join("\n\n");n.writeFileSync(T,F,"utf8");const E=f.length;console.log(`\n=== Done ===`);console.log(`Output: ${m} (${(b.length/1024).toFixed(1)} KB, ${$.toFixed(1)}s)`);console.log(`Transcript: ${T}`);console.log(`Segments: ${f.length}`);console.log(`Quota: ${E} used, ${x?.remaining??"?"} remaining`);return{outputPath:m,textPath:T,duration:$,quotaUsed:E,segmentCount:f.length,format:a}}e.exports={narrate:narrate,ApiError:a,_test:{parseScript:parseScript,stripMarkdown:stripMarkdown}}},35:(e,t,o)=>{const n=o(896);const s=o(928);const{PODCAST_DEFAULTS:r}=o(782);const{request:a,throwApiError:i,throwNetworkError:l,ApiError:c}=o(852);const{buildWav:u}=o(56);const{startSpinner:p}=o(339);const{getIntentParams:d}=o(425);const{synthesizeTTS:f}=o(675);function loadScript(e){const t=s.resolve(e);if(!n.existsSync(t)){throw new Error(`Script file not found: ${t}`)}let o;try{o=JSON.parse(n.readFileSync(t,"utf8"))}catch(e){throw new Error(`Invalid JSON in script file: ${e.message}`)}if(!Array.isArray(o.segments)||o.segments.length===0){throw new Error('Script must contain a non-empty "segments" array.\n'+'Expected: { "segments": [{ "speaker": "Host", "text": "Hello" }, ...] }')}for(let e=0;e<o.segments.length;e++){const t=o.segments[e];if(!t||typeof t.speaker!=="string"||!t.speaker.trim()){throw new Error(`Script segment [${e}] is missing a valid "speaker" field`)}if(!t||typeof t.text!=="string"||!t.text.trim()){throw new Error(`Script segment [${e}] is missing a valid "text" field`)}}return{segments:o.segments.map((e=>({speaker:e.speaker.trim(),text:e.text.trim()}))),voiceMapping:o.voiceMapping||{}}}function parseDialogueText(e){const t=e.split("\n").filter((e=>e.trim()));const o=[];const n=/^([^::]+)[::]\s*(.+)$/;for(const e of t){const t=e.trim();if(!t)continue;const s=t.match(n);if(s){const e=s[1].trim();const t=s[2].trim();if(t){o.push({speaker:e,text:t})}}else if(t.length>0){o.push({speaker:"旁白",text:t})}}return o}function parseStructuredScript(e){if(!e?.dialogue||!Array.isArray(e.dialogue))return[];return e.dialogue.map((t=>{const o=e.speakers?.[t.speaker];const n=o?.name||t.speaker;return{speaker:n,text:t.text,intent:t.intent||null}}))}async function generateDialogueLegacy(e,t,o){const n=p("\n[1/3] Generating dialogue text (legacy)...");let s,r;try{({status:s,data:r}=await a(`${e}/api/llm/generate-dialogue`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{prompt:o.topic,style:o.style||o.template,length:o.length,dialogueMode:true,autoSpeakerNames:true,exchanges:o.exchanges}))}catch(t){n.stop("FAIL");l(t,e)}if(s!==200||r.code!=="success"){n.stop("FAIL");i(s,r,"Dialogue generation")}const c=r.text;const u=r.voiceMapping||{};const d=r.quota;n.stop("OK");const f=parseDialogueText(c);const g=[...new Set(f.map((e=>e.speaker)))];console.log(` ${c.length} 字, ${f.length} 段, ${g.length} 位说话者`);console.log(` 说话者: ${g.join(", ")}`);console.log(` 配额剩余: ${d?.remaining??"?"}`);return{text:c,segments:f,voiceMapping:u,speakers:g,quota:d,script:null}}async function generateDialogueAiSdk(e,t,o){const n=p("\n[1/3] Generating dialogue text (ai-sdk)...");const s={short:"1-3",medium:"3-5",long:"5-10"};let c,u;try{({status:c,data:u}=await a(`${e}/api/podcast/generate-script`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{topic:o.topic,speakerCount:o.speakers||r.speakers,colloquialLevel:o.colloquial||"medium",language:o.language||"zh-CN",duration:s[o.length]||"3-5",autoMatchVoices:true}))}catch(t){n.stop("FAIL");l(t,e)}if(c!==200||u.code!=="success"){n.stop("FAIL");i(c,u,"Podcast script generation")}const d=u.script;const f=u.voiceMapping||{};const g=u.quota;n.stop("OK");const m=parseStructuredScript(d);const h=[...new Set(m.map((e=>e.speaker)))];const w=m.map((e=>`${e.speaker}: ${e.text}`)).join("\n");console.log(` ${w.length} chars, ${m.length} segments, ${h.length} speakers`);console.log(` Speakers: ${h.join(", ")}`);if(d?.quality_score?.overall){console.log(` Quality score: ${d.quality_score.overall}/10`)}console.log(` Quota remaining: ${g?.remaining??"?"}`);return{text:w,segments:m,voiceMapping:f,speakers:h,quota:g,script:d}}async function synthesizeSegment(e,t,o,n,s,r,a,i,l){const c=await f({apiBase:e,token:t,text:o,voiceId:n,speed:s,volume:r,index:a,total:i,label:l});console.log(` OK (${(c.audio.length/1024).toFixed(0)} KB)`);return{pcm:c.audio,quota:c.quota}}async function synthesizeAll(e,t,o,n,s,r){console.log(`\n[2/3] 合成 TTS 音频 (${o.length} 段, 多角色)...`);const a=[];let i=null;for(let l=0;l<o.length;l++){const c=o[l];const u=n[c.speaker]||{};const p=r||u.voiceId||"v-female-R2s4N9qJ";const f=u.speed||s;const g=d(c.intent);const m=f*g.speed;const h=g.volume;const w=await synthesizeSegment(e,t,c.text,p,m,h,l,o.length,c.speaker);a.push(w.pcm);i=w.quota}return{pcmBuffers:a,quota:i}}function resolveEngine(e){if(e==="legacy")return"legacy";if(e==="ai-sdk")return"ai-sdk";return"ai-sdk"}async function podcast(e){const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _podcast(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _podcast(e){const t=e.style||e.template||r.template;const a=e.length||r.length;const i=e.exchanges||r.exchanges;const l=e.speed??r.speed;const c=e.silence??r.silence;const p=e.api;const d=e.token;const f=resolveEngine(e.engine||"auto");const g=e.colloquial||"medium";const m=e.speakers||r.speakers;const h=e.language||"zh-CN";const w=e.format==="json";const v=e.noTts||false;const x=e.voice||null;const y=e.script||null;const S=e.topic||"Latest trends in technology";if(e.input){return _podcastFromFile(e)}let $=e.output;if(!$){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const t=v?".txt":".wav";$=s.resolve(`podcast-${e}${t}`)}console.log("\n=== VoxFlow Podcast Generator ===");console.log(`Topic: ${S}`);if(y){console.log(`Script: ${y}`)}else{console.log(`Engine: ${f}`);console.log(`Template: ${t}`);console.log(`Length: ${a}`);console.log(`Colloquial: ${g}`);console.log(`Speakers: ${m}`);console.log(`Language: ${h}`)}console.log(`Speed: ${l}`);if(x)console.log(`Voice: ${x}`);if(e.bgm)console.log(`BGM: ${e.bgm} (ducking: ${e.ducking??r.ducking})`);console.log(`API: ${p}`);if(!v)console.log(`Output: ${$}`);let b,k,T,F,E;if(y){console.log("\n[1/3] 加载脚本文件...");const e=loadScript(y);k=e.segments;T=e.voiceMapping;F=[...new Set(k.map((e=>e.speaker)))];b=k.map((e=>`${e.speaker}:${e.text}`)).join("\n");E=null;console.log(` ${b.length} chars, ${k.length} segments, ${F.length} speakers`);console.log(` Speakers: ${F.join(", ")}`)}else if(f==="ai-sdk"){const e=await generateDialogueAiSdk(p,d,{topic:S,style:t,length:a,exchanges:i,colloquial:g,speakers:m,language:h});b=e.text;k=e.segments;T=e.voiceMapping;F=e.speakers;E=e.script}else{const e=await generateDialogueLegacy(p,d,{topic:S,style:t,length:a,exchanges:i,template:t});b=e.text;k=e.segments;T=e.voiceMapping;F=e.speakers;E=e.script}if(k.length===0){throw new Error("No dialogue segments found in generated text")}if(w){const e=$.replace(/\.\w+$/,".podcast.json");const o={version:1,engine:f,topic:S,script:E||{dialogue:k.map((e=>({speaker:e.speaker,text:e.text})))},voiceMapping:T,meta:{colloquial:g,speakers:m,language:h,length:a,style:t}};const r=s.dirname(e);n.mkdirSync(r,{recursive:true});n.writeFileSync(e,JSON.stringify(o,null,2),"utf8");console.log(`\n JSON exported: ${e}`)}if(v){const e=$.endsWith(".txt")?$:$.replace(/\.\w+$/,".txt");const t=k.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");const o=s.dirname(e);n.mkdirSync(o,{recursive:true});n.writeFileSync(e,t,"utf8");console.log(`\n=== Done (script only) ===`);console.log(`Script: ${e}`);return{outputPath:e,textPath:e,duration:0,quotaUsed:1}}console.log("\n Voice assignments:");for(const e of F){if(x){console.log(` ${e} → ${x} (override)`)}else{const t=T[e];if(t){console.log(` ${e} → ${t.voiceId}`)}else{console.log(` ${e} → (default)`)}}}const{pcmBuffers:_,quota:A}=await synthesizeAll(p,d,k,T,l,x);const I=e.bgm?"[3/4]":"[3/3]";console.log(`\n${I} 拼接音频...`);const{wav:M,duration:P}=u(_,c);const L=s.dirname($);n.mkdirSync(L,{recursive:true});n.writeFileSync($,M);const O=$.replace(/\.wav$/,".txt");const N=k.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");n.writeFileSync(O,N,"utf8");if(e.bgm){const{checkFfmpeg:t,mixWithBgm:s}=o(297);const a=await t();if(!a.available){throw new Error("ffmpeg is required for BGM mixing. Install it:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}console.log(`\n[4/4] 混合背景音乐 (ducking: ${e.ducking??r.ducking})...`);const i=$.replace(".wav","-mixed.wav");await s($,e.bgm,i,{ducking:e.ducking??r.ducking});n.copyFileSync(i,$);try{n.unlinkSync(i)}catch{}}const C=(y?0:2)+k.length;console.log(`\n=== Done ===`);console.log(`Output: ${$} (${(n.statSync($).size/1024).toFixed(1)} KB, ${P.toFixed(1)}s)`);console.log(`Script: ${O}`);console.log(`Quota: ${C} used, ${A?.remaining??"?"} remaining`);return{outputPath:$,textPath:O,duration:P,quotaUsed:C}}async function _podcastFromFile(e){if(!e.token){throw new Error("Authentication required. Run `voxflow login` first.")}const t=s.resolve(e.input);if(!n.existsSync(t)){throw new Error(`Input file not found: ${t}`)}console.log(`\n=== Loading podcast from ${t} ===`);const o=JSON.parse(n.readFileSync(t,"utf8"));const a=o.script;const i=o.voiceMapping||{};const l=parseStructuredScript(a)||(a?.dialogue||[]).map((e=>({speaker:e.speaker,text:e.text})));if(l.length===0){throw new Error("No dialogue segments found in input file")}const c=e.speed??r.speed;const p=e.silence??r.silence;let d=e.output;if(!d){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);d=s.resolve(`podcast-${e}.wav`)}const f=[...new Set(l.map((e=>e.speaker)))];console.log(` ${l.length} segments, ${f.length} speakers`);const{pcmBuffers:g,quota:m}=await synthesizeAll(e.api,e.token,l,i,c);console.log("\n[3/3] Building audio...");const{wav:h,duration:w}=u(g,p);const v=s.dirname(d);n.mkdirSync(v,{recursive:true});n.writeFileSync(d,h);const x=d.replace(/\.wav$/,".txt");const y=l.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");n.writeFileSync(x,y,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${d} (${(h.length/1024).toFixed(1)} KB, ${w.toFixed(1)}s)`);console.log(`Script: ${x}`);console.log(`Quota: ${l.length} TTS calls, ${m?.remaining??"?"} remaining`);return{outputPath:d,textPath:x,duration:w,quotaUsed:l.length}}e.exports={podcast:podcast,ApiError:c,_test:{parseDialogueText:parseDialogueText,parseStructuredScript:parseStructuredScript,resolveEngine:resolveEngine,loadScript:loadScript}}},712:(e,t,o)=>{const n=o(896);const s=o(928);const{PRESENT_DEFAULTS:r}=o(782);const{request:a,throwApiError:i,throwNetworkError:l}=o(852);const{chatCompletion:c}=o(133);const{buildWav:u,createSilence:p}=o(56);const{startSpinner:d}=o(339);const f={noir:"Scheme1-CinematicNoir",neon:"Scheme2-NeonGlass",editorial:"Scheme3-EditorialLuxury",aurora:"Scheme4-GradientAurora",brutalist:"Scheme5-BoldBrutalist"};const g=Object.keys(f);const m=10;const h=2;function findVideoPresentDir(){let e=__dirname;for(let t=0;t<5;t++){const t=s.join(e,"video-present");if(n.existsSync(s.join(t,"package.json"))){return t}e=s.dirname(e)}return null}function isRemotionReady(){const e=findVideoPresentDir();if(!e)return false;return n.existsSync(s.join(e,"node_modules","remotion"))}const w=`你是一个短视频卡片内容策划专家。请将以下内容转化为 5-10 张短视频卡片的 JSON 数据。\n\n## 卡片类型与数据格式\n\n每张卡片的 type 可以是: title, content, comparison, quote, ending\n\n### title 卡片\n{ "type": "title", "headline": "标题", "bullets": [{"icon": "emoji", "text": "要点", "highlight": "高亮词"}], "footer_quote": "底部引言", "tags": ["#标签"], "narration": "旁白" }\n\n### content 卡片(3 种布局)\nlayout: "list" — items: [{"icon": "emoji", "text": "内容", "highlight": "高亮词", "accent": "#hex"}]\nlayout: "grid-2x2" — items: [{"icon": "emoji", "title": "标题", "body": "内容", "accent": "#hex"}]\nlayout: "grid-1x2" — items: [{"icon": "emoji", "title": "标题", "body": "内容", "accent": "#hex"}]\n\n### comparison 卡片\n{ "type": "comparison", "headline": "...", "left": {"label": "A", "accent": "#hex", "items": ["..."]}, "right": {"label": "B", "accent": "#hex", "items": ["..."]}, "narration": "..." }\n\n### quote 卡片\n{ "type": "quote", "quote": "引用文字", "attribution": "来源", "accent": "#hex", "narration": "..." }\n\n### ending 卡片\n{ "type": "ending", "headline": "结尾标题", "cta": "行动号召", "sub_text": "副文字", "narration": "..." }\n\n## 要求\n\n1. 第一张必须是 title,最后一张必须是 ending\n2. 每张卡片必须包含 narration 字段——用口语化的中文写,像朋友在聊天一样自然,不是干巴巴地念卡片上的文字\n3. 推荐的 accent 颜色: #f5c842 (黄), #4ade80 (绿), #a78bfa (紫), #22d3ee (青), #ff6b35 (橙), #ef4444 (红)\n4. 返回纯 JSON,不要 markdown 代码块\n\n## JSON 结构\n\n{\n "meta": {\n "series_name": "系列名称",\n "series_tag": "标签",\n "author": "作者"\n },\n "cards": [ ... ]\n}\n\n## 输入内容\n\n`;async function generateCards(e,t,o){const n=[{role:"user",content:w+o}];const s=await c({apiBase:e,token:t,messages:n,temperature:.7,maxTokens:4e3});let r=s.content.trim();const a=r.match(/```(?:json)?\s*([\s\S]*?)```/);if(a)r=a[1].trim();const i=JSON.parse(r);if(!i.cards||!Array.isArray(i.cards)||i.cards.length<2){throw new Error("LLM returned invalid card structure (need at least 2 cards)")}return{cards:i,quota:s.quota}}async function fetchUrlContent(e,t=0){if(t>5)throw new Error("Too many redirects");const n=new URL(e);if(!["http:","https:"].includes(n.protocol)){throw new Error(`Unsupported URL protocol: ${n.protocol}`)}const s=o(692);const r=o(611);const a=e.startsWith("https")?s:r;return new Promise(((o,n)=>{const s=a.get(e,{headers:{"User-Agent":"VoxFlow-CLI/1.0"}},(e=>{if(e.statusCode>=300&&e.statusCode<400&&e.headers.location){return fetchUrlContent(e.headers.location,t+1).then(o,n)}const s=[];e.on("data",(e=>s.push(e)));e.on("end",(()=>{const e=Buffer.concat(s).toString("utf8");const t=e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim();o(t.slice(0,8e3))}))}));s.on("error",n);s.setTimeout(15e3,(()=>{s.destroy();n(new Error("URL fetch timeout"))}))}))}async function synthesizeNarration(e,t,o,n,s,r,c){process.stdout.write(` TTS card [${r+1}/${c}]...`);let u,p;try{({status:u,data:p}=await a(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:o,voiceId:n,speed:s,volume:1}))}catch(t){console.log(" FAIL");l(t,e)}if(u!==200||p.code!=="success"){console.log(" FAIL");i(u,p,`TTS card ${r+1}`)}const d=Buffer.from(p.audio,"base64");const f=Math.round(d.length/48);console.log(` OK (${(d.length/1024).toFixed(0)} KB, ${(f/1e3).toFixed(1)}s)`);return{pcm:d,durationMs:f,quota:p.quota}}function computeDurations(e,t){return e.map(((e,o)=>{if(t&&t[o]&&t[o].durationMs>0){return Math.max(5,Math.ceil(t[o].durationMs/1e3)+h)}return m}))}async function renderVideo(e,t,r){const a=findVideoPresentDir();if(!a){throw new Error("video-present/ directory not found.\n"+" Install: cd video-present && npm install")}if(!n.existsSync(s.join(a,"node_modules","remotion"))){throw new Error("Remotion not installed in video-present/.\n"+" Run: cd video-present && npm install")}const i=s.join(a,"src","data");n.mkdirSync(i,{recursive:true});n.writeFileSync(s.join(i,"cards.json"),JSON.stringify(e,null,2));const l=f[t]||"Scheme4-GradientAurora";const{execFileSync:c}=o(317);const u=process.platform==="win32"?"npx.cmd":"npx";const p=["remotion","render",l,r,"--codec","h264","--image-format","jpeg"];c(u,p,{cwd:a,stdio:"pipe",timeout:6e5,maxBuffer:50*1024*1024})}async function present(e){const{token:t,api:s,text:a,url:i,cards:l,scheme:c=r.scheme,voice:f=r.voice,speed:g=r.speed,noAudio:m=false}=e;const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{const r=m?3:4;let h=1;let w;let v=null;if(l){console.log(`\n[${h}/${r}] Loading cards from ${l}...`);const e=n.readFileSync(l,"utf8");w=JSON.parse(e);if(!w.cards||!Array.isArray(w.cards)){throw new Error('Invalid cards.json: missing "cards" array')}console.log(` Loaded ${w.cards.length} cards`)}else{let e;if(i){console.log(`\n[${h}/${r}] Fetching URL and generating cards...`);console.log(` URL: ${i}`);const t=d(" Fetching content...");e=await fetchUrlContent(i);t.stop(`OK (${e.length} chars)`)}else if(a){console.log(`\n[${h}/${r}] Generating cards from text...`);e=a}else{throw new Error("No input provided. Use --text, --url, or --cards")}console.log(` Generating card structure via LLM...`);const o=d(" Calling LLM...");try{const n=await generateCards(s,t,e);w=n.cards;v=n.quota;o.stop(`OK (${w.cards.length} cards)`)}catch(e){o.stop("FAIL");throw new Error(`Card generation failed: ${e.message}`)}}const x=w.cards.length;const y=w.cards.map((e=>e.type)).join(", ");console.log(` Cards: ${x} (${y})`);h++;let S=null;let $=null;let b=v;let k=v;if(!m){const e=w.cards.filter((e=>e.narration));console.log(`\n[${h}/${r}] Synthesizing narration (${e.length} cards with narration)...`);const o=[];S=[];for(let e=0;e<w.cards.length;e++){const n=w.cards[e];if(!n.narration){o.push(Buffer.alloc(0));S.push({durationMs:0});continue}const r=await synthesizeNarration(s,t,n.narration,f,g,e,x);o.push(r.pcm);S.push({durationMs:r.durationMs});if(!b&&r.quota)b=r.quota;k=r.quota}const n=computeDurations(w.cards,S);const a=o.map(((e,t)=>e.length>0?e:p(n[t],24e3)));if(a.some((e=>e.length>0))){const e=u(a,.5);$=e.wav}h++}console.log(`\n[${h}/${r}] Rendering video (scheme: ${c})...`);if(!isRemotionReady()){console.log(" Remotion not available. Install with:");console.log(" cd video-present && npm install");if($){console.log(" Outputting audio-only WAV instead.");const t=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const o=e.output||`present-${t}.wav`;n.writeFileSync(o,$);const s=o.replace(/\.\w+$/,".json");n.writeFileSync(s,JSON.stringify(w,null,2));const r=S.reduce(((e,t)=>e+t.durationMs),0);console.log(`\n Output: ${o}`);return{outputPath:o,cardsPath:s,duration:r}}throw new Error("Remotion not installed and no audio to fall back to")}const T=computeDurations(w.cards,S);const F=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const E=e.output||`present-${F}.mp4`;const _=d(" Rendering...");try{const e=E+".silent.mp4";await renderVideo(w,c,e);_.stop("OK");if($){console.log(" Merging narration audio...");const t=E+".narration.wav";n.writeFileSync(t,$);try{const{mergeAudioVideo:n}=o(297);await n(e,t,E);console.log(" Audio merged OK")}catch(t){console.log(` Audio merge failed (ffmpeg required): ${t.message}`);console.log(" Output is silent video.");n.renameSync(e,E)}finally{try{n.unlinkSync(e)}catch{}try{n.unlinkSync(t)}catch{}}}else{n.renameSync(e,E)}}catch(e){_.stop("FAIL");try{n.unlinkSync(E+".silent.mp4")}catch{}try{n.unlinkSync(E+".narration.wav")}catch{}throw new Error(`Video render failed: ${e.message}`)}h++;const A=E.replace(/\.mp4$/,".json");n.writeFileSync(A,JSON.stringify(w,null,2));const I=T.reduce(((e,t)=>e+t*1e3),0);const M=n.statSync(E);const P=(M.size/(1024*1024)).toFixed(1);console.log(`\n[${h}/${r}] Done!`);console.log("\n=== Output ===");console.log(` Video: ${E} (${P} MB, ${formatDuration(I)})`);console.log(` Cards: ${A}`);console.log(` Scheme: ${c}`);console.log(` Cards: ${x} (${y})`);if(k){const e=b&&k?b.remaining-k.remaining:x*100;console.log(` Quota: ${e} used, ${k.remaining??"?"} remaining`)}return{outputPath:E,cardsPath:A,duration:I}}finally{process.removeListener("SIGINT",sigintHandler)}}function formatDuration(e){const t=Math.round(e/1e3);const o=Math.floor(t/60);const n=t%60;if(o===0)return`${n}s`;return`${o}m${n.toString().padStart(2,"0")}s`}e.exports={present:present,SCHEMES:f,VALID_SCHEMES:g}},360:(e,t,o)=>{const n=o(896);const s=o(928);const r=o(982);const{API_BASE:a}=o(782);const{request:i}=o(852);const{videoTranslate:l}=o(863);const{dub:c}=o(944);const{mergeAudioVideo:u,getAudioDuration:p}=o(297);function ensureDir(e){n.mkdirSync(e,{recursive:true})}function defaultOutputPath(e){const t=s.basename(e,s.extname(e));return s.resolve(s.dirname(e),`${t}-published.mp4`)}function defaultPublishDir(){return s.resolve(process.cwd(),"published")}function toFileUrl(e){const t=e.split(s.sep).join("/");return t.startsWith("/")?`file://${t}`:`file:///${t}`}function copyToPublishDir(e,t,o){ensureDir(t);const r=(new Date).toISOString().replace(/[:.]/g,"-");const a=s.basename(e,s.extname(e));const i=`${a}-${o}-${r}.mp4`;const l=s.join(t,i);n.copyFileSync(e,l);return{target:"local",platform:o,status:"ready",publishedPath:l,publishUrl:toFileUrl(l)}}async function publishToWebhook(e,t){const o=new URL(e);if(o.protocol!=="https:"&&o.protocol!=="http:"){throw new Error("Webhook URL must use HTTP or HTTPS")}const n=o.hostname;if(n==="localhost"||n==="127.0.0.1"||n==="0.0.0.0"||n==="::1"||n.startsWith("10.")||n.startsWith("192.168.")||n.match(/^172\.(1[6-9]|2\d|3[01])\./)||n==="169.254.169.254"||n.startsWith("169.254.")||n.startsWith("fd")||n.startsWith("fc")||n.startsWith("fe80")||n.endsWith(".internal")||n.endsWith(".local")){throw new Error("Webhook URL must not target private networks")}const{status:s,data:r}=await i(e,{method:"POST",headers:{"Content-Type":"application/json"}},t);if(s>=400){throw new Error(`Webhook publish failed (${s}): ${r?.message||JSON.stringify(r)}`)}return{target:"webhook",status:r.status||"submitted",platform:r.platform||t.platform,publishUrl:r.publishUrl||r.url||null,platformJobId:r.jobId||null,raw:r}}async function publish(e){const sigintHandler=()=>{console.log("\n\nPublish cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _publish(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _publish(e){const{token:t,api:o=a,input:i,from:d,to:f,srt:g,video:m,audio:h,voice:w,voicesMap:v,speed:x,realign:y=false,batchSize:S,keepIntermediates:$=false,output:b,publishTarget:k="local",publishDir:T=defaultPublishDir(),publishWebhook:F,platform:E="generic",title:_}=e;const A=!!(i&&f);const I=!!(g&&m);const M=!!(m&&h);const P=[A,I,M].filter(Boolean).length;if(P!==1){throw new Error("Invalid publish input. Use exactly one mode:\n"+" 1) --input <video> --to <lang> (video-translate + publish)\n"+" 2) --srt <file> --video <video> (dub + publish)\n"+" 3) --video <video> --audio <audio> (merge existing + publish)")}if(!["local","webhook","none"].includes(k)){throw new Error(`--publish must be one of: local, webhook, none (got: ${k})`)}if(k==="webhook"&&!F){throw new Error("--publish webhook requires --publish-webhook <url>")}console.log("\n=== VoxFlow Publish ===");console.log(`Publish target: ${k}`);console.log(`Platform: ${E}`);let L;let O;let N={};if(A){if(!t){throw new Error('Publish mode "video-translate" requires authentication token')}console.log("Build mode: video-translate");const e=await l({token:t,api:o,input:i,from:d,to:f,voice:w,voicesMap:v,output:b?s.resolve(b):undefined,realign:y,batchSize:S,keepIntermediates:$,speed:x});L=e.outputPath;O="video-translate";N=e}else if(I){if(!t){throw new Error('Publish mode "srt-dub" requires authentication token')}console.log("Build mode: srt-dub");const e=await c({token:t,api:o,srt:g,video:m,voice:w,voicesMap:v,speed:x,output:b?s.resolve(b):undefined});L=e.outputPath;O="srt-dub";N=e}else{console.log("Build mode: merge-existing");L=b?s.resolve(b):defaultOutputPath(s.resolve(m));await u(m,h,L);O="merge-existing";N={outputPath:L,quotaUsed:0}}const C=s.resolve(L);const D=n.statSync(C);const R=await p(C);const q=`pub_${r.randomUUID()}`;const z={jobId:q,title:_||s.basename(C,s.extname(C)),buildMode:O,platform:E,createdAt:(new Date).toISOString(),artifact:{localPath:C,sizeBytes:D.size,durationSec:Number((R/1e3).toFixed(2))}};let j={target:"none",status:"skipped",platform:E,publishUrl:null};if(k==="local"){j=copyToPublishDir(C,s.resolve(T),E)}else if(k==="webhook"){const{localPath:e,...t}=z.artifact;j=await publishToWebhook(F,{...z,artifact:{...t,filePath:s.basename(z.artifact.localPath)}})}const U={...z,publish:j,quotaUsed:N.quotaUsed||0,buildResult:N};console.log("\n=== Publish Done ===");console.log(`Final video: ${C}`);console.log(`Duration: ${U.artifact.durationSec}s`);console.log(`Size: ${(U.artifact.sizeBytes/1024/1024).toFixed(2)} MB`);console.log(`Publish status: ${j.status}`);if(j.publishUrl){console.log(`Publish URL: ${j.publishUrl}`)}else if(j.publishedPath){console.log(`Published file: ${j.publishedPath}`)}return U}e.exports={publish:publish}},214:(e,t,o)=>{const n=o(896);const s=o(928);const{STORY_DEFAULTS:r}=o(782);const{request:a,throwApiError:i,throwNetworkError:l,ApiError:c}=o(852);const{parseParagraphs:u,buildWav:p,createSilence:d}=o(56);const{startSpinner:f}=o(339);const{synthesizeTTS:g}=o(675);async function generateStory(e,t,o){const n=f("\n[1/3] Generating story text...");let s,r;try{({status:s,data:r}=await a(`${e}/api/llm/chat`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{messages:[{role:"user",content:o}],stream:false,temperature:.8}))}catch(t){n.stop("FAIL");l(t,e)}if(s!==200||r.code!=="success"){n.stop("FAIL");i(s,r,"LLM")}const c=r.content;const u=r.quota;n.stop("OK");console.log(` ${c.length} chars. Quota remaining: ${u?.remaining??"?"}`);return{story:c,quota:u}}async function synthesizeParagraph(e,t,o,n,s,r,a){const i=await g({apiBase:e,token:t,text:o,voiceId:n,speed:s,index:r,total:a});console.log(` OK (${(i.audio.length/1024).toFixed(0)} KB)`);return{pcm:i.audio,quota:i.quota}}async function synthesizeAll(e,t,o,n,s){console.log(`\n[2/3] Synthesizing TTS audio (${o.length} segments)...`);const r=[];let a=null;for(let i=0;i<o.length;i++){const l=await synthesizeParagraph(e,t,o[i],n,s,i,o.length);r.push(l.pcm);a=l.quota}return{pcmBuffers:r,quota:a}}async function story(e){const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _story(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _story(e){const t=e.voice||r.voice;const o=e.paragraphs||r.paragraphs;const a=e.speed??r.speed;const i=e.silence??r.silence;const l=e.api;const c=e.token;const d=e.topic||`请写一个适合5岁儿童的短故事,要求:\n1. 分${o}段,每段2-3句话\n2. 每段描述一个清晰的画面场景\n3. 语言简单易懂,充满童趣\n4. 段落之间用空行分隔\n5. 不要添加段落编号,直接输出故事内容`;let f=e.output;if(!f){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);f=s.resolve(`story-${e}.wav`)}console.log("\n=== VoxFlow Story Generator ===");console.log(`Voice: ${t}`);console.log(`API: ${l}`);console.log(`Paragraphs: ${o}`);console.log(`Speed: ${a}`);console.log(`Output: ${f}`);const{story:g}=await generateStory(l,c,d);const m=u(g);if(m.length===0){throw new Error("No paragraphs found in generated story")}console.log(` ${m.length} paragraphs`);const{pcmBuffers:h,quota:w}=await synthesizeAll(l,c,m,t,a);console.log("\n[3/3] Merging audio...");const{wav:v,duration:x}=p(h,i);const y=s.dirname(f);n.mkdirSync(y,{recursive:true});n.writeFileSync(f,v);const S=f.replace(/\.wav$/,".txt");const $=m.map(((e,t)=>`[${t+1}] ${e}`)).join("\n\n");n.writeFileSync(S,$,"utf8");const b=1+m.length;console.log(`\n=== Done ===`);console.log(`Output: ${f} (${(v.length/1024).toFixed(1)} KB, ${x.toFixed(1)}s)`);console.log(`Story: ${S}`);console.log(`Quota: ${b} used, ${w?.remaining??"?"} remaining`);return{outputPath:f,textPath:S,duration:x,quotaUsed:b}}e.exports={story:story,ApiError:c,_test:{parseParagraphs:u,buildWav:p,createSilence:d}}},383:(e,t,o)=>{const n=o(896);const s=o(928);const{SYNTHESIZE_DEFAULTS:r}=o(782);const{request:a,throwApiError:i,throwNetworkError:l,ApiError:c}=o(852);const{buildWav:u,getFileExtension:p}=o(56);const{startSpinner:d}=o(339);async function synthesize(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nSynthesis cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _synthesize(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _synthesize(e){const t=e.text;if(!t||t.trim().length===0){throw new Error('No text provided. Usage: voxflow synthesize "your text here"')}const o=e.voice||r.voice;const c=e.speed??r.speed;const f=e.volume??r.volume;const g=e.pitch??r.pitch;const m=e.format||"pcm";const h=e.api;const w=e.token;const v=p(m);let x=e.output;if(!x){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);x=s.resolve(`tts-${e}${v}`)}console.log("\n=== VoxFlow Synthesize ===");console.log(`Voice: ${o}`);console.log(`Format: ${m==="pcm"?"wav (pcm)":m}`);console.log(`Speed: ${c}`);if(f!==1)console.log(`Volume: ${f}`);if(g!==0)console.log(`Pitch: ${g}`);console.log(`Text: ${t.length>60?t.slice(0,57)+"...":t}`);console.log(`Output: ${x}`);const y=d("\n[1/1] Synthesizing TTS audio...");let S,$;try{({status:S,data:$}=await a(`${h}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${w}`}},{text:t.trim(),voiceId:o,format:m,speed:c,volume:f,pitch:g}))}catch(e){y.stop("FAIL");l(e,h)}if(S!==200||$.code!=="success"){y.stop("FAIL");i(S,$,"TTS")}const b=Buffer.from($.audio,"base64");y.stop("OK");let k,T;if(m==="mp3"){k=b;T=b.length/4e3;console.log(` ${(b.length/1024).toFixed(0)} KB MP3`)}else if(m==="wav"){k=b;const e=b.length>44?b.readUInt32LE(28):48e3;const t=b.length>44?b.readUInt32LE(40):b.length;T=t/e;console.log(` ${(b.length/1024).toFixed(0)} KB WAV`)}else{const e=u([b],0);k=e.wav;T=e.duration;console.log(` ${(b.length/1024).toFixed(0)} KB PCM → WAV`)}const F=s.dirname(x);n.mkdirSync(F,{recursive:true});n.writeFileSync(x,k);const E=1;console.log(`\n=== Done ===`);console.log(`Output: ${x} (${(k.length/1024).toFixed(1)} KB, ${T.toFixed(1)}s)`);console.log(`Quota: ${E} used, ${$.quota?.remaining??"?"} remaining`);return{outputPath:x,duration:T,quotaUsed:E,format:m}}e.exports={synthesize:synthesize,ApiError:c}},585:(e,t,o)=>{const n=o(896);const s=o(928);const{API_BASE:r,TRANSLATE_DEFAULTS:a}=o(782);const{chatCompletion:i,detectLanguage:l}=o(133);const{parseSrt:c,formatSrt:u}=o(813);const p={zh:"Chinese (Simplified)",en:"English",ja:"Japanese",ko:"Korean",fr:"French",de:"German",es:"Spanish",pt:"Portuguese",ru:"Russian",ar:"Arabic",th:"Thai",vi:"Vietnamese",it:"Italian"};function batchCaptions(e,t=10){const o=[];for(let n=0;n<e.length;n+=t){o.push(e.slice(n,n+t))}return o}function buildTranslationPrompt(e,t,o){const n=[`You are a professional subtitle translator. Translate each numbered line from ${t} to ${o}.`,"","Rules:","- Return ONLY the translated lines, one per number","- Keep the exact same numbering (1., 2., 3., ...)","- Preserve [Speaker: xxx] tags unchanged — do NOT translate speaker names","- Keep translations concise and natural for subtitles","- Do not add explanations, notes, or extra text"].join("\n");const s=e.map(((e,t)=>{const o=e.speakerId?`[Speaker: ${e.speakerId}] `:"";return`${t+1}. ${o}${e.text}`})).join("\n");return{system:n,user:s}}function parseTranslationResponse(e,t){const o=e.trim().split("\n").filter((e=>e.trim()));const n=[];for(let e=0;e<t.length;e++){const s=new RegExp(`^${e+1}\\.\\s*(.+)$`);const r=o.find((e=>s.test(e.trim())));if(r){const o=r.trim().replace(s,"$1").trim();let a=o;const i=o.match(/^\[Speaker:\s*[^\]]+\]\s*/i);if(i){a=o.slice(i[0].length)}n.push({...t[e],text:a||t[e].text})}else{if(e<o.length){const s=o[e].replace(/^\d+\.\s*/,"").trim();let r=s;const a=s.match(/^\[Speaker:\s*[^\]]+\]\s*/i);if(a){r=s.slice(a[0].length)}n.push({...t[e],text:r||t[e].text})}else{n.push({...t[e]})}}}return n}function realignTimings(e,t){const o=.3;const n=100;const s=t.map(((t,s)=>{const r=e[s];if(!r)return t;const a=r.text.length;const i=t.text.length;if(a===0)return t;const l=i/a;if(l<1+o&&l>1-o){return t}const c=r.endMs-r.startMs;let u=Math.round(c*l);const p=s<e.length-1?e[s+1].startMs:Infinity;const d=p-t.startMs-n;if(u>d&&d>0){u=d}u=Math.max(u,500);return{...t,endMs:t.startMs+u}}));return s}async function translate(e){const sigintHandler=()=>{console.log("\n\nTranslation cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _translate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _translate(e){const{token:t,api:o=r,srt:n,text:s,input:i,from:l,to:c,output:u,realign:p=false,batchSize:d=a.batchSize}=e;if(n)return _translateSrt({token:t,api:o,srt:n,from:l,to:c,output:u,realign:p,batchSize:d});if(s)return _translateText({token:t,api:o,text:s,from:l,to:c});if(i)return _translateFile({token:t,api:o,input:i,from:l,to:c,output:u});throw new Error("No input specified. Use --srt, --text, or --input")}async function _translateSrt({token:e,api:t,srt:r,from:l,to:d,output:f,realign:g,batchSize:m}){console.log("\n=== VoxFlow Translate (SRT) ===");const h=s.resolve(r);const w=n.readFileSync(h,"utf8");const v=c(w);if(v.length===0){throw new Error(`SRT file is empty or invalid: ${h}`)}console.log(`Input: ${s.basename(h)}`);console.log(`Captions: ${v.length}`);const x=l||await autoDetectLanguage(t,v);const y=p[x]||x;const S=p[d]||d;console.log(`From: ${y} (${x})`);console.log(`To: ${S} (${d})`);console.log(`Realign: ${g?"yes":"no"}`);const $=batchCaptions(v,m);console.log(`Batches: ${$.length} (batch size: ${m})`);console.log("");let b=[];let k=0;for(let o=0;o<$.length;o++){const n=$[o];process.stdout.write(` [${o+1}/${$.length}] Translating ${n.length} captions...`);const{system:s,user:r}=buildTranslationPrompt(n,y,S);const l=await i({apiBase:t,token:e,messages:[{role:"system",content:s},{role:"user",content:r}],temperature:a.temperature,maxTokens:a.maxTokens});const c=parseTranslationResponse(l.content,n);b=b.concat(c);k++;if(l.quota){console.log(` OK (remaining: ${l.quota.remaining})`)}else{console.log(" OK")}}if(g){console.log(" Re-aligning subtitle timing...");b=realignTimings(v,b)}b=b.map(((e,t)=>({...e,id:t+1})));const T=u(b);let F;if(f){F=s.resolve(f)}else{const e=s.basename(h,s.extname(h));const t=s.dirname(h);F=o.ab+"cli/"+t+"/"+e+"-"+d+".srt"}n.writeFileSync(F,T,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${F}`);console.log(`Captions: ${b.length}`);console.log(`Quota: ${k} used`);if(b.length>0){console.log(`\n--- Preview ---`);const e=b.slice(0,3);for(const t of e){const e=t.speakerId?`[${t.speakerId}] `:"";const o=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${t.id}. ${e}${o}`)}if(b.length>3){console.log(` ... (${b.length-3} more)`)}}return{outputPath:F,captionCount:b.length,quotaUsed:k,from:x,to:d}}async function _translateText({token:e,api:t,text:o,from:n,to:s}){console.log("\n=== VoxFlow Translate (Text) ===");const r=n||await autoDetectLanguage(t,[{text:o}]);const l=p[r]||r;const c=p[s]||s;console.log(`From: ${l} → To: ${c}`);const u=await i({apiBase:t,token:e,messages:[{role:"system",content:`You are a professional translator. Translate the following text from ${l} to ${c}. Return ONLY the translation, no explanations.`},{role:"user",content:o}],temperature:a.temperature,maxTokens:a.maxTokens});const d=u.content.trim();console.log(`\n${d}`);const f=u.quota?u.quota.remaining:"?";console.log(`\n(Quota: 1 used, ${f} remaining)`);return{text:d,quotaUsed:1,from:r,to:s}}async function _translateFile({token:e,api:t,input:r,from:l,to:c,output:u}){console.log("\n=== VoxFlow Translate (File) ===");const d=s.resolve(r);const f=n.readFileSync(d,"utf8");if(f.trim().length===0){throw new Error(`Input file is empty: ${d}`)}console.log(`Input: ${s.basename(d)}`);console.log(`Length: ${f.length} chars`);const g=l||await autoDetectLanguage(t,[{text:f}]);const m=p[g]||g;const h=p[c]||c;console.log(`From: ${m} → To: ${h}`);const w=await i({apiBase:t,token:e,messages:[{role:"system",content:`You are a professional translator. Translate the following document from ${m} to ${h}. Preserve the original formatting (paragraphs, line breaks, markdown). Return ONLY the translation.`},{role:"user",content:f}],temperature:a.temperature,maxTokens:Math.max(a.maxTokens,4e3)});const v=w.content.trim();let x;if(u){x=s.resolve(u)}else{const e=s.extname(d);const t=s.basename(d,e);const n=s.dirname(d);x=o.ab+"cli/"+n+"/"+t+"-"+c+""+e}n.writeFileSync(x,v+"\n","utf8");const y=w.quota?w.quota.remaining:"?";console.log(`\n=== Done ===`);console.log(`Output: ${x}`);console.log(`Quota: 1 used, ${y} remaining`);return{outputPath:x,quotaUsed:1,from:g,to:c}}async function autoDetectLanguage(e,t){const o=t.slice(0,3).map((e=>e.text)).join(" ");const n=await l({apiBase:e,text:o});return n||"auto"}e.exports={translate:translate,LANG_MAP:p,_test:{buildTranslationPrompt:buildTranslationPrompt,parseTranslationResponse:parseTranslationResponse,realignTimings:realignTimings,batchCaptions:batchCaptions}}},863:(e,t,o)=>{const n=o(896);const s=o(928);const r=o(857);const{checkFfmpeg:a,extractAudio:i}=o(297);const{asr:l}=o(929);const{translate:c}=o(585);const{dub:u}=o(944);const{detectLanguage:p}=o(133);const{parseSrt:d}=o(813);const{API_BASE:f,VIDEO_TRANSLATE_DEFAULTS:g}=o(782);const m={zh:"16k_zh",en:"16k_en",ja:"16k_ja",ko:"16k_ko","zh-en":"16k_zh_en"};function resolveAsrLang(e,t){if(t)return t;if(e&&m[e])return m[e];return"16k_zh"}async function videoTranslate(e){const sigintHandler=()=>{console.log("\n\nVideo translation cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _videoTranslate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _videoTranslate(e){const{token:t,api:m=f,input:h,from:w,to:v,voice:x,voicesMap:y,realign:S=false,output:$,keepIntermediates:b=false,batchSize:k=g.batchSize,speed:T=g.speed,asrMode:F,asrLang:E}=e;const _=s.resolve(h);const A=s.basename(_,s.extname(_));console.log("\n=== VoxFlow Video Translate ===");console.log(`Input: ${s.basename(_)}`);console.log(`Target: ${v}`);console.log("");const I=n.mkdtempSync(s.join(r.tmpdir(),"voxflow-vtranslate-"));let M=0;const P={};try{process.stdout.write("[1/4] Checking FFmpeg... ");const e=await a();if(!e.available){throw new Error("FFmpeg is required for video-translate. Install: https://ffmpeg.org/download.html")}console.log(`OK (${e.version})`);process.stdout.write("[2/4] Transcribing audio... ");const r=s.join(I,"extracted-audio.wav");await i(_,r);const f=s.join(I,"source.srt");const g=resolveAsrLang(w,E);const h={token:t,api:m,input:r,format:"srt",output:f,lang:g};if(F)h.mode=F;const L=await l(h);if(L.captionCount===0){throw new Error("ASR produced no captions. The video may have no audible speech.")}P.asr={mode:L.mode,duration:L.duration,captionCount:L.captionCount,quotaUsed:L.quotaUsed};M+=L.quotaUsed;console.log(`${L.captionCount} captions (${L.mode} mode)`);let O=w;if(!O){const e=n.readFileSync(f,"utf8");const t=d(e);const o=t.slice(0,3).map((e=>e.text)).join(" ");O=await p({apiBase:m,text:o})||"auto"}process.stdout.write(`[3/4] Translating (${O} → ${v})... `);const N=s.join(I,`translated-${v}.srt`);const C=await c({token:t,api:m,srt:f,from:O,to:v,output:N,realign:S,batchSize:k});P.translate={from:C.from,to:C.to,captionCount:C.captionCount,quotaUsed:C.quotaUsed};M+=C.quotaUsed;console.log(`${C.captionCount} captions translated`);process.stdout.write("[4/4] Dubbing and merging video... ");const D=$?s.resolve($):o.ab+"cli/"+s.dirname(_)+"/"+A+"-"+v+".mp4";const R=await u({token:t,api:m,srt:N,voice:x,voicesMap:y,speed:T,video:_,output:D});P.dub={segmentCount:R.segmentCount,duration:R.duration,quotaUsed:R.quotaUsed,warnings:R.warnings};M+=R.quotaUsed;console.log(`${R.segmentCount} segments dubbed`);if(b){const e=s.resolve(s.dirname(D),`${A}-${v}-intermediates`);n.mkdirSync(e,{recursive:true});const t=[["extracted-audio.wav",r],["source.srt",f],[`translated-${v}.srt`,N]];for(const[o,r]of t){if(n.existsSync(r)){n.copyFileSync(r,s.join(e,o))}}console.log(`\nIntermediates saved: ${e}`)}console.log("\n=== Done ===");console.log(`Output: ${D}`);console.log(`Language: ${O} → ${v}`);console.log(`Captions: ${C.captionCount}`);console.log(`Duration: ${R.duration.toFixed(1)}s`);console.log(`Quota: ${M} used`);if(P.dub.warnings&&P.dub.warnings.length>0){console.log(`\nWarnings:`);for(const e of P.dub.warnings){console.log(` - ${e}`)}}return{outputPath:D,from:O,to:v,captionCount:C.captionCount,quotaUsed:M,stages:P}}finally{if(!b){try{n.rmSync(I,{recursive:true,force:true})}catch{}}}}e.exports={videoTranslate:videoTranslate}},784:(e,t,o)=>{const{request:n,throwNetworkError:s}=o(852);async function voices(e){const t=e.api;const o=e.extended?"true":"false";let r,a;try{({status:r,data:a}=await n(`${t}/api/tts/voices?includeExtended=${o}`,{method:"GET"}))}catch(e){s(e,t)}if(r!==200){throw new Error(`Failed to fetch voices (${r}): ${a?.message||"unknown error"}`)}let i=a.voices||a.data?.voices||[];if(e.gender){const t=normalizeGender(e.gender);if(!t){console.error(`Error: --gender must be one of: male, m, female, f (got: "${e.gender}")`);process.exit(1)}i=i.filter((e=>{const o=(e.gender||"").toLowerCase();return o===t}))}if(e.language){const t=e.language.toLowerCase();i=i.filter((e=>(e.language||"").toLowerCase()===t))}if(e.search){const t=e.search.toLowerCase();i=i.filter((e=>{const o=[e.name,e.nameEn,e.tone,e.style,e.description,e.scenarios].filter(Boolean).join(" ").toLowerCase();return o.includes(t)}))}if(i.length===0){console.log("No voices match your criteria.");return}if(e.json){console.log(JSON.stringify(i,null,2))}else{printTable(i)}console.log(`\nFound ${i.length} voice${i.length===1?"":"s"}.`)}function normalizeGender(e){const t=(e||"").toLowerCase().trim();if(t==="male"||t==="m")return"male";if(t==="female"||t==="f")return"female";return null}function printTable(e){const t=24;const o=14;const n=8;const s=22;const r=20;const a=["ID".padEnd(t),"Name".padEnd(o),"Gender".padEnd(n),"Tone".padEnd(s),"Style".padEnd(r)].join(" ");console.log(`\n${a}`);console.log("-".repeat(a.length));for(const a of e){const e=[truncate(a.id||"",t).padEnd(t),truncate(a.name||"",o).padEnd(o),truncate(a.gender||"",n).padEnd(n),truncate(a.tone||"",s).padEnd(s),truncate(a.style||"",r).padEnd(r)].join(" ");console.log(e)}}function truncate(e,t){if(e.length<=t)return e;return e.slice(0,t-1)+"…"}e.exports={voices:voices}},514:(e,t,o)=>{const n=o(896);const{request:s,throwApiError:r,throwNetworkError:a,ApiError:i}=o(852);const l=6e4;const c=72e5;const u=5*1024*1024;const p=3e3;const d=3e5;const f={WAITING:0,PROCESSING:1,SUCCESS:2,FAILED:3};function detectMode(e,t,o){if(e<=l&&o<=u){return"sentence"}if(e<=c&&t){return"flash"}return"file"}function authHeaders(e){return{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}async function recognizeSentence(e){const{apiBase:t,token:o,url:l,filePath:c,lang:u="16k_zh",wordInfo:p=false}=e;const d={EngSerViceType:u,VoiceFormat:"wav",SubServiceType:2,WordInfo:p?1:0,ConvertNumMode:1};if(l){d.Url=l;d.SourceType=0}else if(c){const e=n.readFileSync(c);d.Data=e.toString("base64");d.DataLen=e.length;d.SourceType=1}else{throw new Error("Either url or filePath is required for sentence recognition")}try{const{status:e,data:n}=await s(`${t}/api/asr/sentence`,{method:"POST",headers:authHeaders(o)},d);if(e!==200||n.code!=="success"){r(e,n,"ASR sentence")}return{result:n.result,audioTime:n.audioTime,wordList:n.wordList||[],requestId:n.requestId,quota:n.quota}}catch(e){if(e instanceof i)throw e;a(e,t)}}async function recognizeFlash(e){const{apiBase:t,token:o,url:n,lang:l="16k_zh",speakerDiarization:c=false,speakerNumber:u=0}=e;if(!n){throw new Error("Flash recognition requires a URL (cannot use base64 data)")}const p={engine_type:l,voice_format:"wav",url:n,speaker_diarization:c?1:0,speaker_number:u,filter_dirty:0,filter_modal:0,filter_punc:0,convert_num_mode:1,word_info:1,first_channel_only:1};try{const{status:e,data:n}=await s(`${t}/api/asr/flash`,{method:"POST",headers:authHeaders(o)},p);if(e!==200||n.code!=="success"){r(e,n,"ASR flash")}return{flashResult:n.flash_result||[],audioDuration:n.audio_duration||0,requestId:n.request_id,quota:n.quota}}catch(e){if(e instanceof i)throw e;a(e,t)}}async function submitFileTask(e){const{apiBase:t,token:o,url:l,filePath:c,lang:p="16k_zh",speakerDiarization:d=false,speakerNumber:f=0}=e;const g={EngineModelType:p,ChannelNum:1,ResTextFormat:0,FilterDirty:0,FilterModal:0,FilterPunc:0,ConvertNumMode:1,SpeakerDiarization:d?1:0,SpeakerNumber:f};if(l){g.Url=l;g.SourceType=0}else if(c){const e=n.readFileSync(c);if(e.length>u){throw new Error(`File too large for base64 upload (${(e.length/1024/1024).toFixed(1)} MB). `+"Upload to COS first or use flash mode with a URL.")}g.Data=e.toString("base64");g.DataLen=e.length;g.SourceType=1}else{throw new Error("Either url or filePath is required for file recognition")}try{const{status:e,data:n}=await s(`${t}/api/asr/file`,{method:"POST",headers:authHeaders(o)},g);if(e!==200||n.code!=="success"){r(e,n,"ASR file submit")}return{taskId:n.taskId,requestId:n.requestId,quota:n.quota}}catch(e){if(e instanceof i)throw e;a(e,t)}}async function pollTaskResult(e){const{apiBase:t,token:o,taskId:n,pollIntervalMs:l=p,pollTimeoutMs:c=d,onProgress:u}=e;const g=Date.now();while(true){const e=Date.now()-g;if(e>c){throw new Error(`ASR task ${n} timed out after ${Math.round(e/1e3)}s. `+"The task may still complete — check later with: voxflow asr --task-id "+n)}try{const{status:a,data:i}=await s(`${t}/api/asr/result/${n}`,{method:"GET",headers:authHeaders(o)});if(a!==200||i.code!=="success"){r(a,i,"ASR poll")}const l=i.data;const c=l.Status;if(u)u(c,e);if(c===f.SUCCESS){return{result:l.Result,audioTime:l.AudioTime,status:c}}if(c===f.FAILED){throw new Error(`ASR task ${n} failed: ${l.Result||"Unknown error"}`)}}catch(o){if(o instanceof i)throw o;if(e+l<c){}else{a(o,t)}}await sleep(l)}}async function recognize(e){const{mode:t="auto",url:o,filePath:n,durationMs:s,fileSize:r=0}=e;const a=!!o;const i=t==="auto"?detectMode(s,a,r):t;switch(i){case"sentence":{const t=await recognizeSentence(e);return{mode:"sentence",result:t.result,audioTime:t.audioTime,wordList:t.wordList,quota:t.quota}}case"flash":{if(!o){throw new Error("Flash mode requires a URL. Upload the file to COS first, or use --mode auto.")}const t=await recognizeFlash(e);const n=(t.flashResult||[]).flatMap((e=>e.sentence_list?e.sentence_list.map((e=>e.text)):[e.text])).join("");return{mode:"flash",result:n,flashResult:t.flashResult,audioDuration:t.audioDuration,audioTime:(t.audioDuration||0)/1e3,quota:t.quota}}case"file":{const t=await submitFileTask(e);const o=await pollTaskResult({apiBase:e.apiBase,token:e.token,taskId:t.taskId,onProgress:e.onProgress});return{mode:"file",result:o.result,audioTime:o.audioTime,taskId:t.taskId,quota:t.quota}}default:throw new Error(`Unknown ASR mode: ${i}. Use: auto, sentence, flash, or file`)}}function sleep(e){return new Promise((t=>setTimeout(t,e)))}e.exports={recognize:recognize,recognizeSentence:recognizeSentence,recognizeFlash:recognizeFlash,submitFileTask:submitFileTask,pollTaskResult:pollTaskResult,detectMode:detectMode,SENTENCE_MAX_MS:l,FLASH_MAX_MS:c,BASE64_MAX_BYTES:u,TASK_STATUS:f}},388:(e,t,o)=>{const{execFile:n}=o(317);const s=o(928);const r=o(857);const a=o(896);function runCommand(e,t,o){return new Promise(((s,r)=>{n(e,t,{timeout:6e5,...o},((e,t,o)=>{if(e){e.stderr=o;e.stdout=t;r(e)}else{s({stdout:t,stderr:o})}}))}))}async function getMediaInfo(e){const t=s.resolve(e);if(!a.existsSync(t)){throw new Error(`File not found: ${t}`)}try{const{stdout:e}=await runCommand("ffprobe",["-v","error","-show_entries","format=duration","-show_entries","stream=codec_type,codec_name,sample_rate,channels","-of","json",t]);const o=JSON.parse(e);const n=o.streams||[];const s=o.format||{};const r=n.find((e=>e.codec_type==="audio"));const a=n.find((e=>e.codec_type==="video"));const i=parseFloat(s.duration);const l=isNaN(i)?0:Math.round(i*1e3);return{durationMs:l,hasVideo:!!a,hasAudio:!!r,audioCodec:r?r.codec_name:null,sampleRate:r?parseInt(r.sample_rate,10):null,channels:r?parseInt(r.channels,10):null}}catch(t){if(t.code==="ENOENT"){throw new Error("ffprobe not found. Please install ffmpeg:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}throw new Error(`Failed to probe media file ${e}: ${t.message}`)}}async function extractAudioForAsr(e,t={}){const o=s.resolve(e);if(!a.existsSync(o)){throw new Error(`File not found: ${o}`)}const n=t.outputDir||r.tmpdir();const i=s.basename(o,s.extname(o));const l=s.join(n,`asr-${i}-${Date.now()}.wav`);try{await runCommand("ffmpeg",["-i",o,"-vn","-acodec","pcm_s16le","-ar","16000","-ac","1","-y",l])}catch(t){if(t.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}throw new Error(`Failed to extract audio from ${e}: ${t.stderr||t.message}`)}const c=a.statSync(l);const u=Math.round((c.size-44)/32);return{wavPath:l,durationMs:u,needsCleanup:true}}async function needsConversion(e){try{const t=await getMediaInfo(e);if(t.hasVideo)return true;if(t.audioCodec!=="pcm_s16le")return true;if(t.sampleRate!==16e3)return true;if(t.channels!==1)return true;return false}catch{return true}}e.exports={getMediaInfo:getMediaInfo,extractAudioForAsr:extractAudioForAsr,needsConversion:needsConversion}},56:e=>{function parseParagraphs(e){const t=e.split(/\n\s*\n/).map((e=>e.replace(/^\d+[.、)\]]\s*/,"").trim())).filter((e=>e.length>0));return t}function createSilence(e,t){const o=Math.floor(t*e);return Buffer.alloc(o*2,0)}function buildWav(e,t){const o=24e3;const n=16;const s=1;const r=n/8;const a=s*r;const i=o*a;const l=createSilence(t,o);let c=0;for(let t=0;t<e.length;t++){c+=e[t].length;if(t<e.length-1){c+=l.length}}const u=Buffer.alloc(44);u.write("RIFF",0);u.writeUInt32LE(36+c,4);u.write("WAVE",8);u.write("fmt ",12);u.writeUInt32LE(16,16);u.writeUInt16LE(1,20);u.writeUInt16LE(s,22);u.writeUInt32LE(o,24);u.writeUInt32LE(i,28);u.writeUInt16LE(a,32);u.writeUInt16LE(n,34);u.write("data",36);u.writeUInt32LE(c,40);const p=[u];for(let t=0;t<e.length;t++){p.push(e[t]);if(t<e.length-1){p.push(l)}}return{wav:Buffer.concat(p),duration:c/i}}function getFileExtension(e){switch(e){case"mp3":return".mp3";case"wav":return".wav";case"pcm":default:return".wav"}}function concatAudioBuffers(e,t,o){if(t==="mp3"){const t=Buffer.concat(e);const o=t.length/4e3;return{audio:t,duration:o}}if(t==="wav"){const t=e.map(extractPcmFromWav);return buildWav(t,o)}return buildWav(e,o)}function extractPcmFromWav(e){const t=Buffer.from("data");let o=12;while(o<e.length-8){if(e.subarray(o,o+4).equals(t)){const t=e.readUInt32LE(o+4);return e.subarray(o+8,o+8+t)}const n=e.readUInt32LE(o+4);o+=8+n}return e.subarray(44)}e.exports={parseParagraphs:parseParagraphs,createSilence:createSilence,buildWav:buildWav,concatAudioBuffers:concatAudioBuffers,getFileExtension:getFileExtension}},986:(e,t,o)=>{const n=o(611);const s=o(896);const r=o(928);const a=o(982);const i=o(785);const{TOKEN_PATH:l,getConfigDir:c,LOGIN_PAGE:u,AUTH_TIMEOUT_MS:p,API_BASE:d}=o(782);const f=300;function readCachedToken(){try{const e=s.readFileSync(l,"utf8");const t=JSON.parse(e);if(!t.access_token)return null;const o=decodeJwtPayload(t.access_token);if(!o||!o.exp)return null;const n=Math.floor(Date.now()/1e3);if(o.exp-n<f)return null;return t}catch{return null}}function writeCachedToken(e){const t=c();s.mkdirSync(t,{recursive:true,mode:448});const o=l+".tmp";s.writeFileSync(o,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});s.renameSync(o,l)}function clearToken(){try{s.unlinkSync(l)}catch{}}function decodeJwtPayload(e){try{const t=e.split(".");if(t.length!==3)return null;const o=t[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(Buffer.from(o,"base64").toString("utf8"))}catch{return null}}function readEnvToken(){const e=(process.env.VOXFLOW_TOKEN||process.env.VOXFLOW_JWT||"").trim();if(!e)return null;const t=decodeJwtPayload(e);if(!t)return null;if(!t.exp)return null;const o=Math.floor(Date.now()/1e3);if(t.exp-o<f)return null;return e}async function getToken({api:e,force:t}={}){if(!t){const e=readEnvToken();if(e)return e}if(!t){const t=readCachedToken();if(t){const o=!e||e===t.api;if(o)return t.access_token}}return browserLogin(e||d)}function getTokenInfo(){const e=readCachedToken();if(!e)return null;const t=decodeJwtPayload(e.access_token);if(!t)return null;const o=Math.floor(Date.now()/1e3);return{email:t.email||e.email||"(unknown)",expiresAt:new Date(t.exp*1e3).toISOString(),remaining:t.exp-o,valid:t.exp-o>f,api:e.api||d}}function browserLogin(e){return new Promise(((t,s)=>{const r=a.randomBytes(16).toString("hex");let l=false;let c=null;function settle(o){if(l)return;l=true;clearTimeout(f);const n=decodeJwtPayload(o);writeCachedToken({access_token:o,expires_at:n?.exp||0,email:n?.email||"",api:e,cached_at:(new Date).toISOString()});if(c){c.close();c=null}d.close();t(o)}const d=n.createServer(((e,t)=>{const o=new URL(e.url,`http://127.0.0.1`);if(o.pathname!=="/callback"){t.writeHead(404,{"Content-Type":"text/plain"});t.end("Not Found");return}const n=o.searchParams.get("token");const s=o.searchParams.get("state");if(s!==r){t.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});t.end("<h1>Authentication failed</h1><p>State mismatch. Please try again.</p>");return}if(!n){t.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});t.end("<h1>Authentication failed</h1><p>No token received. Please try again.</p>");return}t.writeHead(200,{"Content-Type":"text/html; charset=utf-8"});t.end(`<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>Login successful</title></head>\n<body style="font-family:system-ui;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f0fdf4">\n<div style="text-align:center">\n<h1 style="color:#16a34a;font-size:2rem">Login successful</h1>\n<p style="color:#666;margin-top:0.5rem">voxflow CLI has been authorized. You can close this window.</p>\n</div></body></html>`);settle(n)}));d.listen(0,"127.0.0.1",(async()=>{const e=d.address().port;const t=`${u}?state=${r}&callback_port=${e}`;const n=process.stdin.isTTY;if(n){console.log("\n🔐 Login required. Opening browser...");console.log(` If the browser did not open, click or copy this link:\n ${t}\n`)}else{console.log("\n🔐 Login required. Click the link below to authorize:");console.log(`\n ${t}\n`);console.log(" Waiting up to 60s for browser callback...");console.log(" Tip: set VOXFLOW_TOKEN env var to skip login in automation.\n");const e=setTimeout((()=>{if(!l){l=true;d.close();s(new Error("Login timed out (60s). In non-interactive environments, set "+"VOXFLOW_TOKEN (or VOXFLOW_JWT) env var to skip browser login."))}}),6e4);d.once("close",(()=>clearTimeout(e)))}if(n){try{const e=(await o.e(935).then(o.bind(o,935))).default;const n=await e(t);if(n&&typeof n.on==="function"){n.on("error",(()=>{console.log(" Failed to open browser. Please copy the link above manually.\n");startStdinListener()}))}}catch{console.log(" Failed to open browser. Please copy the link above manually.\n");startStdinListener()}}function startStdinListener(){if(l||c||!process.stdin.isTTY)return;console.log(" After login, paste the token shown on the page and press Enter.");c=i.createInterface({input:process.stdin,output:process.stdout,terminal:false});process.stdout.write(" > Token: ");c.on("line",(e=>{const t=e.trim();if(!t)return;const o=decodeJwtPayload(t);if(!o){console.log(" Invalid token. Please paste the full token and try again.");process.stdout.write(" > Token: ");return}const n=Math.floor(Date.now()/1e3);if(o.exp&&o.exp<n){console.log(" Token has expired. Please log in again to get a new token.");process.stdout.write(" > Token: ");return}console.log(`\n✓ Authorized (${o.email||"user"})`);settle(t)}))}}));const f=setTimeout((()=>{if(!l){l=true;if(c){c.close();c=null}d.close();s(new Error(`Login timed out (${p/1e3}s). Please retry: voxflow login`))}}),p);d.on("close",(()=>clearTimeout(f)));d.on("error",(e=>{if(!l){l=true;if(c){c.close();c=null}s(new Error(`Failed to start local callback server: ${e.message}`))}}))}))}e.exports={getToken:getToken,clearToken:clearToken,getTokenInfo:getTokenInfo}},782:(e,t,o)=>{const n=o(928);const s=o(857);const r="https://api.voxflow.studio";const a="https://iwkonytsjysszmafqchh.supabase.co";const i="sb_publishable_TEh6H4K9OWXUNfWSeBKXlQ_hg7Zzm6b";const l="voxflow";function getConfigDir(){if(process.platform==="win32"){return n.join(process.env.APPDATA||n.join(s.homedir(),"AppData","Roaming"),l)}const e=process.env.XDG_CONFIG_HOME||n.join(s.homedir(),".config");return n.join(e,l)}const c=n.join(getConfigDir(),"token.json");const u={voice:"v-female-R2s4N9qJ",paragraphs:5,speed:1,silence:.8};const p={template:"interview",exchanges:8,length:"medium",style:"professional",speakers:2,silence:.5,speed:1,ducking:.2};const d={voice:"v-female-R2s4N9qJ",speed:1,volume:1,pitch:0};const f={voice:"v-female-R2s4N9qJ",speed:1,silence:.8};const g={voice:"v-female-R2s4N9qJ",speed:1,toleranceMs:50,ducking:.2};const m={lang:"16k_zh",mode:"auto",format:"srt",pollIntervalMs:3e3,pollTimeoutMs:3e5,engine:"auto",model:"base"};const h={batchSize:10,temperature:.3,maxTokens:2e3};const w={batchSize:10,speed:1};const v={voice:"v-female-R2s4N9qJ",speed:1,style:"modern",sceneCount:5,silence:.8,language:"en"};const x={voice:"v-female-R2s4N9qJ",speed:1,scheme:"aurora"};const y="https://voxflow.studio";const S=`${y}/cli-auth.html`;const $=`${y}/app`;const b=18e4;e.exports={API_BASE:r,WEB_BASE:y,DASHBOARD_URL:$,SUPABASE_URL:a,SUPABASE_ANON_KEY:i,TOKEN_PATH:c,getConfigDir:getConfigDir,DEFAULTS:u,STORY_DEFAULTS:u,PODCAST_DEFAULTS:p,SYNTHESIZE_DEFAULTS:d,NARRATE_DEFAULTS:f,DUB_DEFAULTS:g,ASR_DEFAULTS:m,TRANSLATE_DEFAULTS:h,VIDEO_TRANSLATE_DEFAULTS:w,EXPLAIN_DEFAULTS:v,PRESENT_DEFAULTS:x,LOGIN_PAGE:S,AUTH_TIMEOUT_MS:b}},567:(e,t,o)=>{const n=o(896);const s=o(928);const r=o(611);const a=o(692);const{request:i,throwApiError:l,throwNetworkError:c,ApiError:u}=o(852);const p={".wav":"audio/wav",".mp3":"audio/mpeg",".ogg":"audio/ogg",".m4a":"audio/x-m4a",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".avi":"video/x-msvideo",".mkv":"video/x-matroska",".flac":"audio/flac"};function getMimeType(e){const t=s.extname(e).toLowerCase();return p[t]||"application/octet-stream"}async function uploadFileToCos(e,t,o){const r=s.resolve(e);if(!n.existsSync(r)){throw new Error(`File not found: ${r}`)}const a=n.statSync(r);const p=s.basename(r);const d=getMimeType(r);const f=a.size;let g;try{const{status:e,data:n}=await i(`${t}/api/file-upload/get-upload-url`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}},{filename:p,fileType:d,fileSize:f});if(e!==200||n.code!=="success"){l(e,n,"Get upload URL")}g=n.data}catch(e){if(e instanceof u)throw e;c(e,t)}const{uploadUrl:m,key:h,bucket:w,region:v}=g;await putFile(m,r,d);let x;try{x=await getSignedDownloadUrl(t,o,h)}catch{x=`https://${w}.cos.${v}.myqcloud.com/${h}`}return{cosUrl:x,key:h}}function putFile(e,t,o){return new Promise(((s,i)=>{const l=new URL(e);const c=l.protocol==="https:"?a:r;const u=n.statSync(t).size;const p={hostname:l.hostname,port:l.port||(l.protocol==="https:"?443:80),path:l.pathname+l.search,method:"PUT",headers:{"Content-Type":o,"Content-Length":u}};const d=c.request(p,(e=>{const t=[];e.on("data",(e=>t.push(e)));e.on("end",(()=>{if(e.statusCode>=200&&e.statusCode<300){s()}else{const o=Buffer.concat(t).toString("utf8");i(new Error(`COS upload failed (${e.statusCode}): ${o.slice(0,300)}`))}}))}));d.on("error",(e=>i(new Error(`COS upload network error: ${e.message}`))));d.setTimeout(3e5,(()=>{d.destroy();i(new Error("COS upload timeout (5 min)"))}));const f=n.createReadStream(t);f.pipe(d);f.on("error",(e=>{f.destroy();d.destroy();i(new Error(`Failed to read file for upload: ${e.message}`))}))}))}async function getSignedDownloadUrl(e,t,o){const{status:n,data:s}=await i(`${e}/api/file-upload/get-download-url`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{key:o});if(n!==200||s.code!=="success"){throw new Error(`Failed to get download URL: ${s.message||n}`)}return s.data.downloadUrl}e.exports={uploadFileToCos:uploadFileToCos,getSignedDownloadUrl:getSignedDownloadUrl,getMimeType:getMimeType}},297:(e,t,o)=>{const{execFile:n}=o(317);const s=o(928);const r=o(896);function runCommand(e,t,o){return new Promise(((s,r)=>{n(e,t,{timeout:3e5,...o},((e,t,o)=>{if(e){e.stderr=o;e.stdout=t;r(e)}else{s({stdout:t,stderr:o})}}))}))}async function checkFfmpeg(){try{const{stdout:e}=await runCommand("ffmpeg",["-version"]);const t=e.match(/ffmpeg version (\S+)/);const o=t?t[1]:"unknown";let n=false;try{await runCommand("ffprobe",["-version"]);n=true}catch{}return{available:true,version:o,ffprobeAvailable:n}}catch{return{available:false}}}async function getAudioDuration(e){const t=s.resolve(e);try{const{stdout:e}=await runCommand("ffprobe",["-v","error","-show_entries","format=duration","-of","default=noprint_wrappers=1:nokey=1",t]);const o=parseFloat(e.trim());if(isNaN(o)){throw new Error(`Could not parse duration from ffprobe output: "${e.trim()}"`)}return Math.round(o*1e3)}catch(t){if(t.code==="ENOENT"){throw new Error("ffprobe not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to get duration of ${e}: ${t.message}`)}}async function extractAudio(e,t){const o=s.resolve(e);const n=s.resolve(t);try{await runCommand("ffmpeg",["-i",o,"-vn","-acodec","pcm_s16le","-ar","24000","-ac","1","-y",n]);return n}catch(t){if(t.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to extract audio from ${e}: ${t.stderr||t.message}`)}}async function mergeAudioVideo(e,t,o){const n=s.resolve(e);const r=s.resolve(t);const a=s.resolve(o);try{await runCommand("ffmpeg",["-i",n,"-i",r,"-c:v","copy","-map","0:v:0","-map","1:a:0","-shortest","-y",a]);return a}catch(e){if(e.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to merge audio/video: ${e.stderr||e.message}`)}}async function mixWithBgm(e,t,o,n={}){const r=n.ducking??.2;const a=s.resolve(e);const i=s.resolve(t);const l=s.resolve(o);try{await runCommand("ffmpeg",["-i",a,"-i",i,"-filter_complex",`[1:a]volume=${r}[bgm_low];`+`[0:a][bgm_low]amix=inputs=2:duration=first:dropout_transition=2[out]`,"-map","[out]","-acodec","pcm_s16le","-ar","24000","-ac","1","-y",l]);return l}catch(e){if(e.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to mix audio with BGM: ${e.stderr||e.message}`)}}async function warnIfMissingFfmpeg(e,t){const o=await checkFfmpeg();if(o.available)return o;const n=s.join(e,".ffmpeg-hint-shown");try{if(r.existsSync(n))return o}catch{}const a={dub:"video merging (--video), BGM mixing (--bgm), speed adjustment (--speed-auto)",asr:"audio format conversion, video audio extraction"};const i=a[t]||"audio/video processing";console.log("\n"+`[hint] ffmpeg not found — needed for ${i}.\n`+" Install: brew install ffmpeg (macOS) / sudo apt install ffmpeg (Linux)\n"+" Without ffmpeg, some features will be unavailable.\n");try{r.mkdirSync(e,{recursive:true});r.writeFileSync(n,(new Date).toISOString(),"utf8")}catch{}return o}e.exports={checkFfmpeg:checkFfmpeg,getAudioDuration:getAudioDuration,extractAudio:extractAudio,mergeAudioVideo:mergeAudioVideo,mixWithBgm:mixWithBgm,warnIfMissingFfmpeg:warnIfMissingFfmpeg}},852:(e,t,o)=>{const n=o(611);const s=o(692);class ApiError extends Error{constructor(e,t,o){super(e);this.name="ApiError";this.code=t;this.status=o}}function throwApiError(e,t,o){if(e===401){throw new ApiError(`Token expired or invalid. Run: voxflow login`,"token_expired",401)}if(e===429||t&&t.code==="quota_exceeded"){throw new ApiError(`Monthly quota exceeded. Resets in ~30 days. Check: voxflow status`,"quota_exceeded",429)}if(e>=500){throw new ApiError(`Server error (${e}). Please try again later.`,"server_error",e)}const n=t?.message||t?.code||JSON.stringify(t);throw new ApiError(`${o} failed (${e}): ${n}`,"api_error",e)}function throwNetworkError(e,t){const o=e.code||"";if(o==="ECONNREFUSED"||o==="ENOTFOUND"||o==="ETIMEDOUT"){throw new ApiError(`Cannot reach API server at ${t}. Check your internet connection or try --api <url>`,"network_error",0)}throw e}function request(e,t,o){return new Promise(((r,a)=>{const i=new URL(e);const l=i.protocol==="https:"?s:n;if(t.headers){t.headers["X-Client-Source"]="cli"}else{t.headers={"X-Client-Source":"cli"}}const c=l.request(i,t,(e=>{const t=[];e.on("data",(e=>t.push(e)));e.on("end",(()=>{const o=Buffer.concat(t).toString("utf8");try{r({status:e.statusCode,data:JSON.parse(o)})}catch{a(new Error(`Non-JSON response (${e.statusCode}): ${o.slice(0,200)}`))}}))}));c.on("error",(e=>a(e)));c.setTimeout(6e4,(()=>{c.destroy();a(new Error("Request timeout (60s)"))}));if(o)c.write(JSON.stringify(o));c.end()}))}e.exports={request:request,ApiError:ApiError,throwApiError:throwApiError,throwNetworkError:throwNetworkError}},425:(e,t,o)=>{const{INTENT_TTS_PARAMS:n,getIntentParams:s}=o(839);e.exports={INTENT_TTS_PARAMS:n,getIntentParams:s}},133:(e,t,o)=>{const{request:n,throwApiError:s,throwNetworkError:r}=o(852);async function chatCompletion({apiBase:e,token:t,messages:o,temperature:a=.3,maxTokens:i=2e3}){let l,c;try{({status:l,data:c}=await n(`${e}/api/llm/chat`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{messages:o,temperature:a,max_tokens:i}))}catch(t){r(t,e)}if(l!==200||c.code!=="success"){s(l,c,"LLM chat")}return{content:c.content,usage:c.usage,quota:c.quota}}async function detectLanguage({apiBase:e,text:t}){let o,s;try{({status:o,data:s}=await n(`${e}/api/lang-detect/detect`,{method:"POST",headers:{"Content-Type":"application/json"}},{text:t.slice(0,200)}))}catch{return"auto"}if(o===200&&s.code==="success"){return s.language}return"auto"}e.exports={chatCompletion:chatCompletion,detectLanguage:detectLanguage}},384:(e,t,o)=>{const{spawn:n}=o(317);const s=o(928);const r=o(857);const a=o(896);async function checkRecAvailable(){return new Promise((e=>{const t=n("rec",["--version"],{stdio:"pipe"});let o="";t.stdout.on("data",(e=>{o+=e}));t.stderr.on("data",(e=>{o+=e}));t.on("error",(()=>{e({available:false,error:"rec (sox) not found. Please install sox:\n"+" macOS: brew install sox\n"+" Ubuntu: sudo apt install sox\n"+" Windows: https://sourceforge.net/projects/sox/"})}));t.on("close",(t=>{e({available:t===0||o.length>0})}))}))}function recordMic(e={}){const{outputDir:t=r.tmpdir(),maxSeconds:o=300,silenceThreshold:i=0}=e;const l=s.join(t,`mic-${Date.now()}.wav`);return new Promise(((e,t)=>{const s=["-r","16000","-c","1","-b","16","-e","signed-integer",l,"trim","0",String(o)];if(i>0){s.push("silence","1","0.1","1%","1",String(i),"1%")}const r=n("rec",s,{stdio:["pipe","pipe","pipe"]});let c="";r.stderr.on("data",(e=>{c+=e.toString()}));r.on("error",(e=>{if(e.code==="ENOENT"){t(new Error("rec (sox) not found. Please install sox:\n"+" macOS: brew install sox\n"+" Ubuntu: sudo apt install sox\n"+" Windows: https://sourceforge.net/projects/sox/"))}else{t(new Error(`Microphone recording failed: ${e.message}`))}}));let u="timeout";r.on("close",(o=>{if(!a.existsSync(l)){return t(new Error(`Recording failed — no output file created.\n${c.slice(0,500)}`))}const n=a.statSync(l);if(n.size<100){a.unlinkSync(l);return t(new Error("Recording produced an empty file. Check that your microphone is connected and accessible."))}const s=Math.round((n.size-44)/32);e({wavPath:l,durationMs:s,stopped:u})}));const stopRecording=()=>{u="user";r.kill("SIGTERM")};if(process.stdin.isTTY){process.stdin.setRawMode(true);process.stdin.resume();const onKey=e=>{if(e[0]===13||e[0]===10||e[0]===113){u="user";process.stdin.setRawMode(false);process.stdin.removeListener("data",onKey);process.stdin.pause();r.kill("SIGTERM")}if(e[0]===3){u="user";process.stdin.setRawMode(false);process.stdin.removeListener("data",onKey);process.stdin.pause();r.kill("SIGTERM")}};process.stdin.on("data",onKey);r.on("close",(()=>{try{process.stdin.removeListener("data",onKey);if(process.stdin.isTTY){process.stdin.setRawMode(false)}process.stdin.pause()}catch{}}))}r._stopRecording=stopRecording}))}e.exports={recordMic:recordMic,checkRecAvailable:checkRecAvailable}},339:e=>{function startSpinner(e){const t=["|","/","-","\\"];let o=0;let n=e;process.stdout.write(e+" "+t[0]);const s=setInterval((()=>{o=(o+1)%t.length;process.stdout.write("\b"+t[o])}),120);return{stop(e){clearInterval(s);process.stdout.write("\b"+e+"\n")},update(e){process.stdout.write("\r"+" ".repeat(n.length+4)+"\r");n=e;process.stdout.write(e+" "+t[o])}}}e.exports={startSpinner:startSpinner}},813:e=>{function parseTimestamp(e){const t=e.trim().match(/^(\d{1,2}):(\d{2}):(\d{2})[,.](\d{3})$/);if(!t){throw new Error(`Invalid SRT timestamp: "${e}"`)}const[,o,n,s,r]=t;return parseInt(o,10)*36e5+parseInt(n,10)*6e4+parseInt(s,10)*1e3+parseInt(r,10)}function formatTimestamp(e){if(e<0)e=0;const t=Math.floor(e/36e5);e%=36e5;const o=Math.floor(e/6e4);e%=6e4;const n=Math.floor(e/1e3);const s=e%1e3;return String(t).padStart(2,"0")+":"+String(o).padStart(2,"0")+":"+String(n).padStart(2,"0")+","+String(s).padStart(3,"0")}function parseSrt(e){if(!e||e.trim().length===0){return[]}const t=[];const o=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n");const n=o.split(/\n\s*\n/).filter((e=>e.trim().length>0));for(const e of n){const o=e.trim().split("\n");if(o.length<2)continue;let n=0;let s;const r=o[0].trim();if(/^\d+$/.test(r)){s=parseInt(r,10);n=1}else{s=t.length+1}if(n>=o.length)continue;const a=o[n].trim();const i=a.match(/^(\d{1,2}:\d{2}:\d{2}[,.]\d{3})\s*-->\s*(\d{1,2}:\d{2}:\d{2}[,.]\d{3})/);if(!i)continue;const l=parseTimestamp(i[1]);const c=parseTimestamp(i[2]);n++;const u=o.slice(n).filter((e=>e.trim().length>0));if(u.length===0)continue;const p=u.join("\n");let d;let f=p;const g=p.match(/^\[Speaker:\s*([^\]]+)\]\s*/i);if(g){d=g[1].trim();f=p.slice(g[0].length)}if(f.trim().length===0)continue;t.push({id:s,startMs:l,endMs:c,text:f.trim(),...d?{speakerId:d}:{}})}t.sort(((e,t)=>e.startMs-t.startMs));return t}function formatSrt(e){return e.map(((e,t)=>{const o=e.id||t+1;const n=formatTimestamp(e.startMs);const s=formatTimestamp(e.endMs);const r=e.speakerId?`[Speaker: ${e.speakerId}] `:"";return`${o}\n${n} --\x3e ${s}\n${r}${e.text}`})).join("\n\n")+"\n"}function buildCaptionsFromFlash(e){const t=[];let o=1;for(const n of e){const e=n.sentence_list||[];for(const n of e){const e={id:o++,startMs:n.start_time||0,endMs:n.end_time||0,text:(n.text||"").trim()};if(n.speaker_id!==undefined&&n.speaker_id!==null){e.speakerId=`Speaker${n.speaker_id}`}if(e.text.length>0){t.push(e)}}}return t}function buildCaptionsFromSentence(e,t,o){if(!e||e.trim().length===0)return[];if(o&&o.length>0){return buildCaptionsFromWordList(o,e)}return[{id:1,startMs:0,endMs:Math.round(t*1e3),text:e.trim()}]}function buildCaptionsFromWordList(e,t){if(!e||e.length===0){return t?[{id:1,startMs:0,endMs:0,text:t}]:[]}const o=500;const n=5e3;const s=15e3;const r=/[.!?。!?…]+$/;const getWord=e=>e.word||e.Word||"";const getStart=e=>e.startTime??e.StartTime??0;const getEnd=e=>e.endTime??e.EndTime??0;const a=e.slice(0,10).map(getWord).join("");const i=(a.match(/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g)||[]).length;const l=i<a.length*.3;const c=l?" ":"";const u=[];let p=[];let d=getStart(e[0]);let f=d;function flushCaption(){if(p.length===0)return;const e=p.join(c).trim();if(e.length>0){u.push({id:u.length+1,startMs:d,endMs:f,text:e})}p=[]}for(let t=0;t<e.length;t++){const a=e[t];const i=getStart(a);const l=getEnd(a);const c=i-f;const u=i-d;if(c>o&&p.length>0){flushCaption();d=i}else if(p.length>0&&u>n&&r.test(p[p.length-1])){flushCaption();d=i}else if(p.length>0&&u>s){flushCaption();d=i}p.push(getWord(a));f=l||f}flushCaption();return u}function buildCaptionsFromFile(e,t){if(!e||e.trim().length===0)return[];if(/^\d+\s*\n\d{2}:\d{2}:\d{2}[,.]\d{3}\s*-->/.test(e.trim())){return parseSrt(e)}return[{id:1,startMs:0,endMs:Math.round(t*1e3),text:e.trim()}]}function formatPlainText(e,t={}){return e.map((e=>{const o=t.includeSpeakers&&e.speakerId?`[${e.speakerId}] `:"";return`${o}${e.text}`})).join("\n")+"\n"}function formatJson(e){return JSON.stringify(e,null,2)+"\n"}e.exports={parseSrt:parseSrt,formatSrt:formatSrt,parseTimestamp:parseTimestamp,formatTimestamp:formatTimestamp,buildCaptionsFromFlash:buildCaptionsFromFlash,buildCaptionsFromSentence:buildCaptionsFromSentence,buildCaptionsFromWordList:buildCaptionsFromWordList,buildCaptionsFromFile:buildCaptionsFromFile,formatPlainText:formatPlainText,formatJson:formatJson}},907:(e,t,o)=>{const{createSilence:n,buildWav:s}=o(56);const r=24e3;const a=2;const i=r*a/1e3;function msToBytes(e){const t=Math.round(e*i);return t-t%a}function buildTimelinePcm(e,t){if(!e||e.length===0){return{pcm:Buffer.alloc(0),durationMs:0}}const o=Math.max(...e.map((e=>e.endMs)));const n=t||o;const s=msToBytes(n);const r=Buffer.alloc(s,0);for(const t of e){const e=msToBytes(t.startMs);const o=msToBytes(t.endMs)-e;const n=Math.min(t.audioBuffer.length,o,s-e);if(n>0&&e<s){t.audioBuffer.copy(r,e,0,n)}}return{pcm:r,durationMs:n}}function buildTimelineAudio(e,t){const{pcm:o,durationMs:n}=buildTimelinePcm(e,t);if(o.length===0){return{wav:Buffer.alloc(0),duration:0}}const{wav:r}=s([o],0);return{wav:r,duration:n/1e3}}e.exports={buildTimelinePcm:buildTimelinePcm,buildTimelineAudio:buildTimelineAudio,msToBytes:msToBytes,SAMPLE_RATE:r,BYTES_PER_SAMPLE:a,BYTES_PER_MS:i}},675:(e,t,o)=>{const{request:n,throwApiError:s,throwNetworkError:r}=o(852);async function synthesizeTTS(e){const{apiBase:t,token:o,text:a,voiceId:i,speed:l=1,volume:c=1,pitch:u,format:p="pcm",index:d,total:f,label:g}=e;const m=g?` ${g}`:"";process.stdout.write(` TTS [${d+1}/${f}]${m}...`);const h={text:a,voiceId:i,speed:l,volume:c,format:p};if(u!=null&&u!==0)h.pitch=u;let w,v;try{({status:w,data:v}=await n(`${t}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}},h))}catch(e){console.log(" FAIL");r(e,t)}if(w!==200||v.code!=="success"){console.log(" FAIL");s(w,v,`TTS segment ${d+1}`)}const x=Buffer.from(v.audio,"base64");return{audio:x,quota:v.quota}}e.exports={synthesizeTTS:synthesizeTTS}},126:(e,t,o)=>{const n=o(896);const s=o(928);const{execFileSync:r}=o(317);const a={"16k_zh":"Chinese","16k_en":"English","16k_zh_en":"Chinese","16k_ja":"Japanese","16k_ko":"Korean","16k_zh_dialect":"Chinese","8k_zh":"Chinese","8k_en":"English",zh:"Chinese",en:"English",ja:"Japanese",ko:"Korean",auto:"auto"};function checkWhisperAvailable(){try{const e=resolveWhisperModule();if(e){return{available:true}}return{available:false,error:"nodejs-whisper is not installed.\n"+"Install it with: npm install -g nodejs-whisper\n"+"Then download a model: npx nodejs-whisper download"}}catch{return{available:false,error:"nodejs-whisper is not installed.\n"+"Install it with: npm install -g nodejs-whisper\n"+"Then download a model: npx nodejs-whisper download"}}}function resolveWhisperModule(){try{return require.resolve("nodejs-whisper")}catch{}try{const e=r("npm",["root","-g"],{encoding:"utf8"}).trim();const t=s.join(e,"nodejs-whisper");if(n.existsSync(t)){return t}}catch{}return null}function loadWhisperModule(){const e=resolveWhisperModule();if(!e){throw new Error("nodejs-whisper is not installed.\n"+"Install: npm install -g nodejs-whisper\n"+"Then: npx nodejs-whisper download")}const t=require(e);return t.nodewhisper||t.default||t}async function transcribeLocal(e,t={}){const{model:o="base",lang:s="16k_zh"}=t;if(!n.existsSync(e)){throw new Error(`WAV file not found: ${e}`)}const r=loadWhisperModule();const i=a[s]||a["auto"]||"auto";const l=o;await r(e,{modelName:l,autoDownloadModelName:l,removeWavFileAfterTranscription:false,whisperOptions:{outputInJson:true,outputInSrt:false,outputInVtt:false,outputInTxt:false,wordTimestamps:true,splitOnWord:true,language:i==="auto"?undefined:i}});const c=e+".json";if(!n.existsSync(c)){const t=e.replace(/\.wav$/i,"");const o=[t+".json",e+".json"];const s=o.find((e=>n.existsSync(e)));if(!s){throw new Error("Whisper completed but no JSON output found.\n"+`Expected: ${c}\n`+"Ensure nodejs-whisper is correctly installed.")}}const u=n.readFileSync(c,"utf8");const p=JSON.parse(u);const d=p.transcription||p.segments||[];const f=parseWhisperOutput(d);cleanupWhisperFiles(e);return f}function parseWhisperOutput(e){if(!e||!Array.isArray(e))return[];let t=0;const o=[];for(const n of e){const e=(n.text||"").trim();if(!e)continue;t++;let s=0;let r=0;if(n.timestamps){s=parseTimestamp(n.timestamps.from);r=parseTimestamp(n.timestamps.to)}else if(n.offsets){s=n.offsets.from||0;r=n.offsets.to||0}else if(typeof n.start==="number"){s=Math.round(n.start*1e3);r=Math.round(n.end*1e3)}o.push({id:t,startMs:s,endMs:r,text:e})}return o}function parseTimestamp(e){if(!e||typeof e!=="string")return 0;const t=e.match(/^(\d+):(\d+):(\d+)\.(\d+)$/);if(!t)return 0;const o=parseInt(t[1],10);const n=parseInt(t[2],10);const s=parseInt(t[3],10);const r=parseInt(t[4].padEnd(3,"0").slice(0,3),10);return(o*3600+n*60+s)*1e3+r}function cleanupWhisperFiles(e){const t=[".json",".srt",".vtt",".txt",".lrc",".wts"];for(const o of t){const t=e+o;try{if(n.existsSync(t)){n.unlinkSync(t)}}catch{}}}e.exports={checkWhisperAvailable:checkWhisperAvailable,transcribeLocal:transcribeLocal,parseWhisperOutput:parseWhisperOutput,parseTimestamp:parseTimestamp,LANG_MAP:a}},317:e=>{"use strict";e.exports=require("child_process")},982:e=>{"use strict";e.exports=require("crypto")},896:e=>{"use strict";e.exports=require("fs")},611:e=>{"use strict";e.exports=require("http")},692:e=>{"use strict";e.exports=require("https")},573:e=>{"use strict";e.exports=require("node:buffer")},421:e=>{"use strict";e.exports=require("node:child_process")},24:e=>{"use strict";e.exports=require("node:fs")},455:e=>{"use strict";e.exports=require("node:fs/promises")},161:e=>{"use strict";e.exports=require("node:os")},760:e=>{"use strict";e.exports=require("node:path")},708:e=>{"use strict";e.exports=require("node:process")},136:e=>{"use strict";e.exports=require("node:url")},975:e=>{"use strict";e.exports=require("node:util")},857:e=>{"use strict";e.exports=require("os")},928:e=>{"use strict";e.exports=require("path")},785:e=>{"use strict";e.exports=require("readline")},330:e=>{"use strict";e.exports=JSON.parse('{"name":"voxflow","version":"1.5.4","description":"AI audio content creation CLI — stories, podcasts, narration, dubbing, transcription, translation, and video translation with TTS","bin":{"voxflow":"./dist/index.js"},"files":["dist/index.js","dist/935.index.js","README.md"],"engines":{"node":">=18.0.0"},"dependencies":{"open":"^10.0.0"},"keywords":["tts","story","podcast","ai","audio","text-to-speech","voice","narration","dubbing","synthesize","voices","document","translate","subtitle","srt","transcribe","asr","video-translate","video","voxflow"],"scripts":{"build":"ncc build bin/voxflow.js -o dist --minify && rm -rf dist/cli","prepublishOnly":"npm run build","test":"node --test tests/*.test.js"},"author":"gonghaoran","license":"UNLICENSED","homepage":"https://voxflow.studio","repository":{"type":"git","url":"https://github.com/VoxFlowStudio/FlowStudio","directory":"cli"},"publishConfig":{"access":"public"},"devDependencies":{"@vercel/ncc":"^0.38.4"}}')}};var t={};function __nccwpck_require__(o){var n=t[o];if(n!==undefined){return n.exports}var s=t[o]={exports:{}};var r=true;try{e[o](s,s.exports,__nccwpck_require__);r=false}finally{if(r)delete t[o]}return s.exports}__nccwpck_require__.m=e;(()=>{__nccwpck_require__.d=(e,t)=>{for(var o in t){if(__nccwpck_require__.o(t,o)&&!__nccwpck_require__.o(e,o)){Object.defineProperty(e,o,{enumerable:true,get:t[o]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,o)=>{__nccwpck_require__.f[o](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var o=t.modules,n=t.ids,s=t.runtime;for(var r in o){if(__nccwpck_require__.o(o,r)){__nccwpck_require__.m[r]=o[r]}}if(s)s(__nccwpck_require__);for(var a=0;a<n.length;a++)e[n[a]]=1};__nccwpck_require__.f.require=(t,o)=>{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var o={};const{run:n}=__nccwpck_require__(6);n().catch((e=>{console.error(`\nFatal error: ${e.message}`);process.exit(1)}));module.exports=o})();
2
+ (()=>{var e={7171:e=>{const t={opening:{speed:1,volume:1},explain:{speed:.95,volume:1},question:{speed:1.05,volume:1.05},react:{speed:1,volume:.95},debate:{speed:1.1,volume:1.1},summary:{speed:.9,volume:1},summarize:{speed:.9,volume:1},transition:{speed:1.1,volume:.9},joke:{speed:1.05,volume:1.05},closing:{speed:.95,volume:.95}};function getIntentParams(e){if(!e||typeof e!=="string"){return{speed:1,volume:1}}return t[e]||{speed:1,volume:1}}e.exports={INTENT_TTS_PARAMS:t,getIntentParams:getIntentParams}},9226:(e,t,a)=>{const r=a(8330);const n={login:"./commands/auth-cmds",logout:"./commands/auth-cmds",status:"./commands/auth-cmds",dashboard:"./commands/auth-cmds",story:"./commands/story",generate:"./commands/story",podcast:"./commands/podcast",synthesize:"./commands/synthesize",say:"./commands/synthesize",narrate:"./commands/narrate",voices:"./commands/voices",dub:"./commands/dub",asr:"./commands/asr",transcribe:"./commands/asr",translate:"./commands/translate","video-translate":"./commands/video-translate",publish:"./commands/publish",explain:"./commands/explain",present:"./commands/present",summarize:"./commands/summarize",slides:"./commands/slides"};const o={generate:"story",say:"synthesize",transcribe:"asr"};const i={login:"handleLogin",logout:"handleLogout",status:"handleStatus",dashboard:"handleDashboard"};async function run(e){const t=e||process.argv.slice(2);const a=t[0];if(!a||a==="--help"||a==="-h"){printHelp();return}if(a==="--version"||a==="-v"){console.log(r.version);return}if(t.includes("--help")||t.includes("-h")){printSubcommandHelp(a);return}const s=n[a];if(!s){console.error(`Unknown command: ${a}\nRun voxflow --help for usage.`);process.exit(1)}const l=require(s);if(i[a]){return l[i[a]](t.slice(1))}const c=o[a];if(c){const e=require(n[c]);return e.handle(t.slice(1))}return l.handle(t.slice(1))}function getAllMeta(){const e=a(7823).meta;const t=a(3362).meta;const r=a(8167).meta;const n=a(5859).meta;const o=a(4268).meta;const i=a(2972).meta;const s=a(220).meta;const l=a(5357).meta;const c=a(173).meta;const A=a(6851).meta;const d=a(4460).meta;const p=a(6352).meta;const u=a(8204).meta;const f=a(6046).meta;const h=a(1089).meta;return{...e,...t,...r,...n,...o,...i,...s,...l,...c,...A,...d,...p,...u,...f,...h,say:{alias:"synthesize",description:"Alias for synthesize"},generate:{alias:"story",description:"Alias for story"},transcribe:{alias:"asr",description:"Alias for asr"}}}function printHelp(){const e=getAllMeta();const t=[`\nvoxflow v${r.version} — AI audio content creation CLI`,"","Usage:"," voxflow <command> [options]","","Commands:"];for(const[a,r]of Object.entries(e)){if(r.alias)continue;const e=(a+(r.usage?" "+r.usage:"")).padEnd(18);t.push(` ${e} ${r.description}`)}t.push("");for(const[a,r]of Object.entries(e)){if(r.alias||!r.options)continue;const e=r.aliasOf?`${a} options (alias: ${r.aliasOf}):`:`${a} options:`;t.push(e.charAt(0).toUpperCase()+e.slice(1));t.push(...r.options.map((e=>" "+e)));t.push("")}t.push("Common options:"," --help, -h Show help (use with a command for command-specific help)"," --version, -v Show version","","Advanced options:"," --api <url> Override API endpoint (for self-hosted servers)"," --token <jwt> Use explicit token (CI/CD, skip browser login)","","Examples:");for(const[,a]of Object.entries(e)){if(a.alias||!a.examples)continue;t.push(...a.examples.map((e=>" "+e)))}console.log(t.join("\n"))}function printSubcommandHelp(e){const t=getAllMeta();const a=t[e];if(!a){printHelp();return}const r=a.alias?t[a.alias]:a;if(!r||!r.options){printHelp();return}const n=a.alias||e;const o=[`\nvoxflow ${n} — ${r.description}`,"","Usage:",` voxflow ${n}${r.usage?" "+r.usage:""}`,"","Options:",...r.options.map((e=>" "+e))," --api <url> Override API endpoint"," --token <jwt> Use explicit token (skip browser login)"];if(r.examples&&r.examples.length>0){o.push("","Examples:",...r.examples.map((e=>" "+e)))}console.log(o.join("\n"))}e.exports={run:run}},5357:(e,t,a)=>{const r=a(9896);const n=a(6928);const{API_BASE:o,ASR_DEFAULTS:i}=a(3282);const{ApiError:s}=a(2768);const{getMediaInfo:l,extractAudioForAsr:c}=a(7656);const{uploadFileToCos:A}=a(3931);const{recognize:d,detectMode:p,SENTENCE_MAX_MS:u,FLASH_MAX_MS:f,BASE64_MAX_BYTES:h,TASK_STATUS:m}=a(4142);const{formatSrt:g,formatPlainText:v,formatJson:b,buildCaptionsFromFlash:y,buildCaptionsFromSentence:w,buildCaptionsFromFile:x}=a(8217);const{checkWhisperAvailable:S,transcribeLocal:C}=a(4178);const T={"16k_zh":"Chinese (16kHz)","16k_en":"English (16kHz)","16k_zh_en":"Chinese-English (16kHz)","16k_ja":"Japanese (16kHz)","16k_ko":"Korean (16kHz)","16k_zh_dialect":"Chinese dialect (16kHz)","8k_zh":"Chinese (8kHz phone)","8k_en":"English (8kHz phone)"};const k={srt:".srt",txt:".txt",json:".json"};async function asr(e){let t=false;let a=[];const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nASR cancelled.");for(const e of a){try{r.unlinkSync(e)}catch{}}process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _asr(e,a)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _asr(e,t){const{token:s,api:u=o,input:f,url:S,mic:C=false,mode:P=i.mode,lang:E=i.lang,format:_=i.format,output:L,speakers:B=false,speakerNumber:D=0,taskId:I,engine:N="auto",model:F="base"}=e;if(I){return await resumePoll({apiBase:u,token:s,taskId:I,format:_,output:L,lang:E})}const R=resolveEngine(N);if(R==="local"){return await _asrLocal({input:f,format:_,output:L,model:F,lang:E})}const M=[f,S,C].filter(Boolean).length;if(M===0){throw new Error("No input specified. Provide one of:\n"+" --input <file> Local audio/video file\n"+" --url <url> Remote audio URL\n"+" --mic Record from microphone")}if(M>1){throw new Error("Specify only one input source: --input, --url, or --mic")}console.log("\n=== VoxFlow ASR ===");let O=f?n.resolve(f):null;if(C){O=await handleMicInput();t.push(O)}try{if(O&&!r.existsSync(O)){throw new Error(`Input file not found: ${O}`)}let e=0;let o=0;let i=S||null;if(O){console.log(`Input: ${n.basename(O)}`);const a=await l(O);e=a.durationMs;o=r.statSync(O).size;const i=formatDuration(e);const s=formatSize(o);console.log(`Duration: ${i}`);console.log(`Size: ${s}`);if(!a.hasAudio){throw new Error("Input file has no audio track.")}console.log(`\n[1/3] Extracting audio (16kHz mono WAV)...`);const A=await c(O);t.push(A.wavPath);e=A.durationMs;o=r.statSync(A.wavPath).size;O=A.wavPath;console.log(` OK (${formatSize(o)}, ${formatDuration(e)})`)}else{console.log(`Input: ${S}`);console.log(`(Remote URL — duration will be detected by ASR API)`)}const I=!!i;const N=P==="auto"?p(e,I||!!O,o):P;console.log(`Mode: ${N}`);console.log(`Language: ${T[E]||E}`);console.log(`Format: ${_}`);if(O&&!i){const e=N==="flash"||N==="file"&&o>h||N==="sentence"&&o>h;if(e){console.log(`\n[2/3] Uploading to COS...`);const e=await A(O,u,s);i=e.cosUrl;console.log(` OK (${e.key})`)}else{console.log(`\n[2/3] Uploading to COS... (skipped, using base64)`)}}else if(!O&&i){console.log(`\n[2/3] Uploading to COS... (skipped, using remote URL)`)}console.log(`\n[3/3] ASR speech recognition (${N})...`);const F=Date.now();const R=await d({apiBase:u,token:s,mode:N,url:i,filePath:!i?O:undefined,durationMs:e,fileSize:o,lang:E,speakerDiarization:B,speakerNumber:D,wordInfo:_==="srt",onProgress:(e,t)=>{const a=e===m.WAITING?"Queued":e===m.PROCESSING?"Recognizing":"Unknown";process.stdout.write(`\r ${a}... (${Math.round(t/1e3)}s)`)}});const M=((Date.now()-F)/1e3).toFixed(1);console.log(`\n OK (${M}s)`);const z=R.audioTime||e/1e3||0;let $;switch(R.mode){case"flash":$=y(R.flashResult||[]);break;case"sentence":$=w(R.result,z,R.wordList);break;case"file":$=x(R.result,z);break;default:$=[{id:1,startMs:0,endMs:0,text:R.result||""}]}let U;switch(_){case"srt":U=g($);break;case"txt":U=v($,{includeSpeakers:B});break;case"json":U=b($);break;default:throw new Error(`Unknown format: ${_}. Use: srt, txt, json`)}const j=k[_]||".txt";let W;if(L){W=n.resolve(L)}else if(f){const e=n.basename(f,n.extname(f));W=a.ab+"cli/"+n.dirname(f)+"/"+e+""+j}else if(C){W=n.resolve(`mic-${Date.now()}${j}`)}else{try{const e=new URL(S);const t=n.basename(e.pathname,n.extname(e.pathname))||"asr";W=a.ab+"cli/"+t+""+j}catch{W=n.resolve(`asr-${Date.now()}${j}`)}}r.writeFileSync(W,U,"utf8");const X=R.quota||{};const q=1;const G=X.remaining??"?";console.log(`\n=== Done ===`);console.log(`Output: ${W}`);console.log(`Captions: ${$.length}`);console.log(`Duration: ${formatDuration(e||(R.audioTime||0)*1e3)}`);console.log(`Mode: ${R.mode}`);console.log(`Quota: ${q} used, ${G} remaining`);if($.length>0&&_!=="json"){console.log(`\n--- Preview ---`);const e=$.slice(0,3);for(const t of e){const e=formatDuration(t.startMs);const a=t.speakerId?`[${t.speakerId}] `:"";const r=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${e} ${a}${r}`)}if($.length>3){console.log(` ... (${$.length-3} more)`)}}return{outputPath:W,mode:R.mode,duration:e/1e3,captionCount:$.length,quotaUsed:q}}finally{for(const e of t){try{r.unlinkSync(e)}catch{}}}}async function _asrLocal(e){const{input:t,format:o=i.format,output:s,model:A="base",lang:d=i.lang}=e;console.log("\n=== VoxFlow ASR (Local Whisper) ===");if(!t){throw new Error("Local whisper engine requires --input <file>.\n"+"URL and microphone input are cloud-only features.\n"+"Use: voxflow asr --input <file> --engine local")}const p=n.resolve(t);if(!r.existsSync(p)){throw new Error(`Input file not found: ${p}`)}const u=await l(p);console.log(`Input: ${n.basename(p)}`);console.log(`Duration: ${formatDuration(u.durationMs)}`);console.log(`Engine: whisper (local)`);console.log(`Model: ${A}`);console.log(`\n[1/2] Extracting audio (16kHz mono WAV)...`);const f=await c(p);console.log(` OK (${formatSize(r.statSync(f.wavPath).size)})`);console.log(`[2/2] Whisper local recognition...`);const h=Date.now();const m=await C(f.wavPath,{model:A,lang:d});const y=((Date.now()-h)/1e3).toFixed(1);console.log(` OK (${y}s, ${m.length} segments)`);try{r.unlinkSync(f.wavPath)}catch{}let w;switch(o){case"srt":w=g(m);break;case"txt":w=v(m);break;case"json":w=b(m);break;default:throw new Error(`Unknown format: ${o}. Use: srt, txt, json`)}const x=k[o]||".txt";const S=s?n.resolve(s):a.ab+"cli/"+n.dirname(t)+"/"+n.basename(t,n.extname(t))+""+x;r.writeFileSync(S,w,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${S}`);console.log(`Captions: ${m.length}`);console.log(`Duration: ${formatDuration(u.durationMs)}`);console.log(`Engine: whisper (local, no quota used)`);if(m.length>0&&o!=="json"){console.log(`\n--- Preview ---`);const e=m.slice(0,3);for(const t of e){const e=formatDuration(t.startMs);const a=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${e} ${a}`)}if(m.length>3){console.log(` ... (${m.length-3} more)`)}}return{outputPath:S,mode:"local",duration:u.durationMs/1e3,captionCount:m.length,quotaUsed:0}}function resolveEngine(e){if(e==="local"||e==="whisper"){const e=S();if(!e.available){throw new Error("Local whisper engine requires nodejs-whisper.\n"+"Install: npm install -g nodejs-whisper\n"+"Download a model: npx nodejs-whisper download\n"+"Or use: --engine cloud")}return"local"}if(e==="cloud"||e==="tencent")return"cloud";if(e==="auto"){const{available:e}=S();return e?"local":"cloud"}return"cloud"}async function resumePoll({apiBase:e,token:t,taskId:o,format:i,output:s,lang:l}){console.log(`\n=== VoxFlow ASR — Resume Task ===`);console.log(`Task ID: ${o}`);const{pollTaskResult:c,TASK_STATUS:A}=a(4142);console.log(`Polling...`);const d=await c({apiBase:e,token:t,taskId:o,onProgress:(e,t)=>{const a=e===A.WAITING?"Queued":e===A.PROCESSING?"Recognizing":"?";process.stdout.write(`\r ${a}... (${Math.round(t/1e3)}s)`)}});console.log(`\n OK`);const p=x(d.result,d.audioTime);let u;switch(i){case"srt":u=g(p);break;case"txt":u=v(p);break;case"json":u=b(p);break;default:u=v(p)}const f=k[i]||".txt";const h=s?n.resolve(s):n.resolve(`task-${o}${f}`);r.writeFileSync(h,u,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${h}`);console.log(`Captions: ${p.length}`);console.log(`Duration: ${formatDuration((d.audioTime||0)*1e3)}`);return{outputPath:h,mode:"file",duration:d.audioTime,captionCount:p.length}}async function handleMicInput(){const{recordMic:e,checkRecAvailable:t}=a(132);const r=await t();if(!r.available){throw new Error(r.error)}console.log(`\nRecording from microphone...`);console.log(` Press Enter or Q to stop recording.`);console.log(` Max duration: 5 minutes.\n`);const{wavPath:n,durationMs:o,stopped:i}=await e({maxSeconds:300});console.log(`\n Recording ${i==="user"?"stopped":"finished"}: ${formatDuration(o)}`);return n}function formatDuration(e){if(!e||e<=0)return"0s";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const a=Math.floor(t/60);const r=t%60;if(a<60)return`${a}m${r>0?r+"s":""}`;const n=Math.floor(a/60);const o=a%60;return`${n}h${o>0?o+"m":""}`}function formatSize(e){if(e<1024)return`${e} B`;if(e<1024*1024)return`${(e/1024).toFixed(1)} KB`;return`${(e/1024/1024).toFixed(1)} MB`}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseBoolFlag:n,runWithRetry:o}=a(5537);const{getToken:i,getTokenInfo:s}=a(598);const{API_BASE:l,ASR_DEFAULTS:c,getConfigDir:A}=a(3282);const{warnIfMissingFfmpeg:d}=a(9933);await d(A(),"asr");const p=t(e,"--api")||l;const u=t(e,"--token");const f=t(e,"--engine")||c.engine;const h=t(e,"--model")||c.model;if(f&&!["auto","local","cloud","whisper","tencent"].includes(f)){console.error(`Error: --engine must be one of: auto, local, cloud (got: "${f}")`);process.exit(1)}if(h&&!["tiny","base","small","medium","large"].includes(h)){console.error(`Error: --model must be one of: tiny, base, small, medium, large (got: "${h}")`);process.exit(1)}const m=t(e,"--input");const g=t(e,"--url");const v=n(e,"--mic");const b=t(e,"--mode")||c.mode;const y=t(e,"--lang")||t(e,"--language")||c.lang;const w=t(e,"--format")||c.format;const x=t(e,"--output");const S=n(e,"--speakers");const C=r(e,"--speaker-number");const T=r(e,"--task-id");if(b&&!["auto","sentence","flash","file"].includes(b)){console.error(`Error: --mode must be one of: auto, sentence, flash, file (got: "${b}")`);process.exit(1)}if(w&&!["srt","txt","json"].includes(w)){console.error(`Error: --format must be one of: srt, txt, json (got: "${w}")`);process.exit(1)}if(m){const e=a(9896);const t=a(6928);const r=t.resolve(m);if(!e.existsSync(r)){console.error(`Error: Input file not found: ${r}`);process.exit(1)}}const k=f==="local"||f==="whisper";let P;if(k){P=null}else if(u){P=u}else{P=await i({api:p});const e=s();if(e){console.log(`Logged in as ${e.email}`)}}const E={token:P,api:p,input:m,url:g,mic:v,mode:b,lang:y,format:w,output:x,speakers:S,speakerNumber:C,taskId:T,engine:f,model:h};if(k){await asr(E)}else{await o(asr,E,p,u)}}const P={asr:{usage:"[opts]",description:"Transcribe audio/video to text (alias: transcribe)",aliasOf:"transcribe",options:[`--input <file> Local audio or video file to transcribe`,`--url <url> Remote audio URL to transcribe (cloud only)`,`--mic Record from microphone (cloud only, requires sox)`,`--engine <type> auto (default) | local | cloud`,`--model <name> Whisper model: tiny, base (default), small, medium, large`,`--mode <type> auto (default) | sentence | flash | file (cloud only)`,`--lang <model> Language: 16k_zh (default), 16k_en, 16k_zh_en, 16k_ja, 16k_ko (alias: --language)`,`--format <fmt> Output format: srt (default), txt, json`,`--output <path> Output file path (default: <input>.<format>)`,`--speakers Enable speaker diarization (cloud flash/file mode)`,`--speaker-number <n> Expected number of speakers (with --speakers)`,`--task-id <id> Resume polling an existing async task (cloud only)`],examples:["voxflow asr --input recording.mp3","voxflow asr --input recording.mp3 --engine local --model small","voxflow asr --input video.mp4 --format srt --lang 16k_zh","voxflow transcribe --input meeting.wav --speakers --speaker-number 3"]}};e.exports={asr:asr,handle:handle,meta:P,ApiError:s}},7823:(e,t,a)=>{const{getToken:r,clearToken:n,getTokenInfo:o,terminalOtpLogin:i}=a(598);const{API_BASE:s,DASHBOARD_URL:l}=a(3282);const{parseFlag:c,parseBoolFlag:A}=a(5537);async function handleLogin(e){const t=c(e,"--api")||s;const a=A(e,"--otp");if(a){await i(t)}else{console.log("Logging in...");const e=await r({api:t,force:true});void e}const n=o();if(n){console.log(`Logged in as ${n.email}`);console.log(`Token expires: ${n.expiresAt}`);console.log(`API: ${n.api}`)}}function handleLogout(){n();console.log("Logged out. Token cache cleared.")}function handleStatus(){const e=o();if(!e){console.log("Not logged in. Run: voxflow login");return}console.log(`Email: ${e.email}`);console.log(`API: ${e.api}`);console.log(`Expires: ${e.expiresAt}`);console.log(`Valid: ${e.valid?"yes":"expired"}`);if(!e.valid){console.log("\nToken expired. Run: voxflow login")}console.log(`\nDashboard: ${l}`);console.log("Run voxflow dashboard to open in browser.")}async function handleDashboard(){const e=l;console.log(`\nOpening dashboard: ${e}`);try{const t=(await a.e(609).then(a.bind(a,5609))).default;const r=await t(e);if(r&&typeof r.on==="function"){r.on("error",(()=>{console.log("Failed to open browser. Visit manually:");console.log(` ${e}`)}))}}catch{console.log("Failed to open browser. Visit manually:");console.log(` ${e}`)}}const d={login:{usage:"[--otp]",description:"Login via browser (default) or terminal OTP (--otp)",options:["--otp Login via email + verification code in terminal (no browser)"]},logout:{usage:"",description:"Clear cached token"},status:{usage:"",description:"Show login status and token info"},dashboard:{usage:"",description:"Open Web dashboard in browser"}};e.exports={handleLogin:handleLogin,handleLogout:handleLogout,handleStatus:handleStatus,handleDashboard:handleDashboard,meta:d}},220:(e,t,a)=>{const r=a(9896);const n=a(6928);const{DUB_DEFAULTS:o}=a(3282);const{ApiError:i}=a(2768);const{buildWav:s,getFileExtension:l}=a(7188);const{parseSrt:c,formatSrt:A}=a(8217);const{buildTimelinePcm:d,buildTimelineAudio:p,msToBytes:u,BYTES_PER_MS:f}=a(9167);const{startSpinner:h}=a(5319);const{synthesizeTTS:m}=a(1428);function parseVoicesMap(e){if(!r.existsSync(e)){throw new Error(`Voices map file not found: ${e}`)}let t;try{t=JSON.parse(r.readFileSync(e,"utf8"))}catch(e){throw new Error(`Invalid JSON in voices map: ${e.message}`)}if(typeof t!=="object"||t===null||Array.isArray(t)){throw new Error('Voices map must be a JSON object: { "SpeakerName": "voiceId", ... }')}for(const[e,a]of Object.entries(t)){if(typeof a!=="string"||a.trim().length===0){throw new Error(`Invalid voice ID for speaker "${e}": must be a non-empty string`)}}return t}async function synthesizeCaption(e,t,a,r,n,o,i,s){const l=await m({apiBase:e,token:t,text:a,voiceId:r,speed:n??1,format:o||"pcm",index:i,total:s});const c=l.audio.length/f;console.log(` OK (${(l.audio.length/1024).toFixed(0)} KB, ${(c/1e3).toFixed(1)}s)`);return{audio:l.audio,quota:l.quota,durationMs:c}}async function dub(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nDubbing cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _dub(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _dub(e){const t=e.srt;if(!t){throw new Error("No SRT file provided. Usage: voxflow dub --srt <file.srt>")}const i=n.resolve(t);if(!r.existsSync(i)){throw new Error(`SRT file not found: ${i}`)}const s=r.readFileSync(i,"utf8");const l=c(s);if(l.length===0){throw new Error("SRT file contains no valid captions")}const A=e.voice||o.voice;const d=e.speed??o.speed;const u=e.speedAuto||false;const f=o.toleranceMs;const h=e.api;const m=e.token;const g=e.patch;const v=[];let b=null;if(e.voicesMap){b=parseVoicesMap(n.resolve(e.voicesMap))}let y=e.output;const w=!!e.video;const x=w?".mp4":".wav";if(!y){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);y=n.resolve(`dub-${e}${x}`)}console.log("\n=== VoxFlow Dub ===");console.log(`SRT: ${t} (${l.length} captions)`);console.log(`Voice: ${A}${b?` + voices map (${Object.keys(b).length} speakers)`:""}`);console.log(`Speed: ${d}${u?" (auto-compensate)":""}`);if(w)console.log(`Video: ${e.video}`);if(e.bgm)console.log(`BGM: ${e.bgm} (ducking: ${e.ducking??o.ducking})`);if(g!=null)console.log(`Patch: caption #${g}`);console.log(`Output: ${y}`);if(g!=null){return _dubPatch(e,l,y,v,b)}console.log(`\n[1/2] Synthesizing TTS audio (${l.length} captions)...`);const S=[];let C=null;let T=0;for(let e=0;e<l.length;e++){const t=l[e];const a=t.endMs-t.startMs;let r=A;if(b&&t.speakerId&&b[t.speakerId]){r=b[t.speakerId]}let n=await synthesizeCaption(h,m,t.text,r,d,"pcm",e,l.length);T++;C=n.quota;if(u&&n.durationMs>a+f){const o=n.durationMs/a;if(o<=2){const i=Math.min(d*o,2);process.stdout.write(` ↳ Re-synth #${t.id} (${(n.durationMs/1e3).toFixed(1)}s > ${(a/1e3).toFixed(1)}s, speed: ${i.toFixed(2)})...`);n=await synthesizeCaption(h,m,t.text,r,i,"pcm",e,l.length);T++;C=n.quota}else{const i=`Caption #${t.id}: audio too long (${(n.durationMs/1e3).toFixed(1)}s for ${(a/1e3).toFixed(1)}s slot, alpha=${o.toFixed(1)}). Consider shortening text.`;v.push(i);console.log(` ⚠ OVERFLOW: ${i}`);const s=await synthesizeCaption(h,m,t.text,r,2,"pcm",e,l.length);T++;C=s.quota;n=s}}S.push({startMs:t.startMs,endMs:t.endMs,audioBuffer:n.audio})}console.log("\n[2/2] Building timeline audio...");const{wav:k,duration:P}=p(S);const E=w?y.replace(/\.[^.]+$/,".wav"):y;const _=n.dirname(E);r.mkdirSync(_,{recursive:true});r.writeFileSync(E,k);const L=E.replace(/\.(wav|mp3|mp4)$/i,".txt");const B=l.map((e=>{const t=e.speakerId?`|${e.speakerId}`:"";const a=b&&e.speakerId&&b[e.speakerId]?`|${b[e.speakerId]}`:"";return`[${e.id}${t}${a}] ${e.text}`})).join("\n\n");r.writeFileSync(L,B,"utf8");const D=w||e.bgm;if(D){const{checkFfmpeg:t,mergeAudioVideo:n,mixWithBgm:i}=a(9933);const s=await t();if(!s.available){throw new Error("ffmpeg is required for BGM mixing / video merging. Install it:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}let l=E;if(e.bgm){const t=E.replace(".wav","-mixed.wav");console.log(` Mixing BGM (ducking: ${e.ducking??o.ducking})...`);await i(E,e.bgm,t,{ducking:e.ducking??o.ducking});l=t;if(!w){r.copyFileSync(l,E);try{r.unlinkSync(l)}catch{}l=E}}if(w){console.log(" Merging with video...");await n(e.video,l,y);try{if(E!==y)r.unlinkSync(E);if(e.bgm){const e=E.replace(".wav","-mixed.wav");if(r.existsSync(e))r.unlinkSync(e)}}catch{}}}console.log(`\n=== Done ===`);console.log(`Output: ${y} (${(r.statSync(y).size/1024).toFixed(1)} KB)`);console.log(`Duration: ${P.toFixed(1)}s`);console.log(`Transcript: ${L}`);console.log(`Captions: ${l.length}`);console.log(`Quota: ${T} used, ${C?.remaining??"?"} remaining`);if(v.length>0){console.log(`\nWarnings (${v.length}):`);for(const e of v){console.log(` ⚠ ${e}`)}}return{outputPath:y,textPath:L,duration:P,quotaUsed:T,segmentCount:l.length,warnings:v}}async function _dubPatch(e,t,a,n,i){const l=e.patch;const c=e.api;const A=e.token;const d=e.voice||o.voice;const p=e.speed??o.speed;const f=t.findIndex((e=>e.id===l));if(f===-1){throw new Error(`Caption #${l} not found in SRT. Available IDs: ${t.map((e=>e.id)).join(", ")}`)}const h=t[f];const m=a.replace(/\.[^.]+$/,".wav");if(!r.existsSync(m)){throw new Error(`Patch mode requires an existing output file. `+`Run a full dub first, then use --patch to update individual captions.`)}let g=d;if(i&&h.speakerId&&i[h.speakerId]){g=i[h.speakerId]}console.log(`\n[Patch] Re-synthesizing caption #${l}: "${h.text.slice(0,40)}..."`);const v=await synthesizeCaption(c,A,h.text,g,p,"pcm",0,1);const b=r.readFileSync(m);const y=b.subarray(44);const w=u(h.startMs);const x=u(h.endMs);y.fill(0,w,Math.min(x,y.length));const S=Math.min(v.audio.length,x-w,y.length-w);if(S>0){v.audio.copy(y,w,0,S)}const{wav:C}=s([y],0);r.writeFileSync(m,C);console.log(`\n=== Patch Done ===`);console.log(`Updated: caption #${l} in ${m}`);console.log(`Quota: 1 used, ${v.quota?.remaining??"?"} remaining`);return{outputPath:m,textPath:m.replace(/\.wav$/i,".txt"),duration:y.length/(24e3*2),quotaUsed:1,segmentCount:1,warnings:n}}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,validateSpeed:i,runWithRetry:s}=a(5537);const{getToken:l,getTokenInfo:c}=a(598);const{API_BASE:A,getConfigDir:d}=a(3282);const{warnIfMissingFfmpeg:p}=a(9933);await p(d(),"dub");const u=t(e,"--api")||A;const f=t(e,"--token");const h=t(e,"--srt");const m=t(e,"--video");const g=t(e,"--output");const v=n(e,"--speed");const b=n(e,"--ducking");const y=r(e,"--patch");if(!h&&!o(e,"--help")){console.error("Error: --srt <file> is required. Usage: voxflow dub --srt <file.srt>");process.exit(1)}if(h){const e=a(9896);const t=a(6928);const r=t.resolve(h);if(!e.existsSync(r)){console.error(`Error: SRT file not found: ${r}`);process.exit(1)}}if(m){const e=a(9896);const t=a(6928);const r=t.resolve(m);if(!e.existsSync(r)){console.error(`Error: Video file not found: ${r}`);process.exit(1)}}const w=t(e,"--voices");if(w){const e=a(9896);const t=a(6928);const r=t.resolve(w);if(!e.existsSync(r)){console.error(`Error: Voices map file not found: ${r}`);process.exit(1)}}const x=t(e,"--bgm");if(x){const e=a(9896);const t=a(6928);const r=t.resolve(x);if(!e.existsSync(r)){console.error(`Error: BGM file not found: ${r}`);process.exit(1)}}i(e,v);if(g){const e=m?[".mp4",".mkv",".mov"]:[".wav",".mp3"];const t=e.some((e=>g.toLowerCase().endsWith(e)));if(!t){const t=e.join(", ");console.error(`Error: --output path must end with ${t}`);process.exit(1)}}if(b!==undefined){if(isNaN(b)||b<0||b>1){console.error(`Error: --ducking must be between 0 and 1.0 (got: "${t(e,"--ducking")}")`);process.exit(1)}}let S;if(f){S=f}else{S=await l({api:u});const e=c();if(e){console.log(`Logged in as ${e.email}`)}}const C={token:S,api:u,srt:h,video:m,output:g,speed:v,patch:y,voice:t(e,"--voice"),voicesMap:w,speedAuto:o(e,"--speed-auto"),bgm:x,ducking:b};await s(dub,C,u,f)}const g={dub:{usage:"[opts]",description:"Dub video/audio from SRT subtitles (timeline-aligned TTS)",options:[`--srt <file> SRT subtitle file (required)`,`--video <file> Video file — merge dubbed audio into video`,`--voice <id> Default TTS voice ID (default: ${o.voice})`,`--voices <file> JSON speaker→voiceId map for multi-speaker dubbing`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--speed-auto Auto-adjust speed when audio overflows time slot`,`--bgm <file> Background music file to mix in`,`--ducking <n> BGM volume ducking 0-1.0 (default: ${o.ducking})`,`--patch <id> Re-synthesize a single caption by ID (patch mode)`,`--output <path> Output file path (default: ./dub-<timestamp>.wav)`],examples:["voxflow dub --srt subtitles.srt","voxflow dub --srt subtitles.srt --video input.mp4 --output dubbed.mp4","voxflow dub --srt subtitles.srt --voices speakers.json --speed-auto","voxflow dub --srt subtitles.srt --bgm music.mp3 --ducking 0.3","voxflow dub --srt subtitles.srt --patch 5 --output dub-existing.wav"]}};e.exports={dub:dub,handle:handle,meta:g,ApiError:i,_test:{parseVoicesMap:parseVoicesMap}}},6352:(e,t,a)=>{const r=a(9896);const n=a(6928);const{EXPLAIN_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l}=a(2768);const{buildWav:c}=a(7188);const{mergeAudioVideo:A}=a(9933);const{startSpinner:d}=a(5319);const p={title:"What is React?",language:"en",style:"modern",scenes:[{type:"title",title:"What is React?",subtitle:"A JavaScript library for building user interfaces",narration:"Welcome to this quick explainer on React, one of the most popular frontend libraries in the world."},{type:"bullets",heading:"Core Concepts",bullets:["Component-based architecture","Virtual DOM for efficient updates","Declarative UI with JSX","Unidirectional data flow"],narration:"React is built around several core concepts. First, everything is a component. Second, it uses a virtual DOM for efficient rendering. Third, you write declarative UI with JSX syntax. And fourth, data flows in one direction, from parent to child."},{type:"bullets",heading:"Why Use React?",bullets:["Massive ecosystem and community","Reusable component library","Excellent developer tools"],narration:"So why choose React? It has a massive ecosystem with thousands of libraries. You can build reusable component libraries. And the developer tools are some of the best in the industry."},{type:"summary",heading:"Key Takeaways",points:["React makes UI development predictable and efficient","Components are the building blocks of React apps","The virtual DOM optimizes rendering performance"],narration:"To summarize: React makes UI development predictable and efficient. Components are the fundamental building blocks. And the virtual DOM ensures your app stays fast, even as it grows. Thanks for watching!"}]};async function synthesizeScene(e,t,a,r,n,o,c){process.stdout.write(` TTS scene [${o+1}/${c}]...`);let A,d;try{({status:A,data:d}=await i(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:a,voiceId:r,speed:n,volume:1}))}catch(t){console.log(" FAIL");l(t,e)}if(A!==200||d.code!=="success"){console.log(" FAIL");s(A,d,`TTS scene ${o+1}`)}const p=Buffer.from(d.audio,"base64");const u=Math.round(p.length/48);console.log(` OK (${(p.length/1024).toFixed(0)} KB, ${(u/1e3).toFixed(1)}s)`);return{pcm:p,durationMs:u,quota:d.quota}}function buildNarrationWav(e,t){const a=c(e,t);return a.wav}async function generateScript(e,t,a,{language:r="en",sceneCount:n=5,style:o="modern"}={}){let s,l;try{({status:s,data:l}=await i(`${e}/api/llm/generate-explain-script`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{topic:a,language:r,sceneCount:n,style:o}))}catch(e){console.log(` ⚠ LLM request failed: ${e.message}`);console.log(" Falling back to demo script template.");return buildFallbackScript(a,o)}if(s!==200||l.code!=="success"||!l.script){const e=l?.message||`HTTP ${s}`;console.log(` ⚠ LLM generation failed: ${e}`);console.log(" Falling back to demo script template.");return buildFallbackScript(a,o)}console.log(` ✓ Script generated: "${l.script.title}" (${l.script.scenes.length} scenes)`);return l.script}function buildFallbackScript(e,t){const a={...p,title:e,style:t};a.scenes=[{...p.scenes[0],title:e,narration:`Welcome to this explainer on ${e}.`},...p.scenes.slice(1)];return a}function findRemotionDir(){let e=__dirname;for(let t=0;t<5;t++){const t=n.join(e,"remotion");if(r.existsSync(n.join(t,"package.json"))){return t}e=n.dirname(e)}return null}function isRemotionAvailable(){const e=findRemotionDir();if(!e)return false;return r.existsSync(n.join(e,"node_modules","remotion"))}async function renderVideo(e,t,o,i){const s=findRemotionDir();if(!s){throw new Error("Remotion directory not found. Ensure remotion/ exists at the repo root with dependencies installed.")}const l=r.mkdtempSync(n.join(a(857).tmpdir(),"voxflow-explain-"));const c=n.join(l,"props.json");const A={fps:30,script:e,scenes:t};r.writeFileSync(c,JSON.stringify(A,null,2));const d=n.join(s,"render.ts");const{execFile:p}=a(5317);const u=n.join(s,"node_modules",".bin","ts-node");return new Promise(((e,t)=>{const a=p(u,[d,"--props",c,"--output",o],{cwd:s,maxBuffer:50*1024*1024,timeout:6e5},((a,n,i)=>{try{r.unlinkSync(c);r.rmdirSync(l)}catch{}if(a){t(new Error(`Remotion render failed: ${a.message}\n${i}`));return}try{const t=n.trim().split("\n");const a=t[t.length-1];const r=JSON.parse(a);e(r)}catch{e({output:o})}}));if(a.stderr&&i){let e="";a.stderr.on("data",(t=>{e+=t.toString();const a=e.split("\n");e=a.pop()||"";for(const e of a){try{const t=JSON.parse(e);if(t.type==="progress"&&i){i(t.percent)}}catch{}}}))}}))}async function explain(e){const{token:t,api:a,topic:n="demo",voice:i=o.voice,style:s=o.style,language:l=o.language,speed:c=o.speed,scenes:u=o.sceneCount,audioOnly:f=false,cloud:h=false}=e;if(e.output&&e.output.endsWith(".mp3")){throw new Error("MP3 output is not supported for explain. Use .wav or .mp4")}const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{let m;const g=n==="demo"||n==="Demo";if(g){console.log("\n[1/4] Using demo script (hardcoded)...");m={...p,style:s}}else{console.log("\n[1/4] Generating script via LLM...");console.log(` Topic: "${n}" (${l}, ${u} scenes)`);m=await generateScript(a,t,n,{language:l,sceneCount:u,style:s})}console.log(` Script: ${m.scenes.length} scenes, style: ${m.style}`);console.log(`\n[2/4] Synthesizing narration (${m.scenes.length} scenes)...`);const v=[];const b=[];let y=null;let w=null;for(let e=0;e<m.scenes.length;e++){const r=m.scenes[e];const n=await synthesizeScene(a,t,r.narration,i,c,e,m.scenes.length);v.push(n.pcm);if(!y&&n.quota)y=n.quota;w=n.quota;b.push({scene:r,durationMs:n.durationMs,audioSrc:""})}const x=buildNarrationWav(v,o.silence);const S=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);let C;if(f||!isRemotionAvailable()){if(!f&&!isRemotionAvailable()){console.log("\n[3/4] Remotion not available. Falling back to audio-only output.");console.log(" To enable video rendering, install Remotion:");console.log(" cd remotion && npm install")}else{console.log("\n[3/4] Building audio-only output...")}C=e.output||`explain-${S}.wav`;r.writeFileSync(C,x)}else{if(h){console.log("\n[3/4] Cloud rendering coming in Phase 2. Using local render.")}C=e.output||`explain-${S}.mp4`;const t=d(h?" Rendering video...":"\n[3/4] Rendering video...");try{const e=C+".silent.mp4";await renderVideo(m,b,e,(e=>{t.update(` Rendering video... ${e}%`)}));t.stop("OK");console.log(" Merging narration audio...");const a=C+".narration.wav";r.writeFileSync(a,x);await A(e,a,C);try{r.unlinkSync(e)}catch{}try{r.unlinkSync(a)}catch{}console.log(" Audio merged OK")}catch(e){t.stop("FAIL");console.log(` Video render failed: ${e.message}`);console.log(" Falling back to audio-only...");C=C.replace(/\.mp4$/,".wav");r.writeFileSync(C,x)}}const T=C.replace(/\.(mp4|wav)$/,".json");r.writeFileSync(T,JSON.stringify(m,null,2));const k=b.reduce(((e,t)=>e+t.durationMs),0);const P=r.statSync(C);const E=(P.size/(1024*1024)).toFixed(1);const _=formatDuration(k);console.log("\n[4/4] Done!");console.log(`\n=== Output ===`);console.log(` File: ${C} (${E} MB, ${_})`);console.log(` Script: ${T}`);console.log(` Scenes: ${m.scenes.length}`);console.log(` Style: ${m.style}`);if(w){const e=y&&w?y.remaining-w.remaining:m.scenes.length*100;console.log(` Quota: ${e} used, ${w.remaining??"?"} remaining`)}return{outputPath:C,scriptPath:T,duration:k}}finally{process.removeListener("SIGINT",sigintHandler)}}function formatDuration(e){const t=Math.round(e/1e3);const a=Math.floor(t/60);const r=t%60;if(a===0)return`${r}s`;return`${a}m${r.toString().padStart(2,"0")}s`}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,validateSpeed:i,runWithRetry:s}=a(5537);const{getToken:l,getTokenInfo:c}=a(598);const{API_BASE:A,EXPLAIN_DEFAULTS:d}=a(3282);const p=t(e,"--api")||A;const u=t(e,"--token");const f=n(e,"--speed");const h=t(e,"--output");const m=r(e,"--scenes");i(e,f);if(h){const e=[".wav",".mp3",".mp4"];const t=e.some((e=>h.toLowerCase().endsWith(e)));if(!t){console.error("Error: --output path must end with .wav, .mp3, or .mp4");process.exit(1)}}const g=t(e,"--style");if(g&&!["modern","playful","corporate","chalkboard"].includes(g)){console.error(`Error: --style must be one of: modern, playful, corporate, chalkboard (got: "${g}")`);process.exit(1)}if(m!==undefined){if(isNaN(m)||m<3||m>12){console.error(`Error: --scenes must be between 3 and 12 (got: "${t(e,"--scenes")}")`);process.exit(1)}}let v;if(u){v=u}else{v=await l({api:p});const e=c();if(e){console.log(`Logged in as ${e.email}`)}}const b={token:v,api:p,topic:t(e,"--topic")||undefined,voice:t(e,"--voice")||undefined,style:g||undefined,language:t(e,"--language")||undefined,output:h,speed:f,scenes:m,audioOnly:o(e,"--audio-only"),cloud:o(e,"--cloud")};await s(explain,b,p,u)}const u={explain:{usage:"[opts]",description:"Generate an AI explainer video from a topic",options:[`--topic <text> Topic to explain (use "demo" for built-in demo)`,`--style <style> Visual style: modern (default), playful, corporate, chalkboard`,`--language <code> Script language: en (default), zh, ja, ko, etc.`,`--voice <id> TTS voice ID (default: ${o.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--scenes <n> Number of scenes, 3-12 (default: ${o.sceneCount})`,`--audio-only Skip video render, output WAV narration only`,`--cloud Render on cloud instead of local Remotion`,`--output <path> Output file path (default: ./explain-<timestamp>.mp4)`],examples:['voxflow explain --topic "What is React?"',"voxflow explain --topic demo --output demo.mp4",'voxflow explain --topic "区块链入门" --style chalkboard --voice v-male-Bk7vD3xP','voxflow explain --topic "Machine Learning" --audio-only']}};e.exports={explain:explain,handle:handle,meta:u}},4268:(e,t,a)=>{const r=a(9896);const n=a(6928);const{NARRATE_DEFAULTS:o}=a(3282);const{ApiError:i}=a(2768);const{parseParagraphs:s,buildWav:l,concatAudioBuffers:c,getFileExtension:A}=a(7188);const{startSpinner:d}=a(5319);const{synthesizeTTS:p}=a(1428);function parseScript(e){if(!r.existsSync(e)){throw new Error(`Script file not found: ${e}`)}let t;try{t=JSON.parse(r.readFileSync(e,"utf8"))}catch(e){throw new Error(`Invalid JSON in script file: ${e.message}`)}if(!t.segments||!Array.isArray(t.segments)||t.segments.length===0){throw new Error('Script must have a non-empty "segments" array')}for(let e=0;e<t.segments.length;e++){const a=t.segments[e];if(!a.text||typeof a.text!=="string"||a.text.trim().length===0){throw new Error(`Segment ${e+1} must have a non-empty "text" field`)}}return{segments:t.segments.map((e=>({text:e.text.trim(),voiceId:e.voiceId||undefined,speed:e.speed!=null?Number(e.speed):undefined,volume:e.volume!=null?Number(e.volume):undefined,pitch:e.pitch!=null?Number(e.pitch):undefined}))),silence:t.silence!=null?Number(t.silence):o.silence,output:t.output||undefined}}function stripMarkdown(e){return e.replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/\*{1,3}([^*]+)\*{1,3}/g,"$1").replace(/_{1,3}([^_]+)_{1,3}/g,"$1").replace(/^[-*_]{3,}\s*$/gm,"").replace(/^>\s?/gm,"").replace(/\n{3,}/g,"\n\n").trim()}async function readStdin(){const e=[];for await(const t of process.stdin){e.push(t)}return Buffer.concat(e).toString("utf8")}async function synthesizeSegment(e,t,a,r,n,o,i,s,l,c){const A=await p({apiBase:e,token:t,text:a,voiceId:r,speed:n??1,volume:o??1,pitch:i,format:s||"pcm",index:l,total:c});const d=s==="mp3"?"MP3":s==="wav"?"WAV":"PCM";console.log(` OK (${(A.audio.length/1024).toFixed(0)} KB ${d})`);return A}async function narrate(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nNarration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _narrate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _narrate(e){const t=e.voice||o.voice;const a=e.speed??o.speed;const i=e.format||"pcm";const d=e.api;const p=e.token;let u;let f;let h;let m;if(e.script){const t=parseScript(e.script);u=t.segments;f=e.silence??t.silence;h=e.output||t.output;m=`script: ${e.script} (${u.length} segments)`}else if(e.input){const t=n.resolve(e.input);if(!r.existsSync(t)){throw new Error(`Input file not found: ${t}`)}let a=r.readFileSync(t,"utf8");const i=n.extname(t).toLowerCase();if(i===".md"||i===".markdown"){a=stripMarkdown(a)}const l=s(a);if(l.length===0){throw new Error("No text content found in input file")}u=l.map((e=>({text:e})));f=e.silence??o.silence;h=e.output;m=`file: ${e.input} (${u.length} paragraphs)`}else if(e.text){const t=s(e.text);if(t.length===0){throw new Error("No text content provided")}u=t.map((e=>({text:e})));f=e.silence??o.silence;h=e.output;m=`text: ${e.text.length} chars (${u.length} paragraphs)`}else if(!process.stdin.isTTY){const t=await readStdin();if(!t||t.trim().length===0){throw new Error("No input provided via stdin")}const a=s(t);if(a.length===0){throw new Error("No text content found in stdin input")}u=a.map((e=>({text:e})));f=e.silence??o.silence;m=`stdin (${u.length} paragraphs)`}else{throw new Error("No input provided. Use one of:\n"+" --input <file.txt> Read a text or markdown file\n"+' --text "text" Provide inline text\n'+" --script <file.json> Use a script with per-segment control\n"+' echo "text" | voxflow narrate Pipe from stdin')}const g=A(i);if(!h){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);h=n.resolve(`narration-${e}${g}`)}if(!h.endsWith(g)){h=h.replace(/\.(wav|mp3|pcm)$/i,"")+g}console.log("\n=== VoxFlow Narrate ===");console.log(`Input: ${m}`);console.log(`Voice: ${t}${e.script?" (may be overridden per segment)":""}`);console.log(`Format: ${i==="pcm"?"wav (pcm)":i}`);console.log(`Speed: ${a}`);if(i==="mp3"){console.log(`Output: ${h}`);console.log(` (MP3 mode: no silence inserted between segments)`)}else{console.log(`Silence: ${f}s`);console.log(`Output: ${h}`)}console.log(`\n[1/2] Synthesizing TTS audio (${u.length} segments)...`);const v=[];let b=null;for(let e=0;e<u.length;e++){const r=u[e];const n=await synthesizeSegment(d,p,r.text,r.voiceId||t,r.speed??a,r.volume,r.pitch,i,e,u.length);v.push(n.audio);b=n.quota}console.log("\n[2/2] Merging audio...");const{audio:y,wav:w,duration:x}=i==="mp3"||i==="wav"?c(v,i,f):l(v,f);const S=y||w;const C=n.dirname(h);r.mkdirSync(C,{recursive:true});r.writeFileSync(h,S);const T=h.replace(/\.(wav|mp3)$/i,".txt");const k=u.map(((e,t)=>{const a=e.voiceId?`[${t+1}|${e.voiceId}]`:`[${t+1}]`;return`${a} ${e.text}`})).join("\n\n");r.writeFileSync(T,k,"utf8");const P=u.length;console.log(`\n=== Done ===`);console.log(`Output: ${h} (${(S.length/1024).toFixed(1)} KB, ${x.toFixed(1)}s)`);console.log(`Transcript: ${T}`);console.log(`Segments: ${u.length}`);console.log(`Quota: ${P} used, ${b?.remaining??"?"} remaining`);return{outputPath:h,textPath:T,duration:x,quotaUsed:P,segmentCount:u.length,format:i}}async function handle(e){const{parseFlag:t,parseFloatFlag:r,validateSpeed:n,validateSilence:o,validateOutput:i,validateFormat:s,runWithRetry:l}=a(5537);const{getToken:c,getTokenInfo:A}=a(598);const{API_BASE:d}=a(3282);const p=t(e,"--api")||d;const u=t(e,"--token");const f=t(e,"--input");const h=t(e,"--text");const m=t(e,"--script");const g=r(e,"--speed");const v=r(e,"--silence");const b=t(e,"--output");const y=t(e,"--format");n(e,g);o(e,v);i(b,y);s(y);if(f){const e=a(9896);const t=a(6928);const r=t.resolve(f);if(!e.existsSync(r)){console.error(`Error: Input file not found: ${r}`);process.exit(1)}}if(m){const e=a(9896);const t=a(6928);const r=t.resolve(m);if(!e.existsSync(r)){console.error(`Error: Script file not found: ${r}`);process.exit(1)}}let w;if(u){w=u}else{w=await c({api:p});const e=A();if(e){console.log(`Logged in as ${e.email}`)}}const x={token:w,api:p,input:f,text:h,script:m,voice:t(e,"--voice"),output:b,speed:g,silence:v,format:y||undefined};await l(narrate,x,p,u)}const u={narrate:{usage:"[opts]",description:"Narrate a file, text, or script to audio",options:[`--input <file> Input .txt or .md file`,`--text <text> Inline text to narrate`,`--script <file> JSON script with per-segment voice/speed control`,`--voice <id> Default voice ID (default: ${o.voice})`,`--format <fmt> Output format: pcm, wav, mp3 (default: pcm → WAV)`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--silence <sec> Silence between segments, 0-5.0 (default: ${o.silence})`,`--output <path> Output file path (default: ./narration-<timestamp>.wav)`],examples:["voxflow narrate --input article.txt --voice v-female-R2s4N9qJ","voxflow narrate --script narration-script.json",'echo "Hello" | voxflow narrate --output hello.wav']}};e.exports={narrate:narrate,handle:handle,meta:u,ApiError:i,_test:{parseScript:parseScript,stripMarkdown:stripMarkdown}}},8167:(e,t,a)=>{const r=a(9896);const n=a(6928);const{PODCAST_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l,ApiError:c}=a(2768);const{buildWav:A}=a(7188);const{startSpinner:d}=a(5319);const{getIntentParams:p}=a(6669);const{synthesizeTTS:u}=a(1428);function loadScript(e){const t=n.resolve(e);if(!r.existsSync(t)){throw new Error(`Script file not found: ${t}`)}let a;try{a=JSON.parse(r.readFileSync(t,"utf8"))}catch(e){throw new Error(`Invalid JSON in script file: ${e.message}`)}if(!Array.isArray(a.segments)||a.segments.length===0){throw new Error('Script must contain a non-empty "segments" array.\n'+'Expected: { "segments": [{ "speaker": "Host", "text": "Hello" }, ...] }')}for(let e=0;e<a.segments.length;e++){const t=a.segments[e];if(!t||typeof t.speaker!=="string"||!t.speaker.trim()){throw new Error(`Script segment [${e}] is missing a valid "speaker" field`)}if(!t||typeof t.text!=="string"||!t.text.trim()){throw new Error(`Script segment [${e}] is missing a valid "text" field`)}}return{segments:a.segments.map((e=>({speaker:e.speaker.trim(),text:e.text.trim()}))),voiceMapping:a.voiceMapping||{}}}function parseDialogueText(e){const t=e.split("\n").filter((e=>e.trim()));const a=[];const r=/^([^::]+)[::]\s*(.+)$/;for(const e of t){const t=e.trim();if(!t)continue;const n=t.match(r);if(n){const e=n[1].trim();const t=n[2].trim();if(t){a.push({speaker:e,text:t})}}else if(t.length>0){a.push({speaker:"旁白",text:t})}}return a}function parseStructuredScript(e){if(!e?.dialogue||!Array.isArray(e.dialogue))return[];return e.dialogue.map((t=>{const a=e.speakers?.[t.speaker];const r=a?.name||t.speaker;return{speaker:r,text:t.text,intent:t.intent||null}}))}async function generateDialogueLegacy(e,t,a){const r=d("\n[1/3] Generating dialogue text (legacy)...");let n,o;try{({status:n,data:o}=await i(`${e}/api/llm/generate-dialogue`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{prompt:a.topic,style:a.style||a.template,length:a.length,dialogueMode:true,autoSpeakerNames:true,exchanges:a.exchanges}))}catch(t){r.stop("FAIL");l(t,e)}if(n!==200||o.code!=="success"){r.stop("FAIL");s(n,o,"Dialogue generation")}const c=o.text;const A=o.voiceMapping||{};const p=o.quota;r.stop("OK");const u=parseDialogueText(c);const f=[...new Set(u.map((e=>e.speaker)))];console.log(` ${c.length} 字, ${u.length} 段, ${f.length} 位说话者`);console.log(` 说话者: ${f.join(", ")}`);console.log(` 配额剩余: ${p?.remaining??"?"}`);return{text:c,segments:u,voiceMapping:A,speakers:f,quota:p,script:null}}async function generateDialogueAiSdk(e,t,a){const r=d("\n[1/3] Generating dialogue text (ai-sdk)...");const n={short:"1-3",medium:"3-5",long:"5-10"};let c,A;try{({status:c,data:A}=await i(`${e}/api/podcast/generate-script`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{topic:a.topic,speakerCount:a.speakers||o.speakers,colloquialLevel:a.colloquial||"medium",language:a.language||"zh-CN",duration:n[a.length]||"3-5",autoMatchVoices:true}))}catch(t){r.stop("FAIL");l(t,e)}if(c!==200||A.code!=="success"){r.stop("FAIL");s(c,A,"Podcast script generation")}const p=A.script;const u=A.voiceMapping||{};const f=A.quota;r.stop("OK");const h=parseStructuredScript(p);const m=[...new Set(h.map((e=>e.speaker)))];const g=h.map((e=>`${e.speaker}: ${e.text}`)).join("\n");console.log(` ${g.length} chars, ${h.length} segments, ${m.length} speakers`);console.log(` Speakers: ${m.join(", ")}`);if(p?.quality_score?.overall){console.log(` Quality score: ${p.quality_score.overall}/10`)}console.log(` Quota remaining: ${f?.remaining??"?"}`);return{text:g,segments:h,voiceMapping:u,speakers:m,quota:f,script:p}}async function synthesizeSegment(e,t,a,r,n,o,i,s,l){const c=await u({apiBase:e,token:t,text:a,voiceId:r,speed:n,volume:o,index:i,total:s,label:l});console.log(` OK (${(c.audio.length/1024).toFixed(0)} KB)`);return{pcm:c.audio,quota:c.quota}}async function synthesizeAll(e,t,a,r,n,o){console.log(`\n[2/3] 合成 TTS 音频 (${a.length} 段, 多角色)...`);const i=[];let s=null;for(let l=0;l<a.length;l++){const c=a[l];const A=r[c.speaker]||{};const d=o||A.voiceId||"v-female-R2s4N9qJ";const u=A.speed||n;const f=p(c.intent);const h=u*f.speed;const m=f.volume;const g=await synthesizeSegment(e,t,c.text,d,h,m,l,a.length,c.speaker);i.push(g.pcm);s=g.quota}return{pcmBuffers:i,quota:s}}function resolveEngine(e){if(e==="legacy")return"legacy";if(e==="ai-sdk")return"ai-sdk";return"ai-sdk"}async function podcast(e){const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _podcast(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _podcast(e){const t=e.style||e.template||o.template;const i=e.length||o.length;const s=e.exchanges||o.exchanges;const l=e.speed??o.speed;const c=e.silence??o.silence;const d=e.api;const p=e.token;const u=resolveEngine(e.engine||"auto");const f=e.colloquial||"medium";const h=e.speakers||o.speakers;const m=e.language||"zh-CN";const g=e.format==="json";const v=e.noTts||false;const b=e.voice||null;const y=e.script||null;const w=e.topic||"Latest trends in technology";if(e.input){return _podcastFromFile(e)}let x=e.output;if(!x){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const t=v?".txt":".wav";x=n.resolve(`podcast-${e}${t}`)}console.log("\n=== VoxFlow Podcast Generator ===");console.log(`Topic: ${w}`);if(y){console.log(`Script: ${y}`)}else{console.log(`Engine: ${u}`);console.log(`Template: ${t}`);console.log(`Length: ${i}`);console.log(`Colloquial: ${f}`);console.log(`Speakers: ${h}`);console.log(`Language: ${m}`)}console.log(`Speed: ${l}`);if(b)console.log(`Voice: ${b}`);if(e.bgm)console.log(`BGM: ${e.bgm} (ducking: ${e.ducking??o.ducking})`);console.log(`API: ${d}`);if(!v)console.log(`Output: ${x}`);let S,C,T,k,P;if(y){console.log("\n[1/3] 加载脚本文件...");const e=loadScript(y);C=e.segments;T=e.voiceMapping;k=[...new Set(C.map((e=>e.speaker)))];S=C.map((e=>`${e.speaker}:${e.text}`)).join("\n");P=null;console.log(` ${S.length} chars, ${C.length} segments, ${k.length} speakers`);console.log(` Speakers: ${k.join(", ")}`)}else if(u==="ai-sdk"){const e=await generateDialogueAiSdk(d,p,{topic:w,style:t,length:i,exchanges:s,colloquial:f,speakers:h,language:m});S=e.text;C=e.segments;T=e.voiceMapping;k=e.speakers;P=e.script}else{const e=await generateDialogueLegacy(d,p,{topic:w,style:t,length:i,exchanges:s,template:t});S=e.text;C=e.segments;T=e.voiceMapping;k=e.speakers;P=e.script}if(C.length===0){throw new Error("No dialogue segments found in generated text")}if(g){const e=x.replace(/\.\w+$/,".podcast.json");const a={version:1,engine:u,topic:w,script:P||{dialogue:C.map((e=>({speaker:e.speaker,text:e.text})))},voiceMapping:T,meta:{colloquial:f,speakers:h,language:m,length:i,style:t}};const o=n.dirname(e);r.mkdirSync(o,{recursive:true});r.writeFileSync(e,JSON.stringify(a,null,2),"utf8");console.log(`\n JSON exported: ${e}`)}if(v){const e=x.endsWith(".txt")?x:x.replace(/\.\w+$/,".txt");const t=C.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");const a=n.dirname(e);r.mkdirSync(a,{recursive:true});r.writeFileSync(e,t,"utf8");console.log(`\n=== Done (script only) ===`);console.log(`Script: ${e}`);return{outputPath:e,textPath:e,duration:0,quotaUsed:1}}console.log("\n Voice assignments:");for(const e of k){if(b){console.log(` ${e} → ${b} (override)`)}else{const t=T[e];if(t){console.log(` ${e} → ${t.voiceId}`)}else{console.log(` ${e} → (default)`)}}}const{pcmBuffers:E,quota:_}=await synthesizeAll(d,p,C,T,l,b);const L=e.bgm?"[3/4]":"[3/3]";console.log(`\n${L} 拼接音频...`);const{wav:B,duration:D}=A(E,c);const I=n.dirname(x);r.mkdirSync(I,{recursive:true});r.writeFileSync(x,B);const N=x.replace(/\.wav$/,".txt");const F=C.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");r.writeFileSync(N,F,"utf8");if(e.bgm){const{checkFfmpeg:t,mixWithBgm:n}=a(9933);const i=await t();if(!i.available){throw new Error("ffmpeg is required for BGM mixing. Install it:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}console.log(`\n[4/4] 混合背景音乐 (ducking: ${e.ducking??o.ducking})...`);const s=x.replace(".wav","-mixed.wav");await n(x,e.bgm,s,{ducking:e.ducking??o.ducking});r.copyFileSync(s,x);try{r.unlinkSync(s)}catch{}}const R=(y?0:2)+C.length;console.log(`\n=== Done ===`);console.log(`Output: ${x} (${(r.statSync(x).size/1024).toFixed(1)} KB, ${D.toFixed(1)}s)`);console.log(`Script: ${N}`);console.log(`Quota: ${R} used, ${_?.remaining??"?"} remaining`);return{outputPath:x,textPath:N,duration:D,quotaUsed:R}}async function _podcastFromFile(e){if(!e.token){throw new Error("Authentication required. Run `voxflow login` first.")}const t=n.resolve(e.input);if(!r.existsSync(t)){throw new Error(`Input file not found: ${t}`)}console.log(`\n=== Loading podcast from ${t} ===`);let a;try{a=JSON.parse(r.readFileSync(t,"utf8"))}catch(e){throw new Error(`Invalid JSON in input file ${t}: ${e.message}`)}const i=a.script;const s=a.voiceMapping||{};const l=parseStructuredScript(i)||(i?.dialogue||[]).map((e=>({speaker:e.speaker,text:e.text})));if(l.length===0){throw new Error("No dialogue segments found in input file")}const c=e.speed??o.speed;const d=e.silence??o.silence;let p=e.output;if(!p){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);p=n.resolve(`podcast-${e}.wav`)}const u=[...new Set(l.map((e=>e.speaker)))];console.log(` ${l.length} segments, ${u.length} speakers`);const{pcmBuffers:f,quota:h}=await synthesizeAll(e.api,e.token,l,s,c);console.log("\n[3/3] Building audio...");const{wav:m,duration:g}=A(f,d);const v=n.dirname(p);r.mkdirSync(v,{recursive:true});r.writeFileSync(p,m);const b=p.replace(/\.wav$/,".txt");const y=l.map(((e,t)=>`[${t+1}] ${e.speaker}:${e.text}`)).join("\n\n");r.writeFileSync(b,y,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${p} (${(m.length/1024).toFixed(1)} KB, ${g.toFixed(1)}s)`);console.log(`Script: ${b}`);console.log(`Quota: ${l.length} TTS calls, ${h?.remaining??"?"} remaining`);return{outputPath:p,textPath:b,duration:g,quotaUsed:l.length}}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,validateSpeed:i,validateSilence:s,runWithRetry:l}=a(5537);const{getToken:c,getTokenInfo:A}=a(598);const{API_BASE:d}=a(3282);const p=t(e,"--api")||d;const u=t(e,"--token");const f=o(e,"--no-tts");const h=t(e,"--input");const m=r(e,"--exchanges");const g=n(e,"--speed");const v=n(e,"--silence");const b=n(e,"--ducking");const y=t(e,"--output");const w=r(e,"--speakers");if(m!==undefined){if(isNaN(m)||m<2||m>30){console.error(`Error: --exchanges must be an integer between 2 and 30 (got: "${t(e,"--exchanges")}")`);process.exit(1)}}i(e,g);s(e,v);if(y){const e=[".wav",".mp3",".txt",".json"];const t=e.some((e=>y.toLowerCase().endsWith(e)));if(!t){console.error(`Error: --output path must end with ${e.join(", ")}`);process.exit(1)}}const x=t(e,"--length");if(x&&!["short","medium","long"].includes(x)){console.error(`Error: --length must be one of: short, medium, long (got: "${x}")`);process.exit(1)}const S=t(e,"--engine");if(S&&!["auto","legacy","ai-sdk"].includes(S)){console.error(`Error: --engine must be one of: auto, legacy, ai-sdk (got: "${S}")`);process.exit(1)}const C=t(e,"--colloquial");if(C&&!["low","medium","high"].includes(C)){console.error(`Error: --colloquial must be one of: low, medium, high (got: "${C}")`);process.exit(1)}if(w!==undefined){if(isNaN(w)||w<1||w>3){console.error(`Error: --speakers must be 1, 2, or 3 (got: "${t(e,"--speakers")}")`);process.exit(1)}}const T=t(e,"--language");if(T&&!["zh-CN","en","ja"].includes(T)){console.error(`Error: --language must be one of: zh-CN, en, ja (got: "${T}")`);process.exit(1)}const k=t(e,"--template");if(k&&!["interview","discussion","news","story","tutorial"].includes(k)){console.error(`Error: --template must be one of: interview, discussion, news, story, tutorial (got: "${k}")`);process.exit(1)}const P=t(e,"--format");if(P&&!["json"].includes(P)){console.error(`Error: --format must be: json (got: "${P}")`);process.exit(1)}if(h){const e=a(9896);const t=a(6928);const r=t.resolve(h);if(!e.existsSync(r)){console.error(`Error: Input file not found: ${r}`);process.exit(1)}}const E=t(e,"--script");if(E){const e=a(9896);const t=a(6928);const r=t.resolve(E);if(!e.existsSync(r)){console.error(`Error: Script file not found: ${r}`);process.exit(1)}}const _=t(e,"--bgm");if(_){const e=a(9896);const t=a(6928);const r=t.resolve(_);if(!e.existsSync(r)){console.error(`Error: BGM file not found: ${r}`);process.exit(1)}}if(b!==undefined){if(isNaN(b)||b<0||b>1){console.error(`Error: --ducking must be between 0 and 1.0 (got: "${t(e,"--ducking")}")`);process.exit(1)}}let L;if(u){L=u}else{L=await c({api:p});const e=A();if(e){console.log(`Logged in as ${e.email}`)}}const B={token:L,api:p,topic:t(e,"--topic"),style:t(e,"--style")||k,template:k,length:x,exchanges:m,output:y,speed:g,silence:v,engine:S||undefined,colloquial:C||undefined,speakers:w||undefined,language:T||undefined,format:P||undefined,input:h||undefined,noTts:f,voice:t(e,"--voice"),script:E,bgm:_,ducking:b};await l(podcast,B,p,u)}const f={podcast:{usage:"[opts]",description:"Generate a multi-speaker podcast/dialogue",options:[`--topic <text> Podcast topic (default: tech trends)`,`--engine <type> auto | legacy | ai-sdk (default: auto → ai-sdk)`,`--template <name> interview | discussion | news | story | tutorial`,`--colloquial <lvl> low | medium | high (default: medium)`,`--speakers <n> Speaker count: 1, 2, or 3 (default: ${o.speakers})`,`--language <code> zh-CN | en | ja (default: zh-CN)`,`--style <style> Legacy: dialogue style (maps to --template)`,`--length <len> short | medium | long (default: ${o.length})`,`--exchanges <n> Number of exchanges, 2-30 (legacy, default: ${o.exchanges})`,`--format json Output .podcast.json alongside audio`,`--input <file> Load .podcast.json and synthesize from it`,`--no-tts Generate script only, skip TTS synthesis`,`--script <file> Pre-written script JSON (skips LLM generation)`,`--voice <id> Override TTS voice for all speakers`,`--bgm <file> Background music file to mix in`,`--ducking <n> BGM volume ducking 0-1.0 (default: ${o.ducking})`,`--output <path> Output WAV path (default: ./podcast-<timestamp>.wav)`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--silence <sec> Silence between segments, 0-5.0 (default: ${o.silence})`],examples:['voxflow podcast --topic "AI in healthcare"','voxflow podcast --topic "climate change" --colloquial high --speakers 3','voxflow podcast --topic "tech news" --template news --language en','voxflow podcast --topic "AI" --format json --no-tts',"voxflow podcast --input podcast.podcast.json",'voxflow podcast --topic "debate" --engine legacy --length long --exchanges 20',"voxflow podcast --script dialogue.json --voice v-male-Bk7vD3xP",'voxflow podcast --topic "music history" --bgm background.mp3 --ducking 0.15']}};e.exports={podcast:podcast,handle:handle,meta:f,ApiError:c,_test:{parseDialogueText:parseDialogueText,parseStructuredScript:parseStructuredScript,resolveEngine:resolveEngine,loadScript:loadScript}}},8204:(e,t,a)=>{const r=a(9896);const n=a(6928);const{PRESENT_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l}=a(2768);const{buildWav:c}=a(7188);const{startSpinner:A}=a(5319);const d={noir:"Scheme1-CinematicNoir",neon:"Scheme2-NeonGlass",editorial:"Scheme3-EditorialLuxury",aurora:"Scheme4-GradientAurora",brutalist:"Scheme5-BoldBrutalist"};const p=Object.keys(d);const u=10;const f=1;function findVideoPresentDir(){let e=__dirname;for(let t=0;t<5;t++){const t=n.join(e,"video-present");if(r.existsSync(n.join(t,"package.json"))){return t}e=n.dirname(e)}return null}function isRemotionReady(){const e=findVideoPresentDir();if(!e)return false;return r.existsSync(n.join(e,"node_modules","remotion"))}async function generateCards(e,t,a){let r,n;try{({status:r,data:n}=await i(`${e}/api/llm/generate-present-cards`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},a))}catch(t){l(t,e)}if(r!==200||n.code!=="success"){s(r,n,"Card generation")}return{cards:n.data.cards,quota:n.data.quota}}async function synthesizeNarration(e,t,a,r,n,o,c){process.stdout.write(` TTS card [${o+1}/${c}]...`);let A,d;try{({status:A,data:d}=await i(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:a,voiceId:r,speed:n,volume:1}))}catch(t){console.log(" FAIL");l(t,e)}if(A!==200||d.code!=="success"){console.log(" FAIL");s(A,d,`TTS card ${o+1}`)}const p=Buffer.from(d.audio,"base64");const u=Math.round(p.length/48);console.log(` OK (${(p.length/1024).toFixed(0)} KB, ${(u/1e3).toFixed(1)}s)`);return{pcm:p,durationMs:u,quota:d.quota}}function computeDurations(e,t){return e.map(((e,a)=>{if(t&&t[a]&&t[a].durationMs>0){return Math.max(5,Math.ceil(t[a].durationMs/1e3)+f)}return u}))}async function renderVideo(e,t,o){const i=findVideoPresentDir();if(!i){throw new Error("video-present/ directory not found.\n"+" Install: cd video-present && npm install")}if(!r.existsSync(n.join(i,"node_modules","remotion"))){throw new Error("Remotion not installed in video-present/.\n"+" Run: cd video-present && npm install")}const s=n.join(i,"src","data");r.mkdirSync(s,{recursive:true});r.writeFileSync(n.join(s,"cards.json"),JSON.stringify(e,null,2));const l=d[t]||"Scheme4-GradientAurora";const{execFileSync:c}=a(5317);const A=process.platform==="win32"?"npx.cmd":"npx";const p=["remotion","render",l,o,"--codec","h264","--image-format","jpeg"];c(A,p,{cwd:i,stdio:"pipe",timeout:6e5,maxBuffer:50*1024*1024})}async function present(e){const{token:t,api:a,text:i,url:s,cards:l,scheme:d=o.scheme,voice:p=o.voice,speed:u=o.speed,noAudio:f=false,webSearch:h=false}=e;const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{const o=f?3:4;let m=1;let g;let v=null;if(l){console.log(`\n[${m}/${o}] Loading cards from ${l}...`);const e=r.readFileSync(l,"utf8");try{g=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON in cards file ${l}: ${e.message}`)}if(!g.cards||!Array.isArray(g.cards)){throw new Error('Invalid cards.json: missing "cards" array')}console.log(` Loaded ${g.cards.length} cards`)}else{if(s){console.log(`\n[${m}/${o}] Generating cards from URL...`);console.log(` URL: ${s}`)}else if(i){console.log(`\n[${m}/${o}] Generating cards from text...`)}else{throw new Error("No input provided. Use --text, --url, or --cards")}if(h)console.log(" Web search: enabled");const e={};if(s)e.url=s;else e.content=i;if(h)e.webSearch=true;const r=A(" Generating via API...");try{const n=await generateCards(a,t,e);g=n.cards;v=n.quota;r.stop(`OK (${g.cards.length} cards)`)}catch(e){r.stop("FAIL");throw new Error(`Card generation failed: ${e.message}`)}}const b=g.cards.length;const y=g.cards.map((e=>e.type)).join(", ");console.log(` Cards: ${b} (${y})`);m++;let w=null;let x=v;let S=v;const C=findVideoPresentDir();const T=[];if(!f){const e=g.cards.filter((e=>e.narration));console.log(`\n[${m}/${o}] Synthesizing narration (${e.length} cards with narration)...`);w=[];for(let e=0;e<g.cards.length;e++){const o=g.cards[e];if(!o.narration){w.push({durationMs:0});T.push(null);continue}const i=await synthesizeNarration(a,t,o.narration,p,u,e,b);w.push({durationMs:i.durationMs});if(!x&&i.quota)x=i.quota;S=i.quota;const s=`card-narration-${e}.wav`;if(C){const e=n.join(C,"public");r.mkdirSync(e,{recursive:true});const t=c([i.pcm],0);r.writeFileSync(n.join(e,s),t.wav)}T.push(s)}m++}const k=computeDurations(g.cards,w);g.cards=g.cards.map(((e,t)=>({...e,durationSec:k[t],audioFile:T[t]||null})));console.log(`\n[${m}/${o}] Rendering video (scheme: ${d})...`);if(!isRemotionReady()){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const t=`present-${e}.json`;r.writeFileSync(t,JSON.stringify(g,null,2));console.log(" Remotion not available. Saved cards & audio for later rendering.");console.log(` Cards: ${t}`);if(T.some(Boolean)&&C){T.filter(Boolean).forEach((e=>{console.log(` Audio: ${n.join(C,"public",e)}`)}))}console.log("\n To install Remotion: cd video-present && npm install");console.log(" Then re-run with: voxflow present --cards "+t);const a=k.reduce(((e,t)=>e+t*1e3),0);return{outputPath:null,cardsPath:t,duration:a}}const P=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const E=e.output||`present-${P}.mp4`;const _=A(" Rendering...");try{await renderVideo(g,d,E);_.stop("OK")}catch(e){_.stop("FAIL");try{r.unlinkSync(E)}catch{}throw new Error(`Video render failed: ${e.message}`)}finally{if(C){T.forEach((e=>{if(e)try{r.unlinkSync(n.join(C,"public",e))}catch{}}))}}m++;const L=E.replace(/\.mp4$/,".json");r.writeFileSync(L,JSON.stringify(g,null,2));const B=k.reduce(((e,t)=>e+t*1e3),0);const D=r.statSync(E);const I=(D.size/(1024*1024)).toFixed(1);console.log(`\n[${m}/${o}] Done!`);console.log("\n=== Output ===");console.log(` Video: ${E} (${I} MB, ${formatDuration(B)})`);console.log(` Cards: ${L}`);console.log(` Scheme: ${d}`);console.log(` Cards: ${b} (${y})`);if(S){const e=x&&S?x.remaining-S.remaining:b*100;console.log(` Quota: ${e} used, ${S.remaining??"?"} remaining`)}return{outputPath:E,cardsPath:L,duration:B}}finally{process.removeListener("SIGINT",sigintHandler)}}function formatDuration(e){const t=Math.round(e/1e3);const a=Math.floor(t/60);const r=t%60;if(a===0)return`${r}s`;return`${a}m${r.toString().padStart(2,"0")}s`}async function handle(e){const{parseFlag:t,parseFloatFlag:r,parseBoolFlag:n,validateSpeed:o,runWithRetry:i}=a(5537);const{getToken:s,getTokenInfo:l}=a(598);const{API_BASE:c,PRESENT_DEFAULTS:A}=a(3282);const d=t(e,"--api")||c;const u=t(e,"--token");const f=r(e,"--speed");const h=t(e,"--output");o(e,f);if(h){const e=[".mp4",".wav"].some((e=>h.toLowerCase().endsWith(e)));if(!e){console.error("Error: --output path must end with .mp4 or .wav");process.exit(1)}}const m=t(e,"--scheme");if(m&&!p.includes(m)){console.error(`Error: --scheme must be one of: ${p.join(", ")} (got: "${m}")`);process.exit(1)}const g=t(e,"--text");const v=t(e,"--url");const b=t(e,"--cards");if(!g&&!v&&!b){console.error("Error: provide one of --text, --url, or --cards");process.exit(1)}if(b&&!a(9896).existsSync(b)){console.error(`Error: cards file not found: ${b}`);process.exit(1)}let y;if(u){y=u}else{y=await s({api:d});const e=l();if(e){console.log(`Logged in as ${e.email}`)}}const w={token:y,api:d,text:g,url:v,cards:b,scheme:m||undefined,voice:t(e,"--voice")||undefined,speed:f,output:h,noAudio:n(e,"--no-audio"),webSearch:n(e,"--web-search")};await i(present,w,d,u)}const h={present:{usage:"<--text|--url|--cards> [opts]",description:"Generate a short video from text or URL content",options:[`--text <text> Input text content`,`--url <url> URL to fetch and convert`,`--cards <path> Pre-generated cards.json (skip LLM)`,`--scheme <name> Visual scheme: noir, neon, editorial, aurora (default), brutalist`,`--voice <id> TTS voice ID (default: ${o.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--no-audio Skip TTS, render silent video only`,`--web-search Search the web for up-to-date info on the topic`,`--output <path> Output file path (default: ./present-<timestamp>.mp4)`],examples:['voxflow present --text "Claude Code 是一个 AI 编程工具" --scheme aurora',"voxflow present --url https://example.com/article --scheme noir",'voxflow present --text "2025 AI芯片格局" --web-search --scheme neon',"voxflow present --cards my-cards.json --no-audio",'voxflow present --text "React 入门指南" --voice v-male-Bk7vD3xP --output react.mp4']}};e.exports={present:present,handle:handle,meta:h,SCHEMES:d,VALID_SCHEMES:p,renderVideo:renderVideo,findVideoPresentDir:findVideoPresentDir,isRemotionReady:isRemotionReady,computeDurations:computeDurations,synthesizeNarration:synthesizeNarration,_test:{computeDurations:computeDurations,formatDuration:formatDuration,SCHEMES:d,VALID_SCHEMES:p}}},4460:(e,t,a)=>{const r=a(9896);const n=a(6928);const o=a(6982);const{API_BASE:i}=a(3282);const{request:s}=a(2768);const{videoTranslate:l}=a(6851);const{dub:c}=a(220);const{mergeAudioVideo:A,getAudioDuration:d}=a(9933);function ensureDir(e){r.mkdirSync(e,{recursive:true})}function defaultOutputPath(e){const t=n.basename(e,n.extname(e));return n.resolve(n.dirname(e),`${t}-published.mp4`)}function defaultPublishDir(){return n.resolve(process.cwd(),"published")}function toFileUrl(e){const t=e.split(n.sep).join("/");return t.startsWith("/")?`file://${t}`:`file:///${t}`}function copyToPublishDir(e,t,a){ensureDir(t);const o=(new Date).toISOString().replace(/[:.]/g,"-");const i=n.basename(e,n.extname(e));const s=`${i}-${a}-${o}.mp4`;const l=n.join(t,s);r.copyFileSync(e,l);return{target:"local",platform:a,status:"ready",publishedPath:l,publishUrl:toFileUrl(l)}}async function publishToWebhook(e,t){const a=new URL(e);if(a.protocol!=="https:"&&a.protocol!=="http:"){throw new Error("Webhook URL must use HTTP or HTTPS")}const r=a.hostname;if(r==="localhost"||r==="127.0.0.1"||r==="0.0.0.0"||r==="::1"||r.startsWith("10.")||r.startsWith("192.168.")||r.match(/^172\.(1[6-9]|2\d|3[01])\./)||r==="169.254.169.254"||r.startsWith("169.254.")||r.startsWith("fd")||r.startsWith("fc")||r.startsWith("fe80")||r.endsWith(".internal")||r.endsWith(".local")){throw new Error("Webhook URL must not target private networks")}const{status:n,data:o}=await s(e,{method:"POST",headers:{"Content-Type":"application/json"}},t);if(n>=400){throw new Error(`Webhook publish failed (${n}): ${o?.message||JSON.stringify(o)}`)}return{target:"webhook",status:o.status||"submitted",platform:o.platform||t.platform,publishUrl:o.publishUrl||o.url||null,platformJobId:o.jobId||null,raw:o}}async function publish(e){const sigintHandler=()=>{console.log("\n\nPublish cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _publish(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _publish(e){const{token:t,api:a=i,input:s,from:p,to:u,srt:f,video:h,audio:m,voice:g,voicesMap:v,speed:b,realign:y=false,batchSize:w,keepIntermediates:x=false,output:S,publishTarget:C="local",publishDir:T=defaultPublishDir(),publishWebhook:k,platform:P="generic",title:E}=e;const _=!!(s&&u);const L=!!(f&&h);const B=!!(h&&m);const D=[_,L,B].filter(Boolean).length;if(D!==1){throw new Error("Invalid publish input. Use exactly one mode:\n"+" 1) --input <video> --to <lang> (video-translate + publish)\n"+" 2) --srt <file> --video <video> (dub + publish)\n"+" 3) --video <video> --audio <audio> (merge existing + publish)")}if(!["local","webhook","none"].includes(C)){throw new Error(`--publish must be one of: local, webhook, none (got: ${C})`)}if(C==="webhook"&&!k){throw new Error("--publish webhook requires --publish-webhook <url>")}console.log("\n=== VoxFlow Publish ===");console.log(`Publish target: ${C}`);console.log(`Platform: ${P}`);let I;let N;let F={};if(_){if(!t){throw new Error('Publish mode "video-translate" requires authentication token')}console.log("Build mode: video-translate");const e=await l({token:t,api:a,input:s,from:p,to:u,voice:g,voicesMap:v,output:S?n.resolve(S):undefined,realign:y,batchSize:w,keepIntermediates:x,speed:b});I=e.outputPath;N="video-translate";F=e}else if(L){if(!t){throw new Error('Publish mode "srt-dub" requires authentication token')}console.log("Build mode: srt-dub");const e=await c({token:t,api:a,srt:f,video:h,voice:g,voicesMap:v,speed:b,output:S?n.resolve(S):undefined});I=e.outputPath;N="srt-dub";F=e}else{console.log("Build mode: merge-existing");I=S?n.resolve(S):defaultOutputPath(n.resolve(h));await A(h,m,I);N="merge-existing";F={outputPath:I,quotaUsed:0}}const R=n.resolve(I);const M=r.statSync(R);const O=await d(R);const z=`pub_${o.randomUUID()}`;const $={jobId:z,title:E||n.basename(R,n.extname(R)),buildMode:N,platform:P,createdAt:(new Date).toISOString(),artifact:{localPath:R,sizeBytes:M.size,durationSec:Number((O/1e3).toFixed(2))}};let U={target:"none",status:"skipped",platform:P,publishUrl:null};if(C==="local"){U=copyToPublishDir(R,n.resolve(T),P)}else if(C==="webhook"){const{localPath:e,...t}=$.artifact;U=await publishToWebhook(k,{...$,artifact:{...t,filePath:n.basename($.artifact.localPath)}})}const j={...$,publish:U,quotaUsed:F.quotaUsed||0,buildResult:F};console.log("\n=== Publish Done ===");console.log(`Final video: ${R}`);console.log(`Duration: ${j.artifact.durationSec}s`);console.log(`Size: ${(j.artifact.sizeBytes/1024/1024).toFixed(2)} MB`);console.log(`Publish status: ${U.status}`);if(U.publishUrl){console.log(`Publish URL: ${U.publishUrl}`)}else if(U.publishedPath){console.log(`Published file: ${U.publishedPath}`)}return j}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,validateSpeed:i,assertFileExists:s,runWithRetry:l}=a(5537);const{getToken:c,getTokenInfo:A}=a(598);const{API_BASE:d,getConfigDir:p}=a(3282);const{warnIfMissingFfmpeg:u}=a(9933);await u(p(),"dub");const f=t(e,"--api")||d;const h=t(e,"--token");const m=t(e,"--input");const g=t(e,"--to");const v=t(e,"--video");const b=t(e,"--srt");const y=t(e,"--audio");const w=t(e,"--output");const x=t(e,"--publish")||"local";const S=t(e,"--publish-webhook");if(m)s(m,"Input video");if(v)s(v,"Video");if(b)s(b,"SRT");if(y)s(y,"Audio");if(x&&!["local","webhook","none"].includes(x)){console.error(`Error: --publish must be one of: local, webhook, none (got: "${x}")`);process.exit(1)}if(x==="webhook"&&!S){console.error("Error: --publish webhook requires --publish-webhook <url>");process.exit(1)}if(w&&!w.toLowerCase().endsWith(".mp4")){console.error("Error: --output path must end with .mp4");process.exit(1)}const C=n(e,"--speed");i(e,C);const T=r(e,"--batch-size");if(T!==undefined&&(isNaN(T)||T<1||T>20)){console.error(`Error: --batch-size must be between 1 and 20 (got: "${t(e,"--batch-size")}")`);process.exit(1)}const k=!!(v&&y&&!b&&!m);let P=null;if(!k){if(h){P=h}else{P=await c({api:f});const e=A();if(e){console.log(`Logged in as ${e.email}`)}}}const E={token:P,api:f,input:m,from:t(e,"--from"),to:g,srt:b,video:v,audio:y,voice:t(e,"--voice"),voicesMap:t(e,"--voices"),output:w,speed:C,realign:o(e,"--realign"),keepIntermediates:o(e,"--keep-intermediates"),batchSize:T,publishTarget:x,publishDir:t(e,"--publish-dir"),publishWebhook:S,platform:t(e,"--platform")||undefined,title:t(e,"--title")||undefined};try{const t=k?await publish(E):await l(publish,E,f,h);if(o(e,"--json")){console.log(JSON.stringify(t,null,2))}}catch(e){const t=e.message||e.code||String(e);console.error(`\nFatal error: ${t}`);process.exit(1)}}const p={publish:{usage:"[opts]",description:"One-command build+merge+publish for Skill/Web orchestration",options:["--input <video> Mode A: video-translate then publish (requires --to)","--to <lang> Target language for Mode A","--from <lang> Source language for Mode A (default: auto)","--srt <file> Mode B: dub existing subtitles into video (requires --video)","--video <file> Video file for Mode B/Mode C","--audio <file> Mode C: merge existing audio into video","--voice <id> TTS voice for Mode A/B","--voices <file> Multi-speaker voice map for Mode A/B","--output <path> Final MP4 output path","--publish <target> local (default) | webhook | none","--publish-dir <dir> Local publish directory (for --publish local)","--publish-webhook <url> Webhook URL (for --publish webhook)","--platform <name> Platform metadata tag (default: generic)","--title <text> Title metadata","--json Print structured JSON result (recommended for skills)"],examples:["voxflow publish --input video.mp4 --to en --publish local","voxflow publish --srt captions.srt --video input.mp4 --publish local","voxflow publish --video input.mp4 --audio narration.mp3 --publish local","voxflow publish --input video.mp4 --to ja --publish webhook --publish-webhook https://publisher.example.com/hook --json"]}};e.exports={publish:publish,handle:handle,meta:p}},1089:(e,t,a)=>{const r=a(9896);const{SLIDES_DEFAULTS:n,SYNTHESIZE_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l}=a(2768);const{chatCompletion:c}=a(929);const{buildWav:A}=a(7188);const{startSpinner:d}=a(5319);const p=["midnight","paper","ember","forest","ocean"];const u=["product","report","tutorial","pitch","free"];const f=["swift","balanced","pro","creative"];const h=["hero","title-bullets","two-column","three-cards","image-left","image-right","quote","timeline","stats","section"];const m={product:"This is a product launch presentation. Focus on value proposition, clear feature benefits, and persuasive metrics. End with a strong call to action.",report:"This is an annual/quarterly report. Use real-looking data, professional tone, clear metrics with year-over-year comparisons. Be factual and concise.",tutorial:"This is a step-by-step tutorial. Number each step clearly, use practical examples, and include actionable tips. Keep instructions concise and easy to follow.",pitch:"This is a startup investor pitch deck. Be compelling with real-looking metrics, clear market sizing (TAM/SAM/SOM), and a persuasive narrative arc. Show traction with specific numbers.",free:""};const g={product:[{layout:"hero",hint:"Product name and tagline"},{layout:"title-bullets",hint:"Pain points the product solves"},{layout:"two-column",hint:"Problem vs Solution comparison"},{layout:"three-cards",hint:"Key feature 1, 2, 3"},{layout:"three-cards",hint:"More features or benefits"},{layout:"stats",hint:"Performance metrics or user stats"},{layout:"quote",hint:"Customer testimonial or endorsement"},{layout:"hero",hint:"Call to action and next steps"}],report:[{layout:"hero",hint:"Report title, year, organization"},{layout:"title-bullets",hint:"Executive summary highlights"},{layout:"stats",hint:"Quarterly or annual key metrics"},{layout:"two-column",hint:"Achievements and highlights"},{layout:"title-bullets",hint:"Challenges and lessons learned"},{layout:"timeline",hint:"Key milestones or roadmap"},{layout:"hero",hint:"Outlook and closing statement"}],tutorial:[{layout:"hero",hint:"Tutorial title and what you will learn"},{layout:"title-bullets",hint:"Overview and prerequisites"},{layout:"two-column",hint:"Step 1 with details"},{layout:"two-column",hint:"Step 2 with details"},{layout:"two-column",hint:"Step 3 with details"},{layout:"two-column",hint:"Step 4 with details"},{layout:"three-cards",hint:"Pro tips and best practices"},{layout:"hero",hint:"Summary and next steps"}],pitch:[{layout:"hero",hint:"Company name, one-line pitch"},{layout:"title-bullets",hint:"The problem being solved"},{layout:"stats",hint:"Market size and opportunity"},{layout:"two-column",hint:"Solution and how it works"},{layout:"three-cards",hint:"Business model and revenue streams"},{layout:"stats",hint:"Traction and key metrics"},{layout:"three-cards",hint:"Team members and expertise"},{layout:"hero",hint:"The ask — funding, partnerships, next steps"}],free:[]};const v=`You are a professional presentation designer creating business-quality slide decks. Generate structured JSON.\n\nSTRICT RULES:\n1. Output ONLY valid JSON, no markdown fences, no extra text\n2. Each slide must have: id (number), layout (string), content (object), narration (string)\n3. narration: speaker script, 2-3 sentences, natural professional tone\n4. Layout choices: ${h.join(", ")}\n5. NEVER use emoji characters anywhere — not in titles, bullets, headings, or card icons. Use short text labels instead (e.g. "01", "A", "i", or leave icon field empty string "")\n6. Write concise, data-driven text. No vague filler. Every bullet should contain a specific fact, number, or insight.\n7. First slide: "hero". Last slide: "hero" or "section" for closing. Use varied layouts in between — avoid repeating the same layout consecutively.\n8. 8-10 slides total. Prefer stats, timeline, two-column, quote layouts for variety.\n9. For three-cards: set icon to "" (empty string). For stats: use real-looking numbers with units.\n\nCONTENT STRUCTURE per layout:\n- hero: { title, subtitle }\n- title-bullets: { title, bullets: string[] } (max 5 bullets)\n- two-column: { title, left: { heading, text }, right: { heading, text } }\n- three-cards: { title, cards: [{ icon: "", heading, text }] } (exactly 3 cards)\n- image-left / image-right: { title, imagePrompt, text }\n- quote: { quote, author, context }\n- timeline: { title, events: [{ year, text }] } (3-5 events)\n- stats: { title, stats: [{ value, label }] } (2-4 stats with realistic numbers)\n- section: { title, subtitle }\n\nOUTPUT FORMAT:\n{\n "meta": { "title": "..." },\n "slides": [ ... ]\n}`;const b={swift:"openai/gpt-4o-mini",balanced:"deepseek/deepseek-chat-v3-0324",pro:"anthropic/claude-sonnet-4",creative:"openai/gpt-4o"};async function generateSlides(e,t,a,r,n){const o=m[r]||"";const i=g[r]||[];let s=a;if(o){s+=`\n\nTemplate hint: ${o}`}if(i.length>0){const e=i.map(((e,t)=>` Slide ${t+1}: layout="${e.layout}" — ${e.hint}`)).join("\n");s+=`\n\nSuggested structure:\n${e}`}const l=[{role:"system",content:v},{role:"user",content:s}];const A=b[n]||b.swift;const d=await c({apiBase:e,token:t,messages:l,temperature:.7,maxTokens:4e3,model:A});let p=d.content.trim();const u=p.match(/```(?:json)?\s*([\s\S]*?)```/);if(u)p=u[1].trim();const f=JSON.parse(p);if(!f.slides||!Array.isArray(f.slides)||f.slides.length<2){throw new Error("LLM returned invalid slide structure (need at least 2 slides)")}return{data:f,quota:d.quota}}async function synthesizeNarration(e,t,a,r,n,o,c){process.stdout.write(` TTS slide [${o+1}/${c}]...`);let A,d;try{({status:A,data:d}=await i(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:a,voiceId:r,speed:n,volume:1}))}catch(t){console.log(" FAIL");l(t,e)}if(A!==200||d.code!=="success"){console.log(" FAIL");s(A,d,`TTS slide ${o+1}`)}const p=Buffer.from(d.audio,"base64");const u=Math.round(p.length/48);console.log(` OK (${(p.length/1024).toFixed(0)} KB, ${(u/1e3).toFixed(1)}s)`);return{pcm:p,durationMs:u,quota:d.quota}}function esc(e){if(!e)return"";return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}const y={hero(e){return`<div class="slide-page slide-hero">\n <h1>${esc(e.title)}</h1>\n ${e.subtitle?`<div class="slide-subtitle">${esc(e.subtitle)}</div>`:""}\n </div>`},"title-bullets"(e){const t=(e.bullets||[]).map((e=>`<li>${esc(e)}</li>`)).join("");return`<div class="slide-page slide-title-bullets">\n <h2>${esc(e.title)}</h2>\n <ul class="slide-bullets">${t}</ul>\n </div>`},"two-column"(e){return`<div class="slide-page slide-two-column">\n <h2>${esc(e.title)}</h2>\n <div class="slide-columns">\n <div class="slide-col">\n <h3>${esc(e.left?.heading)}</h3>\n <p>${esc(e.left?.text)}</p>\n </div>\n <div class="slide-col">\n <h3>${esc(e.right?.heading)}</h3>\n <p>${esc(e.right?.text)}</p>\n </div>\n </div>\n </div>`},"three-cards"(e){const t=(e.cards||[]).map((e=>`\n <div class="slide-card">\n ${e.icon?`<div class="slide-card-icon">${esc(e.icon)}</div>`:""}\n <h3>${esc(e.heading)}</h3>\n <p>${esc(e.text)}</p>\n </div>`)).join("");return`<div class="slide-page slide-three-cards">\n <h2>${esc(e.title)}</h2>\n <div class="slide-cards-grid">${t}</div>\n </div>`},"image-left"(e){return`<div class="slide-page slide-image-split left">\n <div class="slide-image-placeholder">IMG</div>\n <div class="slide-image-content">\n <h2>${esc(e.title)}</h2>\n <p>${esc(e.text)}</p>\n </div>\n </div>`},"image-right"(e){return`<div class="slide-page slide-image-split right">\n <div class="slide-image-content">\n <h2>${esc(e.title)}</h2>\n <p>${esc(e.text)}</p>\n </div>\n <div class="slide-image-placeholder">IMG</div>\n </div>`},quote(e){return`<div class="slide-page slide-quote">\n <blockquote>"${esc(e.quote)}"</blockquote>\n <div class="slide-quote-author">— ${esc(e.author)}</div>\n ${e.context?`<div class="slide-quote-context">${esc(e.context)}</div>`:""}\n </div>`},timeline(e){const t=(e.events||[]).map((e=>`\n <div class="slide-timeline-event">\n <div class="slide-timeline-year">${esc(e.year)}</div>\n <div class="slide-timeline-text">${esc(e.text)}</div>\n </div>`)).join("");return`<div class="slide-page slide-timeline">\n <h2>${esc(e.title)}</h2>\n <div class="slide-timeline-track">${t}</div>\n </div>`},stats(e){const t=e.stats||[];const a=Math.min(t.length,4);const r=t.map((e=>`\n <div class="slide-stat">\n <div class="slide-stat-value">${esc(e.value)}</div>\n <div class="slide-stat-label">${esc(e.label)}</div>\n </div>`)).join("");return`<div class="slide-page slide-stats">\n <h2>${esc(e.title)}</h2>\n <div class="slide-stats-grid" data-cols="${a}">${r}</div>\n </div>`},section(e){return`<div class="slide-page slide-section">\n <h2>${esc(e.title)}</h2>\n ${e.subtitle?`<div class="slide-subtitle">${esc(e.subtitle)}</div>`:""}\n </div>`}};function renderSlideHTML(e){const t=y[e.layout]||y["title-bullets"];return t(e.content)}const w=`\n/* Theme presets */\n.slides-theme-midnight {\n --slide-bg:#18181b;--slide-bg-alt:#27272a;--slide-accent:#2dd4bf;\n --slide-accent-soft:rgba(45,212,191,0.15);--slide-text:#fafafa;\n --slide-text-secondary:#a1a1aa;--slide-text-muted:#71717a;\n --slide-border:#3f3f46;--slide-card-bg:#27272a;\n --slide-hero-from:#18181b;--slide-hero-via:#1c1c22;--slide-hero-to:#18181b;\n}\n.slides-theme-paper {\n --slide-bg:#fafaf9;--slide-bg-alt:#f5f5f4;--slide-accent:#2563eb;\n --slide-accent-soft:rgba(37,99,235,0.1);--slide-text:#1c1917;\n --slide-text-secondary:#57534e;--slide-text-muted:#a8a29e;\n --slide-border:#d6d3d1;--slide-card-bg:#ffffff;\n --slide-hero-from:#f5f5f4;--slide-hero-via:#fafaf9;--slide-hero-to:#f5f5f4;\n}\n.slides-theme-ember {\n --slide-bg:#1c1917;--slide-bg-alt:#292524;--slide-accent:#f59e0b;\n --slide-accent-soft:rgba(245,158,11,0.15);--slide-text:#fafaf9;\n --slide-text-secondary:#a8a29e;--slide-text-muted:#78716c;\n --slide-border:#44403c;--slide-card-bg:#292524;\n --slide-hero-from:#1c1917;--slide-hero-via:#231f1b;--slide-hero-to:#1c1917;\n}\n.slides-theme-forest {\n --slide-bg:#14231a;--slide-bg-alt:#1a3024;--slide-accent:#4ade80;\n --slide-accent-soft:rgba(74,222,128,0.12);--slide-text:#f0fdf4;\n --slide-text-secondary:#86efac;--slide-text-muted:#4ade80;\n --slide-border:#2d5a3e;--slide-card-bg:#1a3024;\n --slide-hero-from:#14231a;--slide-hero-via:#182b20;--slide-hero-to:#14231a;\n}\n.slides-theme-ocean {\n --slide-bg:#0c1929;--slide-bg-alt:#132240;--slide-accent:#38bdf8;\n --slide-accent-soft:rgba(56,189,248,0.12);--slide-text:#f0f9ff;\n --slide-text-secondary:#7dd3fc;--slide-text-muted:#38bdf8;\n --slide-border:#1e3a5f;--slide-card-bg:#132240;\n --slide-hero-from:#0c1929;--slide-hero-via:#0f2035;--slide-hero-to:#0c1929;\n}\n\n/* Slide container (fullscreen in export) */\n.slides-viewport { width:100vw;height:100vh;position:relative;overflow:hidden; background:var(--slide-bg); }\n.slide-page { position:absolute;inset:0;display:none;color:var(--slide-text); }\n.slide-page.active { display:flex; }\n\n/* Hero */\n.slide-hero { flex-direction:column;align-items:center;justify-content:center;text-align:center;\n background:linear-gradient(135deg,var(--slide-hero-from),var(--slide-hero-via),var(--slide-hero-to));padding:10% 12%; }\n.slide-hero h1 { font-size:clamp(1.8rem,4vw,3.5rem);font-weight:700;line-height:1.2;margin-bottom:0.5em; }\n.slide-hero .slide-subtitle { font-size:clamp(1rem,1.8vw,1.5rem);color:var(--slide-accent); }\n\n/* Title + Bullets */\n.slide-title-bullets { flex-direction:column;justify-content:center;padding:8% 10%;background:var(--slide-bg); }\n.slide-title-bullets h2 { font-size:clamp(1.4rem,2.8vw,2.5rem);font-weight:700;margin-bottom:1.5em; }\n.slide-bullets { list-style:none;padding:0;display:flex;flex-direction:column;gap:0.8em; }\n.slide-bullets li { display:flex;align-items:flex-start;gap:0.6em;font-size:clamp(0.9rem,1.4vw,1.25rem);color:var(--slide-text-secondary);line-height:1.5; }\n.slide-bullets li::before { content:'';flex-shrink:0;width:8px;height:8px;margin-top:0.5em;border-radius:50%;background:var(--slide-accent); }\n\n/* Two Column */\n.slide-two-column { flex-direction:column;justify-content:center;padding:8%;background:var(--slide-bg); }\n.slide-two-column h2 { font-size:clamp(1.4rem,2.8vw,2.5rem);font-weight:700;margin-bottom:1.2em; }\n.slide-columns { display:grid;grid-template-columns:1fr 1fr;gap:1.5em; }\n.slide-col { background:var(--slide-card-bg);border-radius:12px;padding:1.5em;border:1px solid var(--slide-border); }\n.slide-col h3 { font-size:clamp(0.9rem,1.3vw,1.15rem);font-weight:600;color:var(--slide-accent);margin-bottom:0.6em; }\n.slide-col p { font-size:clamp(0.8rem,1.1vw,1rem);color:var(--slide-text-secondary);line-height:1.6; }\n\n/* Three Cards */\n.slide-three-cards { flex-direction:column;align-items:center;justify-content:center;padding:6% 8%;background:var(--slide-bg); }\n.slide-three-cards h2 { font-size:clamp(1.4rem,2.8vw,2.5rem);font-weight:700;margin-bottom:1.2em;text-align:center; }\n.slide-cards-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:1.2em;width:100%; }\n.slide-card { background:var(--slide-card-bg);border-radius:12px;padding:1.5em;text-align:center;border:1px solid var(--slide-border); }\n.slide-card-icon { font-size:2em;margin-bottom:0.5em; }\n.slide-card h3 { font-size:clamp(0.85rem,1.2vw,1.1rem);font-weight:600;margin-bottom:0.4em; }\n.slide-card p { font-size:clamp(0.75rem,1vw,0.9rem);color:var(--slide-text-muted);line-height:1.5; }\n\n/* Image Split */\n.slide-image-split { background:var(--slide-bg); }\n.slide-image-split.left { flex-direction:row; }\n.slide-image-split.right { flex-direction:row-reverse; }\n.slide-image-placeholder { flex:1;display:flex;align-items:center;justify-content:center;background:var(--slide-bg-alt);font-size:3em;color:var(--slide-text-muted); }\n.slide-image-content { flex:1;display:flex;flex-direction:column;justify-content:center;padding:8%; }\n.slide-image-content h2 { font-size:clamp(1.2rem,2.2vw,2rem);font-weight:700;margin-bottom:0.8em; }\n.slide-image-content p { font-size:clamp(0.85rem,1.2vw,1.1rem);color:var(--slide-text-secondary);line-height:1.7; }\n\n/* Quote */\n.slide-quote { flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:10% 12%;background:var(--slide-bg); }\n.slide-quote blockquote { font-size:clamp(1.2rem,2.2vw,2rem);font-weight:300;font-style:italic;line-height:1.6;max-width:80%;margin-bottom:1em; }\n.slide-quote .slide-quote-author { font-size:clamp(0.85rem,1.2vw,1.1rem);color:var(--slide-accent); }\n.slide-quote .slide-quote-context { font-size:clamp(0.75rem,1vw,0.9rem);color:var(--slide-text-muted);margin-top:0.3em; }\n\n/* Timeline */\n.slide-timeline { flex-direction:column;justify-content:center;padding:8% 10%;background:var(--slide-bg); }\n.slide-timeline h2 { font-size:clamp(1.4rem,2.8vw,2.5rem);font-weight:700;margin-bottom:1.2em; }\n.slide-timeline-track { position:relative;padding-left:2em;border-left:2px solid var(--slide-accent);display:flex;flex-direction:column;gap:1.2em; }\n.slide-timeline-event { position:relative; }\n.slide-timeline-event::before { content:'';position:absolute;left:calc(-2em - 5px);top:0.35em;width:12px;height:12px;border-radius:50%;background:var(--slide-accent); }\n.slide-timeline-year { font-weight:700;color:var(--slide-accent);font-size:clamp(0.9rem,1.3vw,1.15rem); }\n.slide-timeline-text { color:var(--slide-text-secondary);margin-top:0.2em;font-size:clamp(0.8rem,1.1vw,1rem); }\n\n/* Stats */\n.slide-stats { flex-direction:column;align-items:center;justify-content:center;padding:8% 10%;background:var(--slide-bg); }\n.slide-stats h2 { font-size:clamp(1.4rem,2.8vw,2.5rem);font-weight:700;margin-bottom:1.5em;text-align:center; }\n.slide-stats-grid { display:grid;gap:2em;width:100%; }\n.slide-stats-grid[data-cols="2"] { grid-template-columns:1fr 1fr; }\n.slide-stats-grid[data-cols="3"] { grid-template-columns:1fr 1fr 1fr; }\n.slide-stats-grid[data-cols="4"] { grid-template-columns:1fr 1fr 1fr 1fr; }\n.slide-stat { text-align:center; }\n.slide-stat-value { font-size:clamp(1.8rem,3.5vw,3rem);font-weight:800;color:var(--slide-accent);margin-bottom:0.2em; }\n.slide-stat-label { font-size:clamp(0.8rem,1.1vw,1rem);color:var(--slide-text-muted); }\n\n/* Section Break */\n.slide-section { flex-direction:column;align-items:center;justify-content:center;text-align:center;\n background:linear-gradient(135deg,var(--slide-bg-alt),var(--slide-bg));padding:10%; }\n.slide-section h2 { font-size:clamp(1.8rem,3.5vw,3rem);font-weight:700;margin-bottom:0.3em; }\n.slide-section .slide-subtitle { font-size:clamp(0.9rem,1.5vw,1.3rem);color:var(--slide-text-muted); }\n`;function buildExportHTML(e,t){const a=e.slides||[];const r=a.map(((e,t)=>{const a=e.audio?.durationMs||5e3;const r=e.audio?.dataUri||"";const n=renderSlideHTML(e);const o=n.match(/class="slide-page ([^"]*)">([\s\S]*)<\/div>$/);const i=o?o[1]:"";const s=o?o[2]:n;return`<section class="slide-page ${i}"\n data-slide-id="${e.id}" data-slide-index="${t}"\n data-duration-ms="${a}"\n data-narration="${esc(e.narration||"")}"\n ${r?`data-audio-url="${esc(r)}"`:""}\n >${s}</section>`})).join("\n");return`<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<title>${esc(e.meta?.title||"Presentation")}</title>\n<style>\n* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow: hidden; }\n${w}\n.export-controls {\n position: fixed; bottom: 0; left: 0; right: 0;\n background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);\n padding: 10px 24px; display: flex; align-items: center; gap: 14px;\n z-index: 100; border-top: 1px solid rgba(255,255,255,0.1);\n}\n.export-controls button {\n background: none; border: 1px solid rgba(255,255,255,0.25);\n color: #fff; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;\n}\n.export-controls button:hover { background: rgba(255,255,255,0.1); }\n.export-progress { flex: 1; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; cursor: pointer; }\n.export-progress-fill { height: 100%; background: var(--slide-accent); border-radius: 2px; width: 0%; transition: width 0.1s linear; }\n.export-counter { color: rgba(255,255,255,0.5); font-size: 13px; min-width: 50px; text-align: center; }\n.export-subtitle {\n position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);\n background: rgba(0,0,0,0.7); color: #fff; padding: 6px 20px; border-radius: 10px;\n font-size: 15px; max-width: 80vw; text-align: center; opacity: 0; transition: opacity 0.3s; z-index: 100;\n}\n.export-subtitle.visible { opacity: 1; }\n</style>\n</head>\n<body>\n<div class="slides-viewport slides-theme-${t}">\n${r}\n<div class="export-subtitle" id="subtitle"></div>\n</div>\n<div class="export-controls">\n <button id="btn-prev">◀</button>\n <button id="btn-play">▶ Play</button>\n <button id="btn-next">▶</button>\n <div class="export-progress" id="progress"><div class="export-progress-fill" id="progress-fill"></div></div>\n <div class="export-counter" id="counter">1 / ${a.length}</div>\n</div>\n<script>\nconst pages=document.querySelectorAll('.slide-page'),total=pages.length;\nlet idx=0,playing=false,timer=null,audio=null,progTimer=null;\nfunction show(i){pages.forEach(p=>p.classList.remove('active'));pages[i].classList.add('active');idx=i;\ndocument.getElementById('counter').textContent=(i+1)+' / '+total;\nconst n=pages[i].dataset.narration,s=document.getElementById('subtitle');\nif(n){s.textContent=n;s.classList.add('visible')}else{s.classList.remove('visible')}}\nfunction prog(r){document.getElementById('progress-fill').style.width=(r*100)+'%'}\nfunction globalProg(si,sr){let t=0,b=0;pages.forEach((p,i)=>{const d=+p.dataset.durationMs||5000;t+=d;if(i<si)b+=d});\nreturn(b+(+pages[si].dataset.durationMs||5000)*sr)/t}\nasync function playSlide(i){show(i);const d=+pages[i].dataset.durationMs||5000,u=pages[i].dataset.audioUrl;\nif(u){audio=new Audio(u);audio.play().catch(()=>{})}\nconst st=Date.now();clearInterval(progTimer);progTimer=setInterval(()=>{prog(globalProg(i,Math.min((Date.now()-st)/d,1)))},50);\nreturn new Promise(r=>{timer=setTimeout(()=>{clearInterval(progTimer);r()},d)})}\nasync function playAll(){playing=true;document.getElementById('btn-play').textContent='\\u23F8 Pause';\nfor(let i=idx;i<total;i++){if(!playing)break;await playSlide(i)}stop()}\nfunction stop(){playing=false;clearTimeout(timer);clearInterval(progTimer);if(audio){audio.pause();audio=null}\ndocument.getElementById('btn-play').textContent='\\u25B6 Play'}\ndocument.getElementById('btn-play').onclick=()=>{if(playing)stop();else playAll()};\ndocument.getElementById('btn-prev').onclick=()=>{stop();show(Math.max(0,idx-1))};\ndocument.getElementById('btn-next').onclick=()=>{stop();show(Math.min(total-1,idx+1))};\ndocument.addEventListener('keydown',e=>{if(e.key==='ArrowRight'||e.key===' '){e.preventDefault();stop();show(Math.min(total-1,idx+1))}\nif(e.key==='ArrowLeft'){stop();show(Math.max(0,idx-1))}if(e.key==='Escape')stop()});\ndocument.getElementById('progress').onclick=e=>{const r=(e.clientX-e.target.getBoundingClientRect().left)/e.target.offsetWidth;\nstop();show(Math.min(total-1,Math.max(0,Math.floor(r*total))))};\nshow(0);\n<\/script>\n</body>\n</html>`}async function slides(e){const{token:t,api:a,text:o,voice:i=n.voice,speed:s=n.speed,theme:l=n.theme,template:c=n.template,model:p=n.model,noAudio:u=false}=e;const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{const n=u?2:3;let f=1;console.log(`\n[${f}/${n}] Generating slides from text...`);console.log(` Theme: ${l}, Template: ${c}, Model: ${p}`);const h=d(" Calling LLM...");let m;let g=null;try{const e=await generateSlides(a,t,o,c,p);m=e.data;g=e.quota;h.stop(`OK (${m.slides.length} slides)`)}catch(e){h.stop("FAIL");throw new Error(`Slide generation failed: ${e.message}`)}const v=m.slides.length;const b=m.slides.map((e=>e.layout)).join(", ");console.log(` Slides: ${v} (${b})`);f++;let y=g;let w=g;if(!u){const e=m.slides.filter((e=>e.narration));console.log(`\n[${f}/${n}] Synthesizing narration (${e.length} slides with narration)...`);for(let e=0;e<m.slides.length;e++){const r=m.slides[e];if(!r.narration){r.audio={durationMs:5e3};continue}const n=await synthesizeNarration(a,t,r.narration,i,s,e,v);if(!y&&n.quota)y=n.quota;w=n.quota;const{wav:o}=A([n.pcm],0);const l=`data:audio/wav;base64,${o.toString("base64")}`;r.audio={durationMs:n.durationMs,dataUri:l}}f++}else{for(const e of m.slides){e.audio={durationMs:5e3}}}const x=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);const S=e.output||`slides-${x}.html`;console.log(`\n[${f}/${n}] Writing HTML...`);const C=buildExportHTML(m,l);r.writeFileSync(S,C,"utf8");const T=r.statSync(S);const k=(T.size/1024).toFixed(0);console.log("\n=== Output ===");console.log(` File: ${S} (${k} KB)`);console.log(` Slides: ${v} (${b})`);console.log(` Theme: ${l}`);console.log(` Template: ${c}`);if(!u){const e=m.slides.reduce(((e,t)=>e+(t.audio?.durationMs||5e3)),0);console.log(` Duration: ${formatDuration(e)}`)}if(w){const e=y&&w?y.remaining-w.remaining:v*100;console.log(` Quota: ${e} used, ${w.remaining??"?"} remaining`)}console.log("\n Open in browser to view and present.");return{outputPath:S,slideCount:v}}finally{process.removeListener("SIGINT",sigintHandler)}}function formatDuration(e){const t=Math.round(e/1e3);const a=Math.floor(t/60);const r=t%60;if(a===0)return`${r}s`;return`${a}m${r.toString().padStart(2,"0")}s`}async function handle(e){const{parseFlag:t,parseFloatFlag:r,parseBoolFlag:n,validateSpeed:o,runWithRetry:i}=a(5537);const{getToken:s,getTokenInfo:l}=a(598);const{API_BASE:c}=a(3282);const A=t(e,"--api")||c;const d=t(e,"--token");const h=r(e,"--speed");const m=t(e,"--output");o(e,h);if(m){if(!m.toLowerCase().endsWith(".html")){console.error("Error: --output path must end with .html");process.exit(1)}}const g=t(e,"--theme");if(g&&!p.includes(g)){console.error(`Error: --theme must be one of: ${p.join(", ")} (got: "${g}")`);process.exit(1)}const v=t(e,"--template");if(v&&!u.includes(v)){console.error(`Error: --template must be one of: ${u.join(", ")} (got: "${v}")`);process.exit(1)}const b=t(e,"--model");if(b&&!f.includes(b)){console.error(`Error: --model must be one of: ${f.join(", ")} (got: "${b}")`);process.exit(1)}let y=t(e,"--text");if(!y){const t=new Set(["--text","--voice","--speed","--theme","--template","--model","--output","--token","--api"]);for(let a=0;a<e.length;a++){if(e[a].startsWith("--")){if(t.has(e[a]))a++;continue}y=e[a];break}}if(!y){console.error('Error: No text provided. Usage: voxflow slides "your topic" [options]');process.exit(1)}let w;if(d){w=d}else{w=await s({api:A});const e=l();if(e){console.log(`Logged in as ${e.email}`)}}const x={token:w,api:A,text:y,theme:g||undefined,template:v||undefined,model:b||undefined,voice:t(e,"--voice")||undefined,speed:h,output:m,noAudio:n(e,"--no-audio")};await i(slides,x,A,d)}const x={slides:{usage:'"topic" [opts]',description:"Generate AI presentation slides as HTML",options:[`<text> Topic or text (positional arg or --text)`,`--text <text> Topic to generate slides about`,`--voice <id> TTS voice ID (default: ${n.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${n.speed})`,`--theme <name> Theme: midnight, paper, ember, forest, ocean (default: ${n.theme})`,`--template <name> Template: product, report, tutorial, pitch, free (default: ${n.template})`,`--model <id> Model: swift, balanced, pro, creative (default: ${n.model})`,`--no-audio Skip TTS synthesis, generate slides only`,`--output <path> Output HTML file (default: ./slides-<timestamp>.html)`],examples:['voxflow slides "AI in Healthcare"','voxflow slides "Q4 Revenue Report" --template report --theme paper','voxflow slides "React Tutorial" --template tutorial --model balanced','voxflow slides "Startup Pitch" --template pitch --theme ocean --no-audio']}};e.exports={slides:slides,handle:handle,meta:x,VALID_THEMES:p,VALID_TEMPLATES:u,VALID_MODELS:f}},3362:(e,t,a)=>{const r=a(9896);const n=a(6928);const{STORY_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l,ApiError:c}=a(2768);const{parseParagraphs:A,buildWav:d,createSilence:p}=a(7188);const{startSpinner:u}=a(5319);const{synthesizeTTS:f}=a(1428);async function generateStory(e,t,a){const r=u("\n[1/3] Generating story text...");let n,o;try{({status:n,data:o}=await i(`${e}/api/llm/chat`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{messages:[{role:"user",content:a}],stream:false,temperature:.8}))}catch(t){r.stop("FAIL");l(t,e)}if(n!==200||o.code!=="success"){r.stop("FAIL");s(n,o,"LLM")}const c=o.content;const A=o.quota;r.stop("OK");console.log(` ${c.length} chars. Quota remaining: ${A?.remaining??"?"}`);return{story:c,quota:A}}async function synthesizeParagraph(e,t,a,r,n,o,i){const s=await f({apiBase:e,token:t,text:a,voiceId:r,speed:n,index:o,total:i});console.log(` OK (${(s.audio.length/1024).toFixed(0)} KB)`);return{pcm:s.audio,quota:s.quota}}async function synthesizeAll(e,t,a,r,n){console.log(`\n[2/3] Synthesizing TTS audio (${a.length} segments)...`);const o=[];let i=null;for(let s=0;s<a.length;s++){const l=await synthesizeParagraph(e,t,a[s],r,n,s,a.length);o.push(l.pcm);i=l.quota}return{pcmBuffers:o,quota:i}}async function story(e){const sigintHandler=()=>{console.log("\n\nGeneration cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _story(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _story(e){const t=e.voice||o.voice;const a=e.paragraphs||o.paragraphs;const i=e.speed??o.speed;const s=e.silence??o.silence;const l=e.api;const c=e.token;const p=e.topic||`请写一个适合5岁儿童的短故事,要求:\n1. 分${a}段,每段2-3句话\n2. 每段描述一个清晰的画面场景\n3. 语言简单易懂,充满童趣\n4. 段落之间用空行分隔\n5. 不要添加段落编号,直接输出故事内容`;let u=e.output;if(!u){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);u=n.resolve(`story-${e}.wav`)}console.log("\n=== VoxFlow Story Generator ===");console.log(`Voice: ${t}`);console.log(`API: ${l}`);console.log(`Paragraphs: ${a}`);console.log(`Speed: ${i}`);console.log(`Output: ${u}`);const{story:f}=await generateStory(l,c,p);const h=A(f);if(h.length===0){throw new Error("No paragraphs found in generated story")}console.log(` ${h.length} paragraphs`);const{pcmBuffers:m,quota:g}=await synthesizeAll(l,c,h,t,i);console.log("\n[3/3] Merging audio...");const{wav:v,duration:b}=d(m,s);const y=n.dirname(u);r.mkdirSync(y,{recursive:true});r.writeFileSync(u,v);const w=u.replace(/\.wav$/,".txt");const x=h.map(((e,t)=>`[${t+1}] ${e}`)).join("\n\n");r.writeFileSync(w,x,"utf8");const S=1+h.length;console.log(`\n=== Done ===`);console.log(`Output: ${u} (${(v.length/1024).toFixed(1)} KB, ${b.toFixed(1)}s)`);console.log(`Story: ${w}`);console.log(`Quota: ${S} used, ${g?.remaining??"?"} remaining`);return{outputPath:u,textPath:w,duration:b,quotaUsed:S}}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,validateSpeed:o,validateSilence:i,validateOutput:s,runWithRetry:l}=a(5537);const{getToken:c,getTokenInfo:A}=a(598);const{API_BASE:d}=a(3282);const p=t(e,"--api")||d;const u=t(e,"--token");const f=r(e,"--paragraphs");const h=n(e,"--speed");const m=n(e,"--silence");const g=t(e,"--output");if(f!==undefined){if(isNaN(f)||f<1||f>20){console.error(`Error: --paragraphs must be an integer between 1 and 20 (got: "${t(e,"--paragraphs")}")`);process.exit(1)}}o(e,h);i(e,m);s(g);let v;if(u){v=u}else{v=await c({api:p});const e=A();if(e){console.log(`Logged in as ${e.email}`)}}const b={token:v,api:p,topic:t(e,"--topic"),voice:t(e,"--voice"),output:g,paragraphs:f,speed:h,silence:m};await l(story,b,p,u)}const h={story:{usage:"[opts]",description:"Generate a story with TTS narration",options:[`--topic <text> Story topic (default: children's story)`,`--voice <id> TTS voice ID (default: ${o.voice})`,`--output <path> Output WAV path (default: ./story-<timestamp>.wav)`,`--paragraphs <n> Paragraph count, 1-20 (default: ${o.paragraphs})`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--silence <sec> Silence between paragraphs, 0-5.0 (default: ${o.silence})`],examples:['voxflow story --topic "三只小猪"','voxflow story --topic "space adventure" --voice v-male-Bk7vD3xP --paragraphs 10']}};e.exports={story:story,handle:handle,meta:h,ApiError:c,_test:{parseParagraphs:A,buildWav:d,createSilence:p}}},6046:(e,t,a)=>{const r=a(9896);const n=a(6928);const o=a(857);const{asr:i}=a(5357);const{chatCompletion:s}=a(929);const{request:l,throwApiError:c,throwNetworkError:A}=a(2768);const{buildWav:d,concatAudioBuffers:p,createSilence:u}=a(7188);const{API_BASE:f,SUMMARIZE_DEFAULTS:h}=a(3282);const m=`You are a video content analyst. Given a transcript with timestamps, extract key points and structure them for a summary presentation.\n\nLANGUAGE RULE: Detect the language of the input content. All text fields (titles, bullets, narration) MUST be in the SAME language as the input.\n\nSTRICT RULES:\n1. Output ONLY valid JSON, no markdown fences, no extra text.\n2. Extract 4-8 key points from the transcript.\n3. Each point MUST reference a time range from the original video.\n4. narration: a professional summary of this point, 2-3 sentences, as if narrating a recap video.\n5. Remove filler words and repetitions. Every bullet should be specific.\n6. Do NOT invent facts not in the transcript.\n7. title: a short slide title for the point (max 15 chars).\n8. bullets: 1-3 concise bullet points (max 25 chars each).\n\nOUTPUT FORMAT:\n{\n "meta": { "title": "...", "language": "..." },\n "points": [\n {\n "id": 1,\n "title": "<point title>",\n "bullets": ["<bullet 1>", "<bullet 2>"],\n "startSec": 0,\n "endSec": 25,\n "narration": "<narrator summary of this point>"\n }\n ]\n}`;async function generatePptx(e,t){let n;try{n=a(8394)}catch{const a=t.replace(/\.pptx$/,".json");r.writeFileSync(a,JSON.stringify(e,null,2),"utf8");return{path:a,format:"json",fallback:true}}const o=new n;o.title=e.meta?.title||"Summary";o.author="VoxFlow Studio";o.layout="LAYOUT_WIDE";const i="6366F1";const s="0F172A";const l="F1F5F9";const c="94A3B8";for(const t of e.points){const e=o.addSlide();e.background={color:s};e.addText(t.title,{x:.8,y:.5,w:"85%",fontSize:32,bold:true,color:l,fontFace:"Arial"});e.addShape("rect",{x:.8,y:1.3,w:1.2,h:.04,fill:{color:i}});if(t.bullets?.length){const a=t.bullets.map((e=>({text:e,options:{bullet:{code:"2022"},fontSize:18,color:l,breakLine:true}})));e.addText(a,{x:.8,y:1.8,w:"85%",h:3,fontFace:"Arial",paraSpaceAfter:10,valign:"top"})}const a=`${formatTime(t.startSec)} - ${formatTime(t.endSec)}`;e.addText(a,{x:.8,y:4.8,w:3,fontSize:12,color:c,fontFace:"Arial"});if(t.narration)e.addNotes(t.narration)}const A=await o.write({outputType:"nodebuffer"});r.writeFileSync(t,A);return{path:t,format:"pptx",fallback:false}}function formatTime(e){const t=Math.floor(e/60);const a=Math.floor(e%60);return`${t}:${a.toString().padStart(2,"0")}`}function parseInlineTimestamps(e){const t=[];const a=/\[(\d+):(\d+\.?\d*),(\d+):(\d+\.?\d*)\]\s*(.*?)(?=\[\d+:\d|$)/gs;let r;while((r=a.exec(e))!==null){const e=parseInt(r[1])*60+parseFloat(r[2]);const a=parseInt(r[3])*60+parseFloat(r[4]);const n=r[5].trim();if(n){t.push({text:n,startSec:e,endSec:a})}}return t}async function composeVideo(e,t,i,s){const{generateTitleCard:l,concatVideos:c,normalizeVideo:A,runCommand:d}=a(9933);const p=r.mkdtempSync(n.join(o.tmpdir(),"voxflow-sumvideo-"));let u=1920,f=1080;try{const{stdout:t}=await d("ffprobe",["-v","quiet","-select_streams","v:0","-show_entries","stream=width,height","-of","csv=p=0",n.resolve(e)]);const[a,r]=t.trim().split(",").map(Number);if(a&&r){u=a;f=r}}catch{}const h=`${u}x${f}`;const m=Math.round(u*.35);const g=Math.round(u*.025);const v=[];try{process.stdout.write(" [1] Title card... ");const a=n.join(p,"title.mp4");await l(a,"",{duration:3,resolution:h,sourceVideo:e});const r=n.join(p,"title-norm.mp4");await A(a,r,{resolution:h});v.push(r);console.log("OK");for(let a=0;a<t.length;a++){const r=t[a];process.stdout.write(` [${a+2}] "${r.title}"... `);const o=Math.max(0,r.startSec);const s=Math.min(r.endSec,r.startSec+30);const l=n.join(p,`pip-${a}.mp4`);const c=Math.round(m*f/u/2)*2;const b=Math.round(m/2)*2;const y=f-c-g;const w=[`[0:v]scale=${u}:${f},boxblur=25:5,eq=brightness=-0.3:saturation=0.5[bg]`,`[0:v]scale=${b}:${c}[pip]`,`[bg][pip]overlay=${u-b-g}:${y}[out]`].join(";");if(i[a]){await d("ffmpeg",["-ss",String(o),"-to",String(s),"-i",n.resolve(e),"-i",n.resolve(i[a]),"-filter_complex",w,"-map","[out]","-map","1:a:0","-c:v","libx264","-preset","fast","-crf","23","-pix_fmt","yuv420p","-c:a","aac","-ar","24000","-ac","1","-shortest","-y",l],{timeout:3e5})}else{await d("ffmpeg",["-ss",String(o),"-to",String(s),"-i",n.resolve(e),"-filter_complex",w,"-map","[out]","-map","0:a:0","-c:v","libx264","-preset","fast","-crf","23","-pix_fmt","yuv420p","-c:a","aac","-ar","24000","-ac","1","-shortest","-y",l],{timeout:3e5})}const x=n.join(p,`norm-${a}.mp4`);await A(l,x,{resolution:h});v.push(x);console.log("OK")}process.stdout.write(" [last] Closing... ");const o=n.join(p,"closing.mp4");await l(o,"",{duration:2,resolution:h,sourceVideo:e});const b=n.join(p,"closing-norm.mp4");await A(o,b,{resolution:h});v.push(b);console.log("OK");process.stdout.write(" Concatenating... ");await c(v,n.resolve(s));console.log("OK")}finally{try{r.rmSync(p,{recursive:true,force:true})}catch{}}}async function synthesizeTts(e,t,a,r,n){let o,i;try{({status:o,data:i}=await l(`${e}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{text:a,voiceId:r,speed:n,format:"pcm",sampleRate:24e3}))}catch(t){A(t,e)}if(o!==200||i.code!=="success"){c(o,i,"TTS")}return Buffer.from(i.audio,"base64")}async function summarize(e){const sigintHandler=()=>{console.log("\n\nSummarize cancelled.");process.exit(0)};process.on("SIGINT",sigintHandler);try{return await _summarize(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _summarize(e){const{token:t,api:a=f,input:l,text:c,slideCount:A=h.slides,language:p=h.language,voice:g=h.voice,speed:v=h.speed,engine:b=h.engine,model:y,tts:w=false,video:x=false,output:S}=e;console.log("\n=== VoxFlow Summarize ===");let C;let T=0;const k=l?n.resolve(l):null;if(c){console.log(`Input: text (${c.length} chars)`);C=c}else if(l){console.log(`Input: ${n.basename(k)}`);process.stdout.write("[1] Transcribing audio... ");const e=r.mkdtempSync(n.join(o.tmpdir(),"voxflow-summarize-"));const s=n.join(e,"transcript.txt");const l=await i({token:t,api:a,input:k,format:"txt",output:s,engine:b,model:y,mode:"file"});C=r.readFileSync(s,"utf8");T+=l.quotaUsed;console.log(`${l.captionCount} segments (${l.mode})`);try{r.rmSync(e,{recursive:true,force:true})}catch{}}else{throw new Error("Either --input <file> or --text <text> is required.")}if(!C.trim()){throw new Error("Transcript is empty. No audible speech detected.")}process.stdout.write("[2] Extracting key points... ");const P=await s({apiBase:a,token:t,messages:[{role:"system",content:m},{role:"user",content:`Extract ${A} key points from this transcript. Language: ${p}.\n\nTRANSCRIPT:\n${C.slice(0,8e3)}\n\nOutput JSON only:`}],temperature:.3,maxTokens:4e3});T+=1;let E;try{E=JSON.parse(P.content.trim())}catch{const e=P.content.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])E=JSON.parse(e[1].trim());else throw new Error("Failed to parse summary JSON from LLM")}const _=E.points||[];console.log(`${_.length} points`);process.stdout.write("[3] Generating PPTX... ");const L=l?n.basename(k,n.extname(k)):"summary";const B=l?n.dirname(k):process.cwd();const D=S?n.resolve(S):n.resolve(B,`${L}-summary.pptx`);const I=await generatePptx(E,D);console.log(`OK (${I.format})`);const N=[];if(x||w){console.log("[4] Synthesizing narrations...");const e=[];for(let i=0;i<_.length;i++){const s=_[i];if(!s.narration?.trim()){N.push(null);e.push(u(1,24e3));continue}process.stdout.write(` TTS [${i+1}/${_.length}]... `);const l=await synthesizeTts(a,t,s.narration,g,v);T+=1;if(x){const e=n.join(o.tmpdir(),`voxflow-sum-tts-${i}.wav`);const t=d([l],0);r.writeFileSync(e,t.wav||t);N.push(e)}e.push(l);e.push(u(.5,24e3));const c=(l.length/48).toFixed(0);console.log(`OK (${c}ms)`)}if(w){const t=D.replace(/\.(pptx|json)$/,"-narration.wav");const a=d(e,0);r.writeFileSync(t,a.wav||a);console.log(` Narration: ${t}`)}}let F=null;if(x&&k){console.log("[5] Composing video...");F=D.replace(/\.(pptx|json)$/,".mp4");try{await composeVideo(k,_,N,F,{title:E.meta?.title||"Summary"})}catch(e){console.log(` Video failed: ${e.message}`);F=null}N.forEach((e=>{if(e)try{r.unlinkSync(e)}catch{}}))}console.log("\n=== Done ===");console.log(`Slides: ${I.path} (${_.length} points)`);if(F)console.log(`Video: ${F}`);console.log(`Quota: ${T} used`);return{pptxPath:I.path,videoPath:F,slideCount:_.length,quotaUsed:T,summaryData:E}}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,runWithRetry:i}=a(5537);const{getToken:s}=a(598);const{API_BASE:l,SUMMARIZE_DEFAULTS:c}=a(3282);const A=a(9896);const d=a(6928);const p=t(e,"--api")||l;const u=t(e,"--token");const f=t(e,"--input");const h=t(e,"--text");const m=t(e,"--output");const g=t(e,"--voice")||c.voice;const v=n(e,"--speed")??c.speed;const b=r(e,"--slides")??c.slides;const y=t(e,"--lang")||c.language;const w=t(e,"--engine")||c.engine;const x=t(e,"--model");const S=o(e,"--tts");const C=o(e,"--video");const T=t(e,"--scheme")||"aurora";if(!f&&!h){console.error("Error: --input <file> or --text <text> is required.\nExample: voxflow summarize --input lecture.mp4");process.exit(1)}if(f){const e=d.resolve(f);if(!A.existsSync(e)){console.error(`Error: File not found: ${e}`);process.exit(1)}}if(v!==undefined&&(isNaN(v)||v<.5||v>2)){console.error(`Error: --speed must be between 0.5 and 2.0`);process.exit(1)}const k=u||await s();if(!k){console.error("Not logged in. Run: voxflow login");process.exit(1)}const P={token:k,api:p,input:f,text:h,output:m,voice:g,speed:v,slideCount:b,language:y,engine:w,model:x,tts:S,video:C,scheme:T};await i(summarize,P,p,u)}const g={summarize:{usage:"<--input|--text> [opts]",description:"Summarize video/audio/text into presentation slides (PPTX)",options:[`--input <file> Input video/audio file → ASR + summarize`,`--text <text> Direct text input (skip ASR)`,`--slides <n> Number of slides, 4-12 (default: ${h.slides})`,`--lang <code> Output language: en, zh, ja, etc. (default: ${h.language})`,`--engine <engine> ASR engine: auto, local, cloud (default: ${h.engine})`,`--model <model> Whisper model for local ASR: tiny, base, small, medium, large`,`--tts Generate TTS narration audio for each slide`,`--video Also render an MP4 video (requires video-present/ + Remotion)`,`--scheme <name> Video visual scheme: noir, neon, editorial, aurora (default), brutalist`,`--voice <id> TTS voice ID (default: ${h.voice})`,`--speed <n> TTS speed 0.5-2.0 (default: ${h.speed})`,`--output <path> Output PPTX path (default: <input>-summary.pptx)`],examples:["voxflow summarize --input lecture.mp4","voxflow summarize --input meeting.mp4 --lang zh --slides 10","voxflow summarize --input podcast.mp3 --engine local --tts","voxflow summarize --input lecture.mp4 --video --scheme aurora",'voxflow summarize --text "长篇文章内容..." --slides 6 --lang zh']}};e.exports={summarize:summarize,handle:handle,meta:g}},5859:(e,t,a)=>{const r=a(9896);const n=a(6928);const{SYNTHESIZE_DEFAULTS:o}=a(3282);const{request:i,throwApiError:s,throwNetworkError:l,ApiError:c}=a(2768);const{buildWav:A,getFileExtension:d}=a(7188);const{startSpinner:p}=a(5319);async function synthesize(e){let t=false;const sigintHandler=()=>{if(t)return;t=true;console.log("\n\nSynthesis cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _synthesize(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _synthesize(e){const t=e.text;if(!t||t.trim().length===0){throw new Error('No text provided. Usage: voxflow synthesize "your text here"')}const a=e.voice||o.voice;const c=e.speed??o.speed;const u=e.volume??o.volume;const f=e.pitch??o.pitch;const h=e.format||"pcm";const m=e.api;const g=e.token;const v=d(h);let b=e.output;if(!b){const e=(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19);b=n.resolve(`tts-${e}${v}`)}console.log("\n=== VoxFlow Synthesize ===");console.log(`Voice: ${a}`);console.log(`Format: ${h==="pcm"?"wav (pcm)":h}`);console.log(`Speed: ${c}`);if(u!==1)console.log(`Volume: ${u}`);if(f!==0)console.log(`Pitch: ${f}`);console.log(`Text: ${t.length>60?t.slice(0,57)+"...":t}`);console.log(`Output: ${b}`);const y=p("\n[1/1] Synthesizing TTS audio...");let w,x;try{({status:w,data:x}=await i(`${m}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${g}`}},{text:t.trim(),voiceId:a,format:h,speed:c,volume:u,pitch:f}))}catch(e){y.stop("FAIL");l(e,m)}if(w!==200||x.code!=="success"){y.stop("FAIL");s(w,x,"TTS")}const S=Buffer.from(x.audio,"base64");y.stop("OK");let C,T;if(h==="mp3"){C=S;T=S.length/4e3;console.log(` ${(S.length/1024).toFixed(0)} KB MP3`)}else if(h==="wav"){C=S;const e=S.length>44?S.readUInt32LE(28):48e3;const t=S.length>44?S.readUInt32LE(40):S.length;T=t/e;console.log(` ${(S.length/1024).toFixed(0)} KB WAV`)}else{const e=A([S],0);C=e.wav;T=e.duration;console.log(` ${(S.length/1024).toFixed(0)} KB PCM → WAV`)}const k=n.dirname(b);r.mkdirSync(k,{recursive:true});r.writeFileSync(b,C);const P=1;console.log(`\n=== Done ===`);console.log(`Output: ${b} (${(C.length/1024).toFixed(1)} KB, ${T.toFixed(1)}s)`);console.log(`Quota: ${P} used, ${x.quota?.remaining??"?"} remaining`);return{outputPath:b,duration:T,quotaUsed:P,format:h}}async function handle(e){const{parseFlag:t,parseFloatFlag:r,validateSpeed:n,validateOutput:o,validateFormat:i,runWithRetry:s}=a(5537);const{getToken:l,getTokenInfo:c}=a(598);const{API_BASE:A}=a(3282);const d=t(e,"--api")||A;const p=t(e,"--token");let u=t(e,"--text");if(!u){const t=new Set(["--text","--voice","--speed","--volume","--pitch","--output","--token","--api","--format"]);for(let a=0;a<e.length;a++){if(e[a].startsWith("--")){if(t.has(e[a]))a++;continue}u=e[a];break}}if(!u){console.error('Error: No text provided. Usage: voxflow synthesize "your text here"');process.exit(1)}const f=r(e,"--speed");const h=r(e,"--volume");const m=r(e,"--pitch");const g=t(e,"--output");const v=t(e,"--format");n(e,f);o(g,v);i(v);if(h!==undefined){if(isNaN(h)||h<.1||h>2){console.error(`Error: --volume must be between 0.1 and 2.0 (got: "${t(e,"--volume")}")`);process.exit(1)}}if(m!==undefined){if(isNaN(m)||m<-12||m>12){console.error(`Error: --pitch must be between -12 and 12 (got: "${t(e,"--pitch")}")`);process.exit(1)}}let b;if(p){b=p}else{b=await l({api:d});const e=c();if(e){console.log(`Logged in as ${e.email}`)}}const y={token:b,api:d,text:u,voice:t(e,"--voice"),output:g,speed:f,volume:h,pitch:m,format:v||undefined};await s(synthesize,y,d,p)}const u={synthesize:{usage:"<text>",description:"Synthesize a single text snippet to audio (alias: say)",aliasOf:"say",options:[`<text> Text to synthesize (positional arg or --text)`,`--text <text> Text to synthesize (alternative to positional)`,`--voice <id> TTS voice ID (default: ${o.voice})`,`--format <fmt> Output format: pcm, wav, mp3 (default: pcm → WAV)`,`--speed <n> TTS speed 0.5-2.0 (default: ${o.speed})`,`--volume <n> TTS volume 0.1-2.0 (default: ${o.volume})`,`--pitch <n> TTS pitch -12 to 12 (default: ${o.pitch})`,`--output <path> Output file path (default: ./tts-<timestamp>.wav)`],examples:['voxflow say "你好世界"','voxflow say "你好世界" --format mp3','voxflow synthesize "Welcome" --voice v-male-Bk7vD3xP --format mp3']}};e.exports={synthesize:synthesize,handle:handle,meta:u,ApiError:c}},173:(e,t,a)=>{const r=a(9896);const n=a(6928);const{API_BASE:o,TRANSLATE_DEFAULTS:i}=a(3282);const{chatCompletion:s,detectLanguage:l}=a(929);const{parseSrt:c,formatSrt:A}=a(8217);const d={zh:"Chinese (Simplified)",en:"English",ja:"Japanese",ko:"Korean",fr:"French",de:"German",es:"Spanish",pt:"Portuguese",ru:"Russian",ar:"Arabic",th:"Thai",vi:"Vietnamese",it:"Italian"};function batchCaptions(e,t=10){const a=[];for(let r=0;r<e.length;r+=t){a.push(e.slice(r,r+t))}return a}function buildTranslationPrompt(e,t,a){const r=[`You are a professional subtitle translator. Translate each numbered line from ${t} to ${a}.`,"","Rules:","- Return ONLY the translated lines, one per number","- Keep the exact same numbering (1., 2., 3., ...)","- Preserve [Speaker: xxx] tags unchanged — do NOT translate speaker names","- Keep translations concise and natural for subtitles","- Do not add explanations, notes, or extra text"].join("\n");const n=e.map(((e,t)=>{const a=e.speakerId?`[Speaker: ${e.speakerId}] `:"";return`${t+1}. ${a}${e.text}`})).join("\n");return{system:r,user:n}}function parseTranslationResponse(e,t){const a=e.trim().split("\n").filter((e=>e.trim()));const r=[];for(let e=0;e<t.length;e++){const n=new RegExp(`^${e+1}\\.\\s*(.+)$`);const o=a.find((e=>n.test(e.trim())));if(o){const a=o.trim().replace(n,"$1").trim();let i=a;const s=a.match(/^\[Speaker:\s*[^\]]+\]\s*/i);if(s){i=a.slice(s[0].length)}r.push({...t[e],text:i||t[e].text})}else{if(e<a.length){const n=a[e].replace(/^\d+\.\s*/,"").trim();let o=n;const i=n.match(/^\[Speaker:\s*[^\]]+\]\s*/i);if(i){o=n.slice(i[0].length)}r.push({...t[e],text:o||t[e].text})}else{r.push({...t[e]})}}}return r}function realignTimings(e,t){const a=.3;const r=100;const n=t.map(((t,n)=>{const o=e[n];if(!o)return t;const i=o.text.length;const s=t.text.length;if(i===0)return t;const l=s/i;if(l<1+a&&l>1-a){return t}const c=o.endMs-o.startMs;let A=Math.round(c*l);const d=n<e.length-1?e[n+1].startMs:Infinity;const p=d-t.startMs-r;if(A>p&&p>0){A=p}A=Math.max(A,500);return{...t,endMs:t.startMs+A}}));return n}async function translate(e){const sigintHandler=()=>{console.log("\n\nTranslation cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _translate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _translate(e){const{token:t,api:a=o,srt:r,text:n,input:s,from:l,to:c,output:A,realign:d=false,batchSize:p=i.batchSize}=e;if(r)return _translateSrt({token:t,api:a,srt:r,from:l,to:c,output:A,realign:d,batchSize:p});if(n)return _translateText({token:t,api:a,text:n,from:l,to:c});if(s)return _translateFile({token:t,api:a,input:s,from:l,to:c,output:A});throw new Error("No input specified. Use --srt, --text, or --input")}async function _translateSrt({token:e,api:t,srt:o,from:l,to:p,output:u,realign:f,batchSize:h}){console.log("\n=== VoxFlow Translate (SRT) ===");const m=n.resolve(o);const g=r.readFileSync(m,"utf8");const v=c(g);if(v.length===0){throw new Error(`SRT file is empty or invalid: ${m}`)}console.log(`Input: ${n.basename(m)}`);console.log(`Captions: ${v.length}`);const b=l||await autoDetectLanguage(t,v);const y=d[b]||b;const w=d[p]||p;console.log(`From: ${y} (${b})`);console.log(`To: ${w} (${p})`);console.log(`Realign: ${f?"yes":"no"}`);const x=batchCaptions(v,h);console.log(`Batches: ${x.length} (batch size: ${h})`);console.log("");let S=[];let C=0;for(let a=0;a<x.length;a++){const r=x[a];process.stdout.write(` [${a+1}/${x.length}] Translating ${r.length} captions...`);const{system:n,user:o}=buildTranslationPrompt(r,y,w);const l=await s({apiBase:t,token:e,messages:[{role:"system",content:n},{role:"user",content:o}],temperature:i.temperature,maxTokens:i.maxTokens});const c=parseTranslationResponse(l.content,r);S=S.concat(c);C++;if(l.quota){console.log(` OK (remaining: ${l.quota.remaining})`)}else{console.log(" OK")}}if(f){console.log(" Re-aligning subtitle timing...");S=realignTimings(v,S)}S=S.map(((e,t)=>({...e,id:t+1})));const T=A(S);let k;if(u){k=n.resolve(u)}else{const e=n.basename(m,n.extname(m));const t=n.dirname(m);k=a.ab+"cli/"+t+"/"+e+"-"+p+".srt"}r.writeFileSync(k,T,"utf8");console.log(`\n=== Done ===`);console.log(`Output: ${k}`);console.log(`Captions: ${S.length}`);console.log(`Quota: ${C} used`);if(S.length>0){console.log(`\n--- Preview ---`);const e=S.slice(0,3);for(const t of e){const e=t.speakerId?`[${t.speakerId}] `:"";const a=t.text.length>60?t.text.slice(0,57)+"...":t.text;console.log(` ${t.id}. ${e}${a}`)}if(S.length>3){console.log(` ... (${S.length-3} more)`)}}return{outputPath:k,captionCount:S.length,quotaUsed:C,from:b,to:p}}async function _translateText({token:e,api:t,text:a,from:r,to:n}){console.log("\n=== VoxFlow Translate (Text) ===");const o=r||await autoDetectLanguage(t,[{text:a}]);const l=d[o]||o;const c=d[n]||n;console.log(`From: ${l} → To: ${c}`);const A=await s({apiBase:t,token:e,messages:[{role:"system",content:`You are a professional translator. Translate the following text from ${l} to ${c}. Return ONLY the translation, no explanations.`},{role:"user",content:a}],temperature:i.temperature,maxTokens:i.maxTokens});const p=A.content.trim();console.log(`\n${p}`);const u=A.quota?A.quota.remaining:"?";console.log(`\n(Quota: 1 used, ${u} remaining)`);return{text:p,quotaUsed:1,from:o,to:n}}async function _translateFile({token:e,api:t,input:o,from:l,to:c,output:A}){console.log("\n=== VoxFlow Translate (File) ===");const p=n.resolve(o);const u=r.readFileSync(p,"utf8");if(u.trim().length===0){throw new Error(`Input file is empty: ${p}`)}console.log(`Input: ${n.basename(p)}`);console.log(`Length: ${u.length} chars`);const f=l||await autoDetectLanguage(t,[{text:u}]);const h=d[f]||f;const m=d[c]||c;console.log(`From: ${h} → To: ${m}`);const g=await s({apiBase:t,token:e,messages:[{role:"system",content:`You are a professional translator. Translate the following document from ${h} to ${m}. Preserve the original formatting (paragraphs, line breaks, markdown). Return ONLY the translation.`},{role:"user",content:u}],temperature:i.temperature,maxTokens:Math.max(i.maxTokens,4e3)});const v=g.content.trim();let b;if(A){b=n.resolve(A)}else{const e=n.extname(p);const t=n.basename(p,e);const r=n.dirname(p);b=a.ab+"cli/"+r+"/"+t+"-"+c+""+e}r.writeFileSync(b,v+"\n","utf8");const y=g.quota?g.quota.remaining:"?";console.log(`\n=== Done ===`);console.log(`Output: ${b}`);console.log(`Quota: 1 used, ${y} remaining`);return{outputPath:b,quotaUsed:1,from:f,to:c}}async function autoDetectLanguage(e,t){const a=t.slice(0,3).map((e=>e.text)).join(" ");const r=await l({apiBase:e,text:a});return r||"auto"}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseBoolFlag:n,runWithRetry:o}=a(5537);const{getToken:i,getTokenInfo:s}=a(598);const{API_BASE:l,TRANSLATE_DEFAULTS:c}=a(3282);const A=t(e,"--api")||l;const d=t(e,"--token");const p=t(e,"--srt");const u=t(e,"--text");const f=t(e,"--input");const h=t(e,"--from");const m=t(e,"--to");const g=t(e,"--output");const v=n(e,"--realign");const b=r(e,"--batch-size");if(!m&&!n(e,"--help")){console.error("Error: --to <lang> is required. Example: voxflow translate --srt file.srt --to en");process.exit(1)}const y=["zh","en","ja","ko","fr","de","es","pt","ru","ar","th","vi","it"];if(m&&!y.includes(m)){console.error(`Error: --to must be one of: ${y.join(", ")} (got: "${m}")`);process.exit(1)}if(h&&!y.includes(h)&&h!=="auto"){console.error(`Error: --from must be one of: auto, ${y.join(", ")} (got: "${h}")`);process.exit(1)}const w=[p,u,f].filter(Boolean).length;if(w===0&&!n(e,"--help")){console.error("Error: Provide one of: --srt <file>, --text <text>, --input <file>");process.exit(1)}if(w>1){console.error("Error: Specify only one input: --srt, --text, or --input");process.exit(1)}if(p){const e=a(9896);const t=a(6928);const r=t.resolve(p);if(!e.existsSync(r)){console.error(`Error: SRT file not found: ${r}`);process.exit(1)}}if(f){const e=a(9896);const t=a(6928);const r=t.resolve(f);if(!e.existsSync(r)){console.error(`Error: Input file not found: ${r}`);process.exit(1)}}if(b!==undefined){if(isNaN(b)||b<1||b>20){console.error(`Error: --batch-size must be between 1 and 20 (got: "${t(e,"--batch-size")}")`);process.exit(1)}}let x;if(d){x=d}else{x=await i({api:A});const e=s();if(e){console.log(`Logged in as ${e.email}`)}}const S={token:x,api:A,srt:p,text:u,input:f,from:h,to:m,output:g,realign:v,batchSize:b};await o(translate,S,A,d)}const p={translate:{usage:"[opts]",description:"Translate SRT subtitles, text, or files",options:[`--srt <file> SRT subtitle file to translate`,`--text <text> Inline text to translate`,`--input <file> Text file (.txt, .md) to translate`,`--from <lang> Source language code (default: auto-detect)`,`--to <lang> Target language code (required)`,`--output <path> Output file path (default: <input>-<lang>.<ext>)`,`--realign Adjust subtitle timing for target language length`,`--batch-size <n> Captions per LLM call, 1-20 (default: ${i.batchSize})`],examples:["voxflow translate --srt subtitles.srt --to en",'voxflow translate --text "你好世界" --to en',"voxflow translate --input article.txt --to en --output article-en.txt"]}};e.exports={translate:translate,handle:handle,meta:p,LANG_MAP:d,_test:{buildTranslationPrompt:buildTranslationPrompt,parseTranslationResponse:parseTranslationResponse,realignTimings:realignTimings,batchCaptions:batchCaptions}}},6851:(e,t,a)=>{const r=a(9896);const n=a(6928);const o=a(857);const{checkFfmpeg:i,extractAudio:s}=a(9933);const{asr:l}=a(5357);const{translate:c}=a(173);const{dub:A}=a(220);const{detectLanguage:d}=a(929);const{parseSrt:p}=a(8217);const{API_BASE:u,VIDEO_TRANSLATE_DEFAULTS:f}=a(3282);const h={zh:"16k_zh",en:"16k_en",ja:"16k_ja",ko:"16k_ko","zh-en":"16k_zh_en"};function resolveAsrLang(e,t){if(t)return t;if(e&&h[e])return h[e];return"16k_zh"}async function videoTranslate(e){const sigintHandler=()=>{console.log("\n\nVideo translation cancelled.");process.exit(130)};process.on("SIGINT",sigintHandler);try{return await _videoTranslate(e)}finally{process.removeListener("SIGINT",sigintHandler)}}async function _videoTranslate(e){const{token:t,api:h=u,input:m,from:g,to:v,voice:b,voicesMap:y,realign:w=false,output:x,keepIntermediates:S=false,batchSize:C=f.batchSize,speed:T=f.speed,asrMode:k,asrLang:P,engine:E="auto",model:_}=e;const L=n.resolve(m);const B=n.basename(L,n.extname(L));console.log("\n=== VoxFlow Video Translate ===");console.log(`Input: ${n.basename(L)}`);console.log(`Target: ${v}`);console.log("");const D=r.mkdtempSync(n.join(o.tmpdir(),"voxflow-vtranslate-"));let I=0;const N={};try{process.stdout.write("[1/4] Checking FFmpeg... ");const e=await i();if(!e.available){throw new Error("FFmpeg is required for video-translate. Install: https://ffmpeg.org/download.html")}console.log(`OK (${e.version})`);process.stdout.write("[2/4] Transcribing audio... ");const o=n.join(D,"extracted-audio.wav");await s(L,o);const u=n.join(D,"source.srt");const f=resolveAsrLang(g,P);const m={token:t,api:h,input:o,format:"srt",output:u,lang:f,engine:E};if(k)m.mode=k;if(_)m.model=_;const F=await l(m);if(F.captionCount===0){throw new Error("ASR produced no captions. The video may have no audible speech.")}N.asr={mode:F.mode,duration:F.duration,captionCount:F.captionCount,quotaUsed:F.quotaUsed};I+=F.quotaUsed;console.log(`${F.captionCount} captions (${F.mode} mode)`);let R=g;if(!R){const e=r.readFileSync(u,"utf8");const t=p(e);const a=t.slice(0,3).map((e=>e.text)).join(" ");R=await d({apiBase:h,text:a})||"auto"}process.stdout.write(`[3/4] Translating (${R} → ${v})... `);const M=n.join(D,`translated-${v}.srt`);const O=await c({token:t,api:h,srt:u,from:R,to:v,output:M,realign:w,batchSize:C});N.translate={from:O.from,to:O.to,captionCount:O.captionCount,quotaUsed:O.quotaUsed};I+=O.quotaUsed;console.log(`${O.captionCount} captions translated`);process.stdout.write("[4/4] Dubbing and merging video... ");const z=x?n.resolve(x):a.ab+"cli/"+n.dirname(L)+"/"+B+"-"+v+".mp4";const $=await A({token:t,api:h,srt:M,voice:b,voicesMap:y,speed:T,video:L,output:z});N.dub={segmentCount:$.segmentCount,duration:$.duration,quotaUsed:$.quotaUsed,warnings:$.warnings};I+=$.quotaUsed;console.log(`${$.segmentCount} segments dubbed`);if(S){const e=n.resolve(n.dirname(z),`${B}-${v}-intermediates`);r.mkdirSync(e,{recursive:true});const t=[["extracted-audio.wav",o],["source.srt",u],[`translated-${v}.srt`,M]];for(const[a,o]of t){if(r.existsSync(o)){r.copyFileSync(o,n.join(e,a))}}console.log(`\nIntermediates saved: ${e}`)}console.log("\n=== Done ===");console.log(`Output: ${z}`);console.log(`Language: ${R} → ${v}`);console.log(`Captions: ${O.captionCount}`);console.log(`Duration: ${$.duration.toFixed(1)}s`);console.log(`Quota: ${I} used`);if(N.dub.warnings&&N.dub.warnings.length>0){console.log(`\nWarnings:`);for(const e of N.dub.warnings){console.log(` - ${e}`)}}return{outputPath:z,from:R,to:v,captionCount:O.captionCount,quotaUsed:I,stages:N}}finally{if(!S){try{r.rmSync(D,{recursive:true,force:true})}catch{}}}}async function handle(e){const{parseFlag:t,parseIntFlag:r,parseFloatFlag:n,parseBoolFlag:o,validateSpeed:i,runWithRetry:s}=a(5537);const{getToken:l,getTokenInfo:c}=a(598);const{API_BASE:A,VIDEO_TRANSLATE_DEFAULTS:d}=a(3282);const p=t(e,"--api")||A;const u=t(e,"--token");const f=t(e,"--input");const h=t(e,"--from");const m=t(e,"--to");const g=t(e,"--voice");const v=t(e,"--voices");const b=t(e,"--output");const y=o(e,"--realign");const w=o(e,"--keep-intermediates");const x=r(e,"--batch-size");const S=n(e,"--speed");const C=t(e,"--asr-mode");const T=t(e,"--asr-lang");const k=t(e,"--engine");const P=t(e,"--model");if(!f){console.error("Error: --input <video-file> is required. Example: voxflow video-translate --input video.mp4 --to en");process.exit(1)}if(!m){console.error("Error: --to <lang> is required. Example: voxflow video-translate --input video.mp4 --to en");process.exit(1)}const E=["zh","en","ja","ko","fr","de","es","pt","ru","ar","th","vi","it"];if(m&&!E.includes(m)){console.error(`Error: --to must be one of: ${E.join(", ")} (got: "${m}")`);process.exit(1)}if(h&&!E.includes(h)&&h!=="auto"){console.error(`Error: --from must be one of: auto, ${E.join(", ")} (got: "${h}")`);process.exit(1)}if(f){const e=a(9896);const t=a(6928);const r=t.resolve(f);if(!e.existsSync(r)){console.error(`Error: Video file not found: ${r}`);process.exit(1)}}i(e,S);if(x!==undefined&&(isNaN(x)||x<1||x>20)){console.error(`Error: --batch-size must be between 1 and 20 (got: "${t(e,"--batch-size")}")`);process.exit(1)}const _=["auto","sentence","flash","file"];if(C&&!_.includes(C)){console.error(`Error: --asr-mode must be one of: ${_.join(", ")} (got: "${C}")`);process.exit(1)}const L=["auto","local","cloud","whisper","tencent"];if(k&&!L.includes(k)){console.error(`Error: --engine must be one of: ${L.join(", ")} (got: "${k}")`);process.exit(1)}if(v){const e=a(9896);const t=a(6928);const r=t.resolve(v);if(!e.existsSync(r)){console.error(`Error: Voices map file not found: ${r}`);process.exit(1)}}let B;if(u){B=u}else{B=await l({api:p});const e=c();if(e){console.log(`Logged in as ${e.email}`)}}const D={token:B,api:p,input:f,from:h,to:m,voice:g,voicesMap:v,output:b,realign:y,keepIntermediates:w,batchSize:x,speed:S,asrMode:C,asrLang:T,engine:k,model:P};await s(videoTranslate,D,p,u)}const m={"video-translate":{usage:"[opts]",description:"Translate entire video: ASR → translate → dub → merge",options:[`--input <file> Input video file (required)`,`--to <lang> Target language code (required)`,`--from <lang> Source language code (default: auto-detect)`,`--voice <id> TTS voice ID for dubbed audio`,`--voices <file> JSON speaker→voiceId map for multi-speaker dubbing`,`--realign Adjust subtitle timing for target language length`,`--speed <n> TTS speed 0.5-2.0 (default: ${a(3282).VIDEO_TRANSLATE_DEFAULTS.speed})`,`--batch-size <n> Translation batch size, 1-20 (default: ${a(3282).VIDEO_TRANSLATE_DEFAULTS.batchSize})`,`--keep-intermediates Keep intermediate files (SRT, audio) for debugging`,`--output <path> Output MP4 path (default: <input>-<lang>.mp4)`,`--asr-mode <mode> Override ASR mode: auto, sentence, flash, file`,`--asr-lang <engine> Override ASR engine: 16k_zh, 16k_en, 16k_ja, 16k_ko, etc.`,`--engine <engine> ASR engine: auto, local, cloud (default: auto)`,`--model <model> Whisper model for local engine: tiny, base, small, medium, large`],examples:["voxflow video-translate --input video.mp4 --to en","voxflow video-translate --input video.mp4 --from zh --to en --realign","voxflow video-translate --input video.mp4 --to ja --voice v-male-Bk7vD3xP","voxflow video-translate --input video.mp4 --to en --engine local"]}};e.exports={videoTranslate:videoTranslate,handle:handle,meta:m}},2972:(e,t,a)=>{const{request:r,throwNetworkError:n}=a(2768);async function voices(e){const t=e.api;const a=e.extended?"true":"false";let o,i;try{({status:o,data:i}=await r(`${t}/api/tts/voices?includeExtended=${a}`,{method:"GET"}))}catch(e){n(e,t)}if(o!==200){throw new Error(`Failed to fetch voices (${o}): ${i?.message||"unknown error"}`)}let s=i.voices||i.data?.voices||[];if(e.gender){const t=normalizeGender(e.gender);if(!t){throw new Error(`--gender must be one of: male, m, female, f (got: "${e.gender}")`)}s=s.filter((e=>{const a=(e.gender||"").toLowerCase();return a===t}))}if(e.language){const t=e.language.toLowerCase();s=s.filter((e=>(e.language||"").toLowerCase()===t))}if(e.search){const t=e.search.toLowerCase();s=s.filter((e=>{const a=[e.name,e.nameEn,e.tone,e.style,e.description,e.scenarios].filter(Boolean).join(" ").toLowerCase();return a.includes(t)}))}if(s.length===0){console.log("No voices match your criteria.");return}if(e.json){console.log(JSON.stringify(s,null,2))}else{printTable(s)}console.log(`\nFound ${s.length} voice${s.length===1?"":"s"}.`)}function normalizeGender(e){const t=(e||"").toLowerCase().trim();if(t==="male"||t==="m")return"male";if(t==="female"||t==="f")return"female";return null}function printTable(e){const t=24;const a=14;const r=8;const n=22;const o=20;const i=["ID".padEnd(t),"Name".padEnd(a),"Gender".padEnd(r),"Tone".padEnd(n),"Style".padEnd(o)].join(" ");console.log(`\n${i}`);console.log("-".repeat(i.length));for(const i of e){const e=[truncate(i.id||"",t).padEnd(t),truncate(i.name||"",a).padEnd(a),truncate(i.gender||"",r).padEnd(r),truncate(i.tone||"",n).padEnd(n),truncate(i.style||"",o).padEnd(o)].join(" ");console.log(e)}}function truncate(e,t){if(e.length<=t)return e;return e.slice(0,t-1)+"…"}async function handle(e){const{parseFlag:t,parseBoolFlag:r}=a(5537);const{API_BASE:n}=a(3282);const o=t(e,"--api")||n;const i={api:o,search:t(e,"--search"),gender:t(e,"--gender"),language:t(e,"--language"),json:r(e,"--json"),extended:r(e,"--extended")};await voices(i)}const o={voices:{usage:"[opts]",description:"Browse and search available TTS voices",options:[`--search <query> Search by name, tone, style, description`,`--gender <m|f> Filter by gender: male/m or female/f`,`--language <code> Filter by language: zh, en, etc.`,`--extended Include extended voice library (380+ voices)`,`--json Output raw JSON instead of table`],examples:['voxflow voices --search "温柔" --gender female',"voxflow voices --extended --json"]}};e.exports={voices:voices,handle:handle,meta:o}},5537:(e,t,a)=>{const{getToken:r}=a(598);const{ApiError:n}=a(2768);function parseFlag(e,t){const a=e.indexOf(t);if(a===-1||a+1>=e.length)return null;return e[a+1]}function parseIntFlag(e,t){const a=parseFlag(e,t);return a!=null?parseInt(a,10):undefined}function parseFloatFlag(e,t){const a=parseFlag(e,t);return a!=null?parseFloat(a):undefined}function parseBoolFlag(e,t){return e.includes(t)}function validateSpeed(e,t){if(t!==undefined){if(isNaN(t)||t<.5||t>2){console.error(`Error: --speed must be between 0.5 and 2.0 (got: "${parseFlag(e,"--speed")}")`);process.exit(1)}}}function validateSilence(e,t){if(t!==undefined){if(isNaN(t)||t<0||t>5){console.error(`Error: --silence must be between 0 and 5.0 (got: "${parseFlag(e,"--silence")}")`);process.exit(1)}}}function validateOutput(e,t){if(e){const t=[".wav",".mp3"];const a=t.some((t=>e.toLowerCase().endsWith(t)));if(!a){console.error("Error: --output path must end with .wav or .mp3");process.exit(1)}}}function validateFormat(e){if(e&&!["pcm","wav","mp3"].includes(e)){console.error(`Error: --format must be one of: pcm, wav, mp3 (got: "${e}")`);process.exit(1)}}function assertFileExists(e,t){const r=a(6928).resolve(e);if(!a(9896).existsSync(r)){console.error(`Error: ${t} file not found: ${r}`);process.exit(1)}}async function runWithRetry(e,t,a,o){try{return await e(t)}catch(i){if(i instanceof n&&i.code==="token_expired"&&!o){console.log("\nToken expired, re-authenticating...");t.token=await r({api:a,force:true});return await e(t)}else{throw i}}}e.exports={parseFlag:parseFlag,parseIntFlag:parseIntFlag,parseFloatFlag:parseFloatFlag,parseBoolFlag:parseBoolFlag,validateSpeed:validateSpeed,validateSilence:validateSilence,validateOutput:validateOutput,validateFormat:validateFormat,assertFileExists:assertFileExists,runWithRetry:runWithRetry}},4142:(e,t,a)=>{const r=a(9896);const{request:n,throwApiError:o,throwNetworkError:i,ApiError:s}=a(2768);const l=6e4;const c=72e5;const A=5*1024*1024;const d=3e3;const p=3e5;const u={WAITING:0,PROCESSING:1,SUCCESS:2,FAILED:3};function detectMode(e,t,a){if(e<=l&&a<=A){return"sentence"}if(e<=c&&t){return"flash"}return"file"}function authHeaders(e){return{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}async function recognizeSentence(e){const{apiBase:t,token:a,url:l,filePath:c,lang:A="16k_zh",wordInfo:d=false}=e;const p={EngSerViceType:A,VoiceFormat:"wav",SubServiceType:2,WordInfo:d?1:0,ConvertNumMode:1};if(l){p.Url=l;p.SourceType=0}else if(c){const e=r.readFileSync(c);p.Data=e.toString("base64");p.DataLen=e.length;p.SourceType=1}else{throw new Error("Either url or filePath is required for sentence recognition")}try{const{status:e,data:r}=await n(`${t}/api/asr/sentence`,{method:"POST",headers:authHeaders(a)},p);if(e!==200||r.code!=="success"){o(e,r,"ASR sentence")}return{result:r.result,audioTime:r.audioTime,wordList:r.wordList||[],requestId:r.requestId,quota:r.quota}}catch(e){if(e instanceof s)throw e;i(e,t)}}async function recognizeFlash(e){const{apiBase:t,token:a,url:r,lang:l="16k_zh",speakerDiarization:c=false,speakerNumber:A=0}=e;if(!r){throw new Error("Flash recognition requires a URL (cannot use base64 data)")}const d={engine_type:l,voice_format:"wav",url:r,speaker_diarization:c?1:0,speaker_number:A,filter_dirty:0,filter_modal:0,filter_punc:0,convert_num_mode:1,word_info:1,first_channel_only:1};try{const{status:e,data:r}=await n(`${t}/api/asr/flash`,{method:"POST",headers:authHeaders(a)},d);if(e!==200||r.code!=="success"){o(e,r,"ASR flash")}return{flashResult:r.flash_result||[],audioDuration:r.audio_duration||0,requestId:r.request_id,quota:r.quota}}catch(e){if(e instanceof s)throw e;i(e,t)}}async function submitFileTask(e){const{apiBase:t,token:a,url:l,filePath:c,lang:d="16k_zh",speakerDiarization:p=false,speakerNumber:u=0}=e;const f={EngineModelType:d,ChannelNum:1,ResTextFormat:0,FilterDirty:0,FilterModal:0,FilterPunc:0,ConvertNumMode:1,SpeakerDiarization:p?1:0,SpeakerNumber:u};if(l){f.Url=l;f.SourceType=0}else if(c){const e=r.readFileSync(c);if(e.length>A){throw new Error(`File too large for base64 upload (${(e.length/1024/1024).toFixed(1)} MB). `+"Upload to COS first or use flash mode with a URL.")}f.Data=e.toString("base64");f.DataLen=e.length;f.SourceType=1}else{throw new Error("Either url or filePath is required for file recognition")}try{const{status:e,data:r}=await n(`${t}/api/asr/file`,{method:"POST",headers:authHeaders(a)},f);if(e!==200||r.code!=="success"){o(e,r,"ASR file submit")}return{taskId:r.taskId,requestId:r.requestId,quota:r.quota}}catch(e){if(e instanceof s)throw e;i(e,t)}}async function pollTaskResult(e){const{apiBase:t,token:a,taskId:r,pollIntervalMs:l=d,pollTimeoutMs:c=p,onProgress:A}=e;const f=Date.now();while(true){const e=Date.now()-f;if(e>c){throw new Error(`ASR task ${r} timed out after ${Math.round(e/1e3)}s. `+"The task may still complete — check later with: voxflow asr --task-id "+r)}try{const{status:i,data:s}=await n(`${t}/api/asr/result/${r}`,{method:"GET",headers:authHeaders(a)});if(i!==200||s.code!=="success"){o(i,s,"ASR poll")}const l=s.data;const c=l.Status;if(A)A(c,e);if(c===u.SUCCESS){return{result:l.Result,audioTime:l.AudioTime,status:c}}if(c===u.FAILED){throw new Error(`ASR task ${r} failed: ${l.Result||"Unknown error"}`)}}catch(a){if(a instanceof s)throw a;if(e+l<c){}else{i(a,t)}}await sleep(l)}}async function recognize(e){const{mode:t="auto",url:a,filePath:r,durationMs:n,fileSize:o=0}=e;const i=!!a;const s=t==="auto"?detectMode(n,i,o):t;switch(s){case"sentence":{const t=await recognizeSentence(e);return{mode:"sentence",result:t.result,audioTime:t.audioTime,wordList:t.wordList,quota:t.quota}}case"flash":{if(!a){throw new Error("Flash mode requires a URL. Upload the file to COS first, or use --mode auto.")}const t=await recognizeFlash(e);const r=(t.flashResult||[]).flatMap((e=>e.sentence_list?e.sentence_list.map((e=>e.text)):[e.text])).join("");return{mode:"flash",result:r,flashResult:t.flashResult,audioDuration:t.audioDuration,audioTime:(t.audioDuration||0)/1e3,quota:t.quota}}case"file":{const t=await submitFileTask(e);const a=await pollTaskResult({apiBase:e.apiBase,token:e.token,taskId:t.taskId,onProgress:e.onProgress});return{mode:"file",result:a.result,audioTime:a.audioTime,taskId:t.taskId,quota:t.quota}}default:throw new Error(`Unknown ASR mode: ${s}. Use: auto, sentence, flash, or file`)}}function sleep(e){return new Promise((t=>setTimeout(t,e)))}e.exports={recognize:recognize,recognizeSentence:recognizeSentence,recognizeFlash:recognizeFlash,submitFileTask:submitFileTask,pollTaskResult:pollTaskResult,detectMode:detectMode,SENTENCE_MAX_MS:l,FLASH_MAX_MS:c,BASE64_MAX_BYTES:A,TASK_STATUS:u}},7656:(e,t,a)=>{const r=a(6928);const n=a(857);const o=a(9896);const{runCommand:i}=a(9933);async function getMediaInfo(e){const t=r.resolve(e);if(!o.existsSync(t)){throw new Error(`File not found: ${t}`)}try{const{stdout:e}=await i("ffprobe",["-v","error","-show_entries","format=duration","-show_entries","stream=codec_type,codec_name,sample_rate,channels","-of","json",t]);const a=JSON.parse(e);const r=a.streams||[];const n=a.format||{};const o=r.find((e=>e.codec_type==="audio"));const s=r.find((e=>e.codec_type==="video"));const l=parseFloat(n.duration);const c=isNaN(l)?0:Math.round(l*1e3);return{durationMs:c,hasVideo:!!s,hasAudio:!!o,audioCodec:o?o.codec_name:null,sampleRate:o?parseInt(o.sample_rate,10):null,channels:o?parseInt(o.channels,10):null}}catch(t){if(t.code==="ENOENT"){throw new Error("ffprobe not found. Please install ffmpeg:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}throw new Error(`Failed to probe media file ${e}: ${t.message}`)}}async function extractAudioForAsr(e,t={}){const a=r.resolve(e);if(!o.existsSync(a)){throw new Error(`File not found: ${a}`)}const s=t.outputDir||n.tmpdir();const l=r.basename(a,r.extname(a));const c=r.join(s,`asr-${l}-${Date.now()}.wav`);try{await i("ffmpeg",["-i",a,"-vn","-acodec","pcm_s16le","-ar","16000","-ac","1","-y",c])}catch(t){if(t.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg:\n"+" macOS: brew install ffmpeg\n"+" Ubuntu: sudo apt install ffmpeg\n"+" Windows: https://ffmpeg.org/download.html")}throw new Error(`Failed to extract audio from ${e}: ${t.stderr||t.message}`)}const A=o.statSync(c);const d=Math.round((A.size-44)/32);return{wavPath:c,durationMs:d,needsCleanup:true}}async function needsConversion(e){try{const t=await getMediaInfo(e);if(t.hasVideo)return true;if(t.audioCodec!=="pcm_s16le")return true;if(t.sampleRate!==16e3)return true;if(t.channels!==1)return true;return false}catch{return true}}e.exports={getMediaInfo:getMediaInfo,extractAudioForAsr:extractAudioForAsr,needsConversion:needsConversion}},7188:e=>{function parseParagraphs(e){const t=e.split(/\n\s*\n/).map((e=>e.replace(/^\d+[.、)\]]\s*/,"").trim())).filter((e=>e.length>0));return t}function createSilence(e,t){const a=Math.floor(t*e);return Buffer.alloc(a*2,0)}function buildWav(e,t){const a=24e3;const r=16;const n=1;const o=r/8;const i=n*o;const s=a*i;const l=createSilence(t,a);let c=0;for(let t=0;t<e.length;t++){c+=e[t].length;if(t<e.length-1){c+=l.length}}const A=Buffer.alloc(44);A.write("RIFF",0);A.writeUInt32LE(36+c,4);A.write("WAVE",8);A.write("fmt ",12);A.writeUInt32LE(16,16);A.writeUInt16LE(1,20);A.writeUInt16LE(n,22);A.writeUInt32LE(a,24);A.writeUInt32LE(s,28);A.writeUInt16LE(i,32);A.writeUInt16LE(r,34);A.write("data",36);A.writeUInt32LE(c,40);const d=[A];for(let t=0;t<e.length;t++){d.push(e[t]);if(t<e.length-1){d.push(l)}}return{wav:Buffer.concat(d),duration:c/s}}function getFileExtension(e){switch(e){case"mp3":return".mp3";case"wav":return".wav";case"pcm":default:return".wav"}}function concatAudioBuffers(e,t,a){if(t==="mp3"){const t=Buffer.concat(e);const a=t.length/4e3;return{audio:t,duration:a}}if(t==="wav"){const t=e.map(extractPcmFromWav);const{wav:r,duration:n}=buildWav(t,a);return{audio:r,duration:n}}const{wav:r,duration:n}=buildWav(e,a);return{audio:r,duration:n}}function extractPcmFromWav(e){const t=Buffer.from("data");let a=12;while(a<e.length-8){if(e.subarray(a,a+4).equals(t)){const t=e.readUInt32LE(a+4);return e.subarray(a+8,a+8+t)}const r=e.readUInt32LE(a+4);a+=8+r}return e.subarray(44)}e.exports={parseParagraphs:parseParagraphs,createSilence:createSilence,buildWav:buildWav,concatAudioBuffers:concatAudioBuffers,getFileExtension:getFileExtension}},598:(e,t,a)=>{const r=a(8611);const n=a(9896);const o=a(6928);const i=a(6982);const s=a(3785);const{TOKEN_PATH:l,getConfigDir:c,LOGIN_PAGE:A,AUTH_TIMEOUT_MS:d,API_BASE:p,SUPABASE_URL:u,SUPABASE_ANON_KEY:f}=a(3282);const h=300;function readCachedToken(){try{const e=n.readFileSync(l,"utf8");const t=JSON.parse(e);if(!t.access_token)return null;const a=decodeJwtPayload(t.access_token);if(!a||!a.exp)return null;const r=Math.floor(Date.now()/1e3);if(a.exp-r<h)return null;return t}catch{return null}}function writeCachedToken(e){const t=c();n.mkdirSync(t,{recursive:true,mode:448});const a=l+".tmp";n.writeFileSync(a,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});n.renameSync(a,l)}function clearToken(){try{n.unlinkSync(l)}catch{}}function decodeJwtPayload(e){try{const t=e.split(".");if(t.length!==3)return null;const a=t[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(Buffer.from(a,"base64").toString("utf8"))}catch{return null}}function readEnvToken(){const e=(process.env.VOXFLOW_TOKEN||process.env.VOXFLOW_JWT||"").trim();if(!e)return null;const t=decodeJwtPayload(e);if(!t)return null;if(!t.exp)return null;const a=Math.floor(Date.now()/1e3);if(t.exp-a<h)return null;return e}async function getToken({api:e,force:t}={}){if(!t){const e=readEnvToken();if(e)return e}if(!t){const t=readCachedToken();if(t){const a=!e||e===t.api;if(a)return t.access_token}}return browserLogin(e||p)}function getTokenInfo(){const e=readCachedToken();if(!e)return null;const t=decodeJwtPayload(e.access_token);if(!t)return null;const a=Math.floor(Date.now()/1e3);return{email:t.email||e.email||"(unknown)",expiresAt:new Date(t.exp*1e3).toISOString(),remaining:t.exp-a,valid:t.exp-a>h,api:e.api||p}}function browserLogin(e){return new Promise(((t,n)=>{const o=i.randomBytes(16).toString("hex");let l=false;let c=null;function settle(a){if(l)return;l=true;clearTimeout(u);const r=decodeJwtPayload(a);writeCachedToken({access_token:a,expires_at:r?.exp||0,email:r?.email||"",api:e,cached_at:(new Date).toISOString()});if(c){c.close();c=null}p.close();t(a)}const p=r.createServer(((e,t)=>{const a=new URL(e.url,`http://127.0.0.1`);if(a.pathname!=="/callback"){t.writeHead(404,{"Content-Type":"text/plain"});t.end("Not Found");return}const r=a.searchParams.get("token");const n=a.searchParams.get("state");if(n!==o){t.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});t.end("<h1>Authentication failed</h1><p>State mismatch. Please try again.</p>");return}if(!r){t.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});t.end("<h1>Authentication failed</h1><p>No token received. Please try again.</p>");return}t.writeHead(200,{"Content-Type":"text/html; charset=utf-8"});t.end(`<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>Login successful</title></head>\n<body style="font-family:system-ui;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f0fdf4">\n<div style="text-align:center">\n<h1 style="color:#16a34a;font-size:2rem">Login successful</h1>\n<p style="color:#666;margin-top:0.5rem">voxflow CLI has been authorized. You can close this window.</p>\n</div></body></html>`);settle(r)}));p.listen(0,"127.0.0.1",(async()=>{const e=p.address().port;const t=`${A}?state=${o}&callback_port=${e}`;const r=process.stdin.isTTY;if(r){console.log("\n🔐 Login required. Opening browser...");console.log(` If the browser did not open, click or copy this link:\n ${t}\n`)}else{console.log("\n🔐 Login required. Click the link below to authorize:");console.log(`\n ${t}\n`);console.log(" Waiting up to 60s for browser callback...");console.log(" Tip: set VOXFLOW_TOKEN env var to skip login in automation.\n");const e=setTimeout((()=>{if(!l){l=true;p.close();n(new Error("Login timed out (60s). In non-interactive environments, set "+"VOXFLOW_TOKEN (or VOXFLOW_JWT) env var to skip browser login."))}}),6e4);p.once("close",(()=>clearTimeout(e)))}if(r){try{const e=(await a.e(609).then(a.bind(a,5609))).default;const r=await e(t);if(r&&typeof r.on==="function"){r.on("error",(()=>{console.log(" Failed to open browser. Please copy the link above manually.\n");startStdinListener()}))}}catch{console.log(" Failed to open browser. Please copy the link above manually.\n");startStdinListener()}}function startStdinListener(){if(l||c||!process.stdin.isTTY)return;console.log(" After login, paste the token shown on the page and press Enter.");c=s.createInterface({input:process.stdin,output:process.stdout,terminal:false});process.stdout.write(" > Token: ");c.on("line",(e=>{const t=e.trim();if(!t)return;const a=decodeJwtPayload(t);if(!a){console.log(" Invalid token. Please paste the full token and try again.");process.stdout.write(" > Token: ");return}const r=Math.floor(Date.now()/1e3);if(a.exp&&a.exp<r){console.log(" Token has expired. Please log in again to get a new token.");process.stdout.write(" > Token: ");return}console.log(`\n✓ Authorized (${a.email||"user"})`);settle(t)}))}}));const u=setTimeout((()=>{if(!l){l=true;if(c){c.close();c=null}p.close();n(new Error(`Login timed out (${d/1e3}s). Please retry: voxflow login`))}}),d);p.on("close",(()=>clearTimeout(u)));p.on("error",(e=>{if(!l){l=true;if(c){c.close();c=null}n(new Error(`Failed to start local callback server: ${e.message}`))}}))}))}function terminalOtpLogin(e=p){return new Promise(((t,a)=>{const r=s.createInterface({input:process.stdin,output:process.stdout});function ask(e){return new Promise((t=>r.question(e,t)))}(async()=>{try{console.log("\n🔐 Terminal login (no browser needed)\n");const a=(await ask(" Email: ")).trim();if(!a||!a.includes("@")){throw new Error("Invalid email address.")}process.stdout.write(" Sending verification code... ");const n=await supabasePost(`${u}/auth/v1/otp`,{email:a,create_user:true});if(n.status>=400){const e=n.data?.error_description||n.data?.msg||n.data?.message||JSON.stringify(n.data);throw new Error(`OTP send failed (${n.status}): ${e}`)}console.log("✓ Code sent!");console.log(" Check your email for the 6-digit verification code.\n");const o=(await ask(" Verification code: ")).trim();if(!o){throw new Error("No verification code entered.")}process.stdout.write(" Verifying... ");const i=await supabasePost(`${u}/auth/v1/verify`,{email:a,token:o,type:"email"});if(i.status>=400||!i.data?.access_token){const e=i.data?.error_description||i.data?.msg||i.data?.message||"Invalid or expired code";throw new Error(`Verification failed: ${e}`)}const s=i.data.access_token;const l=decodeJwtPayload(s);writeCachedToken({access_token:s,refresh_token:i.data.refresh_token||"",expires_at:l?.exp||0,email:l?.email||a,api:e,cached_at:(new Date).toISOString()});console.log("✓ Success!");console.log(`\n✓ Logged in as ${l?.email||a}\n`);r.close();t(s)}catch(e){r.close();a(e)}})()}))}function supabasePost(e,t){const r=a(5692);const n=JSON.stringify(t);const o=new URL(e);return new Promise(((e,t)=>{const a=r.request({hostname:o.hostname,port:443,path:o.pathname,method:"POST",headers:{"Content-Type":"application/json",apikey:f,"Content-Length":Buffer.byteLength(n)}},(t=>{let a="";t.on("data",(e=>a+=e));t.on("end",(()=>{try{e({status:t.statusCode,data:JSON.parse(a)})}catch{e({status:t.statusCode,data:a})}}))}));a.on("error",t);a.write(n);a.end()}))}e.exports={getToken:getToken,clearToken:clearToken,getTokenInfo:getTokenInfo,terminalOtpLogin:terminalOtpLogin}},3282:(e,t,a)=>{const r=a(6928);const n=a(857);const o="https://api.voxflow.studio";const i="https://iwkonytsjysszmafqchh.supabase.co";const s="sb_publishable_TEh6H4K9OWXUNfWSeBKXlQ_hg7Zzm6b";const l="voxflow";function getConfigDir(){if(process.platform==="win32"){return r.join(process.env.APPDATA||r.join(n.homedir(),"AppData","Roaming"),l)}const e=process.env.XDG_CONFIG_HOME||r.join(n.homedir(),".config");return r.join(e,l)}const c=r.join(getConfigDir(),"token.json");const A="v-female-R2s4N9qJ";const d={voice:A,paragraphs:5,speed:1,silence:.8};const p={template:"interview",exchanges:8,length:"medium",style:"professional",speakers:2,silence:.5,speed:1,ducking:.2};const u={voice:A,speed:1,volume:1,pitch:0};const f={voice:A,speed:1,silence:.8};const h={voice:A,speed:1,toleranceMs:50,ducking:.2};const m={lang:"16k_zh",mode:"auto",format:"srt",pollIntervalMs:3e3,pollTimeoutMs:3e5,engine:"auto",model:"base"};const g={batchSize:10,temperature:.3,maxTokens:2e3};const v={batchSize:10,speed:1};const b={voice:A,speed:1,style:"modern",sceneCount:5,silence:.8,language:"en"};const y={voice:"v-female-R2s4N9qJ",speed:1,theme:"midnight",template:"free",model:"swift"};const w={voice:A,speed:1,scheme:"aurora"};const x={voice:"v-female-R2s4N9qJ",speed:1,slides:8,language:"en",engine:"auto"};const S="https://voxflow.studio";const C=`${S}/cli-auth.html`;const T=`${S}/app`;const k=18e4;e.exports={API_BASE:o,WEB_BASE:S,DASHBOARD_URL:T,SUPABASE_URL:i,SUPABASE_ANON_KEY:s,TOKEN_PATH:c,getConfigDir:getConfigDir,DEFAULT_VOICE:A,DEFAULTS:d,STORY_DEFAULTS:d,PODCAST_DEFAULTS:p,SYNTHESIZE_DEFAULTS:u,NARRATE_DEFAULTS:f,DUB_DEFAULTS:h,ASR_DEFAULTS:m,TRANSLATE_DEFAULTS:g,VIDEO_TRANSLATE_DEFAULTS:v,EXPLAIN_DEFAULTS:b,SLIDES_DEFAULTS:y,PRESENT_DEFAULTS:w,SUMMARIZE_DEFAULTS:x,LOGIN_PAGE:C,AUTH_TIMEOUT_MS:k}},3931:(e,t,a)=>{const r=a(9896);const n=a(6928);const o=a(8611);const i=a(5692);const{request:s,throwApiError:l,throwNetworkError:c,ApiError:A}=a(2768);const d={".wav":"audio/wav",".mp3":"audio/mpeg",".ogg":"audio/ogg",".m4a":"audio/x-m4a",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".avi":"video/x-msvideo",".mkv":"video/x-matroska",".flac":"audio/flac"};function getMimeType(e){const t=n.extname(e).toLowerCase();return d[t]||"application/octet-stream"}async function uploadFileToCos(e,t,a){const o=n.resolve(e);if(!r.existsSync(o)){throw new Error(`File not found: ${o}`)}const i=r.statSync(o);const d=n.basename(o);const p=getMimeType(o);const u=i.size;let f;try{const{status:e,data:r}=await s(`${t}/api/file-upload/get-upload-url`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}},{filename:d,fileType:p,fileSize:u});if(e!==200||r.code!=="success"){l(e,r,"Get upload URL")}f=r.data}catch(e){if(e instanceof A)throw e;c(e,t)}const{uploadUrl:h,key:m,bucket:g,region:v}=f;await putFile(h,o,p);let b;try{b=await getSignedDownloadUrl(t,a,m)}catch{b=`https://${g}.cos.${v}.myqcloud.com/${m}`}return{cosUrl:b,key:m}}function putFile(e,t,a){return new Promise(((n,s)=>{const l=new URL(e);const c=l.protocol==="https:"?i:o;const A=r.statSync(t).size;const d={hostname:l.hostname,port:l.port||(l.protocol==="https:"?443:80),path:l.pathname+l.search,method:"PUT",headers:{"Content-Type":a,"Content-Length":A}};const p=c.request(d,(e=>{const t=[];e.on("data",(e=>t.push(e)));e.on("end",(()=>{if(e.statusCode>=200&&e.statusCode<300){n()}else{const a=Buffer.concat(t).toString("utf8");s(new Error(`COS upload failed (${e.statusCode}): ${a.slice(0,300)}`))}}))}));p.on("error",(e=>s(new Error(`COS upload network error: ${e.message}`))));p.setTimeout(3e5,(()=>{p.destroy();s(new Error("COS upload timeout (5 min)"))}));const u=r.createReadStream(t);u.pipe(p);u.on("error",(e=>{u.destroy();p.destroy();s(new Error(`Failed to read file for upload: ${e.message}`))}))}))}async function getSignedDownloadUrl(e,t,a){const{status:r,data:n}=await s(`${e}/api/file-upload/get-download-url`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},{key:a});if(r!==200||n.code!=="success"){throw new Error(`Failed to get download URL: ${n.message||r}`)}return n.data.downloadUrl}e.exports={uploadFileToCos:uploadFileToCos,getSignedDownloadUrl:getSignedDownloadUrl,getMimeType:getMimeType}},9933:(e,t,a)=>{const{execFile:r}=a(5317);const n=a(6928);const o=a(9896);function runCommand(e,t,a){return new Promise(((n,o)=>{r(e,t,{timeout:6e5,...a},((e,t,a)=>{if(e){e.stderr=a;e.stdout=t;o(e)}else{n({stdout:t,stderr:a})}}))}))}async function checkFfmpeg(){try{const{stdout:e}=await runCommand("ffmpeg",["-version"]);const t=e.match(/ffmpeg version (\S+)/);const a=t?t[1]:"unknown";let r=false;try{await runCommand("ffprobe",["-version"]);r=true}catch{}return{available:true,version:a,ffprobeAvailable:r}}catch{return{available:false}}}async function getAudioDuration(e){const t=n.resolve(e);try{const{stdout:e}=await runCommand("ffprobe",["-v","error","-show_entries","format=duration","-of","default=noprint_wrappers=1:nokey=1",t]);const a=parseFloat(e.trim());if(isNaN(a)){throw new Error(`Could not parse duration from ffprobe output: "${e.trim()}"`)}return Math.round(a*1e3)}catch(t){if(t.code==="ENOENT"){throw new Error("ffprobe not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to get duration of ${e}: ${t.message}`)}}async function extractAudio(e,t){const a=n.resolve(e);const r=n.resolve(t);try{await runCommand("ffmpeg",["-i",a,"-vn","-acodec","pcm_s16le","-ar","24000","-ac","1","-y",r]);return r}catch(t){if(t.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to extract audio from ${e}: ${t.stderr||t.message}`)}}async function mergeAudioVideo(e,t,a){const r=n.resolve(e);const o=n.resolve(t);const i=n.resolve(a);try{await runCommand("ffmpeg",["-i",r,"-i",o,"-c:v","copy","-map","0:v:0","-map","1:a:0","-shortest","-y",i]);return i}catch(e){if(e.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to merge audio/video: ${e.stderr||e.message}`)}}async function mixWithBgm(e,t,a,r={}){const o=r.ducking??.2;const i=n.resolve(e);const s=n.resolve(t);const l=n.resolve(a);try{await runCommand("ffmpeg",["-i",i,"-i",s,"-filter_complex",`[1:a]volume=${o}[bgm_low];`+`[0:a][bgm_low]amix=inputs=2:duration=first:dropout_transition=2[out]`,"-map","[out]","-acodec","pcm_s16le","-ar","24000","-ac","1","-y",l]);return l}catch(e){if(e.code==="ENOENT"){throw new Error("ffmpeg not found. Please install ffmpeg: https://ffmpeg.org/download.html")}throw new Error(`Failed to mix audio with BGM: ${e.stderr||e.message}`)}}async function warnIfMissingFfmpeg(e,t){const a=await checkFfmpeg();if(a.available)return a;const r=n.join(e,".ffmpeg-hint-shown");try{if(o.existsSync(r))return a}catch{}const i={dub:"video merging (--video), BGM mixing (--bgm), speed adjustment (--speed-auto)",asr:"audio format conversion, video audio extraction"};const s=i[t]||"audio/video processing";console.log("\n"+`[hint] ffmpeg not found — needed for ${s}.\n`+" Install: brew install ffmpeg (macOS) / sudo apt install ffmpeg (Linux)\n"+" Without ffmpeg, some features will be unavailable.\n");try{o.mkdirSync(e,{recursive:true});o.writeFileSync(r,(new Date).toISOString(),"utf8")}catch{}return a}async function cutVideo(e,t,a,r){await runCommand("ffmpeg",["-i",n.resolve(e),"-ss",String(a),"-to",String(r),"-c","copy","-y",n.resolve(t)])}async function overlayText(e,t){o.copyFileSync(n.resolve(e),n.resolve(t))}async function generateTitleCard(e,t,a={}){const r=a.duration||3;const i=a.resolution||"1920x1080";if(a.sourceVideo&&o.existsSync(n.resolve(a.sourceVideo))){const t=e+".frame.jpg";try{await runCommand("ffmpeg",["-i",n.resolve(a.sourceVideo),"-vframes","1","-q:v","2","-y",t]);await runCommand("ffmpeg",["-loop","1","-i",t,"-f","lavfi","-i","anullsrc=r=24000:cl=mono","-t",String(r),"-vf","eq=brightness=-0.4:saturation=0.6,boxblur=8:2","-c:v","libx264","-pix_fmt","yuv420p","-preset","fast","-c:a","aac","-shortest","-y",n.resolve(e)]);return}catch{}finally{try{o.unlinkSync(t)}catch{}}}const s=a.bgColor||"0x0F172A";await runCommand("ffmpeg",["-f","lavfi","-i",`color=c=${s}:s=${i}:d=${r}`,"-f","lavfi","-i","anullsrc=r=24000:cl=mono","-c:v","libx264","-pix_fmt","yuv420p","-c:a","aac","-shortest","-y",n.resolve(e)])}async function replaceAudio(e,t,a){await runCommand("ffmpeg",["-i",n.resolve(e),"-i",n.resolve(t),"-c:v","copy","-map","0:v:0","-map","1:a:0","-shortest","-y",n.resolve(a)])}async function concatVideos(e,t){const a=n.dirname(t);const r=n.join(a,`concat-list-${Date.now()}.txt`);const i=e.map((e=>`file '${n.resolve(e)}'`)).join("\n");o.writeFileSync(r,i,"utf8");try{await runCommand("ffmpeg",["-f","concat","-safe","0","-i",r,"-c","copy","-y",n.resolve(t)])}finally{try{o.unlinkSync(r)}catch{}}}async function normalizeVideo(e,t,a={}){const r=["-i",n.resolve(e),"-c:v","libx264","-preset","fast","-crf","23","-c:a","aac","-ar","24000","-ac","1","-pix_fmt","yuv420p"];if(a.resolution){r.push("-vf",`scale=${a.resolution.replace("x",":")}:force_original_aspect_ratio=decrease,pad=${a.resolution.replace("x",":")}:(ow-iw)/2:(oh-ih)/2`)}r.push("-y",n.resolve(t));await runCommand("ffmpeg",r,{timeout:6e5})}function detectCjkFont(){const e=["/System/Library/Fonts/PingFang.ttc","/System/Library/Fonts/STHeiti Light.ttc","/System/Library/Fonts/Hiragino Sans GB.ttc","/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc","/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc","/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc","C:\\Windows\\Fonts\\msyh.ttc","C:\\Windows\\Fonts\\simhei.ttf"];for(const t of e){if(o.existsSync(t))return t}return null}e.exports={runCommand:runCommand,checkFfmpeg:checkFfmpeg,getAudioDuration:getAudioDuration,extractAudio:extractAudio,mergeAudioVideo:mergeAudioVideo,mixWithBgm:mixWithBgm,warnIfMissingFfmpeg:warnIfMissingFfmpeg,cutVideo:cutVideo,overlayText:overlayText,generateTitleCard:generateTitleCard,replaceAudio:replaceAudio,concatVideos:concatVideos,normalizeVideo:normalizeVideo,detectCjkFont:detectCjkFont,runCommand:runCommand}},2768:(e,t,a)=>{const r=a(8611);const n=a(5692);class ApiError extends Error{constructor(e,t,a){super(e);this.name="ApiError";this.code=t;this.status=a}}function throwApiError(e,t,a){if(e===401){throw new ApiError(`Token expired or invalid. Run: voxflow login`,"token_expired",401)}if(e===402||e===429||t&&t.code==="quota_exceeded"){throw new ApiError(`Monthly quota exceeded. Resets in ~30 days. Check: voxflow status`,"quota_exceeded",e)}if(e>=500){throw new ApiError(`Server error (${e}). Please try again later.`,"server_error",e)}const r=t?.message||t?.code||JSON.stringify(t);throw new ApiError(`${a} failed (${e}): ${r}`,"api_error",e)}function throwNetworkError(e,t){const a=e.code||"";if(a==="ECONNREFUSED"||a==="ENOTFOUND"||a==="ETIMEDOUT"){throw new ApiError(`Cannot reach API server at ${t}. Check your internet connection or try --api <url>`,"network_error",0)}throw e}function request(e,t,a){return new Promise(((o,i)=>{const s=new URL(e);const l=s.protocol==="https:"?n:r;if(t.headers){t.headers["X-Client-Source"]="cli"}else{t.headers={"X-Client-Source":"cli"}}const c=l.request(s,t,(e=>{const t=[];e.on("data",(e=>t.push(e)));e.on("end",(()=>{const a=Buffer.concat(t).toString("utf8");try{o({status:e.statusCode,data:JSON.parse(a)})}catch{i(new Error(`Non-JSON response (${e.statusCode}): ${a.slice(0,200)}`))}}))}));c.on("error",(e=>i(e)));c.setTimeout(6e4,(()=>{c.destroy();i(new Error("Request timeout (60s)"))}));if(a)c.write(JSON.stringify(a));c.end()}))}e.exports={request:request,ApiError:ApiError,throwApiError:throwApiError,throwNetworkError:throwNetworkError}},6669:(e,t,a)=>{const{INTENT_TTS_PARAMS:r,getIntentParams:n}=a(7171);e.exports={INTENT_TTS_PARAMS:r,getIntentParams:n}},929:(e,t,a)=>{const{request:r,throwApiError:n,throwNetworkError:o}=a(2768);async function chatCompletion({apiBase:e,token:t,messages:a,temperature:i=.3,maxTokens:s=2e3,model:l}){const c={messages:a,temperature:i,max_tokens:s};if(l)c.model=l;let A,d;try{({status:A,data:d}=await r(`${e}/api/llm/chat`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}},c))}catch(t){o(t,e)}if(A!==200||d.code!=="success"){n(A,d,"LLM chat")}return{content:d.content,usage:d.usage,quota:d.quota}}async function detectLanguage({apiBase:e,text:t}){let a,n;try{({status:a,data:n}=await r(`${e}/api/lang-detect/detect`,{method:"POST",headers:{"Content-Type":"application/json"}},{text:t.slice(0,200)}))}catch{return"auto"}if(a===200&&n.code==="success"){return n.language}return"auto"}e.exports={chatCompletion:chatCompletion,detectLanguage:detectLanguage}},132:(e,t,a)=>{const{spawn:r}=a(5317);const n=a(6928);const o=a(857);const i=a(9896);async function checkRecAvailable(){return new Promise((e=>{const t=r("rec",["--version"],{stdio:"pipe"});let a="";t.stdout.on("data",(e=>{a+=e}));t.stderr.on("data",(e=>{a+=e}));t.on("error",(()=>{e({available:false,error:"rec (sox) not found. Please install sox:\n"+" macOS: brew install sox\n"+" Ubuntu: sudo apt install sox\n"+" Windows: https://sourceforge.net/projects/sox/"})}));t.on("close",(t=>{e({available:t===0||a.length>0})}))}))}function recordMic(e={}){const{outputDir:t=o.tmpdir(),maxSeconds:a=300,silenceThreshold:s=0}=e;const l=n.join(t,`mic-${Date.now()}.wav`);return new Promise(((e,t)=>{const n=["-r","16000","-c","1","-b","16","-e","signed-integer",l,"trim","0",String(a)];if(s>0){n.push("silence","1","0.1","1%","1",String(s),"1%")}const o=r("rec",n,{stdio:["pipe","pipe","pipe"]});let c="";o.stderr.on("data",(e=>{c+=e.toString()}));o.on("error",(e=>{if(e.code==="ENOENT"){t(new Error("rec (sox) not found. Please install sox:\n"+" macOS: brew install sox\n"+" Ubuntu: sudo apt install sox\n"+" Windows: https://sourceforge.net/projects/sox/"))}else{t(new Error(`Microphone recording failed: ${e.message}`))}}));let A="timeout";o.on("close",(a=>{if(!i.existsSync(l)){return t(new Error(`Recording failed — no output file created.\n${c.slice(0,500)}`))}const r=i.statSync(l);if(r.size<100){i.unlinkSync(l);return t(new Error("Recording produced an empty file. Check that your microphone is connected and accessible."))}const n=Math.round((r.size-44)/32);e({wavPath:l,durationMs:n,stopped:A})}));const stopRecording=()=>{A="user";o.kill("SIGTERM")};if(process.stdin.isTTY){process.stdin.setRawMode(true);process.stdin.resume();const onKey=e=>{if(e[0]===13||e[0]===10||e[0]===113){A="user";process.stdin.setRawMode(false);process.stdin.removeListener("data",onKey);process.stdin.pause();o.kill("SIGTERM")}if(e[0]===3){A="user";process.stdin.setRawMode(false);process.stdin.removeListener("data",onKey);process.stdin.pause();o.kill("SIGTERM")}};process.stdin.on("data",onKey);o.on("close",(()=>{try{process.stdin.removeListener("data",onKey);if(process.stdin.isTTY){process.stdin.setRawMode(false)}process.stdin.pause()}catch{}}))}o._stopRecording=stopRecording}))}e.exports={recordMic:recordMic,checkRecAvailable:checkRecAvailable}},5319:e=>{function startSpinner(e){const t=["|","/","-","\\"];let a=0;let r=e;process.stdout.write(e+" "+t[0]);const n=setInterval((()=>{a=(a+1)%t.length;process.stdout.write("\b"+t[a])}),120);return{stop(e){clearInterval(n);process.stdout.write("\b"+e+"\n")},update(e){process.stdout.write("\r"+" ".repeat(r.length+4)+"\r");r=e;process.stdout.write(e+" "+t[a])}}}e.exports={startSpinner:startSpinner}},8217:e=>{function parseTimestamp(e){const t=e.trim().match(/^(\d{1,2}):(\d{2}):(\d{2})[,.](\d{3})$/);if(!t){throw new Error(`Invalid SRT timestamp: "${e}"`)}const[,a,r,n,o]=t;return parseInt(a,10)*36e5+parseInt(r,10)*6e4+parseInt(n,10)*1e3+parseInt(o,10)}function formatTimestamp(e){if(e<0)e=0;const t=Math.floor(e/36e5);e%=36e5;const a=Math.floor(e/6e4);e%=6e4;const r=Math.floor(e/1e3);const n=e%1e3;return String(t).padStart(2,"0")+":"+String(a).padStart(2,"0")+":"+String(r).padStart(2,"0")+","+String(n).padStart(3,"0")}function parseSrt(e){if(!e||e.trim().length===0){return[]}const t=[];const a=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n");const r=a.split(/\n\s*\n/).filter((e=>e.trim().length>0));for(const e of r){const a=e.trim().split("\n");if(a.length<2)continue;let r=0;let n;const o=a[0].trim();if(/^\d+$/.test(o)){n=parseInt(o,10);r=1}else{n=t.length+1}if(r>=a.length)continue;const i=a[r].trim();const s=i.match(/^(\d{1,2}:\d{2}:\d{2}[,.]\d{3})\s*-->\s*(\d{1,2}:\d{2}:\d{2}[,.]\d{3})/);if(!s)continue;const l=parseTimestamp(s[1]);const c=parseTimestamp(s[2]);r++;const A=a.slice(r).filter((e=>e.trim().length>0));if(A.length===0)continue;const d=A.join("\n");let p;let u=d;const f=d.match(/^\[Speaker:\s*([^\]]+)\]\s*/i);if(f){p=f[1].trim();u=d.slice(f[0].length)}if(u.trim().length===0)continue;t.push({id:n,startMs:l,endMs:c,text:u.trim(),...p?{speakerId:p}:{}})}t.sort(((e,t)=>e.startMs-t.startMs));return t}function formatSrt(e){return e.map(((e,t)=>{const a=e.id||t+1;const r=formatTimestamp(e.startMs);const n=formatTimestamp(e.endMs);const o=e.speakerId?`[Speaker: ${e.speakerId}] `:"";return`${a}\n${r} --\x3e ${n}\n${o}${e.text}`})).join("\n\n")+"\n"}function buildCaptionsFromFlash(e){const t=[];let a=1;for(const r of e){const e=r.sentence_list||[];for(const r of e){const e={id:a++,startMs:r.start_time||0,endMs:r.end_time||0,text:(r.text||"").trim()};if(r.speaker_id!==undefined&&r.speaker_id!==null){e.speakerId=`Speaker${r.speaker_id}`}if(e.text.length>0){t.push(e)}}}return t}function buildCaptionsFromSentence(e,t,a){if(!e||e.trim().length===0)return[];if(a&&a.length>0){return buildCaptionsFromWordList(a,e)}return[{id:1,startMs:0,endMs:Math.round(t*1e3),text:e.trim()}]}function buildCaptionsFromWordList(e,t){if(!e||e.length===0){return t?[{id:1,startMs:0,endMs:0,text:t}]:[]}const a=500;const r=5e3;const n=15e3;const o=/[.!?。!?…]+$/;const getWord=e=>e.word||e.Word||"";const getStart=e=>e.startTime??e.StartTime??0;const getEnd=e=>e.endTime??e.EndTime??0;const i=e.slice(0,10).map(getWord).join("");const s=(i.match(/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g)||[]).length;const l=s<i.length*.3;const c=l?" ":"";const A=[];let d=[];let p=getStart(e[0]);let u=p;function flushCaption(){if(d.length===0)return;const e=d.join(c).trim();if(e.length>0){A.push({id:A.length+1,startMs:p,endMs:u,text:e})}d=[]}for(let t=0;t<e.length;t++){const i=e[t];const s=getStart(i);const l=getEnd(i);const c=s-u;const A=s-p;if(c>a&&d.length>0){flushCaption();p=s}else if(d.length>0&&A>r&&o.test(d[d.length-1])){flushCaption();p=s}else if(d.length>0&&A>n){flushCaption();p=s}d.push(getWord(i));u=l||u}flushCaption();return A}function buildCaptionsFromFile(e,t){if(!e||e.trim().length===0)return[];if(/^\d+\s*\n\d{2}:\d{2}:\d{2}[,.]\d{3}\s*-->/.test(e.trim())){return parseSrt(e)}return[{id:1,startMs:0,endMs:Math.round(t*1e3),text:e.trim()}]}function formatPlainText(e,t={}){return e.map((e=>{const a=t.includeSpeakers&&e.speakerId?`[${e.speakerId}] `:"";return`${a}${e.text}`})).join("\n")+"\n"}function formatJson(e){return JSON.stringify(e,null,2)+"\n"}e.exports={parseSrt:parseSrt,formatSrt:formatSrt,parseTimestamp:parseTimestamp,formatTimestamp:formatTimestamp,buildCaptionsFromFlash:buildCaptionsFromFlash,buildCaptionsFromSentence:buildCaptionsFromSentence,buildCaptionsFromWordList:buildCaptionsFromWordList,buildCaptionsFromFile:buildCaptionsFromFile,formatPlainText:formatPlainText,formatJson:formatJson}},9167:(e,t,a)=>{const{createSilence:r,buildWav:n}=a(7188);const o=24e3;const i=2;const s=o*i/1e3;function msToBytes(e){const t=Math.round(e*s);return t-t%i}function buildTimelinePcm(e,t){if(!e||e.length===0){return{pcm:Buffer.alloc(0),durationMs:0}}const a=Math.max(...e.map((e=>e.endMs)));const r=t||a;const n=msToBytes(r);const o=Buffer.alloc(n,0);for(const t of e){const e=msToBytes(t.startMs);const a=msToBytes(t.endMs)-e;const r=Math.min(t.audioBuffer.length,a,n-e);if(r>0&&e<n){t.audioBuffer.copy(o,e,0,r)}}return{pcm:o,durationMs:r}}function buildTimelineAudio(e,t){const{pcm:a,durationMs:r}=buildTimelinePcm(e,t);if(a.length===0){return{wav:Buffer.alloc(0),duration:0}}const{wav:o}=n([a],0);return{wav:o,duration:r/1e3}}e.exports={buildTimelinePcm:buildTimelinePcm,buildTimelineAudio:buildTimelineAudio,msToBytes:msToBytes,SAMPLE_RATE:o,BYTES_PER_SAMPLE:i,BYTES_PER_MS:s}},1428:(e,t,a)=>{const{request:r,throwApiError:n,throwNetworkError:o}=a(2768);async function synthesizeTTS(e){const{apiBase:t,token:a,text:i,voiceId:s,speed:l=1,volume:c=1,pitch:A,format:d="pcm",index:p,total:u,label:f}=e;const h=f?` ${f}`:"";process.stdout.write(` TTS [${p+1}/${u}]${h}...`);const m={text:i,voiceId:s,speed:l,volume:c,format:d};if(A!=null&&A!==0)m.pitch=A;let g,v;try{({status:g,data:v}=await r(`${t}/api/tts/synthesize`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}},m))}catch(e){console.log(" FAIL");o(e,t)}if(g!==200||v.code!=="success"){console.log(" FAIL");n(g,v,`TTS segment ${p+1}`)}const b=Buffer.from(v.audio,"base64");return{audio:b,quota:v.quota}}e.exports={synthesizeTTS:synthesizeTTS}},4178:(e,t,a)=>{const r=a(9896);const n=a(6928);const{execFileSync:o}=a(5317);const i={"16k_zh":"Chinese","16k_en":"English","16k_zh_en":"Chinese","16k_ja":"Japanese","16k_ko":"Korean","16k_zh_dialect":"Chinese","8k_zh":"Chinese","8k_en":"English",zh:"Chinese",en:"English",ja:"Japanese",ko:"Korean",auto:"auto"};function checkWhisperAvailable(){try{const e=resolveWhisperModule();if(e){return{available:true}}return{available:false,error:"nodejs-whisper is not installed.\n"+"Install it with: npm install -g nodejs-whisper\n"+"Then download a model: npx nodejs-whisper download"}}catch{return{available:false,error:"nodejs-whisper is not installed.\n"+"Install it with: npm install -g nodejs-whisper\n"+"Then download a model: npx nodejs-whisper download"}}}function resolveWhisperModule(){try{return require.resolve("nodejs-whisper")}catch{}try{const e=o("npm",["root","-g"],{encoding:"utf8"}).trim();const t=n.join(e,"nodejs-whisper");if(r.existsSync(t)){return t}}catch{}return null}function loadWhisperModule(){const e=resolveWhisperModule();if(!e){throw new Error("nodejs-whisper is not installed.\n"+"Install: npm install -g nodejs-whisper\n"+"Then: npx nodejs-whisper download")}const t=require(e);return t.nodewhisper||t.default||t}async function transcribeLocal(e,t={}){const{model:a="base",lang:n="16k_zh"}=t;if(!r.existsSync(e)){throw new Error(`WAV file not found: ${e}`)}const o=loadWhisperModule();const s=i[n]||i["auto"]||"auto";const l=a;await o(e,{modelName:l,autoDownloadModelName:l,removeWavFileAfterTranscription:false,whisperOptions:{outputInJson:true,outputInSrt:false,outputInVtt:false,outputInTxt:false,wordTimestamps:true,splitOnWord:true,language:s==="auto"?undefined:s}});const c=e+".json";if(!r.existsSync(c)){const t=e.replace(/\.wav$/i,"");const a=[t+".json",e+".json"];const n=a.find((e=>r.existsSync(e)));if(!n){throw new Error("Whisper completed but no JSON output found.\n"+`Expected: ${c}\n`+"Ensure nodejs-whisper is correctly installed.")}}const A=r.readFileSync(c,"utf8");const d=JSON.parse(A);const p=d.transcription||d.segments||[];const u=parseWhisperOutput(p);cleanupWhisperFiles(e);return u}function parseWhisperOutput(e){if(!e||!Array.isArray(e))return[];let t=0;const a=[];for(const r of e){const e=(r.text||"").trim();if(!e)continue;t++;let n=0;let o=0;if(r.timestamps){n=parseTimestamp(r.timestamps.from);o=parseTimestamp(r.timestamps.to)}else if(r.offsets){n=r.offsets.from||0;o=r.offsets.to||0}else if(typeof r.start==="number"){n=Math.round(r.start*1e3);o=Math.round(r.end*1e3)}a.push({id:t,startMs:n,endMs:o,text:e})}return a}function parseTimestamp(e){if(!e||typeof e!=="string")return 0;const t=e.match(/^(\d+):(\d+):(\d+)\.(\d+)$/);if(!t)return 0;const a=parseInt(t[1],10);const r=parseInt(t[2],10);const n=parseInt(t[3],10);const o=parseInt(t[4].padEnd(3,"0").slice(0,3),10);return(a*3600+r*60+n)*1e3+o}function cleanupWhisperFiles(e){const t=[".json",".srt",".vtt",".txt",".lrc",".wts"];for(const a of t){const t=e+a;try{if(r.existsSync(t)){r.unlinkSync(t)}}catch{}}}e.exports={checkWhisperAvailable:checkWhisperAvailable,transcribeLocal:transcribeLocal,parseWhisperOutput:parseWhisperOutput,parseTimestamp:parseTimestamp,LANG_MAP:i}},47:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},4603:e=>{"use strict";var t=global.MutationObserver||global.WebKitMutationObserver;var a;if(process.browser){if(t){var r=0;var n=new t(nextTick);var o=global.document.createTextNode("");n.observe(o,{characterData:true});a=function(){o.data=r=++r%2}}else if(!global.setImmediate&&typeof global.MessageChannel!=="undefined"){var i=new global.MessageChannel;i.port1.onmessage=nextTick;a=function(){i.port2.postMessage(0)}}else if("document"in global&&"onreadystatechange"in global.document.createElement("script")){a=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){nextTick();e.onreadystatechange=null;e.parentNode.removeChild(e);e=null};global.document.documentElement.appendChild(e)}}else{a=function(){setTimeout(nextTick,0)}}}else{a=function(){process.nextTick(nextTick)}}var s;var l=[];function nextTick(){s=true;var e,t;var a=l.length;while(a){t=l;l=[];e=-1;while(++e<a){t[e]()}a=l.length}s=false}e.exports=immediate;function immediate(e){if(l.push(e)===1&&!s){a()}}},4244:(e,t,a)=>{try{var r=a(9023);if(typeof r.inherits!=="function")throw"";e.exports=r.inherits}catch(t){e.exports=a(1103)}},1103:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},8941:(e,t,a)=>{"use strict";var r=a(7441);var n=a(5375);var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){var t=[];var a,n,i,s,l,c,A;var d=0,p=e.length,u=p;var f=r.getTypeOf(e)!=="string";while(d<e.length){u=p-d;if(!f){a=e.charCodeAt(d++);n=d<p?e.charCodeAt(d++):0;i=d<p?e.charCodeAt(d++):0}else{a=e[d++];n=d<p?e[d++]:0;i=d<p?e[d++]:0}s=a>>2;l=(a&3)<<4|n>>4;c=u>1?(n&15)<<2|i>>6:64;A=u>2?i&63:64;t.push(o.charAt(s)+o.charAt(l)+o.charAt(c)+o.charAt(A))}return t.join("")};t.decode=function(e){var t,a,r;var i,s,l,c;var A=0,d=0;var p="data:";if(e.substr(0,p.length)===p){throw new Error("Invalid base64 input, it looks like a data url.")}e=e.replace(/[^A-Za-z0-9+/=]/g,"");var u=e.length*3/4;if(e.charAt(e.length-1)===o.charAt(64)){u--}if(e.charAt(e.length-2)===o.charAt(64)){u--}if(u%1!==0){throw new Error("Invalid base64 input, bad content length.")}var f;if(n.uint8array){f=new Uint8Array(u|0)}else{f=new Array(u|0)}while(A<e.length){i=o.indexOf(e.charAt(A++));s=o.indexOf(e.charAt(A++));l=o.indexOf(e.charAt(A++));c=o.indexOf(e.charAt(A++));t=i<<2|s>>4;a=(s&15)<<4|l>>2;r=(l&3)<<6|c;f[d++]=t;if(l!==64){f[d++]=a}if(c!==64){f[d++]=r}}return f}},8368:(e,t,a)=>{"use strict";var r=a(8301);var n=a(7623);var o=a(8074);var i=a(3819);function CompressedObject(e,t,a,r,n){this.compressedSize=e;this.uncompressedSize=t;this.crc32=a;this.compression=r;this.compressedContent=n}CompressedObject.prototype={getContentWorker:function(){var e=new n(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length"));var t=this;e.on("end",(function(){if(this.streamInfo["data_length"]!==t.uncompressedSize){throw new Error("Bug : uncompressed data size mismatch")}}));return e},getCompressedWorker:function(){return new n(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};CompressedObject.createWorkerFrom=function(e,t,a){return e.pipe(new o).pipe(new i("uncompressedSize")).pipe(t.compressWorker(a)).pipe(new i("compressedSize")).withStreamInfo("compression",t)};e.exports=CompressedObject},5605:(e,t,a)=>{"use strict";var r=a(270);t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}};t.DEFLATE=a(3646)},1243:(e,t,a)=>{"use strict";var r=a(7441);function makeTable(){var e,t=[];for(var a=0;a<256;a++){e=a;for(var r=0;r<8;r++){e=e&1?3988292384^e>>>1:e>>>1}t[a]=e}return t}var n=makeTable();function crc32(e,t,a,r){var o=n,i=r+a;e=e^-1;for(var s=r;s<i;s++){e=e>>>8^o[(e^t[s])&255]}return e^-1}function crc32str(e,t,a,r){var o=n,i=r+a;e=e^-1;for(var s=r;s<i;s++){e=e>>>8^o[(e^t.charCodeAt(s))&255]}return e^-1}e.exports=function crc32wrapper(e,t){if(typeof e==="undefined"||!e.length){return 0}var a=r.getTypeOf(e)!=="string";if(a){return crc32(t|0,e,e.length,0)}else{return crc32str(t|0,e,e.length,0)}}},4380:(e,t)=>{"use strict";t.base64=false;t.binary=false;t.dir=false;t.createFolders=true;t.date=null;t.compression=null;t.compressionOptions=null;t.comment=null;t.unixPermissions=null;t.dosPermissions=null},8301:(e,t,a)=>{"use strict";var r=null;if(typeof Promise!=="undefined"){r=Promise}else{r=a(8924)}e.exports={Promise:r}},3646:(e,t,a)=>{"use strict";var r=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Uint32Array!=="undefined";var n=a(7375);var o=a(7441);var i=a(270);var s=r?"uint8array":"array";t.magic="\b\0";function FlateWorker(e,t){i.call(this,"FlateWorker/"+e);this._pako=null;this._pakoAction=e;this._pakoOptions=t;this.meta={}}o.inherits(FlateWorker,i);FlateWorker.prototype.processChunk=function(e){this.meta=e.meta;if(this._pako===null){this._createPako()}this._pako.push(o.transformTo(s,e.data),false)};FlateWorker.prototype.flush=function(){i.prototype.flush.call(this);if(this._pako===null){this._createPako()}this._pako.push([],true)};FlateWorker.prototype.cleanUp=function(){i.prototype.cleanUp.call(this);this._pako=null};FlateWorker.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};t.compressWorker=function(e){return new FlateWorker("Deflate",e)};t.uncompressWorker=function(){return new FlateWorker("Inflate",{})}},8993:(e,t,a)=>{"use strict";var r=a(7441);var n=a(270);var o=a(885);var i=a(1243);var s=a(2486);var decToHex=function(e,t){var a="",r;for(r=0;r<t;r++){a+=String.fromCharCode(e&255);e=e>>>8}return a};var generateUnixExternalFileAttr=function(e,t){var a=e;if(!e){a=t?16893:33204}return(a&65535)<<16};var generateDosExternalFileAttr=function(e){return(e||0)&63};var generateZipParts=function(e,t,a,n,l,c){var A=e["file"],d=e["compression"],p=c!==o.utf8encode,u=r.transformTo("string",c(A.name)),f=r.transformTo("string",o.utf8encode(A.name)),h=A.comment,m=r.transformTo("string",c(h)),g=r.transformTo("string",o.utf8encode(h)),v=f.length!==A.name.length,b=g.length!==h.length,y,w,x="",S="",C="",T=A.dir,k=A.date;var P={crc32:0,compressedSize:0,uncompressedSize:0};if(!t||a){P.crc32=e["crc32"];P.compressedSize=e["compressedSize"];P.uncompressedSize=e["uncompressedSize"]}var E=0;if(t){E|=8}if(!p&&(v||b)){E|=2048}var _=0;var L=0;if(T){_|=16}if(l==="UNIX"){L=798;_|=generateUnixExternalFileAttr(A.unixPermissions,T)}else{L=20;_|=generateDosExternalFileAttr(A.dosPermissions,T)}y=k.getUTCHours();y=y<<6;y=y|k.getUTCMinutes();y=y<<5;y=y|k.getUTCSeconds()/2;w=k.getUTCFullYear()-1980;w=w<<4;w=w|k.getUTCMonth()+1;w=w<<5;w=w|k.getUTCDate();if(v){S=decToHex(1,1)+decToHex(i(u),4)+f;x+="up"+decToHex(S.length,2)+S}if(b){C=decToHex(1,1)+decToHex(i(m),4)+g;x+="uc"+decToHex(C.length,2)+C}var B="";B+="\n\0";B+=decToHex(E,2);B+=d.magic;B+=decToHex(y,2);B+=decToHex(w,2);B+=decToHex(P.crc32,4);B+=decToHex(P.compressedSize,4);B+=decToHex(P.uncompressedSize,4);B+=decToHex(u.length,2);B+=decToHex(x.length,2);var D=s.LOCAL_FILE_HEADER+B+u+x;var I=s.CENTRAL_FILE_HEADER+decToHex(L,2)+B+decToHex(m.length,2)+"\0\0"+"\0\0"+decToHex(_,4)+decToHex(n,4)+u+x+m;return{fileRecord:D,dirRecord:I}};var generateCentralDirectoryEnd=function(e,t,a,n,o){var i="";var l=r.transformTo("string",o(n));i=s.CENTRAL_DIRECTORY_END+"\0\0"+"\0\0"+decToHex(e,2)+decToHex(e,2)+decToHex(t,4)+decToHex(a,4)+decToHex(l.length,2)+l;return i};var generateDataDescriptors=function(e){var t="";t=s.DATA_DESCRIPTOR+decToHex(e["crc32"],4)+decToHex(e["compressedSize"],4)+decToHex(e["uncompressedSize"],4);return t};function ZipFileWorker(e,t,a,r){n.call(this,"ZipFileWorker");this.bytesWritten=0;this.zipComment=t;this.zipPlatform=a;this.encodeFileName=r;this.streamFiles=e;this.accumulate=false;this.contentBuffer=[];this.dirRecords=[];this.currentSourceOffset=0;this.entriesCount=0;this.currentFile=null;this._sources=[]}r.inherits(ZipFileWorker,n);ZipFileWorker.prototype.push=function(e){var t=e.meta.percent||0;var a=this.entriesCount;var r=this._sources.length;if(this.accumulate){this.contentBuffer.push(e)}else{this.bytesWritten+=e.data.length;n.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:a?(t+100*(a-r-1))/a:100}})}};ZipFileWorker.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten;this.currentFile=e["file"].name;var t=this.streamFiles&&!e["file"].dir;if(t){var a=generateZipParts(e,t,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:a.fileRecord,meta:{percent:0}})}else{this.accumulate=true}};ZipFileWorker.prototype.closedSource=function(e){this.accumulate=false;var t=this.streamFiles&&!e["file"].dir;var a=generateZipParts(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.dirRecords.push(a.dirRecord);if(t){this.push({data:generateDataDescriptors(e),meta:{percent:100}})}else{this.push({data:a.fileRecord,meta:{percent:0}});while(this.contentBuffer.length){this.push(this.contentBuffer.shift())}}this.currentFile=null};ZipFileWorker.prototype.flush=function(){var e=this.bytesWritten;for(var t=0;t<this.dirRecords.length;t++){this.push({data:this.dirRecords[t],meta:{percent:100}})}var a=this.bytesWritten-e;var r=generateCentralDirectoryEnd(this.dirRecords.length,a,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})};ZipFileWorker.prototype.prepareNextSource=function(){this.previous=this._sources.shift();this.openedSource(this.previous.streamInfo);if(this.isPaused){this.previous.pause()}else{this.previous.resume()}};ZipFileWorker.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;e.on("data",(function(e){t.processChunk(e)}));e.on("end",(function(){t.closedSource(t.previous.streamInfo);if(t._sources.length){t.prepareNextSource()}else{t.end()}}));e.on("error",(function(e){t.error(e)}));return this};ZipFileWorker.prototype.resume=function(){if(!n.prototype.resume.call(this)){return false}if(!this.previous&&this._sources.length){this.prepareNextSource();return true}if(!this.previous&&!this._sources.length&&!this.generatedError){this.end();return true}};ZipFileWorker.prototype.error=function(e){var t=this._sources;if(!n.prototype.error.call(this,e)){return false}for(var a=0;a<t.length;a++){try{t[a].error(e)}catch(e){}}return true};ZipFileWorker.prototype.lock=function(){n.prototype.lock.call(this);var e=this._sources;for(var t=0;t<e.length;t++){e[t].lock()}};e.exports=ZipFileWorker},7718:(e,t,a)=>{"use strict";var r=a(5605);var n=a(8993);var getCompression=function(e,t){var a=e||t;var n=r[a];if(!n){throw new Error(a+" is not a valid compression method !")}return n};t.generateWorker=function(e,t,a){var r=new n(t.streamFiles,a,t.platform,t.encodeFileName);var o=0;try{e.forEach((function(e,a){o++;var n=getCompression(a.options.compression,t.compression);var i=a.options.compressionOptions||t.compressionOptions||{};var s=a.dir,l=a.date;a._compressWorker(n,i).withStreamInfo("file",{name:e,dir:s,date:l,comment:a.comment||"",unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions}).pipe(r)}));r.entriesCount=o}catch(e){r.error(e)}return r}},3016:(e,t,a)=>{"use strict";function JSZip(){if(!(this instanceof JSZip)){return new JSZip}if(arguments.length){throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.")}this.files=Object.create(null);this.comment=null;this.root="";this.clone=function(){var e=new JSZip;for(var t in this){if(typeof this[t]!=="function"){e[t]=this[t]}}return e}}JSZip.prototype=a(9261);JSZip.prototype.loadAsync=a(7858);JSZip.support=a(5375);JSZip.defaults=a(4380);JSZip.version="3.10.1";JSZip.loadAsync=function(e,t){return(new JSZip).loadAsync(e,t)};JSZip.external=a(8301);e.exports=JSZip},7858:(e,t,a)=>{"use strict";var r=a(7441);var n=a(8301);var o=a(885);var i=a(2747);var s=a(8074);var l=a(1764);function checkEntryCRC32(e){return new n.Promise((function(t,a){var r=e.decompressed.getContentWorker().pipe(new s);r.on("error",(function(e){a(e)})).on("end",(function(){if(r.streamInfo.crc32!==e.decompressed.crc32){a(new Error("Corrupted zip : CRC32 mismatch"))}else{t()}})).resume()}))}e.exports=function(e,t){var a=this;t=r.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:o.utf8decode});if(l.isNode&&l.isStream(e)){return n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."))}return r.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then((function(e){var a=new i(t);a.load(e);return a})).then((function checkCRC32(e){var a=[n.Promise.resolve(e)];var r=e.files;if(t.checkCRC32){for(var o=0;o<r.length;o++){a.push(checkEntryCRC32(r[o]))}}return n.Promise.all(a)})).then((function addFiles(e){var n=e.shift();var o=n.files;for(var i=0;i<o.length;i++){var s=o[i];var l=s.fileNameStr;var c=r.resolve(s.fileNameStr);a.file(c,s.decompressed,{binary:true,optimizedBinaryString:true,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders});if(!s.dir){a.file(c).unsafeOriginalName=l}}if(n.zipComment.length){a.comment=n.zipComment}return a}))}},9500:(e,t,a)=>{"use strict";var r=a(7441);var n=a(270);function NodejsStreamInputAdapter(e,t){n.call(this,"Nodejs stream input adapter for "+e);this._upstreamEnded=false;this._bindStream(t)}r.inherits(NodejsStreamInputAdapter,n);NodejsStreamInputAdapter.prototype._bindStream=function(e){var t=this;this._stream=e;e.pause();e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){if(t.isPaused){this.generatedError=e}else{t.error(e)}})).on("end",(function(){if(t.isPaused){t._upstreamEnded=true}else{t.end()}}))};NodejsStreamInputAdapter.prototype.pause=function(){if(!n.prototype.pause.call(this)){return false}this._stream.pause();return true};NodejsStreamInputAdapter.prototype.resume=function(){if(!n.prototype.resume.call(this)){return false}if(this._upstreamEnded){this.end()}else{this._stream.resume()}return true};e.exports=NodejsStreamInputAdapter},8911:(e,t,a)=>{"use strict";var r=a(5783).Readable;var n=a(7441);n.inherits(NodejsStreamOutputAdapter,r);function NodejsStreamOutputAdapter(e,t,a){r.call(this,t);this._helper=e;var n=this;e.on("data",(function(e,t){if(!n.push(e)){n._helper.pause()}if(a){a(t)}})).on("error",(function(e){n.emit("error",e)})).on("end",(function(){n.push(null)}))}NodejsStreamOutputAdapter.prototype._read=function(){this._helper.resume()};e.exports=NodejsStreamOutputAdapter},1764:e=>{"use strict";e.exports={isNode:typeof Buffer!=="undefined",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from){return Buffer.from(e,t)}else{if(typeof e==="number"){throw new Error('The "data" argument must not be a number')}return new Buffer(e,t)}},allocBuffer:function(e){if(Buffer.alloc){return Buffer.alloc(e)}else{var t=new Buffer(e);t.fill(0);return t}},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on==="function"&&typeof e.pause==="function"&&typeof e.resume==="function"}}},9261:(e,t,a)=>{"use strict";var r=a(885);var n=a(7441);var o=a(270);var i=a(7933);var s=a(4380);var l=a(8368);var c=a(7648);var A=a(7718);var d=a(1764);var p=a(9500);var fileAdd=function(e,t,a){var r=n.getTypeOf(t),i;var A=n.extend(a||{},s);A.date=A.date||new Date;if(A.compression!==null){A.compression=A.compression.toUpperCase()}if(typeof A.unixPermissions==="string"){A.unixPermissions=parseInt(A.unixPermissions,8)}if(A.unixPermissions&&A.unixPermissions&16384){A.dir=true}if(A.dosPermissions&&A.dosPermissions&16){A.dir=true}if(A.dir){e=forceTrailingSlash(e)}if(A.createFolders&&(i=parentFolder(e))){folderAdd.call(this,i,true)}var u=r==="string"&&A.binary===false&&A.base64===false;if(!a||typeof a.binary==="undefined"){A.binary=!u}var f=t instanceof l&&t.uncompressedSize===0;if(f||A.dir||!t||t.length===0){A.base64=false;A.binary=true;t="";A.compression="STORE";r="string"}var h=null;if(t instanceof l||t instanceof o){h=t}else if(d.isNode&&d.isStream(t)){h=new p(e,t)}else{h=n.prepareContent(e,t,A.binary,A.optimizedBinaryString,A.base64)}var m=new c(e,h,A);this.files[e]=m};var parentFolder=function(e){if(e.slice(-1)==="/"){e=e.substring(0,e.length-1)}var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""};var forceTrailingSlash=function(e){if(e.slice(-1)!=="/"){e+="/"}return e};var folderAdd=function(e,t){t=typeof t!=="undefined"?t:s.createFolders;e=forceTrailingSlash(e);if(!this.files[e]){fileAdd.call(this,e,null,{dir:true,createFolders:t})}return this.files[e]};function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var u={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,a,r;for(t in this.files){r=this.files[t];a=t.slice(this.root.length,t.length);if(a&&t.slice(0,this.root.length)===this.root){e(a,r)}}},filter:function(e){var t=[];this.forEach((function(a,r){if(e(a,r)){t.push(r)}}));return t},file:function(e,t,a){if(arguments.length===1){if(isRegExp(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}else{var n=this.files[this.root+e];if(n&&!n.dir){return n}else{return null}}}else{e=this.root+e;fileAdd.call(this,e,t,a)}return this},folder:function(e){if(!e){return this}if(isRegExp(e)){return this.filter((function(t,a){return a.dir&&e.test(t)}))}var t=this.root+e;var a=folderAdd.call(this,t);var r=this.clone();r.root=a.name;return r},remove:function(e){e=this.root+e;var t=this.files[e];if(!t){if(e.slice(-1)!=="/"){e+="/"}t=this.files[e]}if(t&&!t.dir){delete this.files[e]}else{var a=this.filter((function(t,a){return a.name.slice(0,e.length)===e}));for(var r=0;r<a.length;r++){delete this.files[a[r].name]}}return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,a={};try{a=n.extend(e||{},{streamFiles:false,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode});a.type=a.type.toLowerCase();a.compression=a.compression.toUpperCase();if(a.type==="binarystring"){a.type="string"}if(!a.type){throw new Error("No output type specified.")}n.checkSupport(a.type);if(a.platform==="darwin"||a.platform==="freebsd"||a.platform==="linux"||a.platform==="sunos"){a.platform="UNIX"}if(a.platform==="win32"){a.platform="DOS"}var s=a.comment||this.comment||"";t=A.generateWorker(this,a,s)}catch(e){t=new o("error");t.error(e)}return new i(t,a.type||"string",a.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){e=e||{};if(!e.type){e.type="nodebuffer"}return this.generateInternalStream(e).toNodejsStream(t)}};e.exports=u},1832:(e,t,a)=>{"use strict";var r=a(5723);var n=a(7441);function ArrayReader(e){r.call(this,e);for(var t=0;t<this.data.length;t++){e[t]=e[t]&255}}n.inherits(ArrayReader,r);ArrayReader.prototype.byteAt=function(e){return this.data[this.zero+e]};ArrayReader.prototype.lastIndexOfSignature=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1),r=e.charCodeAt(2),n=e.charCodeAt(3);for(var o=this.length-4;o>=0;--o){if(this.data[o]===t&&this.data[o+1]===a&&this.data[o+2]===r&&this.data[o+3]===n){return o-this.zero}}return-1};ArrayReader.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1),r=e.charCodeAt(2),n=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&a===o[1]&&r===o[2]&&n===o[3]};ArrayReader.prototype.readData=function(e){this.checkOffset(e);if(e===0){return[]}var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);this.index+=e;return t};e.exports=ArrayReader},5723:(e,t,a)=>{"use strict";var r=a(7441);function DataReader(e){this.data=e;this.length=e.length;this.index=0;this.zero=0}DataReader.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0){throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")}},setIndex:function(e){this.checkIndex(e);this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,a;this.checkOffset(e);for(a=this.index+e-1;a>=this.index;a--){t=(t<<8)+this.byteAt(a)}this.index+=e;return t},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};e.exports=DataReader},6853:(e,t,a)=>{"use strict";var r=a(7846);var n=a(7441);function NodeBufferReader(e){r.call(this,e)}n.inherits(NodeBufferReader,r);NodeBufferReader.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);this.index+=e;return t};e.exports=NodeBufferReader},9930:(e,t,a)=>{"use strict";var r=a(5723);var n=a(7441);function StringReader(e){r.call(this,e)}n.inherits(StringReader,r);StringReader.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};StringReader.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};StringReader.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};StringReader.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);this.index+=e;return t};e.exports=StringReader},7846:(e,t,a)=>{"use strict";var r=a(1832);var n=a(7441);function Uint8ArrayReader(e){r.call(this,e)}n.inherits(Uint8ArrayReader,r);Uint8ArrayReader.prototype.readData=function(e){this.checkOffset(e);if(e===0){return new Uint8Array(0)}var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);this.index+=e;return t};e.exports=Uint8ArrayReader},3136:(e,t,a)=>{"use strict";var r=a(7441);var n=a(5375);var o=a(1832);var i=a(9930);var s=a(6853);var l=a(7846);e.exports=function(e){var t=r.getTypeOf(e);r.checkSupport(t);if(t==="string"&&!n.uint8array){return new i(e)}if(t==="nodebuffer"){return new s(e)}if(n.uint8array){return new l(r.transformTo("uint8array",e))}return new o(r.transformTo("array",e))}},2486:(e,t)=>{"use strict";t.LOCAL_FILE_HEADER="PK";t.CENTRAL_FILE_HEADER="PK";t.CENTRAL_DIRECTORY_END="PK";t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK";t.ZIP64_CENTRAL_DIRECTORY_END="PK";t.DATA_DESCRIPTOR="PK\b"},6308:(e,t,a)=>{"use strict";var r=a(270);var n=a(7441);function ConvertWorker(e){r.call(this,"ConvertWorker to "+e);this.destType=e}n.inherits(ConvertWorker,r);ConvertWorker.prototype.processChunk=function(e){this.push({data:n.transformTo(this.destType,e.data),meta:e.meta})};e.exports=ConvertWorker},8074:(e,t,a)=>{"use strict";var r=a(270);var n=a(1243);var o=a(7441);function Crc32Probe(){r.call(this,"Crc32Probe");this.withStreamInfo("crc32",0)}o.inherits(Crc32Probe,r);Crc32Probe.prototype.processChunk=function(e){this.streamInfo.crc32=n(e.data,this.streamInfo.crc32||0);this.push(e)};e.exports=Crc32Probe},3819:(e,t,a)=>{"use strict";var r=a(7441);var n=a(270);function DataLengthProbe(e){n.call(this,"DataLengthProbe for "+e);this.propName=e;this.withStreamInfo(e,0)}r.inherits(DataLengthProbe,n);DataLengthProbe.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}n.prototype.processChunk.call(this,e)};e.exports=DataLengthProbe},7623:(e,t,a)=>{"use strict";var r=a(7441);var n=a(270);var o=16*1024;function DataWorker(e){n.call(this,"DataWorker");var t=this;this.dataIsReady=false;this.index=0;this.max=0;this.data=null;this.type="";this._tickScheduled=false;e.then((function(e){t.dataIsReady=true;t.data=e;t.max=e&&e.length||0;t.type=r.getTypeOf(e);if(!t.isPaused){t._tickAndRepeat()}}),(function(e){t.error(e)}))}r.inherits(DataWorker,n);DataWorker.prototype.cleanUp=function(){n.prototype.cleanUp.call(this);this.data=null};DataWorker.prototype.resume=function(){if(!n.prototype.resume.call(this)){return false}if(!this._tickScheduled&&this.dataIsReady){this._tickScheduled=true;r.delay(this._tickAndRepeat,[],this)}return true};DataWorker.prototype._tickAndRepeat=function(){this._tickScheduled=false;if(this.isPaused||this.isFinished){return}this._tick();if(!this.isFinished){r.delay(this._tickAndRepeat,[],this);this._tickScheduled=true}};DataWorker.prototype._tick=function(){if(this.isPaused||this.isFinished){return false}var e=o;var t=null,a=Math.min(this.max,this.index+e);if(this.index>=this.max){return this.end()}else{switch(this.type){case"string":t=this.data.substring(this.index,a);break;case"uint8array":t=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":t=this.data.slice(this.index,a);break}this.index=a;return this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})}};e.exports=DataWorker},270:e=>{"use strict";function GenericWorker(e){this.name=e||"default";this.streamInfo={};this.generatedError=null;this.extraStreamInfo={};this.isPaused=true;this.isFinished=false;this.isLocked=false;this._listeners={data:[],end:[],error:[]};this.previous=null}GenericWorker.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished){return false}this.flush();try{this.emit("end");this.cleanUp();this.isFinished=true}catch(e){this.emit("error",e)}return true},error:function(e){if(this.isFinished){return false}if(this.isPaused){this.generatedError=e}else{this.isFinished=true;this.emit("error",e);if(this.previous){this.previous.error(e)}this.cleanUp()}return true},on:function(e,t){this._listeners[e].push(t);return this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null;this._listeners=[]},emit:function(e,t){if(this._listeners[e]){for(var a=0;a<this._listeners[e].length;a++){this._listeners[e][a].call(this,t)}}},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked){throw new Error("The stream '"+this+"' has already been used.")}this.streamInfo=e.streamInfo;this.mergeStreamInfo();this.previous=e;var t=this;e.on("data",(function(e){t.processChunk(e)}));e.on("end",(function(){t.end()}));e.on("error",(function(e){t.error(e)}));return this},pause:function(){if(this.isPaused||this.isFinished){return false}this.isPaused=true;if(this.previous){this.previous.pause()}return true},resume:function(){if(!this.isPaused||this.isFinished){return false}this.isPaused=false;var e=false;if(this.generatedError){this.error(this.generatedError);e=true}if(this.previous){this.previous.resume()}return!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){this.extraStreamInfo[e]=t;this.mergeStreamInfo();return this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)){continue}this.streamInfo[e]=this.extraStreamInfo[e]}},lock:function(){if(this.isLocked){throw new Error("The stream '"+this+"' has already been used.")}this.isLocked=true;if(this.previous){this.previous.lock()}},toString:function(){var e="Worker "+this.name;if(this.previous){return this.previous+" -> "+e}else{return e}}};e.exports=GenericWorker},7933:(e,t,a)=>{"use strict";var r=a(7441);var n=a(6308);var o=a(270);var i=a(8941);var s=a(5375);var l=a(8301);var c=null;if(s.nodestream){try{c=a(8911)}catch(e){}}function transformZipOutput(e,t,a){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),a);case"base64":return i.encode(t);default:return r.transformTo(e,t)}}function concat(e,t){var a,r=0,n=null,o=0;for(a=0;a<t.length;a++){o+=t[a].length}switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":n=new Uint8Array(o);for(a=0;a<t.length;a++){n.set(t[a],r);r+=t[a].length}return n;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function accumulate(e,t){return new l.Promise((function(a,r){var n=[];var o=e._internalType,i=e._outputType,s=e._mimeType;e.on("data",(function(e,a){n.push(e);if(t){t(a)}})).on("error",(function(e){n=[];r(e)})).on("end",(function(){try{var e=transformZipOutput(i,concat(o,n),s);a(e)}catch(e){r(e)}n=[]})).resume()}))}function StreamHelper(e,t,a){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";break}try{this._internalType=i;this._outputType=t;this._mimeType=a;r.checkSupport(i);this._worker=e.pipe(new n(i));e.lock()}catch(e){this._worker=new o("error");this._worker.error(e)}}StreamHelper.prototype={accumulate:function(e){return accumulate(this,e)},on:function(e,t){var a=this;if(e==="data"){this._worker.on(e,(function(e){t.call(a,e.data,e.meta)}))}else{this._worker.on(e,(function(){r.delay(t,arguments,a)}))}return this},resume:function(){r.delay(this._worker.resume,[],this._worker);return this},pause:function(){this._worker.pause();return this},toNodejsStream:function(e){r.checkSupport("nodestream");if(this._outputType!=="nodebuffer"){throw new Error(this._outputType+" is not supported by this method")}return new c(this,{objectMode:this._outputType!=="nodebuffer"},e)}};e.exports=StreamHelper},5375:(e,t,a)=>{"use strict";t.base64=true;t.array=true;t.string=true;t.arraybuffer=typeof ArrayBuffer!=="undefined"&&typeof Uint8Array!=="undefined";t.nodebuffer=typeof Buffer!=="undefined";t.uint8array=typeof Uint8Array!=="undefined";if(typeof ArrayBuffer==="undefined"){t.blob=false}else{var r=new ArrayBuffer(0);try{t.blob=new Blob([r],{type:"application/zip"}).size===0}catch(e){try{var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;var o=new n;o.append(r);t.blob=o.getBlob("application/zip").size===0}catch(e){t.blob=false}}}try{t.nodestream=!!a(5783).Readable}catch(e){t.nodestream=false}},885:(e,t,a)=>{"use strict";var r=a(7441);var n=a(5375);var o=a(1764);var i=a(270);var s=new Array(256);for(var l=0;l<256;l++){s[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1}s[254]=s[254]=1;var string2buf=function(e){var t,a,r,o,i,s=e.length,l=0;for(o=0;o<s;o++){a=e.charCodeAt(o);if((a&64512)===55296&&o+1<s){r=e.charCodeAt(o+1);if((r&64512)===56320){a=65536+(a-55296<<10)+(r-56320);o++}}l+=a<128?1:a<2048?2:a<65536?3:4}if(n.uint8array){t=new Uint8Array(l)}else{t=new Array(l)}for(i=0,o=0;i<l;o++){a=e.charCodeAt(o);if((a&64512)===55296&&o+1<s){r=e.charCodeAt(o+1);if((r&64512)===56320){a=65536+(a-55296<<10)+(r-56320);o++}}if(a<128){t[i++]=a}else if(a<2048){t[i++]=192|a>>>6;t[i++]=128|a&63}else if(a<65536){t[i++]=224|a>>>12;t[i++]=128|a>>>6&63;t[i++]=128|a&63}else{t[i++]=240|a>>>18;t[i++]=128|a>>>12&63;t[i++]=128|a>>>6&63;t[i++]=128|a&63}}return t};var utf8border=function(e,t){var a;t=t||e.length;if(t>e.length){t=e.length}a=t-1;while(a>=0&&(e[a]&192)===128){a--}if(a<0){return t}if(a===0){return t}return a+s[e[a]]>t?a:t};var buf2string=function(e){var t,a,n,o;var i=e.length;var l=new Array(i*2);for(a=0,t=0;t<i;){n=e[t++];if(n<128){l[a++]=n;continue}o=s[n];if(o>4){l[a++]=65533;t+=o-1;continue}n&=o===2?31:o===3?15:7;while(o>1&&t<i){n=n<<6|e[t++]&63;o--}if(o>1){l[a++]=65533;continue}if(n<65536){l[a++]=n}else{n-=65536;l[a++]=55296|n>>10&1023;l[a++]=56320|n&1023}}if(l.length!==a){if(l.subarray){l=l.subarray(0,a)}else{l.length=a}}return r.applyFromCharCode(l)};t.utf8encode=function utf8encode(e){if(n.nodebuffer){return o.newBufferFrom(e,"utf-8")}return string2buf(e)};t.utf8decode=function utf8decode(e){if(n.nodebuffer){return r.transformTo("nodebuffer",e).toString("utf-8")}e=r.transformTo(n.uint8array?"uint8array":"array",e);return buf2string(e)};function Utf8DecodeWorker(){i.call(this,"utf-8 decode");this.leftOver=null}r.inherits(Utf8DecodeWorker,i);Utf8DecodeWorker.prototype.processChunk=function(e){var a=r.transformTo(n.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var o=a;a=new Uint8Array(o.length+this.leftOver.length);a.set(this.leftOver,0);a.set(o,this.leftOver.length)}else{a=this.leftOver.concat(a)}this.leftOver=null}var i=utf8border(a);var s=a;if(i!==a.length){if(n.uint8array){s=a.subarray(0,i);this.leftOver=a.subarray(i,a.length)}else{s=a.slice(0,i);this.leftOver=a.slice(i,a.length)}}this.push({data:t.utf8decode(s),meta:e.meta})};Utf8DecodeWorker.prototype.flush=function(){if(this.leftOver&&this.leftOver.length){this.push({data:t.utf8decode(this.leftOver),meta:{}});this.leftOver=null}};t.Utf8DecodeWorker=Utf8DecodeWorker;function Utf8EncodeWorker(){i.call(this,"utf-8 encode")}r.inherits(Utf8EncodeWorker,i);Utf8EncodeWorker.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})};t.Utf8EncodeWorker=Utf8EncodeWorker},7441:(e,t,a)=>{"use strict";var r=a(5375);var n=a(8941);var o=a(1764);var i=a(8301);a(5950);function string2binary(e){var t=null;if(r.uint8array){t=new Uint8Array(e.length)}else{t=new Array(e.length)}return stringToArrayLike(e,t)}t.newBlob=function(e,a){t.checkSupport("blob");try{return new Blob([e],{type:a})}catch(t){try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;var n=new r;n.append(e);return n.getBlob(a)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};function identity(e){return e}function stringToArrayLike(e,t){for(var a=0;a<e.length;++a){t[a]=e.charCodeAt(a)&255}return t}var s={stringifyByChunk:function(e,t,a){var r=[],n=0,o=e.length;if(o<=a){return String.fromCharCode.apply(null,e)}while(n<o){if(t==="array"||t==="nodebuffer"){r.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+a,o))))}else{r.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+a,o))))}n+=a}return r.join("")},stringifyByChar:function(e){var t="";for(var a=0;a<e.length;a++){t+=String.fromCharCode(e[a])}return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(e){return false}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch(e){return false}}()}};function arrayLikeToString(e){var a=65536,r=t.getTypeOf(e),n=true;if(r==="uint8array"){n=s.applyCanBeUsed.uint8array}else if(r==="nodebuffer"){n=s.applyCanBeUsed.nodebuffer}if(n){while(a>1){try{return s.stringifyByChunk(e,r,a)}catch(e){a=Math.floor(a/2)}}}return s.stringifyByChar(e)}t.applyFromCharCode=arrayLikeToString;function arrayLikeToArrayLike(e,t){for(var a=0;a<e.length;a++){t[a]=e[a]}return t}var l={};l["string"]={string:identity,array:function(e){return stringToArrayLike(e,new Array(e.length))},arraybuffer:function(e){return l["string"]["uint8array"](e).buffer},uint8array:function(e){return stringToArrayLike(e,new Uint8Array(e.length))},nodebuffer:function(e){return stringToArrayLike(e,o.allocBuffer(e.length))}};l["array"]={string:arrayLikeToString,array:identity,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}};l["arraybuffer"]={string:function(e){return arrayLikeToString(new Uint8Array(e))},array:function(e){return arrayLikeToArrayLike(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:identity,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}};l["uint8array"]={string:arrayLikeToString,array:function(e){return arrayLikeToArrayLike(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:identity,nodebuffer:function(e){return o.newBufferFrom(e)}};l["nodebuffer"]={string:arrayLikeToString,array:function(e){return arrayLikeToArrayLike(e,new Array(e.length))},arraybuffer:function(e){return l["nodebuffer"]["uint8array"](e).buffer},uint8array:function(e){return arrayLikeToArrayLike(e,new Uint8Array(e.length))},nodebuffer:identity};t.transformTo=function(e,a){if(!a){a=""}if(!e){return a}t.checkSupport(e);var r=t.getTypeOf(a);var n=l[r][e](a);return n};t.resolve=function(e){var t=e.split("/");var a=[];for(var r=0;r<t.length;r++){var n=t[r];if(n==="."||n===""&&r!==0&&r!==t.length-1){continue}else if(n===".."){a.pop()}else{a.push(n)}}return a.join("/")};t.getTypeOf=function(e){if(typeof e==="string"){return"string"}if(Object.prototype.toString.call(e)==="[object Array]"){return"array"}if(r.nodebuffer&&o.isBuffer(e)){return"nodebuffer"}if(r.uint8array&&e instanceof Uint8Array){return"uint8array"}if(r.arraybuffer&&e instanceof ArrayBuffer){return"arraybuffer"}};t.checkSupport=function(e){var t=r[e.toLowerCase()];if(!t){throw new Error(e+" is not supported by this platform")}};t.MAX_VALUE_16BITS=65535;t.MAX_VALUE_32BITS=-1;t.pretty=function(e){var t="",a,r;for(r=0;r<(e||"").length;r++){a=e.charCodeAt(r);t+="\\x"+(a<16?"0":"")+a.toString(16).toUpperCase()}return t};t.delay=function(e,t,a){setImmediate((function(){e.apply(a||null,t||[])}))};t.inherits=function(e,t){var Obj=function(){};Obj.prototype=t.prototype;e.prototype=new Obj};t.extend=function(){var e={},t,a;for(t=0;t<arguments.length;t++){for(a in arguments[t]){if(Object.prototype.hasOwnProperty.call(arguments[t],a)&&typeof e[a]==="undefined"){e[a]=arguments[t][a]}}}return e};t.prepareContent=function(e,a,o,s,l){var c=i.Promise.resolve(a).then((function(e){var t=r.blob&&(e instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e))!==-1);if(t&&typeof FileReader!=="undefined"){return new i.Promise((function(t,a){var r=new FileReader;r.onload=function(e){t(e.target.result)};r.onerror=function(e){a(e.target.error)};r.readAsArrayBuffer(e)}))}else{return e}}));return c.then((function(a){var r=t.getTypeOf(a);if(!r){return i.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it "+"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}if(r==="arraybuffer"){a=t.transformTo("uint8array",a)}else if(r==="string"){if(l){a=n.decode(a)}else if(o){if(s!==true){a=string2binary(a)}}}return a}))}},2747:(e,t,a)=>{"use strict";var r=a(3136);var n=a(7441);var o=a(2486);var i=a(2695);var s=a(5375);function ZipEntries(e){this.files=[];this.loadOptions=e}ZipEntries.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature "+"("+n.pretty(t)+", expected "+n.pretty(e)+")")}},isSignature:function(e,t){var a=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4);var n=r===t;this.reader.setIndex(a);return n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2);this.diskWithCentralDirStart=this.reader.readInt(2);this.centralDirRecordsOnThisDisk=this.reader.readInt(2);this.centralDirRecords=this.reader.readInt(2);this.centralDirSize=this.reader.readInt(4);this.centralDirOffset=this.reader.readInt(4);this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength);var t=s.uint8array?"uint8array":"array";var a=n.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(a)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8);this.reader.skip(4);this.diskNumber=this.reader.readInt(4);this.diskWithCentralDirStart=this.reader.readInt(4);this.centralDirRecordsOnThisDisk=this.reader.readInt(8);this.centralDirRecords=this.reader.readInt(8);this.centralDirSize=this.reader.readInt(8);this.centralDirOffset=this.reader.readInt(8);this.zip64ExtensibleData={};var e=this.zip64EndOfCentralSize-44,t=0,a,r,n;while(t<e){a=this.reader.readInt(2);r=this.reader.readInt(4);n=this.reader.readData(r);this.zip64ExtensibleData[a]={id:a,length:r,value:n}}},readBlockZip64EndOfCentralLocator:function(){this.diskWithZip64CentralDirStart=this.reader.readInt(4);this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8);this.disksCount=this.reader.readInt(4);if(this.disksCount>1){throw new Error("Multi-volumes zip are not supported")}},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++){t=this.files[e];this.reader.setIndex(t.localHeaderOffset);this.checkSignature(o.LOCAL_FILE_HEADER);t.readLocalPart(this.reader);t.handleUTF8();t.processAttributes()}},readCentralDir:function(){var e;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER)){e=new i({zip64:this.zip64},this.loadOptions);e.readCentralPart(this.reader);this.files.push(e)}if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0){throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}else{}}},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,o.LOCAL_FILE_HEADER);if(t){throw new Error("Can't find end of central directory : is this a zip file ? "+"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html")}else{throw new Error("Corrupted zip: can't find end of central directory")}}this.reader.setIndex(e);var a=e;this.checkSignature(o.CENTRAL_DIRECTORY_END);this.readBlockEndOfCentral();if(this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){this.zip64=true;e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR);if(e<0){throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator")}this.reader.setIndex(e);this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR);this.readBlockZip64EndOfCentralLocator();if(!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)){this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END);if(this.relativeOffsetEndOfZip64CentralDir<0){throw new Error("Corrupted zip: can't find the ZIP64 end of central directory")}}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END);this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;if(this.zip64){r+=20;r+=12+this.zip64EndOfCentralSize}var i=a-r;if(i>0){if(this.isSignature(a,o.CENTRAL_FILE_HEADER)){}else{this.reader.zero=i}}else if(i<0){throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")}},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e);this.readEndOfCentral();this.readCentralDir();this.readLocalFiles()}};e.exports=ZipEntries},2695:(e,t,a)=>{"use strict";var r=a(3136);var n=a(7441);var o=a(8368);var i=a(1243);var s=a(885);var l=a(5605);var c=a(5375);var A=0;var d=3;var findCompression=function(e){for(var t in l){if(!Object.prototype.hasOwnProperty.call(l,t)){continue}if(l[t].magic===e){return l[t]}}return null};function ZipEntry(e,t){this.options=e;this.loadOptions=t}ZipEntry.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,a;e.skip(22);this.fileNameLength=e.readInt(2);a=e.readInt(2);this.fileName=e.readData(this.fileNameLength);e.skip(a);if(this.compressedSize===-1||this.uncompressedSize===-1){throw new Error("Bug or corrupted zip : didn't get enough information from the central directory "+"(compressedSize === -1 || uncompressedSize === -1)")}t=findCompression(this.compressionMethod);if(t===null){throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")")}this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2);e.skip(2);this.bitFlag=e.readInt(2);this.compressionMethod=e.readString(2);this.date=e.readDate();this.crc32=e.readInt(4);this.compressedSize=e.readInt(4);this.uncompressedSize=e.readInt(4);var t=e.readInt(2);this.extraFieldsLength=e.readInt(2);this.fileCommentLength=e.readInt(2);this.diskNumberStart=e.readInt(2);this.internalFileAttributes=e.readInt(2);this.externalFileAttributes=e.readInt(4);this.localHeaderOffset=e.readInt(4);if(this.isEncrypted()){throw new Error("Encrypted zip are not supported")}e.skip(t);this.readExtraFields(e);this.parseZIP64ExtraField(e);this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null;this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=this.externalFileAttributes&16?true:false;if(e===A){this.dosPermissions=this.externalFileAttributes&63}if(e===d){this.unixPermissions=this.externalFileAttributes>>16&65535}if(!this.dir&&this.fileNameStr.slice(-1)==="/"){this.dir=true}},parseZIP64ExtraField:function(){if(!this.extraFields[1]){return}var e=r(this.extraFields[1].value);if(this.uncompressedSize===n.MAX_VALUE_32BITS){this.uncompressedSize=e.readInt(8)}if(this.compressedSize===n.MAX_VALUE_32BITS){this.compressedSize=e.readInt(8)}if(this.localHeaderOffset===n.MAX_VALUE_32BITS){this.localHeaderOffset=e.readInt(8)}if(this.diskNumberStart===n.MAX_VALUE_32BITS){this.diskNumberStart=e.readInt(4)}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,a,r,n;if(!this.extraFields){this.extraFields={}}while(e.index+4<t){a=e.readInt(2);r=e.readInt(2);n=e.readData(r);this.extraFields[a]={id:a,length:r,value:n}}e.setIndex(t)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8()){this.fileNameStr=s.utf8decode(this.fileName);this.fileCommentStr=s.utf8decode(this.fileComment)}else{var t=this.findExtraFieldUnicodePath();if(t!==null){this.fileNameStr=t}else{var a=n.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(a)}var r=this.findExtraFieldUnicodeComment();if(r!==null){this.fileCommentStr=r}else{var o=n.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);if(t.readInt(1)!==1){return null}if(i(this.fileName)!==t.readInt(4)){return null}return s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);if(t.readInt(1)!==1){return null}if(i(this.fileComment)!==t.readInt(4)){return null}return s.utf8decode(t.readData(e.length-5))}return null}};e.exports=ZipEntry},7648:(e,t,a)=>{"use strict";var r=a(7933);var n=a(7623);var o=a(885);var i=a(8368);var s=a(270);var ZipObject=function(e,t,a){this.name=e;this.dir=a.dir;this.date=a.date;this.comment=a.comment;this.unixPermissions=a.unixPermissions;this.dosPermissions=a.dosPermissions;this._data=t;this._dataBinary=a.binary;this.options={compression:a.compression,compressionOptions:a.compressionOptions}};ZipObject.prototype={internalStream:function(e){var t=null,a="string";try{if(!e){throw new Error("No output type specified.")}a=e.toLowerCase();var n=a==="string"||a==="text";if(a==="binarystring"||a==="text"){a="string"}t=this._decompressWorker();var i=!this._dataBinary;if(i&&!n){t=t.pipe(new o.Utf8EncodeWorker)}if(!i&&n){t=t.pipe(new o.Utf8DecodeWorker)}}catch(e){t=new s("error");t.error(e)}return new r(t,a,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof i&&this._data.compression.magic===e.magic){return this._data.getCompressedWorker()}else{var a=this._decompressWorker();if(!this._dataBinary){a=a.pipe(new o.Utf8EncodeWorker)}return i.createWorkerFrom(a,e,t)}},_decompressWorker:function(){if(this._data instanceof i){return this._data.getContentWorker()}else if(this._data instanceof s){return this._data}else{return new n(this._data)}}};var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"];var removedFn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(var c=0;c<l.length;c++){ZipObject.prototype[l[c]]=removedFn}e.exports=ZipObject},7029:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},7499:(e,t,a)=>{"use strict";var r=a(6246);var n=Object.keys||function(e){var t=[];for(var a in e){t.push(a)}return t};e.exports=Duplex;var o=Object.create(a(47));o.inherits=a(4244);var i=a(953);var s=a(3305);o.inherits(Duplex,i);{var l=n(s.prototype);for(var c=0;c<l.length;c++){var A=l[c];if(!Duplex.prototype[A])Duplex.prototype[A]=s.prototype[A]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);i.call(this,e);s.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;r.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}});Duplex.prototype._destroy=function(e,t){this.push(null);this.end();r.nextTick(t,e)}},8567:(e,t,a)=>{"use strict";e.exports=PassThrough;var r=a(2557);var n=Object.create(a(47));n.inherits=a(4244);n.inherits(PassThrough,r);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);r.call(this,e)}PassThrough.prototype._transform=function(e,t,a){a(null,e)}},953:(e,t,a)=>{"use strict";var r=a(6246);e.exports=Readable;var n=a(7029);var o;Readable.ReadableState=ReadableState;var i=a(4434).EventEmitter;var EElistenerCount=function(e,t){return e.listeners(t).length};var s=a(4503);var l=a(1742).Buffer;var c=(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof c}var A=Object.create(a(47));A.inherits=a(4244);var d=a(9023);var p=void 0;if(d&&d.debuglog){p=d.debuglog("stream")}else{p=function(){}}var u=a(4673);var f=a(9269);var h;A.inherits(Readable,s);var m=["error","close","destroy","pause","resume"];function prependListener(e,t,a){if(typeof e.prependListener==="function")return e.prependListener(t,a);if(!e._events||!e._events[t])e.on(t,a);else if(n(e._events[t]))e._events[t].unshift(a);else e._events[t]=[a,e._events[t]]}function ReadableState(e,t){o=o||a(7499);e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode;if(r)this.objectMode=this.objectMode||!!e.readableObjectMode;var n=e.highWaterMark;var i=e.readableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(r&&(i||i===0))this.highWaterMark=i;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new u;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!h)h=a(6374).I;this.decoder=new h(e.encoding);this.encoding=e.encoding}}function Readable(e){o=o||a(7499);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}s.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=f.destroy;Readable.prototype._undestroy=f.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var a=this._readableState;var r;if(!a.objectMode){if(typeof e==="string"){t=t||a.defaultEncoding;if(t!==a.encoding){e=l.from(e,t);t=""}r=true}}else{r=true}return readableAddChunk(this,e,t,false,r)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,a,r,n){var o=e._readableState;if(t===null){o.reading=false;onEofChunk(e,o)}else{var i;if(!n)i=chunkInvalid(o,t);if(i){e.emit("error",i)}else if(o.objectMode||t&&t.length>0){if(typeof t!=="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(r){if(o.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,o,t,true)}else if(o.ended){e.emit("error",new Error("stream.push() after EOF"))}else{o.reading=false;if(o.decoder&&!a){t=o.decoder.write(t);if(o.objectMode||t.length!==0)addChunk(e,o,t,false);else maybeReadMore(e,o)}else{addChunk(e,o,t,false)}}}else if(!r){o.reading=false}}return needMoreData(o)}function addChunk(e,t,a,r){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",a);e.read(0)}else{t.length+=t.objectMode?1:a.length;if(r)t.buffer.unshift(a);else t.buffer.push(a);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var a;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){a=new TypeError("Invalid non-string/buffer chunk")}return a}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!h)h=a(6374).I;this._readableState.decoder=new h(e);this._readableState.encoding=e;return this};var g=8388608;function computeNewHighWaterMark(e){if(e>=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){p("read",e);e=parseInt(e,10);var t=this._readableState;var a=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){p("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var r=t.needReadable;p("need readable",r);if(t.length===0||t.length-e<t.highWaterMark){r=true;p("length less than watermark",r)}if(t.ended||t.reading){r=false;p("reading or ended",r)}else if(r){p("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(a,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(a!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var a=t.decoder.end();if(a&&a.length){t.buffer.push(a);t.length+=t.objectMode?1:a.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){p("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)r.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){p("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;r.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var a=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){p("maybeReadMore read 0");e.read(0);if(a===t.length)break;else a=t.length}t.readingMore=false}Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(e,t){var a=this;var n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1;p("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var i=o?onend:unpipe;if(n.endEmitted)r.nextTick(i);else a.once("end",i);e.on("unpipe",onunpipe);function onunpipe(e,t){p("onunpipe");if(e===a){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){p("onend");e.end()}var s=pipeOnDrain(a);e.on("drain",s);var l=false;function cleanup(){p("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",s);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);a.removeListener("end",onend);a.removeListener("end",unpipe);a.removeListener("data",ondata);l=true;if(n.awaitDrain&&(!e._writableState||e._writableState.needDrain))s()}var c=false;a.on("data",ondata);function ondata(t){p("ondata");c=false;var r=e.write(t);if(false===r&&!c){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&indexOf(n.pipes,e)!==-1)&&!l){p("false write response, pause",n.awaitDrain);n.awaitDrain++;c=true}a.pause()}}function onerror(t){p("onerror",t);unpipe();e.removeListener("error",onerror);if(EElistenerCount(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){p("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){p("unpipe");a.unpipe(e)}e.emit("pipe",a);if(!n.flowing){p("pipe resume");a.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&EElistenerCount(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var a={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,a);return this}if(!e){var r=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var o=0;o<n;o++){r[o].emit("unpipe",this,{hasUnpiped:false})}return this}var i=indexOf(t.pipes,e);if(i===-1)return this;t.pipes.splice(i,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,a);return this};Readable.prototype.on=function(e,t){var a=s.prototype.on.call(this,e,t);if(e==="data"){if(this._readableState.flowing!==false)this.resume()}else if(e==="readable"){var n=this._readableState;if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.emittedReadable=false;if(!n.reading){r.nextTick(nReadingNextTick,this)}else if(n.length){emitReadable(this)}}}return a};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(e){p("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){p("resume");e.flowing=true;resume(this,e)}return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;r.nextTick(resume_,e,t)}}function resume_(e,t){if(!t.reading){p("resume read 0");e.read(0)}t.resumeScheduled=false;t.awaitDrain=0;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){p("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){p("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(e){var t=e._readableState;p("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var a=this._readableState;var r=false;e.on("end",(function(){p("wrapped end");if(a.decoder&&!a.ended){var e=a.decoder.end();if(e&&e.length)t.push(e)}t.push(null)}));e.on("data",(function(n){p("wrapped data");if(a.decoder)n=a.decoder.write(n);if(a.objectMode&&(n===null||n===undefined))return;else if(!a.objectMode&&(!n||!n.length))return;var o=t.push(n);if(!o){r=true;e.pause()}}));for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n)}}for(var o=0;o<m.length;o++){e.on(m[o],this.emit.bind(this,m[o]))}this._read=function(t){p("wrapped _read",t);if(r){r=false;e.resume()}};return this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(e,t){if(t.length===0)return null;var a;if(t.objectMode)a=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)a=t.buffer.join("");else if(t.buffer.length===1)a=t.buffer.head.data;else a=t.buffer.concat(t.length);t.buffer.clear()}else{a=fromListPartial(e,t.buffer,t.decoder)}return a}function fromListPartial(e,t,a){var r;if(e<t.head.data.length){r=t.head.data.slice(0,e);t.head.data=t.head.data.slice(e)}else if(e===t.head.data.length){r=t.shift()}else{r=a?copyFromBufferString(e,t):copyFromBuffer(e,t)}return r}function copyFromBufferString(e,t){var a=t.head;var r=1;var n=a.data;e-=n.length;while(a=a.next){var o=a.data;var i=e>o.length?o.length:e;if(i===o.length)n+=o;else n+=o.slice(0,e);e-=i;if(e===0){if(i===o.length){++r;if(a.next)t.head=a.next;else t.head=t.tail=null}else{t.head=a;a.data=o.slice(i)}break}++r}t.length-=r;return n}function copyFromBuffer(e,t){var a=l.allocUnsafe(e);var r=t.head;var n=1;r.data.copy(a);e-=r.data.length;while(r=r.next){var o=r.data;var i=e>o.length?o.length:e;o.copy(a,a.length-e,0,i);e-=i;if(e===0){if(i===o.length){++n;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=o.slice(i)}break}++n}t.length-=n;return a}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;r.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var a=0,r=e.length;a<r;a++){if(e[a]===t)return a}return-1}},2557:(e,t,a)=>{"use strict";e.exports=Transform;var r=a(7499);var n=Object.create(a(47));n.inherits=a(4244);n.inherits(Transform,r);function afterTransform(e,t){var a=this._transformState;a.transforming=false;var r=a.writecb;if(!r){return this.emit("error",new Error("write callback called multiple times"))}a.writechunk=null;a.writecb=null;if(t!=null)this.push(t);r(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);r.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"){this._flush((function(t,a){done(e,t,a)}))}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return r.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,a){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(e,t,a){var r=this._transformState;r.writecb=a;r.writechunk=e;r.writeencoding=t;if(!r.transforming){var n=this._readableState;if(r.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&t.writecb&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){var a=this;r.prototype._destroy.call(this,e,(function(e){t(e);a.emit("close")}))};function done(e,t,a){if(t)return e.emit("error",t);if(a!=null)e.push(a);if(e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}},3305:(e,t,a)=>{"use strict";var r=a(6246);e.exports=Writable;function WriteReq(e,t,a){this.chunk=e;this.encoding=t;this.callback=a;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:r.nextTick;var o;Writable.WritableState=WritableState;var i=Object.create(a(47));i.inherits=a(4244);var s={deprecate:a(8430)};var l=a(4503);var c=a(1742).Buffer;var A=(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(e){return c.from(e)}function _isUint8Array(e){return c.isBuffer(e)||e instanceof A}var d=a(9269);i.inherits(Writable,l);function nop(){}function WritableState(e,t){o=o||a(7499);e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode;if(r)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var i=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(r&&(i||i===0))this.highWaterMark=i;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var l=e.decodeStrings===false;this.decodeStrings=!l;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var p;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){p=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(p.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{p=function(e){return e instanceof this}}function Writable(e){o=o||a(7499);if(!p.call(Writable,this)&&!(this instanceof o)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}l.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var a=new Error("write after end");e.emit("error",a);r.nextTick(t,a)}function validChunk(e,t,a,n){var o=true;var i=false;if(a===null){i=new TypeError("May not write null values to stream")}else if(typeof a!=="string"&&a!==undefined&&!t.objectMode){i=new TypeError("Invalid non-string/buffer chunk")}if(i){e.emit("error",i);r.nextTick(n,i);o=false}return o}Writable.prototype.write=function(e,t,a){var r=this._writableState;var n=false;var o=!r.objectMode&&_isUint8Array(e);if(o&&!c.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){a=t;t=null}if(o)t="buffer";else if(!t)t=r.defaultEncoding;if(typeof a!=="function")a=nop;if(r.ended)writeAfterEnd(this,a);else if(o||validChunk(this,r,e,a)){r.pendingcb++;n=writeOrBuffer(this,r,o,e,t,a)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,a){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=c.from(t,a)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,a,r,n,o){if(!a){var i=decodeChunk(t,r,n);if(r!==i){a=true;n="buffer";r=i}}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(!l)t.needDrain=true;if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:a,callback:o,next:null};if(c){c.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,s,r,n,o)}return l}function doWrite(e,t,a,r,n,o,i){t.writelen=r;t.writecb=i;t.writing=true;t.sync=true;if(a)e._writev(n,t.onwrite);else e._write(n,o,t.onwrite);t.sync=false}function onwriteError(e,t,a,n,o){--t.pendingcb;if(a){r.nextTick(o,n);r.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;e.emit("error",n)}else{o(n);e._writableState.errorEmitted=true;e.emit("error",n);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var a=e._writableState;var r=a.sync;var o=a.writecb;onwriteStateUpdate(a);if(t)onwriteError(e,a,r,t,o);else{var i=needFinish(a);if(!i&&!a.corked&&!a.bufferProcessing&&a.bufferedRequest){clearBuffer(e,a)}if(r){n(afterWrite,e,a,i,o)}else{afterWrite(e,a,i,o)}}}function afterWrite(e,t,a,r){if(!a)onwriteDrain(e,t);t.pendingcb--;r();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var a=t.bufferedRequest;if(e._writev&&a&&a.next){var r=t.bufferedRequestCount;var n=new Array(r);var o=t.corkedRequestsFree;o.entry=a;var i=0;var s=true;while(a){n[i]=a;if(!a.isBuf)s=false;a=a.next;i+=1}n.allBuffers=s;doWrite(e,t,true,t.length,n,"",o.finish);t.pendingcb++;t.lastBufferedRequest=null;if(o.next){t.corkedRequestsFree=o.next;o.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(a){var l=a.chunk;var c=a.encoding;var A=a.callback;var d=t.objectMode?1:l.length;doWrite(e,t,false,d,l,c,A);a=a.next;t.bufferedRequestCount--;if(t.writing){break}}if(a===null)t.lastBufferedRequest=null}t.bufferedRequest=a;t.bufferProcessing=false}Writable.prototype._write=function(e,t,a){a(new Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,a){var r=this._writableState;if(typeof e==="function"){a=e;e=null;t=null}else if(typeof t==="function"){a=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(r.corked){r.corked=1;this.uncork()}if(!r.ending)endWritable(this,r,a)};function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final((function(a){t.pendingcb--;if(a){e.emit("error",a)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)}))}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"){t.pendingcb++;t.finalCalled=true;r.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var a=needFinish(t);if(a){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish")}}return a}function endWritable(e,t,a){t.ending=true;finishMaybe(e,t);if(a){if(t.finished)r.nextTick(a);else e.once("finish",a)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,a){var r=e.entry;e.entry=null;while(r){var n=r.callback;t.pendingcb--;n(a);r=r.next}t.corkedRequestsFree.next=e}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=d.destroy;Writable.prototype._undestroy=d.undestroy;Writable.prototype._destroy=function(e,t){this.end();t(e)}},4673:(e,t,a)=>{"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var r=a(1742).Buffer;var n=a(9023);function copyBuffer(e,t,a){e.copy(t,a)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var a=""+t.data;while(t=t.next){a+=e+t.data}return a};BufferList.prototype.concat=function concat(e){if(this.length===0)return r.alloc(0);var t=r.allocUnsafe(e>>>0);var a=this.head;var n=0;while(a){copyBuffer(a.data,t,n);n+=a.data.length;a=a.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},9269:(e,t,a)=>{"use strict";var r=a(6246);function destroy(e,t){var a=this;var n=this._readableState&&this._readableState.destroyed;var o=this._writableState&&this._writableState.destroyed;if(n||o){if(t){t(e)}else if(e){if(!this._writableState){r.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;r.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){if(!a._writableState){r.nextTick(emitErrorNT,a,e)}else if(!a._writableState.errorEmitted){a._writableState.errorEmitted=true;r.nextTick(emitErrorNT,a,e)}}else if(t){t(e)}}));return this}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy}},4503:(e,t,a)=>{e.exports=a(2203)},5783:(e,t,a)=>{var r=a(2203);if(process.env.READABLE_STREAM==="disable"&&r){e.exports=r;t=e.exports=r.Readable;t.Readable=r.Readable;t.Writable=r.Writable;t.Duplex=r.Duplex;t.Transform=r.Transform;t.PassThrough=r.PassThrough;t.Stream=r}else{t=e.exports=a(953);t.Stream=r||t;t.Readable=t;t.Writable=a(3305);t.Duplex=a(7499);t.Transform=a(2557);t.PassThrough=a(8567)}},1742:(e,t,a)=>{var r=a(181);var n=r.Buffer;function copyProps(e,t){for(var a in e){t[a]=e[a]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=r}else{copyProps(r,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,a){return n(e,t,a)}copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,a){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,a)};SafeBuffer.alloc=function(e,t,a){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var r=n(e);if(t!==undefined){if(typeof a==="string"){r.fill(t,a)}else{r.fill(t)}}else{r.fill(0)}return r};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return r.SlowBuffer(e)}},6374:(e,t,a)=>{"use strict";var r=a(1742).Buffer;var n=r.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.I=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=r.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var a;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";a=this.lastNeed;this.lastNeed=0}else{a=0}if(a<e.length)return t?t+this.text(e,a):this.text(e,a);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,a){var r=t.length-1;if(r<a)return 0;var n=utf8CheckByte(t[r]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--r<a||n===-2)return 0;n=utf8CheckByte(t[r]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--r<a||n===-2)return 0;n=utf8CheckByte(t[r]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,a){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var a=utf8CheckExtraBytes(this,e,t);if(a!==undefined)return a;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var a=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=a;var r=e.length-(a-this.lastNeed);e.copy(this.lastChar,0,r);return e.toString("utf8",t,r)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var a=e.toString("utf16le",t);if(a){var r=a.charCodeAt(a.length-1);if(r>=55296&&r<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return a.slice(0,-1)}}return a}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var a=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,a)}return t}function base64Text(e,t){var a=(e.length-t)%3;if(a===0)return e.toString("base64",t);this.lastNeed=3-a;this.lastTotal=3;if(a===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-a)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},8924:(e,t,a)=>{"use strict";var r=a(4603);function INTERNAL(){}var n={};var o=["REJECTED"];var i=["FULFILLED"];var s=["PENDING"];if(!process.browser){var l=["UNHANDLED"]}e.exports=Promise;function Promise(e){if(typeof e!=="function"){throw new TypeError("resolver must be a function")}this.state=s;this.queue=[];this.outcome=void 0;if(!process.browser){this.handled=l}if(e!==INTERNAL){safelyResolveThenable(this,e)}}Promise.prototype.finally=function(e){if(typeof e!=="function"){return this}var t=this.constructor;return this.then(resolve,reject);function resolve(a){function yes(){return a}return t.resolve(e()).then(yes)}function reject(a){function no(){throw a}return t.resolve(e()).then(no)}};Promise.prototype.catch=function(e){return this.then(null,e)};Promise.prototype.then=function(e,t){if(typeof e!=="function"&&this.state===i||typeof t!=="function"&&this.state===o){return this}var a=new this.constructor(INTERNAL);if(!process.browser){if(this.handled===l){this.handled=null}}if(this.state!==s){var r=this.state===i?e:t;unwrap(a,r,this.outcome)}else{this.queue.push(new QueueItem(a,e,t))}return a};function QueueItem(e,t,a){this.promise=e;if(typeof t==="function"){this.onFulfilled=t;this.callFulfilled=this.otherCallFulfilled}if(typeof a==="function"){this.onRejected=a;this.callRejected=this.otherCallRejected}}QueueItem.prototype.callFulfilled=function(e){n.resolve(this.promise,e)};QueueItem.prototype.otherCallFulfilled=function(e){unwrap(this.promise,this.onFulfilled,e)};QueueItem.prototype.callRejected=function(e){n.reject(this.promise,e)};QueueItem.prototype.otherCallRejected=function(e){unwrap(this.promise,this.onRejected,e)};function unwrap(e,t,a){r((function(){var r;try{r=t(a)}catch(t){return n.reject(e,t)}if(r===e){n.reject(e,new TypeError("Cannot resolve promise with itself"))}else{n.resolve(e,r)}}))}n.resolve=function(e,t){var a=tryCatch(getThen,t);if(a.status==="error"){return n.reject(e,a.value)}var r=a.value;if(r){safelyResolveThenable(e,r)}else{e.state=i;e.outcome=t;var o=-1;var s=e.queue.length;while(++o<s){e.queue[o].callFulfilled(t)}}return e};n.reject=function(e,t){e.state=o;e.outcome=t;if(!process.browser){if(e.handled===l){r((function(){if(e.handled===l){process.emit("unhandledRejection",t,e)}}))}}var a=-1;var n=e.queue.length;while(++a<n){e.queue[a].callRejected(t)}return e};function getThen(e){var t=e&&e.then;if(e&&(typeof e==="object"||typeof e==="function")&&typeof t==="function"){return function appyThen(){t.apply(e,arguments)}}}function safelyResolveThenable(e,t){var a=false;function onError(t){if(a){return}a=true;n.reject(e,t)}function onSuccess(t){if(a){return}a=true;n.resolve(e,t)}function tryToUnwrap(){t(onSuccess,onError)}var r=tryCatch(tryToUnwrap);if(r.status==="error"){onError(r.value)}}function tryCatch(e,t){var a={};try{a.value=e(t);a.status="success"}catch(e){a.status="error";a.value=e}return a}Promise.resolve=resolve;function resolve(e){if(e instanceof this){return e}return n.resolve(new this(INTERNAL),e)}Promise.reject=reject;function reject(e){var t=new this(INTERNAL);return n.reject(t,e)}Promise.all=all;function all(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]"){return this.reject(new TypeError("must be an array"))}var a=e.length;var r=false;if(!a){return this.resolve([])}var o=new Array(a);var i=0;var s=-1;var l=new this(INTERNAL);while(++s<a){allResolver(e[s],s)}return l;function allResolver(e,s){t.resolve(e).then(resolveFromAll,(function(e){if(!r){r=true;n.reject(l,e)}}));function resolveFromAll(e){o[s]=e;if(++i===a&&!r){r=true;n.resolve(l,o)}}}}Promise.race=race;function race(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]"){return this.reject(new TypeError("must be an array"))}var a=e.length;var r=false;if(!a){return this.resolve([])}var o=-1;var i=new this(INTERNAL);while(++o<a){resolver(e[o])}return i;function resolver(e){t.resolve(e).then((function(e){if(!r){r=true;n.resolve(i,e)}}),(function(e){if(!r){r=true;n.reject(i,e)}}))}}},7375:(e,t,a)=>{"use strict";var r=a(7424).assign;var n=a(860);var o=a(2368);var i=a(1952);var s={};r(s,n,o,i);e.exports=s},860:(e,t,a)=>{"use strict";var r=a(4622);var n=a(7424);var o=a(8447);var i=a(8737);var s=a(2239);var l=Object.prototype.toString;var c=0;var A=4;var d=0;var p=1;var u=2;var f=-1;var h=0;var m=8;function Deflate(e){if(!(this instanceof Deflate))return new Deflate(e);this.options=n.assign({level:f,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},e||{});var t=this.options;if(t.raw&&t.windowBits>0){t.windowBits=-t.windowBits}else if(t.gzip&&t.windowBits>0&&t.windowBits<16){t.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new s;this.strm.avail_out=0;var a=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(a!==d){throw new Error(i[a])}if(t.header){r.deflateSetHeader(this.strm,t.header)}if(t.dictionary){var c;if(typeof t.dictionary==="string"){c=o.string2buf(t.dictionary)}else if(l.call(t.dictionary)==="[object ArrayBuffer]"){c=new Uint8Array(t.dictionary)}else{c=t.dictionary}a=r.deflateSetDictionary(this.strm,c);if(a!==d){throw new Error(i[a])}this._dict_set=true}}Deflate.prototype.push=function(e,t){var a=this.strm;var i=this.options.chunkSize;var s,f;if(this.ended){return false}f=t===~~t?t:t===true?A:c;if(typeof e==="string"){a.input=o.string2buf(e)}else if(l.call(e)==="[object ArrayBuffer]"){a.input=new Uint8Array(e)}else{a.input=e}a.next_in=0;a.avail_in=a.input.length;do{if(a.avail_out===0){a.output=new n.Buf8(i);a.next_out=0;a.avail_out=i}s=r.deflate(a,f);if(s!==p&&s!==d){this.onEnd(s);this.ended=true;return false}if(a.avail_out===0||a.avail_in===0&&(f===A||f===u)){if(this.options.to==="string"){this.onData(o.buf2binstring(n.shrinkBuf(a.output,a.next_out)))}else{this.onData(n.shrinkBuf(a.output,a.next_out))}}}while((a.avail_in>0||a.avail_out===0)&&s!==p);if(f===A){s=r.deflateEnd(this.strm);this.onEnd(s);this.ended=true;return s===d}if(f===u){this.onEnd(d);a.avail_out=0;return true}return true};Deflate.prototype.onData=function(e){this.chunks.push(e)};Deflate.prototype.onEnd=function(e){if(e===d){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=n.flattenChunks(this.chunks)}}this.chunks=[];this.err=e;this.msg=this.strm.msg};function deflate(e,t){var a=new Deflate(t);a.push(e,true);if(a.err){throw a.msg||i[a.err]}return a.result}function deflateRaw(e,t){t=t||{};t.raw=true;return deflate(e,t)}function gzip(e,t){t=t||{};t.gzip=true;return deflate(e,t)}t.Deflate=Deflate;t.deflate=deflate;t.deflateRaw=deflateRaw;t.gzip=gzip},2368:(e,t,a)=>{"use strict";var r=a(5518);var n=a(7424);var o=a(8447);var i=a(1952);var s=a(8737);var l=a(2239);var c=a(1321);var A=Object.prototype.toString;function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;if(t.raw&&t.windowBits>=0&&t.windowBits<16){t.windowBits=-t.windowBits;if(t.windowBits===0){t.windowBits=-15}}if(t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)){t.windowBits+=32}if(t.windowBits>15&&t.windowBits<48){if((t.windowBits&15)===0){t.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new l;this.strm.avail_out=0;var a=r.inflateInit2(this.strm,t.windowBits);if(a!==i.Z_OK){throw new Error(s[a])}this.header=new c;r.inflateGetHeader(this.strm,this.header);if(t.dictionary){if(typeof t.dictionary==="string"){t.dictionary=o.string2buf(t.dictionary)}else if(A.call(t.dictionary)==="[object ArrayBuffer]"){t.dictionary=new Uint8Array(t.dictionary)}if(t.raw){a=r.inflateSetDictionary(this.strm,t.dictionary);if(a!==i.Z_OK){throw new Error(s[a])}}}}Inflate.prototype.push=function(e,t){var a=this.strm;var s=this.options.chunkSize;var l=this.options.dictionary;var c,d;var p,u,f;var h=false;if(this.ended){return false}d=t===~~t?t:t===true?i.Z_FINISH:i.Z_NO_FLUSH;if(typeof e==="string"){a.input=o.binstring2buf(e)}else if(A.call(e)==="[object ArrayBuffer]"){a.input=new Uint8Array(e)}else{a.input=e}a.next_in=0;a.avail_in=a.input.length;do{if(a.avail_out===0){a.output=new n.Buf8(s);a.next_out=0;a.avail_out=s}c=r.inflate(a,i.Z_NO_FLUSH);if(c===i.Z_NEED_DICT&&l){c=r.inflateSetDictionary(this.strm,l)}if(c===i.Z_BUF_ERROR&&h===true){c=i.Z_OK;h=false}if(c!==i.Z_STREAM_END&&c!==i.Z_OK){this.onEnd(c);this.ended=true;return false}if(a.next_out){if(a.avail_out===0||c===i.Z_STREAM_END||a.avail_in===0&&(d===i.Z_FINISH||d===i.Z_SYNC_FLUSH)){if(this.options.to==="string"){p=o.utf8border(a.output,a.next_out);u=a.next_out-p;f=o.buf2string(a.output,p);a.next_out=u;a.avail_out=s-u;if(u){n.arraySet(a.output,a.output,p,u,0)}this.onData(f)}else{this.onData(n.shrinkBuf(a.output,a.next_out))}}}if(a.avail_in===0&&a.avail_out===0){h=true}}while((a.avail_in>0||a.avail_out===0)&&c!==i.Z_STREAM_END);if(c===i.Z_STREAM_END){d=i.Z_FINISH}if(d===i.Z_FINISH){c=r.inflateEnd(this.strm);this.onEnd(c);this.ended=true;return c===i.Z_OK}if(d===i.Z_SYNC_FLUSH){this.onEnd(i.Z_OK);a.avail_out=0;return true}return true};Inflate.prototype.onData=function(e){this.chunks.push(e)};Inflate.prototype.onEnd=function(e){if(e===i.Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=n.flattenChunks(this.chunks)}}this.chunks=[];this.err=e;this.msg=this.strm.msg};function inflate(e,t){var a=new Inflate(t);a.push(e,true);if(a.err){throw a.msg||s[a.err]}return a.result}function inflateRaw(e,t){t=t||{};t.raw=true;return inflate(e,t)}t.Inflate=Inflate;t.inflate=inflate;t.inflateRaw=inflateRaw;t.ungzip=inflate},7424:(e,t)=>{"use strict";var a=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";function _has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);while(t.length){var a=t.shift();if(!a){continue}if(typeof a!=="object"){throw new TypeError(a+"must be non-object")}for(var r in a){if(_has(a,r)){e[r]=a[r]}}}return e};t.shrinkBuf=function(e,t){if(e.length===t){return e}if(e.subarray){return e.subarray(0,t)}e.length=t;return e};var r={arraySet:function(e,t,a,r,n){if(t.subarray&&e.subarray){e.set(t.subarray(a,a+r),n);return}for(var o=0;o<r;o++){e[n+o]=t[a+o]}},flattenChunks:function(e){var t,a,r,n,o,i;r=0;for(t=0,a=e.length;t<a;t++){r+=e[t].length}i=new Uint8Array(r);n=0;for(t=0,a=e.length;t<a;t++){o=e[t];i.set(o,n);n+=o.length}return i}};var n={arraySet:function(e,t,a,r,n){for(var o=0;o<r;o++){e[n+o]=t[a+o]}},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){if(e){t.Buf8=Uint8Array;t.Buf16=Uint16Array;t.Buf32=Int32Array;t.assign(t,r)}else{t.Buf8=Array;t.Buf16=Array;t.Buf32=Array;t.assign(t,n)}};t.setTyped(a)},8447:(e,t,a)=>{"use strict";var r=a(7424);var n=true;var o=true;try{String.fromCharCode.apply(null,[0])}catch(e){n=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=false}var i=new r.Buf8(256);for(var s=0;s<256;s++){i[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1}i[254]=i[254]=1;t.string2buf=function(e){var t,a,n,o,i,s=e.length,l=0;for(o=0;o<s;o++){a=e.charCodeAt(o);if((a&64512)===55296&&o+1<s){n=e.charCodeAt(o+1);if((n&64512)===56320){a=65536+(a-55296<<10)+(n-56320);o++}}l+=a<128?1:a<2048?2:a<65536?3:4}t=new r.Buf8(l);for(i=0,o=0;i<l;o++){a=e.charCodeAt(o);if((a&64512)===55296&&o+1<s){n=e.charCodeAt(o+1);if((n&64512)===56320){a=65536+(a-55296<<10)+(n-56320);o++}}if(a<128){t[i++]=a}else if(a<2048){t[i++]=192|a>>>6;t[i++]=128|a&63}else if(a<65536){t[i++]=224|a>>>12;t[i++]=128|a>>>6&63;t[i++]=128|a&63}else{t[i++]=240|a>>>18;t[i++]=128|a>>>12&63;t[i++]=128|a>>>6&63;t[i++]=128|a&63}}return t};function buf2binstring(e,t){if(t<65534){if(e.subarray&&o||!e.subarray&&n){return String.fromCharCode.apply(null,r.shrinkBuf(e,t))}}var a="";for(var i=0;i<t;i++){a+=String.fromCharCode(e[i])}return a}t.buf2binstring=function(e){return buf2binstring(e,e.length)};t.binstring2buf=function(e){var t=new r.Buf8(e.length);for(var a=0,n=t.length;a<n;a++){t[a]=e.charCodeAt(a)}return t};t.buf2string=function(e,t){var a,r,n,o;var s=t||e.length;var l=new Array(s*2);for(r=0,a=0;a<s;){n=e[a++];if(n<128){l[r++]=n;continue}o=i[n];if(o>4){l[r++]=65533;a+=o-1;continue}n&=o===2?31:o===3?15:7;while(o>1&&a<s){n=n<<6|e[a++]&63;o--}if(o>1){l[r++]=65533;continue}if(n<65536){l[r++]=n}else{n-=65536;l[r++]=55296|n>>10&1023;l[r++]=56320|n&1023}}return buf2binstring(l,r)};t.utf8border=function(e,t){var a;t=t||e.length;if(t>e.length){t=e.length}a=t-1;while(a>=0&&(e[a]&192)===128){a--}if(a<0){return t}if(a===0){return t}return a+i[e[a]]>t?a:t}},9624:e=>{"use strict";function adler32(e,t,a,r){var n=e&65535|0,o=e>>>16&65535|0,i=0;while(a!==0){i=a>2e3?2e3:a;a-=i;do{n=n+t[r++]|0;o=o+n|0}while(--i);n%=65521;o%=65521}return n|o<<16|0}e.exports=adler32},1952:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},6250:e=>{"use strict";function makeTable(){var e,t=[];for(var a=0;a<256;a++){e=a;for(var r=0;r<8;r++){e=e&1?3988292384^e>>>1:e>>>1}t[a]=e}return t}var t=makeTable();function crc32(e,a,r,n){var o=t,i=n+r;e^=-1;for(var s=n;s<i;s++){e=e>>>8^o[(e^a[s])&255]}return e^-1}e.exports=crc32},4622:(e,t,a)=>{"use strict";var r=a(7424);var n=a(9372);var o=a(9624);var i=a(6250);var s=a(8737);var l=0;var c=1;var A=3;var d=4;var p=5;var u=0;var f=1;var h=-2;var m=-3;var g=-5;var v=-1;var b=1;var y=2;var w=3;var x=4;var S=0;var C=2;var T=8;var k=9;var P=15;var E=8;var _=29;var L=256;var B=L+1+_;var D=30;var I=19;var N=2*B+1;var F=15;var R=3;var M=258;var O=M+R+1;var z=32;var $=42;var U=69;var j=73;var W=91;var X=103;var q=113;var G=666;var Q=1;var H=2;var Y=3;var V=4;var J=3;function err(e,t){e.msg=s[t];return t}function rank(e){return(e<<1)-(e>4?9:0)}function zero(e){var t=e.length;while(--t>=0){e[t]=0}}function flush_pending(e){var t=e.state;var a=t.pending;if(a>e.avail_out){a=e.avail_out}if(a===0){return}r.arraySet(e.output,t.pending_buf,t.pending_out,a,e.next_out);e.next_out+=a;t.pending_out+=a;e.total_out+=a;e.avail_out-=a;t.pending-=a;if(t.pending===0){t.pending_out=0}}function flush_block_only(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t);e.block_start=e.strstart;flush_pending(e.strm)}function put_byte(e,t){e.pending_buf[e.pending++]=t}function putShortMSB(e,t){e.pending_buf[e.pending++]=t>>>8&255;e.pending_buf[e.pending++]=t&255}function read_buf(e,t,a,n){var s=e.avail_in;if(s>n){s=n}if(s===0){return 0}e.avail_in-=s;r.arraySet(t,e.input,e.next_in,s,a);if(e.state.wrap===1){e.adler=o(e.adler,t,s,a)}else if(e.state.wrap===2){e.adler=i(e.adler,t,s,a)}e.next_in+=s;e.total_in+=s;return s}function longest_match(e,t){var a=e.max_chain_length;var r=e.strstart;var n;var o;var i=e.prev_length;var s=e.nice_match;var l=e.strstart>e.w_size-O?e.strstart-(e.w_size-O):0;var c=e.window;var A=e.w_mask;var d=e.prev;var p=e.strstart+M;var u=c[r+i-1];var f=c[r+i];if(e.prev_length>=e.good_match){a>>=2}if(s>e.lookahead){s=e.lookahead}do{n=t;if(c[n+i]!==f||c[n+i-1]!==u||c[n]!==c[r]||c[++n]!==c[r+1]){continue}r+=2;n++;do{}while(c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&r<p);o=M-(p-r);r=p-M;if(o>i){e.match_start=t;i=o;if(o>=s){break}u=c[r+i-1];f=c[r+i]}}while((t=d[t&A])>l&&--a!==0);if(i<=e.lookahead){return i}return e.lookahead}function fill_window(e){var t=e.w_size;var a,n,o,i,s;do{i=e.window_size-e.lookahead-e.strstart;if(e.strstart>=t+(t-O)){r.arraySet(e.window,e.window,t,t,0);e.match_start-=t;e.strstart-=t;e.block_start-=t;n=e.hash_size;a=n;do{o=e.head[--a];e.head[a]=o>=t?o-t:0}while(--n);n=t;a=n;do{o=e.prev[--a];e.prev[a]=o>=t?o-t:0}while(--n);i+=t}if(e.strm.avail_in===0){break}n=read_buf(e.strm,e.window,e.strstart+e.lookahead,i);e.lookahead+=n;if(e.lookahead+e.insert>=R){s=e.strstart-e.insert;e.ins_h=e.window[s];e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;while(e.insert){e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+R-1])&e.hash_mask;e.prev[s&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=s;s++;e.insert--;if(e.lookahead+e.insert<R){break}}}}while(e.lookahead<O&&e.strm.avail_in!==0)}function deflate_stored(e,t){var a=65535;if(a>e.pending_buf_size-5){a=e.pending_buf_size-5}for(;;){if(e.lookahead<=1){fill_window(e);if(e.lookahead===0&&t===l){return Q}if(e.lookahead===0){break}}e.strstart+=e.lookahead;e.lookahead=0;var r=e.block_start+a;if(e.strstart===0||e.strstart>=r){e.lookahead=e.strstart-r;e.strstart=r;flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}if(e.strstart-e.block_start>=e.w_size-O){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===d){flush_block_only(e,true);if(e.strm.avail_out===0){return Y}return V}if(e.strstart>e.block_start){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return Q}function deflate_fast(e,t){var a;var r;for(;;){if(e.lookahead<O){fill_window(e);if(e.lookahead<O&&t===l){return Q}if(e.lookahead===0){break}}a=0;if(e.lookahead>=R){e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+R-1])&e.hash_mask;a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}if(a!==0&&e.strstart-a<=e.w_size-O){e.match_length=longest_match(e,a)}if(e.match_length>=R){r=n._tr_tally(e,e.strstart-e.match_start,e.match_length-R);e.lookahead-=e.match_length;if(e.match_length<=e.max_lazy_match&&e.lookahead>=R){e.match_length--;do{e.strstart++;e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+R-1])&e.hash_mask;a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}while(--e.match_length!==0);e.strstart++}else{e.strstart+=e.match_length;e.match_length=0;e.ins_h=e.window[e.strstart];e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}}else{r=n._tr_tally(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=e.strstart<R-1?e.strstart:R-1;if(t===d){flush_block_only(e,true);if(e.strm.avail_out===0){return Y}return V}if(e.last_lit){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return H}function deflate_slow(e,t){var a;var r;var o;for(;;){if(e.lookahead<O){fill_window(e);if(e.lookahead<O&&t===l){return Q}if(e.lookahead===0){break}}a=0;if(e.lookahead>=R){e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+R-1])&e.hash_mask;a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}e.prev_length=e.match_length;e.prev_match=e.match_start;e.match_length=R-1;if(a!==0&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-O){e.match_length=longest_match(e,a);if(e.match_length<=5&&(e.strategy===b||e.match_length===R&&e.strstart-e.match_start>4096)){e.match_length=R-1}}if(e.prev_length>=R&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-R;r=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-R);e.lookahead-=e.prev_length-1;e.prev_length-=2;do{if(++e.strstart<=o){e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+R-1])&e.hash_mask;a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}}while(--e.prev_length!==0);e.match_available=0;e.match_length=R-1;e.strstart++;if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}else if(e.match_available){r=n._tr_tally(e,0,e.window[e.strstart-1]);if(r){flush_block_only(e,false)}e.strstart++;e.lookahead--;if(e.strm.avail_out===0){return Q}}else{e.match_available=1;e.strstart++;e.lookahead--}}if(e.match_available){r=n._tr_tally(e,0,e.window[e.strstart-1]);e.match_available=0}e.insert=e.strstart<R-1?e.strstart:R-1;if(t===d){flush_block_only(e,true);if(e.strm.avail_out===0){return Y}return V}if(e.last_lit){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return H}function deflate_rle(e,t){var a;var r;var o,i;var s=e.window;for(;;){if(e.lookahead<=M){fill_window(e);if(e.lookahead<=M&&t===l){return Q}if(e.lookahead===0){break}}e.match_length=0;if(e.lookahead>=R&&e.strstart>0){o=e.strstart-1;r=s[o];if(r===s[++o]&&r===s[++o]&&r===s[++o]){i=e.strstart+M;do{}while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&o<i);e.match_length=M-(i-o);if(e.match_length>e.lookahead){e.match_length=e.lookahead}}}if(e.match_length>=R){a=n._tr_tally(e,1,e.match_length-R);e.lookahead-=e.match_length;e.strstart+=e.match_length;e.match_length=0}else{a=n._tr_tally(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(a){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===d){flush_block_only(e,true);if(e.strm.avail_out===0){return Y}return V}if(e.last_lit){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return H}function deflate_huff(e,t){var a;for(;;){if(e.lookahead===0){fill_window(e);if(e.lookahead===0){if(t===l){return Q}break}}e.match_length=0;a=n._tr_tally(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++;if(a){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===d){flush_block_only(e,true);if(e.strm.avail_out===0){return Y}return V}if(e.last_lit){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return H}function Config(e,t,a,r,n){this.good_length=e;this.max_lazy=t;this.nice_length=a;this.max_chain=r;this.func=n}var K;K=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(e){e.window_size=2*e.w_size;zero(e.head);e.max_lazy_match=K[e.level].max_lazy;e.good_match=K[e.level].good_length;e.nice_match=K[e.level].nice_length;e.max_chain_length=K[e.level].max_chain;e.strstart=0;e.block_start=0;e.lookahead=0;e.insert=0;e.match_length=e.prev_length=R-1;e.match_available=0;e.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=T;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new r.Buf16(N*2);this.dyn_dtree=new r.Buf16((2*D+1)*2);this.bl_tree=new r.Buf16((2*I+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new r.Buf16(F+1);this.heap=new r.Buf16(2*B+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new r.Buf16(2*B+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(e){var t;if(!e||!e.state){return err(e,h)}e.total_in=e.total_out=0;e.data_type=C;t=e.state;t.pending=0;t.pending_out=0;if(t.wrap<0){t.wrap=-t.wrap}t.status=t.wrap?$:q;e.adler=t.wrap===2?0:1;t.last_flush=l;n._tr_init(t);return u}function deflateReset(e){var t=deflateResetKeep(e);if(t===u){lm_init(e.state)}return t}function deflateSetHeader(e,t){if(!e||!e.state){return h}if(e.state.wrap!==2){return h}e.state.gzhead=t;return u}function deflateInit2(e,t,a,n,o,i){if(!e){return h}var s=1;if(t===v){t=6}if(n<0){s=0;n=-n}else if(n>15){s=2;n-=16}if(o<1||o>k||a!==T||n<8||n>15||t<0||t>9||i<0||i>x){return err(e,h)}if(n===8){n=9}var l=new DeflateState;e.state=l;l.strm=e;l.wrap=s;l.gzhead=null;l.w_bits=n;l.w_size=1<<l.w_bits;l.w_mask=l.w_size-1;l.hash_bits=o+7;l.hash_size=1<<l.hash_bits;l.hash_mask=l.hash_size-1;l.hash_shift=~~((l.hash_bits+R-1)/R);l.window=new r.Buf8(l.w_size*2);l.head=new r.Buf16(l.hash_size);l.prev=new r.Buf16(l.w_size);l.lit_bufsize=1<<o+6;l.pending_buf_size=l.lit_bufsize*4;l.pending_buf=new r.Buf8(l.pending_buf_size);l.d_buf=1*l.lit_bufsize;l.l_buf=(1+2)*l.lit_bufsize;l.level=t;l.strategy=i;l.method=a;return deflateReset(e)}function deflateInit(e,t){return deflateInit2(e,t,T,P,E,S)}function deflate(e,t){var a,r;var o,s;if(!e||!e.state||t>p||t<0){return e?err(e,h):h}r=e.state;if(!e.output||!e.input&&e.avail_in!==0||r.status===G&&t!==d){return err(e,e.avail_out===0?g:h)}r.strm=e;a=r.last_flush;r.last_flush=t;if(r.status===$){if(r.wrap===2){e.adler=0;put_byte(r,31);put_byte(r,139);put_byte(r,8);if(!r.gzhead){put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,r.level===9?2:r.strategy>=y||r.level<2?4:0);put_byte(r,J);r.status=q}else{put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(!r.gzhead.extra?0:4)+(!r.gzhead.name?0:8)+(!r.gzhead.comment?0:16));put_byte(r,r.gzhead.time&255);put_byte(r,r.gzhead.time>>8&255);put_byte(r,r.gzhead.time>>16&255);put_byte(r,r.gzhead.time>>24&255);put_byte(r,r.level===9?2:r.strategy>=y||r.level<2?4:0);put_byte(r,r.gzhead.os&255);if(r.gzhead.extra&&r.gzhead.extra.length){put_byte(r,r.gzhead.extra.length&255);put_byte(r,r.gzhead.extra.length>>8&255)}if(r.gzhead.hcrc){e.adler=i(e.adler,r.pending_buf,r.pending,0)}r.gzindex=0;r.status=U}}else{var m=T+(r.w_bits-8<<4)<<8;var v=-1;if(r.strategy>=y||r.level<2){v=0}else if(r.level<6){v=1}else if(r.level===6){v=2}else{v=3}m|=v<<6;if(r.strstart!==0){m|=z}m+=31-m%31;r.status=q;putShortMSB(r,m);if(r.strstart!==0){putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}e.adler=1}}if(r.status===U){if(r.gzhead.extra){o=r.pending;while(r.gzindex<(r.gzhead.extra.length&65535)){if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}flush_pending(e);o=r.pending;if(r.pending===r.pending_buf_size){break}}put_byte(r,r.gzhead.extra[r.gzindex]&255);r.gzindex++}if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}if(r.gzindex===r.gzhead.extra.length){r.gzindex=0;r.status=j}}else{r.status=j}}if(r.status===j){if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}flush_pending(e);o=r.pending;if(r.pending===r.pending_buf_size){s=1;break}}if(r.gzindex<r.gzhead.name.length){s=r.gzhead.name.charCodeAt(r.gzindex++)&255}else{s=0}put_byte(r,s)}while(s!==0);if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}if(s===0){r.gzindex=0;r.status=W}}else{r.status=W}}if(r.status===W){if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}flush_pending(e);o=r.pending;if(r.pending===r.pending_buf_size){s=1;break}}if(r.gzindex<r.gzhead.comment.length){s=r.gzhead.comment.charCodeAt(r.gzindex++)&255}else{s=0}put_byte(r,s)}while(s!==0);if(r.gzhead.hcrc&&r.pending>o){e.adler=i(e.adler,r.pending_buf,r.pending-o,o)}if(s===0){r.status=X}}else{r.status=X}}if(r.status===X){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size){flush_pending(e)}if(r.pending+2<=r.pending_buf_size){put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);e.adler=0;r.status=q}}else{r.status=q}}if(r.pending!==0){flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return u}}else if(e.avail_in===0&&rank(t)<=rank(a)&&t!==d){return err(e,g)}if(r.status===G&&e.avail_in!==0){return err(e,g)}if(e.avail_in!==0||r.lookahead!==0||t!==l&&r.status!==G){var b=r.strategy===y?deflate_huff(r,t):r.strategy===w?deflate_rle(r,t):K[r.level].func(r,t);if(b===Y||b===V){r.status=G}if(b===Q||b===Y){if(e.avail_out===0){r.last_flush=-1}return u}if(b===H){if(t===c){n._tr_align(r)}else if(t!==p){n._tr_stored_block(r,0,0,false);if(t===A){zero(r.head);if(r.lookahead===0){r.strstart=0;r.block_start=0;r.insert=0}}}flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return u}}}if(t!==d){return u}if(r.wrap<=0){return f}if(r.wrap===2){put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);put_byte(r,e.adler>>16&255);put_byte(r,e.adler>>24&255);put_byte(r,e.total_in&255);put_byte(r,e.total_in>>8&255);put_byte(r,e.total_in>>16&255);put_byte(r,e.total_in>>24&255)}else{putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}flush_pending(e);if(r.wrap>0){r.wrap=-r.wrap}return r.pending!==0?u:f}function deflateEnd(e){var t;if(!e||!e.state){return h}t=e.state.status;if(t!==$&&t!==U&&t!==j&&t!==W&&t!==X&&t!==q&&t!==G){return err(e,h)}e.state=null;return t===q?err(e,m):u}function deflateSetDictionary(e,t){var a=t.length;var n;var i,s;var l;var c;var A;var d;var p;if(!e||!e.state){return h}n=e.state;l=n.wrap;if(l===2||l===1&&n.status!==$||n.lookahead){return h}if(l===1){e.adler=o(e.adler,t,a,0)}n.wrap=0;if(a>=n.w_size){if(l===0){zero(n.head);n.strstart=0;n.block_start=0;n.insert=0}p=new r.Buf8(n.w_size);r.arraySet(p,t,a-n.w_size,n.w_size,0);t=p;a=n.w_size}c=e.avail_in;A=e.next_in;d=e.input;e.avail_in=a;e.next_in=0;e.input=t;fill_window(n);while(n.lookahead>=R){i=n.strstart;s=n.lookahead-(R-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+R-1])&n.hash_mask;n.prev[i&n.w_mask]=n.head[n.ins_h];n.head[n.ins_h]=i;i++}while(--s);n.strstart=i;n.lookahead=R-1;fill_window(n)}n.strstart+=n.lookahead;n.block_start=n.strstart;n.insert=n.lookahead;n.lookahead=0;n.match_length=n.prev_length=R-1;n.match_available=0;e.next_in=A;e.input=d;e.avail_in=c;n.wrap=l;return u}t.deflateInit=deflateInit;t.deflateInit2=deflateInit2;t.deflateReset=deflateReset;t.deflateResetKeep=deflateResetKeep;t.deflateSetHeader=deflateSetHeader;t.deflate=deflate;t.deflateEnd=deflateEnd;t.deflateSetDictionary=deflateSetDictionary;t.deflateInfo="pako deflate (from Nodeca project)"},1321:e=>{"use strict";function GZheader(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=false}e.exports=GZheader},5296:e=>{"use strict";var t=30;var a=12;e.exports=function inflate_fast(e,r){var n;var o;var i;var s;var l;var c;var A;var d;var p;var u;var f;var h;var m;var g;var v;var b;var y;var w;var x;var S;var C;var T;var k;var P,E;n=e.state;o=e.next_in;P=e.input;i=o+(e.avail_in-5);s=e.next_out;E=e.output;l=s-(r-e.avail_out);c=s+(e.avail_out-257);A=n.dmax;d=n.wsize;p=n.whave;u=n.wnext;f=n.window;h=n.hold;m=n.bits;g=n.lencode;v=n.distcode;b=(1<<n.lenbits)-1;y=(1<<n.distbits)-1;e:do{if(m<15){h+=P[o++]<<m;m+=8;h+=P[o++]<<m;m+=8}w=g[h&b];t:for(;;){x=w>>>24;h>>>=x;m-=x;x=w>>>16&255;if(x===0){E[s++]=w&65535}else if(x&16){S=w&65535;x&=15;if(x){if(m<x){h+=P[o++]<<m;m+=8}S+=h&(1<<x)-1;h>>>=x;m-=x}if(m<15){h+=P[o++]<<m;m+=8;h+=P[o++]<<m;m+=8}w=v[h&y];a:for(;;){x=w>>>24;h>>>=x;m-=x;x=w>>>16&255;if(x&16){C=w&65535;x&=15;if(m<x){h+=P[o++]<<m;m+=8;if(m<x){h+=P[o++]<<m;m+=8}}C+=h&(1<<x)-1;if(C>A){e.msg="invalid distance too far back";n.mode=t;break e}h>>>=x;m-=x;x=s-l;if(C>x){x=C-x;if(x>p){if(n.sane){e.msg="invalid distance too far back";n.mode=t;break e}}T=0;k=f;if(u===0){T+=d-x;if(x<S){S-=x;do{E[s++]=f[T++]}while(--x);T=s-C;k=E}}else if(u<x){T+=d+u-x;x-=u;if(x<S){S-=x;do{E[s++]=f[T++]}while(--x);T=0;if(u<S){x=u;S-=x;do{E[s++]=f[T++]}while(--x);T=s-C;k=E}}}else{T+=u-x;if(x<S){S-=x;do{E[s++]=f[T++]}while(--x);T=s-C;k=E}}while(S>2){E[s++]=k[T++];E[s++]=k[T++];E[s++]=k[T++];S-=3}if(S){E[s++]=k[T++];if(S>1){E[s++]=k[T++]}}}else{T=s-C;do{E[s++]=E[T++];E[s++]=E[T++];E[s++]=E[T++];S-=3}while(S>2);if(S){E[s++]=E[T++];if(S>1){E[s++]=E[T++]}}}}else if((x&64)===0){w=v[(w&65535)+(h&(1<<x)-1)];continue a}else{e.msg="invalid distance code";n.mode=t;break e}break}}else if((x&64)===0){w=g[(w&65535)+(h&(1<<x)-1)];continue t}else if(x&32){n.mode=a;break e}else{e.msg="invalid literal/length code";n.mode=t;break e}break}}while(o<i&&s<c);S=m>>3;o-=S;m-=S<<3;h&=(1<<m)-1;e.next_in=o;e.next_out=s;e.avail_in=o<i?5+(i-o):5-(o-i);e.avail_out=s<c?257+(c-s):257-(s-c);n.hold=h;n.bits=m;return}},5518:(e,t,a)=>{"use strict";var r=a(7424);var n=a(9624);var o=a(6250);var i=a(5296);var s=a(457);var l=0;var c=1;var A=2;var d=4;var p=5;var u=6;var f=0;var h=1;var m=2;var g=-2;var v=-3;var b=-4;var y=-5;var w=8;var x=1;var S=2;var C=3;var T=4;var k=5;var P=6;var E=7;var _=8;var L=9;var B=10;var D=11;var I=12;var N=13;var F=14;var R=15;var M=16;var O=17;var z=18;var $=19;var U=20;var j=21;var W=22;var X=23;var q=24;var G=25;var Q=26;var H=27;var Y=28;var V=29;var J=30;var K=31;var Z=32;var ee=852;var te=592;var ae=15;var re=ae;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(e){var t;if(!e||!e.state){return g}t=e.state;e.total_in=e.total_out=t.total=0;e.msg="";if(t.wrap){e.adler=t.wrap&1}t.mode=x;t.last=0;t.havedict=0;t.dmax=32768;t.head=null;t.hold=0;t.bits=0;t.lencode=t.lendyn=new r.Buf32(ee);t.distcode=t.distdyn=new r.Buf32(te);t.sane=1;t.back=-1;return f}function inflateReset(e){var t;if(!e||!e.state){return g}t=e.state;t.wsize=0;t.whave=0;t.wnext=0;return inflateResetKeep(e)}function inflateReset2(e,t){var a;var r;if(!e||!e.state){return g}r=e.state;if(t<0){a=0;t=-t}else{a=(t>>4)+1;if(t<48){t&=15}}if(t&&(t<8||t>15)){return g}if(r.window!==null&&r.wbits!==t){r.window=null}r.wrap=a;r.wbits=t;return inflateReset(e)}function inflateInit2(e,t){var a;var r;if(!e){return g}r=new InflateState;e.state=r;r.window=null;a=inflateReset2(e,t);if(a!==f){e.state=null}return a}function inflateInit(e){return inflateInit2(e,re)}var ne=true;var oe,ie;function fixedtables(e){if(ne){var t;oe=new r.Buf32(512);ie=new r.Buf32(32);t=0;while(t<144){e.lens[t++]=8}while(t<256){e.lens[t++]=9}while(t<280){e.lens[t++]=7}while(t<288){e.lens[t++]=8}s(c,e.lens,0,288,oe,0,e.work,{bits:9});t=0;while(t<32){e.lens[t++]=5}s(A,e.lens,0,32,ie,0,e.work,{bits:5});ne=false}e.lencode=oe;e.lenbits=9;e.distcode=ie;e.distbits=5}function updatewindow(e,t,a,n){var o;var i=e.state;if(i.window===null){i.wsize=1<<i.wbits;i.wnext=0;i.whave=0;i.window=new r.Buf8(i.wsize)}if(n>=i.wsize){r.arraySet(i.window,t,a-i.wsize,i.wsize,0);i.wnext=0;i.whave=i.wsize}else{o=i.wsize-i.wnext;if(o>n){o=n}r.arraySet(i.window,t,a-n,o,i.wnext);n-=o;if(n){r.arraySet(i.window,t,a-n,n,0);i.wnext=n;i.whave=i.wsize}else{i.wnext+=o;if(i.wnext===i.wsize){i.wnext=0}if(i.whave<i.wsize){i.whave+=o}}}return 0}function inflate(e,t){var a;var ee,te;var ae;var re;var ne,oe;var ie;var se;var le,ce;var Ae;var de;var pe;var ue=0;var fe,he,me;var ge,ve,be;var ye;var we;var xe=new r.Buf8(4);var Se;var Ce;var Te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0){return g}a=e.state;if(a.mode===I){a.mode=N}re=e.next_out;te=e.output;oe=e.avail_out;ae=e.next_in;ee=e.input;ne=e.avail_in;ie=a.hold;se=a.bits;le=ne;ce=oe;we=f;e:for(;;){switch(a.mode){case x:if(a.wrap===0){a.mode=N;break}while(se<16){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(a.wrap&2&&ie===35615){a.check=0;xe[0]=ie&255;xe[1]=ie>>>8&255;a.check=o(a.check,xe,2,0);ie=0;se=0;a.mode=S;break}a.flags=0;if(a.head){a.head.done=false}if(!(a.wrap&1)||(((ie&255)<<8)+(ie>>8))%31){e.msg="incorrect header check";a.mode=J;break}if((ie&15)!==w){e.msg="unknown compression method";a.mode=J;break}ie>>>=4;se-=4;ye=(ie&15)+8;if(a.wbits===0){a.wbits=ye}else if(ye>a.wbits){e.msg="invalid window size";a.mode=J;break}a.dmax=1<<ye;e.adler=a.check=1;a.mode=ie&512?B:I;ie=0;se=0;break;case S:while(se<16){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.flags=ie;if((a.flags&255)!==w){e.msg="unknown compression method";a.mode=J;break}if(a.flags&57344){e.msg="unknown header flags set";a.mode=J;break}if(a.head){a.head.text=ie>>8&1}if(a.flags&512){xe[0]=ie&255;xe[1]=ie>>>8&255;a.check=o(a.check,xe,2,0)}ie=0;se=0;a.mode=C;case C:while(se<32){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(a.head){a.head.time=ie}if(a.flags&512){xe[0]=ie&255;xe[1]=ie>>>8&255;xe[2]=ie>>>16&255;xe[3]=ie>>>24&255;a.check=o(a.check,xe,4,0)}ie=0;se=0;a.mode=T;case T:while(se<16){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(a.head){a.head.xflags=ie&255;a.head.os=ie>>8}if(a.flags&512){xe[0]=ie&255;xe[1]=ie>>>8&255;a.check=o(a.check,xe,2,0)}ie=0;se=0;a.mode=k;case k:if(a.flags&1024){while(se<16){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.length=ie;if(a.head){a.head.extra_len=ie}if(a.flags&512){xe[0]=ie&255;xe[1]=ie>>>8&255;a.check=o(a.check,xe,2,0)}ie=0;se=0}else if(a.head){a.head.extra=null}a.mode=P;case P:if(a.flags&1024){Ae=a.length;if(Ae>ne){Ae=ne}if(Ae){if(a.head){ye=a.head.extra_len-a.length;if(!a.head.extra){a.head.extra=new Array(a.head.extra_len)}r.arraySet(a.head.extra,ee,ae,Ae,ye)}if(a.flags&512){a.check=o(a.check,ee,Ae,ae)}ne-=Ae;ae+=Ae;a.length-=Ae}if(a.length){break e}}a.length=0;a.mode=E;case E:if(a.flags&2048){if(ne===0){break e}Ae=0;do{ye=ee[ae+Ae++];if(a.head&&ye&&a.length<65536){a.head.name+=String.fromCharCode(ye)}}while(ye&&Ae<ne);if(a.flags&512){a.check=o(a.check,ee,Ae,ae)}ne-=Ae;ae+=Ae;if(ye){break e}}else if(a.head){a.head.name=null}a.length=0;a.mode=_;case _:if(a.flags&4096){if(ne===0){break e}Ae=0;do{ye=ee[ae+Ae++];if(a.head&&ye&&a.length<65536){a.head.comment+=String.fromCharCode(ye)}}while(ye&&Ae<ne);if(a.flags&512){a.check=o(a.check,ee,Ae,ae)}ne-=Ae;ae+=Ae;if(ye){break e}}else if(a.head){a.head.comment=null}a.mode=L;case L:if(a.flags&512){while(se<16){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(ie!==(a.check&65535)){e.msg="header crc mismatch";a.mode=J;break}ie=0;se=0}if(a.head){a.head.hcrc=a.flags>>9&1;a.head.done=true}e.adler=a.check=0;a.mode=I;break;case B:while(se<32){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}e.adler=a.check=zswap32(ie);ie=0;se=0;a.mode=D;case D:if(a.havedict===0){e.next_out=re;e.avail_out=oe;e.next_in=ae;e.avail_in=ne;a.hold=ie;a.bits=se;return m}e.adler=a.check=1;a.mode=I;case I:if(t===p||t===u){break e}case N:if(a.last){ie>>>=se&7;se-=se&7;a.mode=H;break}while(se<3){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.last=ie&1;ie>>>=1;se-=1;switch(ie&3){case 0:a.mode=F;break;case 1:fixedtables(a);a.mode=U;if(t===u){ie>>>=2;se-=2;break e}break;case 2:a.mode=O;break;case 3:e.msg="invalid block type";a.mode=J}ie>>>=2;se-=2;break;case F:ie>>>=se&7;se-=se&7;while(se<32){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if((ie&65535)!==(ie>>>16^65535)){e.msg="invalid stored block lengths";a.mode=J;break}a.length=ie&65535;ie=0;se=0;a.mode=R;if(t===u){break e}case R:a.mode=M;case M:Ae=a.length;if(Ae){if(Ae>ne){Ae=ne}if(Ae>oe){Ae=oe}if(Ae===0){break e}r.arraySet(te,ee,ae,Ae,re);ne-=Ae;ae+=Ae;oe-=Ae;re+=Ae;a.length-=Ae;break}a.mode=I;break;case O:while(se<14){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.nlen=(ie&31)+257;ie>>>=5;se-=5;a.ndist=(ie&31)+1;ie>>>=5;se-=5;a.ncode=(ie&15)+4;ie>>>=4;se-=4;if(a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols";a.mode=J;break}a.have=0;a.mode=z;case z:while(a.have<a.ncode){while(se<3){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.lens[Te[a.have++]]=ie&7;ie>>>=3;se-=3}while(a.have<19){a.lens[Te[a.have++]]=0}a.lencode=a.lendyn;a.lenbits=7;Se={bits:a.lenbits};we=s(l,a.lens,0,19,a.lencode,0,a.work,Se);a.lenbits=Se.bits;if(we){e.msg="invalid code lengths set";a.mode=J;break}a.have=0;a.mode=$;case $:while(a.have<a.nlen+a.ndist){for(;;){ue=a.lencode[ie&(1<<a.lenbits)-1];fe=ue>>>24;he=ue>>>16&255;me=ue&65535;if(fe<=se){break}if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(me<16){ie>>>=fe;se-=fe;a.lens[a.have++]=me}else{if(me===16){Ce=fe+2;while(se<Ce){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}ie>>>=fe;se-=fe;if(a.have===0){e.msg="invalid bit length repeat";a.mode=J;break}ye=a.lens[a.have-1];Ae=3+(ie&3);ie>>>=2;se-=2}else if(me===17){Ce=fe+3;while(se<Ce){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}ie>>>=fe;se-=fe;ye=0;Ae=3+(ie&7);ie>>>=3;se-=3}else{Ce=fe+7;while(se<Ce){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}ie>>>=fe;se-=fe;ye=0;Ae=11+(ie&127);ie>>>=7;se-=7}if(a.have+Ae>a.nlen+a.ndist){e.msg="invalid bit length repeat";a.mode=J;break}while(Ae--){a.lens[a.have++]=ye}}}if(a.mode===J){break}if(a.lens[256]===0){e.msg="invalid code -- missing end-of-block";a.mode=J;break}a.lenbits=9;Se={bits:a.lenbits};we=s(c,a.lens,0,a.nlen,a.lencode,0,a.work,Se);a.lenbits=Se.bits;if(we){e.msg="invalid literal/lengths set";a.mode=J;break}a.distbits=6;a.distcode=a.distdyn;Se={bits:a.distbits};we=s(A,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,Se);a.distbits=Se.bits;if(we){e.msg="invalid distances set";a.mode=J;break}a.mode=U;if(t===u){break e}case U:a.mode=j;case j:if(ne>=6&&oe>=258){e.next_out=re;e.avail_out=oe;e.next_in=ae;e.avail_in=ne;a.hold=ie;a.bits=se;i(e,ce);re=e.next_out;te=e.output;oe=e.avail_out;ae=e.next_in;ee=e.input;ne=e.avail_in;ie=a.hold;se=a.bits;if(a.mode===I){a.back=-1}break}a.back=0;for(;;){ue=a.lencode[ie&(1<<a.lenbits)-1];fe=ue>>>24;he=ue>>>16&255;me=ue&65535;if(fe<=se){break}if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(he&&(he&240)===0){ge=fe;ve=he;be=me;for(;;){ue=a.lencode[be+((ie&(1<<ge+ve)-1)>>ge)];fe=ue>>>24;he=ue>>>16&255;me=ue&65535;if(ge+fe<=se){break}if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}ie>>>=ge;se-=ge;a.back+=ge}ie>>>=fe;se-=fe;a.back+=fe;a.length=me;if(he===0){a.mode=Q;break}if(he&32){a.back=-1;a.mode=I;break}if(he&64){e.msg="invalid literal/length code";a.mode=J;break}a.extra=he&15;a.mode=W;case W:if(a.extra){Ce=a.extra;while(se<Ce){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.length+=ie&(1<<a.extra)-1;ie>>>=a.extra;se-=a.extra;a.back+=a.extra}a.was=a.length;a.mode=X;case X:for(;;){ue=a.distcode[ie&(1<<a.distbits)-1];fe=ue>>>24;he=ue>>>16&255;me=ue&65535;if(fe<=se){break}if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if((he&240)===0){ge=fe;ve=he;be=me;for(;;){ue=a.distcode[be+((ie&(1<<ge+ve)-1)>>ge)];fe=ue>>>24;he=ue>>>16&255;me=ue&65535;if(ge+fe<=se){break}if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}ie>>>=ge;se-=ge;a.back+=ge}ie>>>=fe;se-=fe;a.back+=fe;if(he&64){e.msg="invalid distance code";a.mode=J;break}a.offset=me;a.extra=he&15;a.mode=q;case q:if(a.extra){Ce=a.extra;while(se<Ce){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}a.offset+=ie&(1<<a.extra)-1;ie>>>=a.extra;se-=a.extra;a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back";a.mode=J;break}a.mode=G;case G:if(oe===0){break e}Ae=ce-oe;if(a.offset>Ae){Ae=a.offset-Ae;if(Ae>a.whave){if(a.sane){e.msg="invalid distance too far back";a.mode=J;break}}if(Ae>a.wnext){Ae-=a.wnext;de=a.wsize-Ae}else{de=a.wnext-Ae}if(Ae>a.length){Ae=a.length}pe=a.window}else{pe=te;de=re-a.offset;Ae=a.length}if(Ae>oe){Ae=oe}oe-=Ae;a.length-=Ae;do{te[re++]=pe[de++]}while(--Ae);if(a.length===0){a.mode=j}break;case Q:if(oe===0){break e}te[re++]=a.length;oe--;a.mode=j;break;case H:if(a.wrap){while(se<32){if(ne===0){break e}ne--;ie|=ee[ae++]<<se;se+=8}ce-=oe;e.total_out+=ce;a.total+=ce;if(ce){e.adler=a.check=a.flags?o(a.check,te,ce,re-ce):n(a.check,te,ce,re-ce)}ce=oe;if((a.flags?ie:zswap32(ie))!==a.check){e.msg="incorrect data check";a.mode=J;break}ie=0;se=0}a.mode=Y;case Y:if(a.wrap&&a.flags){while(se<32){if(ne===0){break e}ne--;ie+=ee[ae++]<<se;se+=8}if(ie!==(a.total&4294967295)){e.msg="incorrect length check";a.mode=J;break}ie=0;se=0}a.mode=V;case V:we=h;break e;case J:we=v;break e;case K:return b;case Z:default:return g}}e.next_out=re;e.avail_out=oe;e.next_in=ae;e.avail_in=ne;a.hold=ie;a.bits=se;if(a.wsize||ce!==e.avail_out&&a.mode<J&&(a.mode<H||t!==d)){if(updatewindow(e,e.output,e.next_out,ce-e.avail_out)){a.mode=K;return b}}le-=e.avail_in;ce-=e.avail_out;e.total_in+=le;e.total_out+=ce;a.total+=ce;if(a.wrap&&ce){e.adler=a.check=a.flags?o(a.check,te,ce,e.next_out-ce):n(a.check,te,ce,e.next_out-ce)}e.data_type=a.bits+(a.last?64:0)+(a.mode===I?128:0)+(a.mode===U||a.mode===R?256:0);if((le===0&&ce===0||t===d)&&we===f){we=y}return we}function inflateEnd(e){if(!e||!e.state){return g}var t=e.state;if(t.window){t.window=null}e.state=null;return f}function inflateGetHeader(e,t){var a;if(!e||!e.state){return g}a=e.state;if((a.wrap&2)===0){return g}a.head=t;t.done=false;return f}function inflateSetDictionary(e,t){var a=t.length;var r;var o;var i;if(!e||!e.state){return g}r=e.state;if(r.wrap!==0&&r.mode!==D){return g}if(r.mode===D){o=1;o=n(o,t,a,0);if(o!==r.check){return v}}i=updatewindow(e,t,a,a);if(i){r.mode=K;return b}r.havedict=1;return f}t.inflateReset=inflateReset;t.inflateReset2=inflateReset2;t.inflateResetKeep=inflateResetKeep;t.inflateInit=inflateInit;t.inflateInit2=inflateInit2;t.inflate=inflate;t.inflateEnd=inflateEnd;t.inflateGetHeader=inflateGetHeader;t.inflateSetDictionary=inflateSetDictionary;t.inflateInfo="pako inflate (from Nodeca project)"},457:(e,t,a)=>{"use strict";var r=a(7424);var n=15;var o=852;var i=592;var s=0;var l=1;var c=2;var A=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var p=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function inflate_table(e,t,a,f,h,m,g,v){var b=v.bits;var y=0;var w=0;var x=0,S=0;var C=0;var T=0;var k=0;var P=0;var E=0;var _=0;var L;var B;var D;var I;var N;var F=null;var R=0;var M;var O=new r.Buf16(n+1);var z=new r.Buf16(n+1);var $=null;var U=0;var j,W,X;for(y=0;y<=n;y++){O[y]=0}for(w=0;w<f;w++){O[t[a+w]]++}C=b;for(S=n;S>=1;S--){if(O[S]!==0){break}}if(C>S){C=S}if(S===0){h[m++]=1<<24|64<<16|0;h[m++]=1<<24|64<<16|0;v.bits=1;return 0}for(x=1;x<S;x++){if(O[x]!==0){break}}if(C<x){C=x}P=1;for(y=1;y<=n;y++){P<<=1;P-=O[y];if(P<0){return-1}}if(P>0&&(e===s||S!==1)){return-1}z[1]=0;for(y=1;y<n;y++){z[y+1]=z[y]+O[y]}for(w=0;w<f;w++){if(t[a+w]!==0){g[z[t[a+w]]++]=w}}if(e===s){F=$=g;M=19}else if(e===l){F=A;R-=257;$=d;U-=257;M=256}else{F=p;$=u;M=-1}_=0;w=0;y=x;N=m;T=C;k=0;D=-1;E=1<<C;I=E-1;if(e===l&&E>o||e===c&&E>i){return 1}for(;;){j=y-k;if(g[w]<M){W=0;X=g[w]}else if(g[w]>M){W=$[U+g[w]];X=F[R+g[w]]}else{W=32+64;X=0}L=1<<y-k;B=1<<T;x=B;do{B-=L;h[N+(_>>k)+B]=j<<24|W<<16|X|0}while(B!==0);L=1<<y-1;while(_&L){L>>=1}if(L!==0){_&=L-1;_+=L}else{_=0}w++;if(--O[y]===0){if(y===S){break}y=t[a+g[w]]}if(y>C&&(_&I)!==D){if(k===0){k=C}N+=x;T=y-k;P=1<<T;while(T+k<S){P-=O[T+k];if(P<=0){break}T++;P<<=1}E+=1<<T;if(e===l&&E>o||e===c&&E>i){return 1}D=_&I;h[D]=C<<24|T<<16|N-m|0}}if(_!==0){h[N+_]=y-k<<24|64<<16|0}v.bits=C;return 0}},8737:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},9372:(e,t,a)=>{"use strict";var r=a(7424);var n=4;var o=0;var i=1;var s=2;function zero(e){var t=e.length;while(--t>=0){e[t]=0}}var l=0;var c=1;var A=2;var d=3;var p=258;var u=29;var f=256;var h=f+1+u;var m=30;var g=19;var v=2*h+1;var b=15;var y=16;var w=7;var x=256;var S=16;var C=17;var T=18;var k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var _=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var L=512;var B=new Array((h+2)*2);zero(B);var D=new Array(m*2);zero(D);var I=new Array(L);zero(I);var N=new Array(p-d+1);zero(N);var F=new Array(u);zero(F);var R=new Array(m);zero(R);function StaticTreeDesc(e,t,a,r,n){this.static_tree=e;this.extra_bits=t;this.extra_base=a;this.elems=r;this.max_length=n;this.has_stree=e&&e.length}var M;var O;var z;function TreeDesc(e,t){this.dyn_tree=e;this.max_code=0;this.stat_desc=t}function d_code(e){return e<256?I[e]:I[256+(e>>>7)]}function put_short(e,t){e.pending_buf[e.pending++]=t&255;e.pending_buf[e.pending++]=t>>>8&255}function send_bits(e,t,a){if(e.bi_valid>y-a){e.bi_buf|=t<<e.bi_valid&65535;put_short(e,e.bi_buf);e.bi_buf=t>>y-e.bi_valid;e.bi_valid+=a-y}else{e.bi_buf|=t<<e.bi_valid&65535;e.bi_valid+=a}}function send_code(e,t,a){send_bits(e,a[t*2],a[t*2+1])}function bi_reverse(e,t){var a=0;do{a|=e&1;e>>>=1;a<<=1}while(--t>0);return a>>>1}function bi_flush(e){if(e.bi_valid===16){put_short(e,e.bi_buf);e.bi_buf=0;e.bi_valid=0}else if(e.bi_valid>=8){e.pending_buf[e.pending++]=e.bi_buf&255;e.bi_buf>>=8;e.bi_valid-=8}}function gen_bitlen(e,t){var a=t.dyn_tree;var r=t.max_code;var n=t.stat_desc.static_tree;var o=t.stat_desc.has_stree;var i=t.stat_desc.extra_bits;var s=t.stat_desc.extra_base;var l=t.stat_desc.max_length;var c;var A,d;var p;var u;var f;var h=0;for(p=0;p<=b;p++){e.bl_count[p]=0}a[e.heap[e.heap_max]*2+1]=0;for(c=e.heap_max+1;c<v;c++){A=e.heap[c];p=a[a[A*2+1]*2+1]+1;if(p>l){p=l;h++}a[A*2+1]=p;if(A>r){continue}e.bl_count[p]++;u=0;if(A>=s){u=i[A-s]}f=a[A*2];e.opt_len+=f*(p+u);if(o){e.static_len+=f*(n[A*2+1]+u)}}if(h===0){return}do{p=l-1;while(e.bl_count[p]===0){p--}e.bl_count[p]--;e.bl_count[p+1]+=2;e.bl_count[l]--;h-=2}while(h>0);for(p=l;p!==0;p--){A=e.bl_count[p];while(A!==0){d=e.heap[--c];if(d>r){continue}if(a[d*2+1]!==p){e.opt_len+=(p-a[d*2+1])*a[d*2];a[d*2+1]=p}A--}}}function gen_codes(e,t,a){var r=new Array(b+1);var n=0;var o;var i;for(o=1;o<=b;o++){r[o]=n=n+a[o-1]<<1}for(i=0;i<=t;i++){var s=e[i*2+1];if(s===0){continue}e[i*2]=bi_reverse(r[s]++,s)}}function tr_static_init(){var e;var t;var a;var r;var n;var o=new Array(b+1);a=0;for(r=0;r<u-1;r++){F[r]=a;for(e=0;e<1<<k[r];e++){N[a++]=r}}N[a-1]=r;n=0;for(r=0;r<16;r++){R[r]=n;for(e=0;e<1<<P[r];e++){I[n++]=r}}n>>=7;for(;r<m;r++){R[r]=n<<7;for(e=0;e<1<<P[r]-7;e++){I[256+n++]=r}}for(t=0;t<=b;t++){o[t]=0}e=0;while(e<=143){B[e*2+1]=8;e++;o[8]++}while(e<=255){B[e*2+1]=9;e++;o[9]++}while(e<=279){B[e*2+1]=7;e++;o[7]++}while(e<=287){B[e*2+1]=8;e++;o[8]++}gen_codes(B,h+1,o);for(e=0;e<m;e++){D[e*2+1]=5;D[e*2]=bi_reverse(e,5)}M=new StaticTreeDesc(B,k,f+1,h,b);O=new StaticTreeDesc(D,P,0,m,b);z=new StaticTreeDesc(new Array(0),E,0,g,w)}function init_block(e){var t;for(t=0;t<h;t++){e.dyn_ltree[t*2]=0}for(t=0;t<m;t++){e.dyn_dtree[t*2]=0}for(t=0;t<g;t++){e.bl_tree[t*2]=0}e.dyn_ltree[x*2]=1;e.opt_len=e.static_len=0;e.last_lit=e.matches=0}function bi_windup(e){if(e.bi_valid>8){put_short(e,e.bi_buf)}else if(e.bi_valid>0){e.pending_buf[e.pending++]=e.bi_buf}e.bi_buf=0;e.bi_valid=0}function copy_block(e,t,a,n){bi_windup(e);if(n){put_short(e,a);put_short(e,~a)}r.arraySet(e.pending_buf,e.window,t,a,e.pending);e.pending+=a}function smaller(e,t,a,r){var n=t*2;var o=a*2;return e[n]<e[o]||e[n]===e[o]&&r[t]<=r[a]}function pqdownheap(e,t,a){var r=e.heap[a];var n=a<<1;while(n<=e.heap_len){if(n<e.heap_len&&smaller(t,e.heap[n+1],e.heap[n],e.depth)){n++}if(smaller(t,r,e.heap[n],e.depth)){break}e.heap[a]=e.heap[n];a=n;n<<=1}e.heap[a]=r}function compress_block(e,t,a){var r;var n;var o=0;var i;var s;if(e.last_lit!==0){do{r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1];n=e.pending_buf[e.l_buf+o];o++;if(r===0){send_code(e,n,t)}else{i=N[n];send_code(e,i+f+1,t);s=k[i];if(s!==0){n-=F[i];send_bits(e,n,s)}r--;i=d_code(r);send_code(e,i,a);s=P[i];if(s!==0){r-=R[i];send_bits(e,r,s)}}}while(o<e.last_lit)}send_code(e,x,t)}function build_tree(e,t){var a=t.dyn_tree;var r=t.stat_desc.static_tree;var n=t.stat_desc.has_stree;var o=t.stat_desc.elems;var i,s;var l=-1;var c;e.heap_len=0;e.heap_max=v;for(i=0;i<o;i++){if(a[i*2]!==0){e.heap[++e.heap_len]=l=i;e.depth[i]=0}else{a[i*2+1]=0}}while(e.heap_len<2){c=e.heap[++e.heap_len]=l<2?++l:0;a[c*2]=1;e.depth[c]=0;e.opt_len--;if(n){e.static_len-=r[c*2+1]}}t.max_code=l;for(i=e.heap_len>>1;i>=1;i--){pqdownheap(e,a,i)}c=o;do{i=e.heap[1];e.heap[1]=e.heap[e.heap_len--];pqdownheap(e,a,1);s=e.heap[1];e.heap[--e.heap_max]=i;e.heap[--e.heap_max]=s;a[c*2]=a[i*2]+a[s*2];e.depth[c]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1;a[i*2+1]=a[s*2+1]=c;e.heap[1]=c++;pqdownheap(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1];gen_bitlen(e,t);gen_codes(a,l,e.bl_count)}function scan_tree(e,t,a){var r;var n=-1;var o;var i=t[0*2+1];var s=0;var l=7;var c=4;if(i===0){l=138;c=3}t[(a+1)*2+1]=65535;for(r=0;r<=a;r++){o=i;i=t[(r+1)*2+1];if(++s<l&&o===i){continue}else if(s<c){e.bl_tree[o*2]+=s}else if(o!==0){if(o!==n){e.bl_tree[o*2]++}e.bl_tree[S*2]++}else if(s<=10){e.bl_tree[C*2]++}else{e.bl_tree[T*2]++}s=0;n=o;if(i===0){l=138;c=3}else if(o===i){l=6;c=3}else{l=7;c=4}}}function send_tree(e,t,a){var r;var n=-1;var o;var i=t[0*2+1];var s=0;var l=7;var c=4;if(i===0){l=138;c=3}for(r=0;r<=a;r++){o=i;i=t[(r+1)*2+1];if(++s<l&&o===i){continue}else if(s<c){do{send_code(e,o,e.bl_tree)}while(--s!==0)}else if(o!==0){if(o!==n){send_code(e,o,e.bl_tree);s--}send_code(e,S,e.bl_tree);send_bits(e,s-3,2)}else if(s<=10){send_code(e,C,e.bl_tree);send_bits(e,s-3,3)}else{send_code(e,T,e.bl_tree);send_bits(e,s-11,7)}s=0;n=o;if(i===0){l=138;c=3}else if(o===i){l=6;c=3}else{l=7;c=4}}}function build_bl_tree(e){var t;scan_tree(e,e.dyn_ltree,e.l_desc.max_code);scan_tree(e,e.dyn_dtree,e.d_desc.max_code);build_tree(e,e.bl_desc);for(t=g-1;t>=3;t--){if(e.bl_tree[_[t]*2+1]!==0){break}}e.opt_len+=3*(t+1)+5+5+4;return t}function send_all_trees(e,t,a,r){var n;send_bits(e,t-257,5);send_bits(e,a-1,5);send_bits(e,r-4,4);for(n=0;n<r;n++){send_bits(e,e.bl_tree[_[n]*2+1],3)}send_tree(e,e.dyn_ltree,t-1);send_tree(e,e.dyn_dtree,a-1)}function detect_data_type(e){var t=4093624447;var a;for(a=0;a<=31;a++,t>>>=1){if(t&1&&e.dyn_ltree[a*2]!==0){return o}}if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0){return i}for(a=32;a<f;a++){if(e.dyn_ltree[a*2]!==0){return i}}return o}var $=false;function _tr_init(e){if(!$){tr_static_init();$=true}e.l_desc=new TreeDesc(e.dyn_ltree,M);e.d_desc=new TreeDesc(e.dyn_dtree,O);e.bl_desc=new TreeDesc(e.bl_tree,z);e.bi_buf=0;e.bi_valid=0;init_block(e)}function _tr_stored_block(e,t,a,r){send_bits(e,(l<<1)+(r?1:0),3);copy_block(e,t,a,true)}function _tr_align(e){send_bits(e,c<<1,3);send_code(e,x,B);bi_flush(e)}function _tr_flush_block(e,t,a,r){var o,i;var l=0;if(e.level>0){if(e.strm.data_type===s){e.strm.data_type=detect_data_type(e)}build_tree(e,e.l_desc);build_tree(e,e.d_desc);l=build_bl_tree(e);o=e.opt_len+3+7>>>3;i=e.static_len+3+7>>>3;if(i<=o){o=i}}else{o=i=a+5}if(a+4<=o&&t!==-1){_tr_stored_block(e,t,a,r)}else if(e.strategy===n||i===o){send_bits(e,(c<<1)+(r?1:0),3);compress_block(e,B,D)}else{send_bits(e,(A<<1)+(r?1:0),3);send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1);compress_block(e,e.dyn_ltree,e.dyn_dtree)}init_block(e);if(r){bi_windup(e)}}function _tr_tally(e,t,a){e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255;e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255;e.pending_buf[e.l_buf+e.last_lit]=a&255;e.last_lit++;if(t===0){e.dyn_ltree[a*2]++}else{e.matches++;t--;e.dyn_ltree[(N[a]+f+1)*2]++;e.dyn_dtree[d_code(t)*2]++}return e.last_lit===e.lit_bufsize-1}t._tr_init=_tr_init;t._tr_stored_block=_tr_stored_block;t._tr_flush_block=_tr_flush_block;t._tr_tally=_tr_tally;t._tr_align=_tr_align},2239:e=>{"use strict";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}e.exports=ZStream},8394:(e,t,a)=>{"use strict";var r=a(3016);function __awaiter(e,t,a,r){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(r.next(e))}catch(e){n(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))}typeof SuppressedError==="function"?SuppressedError:function(e,t,a){var r=new Error(a);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};const n=914400;const o=12700;const i="\r\n";const s=2147483649;const l=/^[0-9a-fA-F]{6}$/;const c=1.67;const A=27;const d={type:"solid",color:"666666",pt:1};const p=[.05,.1,.05,.1];const u={color:"363636",pt:1};const f={color:"888888",style:"solid",size:1,cap:"flat"};const h="000000";const m=12;const g=18;const v="LAYOUT_16x9";const b="DEFAULT";const y="333333";const w={type:"outer",blur:3,offset:23e3/12700,angle:90,color:"000000",opacity:.35,rotateWithShape:true};const x=[.5,.5,.5,.5];const S={color:"000000"};const C={size:8,color:"FFFFFF",opacity:.75};const T="2094734552";const k="2094734553";const P="2094734554";const E="2094734555";const _="2094734556";const L="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");const B=["C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360","C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360"];const D=["5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7","5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7"];var I;(function(e){e["left"]="left";e["center"]="center";e["right"]="right";e["justify"]="justify"})(I||(I={}));var N;(function(e){e["b"]="b";e["ctr"]="ctr";e["t"]="t"})(N||(N={}));const F="{F7021451-1387-4CA6-816F-3879F97B5CBC}";var R;(function(e){e["arraybuffer"]="arraybuffer";e["base64"]="base64";e["binarystring"]="binarystring";e["blob"]="blob";e["nodebuffer"]="nodebuffer";e["uint8array"]="uint8array"})(R||(R={}));var M;(function(e){e["area"]="area";e["bar"]="bar";e["bar3d"]="bar3D";e["bubble"]="bubble";e["bubble3d"]="bubble3D";e["doughnut"]="doughnut";e["line"]="line";e["pie"]="pie";e["radar"]="radar";e["scatter"]="scatter"})(M||(M={}));var O;(function(e){e["accentBorderCallout1"]="accentBorderCallout1";e["accentBorderCallout2"]="accentBorderCallout2";e["accentBorderCallout3"]="accentBorderCallout3";e["accentCallout1"]="accentCallout1";e["accentCallout2"]="accentCallout2";e["accentCallout3"]="accentCallout3";e["actionButtonBackPrevious"]="actionButtonBackPrevious";e["actionButtonBeginning"]="actionButtonBeginning";e["actionButtonBlank"]="actionButtonBlank";e["actionButtonDocument"]="actionButtonDocument";e["actionButtonEnd"]="actionButtonEnd";e["actionButtonForwardNext"]="actionButtonForwardNext";e["actionButtonHelp"]="actionButtonHelp";e["actionButtonHome"]="actionButtonHome";e["actionButtonInformation"]="actionButtonInformation";e["actionButtonMovie"]="actionButtonMovie";e["actionButtonReturn"]="actionButtonReturn";e["actionButtonSound"]="actionButtonSound";e["arc"]="arc";e["bentArrow"]="bentArrow";e["bentUpArrow"]="bentUpArrow";e["bevel"]="bevel";e["blockArc"]="blockArc";e["borderCallout1"]="borderCallout1";e["borderCallout2"]="borderCallout2";e["borderCallout3"]="borderCallout3";e["bracePair"]="bracePair";e["bracketPair"]="bracketPair";e["callout1"]="callout1";e["callout2"]="callout2";e["callout3"]="callout3";e["can"]="can";e["chartPlus"]="chartPlus";e["chartStar"]="chartStar";e["chartX"]="chartX";e["chevron"]="chevron";e["chord"]="chord";e["circularArrow"]="circularArrow";e["cloud"]="cloud";e["cloudCallout"]="cloudCallout";e["corner"]="corner";e["cornerTabs"]="cornerTabs";e["cube"]="cube";e["curvedDownArrow"]="curvedDownArrow";e["curvedLeftArrow"]="curvedLeftArrow";e["curvedRightArrow"]="curvedRightArrow";e["curvedUpArrow"]="curvedUpArrow";e["custGeom"]="custGeom";e["decagon"]="decagon";e["diagStripe"]="diagStripe";e["diamond"]="diamond";e["dodecagon"]="dodecagon";e["donut"]="donut";e["doubleWave"]="doubleWave";e["downArrow"]="downArrow";e["downArrowCallout"]="downArrowCallout";e["ellipse"]="ellipse";e["ellipseRibbon"]="ellipseRibbon";e["ellipseRibbon2"]="ellipseRibbon2";e["flowChartAlternateProcess"]="flowChartAlternateProcess";e["flowChartCollate"]="flowChartCollate";e["flowChartConnector"]="flowChartConnector";e["flowChartDecision"]="flowChartDecision";e["flowChartDelay"]="flowChartDelay";e["flowChartDisplay"]="flowChartDisplay";e["flowChartDocument"]="flowChartDocument";e["flowChartExtract"]="flowChartExtract";e["flowChartInputOutput"]="flowChartInputOutput";e["flowChartInternalStorage"]="flowChartInternalStorage";e["flowChartMagneticDisk"]="flowChartMagneticDisk";e["flowChartMagneticDrum"]="flowChartMagneticDrum";e["flowChartMagneticTape"]="flowChartMagneticTape";e["flowChartManualInput"]="flowChartManualInput";e["flowChartManualOperation"]="flowChartManualOperation";e["flowChartMerge"]="flowChartMerge";e["flowChartMultidocument"]="flowChartMultidocument";e["flowChartOfflineStorage"]="flowChartOfflineStorage";e["flowChartOffpageConnector"]="flowChartOffpageConnector";e["flowChartOnlineStorage"]="flowChartOnlineStorage";e["flowChartOr"]="flowChartOr";e["flowChartPredefinedProcess"]="flowChartPredefinedProcess";e["flowChartPreparation"]="flowChartPreparation";e["flowChartProcess"]="flowChartProcess";e["flowChartPunchedCard"]="flowChartPunchedCard";e["flowChartPunchedTape"]="flowChartPunchedTape";e["flowChartSort"]="flowChartSort";e["flowChartSummingJunction"]="flowChartSummingJunction";e["flowChartTerminator"]="flowChartTerminator";e["folderCorner"]="folderCorner";e["frame"]="frame";e["funnel"]="funnel";e["gear6"]="gear6";e["gear9"]="gear9";e["halfFrame"]="halfFrame";e["heart"]="heart";e["heptagon"]="heptagon";e["hexagon"]="hexagon";e["homePlate"]="homePlate";e["horizontalScroll"]="horizontalScroll";e["irregularSeal1"]="irregularSeal1";e["irregularSeal2"]="irregularSeal2";e["leftArrow"]="leftArrow";e["leftArrowCallout"]="leftArrowCallout";e["leftBrace"]="leftBrace";e["leftBracket"]="leftBracket";e["leftCircularArrow"]="leftCircularArrow";e["leftRightArrow"]="leftRightArrow";e["leftRightArrowCallout"]="leftRightArrowCallout";e["leftRightCircularArrow"]="leftRightCircularArrow";e["leftRightRibbon"]="leftRightRibbon";e["leftRightUpArrow"]="leftRightUpArrow";e["leftUpArrow"]="leftUpArrow";e["lightningBolt"]="lightningBolt";e["line"]="line";e["lineInv"]="lineInv";e["mathDivide"]="mathDivide";e["mathEqual"]="mathEqual";e["mathMinus"]="mathMinus";e["mathMultiply"]="mathMultiply";e["mathNotEqual"]="mathNotEqual";e["mathPlus"]="mathPlus";e["moon"]="moon";e["noSmoking"]="noSmoking";e["nonIsoscelesTrapezoid"]="nonIsoscelesTrapezoid";e["notchedRightArrow"]="notchedRightArrow";e["octagon"]="octagon";e["parallelogram"]="parallelogram";e["pentagon"]="pentagon";e["pie"]="pie";e["pieWedge"]="pieWedge";e["plaque"]="plaque";e["plaqueTabs"]="plaqueTabs";e["plus"]="plus";e["quadArrow"]="quadArrow";e["quadArrowCallout"]="quadArrowCallout";e["rect"]="rect";e["ribbon"]="ribbon";e["ribbon2"]="ribbon2";e["rightArrow"]="rightArrow";e["rightArrowCallout"]="rightArrowCallout";e["rightBrace"]="rightBrace";e["rightBracket"]="rightBracket";e["round1Rect"]="round1Rect";e["round2DiagRect"]="round2DiagRect";e["round2SameRect"]="round2SameRect";e["roundRect"]="roundRect";e["rtTriangle"]="rtTriangle";e["smileyFace"]="smileyFace";e["snip1Rect"]="snip1Rect";e["snip2DiagRect"]="snip2DiagRect";e["snip2SameRect"]="snip2SameRect";e["snipRoundRect"]="snipRoundRect";e["squareTabs"]="squareTabs";e["star10"]="star10";e["star12"]="star12";e["star16"]="star16";e["star24"]="star24";e["star32"]="star32";e["star4"]="star4";e["star5"]="star5";e["star6"]="star6";e["star7"]="star7";e["star8"]="star8";e["stripedRightArrow"]="stripedRightArrow";e["sun"]="sun";e["swooshArrow"]="swooshArrow";e["teardrop"]="teardrop";e["trapezoid"]="trapezoid";e["triangle"]="triangle";e["upArrow"]="upArrow";e["upArrowCallout"]="upArrowCallout";e["upDownArrow"]="upDownArrow";e["upDownArrowCallout"]="upDownArrowCallout";e["uturnArrow"]="uturnArrow";e["verticalScroll"]="verticalScroll";e["wave"]="wave";e["wedgeEllipseCallout"]="wedgeEllipseCallout";e["wedgeRectCallout"]="wedgeRectCallout";e["wedgeRoundRectCallout"]="wedgeRoundRectCallout"})(O||(O={}));var z;(function(e){e["text1"]="tx1";e["text2"]="tx2";e["background1"]="bg1";e["background2"]="bg2";e["accent1"]="accent1";e["accent2"]="accent2";e["accent3"]="accent3";e["accent4"]="accent4";e["accent5"]="accent5";e["accent6"]="accent6"})(z||(z={}));var $;(function(e){e["left"]="left";e["center"]="center";e["right"]="right";e["justify"]="justify"})($||($={}));var U;(function(e){e["top"]="top";e["middle"]="middle";e["bottom"]="bottom"})(U||(U={}));var j;(function(e){e["ACTION_BUTTON_BACK_OR_PREVIOUS"]="actionButtonBackPrevious";e["ACTION_BUTTON_BEGINNING"]="actionButtonBeginning";e["ACTION_BUTTON_CUSTOM"]="actionButtonBlank";e["ACTION_BUTTON_DOCUMENT"]="actionButtonDocument";e["ACTION_BUTTON_END"]="actionButtonEnd";e["ACTION_BUTTON_FORWARD_OR_NEXT"]="actionButtonForwardNext";e["ACTION_BUTTON_HELP"]="actionButtonHelp";e["ACTION_BUTTON_HOME"]="actionButtonHome";e["ACTION_BUTTON_INFORMATION"]="actionButtonInformation";e["ACTION_BUTTON_MOVIE"]="actionButtonMovie";e["ACTION_BUTTON_RETURN"]="actionButtonReturn";e["ACTION_BUTTON_SOUND"]="actionButtonSound";e["ARC"]="arc";e["BALLOON"]="wedgeRoundRectCallout";e["BENT_ARROW"]="bentArrow";e["BENT_UP_ARROW"]="bentUpArrow";e["BEVEL"]="bevel";e["BLOCK_ARC"]="blockArc";e["CAN"]="can";e["CHART_PLUS"]="chartPlus";e["CHART_STAR"]="chartStar";e["CHART_X"]="chartX";e["CHEVRON"]="chevron";e["CHORD"]="chord";e["CIRCULAR_ARROW"]="circularArrow";e["CLOUD"]="cloud";e["CLOUD_CALLOUT"]="cloudCallout";e["CORNER"]="corner";e["CORNER_TABS"]="cornerTabs";e["CROSS"]="plus";e["CUBE"]="cube";e["CURVED_DOWN_ARROW"]="curvedDownArrow";e["CURVED_DOWN_RIBBON"]="ellipseRibbon";e["CURVED_LEFT_ARROW"]="curvedLeftArrow";e["CURVED_RIGHT_ARROW"]="curvedRightArrow";e["CURVED_UP_ARROW"]="curvedUpArrow";e["CURVED_UP_RIBBON"]="ellipseRibbon2";e["CUSTOM_GEOMETRY"]="custGeom";e["DECAGON"]="decagon";e["DIAGONAL_STRIPE"]="diagStripe";e["DIAMOND"]="diamond";e["DODECAGON"]="dodecagon";e["DONUT"]="donut";e["DOUBLE_BRACE"]="bracePair";e["DOUBLE_BRACKET"]="bracketPair";e["DOUBLE_WAVE"]="doubleWave";e["DOWN_ARROW"]="downArrow";e["DOWN_ARROW_CALLOUT"]="downArrowCallout";e["DOWN_RIBBON"]="ribbon";e["EXPLOSION1"]="irregularSeal1";e["EXPLOSION2"]="irregularSeal2";e["FLOWCHART_ALTERNATE_PROCESS"]="flowChartAlternateProcess";e["FLOWCHART_CARD"]="flowChartPunchedCard";e["FLOWCHART_COLLATE"]="flowChartCollate";e["FLOWCHART_CONNECTOR"]="flowChartConnector";e["FLOWCHART_DATA"]="flowChartInputOutput";e["FLOWCHART_DECISION"]="flowChartDecision";e["FLOWCHART_DELAY"]="flowChartDelay";e["FLOWCHART_DIRECT_ACCESS_STORAGE"]="flowChartMagneticDrum";e["FLOWCHART_DISPLAY"]="flowChartDisplay";e["FLOWCHART_DOCUMENT"]="flowChartDocument";e["FLOWCHART_EXTRACT"]="flowChartExtract";e["FLOWCHART_INTERNAL_STORAGE"]="flowChartInternalStorage";e["FLOWCHART_MAGNETIC_DISK"]="flowChartMagneticDisk";e["FLOWCHART_MANUAL_INPUT"]="flowChartManualInput";e["FLOWCHART_MANUAL_OPERATION"]="flowChartManualOperation";e["FLOWCHART_MERGE"]="flowChartMerge";e["FLOWCHART_MULTIDOCUMENT"]="flowChartMultidocument";e["FLOWCHART_OFFLINE_STORAGE"]="flowChartOfflineStorage";e["FLOWCHART_OFFPAGE_CONNECTOR"]="flowChartOffpageConnector";e["FLOWCHART_OR"]="flowChartOr";e["FLOWCHART_PREDEFINED_PROCESS"]="flowChartPredefinedProcess";e["FLOWCHART_PREPARATION"]="flowChartPreparation";e["FLOWCHART_PROCESS"]="flowChartProcess";e["FLOWCHART_PUNCHED_TAPE"]="flowChartPunchedTape";e["FLOWCHART_SEQUENTIAL_ACCESS_STORAGE"]="flowChartMagneticTape";e["FLOWCHART_SORT"]="flowChartSort";e["FLOWCHART_STORED_DATA"]="flowChartOnlineStorage";e["FLOWCHART_SUMMING_JUNCTION"]="flowChartSummingJunction";e["FLOWCHART_TERMINATOR"]="flowChartTerminator";e["FOLDED_CORNER"]="folderCorner";e["FRAME"]="frame";e["FUNNEL"]="funnel";e["GEAR_6"]="gear6";e["GEAR_9"]="gear9";e["HALF_FRAME"]="halfFrame";e["HEART"]="heart";e["HEPTAGON"]="heptagon";e["HEXAGON"]="hexagon";e["HORIZONTAL_SCROLL"]="horizontalScroll";e["ISOSCELES_TRIANGLE"]="triangle";e["LEFT_ARROW"]="leftArrow";e["LEFT_ARROW_CALLOUT"]="leftArrowCallout";e["LEFT_BRACE"]="leftBrace";e["LEFT_BRACKET"]="leftBracket";e["LEFT_CIRCULAR_ARROW"]="leftCircularArrow";e["LEFT_RIGHT_ARROW"]="leftRightArrow";e["LEFT_RIGHT_ARROW_CALLOUT"]="leftRightArrowCallout";e["LEFT_RIGHT_CIRCULAR_ARROW"]="leftRightCircularArrow";e["LEFT_RIGHT_RIBBON"]="leftRightRibbon";e["LEFT_RIGHT_UP_ARROW"]="leftRightUpArrow";e["LEFT_UP_ARROW"]="leftUpArrow";e["LIGHTNING_BOLT"]="lightningBolt";e["LINE_CALLOUT_1"]="borderCallout1";e["LINE_CALLOUT_1_ACCENT_BAR"]="accentCallout1";e["LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR"]="accentBorderCallout1";e["LINE_CALLOUT_1_NO_BORDER"]="callout1";e["LINE_CALLOUT_2"]="borderCallout2";e["LINE_CALLOUT_2_ACCENT_BAR"]="accentCallout2";e["LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR"]="accentBorderCallout2";e["LINE_CALLOUT_2_NO_BORDER"]="callout2";e["LINE_CALLOUT_3"]="borderCallout3";e["LINE_CALLOUT_3_ACCENT_BAR"]="accentCallout3";e["LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR"]="accentBorderCallout3";e["LINE_CALLOUT_3_NO_BORDER"]="callout3";e["LINE_CALLOUT_4"]="borderCallout4";e["LINE_CALLOUT_4_ACCENT_BAR"]="accentCallout3=4";e["LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR"]="accentBorderCallout4";e["LINE_CALLOUT_4_NO_BORDER"]="callout4";e["LINE"]="line";e["LINE_INVERSE"]="lineInv";e["MATH_DIVIDE"]="mathDivide";e["MATH_EQUAL"]="mathEqual";e["MATH_MINUS"]="mathMinus";e["MATH_MULTIPLY"]="mathMultiply";e["MATH_NOT_EQUAL"]="mathNotEqual";e["MATH_PLUS"]="mathPlus";e["MOON"]="moon";e["NON_ISOSCELES_TRAPEZOID"]="nonIsoscelesTrapezoid";e["NOTCHED_RIGHT_ARROW"]="notchedRightArrow";e["NO_SYMBOL"]="noSmoking";e["OCTAGON"]="octagon";e["OVAL"]="ellipse";e["OVAL_CALLOUT"]="wedgeEllipseCallout";e["PARALLELOGRAM"]="parallelogram";e["PENTAGON"]="homePlate";e["PIE"]="pie";e["PIE_WEDGE"]="pieWedge";e["PLAQUE"]="plaque";e["PLAQUE_TABS"]="plaqueTabs";e["QUAD_ARROW"]="quadArrow";e["QUAD_ARROW_CALLOUT"]="quadArrowCallout";e["RECTANGLE"]="rect";e["RECTANGULAR_CALLOUT"]="wedgeRectCallout";e["REGULAR_PENTAGON"]="pentagon";e["RIGHT_ARROW"]="rightArrow";e["RIGHT_ARROW_CALLOUT"]="rightArrowCallout";e["RIGHT_BRACE"]="rightBrace";e["RIGHT_BRACKET"]="rightBracket";e["RIGHT_TRIANGLE"]="rtTriangle";e["ROUNDED_RECTANGLE"]="roundRect";e["ROUNDED_RECTANGULAR_CALLOUT"]="wedgeRoundRectCallout";e["ROUND_1_RECTANGLE"]="round1Rect";e["ROUND_2_DIAG_RECTANGLE"]="round2DiagRect";e["ROUND_2_SAME_RECTANGLE"]="round2SameRect";e["SMILEY_FACE"]="smileyFace";e["SNIP_1_RECTANGLE"]="snip1Rect";e["SNIP_2_DIAG_RECTANGLE"]="snip2DiagRect";e["SNIP_2_SAME_RECTANGLE"]="snip2SameRect";e["SNIP_ROUND_RECTANGLE"]="snipRoundRect";e["SQUARE_TABS"]="squareTabs";e["STAR_10_POINT"]="star10";e["STAR_12_POINT"]="star12";e["STAR_16_POINT"]="star16";e["STAR_24_POINT"]="star24";e["STAR_32_POINT"]="star32";e["STAR_4_POINT"]="star4";e["STAR_5_POINT"]="star5";e["STAR_6_POINT"]="star6";e["STAR_7_POINT"]="star7";e["STAR_8_POINT"]="star8";e["STRIPED_RIGHT_ARROW"]="stripedRightArrow";e["SUN"]="sun";e["SWOOSH_ARROW"]="swooshArrow";e["TEAR"]="teardrop";e["TRAPEZOID"]="trapezoid";e["UP_ARROW"]="upArrow";e["UP_ARROW_CALLOUT"]="upArrowCallout";e["UP_DOWN_ARROW"]="upDownArrow";e["UP_DOWN_ARROW_CALLOUT"]="upDownArrowCallout";e["UP_RIBBON"]="ribbon2";e["U_TURN_ARROW"]="uturnArrow";e["VERTICAL_SCROLL"]="verticalScroll";e["WAVE"]="wave"})(j||(j={}));var W;(function(e){e["AREA"]="area";e["BAR"]="bar";e["BAR3D"]="bar3D";e["BUBBLE"]="bubble";e["BUBBLE3D"]="bubble3D";e["DOUGHNUT"]="doughnut";e["LINE"]="line";e["PIE"]="pie";e["RADAR"]="radar";e["SCATTER"]="scatter"})(W||(W={}));var X;(function(e){e["TEXT1"]="tx1";e["TEXT2"]="tx2";e["BACKGROUND1"]="bg1";e["BACKGROUND2"]="bg2";e["ACCENT1"]="accent1";e["ACCENT2"]="accent2";e["ACCENT3"]="accent3";e["ACCENT4"]="accent4";e["ACCENT5"]="accent5";e["ACCENT6"]="accent6"})(X||(X={}));var q;(function(e){e["chart"]="chart";e["image"]="image";e["line"]="line";e["rect"]="rect";e["text"]="text";e["placeholder"]="placeholder"})(q||(q={}));var G;(function(e){e["chart"]="chart";e["hyperlink"]="hyperlink";e["image"]="image";e["media"]="media";e["online"]="online";e["placeholder"]="placeholder";e["table"]="table";e["tablecell"]="tablecell";e["text"]="text";e["notes"]="notes"})(G||(G={}));var Q;(function(e){e["title"]="title";e["body"]="body";e["image"]="pic";e["chart"]="chart";e["table"]="tbl";e["media"]="media"})(Q||(Q={}));var H;(function(e){e["DEFAULT"]="&#x2022;";e["CHECK"]="&#x2713;";e["STAR"]="&#x2605;";e["TRIANGLE"]="&#x25B6;"})(H||(H={}));const Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAB3CAYAAAD1oOVhAAAGAUlEQVR4Xu2dT0xcRRzHf7tAYSsc0EBSIq2xEg8mtTGebVzEqOVIolz0siRE4gGTStqKwdpWsXoyGhMuyAVJOHBgqyvLNgonDkabeCBYW/8kTUr0wsJC+Wfm0bfuvn37Znbem9mR9303mJnf/Pb7ed95M7PDI5JIJPYJV5EC7e3t1N/fT62trdqViQCIu+bVgpIHEo/Hqbe3V/sdYVKHyWSSZmZm8ilVA0oeyNjYmEnaVC2Xvr6+qg5fAOJAz4DU1dURGzFSqZRVqtMpAFIGyMjICC0vL9PExIRWKADiAYTNshYWFrRCARAOEFZcCKWtrY0GBgaUTYkBRACIE4rKZwqACALR5RQAqQCIDqcASIVAVDsFQCSAqHQKgEgCUeUUAPEBRIVTAMQnEBvK5OQkbW9vk991CoAEAMQJxc86BUACAhKUUwAkQCBBOAVAAgbi1ykAogCIH6cAiCIgsk4BEIVAZJwCIIqBVLqiBxANQFgXS0tLND4+zl08AogmIG5OSSQS1gGKwgtANAIRcQqAaAbCe6YASBWA2E6xDyeyDUl7+AKQMkDYYevm5mZHabA/Li4uUiaTsYLau8QA4gLE/hU7wajyYtv1hReDAiAOxQcHBymbzark4BkbQKom/X8dp9Npmpqasn4BIAYAYSnYp+4BBEAMUcCwNOCQsAKZnp62NtQOw8WmwT09PUo+ijaHsOMx7GppaaH6+nolH0Z10K2tLVpdXbW6UfV3mNqBdHd3U1NTk2rtlMRfW1uj2dlZAFGirkRQAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJE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AqrVq1Kvztb3+7/3777Xd4x44dRxQWFpbbCjRdDQ0NG99///0pM2bMeOqHP/zhC8pgAACAz0YBDAAApMJZZ53V45vf/OaRvXr1GllaWtrVRiB5ampq3l28ePHEO++8c9LVV1/9jo0AAABsPQUwAACQWMOHDy+/6KKLvjB48OCjW7RoMdBGID0+/PDDV+fNmzfhvPPOe3L69Ol/sREAAIBPRwEMAAAkSqtWrQpvuOGGQ/bbb79/atOmzX6ZTCZrK5BeuVyubs2aNTNmzJjx2JgxYyavW7euwVYAAAA+ngIYAABIhB//+Mddv/e9732lZ8+e/1RcXNzWRiD/1NbWfvD2228/dssttzz029/+9l0bAQAA+L8UwAAAQJNVUVFRcO21137+4IMPPrZ169b7ZTKZAlsBIqJxzZo1M59//vnxp5122hR3BQMAAPx/CmAAAKDJOeWUUzqefvrpx/bu3ftL2Wy2jY0AH6e+vn7j0qVLH/vd7373x+uvv36ZjQAAAPlOAQwAADQJ2Ww2c+uttx5wyCGHnNC6deu9I8LdvsDWaFy7du1L06ZN+/OPfvSjZ1evXl1vJQAAQD5SAAMAALtU//79S6655pp/2nPPPY8tLy/vayPAZ1VTU7NswYIF488999wHp06dutFGAACAfKIABgAAdomf//znPU855ZQTu3btemRhYWGZjQDbW2NjY92KFSuevOWWW+689NJLF9kIAACQDxTAAADATuMxz8Cusn79+rlPP/30f5188slT6+rqcjYCAACklQIYAADY4fr27Vv8hz/84a+Pee5nI8CuUlNT8+68efPu/8EPfvDgwoULN9kIAACQNgpgAABghxkyZEjpNddc89XBgwefWFxc3MFGgKaitrZ21dy5c+/5yU9+8uc5c+bU2AgAAJAWWyqAPYoNAADYJqNHj+4wb968n06ZMuXRYcOGnaH8BZqa4uLi9sOGDTtjypQpj86bN++nJ510UntbAQAA0s4dwAAAwFY599xze33/+9//dufOnY/IZDJZGwGSIpfL1S1fvvzJG2644fbLLrvsbRsBAACSyiOgAQCAz+y8887r+53vfOfbHTt2PDyTyRTaCJBUuVyuYcWKFU/cdNNN//XrX/96sY0AAABJowAGAAC22WWXXTboG9/4xg9at249zDaAtFm7du2su++++9pzzjnnNdsAAACSQgEMAABsNcUvkE8UwQAAQJIogAEAgE9N8Qvks7Vr18665557rvv5z38+3zYAAICmaksFcGHlwOj6UV9orIqoWZG1PQAAyBO/+MUvet9xxx3nHHrooT8pLS3tYiNAPiotLe2y7777HvP973+/X1lZ2ZIpU6assxUAAKCpKetcHwXlH/01BTAAAOS5M844o/u99957zpe//OWflZeX94qIjK0AeS5TXl7e8+CDDx71/e9/v3dEvDVjxowPrQUAAGgqFMAAAMD/ceKJJ7a77777fjJq1Kh/KS8v7xOKX4B/lCkvL+99+OGHj/rWt77VfvXq1Qvnz59fbS0AAMCutqUC2DuAAQAgzwwdOrTs+uuvP6l///4nFRYWltkI20NjY2Ns2rQpqquro6amJurr62PTpk2xefPmqK+vj+rq6qivr4/NmzfHpk2boqGhYZv/fxUWFkZJSUk0a9YsioqKoqysLIqKiqJZs2ZRUlISRUVFUVpa+r9/FRQUCIjtoqGhoeq11167a8yYMffMmTOnxkYAAIBdZUvvAFYAAwBAnujUqVP2nnvuGbXXXnudnM1mK22Ej9PQ0BAbN26MDRs2/J+/Nm7cGBs3boyamprYtGlTbNq0KWpqaqK2trbJnqe4uDhKSkqitLT0f/9eUVERFRUV0aJFi//zV0VFRRQWFvog8LHq6urWvvjii7eceOKJf169enW9jQAAADubAhgAAPLcXXfdddAXv/jF00tLS7vZRn7L5XKxYcOGWLt2baxbty7Wrl37d3+tW7cuNmzYkPd7atGiRbRu3TpatWoVrVu3jjZt2vzvf27dunW0aNHCh4morq5e+sgjj1zzne98Z6ptAAAAO5MCGAAA8tTVV189+MQTTzyzoqJioG3kj8bGxli5cmUsX748Pvjgg1i9evX//n3t2rXR2NhoSZ9RYWFhtGrVKtq1axdt27b937937tw5OnTo4LHTeWbDhg3z77333qvOPPPMebYBAADsDApgAADIM1/72tfaXHrppad27979qIjQRKVUQ0NDrFq1KlasWBHvv//+//595cqVTfqRzGlXXFwcHTp0iI4dO0bnzp2jY8eO0alTp2jXrp1HS6dYLpdrfOeddx76+c9/fv2ECRPW2QgAALAjKYABACBP9OrVq9ldd931jT322OM7hYWFZTaSHh9++GG88847sXTp0njvvfdixYoVsXr16mhoaLCchCgsLIz27dtHp06dolu3btG9e/fo3r27x0mnTENDQ9W8efNu++Y3v/nHJUuWbLYRAABgR1AAAwBAHrjrrrtG/NM//dOZJSUlXWwj2davXx9Lly6Nd955539L3w8//NBiUqqysvJ/y+C//tWqVSuLSbiamppljz322G9Gjx49xTYAAIDtTQEMAAAp9qtf/arPD3/4w5+1atVqL9tIno0bN8aSJUvirbfeikWLFsV7770XmzZtspg8V1JSEl27do0+ffpE3759o3fv3lFeXm4xCbRu3bqXr7322ivGjh27yDYAAIDtRQEMAAApNGjQoNI77rjju7vttttJBQUFWRtJhtWrV8ebb74ZixcvjiVLlsTy5cujsbHRYtiigoKC6Ny5c/Tu3Tt69+4d/fr1i7Zt21pMQjQ2Nta98cYbd33rW9+6ff78+TU2AgAAfFYKYAAASJHS0tKCBx988Jj99tvvn7PZbBsbaboaGhri7bffjrfeeisWLFgQS5YscXcv201FRUX06tUr+vbtG3379o2ePXtGYWGhxTRhdXV1a2bMmHHjV77ylYdqamr85gcAALDNFMAAAJASp59+erdf/vKX51ZWVu5jG03T6tWr47XXXouFCxfGm2++GRs3brQUdooWLVpE3759Y8CAATFw4EB3CDdh69evf/E//uM//vPqq69+xzYAAIBtoQAGAICEGzRoUOm99977w969ex+byWTc4teErF+/PubNmxcLFiyIN954Q+FLk9GiRYvo169fDBgwIPbYY4+orKy0lCYkl8s1LF68eNyJJ554rcdCAwAAW0sBDAAACXbNNdcMOemkk35RVlbWyzZ2vVwuF++++27MnTs3XnvttViyZIl3+NLkFRQURK9evWLQoEExePDg6Natm6U0EdXV1UvuvvvuX//kJz+ZYxsAAMCnpQAGAIAEOuqoo1r99re//VmHDh0Ot41da9OmTTF79uyYO3duLFy4MKqqqiyFRGvevHn0798/Bg8eHHvuuWeUlJ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1cfvnlu1900UW/LS8v72cbn05VVVVMmDAhbrnllnjzzTejoaHBUoDtoqGhIZYsWRLPPfdc1NTURI8ePSKb9XOMT6OsrKzb17/+9SPbtm0774knnlhtIwAAkMDreu8ABgCAz+bhhx/+8qGHHnpOQUFBsW18sk2bNsUzzzwTTzzxRFRVVVkIsMOVl5fHkUceGYccckgUF/tX9afR2Ni46emnn/71Mccc87htAABAsngENAAAbKN27doVTZ48+YxevXodZxufrK6uLp5++umYOHGi4hfYJSoqKuKLX/xiHHzwwe4I/pQWLVr0x4MOOuiadevWeUwDAAAkhEdAAwDANjj22GPbPvzww7/p2LHjobaxZXV1dfHkk0/GddddF3Pnzo26ujpLAXaJzZs3x2uvvRbPPfdcRET06NEjCgsLLWYLWrduvfv3vve9fd9+++1pCxYsqLYRAABo+rb0CGgFMAAAfITLL7989wsuuOB3zZs372UbH6+xsTGmTJkS119/fbzyyiuKX6DJ2Lx5cyxYsCCmT58excXF0a1bt8hkMhbzMUpKSjp8+ctfPrJt27ZzvBcYAACaPu8ABgCArTB+/Pgjv/CFL/xLQUFBiW18vAULFsT48eNj6dKllgE0eT169IivfOUrMWjQIMvYgsbGxpqJEydecuyxxz5pGwAA0HR5BzAAAHwK7dq1K3ruued+1qNHj6/axsdbtGhR3H///bF48WLLABKnV69ecdxxx0WfPn0sYwuWLl3654MOOujy1atX19sGAAA0Pd4BDAAAn2DYsGHNn3766V936tTpC7bx0TZs2BD33Xdf/PGPf4y1a9daCJBI69evj2nTpsW6deuiZ8+eUVLiYQ8fpbKysv+3v/3t/lOmTJmyfPlyz/cHAIAmxjuAAQBgC372s5/1uP76669t0aKF54J+hJqamhg/fnzcfPPN8fbbb0cul7MUINFyuVy888478cwzz0RVVVX07t07slk/A/lHZWVl3U488cTD6+rqZkyfPv1DGwEAgCZ0va4ABgCAj3bFFVfscdZZZ11dXFzcwTb+Xi6XixkzZsR1110XCxYsiMbGRksBUqWxsTGWLFkSM2bMiPLy8ujSpUtkMhmL+RvZbLbFQQ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/4QhQUFOT9Pl5//fU79tprr9/7ZAAAwI6jAAYAIC9ks9nMyy+/fFafPn2Oz/ddvPvuu3HbbbfFe++954MBsJN069YtvvOd70S3bt3yfhdLliy5f5999rmypqam0ScDAAC2PwUwAACpV1paWjBr1qyzevfufVw+7yGXy8WTTz4ZDz74oLt+AXaBbDYbxxxzTBxxxBF5fzfw0qVLHxg6dOjlSmAAANj+FMAAAKRar169mk2ePHlsu3btDsrnPaxcuTJuueWWePvtt30oAHaxnj17ximnnBIdOnTI6z2sXr16yiGHHPIvS5Ys2exTAQAA28+WCuDCyoHR9aO+0FgVUbMia3sAADRpQ4cOLXvqqacub9Omzf75uoNcLhfPPPNMXH/99bF27VofCoAmYP369TFlypQoKSmJnj17RiaTycs9NG/evPtJJ500ZPLkyc+sWLHCoykAAGA7KetcHwXlH/01BTAAAIk1ZMiQ0kceeeSKVq1a7Z2vO6iuro7bb789nnjiiWhs9IRNgKaksbEx5s+fH++//34MGDAgstn8/DlLaWlpp6997WuDn3rqqadXrlxZ75MBAACfnQIYAIDUOfTQQ1s8+OCDv2/ZsuUe+bqDOXPmxNVXX+2RzwBN3PLly+OFF16Ijh075u0joUtLSzudcMIJ+7/00ktPv/3227U+FQAA8NkogAEASJVhw4Y1v++++37TsmXLQfl4/vr6+hg/fnz88Y9/jNpaP0MHSILNmzfHiy++GJs3b47ddtstCgoK8m4HxcXFbY866qg9n3vuuaeXL1/ucdAAAPAZKIABAEiNI488snLcuHG/b9GixcB8PP97770XV111VcyZM8eHASCBFi1aFC+//HL069cvWrRokXfnLykp6XDcccftP2fOnGcWLVq0yScCAAC2jQIYAIBUOPLIIyvvvPPO35aXl++Wj+d/+umn48Ybb4wPP/zQhwEgwf7yl7/ECy+8ECUlJdGrV6+8O3+zZs3aHHXUUfspgQEAYNspgAEASLxjjz227W233faH5s2b98m3s1dVVcXNN98cTz31VDQ2NvowAKRAY2NjzJ8/P5YtWxYDBgyIZs2a5dX5mzVr1uaYY4458M0333xm4cKFNT4RAACwdRTAAAAk2qGHHtritttuuzofy9+33347rrnmmli8eLEPAkAKvf/++/HKK69Enz59orKyMq/Ons1mK4888sh9Zs6c+dTSpUs3+zQAAMCnpwAGACCxjjjiiJb33nvvteXl5f3y6dy5XC4mTZoUN998c1RVVfkgAKRYVVVVTJ06NbLZbPTp0ycymUzenL24uLjtV7/61c+/8sorTy1evLjWpwEAAD4dBTAAAIl06KGHtrj33nt/l2/lb3V1ddx0000xefLkyOVyPggAeSCXy8WCBQvi3Xffjd133z2y2fz5mUyzZs1aH3300fvNmDHjSXcCAwDAp6MABgAgcYYOHVo2fvz4qysqKgbk07mXLVsWV111lUc+A+SplStXxiuvvBKf+9znoqKiIm/O3axZszZHH3300GeeeebJFStW1PkkAADAlimAAQBIlCFDhpQ++uij17Rs2XL3fDr31KlT49prr42NGzf6EADksaqqqpg+fXq0bds2unTpkjfnLikpaT9q1KihTz755JMrV66s90kAAICPt6UCuMB6AABoSjp16pSdMGHCv1dWVu6RL2dubGyMcePGxR133BF1dW56AiCitrY2br755hg/fnw0NjbmzbkrKyv3mDBhwr9369bNXQkAALCNFMAAADQZrVq1Kpw+ffolbdq02T9fzlxdXR2/+93vYtKkSd73C8DfyeVy8fjjj8fvf//7qK6uzptzt2nTZv8pU6Zc0qpVq0KfAgAA2HoKYAAAmoSKioqC2bNnX9KuXbuD8uXMS5cujYsuuijmz5/vAwDAx3r11VfjoosuiqVLl+bNmdu1a3fQ7Nmz/72iosLPrgAAYCu5iAYAoEmYOXPmz9q1a3dIvpz35ZdfjiuuuCLWrVsnfAA+0bp16+KKK66Il19+OW/O3K5du4Nnzpz5M+kDAMDWUQADALDLvfjii2N69OgxKh/Omsvl4oEHHogbbrghamtrhQ/Ap1ZbWxs33HBDPPDAA3nz2oAePXqMevHFF8dIHwAAPj0FMAAAu9SkSZO+NnDgwFPy4ax1dXVx8803x8SJE73vF4BtksvlYuLEiXHLLbdEXV1dXpx54MCBJ0+aNOlr0gcAgE9HAQwAwC7z6KOPHnXggQeekw9nXbduXfz617+OWbNmCR6Az2zmzJnx61//Ol9eJZA58MADz3n00UePkjwAAHyywsqB0fWjvtBYFVGzImtDAADsEDfeeOO+Rx999EWZTKYw7Wddvnx5XHXVVbFy5UrBA7DdbNiwIWbPnh0DBw6MioqKtB8307179/179uz56sMPP7xc+gAA5LuyzvVRUP7RX1MAAwCw011xxRV7fPe7372qoKCgWdrPOmfOnPjtb38bGzduFDwA2111dXVMmzYtOnfuHB07dkz1WTOZTOHuu+9+eJs2bV6aNGnSKukDAJDPFMAAADQZZ5xxRvef/exnvy0sLCxP+1knTJgQd999d9TX1wsegB2moaEhXnrppchms9G3b99UnzWTyRTttddeB/3lL395dubMmRukDwBAvlIAAwDQJBx00EEVf/jDH64pLi7ulOZz5nK5eOCBB+Kxxx4TOgA77c+eBQsWRF1dXfTv3z8ymUxqz1pQUFBywAEHDJs+ffqkpUuXbpY+AAD5aEsFcIH1AACwMwwaNKj0vvvuu7qsrKxXms9ZV1cX1113XUyaNEnoAOx0EydOjOuvvz7q6upSfc6ysrJef/rTn67u379/idQBAODvKYABANjhKioqCh577LGLKyoqBqb5nNXV1XHNNdfE7NmzhQ7ALvPKK6/ElVdeGVVVVak+Z4sWLQZOnDhxbEVFhZ9vAQDA33CBDADADjdz5syftW3b9sA0n3HdunVx2WWXxRtvvCFwAHa5xYsXx2WXXRZr165N9TnbtWt34MyZM38mcQAA+P8UwAAA7FBPPvnkqB49eoxK8xlXrVoVV1xxRSxfvlzgADQZK1asiCuuuCJWrlyZ6nP26NFj1KRJk0ZJHAAA/lth5cDo+lFfaKyKqFmRtSEAALbZjTfeuO+XvvSlCzOZTGp/8fDdd9+NK6+8MtatWydwAJqc6urqmDVrVvTv3z8qKytTe85u3boN79mz57yHH37Yb2MBAJAXyjrXR0H5R39NAQwAwA5x3nnn9T311FOvLigoKE7rGV977bW45pprorq6WuAANFmbN2+OGTNmRI8ePaJ9+/apPGMmkykYNGjQIYWFhVOee+45v5UFAEDqKYABANipjjrqqFb/8R//8YdmzZq1SusZX3755bj++uujrq5O4AA0eQ0NDfHSSy9Fp06dolOnTqk8Y0FBQXbYsGGfnz9//qQ33nhjk9QBAEizLRXA3gEMAMB21a1bt+wNN9zwnyUlJR3TesYpU6bEjTfeGPX19QIHIDHq6+vjxhtvjKlTp6b2jCUlJZ1uuOGG/+jWrZu7GgAAyFsKYAAAtqunn376XyorK/dI6/kmTZoUd955ZzQ2NgobgMRpbGyMO+64I5588snUnrGysnLw008//UtpAwCQrxTAAABsN88///w3unTp8k9pPd/EiRNj3LhxkcvlhA1AYuVyubj//vtTXQJ36dLlS88+++yJ0gYAIB95BzAAANvFTTfdNPzII488L5PJZNJ4vsceeyzGjx8vaABS47XXXotmzZpF3759U3m+zp0779urV695Dz/88DJpAwCQNlt6B7ACGACAz+wXv/hF7x/+8IdXFxQUNEvj+R544IF45JFHBA1A6ixYsCDq6upiwIABqTtbJpPJDBo06ODGxsbnpk6dul7aAACkiQIYAIAd5oADDqj43e9+99tmzZq1TeP5xo0bF5MmTRI0AKm1aNGi2Lx5cwwcODB1ZysoKMjut99+w5577rnH33vvvc3SBgAgLbZUAHsHMAAA2yybzWbuvPPOfyktLe2exvNNmDBB+QtAXpg0aVI89NBDqTxbaWlpj3vuuedfstlsRtIAAOQDBTAAANvs+eef/06HDh0OTePZHn744Xj44YeFDEDeeOSRR+LPf/5zKs/WoUOHw5599tlvSxkAgHygAAYAYJvcd999hw8ePPjUNJ7t/vvvjwkTJggZgLzz2GOPxX333ZfKs+25554/+NOf/nSYlAEASDvvAAYAYKudccYZ3ceMGXN5QUFBcdrONnHixHjkkUeEDEDeWrx4cWSz2ejbt2/ajpbp06fPvn/5y18mz5w5c4OkAQBIsi29A1gBDADAVhk2bFjzG2+88Q/NmjVrl7azPfroo6l99CUAbI2FCxdGUVFR9OvXL1XnKigoKD7wwAP3e/LJJx9dsWJFnaQBAEiqLRXAHgENAMBWuffee39ZWlraPW3nevzxx+PBBx8UMAD8jz//+c8xceLE1J2rtLS0x3333fdLCQMAkFYKYAAAPrVJkyaN6tSp0xEpPFeMHz9ewADwD8aPHx+TJ09O3bk6der0hUmTJn1VwgAApJFHQAMA8Kmcd955fU888cR/z2QyRWk618yZM+Puu+8WMAB8jNdeey06duwYnTt3TtW5unbtuk9BQcHzzz333DopAwCQNN4BDADAZ3LEEUe0vOKKK67NZrOVaTrXyy+/HDfffHPkcjkhA8DHyOVyMXv27OjSpUt06tQpNefKZDJF++yzz/CpU6c+9u67726WNAAASeIdwAAAbLNsNpu55ZZb/q2kpKRjms61YMGCuPnmm6OxsVHIAPAJGhsb4+abb44333wzVecqLS3tcvfdd5+fzWYzUgYAIC0UwAAAbNGkSZO+3rZt2wPTdKZly5bFDTfcEPX19QIGgE+prq4urr322li+fHmqztWuXbsDH3/88VESBgAgLTwCGgCAj3XZZZcN+upXvzo2k8mk5hcH33///bjyyiujqqpKwACwlerq6uLll1+OIUOGRHl5eWrO1aVLl31LS0unPvPMM2ukDABAEngENAAAW61///4lJ5988q8ymUxRWs60YcOG+P3vfx8bN24UMABso40bN8bvfve7VP15WlBQkP3hD394ft++fYslDABA4q9vrQAAgI/y4IMPnl1WVtYrLeeprq6O3/zmN7Fq1SrhAsBntGrVqrjyyiujuro6NWcqKyvr8/DDD58lXQAAkk4BDADA/zF+/Pgju3XrdnRazlNfX5/KdxYCwK60fPnyuO6666K+vj41Z+rRo8dXx40bd4R0AQBIMgUwAAB/53vf+16nI4444py0nCeXy8Vtt90Wb7zxhnABYDt7/fXX47bbbotcLpeaMx155JHnfvvb3+4oXQAAkkoBDADA/6qoqCi4+OKLLywsLCxPy5nGjx8fs2bNEi4A7CCzZs2Khx56KDXnKSwsrPj1r399QUVFhZ+bAQCQSC5kAQD4XxMnThxdWVk5OC3nef7552PixImCBYAd7LHHHosXXnghNeeprKzc89FHHz1RsgAAJFFh5cDo+lFfaKyKqFmRtSEAgDxxwQUX7DZq1KgLM5lMYRrO8+qrr8Ytt9ySqkdSAkBT/7O3d+/e0a5du1Scp2PHjkNz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2PlLSko63nPPPd+SJAAAO4sCGAAgwb70pS9VDhw48KSkzr9mzZoYP368IAGALXrggQdizZo1iZ2/f//+Jx111FGtJAkAwM6gAAYASLArrrji1MLCwvIkzp7L5eK2226LTZs2CRIA2KJNmzbFbbfdFrlcLpHzFxYWll1++eU/kCQAADuDAhgAIKF+8Ytf9O7evftXkjr/s88+G2+88YYgAYBP5Y033ojnn38+sfN369bt6F/96ld9JAkAwI6mAAYASKgf/vCHP8pkMom8nvvggw/igQceECIAsFXGjRsX69atS+TsmUym4NRTT/2xFAEA2NEUwAAACXTdddcNa9eu3YFJnD2Xy8Udd9wRtbW1ggQAtsqmTZvizjvvTOz8bdq02f+mm27aT5IAAOxICmAAgIQpLS0t+NrXvnZ6Uud/4YUXYuHChYIEALbJq6++GjNmzEjs/Mccc8zpFRUVfiYHAMAO42ITACBhbr/99oMrKip2S+LsGzZsiHHjxgkRAPhM7r///qiqqkrk7OXl5X3/67/+6wgpAgCwoyiAAQASpKKiouCwww47Nanz33vvvYn9YS0A0HRs2LAh7r///sTOf9BBB/1zq1atCiUJAMCOoAAGAEiQ+++//+iysrKeSZx9zpw58dJLLwkRANguXnjhhViwYEEiZy8tLe32xz/+8StSBABgR1AAAwAkRN++fYv33Xfff07i7LW1tXHvvfcKEQDYru6+++6oq6tL5Oz77bffKf379y+RIgAA25sCGAAgIW6++eZRxcXFbZM4+yOPPBJr164VIgCwXa1atSoee+yxRM6ezWbb3njjjV+TIgAA25sCGAAgAYYOHVq21157fSeJs7/33nvxxBNPCBEA2CEmTpwYK1asSOTsQ4YM+c7QoUPLpAgAwPakAAYASIBrr732xKKiosqkzZ3L5eKee+6JxsZGIQIAO0R9fX3cddddkcvlEjd7UVFR5bXXXnuCFAEA2J4UwAAATdwBBxxQMWDAgG8kcfYZM2bEW2+9JUQAYId6880348UXX0zk7AMGDPjG8OHDy6UIAMD2ogAGAGjirrrqqhOKiooqkjb3pk2b4oEHHhAgALBT3H///VFbW5u4uYuKilpcffXV7gIGAG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nj7722mvCAlKvefPmcdRRR8Ull1wSI0eOjGbNmlkK4HpsKxQWFpafffbZvaQFAJA+CmAAgE9p//3375+EOV9//XVhAXmjvLw8Ro0aFf/+7/8eI0eOjGw2aymA67FP6fOf//xAaQEApI8CGADgU+rRo8fuTX3G2traePvtt4UF5J2KiooYNWpUXHzxxXH44Yc3+XdvAum2ePHiRLySo1evXoOkBQCQPgpgAIBPqXXr1k3+DoklS5ZEQ0ODsIC81apVqzj++OPj4osvjhEjRkRBgW97gZ2voaEhlixZ0uTnbNOmjQIYACCFfCcMAPApDBkypLR58+a9m/qcb775prAAIqJ169YxevToGDt2rCIYcF32MZo3b95n0KBBpdICAEgX3wEDAHwKp556av9MJtPkr53eeustYQH8jTZt2sTo0aPjvPPOi+HDhyuCAddlfyOTyRT84Ac/+Jy0AADSxXe+AACfwuDBg5v84/Hq6+tj0aJFwgL4CJ06dYqTTz45/u3f/i323nvvyGQylgLsUIsXL07Eqzn23HPPgdICAEgXBTAAwKfQpUuXAU19xnfeeSfq6uqEBbAFnTt3jjFjxiiCgR2utrY23n333SRc53oPMABAyiiAAQA+hZYtW/Zv6jN6/DPAp9elS5cYM2ZMnHvuuTF48GALAfL2+iwJ17kAAGwdBTAAwCcYPnx4eUlJSeemPqfHPwNsvV69esVpp50W55xzTvTvrwMB8u/6rLS0tPPw4cPLpQUAkB4KYACAT/Ctb31rt4ho8s8IXbx4sbAAtlGfPn3irLPOinPOOSd22203CwG2i4T8gl7m29/+dj9pAQCkhwIYAOAT7L777k2+CVi7dm1s2LBBWACfUZ8+feLss8+OM888M3r27GkhwGfy4Ycfxrp165r8nAMHDlQAAwCkSJEVAABsWadOnZr8D8TefvttQQFsRwMGDIgBAwbEggULYvz48bF06VJLAbb5Oq1Vq1audwEA2GkUwAAAn6CyslIBDJCnBgwYEP3794958+bFQw89FO+++66lAFtlyZIlsddeezX1613PvgcASBEFMADAFnTq1CnbvHnzXk19ziVLlggLYAfJZDIxePDg2GOPPeLll1+OBx98MFauXG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dO9oPAwCwWwiAAQDepaioKKuvvKusrDQkAHaJgoKCGDVqVIwYMSJmzpwZkydPji1btmgM7IH9XDYHwNm+HwYA4P3laQEAwP8YPnx4SX5+fkk21ygABmBXa9GiRRx//PFxxx13xNlnnx0lJSWaAs14P5efn18yfPhwfxAAACSUABgA4B2OOOKIDtleo+//ArC7FBUVxejRo+P73/9+nH322VFcXKwpsBsk4cr1JOyLAQDYOQEwAMA79O3bt1221+gEMAC729tB8B133BGnn356tGrVSlOgme3n9ttvv7YmBQCQTAJgAIB36NSpkwAYAHYoKSmJz3zmM3HnnXfG6NGjo0WLFpoCzWQ/l4R9MQAAOycABgB4hw4dOrTN9hqTcGUgALmlpKQkzj777PjOd74To0aNivz8fE2BHN/PJWFfDADAzgmAAQDeoaysrG221ygABmBvad++fVx00UVx5513xgknnBCFhYWaAjm6nysrK3MCGAAgoQTAAADvUFJS0j6b68tkMlFdXW1QAOxV7dq1i/POOy+++93vxqhRoyIvz+sF+CiSsJ8rLS0VAAMAJJT/QgMAeIfi4uK22VxfXV1dNDY2GhQAWeHtE8F33HGHIBg+gsbGxqirq7MvBgBgt/BfZgAA79CqVausPung9C8A2ahDhw5x0UUXxbe//e04/PDDBcGQA/u6oqIiJ4ABABLKf5EBALxDQUGBABgAPqauXbvGpZdeGt/61rdi2LBhkUqlNAUSuq9r0aJFW1MCAEimAi0AAPgfhYWFZdlc39atWw0JgKzXrVu3uPLKK2P16tXxxBNPxOzZsyOTyWgMJGhfl+37YgAA3psAGADgnZujgoLW2VyfE8AAJEmPHj3iyiuvjKVLl8akSZNizpw5mgIJ2ddl+74YAID35gpoAIAdWrdunZefn98ym2sUAAOQRH369ImxY8fGLbfcEgMGDNAQSMC+Lj8/v1WrVq28OwQASCCbOACAHQYNGlQSEVn9scJt27YZFACJtd9++8UNN9wQX/va1+KAAw7QEJq1BOzr8gYPHlxsUgAAySMABgDY4YADDijJ9hpramoMCoDE69u3b9x4441xww03xL777qshNEu1tbVZX2P//v1LTQoAIHl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om2A8AEWLVoUjz32WCxevFgzABIiLy8vTjzxxETVvGTJkifKy8sbTA8AgJ3ucbUAAGDP+u1vfzsxIjJJqbdjx44xdOhQg4P3sXz58rj77rvjRz/6kfAXIGGGDRsWHTp0SFLJmd/85jePmxwAAO9FAAwAsIf953/+5/JNmza9kqSaTz/99EilUoYH77Jy5cr4yU9+Et///vdj/vz5GgKQMHl5eXHGGWckquZNmza9fM8996wwPQAA3osroAEA9oKXXnpp/KmnnnpYUurt2rVrDBkyJGbPnm14EBHr1q2L8ePHx+zZsyOTyWgIQEINHTo0OnfunKiaX3jhhQkmBwDA+xEAAwDsBZdffvkzS5YsWVdUVNQlKTWfccYZ8be//U3YRbO2fv36eOyxxwS/ADkglUrF6aefnqia6+rq1lx22WXTTQ8AgPcjAAYA2AsqKyub5s+f/8ihhx56dVJq7tatm1PANFsbNmyIxx9/PF555ZVoamrSEIAc8KlPfSq6du2aqJrfeOONcdXV1WnTAwDg/fgGMADAXvL1r399XDqdrktSzb4FTHNTVVUV999/f3z729+OF198UfgLkCNSqVR8+tOfTlTN6XS69pvf/OZjpgcAwAdxAhgAYC+ZMWNG9Zo1a/7Ss2fPxLx97N69ewwcODDmzJljgOS0LVu2xIQJE+KFF16IxsZGDQHIMYceemh069YtUTWvXr36qRkzZlSbHgAAH8QJYACAvejXv/71HyMiUR8SPeuss5wCJmdt27YtHn300bjtttviueeeE/4C5KC8vLwYM2ZM0srO/OpXv/qT6QEA8KH2vFoAALD3fP/733+rqqoqUR/V7dGjR3zqU58yPHJKfX19TJ06Nb71rW/F1KlTo76+XlMActSIESOiS5cuiap506ZNf73rrruWmh4AAB+GABgAYC975plnHkpazWeccUbk5dlKkjvmzZsXjz76aGzdulUzAHJYQUFBnH766Ymre9q0aQ+aHgAAH5a3dgAAe9nYsWNn1tfXr01SzZ07d47DDjvM8ACARBk5cmR06NAhUTXX1dWtHjt27POmBwDAhyUABgDYyyorK5tee+21Pyat7jPPPDMKCgoMEABIhBYtWiTy9O/s2bP/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FWVma4ALCblJWVxXXXXRclJSU5s6aZM2fe/f/+3/9bZboAACSRABgAgP/l5JNPHldeXv50rqynU6dOMXbs2Jw5kQQA2aSoqCiuueaa6NixY86sqby8/MlTTz11gukCAJBUAmAAAP6PSy655K66urq1ubKefffdN6644orIy7P9BYBdJS8vL6688sro3bt3zqyprq6u/JJLLvmh6QIAkOi9uhYAAPBus2bNqn7ooYfujIh0rqxp4MCBcd555xkuAOwi559/fhxyyCG5tKT0gw8+eOesWbOqTRcAgCTLb3tQ9NzpjndbRG15oQ4BADRTEydOXDNmzJi8Tp06Dc2VNfXp0yfy8/PjzTffNGAA+ATOOuusOOmkk3JqTa+//vp9Z5555kTTBQAgCYq7N0Ze6c5/5gQwAADv6dRTT/31li1bXs+lNZ122mlx9NFHGy4AfEzHHntsnHrqqTm1pi1btrxx2mmn/cZ0AQDIBQJgAADeU0VFReONN974jcbGxqpcWtcFF1wQRx55pAEDwEd05JFHxuc+97mcWlNjY2PVzTff/I2KiopGEwYAIBcIgAEAeF9//OMf1z/yyCPfiRz6HnAqlYqLLroohgwZYsAA8CENHTo0LrrookilUrm0rPQjjzzynfvvv3+dCQMAkCsEwAAAfKBLL730hQULFvwupzbCeXnxpS99Kfbff38DBoAPcNBBB8WXvvSlyMvLrVdJCxYs+N2ll176ggkDAJBLBMAAAHwoo0eP/mVVVdXcXFpTYWFhfOUrX4kePXoYMAC8h169esUVV1wRBQUFObWuqqqqOaNHj/6lCQMAkGsEwAAAfCgVFRWNV1111S0NDQ0bcmldJSUlcfPNN8c+++xjyADwLr17946bbropiouLc2pdDQ0NG6666qqv++4vAAC5SAAMAMCHNmHChE3333//tzKZTDqX1lVcXBzXXXdddO/e3ZABYIfu3bvHtddeG61atcqpdWUymfT999//rQkTJmwyZQAAcpEAGACAj2Ts2LGz58+f/9tcW1fr1q3juuuuiw4dOhgyAM1ehw4d4rrrrovWrVvn3Nrmz5//m7Fjx842ZQAAcpUAGACAj+y44477xaZNm17MtXW1a9cubrzxxmjXr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ly8uvvjiOPLIIw0cgKw1atSouPjiiyMvL3dfA23dunXxZz/72e83NDRkTBwAgObON4ABANhtli9fvr2mpuaFY4899uT8/PyWubjGVCoVgwYNikwmE4sWLTJ0ALLK6aefHueee26kUqmcXWN9fX3FDTfccM3UqVOrTBwAgObi/b4BLAAGAGC3evnll7cUFBS8cMQRR4zOy8trkYtrTKVSccABB0SnTp1i7ty5kck4fATA3lVYWBhXXHFFHHPMMTm9zsbGxuo777zzKz/72c9WmzoAAM2JABgAgL1qxowZlb169Xp98ODBJ6dSqfxcXWfPnj2jb9++8fe//z0aGxsNHoC9olWrVnH11VfHwIEDc3qd6XS64be//e2Nt9122wJTBwCguREAAwCw1z3xxBPlw4cPX9OvX79jIyJn76Hs2LFjDBw4MObMmRN1dXUGD8Ae1a5du7jxxhujT58+ub7U9JQpU779xS9+8XlTBwCgOXq/ADhPewAA2FPGjBkz9Y033vh1rq+zZ8+eceONN0bHjh0NHYA9pkuXLnHTTTdF9+7dc36tc+fO/eU555zzF1MHAID/SwAMAMAe9alPfernS5cufTjX19mlS5e49dZb48ADDzR0AHa7gQMHxje/+c3o1KlTzq/1rbfeemjEiBG/MnUAANg5ATAAAHvcsccee8/GjRtfyPV1FhcXx7XXXhsjRowwdAB2m8MPPzyuuuqqaNmyZc6vdePGjc8fffTR95g6AAC8NwEwAAB7XEVFReNxxx339crKyr/l+loLCgrisssui/PPPz9SqZThA7DLpFKpOP/88+PSSy+NgoKCnF/vpk2bXj7ssMNuqaysbDJ9AAB4bwJgAAD2isWLF9efddZZN1dXV7/ZHNZ7/PHHx5e//OUoKioyfAA+sRYtWsSXv/zlOP7445vFequrq98cM2bMN8rLyxtMHwAA3l9+24Oi585+kN4WUVteqEMAAOw2a9asaVi1atWs0aNHH1dQUNA619fbrVu3OOCAA2LevHlRX1/vAQDgYykrK4trrrkmDjrooGax3rq6uvKxY8de89RTT202fQAA+Ifi7o2RV7rznwmAAQDYq+bNm1ezevXqZ04++eTjCwoKSnN9ve3atYuR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+fbpp58+2ZMAAAAfnQAYAICc8OCDDy4ZNmzYin79+jWrEDgionXr1nHEEUdEfX19LF261MMAkGCpVCpOOOGEuOKKK6JNmzbNbv07wt9vnXPOOX/xNAAAwMcjAAYAIGc89NBDS4YNG7a8X79+xza3EDg/Pz8OPvjg6NWrV8yfPz8aGho8EAAJU1JSEpdffnmccMIJkZ+f3+zWn8lkGp944olvffazn53maQAAgI9PAAwAQE556KGHlo4cOXJdnz59RqWa252ZEdG1a9cYNmxYLFu2LCorKz0QAAnRt2/fuO6662K//fZrluvPZDLpp59++rvnnHPO054GAAD4ZATAAADknD/96U+LDj300KX7779/s7sOOiKiuLg4jjzyyCgpKYk333wz0um0hwIgSxUUFMRnP/vZuPDCC6OkpKRZ9iCdTjc88sgjt5x//vnTPREAAPDJCYABAMhJDz/88NId3wQelUqlmt09mqlUKvr06RMHH3xwLFy4MLZt2+ahAMgynTt3jrFjx8bQoUOjGV5aERH/CH+feOKJ2y+88MLnPBEAALBrCIABAMhZDz300JIePXq8NmjQoGPz8vJaNMcetG3bNkaNGhVNTU2xZMkSDwVAFkilUjF69Oi48soro0OHDs22D01NTdt++9vf/stll132oqcCAAB2HQEwAAA5bdKkSeXdu3efM3jw4GYbAufn58eAAQOiV69esWDBgti+fbsHA2Avad26dVx66aVx/PHHR35+frPtQ2NjY/WvfvWrf7nuuute81QAAMCuJQAGACDnTZ48eW1jY+OMI4444uiCgoKS5tqHrl27xqhRo2Lbtm2xcuVKDwbAHpRKpWLUqFExduzY6NWrV7PuRX19/fo77rjjK9/61rcWejIAAGDXEwADANAsPP/881UbNmx45rjjjjuqsLCwrLn2obCwMAYNGhT77bdfLF68OGpraz0cALtZ+/bt44orrogTTzwxCgub9/uU2tralTfffPPVP/nJT1Z7MgAAYPcQAAMA0Gz87W9/27p27doZJ5xwwsjCwsK2zbkXnTp1ipEjR0Z1dbXTwAC70ciRI+Pqq6+OHj16NPte1NTULL/hhhuu/e1vf7vOkwEAALuPABgAgGbltdde2zpv3rynTznllKFFRUWdmnMvCgsL49BDD4399tsvFi1a5DQwwC709qnfk08+udmf+o2I2Lx587yLL774unHjxm30dAAAwO71fgFwat9zYsTOftC4LmLjq610DwCAxOrVq1fhs88++69du3Y9QTciGhoaYurUqTF58uRobGzUEICPqaCgIE499dQYPXq04HeH8vLyp4499tjvrly5skE3AABg9+swrDYKuuz8ZwJgAAByWuvWrfNeeumlm/fdd9+zdeMfVq9eHffff38sWbJEMwA+ov322y8uuugi1z2/w8KFC38/fPjwnzY0NGR0AwAA9gwBMAAAzd7zzz9/8aGHHnp1RKR0IyKTycTMmTPjz3/+c9TV1WkIwAcoKSmJ8847L0aMGBGplL9Kdki//PLL9xx77LEPagUAAOxZ7xcA+wYwAADNwn333Tfn+OOP39yrV6/DQwgcqVQqevfuHcOHD49169ZFRUWFhwTgPRxyyCExduzY6N+/v/B3h0wm0/jMM8/828knnzxONwAAYM97v28AC4ABAGg2fve7370xePDgJf369Ts6lUrl60hEcXFxjBgxInr06BFLly6N2tpaTQHYoUOHDvGFL3whzjzzzCguLtaQHZqammoeeOCBWz73uc9N1w0AANg7BMAAALDDww8/vKygoOC54cOHH1FQUFCqI//QrVu3OO6446K0tDQWL14cTU1NmgI0Wy1btoxzzjknLr300ujevbuGvENtbe2K22677arbbrvtDd0AAIC9RwAMAADv8Oyzz25avHjx0yeddNKQoqKiTjryD3l5edGnT58YOXJkbN26NVatWqUpQLNz+OGHx1e+8pUYMGBA5OXlacg7VFVV/e3CCy+8/oEHHvDdAAAA2MsEwAAA8C7z58+vefbZZ58+44wz+hcXF/fSkf/RsmXLGDJkSOyzzz6xdOnSqKmp0RQg53Xs2DG++MUvximnnBItW7bUkHdZt27dMyeffPI3Xn755W26AQAAe9/7BcCpfc+JETv7QeO6iI2vttI9AAByWmFhYer555//0sEHH3y5bvxfTU1N8fzzz8f48eOjurpaQ4Cc07p16zjzzDPjyCOPdOJ35zJ///vff3rMMcfc39DQkNEOAADIDh2G1UZBl53/TAAMAAARMWnSpM8cc8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MOOigOOOCAKCoq0pQs0djYuGXmzJk/PvPMMyc2NDS4XgAAAPjQBMAAAJADjjzyyNY/+9nPrujbt++5EZGnI9mluro6Fi5cGPPnz4958+ZFZWWlprBXtGvXLg455JAYMGBA9O/fP1q39nsjWSj91ltv/fmqq676xaxZs6q1AwAA+KgEwAAAkEN++ctfjhgzZsyNrVq16q0b2SmdTsfKlStj0aJFsXDhwli8eHFs27ZNY9gtSkpKol+/ftG/f//Yf//9o1evXpGX53dEslVNTc3yRx999EdXXnnlK7oBAAB8XAJgAADIMd26dSt8+OGHPzd48ODL8vPzbdyzXCaTiTVr1sTChQtj0aJFsWjRotiyZYvG8LGUlZVF//79/xn6du/ePVKplMZkuaampprXXnvtV2PGjHmgoqKiUUcAAIBPQgAMAAA56rjjjiv7r//6r8tdC508mzdvjuXLl8eKFSti+fLlsXjx4qipqdEY/pfi4uLo169f9O7dO/bZZ5/Yd999o6ysTGMSJJPJpJcsWfLn66677pfTp0/3mx8AAMAuIQAGAIAc99Of/nTIueeee3NpaWlf3UimxsbGWLlyZSxdujSWLVsWy5cvj3Xr1kUmk9GcZiKVSkWXLl1in332iT59+kSfPn2iV69eUVBQoDkJtXXr1sUPPvjgj6699tq/6wYAALArCYABAKAZaNeuXf64cePOGTp06BUFBQWtdST56uvrY+XKlf88KbxixYpYu3ZtpNNpzUm4vLy86Nq1a+yzzz7//KdXr17RsmVLzckBjY2NW/7617/+4pxzznm0srKySUcAAIBdTQAMAADNyIknntjmnnvuuXzfffcdk0qlHB3MMdu3b481a9bEmjVrYu3atbF27dooLy+PDRs2CIazUF5eXnTs2DG6desWXbt2jW7dukW3bt2iR48eUVhYqEE5JpPJNC5ZsuRR1z0DAAC7mwAYAACaoa9+9av7Xnfdddd16NDhCN3IfY2Njf8MhNetWxfr1q2LioqKWLduXWzbtk2DdrPS0tLo3LnzP//p0qVLdO3aNbp27eoK52Ziw4YNM//rv/7rxz/60Y+W6wYAALC7CYABAKAZ++UvfznirLPOuq64uNj3gZupmp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5YAGAAAaFa+9KUvdbv44ouP7t+//wlOBsMekamqqpq7cOHCv/z+97+fcd9995VrCQAAwO4jAAYAAJqtSy65pOtll112jDAYdrl0VVXVvIULF/7lV7/61bO/+93v1moJAADAniEABgAAiIirr766x/nnnz9q//33P7JNmzZDUqlUga7Ah5fJZBoqKyv/vnjx4uf+9Kc/zbr33ntX6woAAMCeJwAGAAB4l379+hV97WtfGzRy5MhRPXv2PLaoqKizrsD/VV9fv37VqlXPvPDCC8/9+7//+5zFixfX6woAAMDeJQAGAAB4H61bt8678847Bx599NFHde/efURpaen+4apomq/M1q1bF69Zs+bF5557btY3v/nNOdXV1WltAQAAyB4CYAAAgI9g8ODBrcaOHXvI8OHDD+vevfvw1q1bHxACYXJXprq6+s01a9a88sorr7z8k5/8ZN5rr71Wqy0AAADZSwAMAADwCVx//fX7nHHGGYf169dvePv27Yfm5+e31hWSrLGxsXrjxo2vvvXWWy+PHz/+lR//+McrdQUAACA5BMAAAAC70Je//OUe55xzzvA+ffoM7tix45CioqKuukI2q6+vX7t27doXFy9ePGfixImv3Xvvvat1BQAAILkEwAAAALvRl7/85R6f+cxnBvfr129Qly5dDm/ZsqVAmL2qrq5u7bp16wS+AAAAOUoADAAAsIe0atUq75prrtnn2GOPPXi//fY7uH379oeUlpb2TaVS+brDbpKuqalZtnHjxnlvvfXW3GeffXbef/3Xfy2vra1Naw0AAEBuEgADAADsRQceeGDLq6+++oAhQ4Yc3LNnz4Pbtm17sGuj+biampqqq6qqXi8vL583Z86ceb/85S/nvfjii1t1BgAAoPkQAAMAAGSZoUOHFn/xi1/cf9CgQQf26NHjwHbt2h3YqlWr3qlUKk932CFdU1OzvLKycsHq1asXzJkzZ8Gf//znJTNmzKjWGgAAgOZNAAwAAJAAxx13XNkFF1xw4MEHH3xA165dDywtLd23pKRkn1QqVag7uS2TyTRs27ZtRXV19dJ169YtfOONNxZOmDBh4YQJEzbpDgAAAO8mAAYAAEiw8847r+OJJ57Yp3///vt16dKlT5s2bfZr3b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AAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoMY3JP//9K8My551lzpAk293a7QAAAAAAAAD8iIw3r+SL7TpPxuSt4/ibJJuz20QDBgAAAAAAAHhzrJPp6NvHYcyyjLl7dJTPbl/Jp6sPLufSsM+5ec7q5YOrF0OeP/SVaAAAAAAAAIA3weH7u6zfm79dWDIMSw6225w785vsx3XyzasOby5ssz69c4sAAAAAAAAAr9n69C6bC9sT93a7rKdnORin5Otxynzi1JQcfiwCAwAAAAAAALxO69O7HH68TaaT98cp85R8vbp3Nfszv8q0LHn7xMF1sjk/ZzUPmZ/MmWefhAYAAAAAAAD4oayPdjn7223Gn7x6ZrXPnetX8mBKkpv3cufDd/Pufn5FL56SzcVtNheT3dNt8tQlAwAAAAAAAHyv1sm0ySv/9XtsNWZ3I/lHkgzHi7/4XY7WYz5yiwAAAAAAAAA/Ivtcv/3nPEyS1fHa42t5+vNLyX7JoRsCAAAAAAAAePPt1/nbV3/KvePn1Xc371/NYxEYAAAAAAAA4M0yTHk2rvNo2WdzvHZqzN9v/SF3vju3evng/at5fPDLPDu1yuGyZHSVAAAAAAAAAK/XOGe4ueSvZ4e8M8xZbVe5ceuPufvy3Oqkw4+v5emDX+fuuTlLhhwsEYIBAAAAAAAAXpclGR8OuXP0TR4cPM/9z/+SRyfNDf/1TZezOp/87KdjzizJZkhO7edMy/w/nAUAAAAAAADg/zaMWcZkP8/ZLsmLacr2/MV8+cnvs/tP5/4FmLjAq1ifcioAAAAASUVORK5CYII=";function getSmartParseNumber(e,t,a){if(typeof e==="string"&&!isNaN(Number(e)))e=Number(e);if(typeof e==="number"&&e<100)return inch2Emu(e);if(typeof e==="number"&&e>=100)return e;if(typeof e==="string"&&e.includes("%")){if(t&&t==="X")return Math.round(parseFloat(e)/100*a.width);if(t&&t==="Y")return Math.round(parseFloat(e)/100*a.height);return Math.round(parseFloat(e)/100*a.width)}return 0}function getUuid(e){return e.replace(/[xy]/g,(function(e){const t=Math.random()*16|0;const a=e==="x"?t:t&3|8;return a.toString(16)}))}function encodeXmlEntities(e){if(typeof e==="undefined"||e==null)return"";return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function inch2Emu(e){if(typeof e==="number"&&e>100)return e;if(typeof e==="string")e=Number(e.replace(/in*/gi,""));return Math.round(n*e)}function valToPts(e){const t=Number(e)||0;return isNaN(t)?0:Math.round(t*o)}function convertRotationDegrees(e){e=e||0;return Math.round((e>360?e-360:e)*6e4)}function componentToHex(e){const t=e.toString(16);return t.length===1?"0"+t:t}function rgbToHex(e,t,a){return(componentToHex(e)+componentToHex(t)+componentToHex(a)).toUpperCase()}function createColorElement(e,t){let a=(e||"").replace("#","");if(!l.test(a)&&a!==z.background1&&a!==z.background2&&a!==z.text1&&a!==z.text2&&a!==z.accent1&&a!==z.accent2&&a!==z.accent3&&a!==z.accent4&&a!==z.accent5&&a!==z.accent6){console.warn(`"${a}" is not a valid scheme color or hex RGB! "${h}" used instead. Only provide 6-digit RGB or 'pptx.SchemeColor' values!`);a=h}const r=l.test(a)?"srgbClr":"schemeClr";const n='val="'+(l.test(a)?a.toUpperCase():a)+'"';return t?`<a:${r} ${n}>${t}</a:${r}>`:`<a:${r} ${n}/>`}function createGlowElement(e,t){let a="";const r=Object.assign(Object.assign({},t),e);const n=Math.round(r.size*o);const i=r.color;const s=Math.round(r.opacity*1e5);a+=`<a:glow rad="${n}">`;a+=createColorElement(i,`<a:alpha val="${s}"/>`);a+="</a:glow>";return a}function genXmlColorSelection(e){let t="solid";let a="";let r="";let n="";if(e){if(typeof e==="string")a=e;else{if(e.type)t=e.type;if(e.color)a=e.color;if(e.alpha)r+=`<a:alpha val="${Math.round((100-e.alpha)*1e3)}"/>`;if(e.transparency)r+=`<a:alpha val="${Math.round((100-e.transparency)*1e3)}"/>`}switch(t){case"solid":n+=`<a:solidFill>${createColorElement(a,r)}</a:solidFill>`;break;default:n+="";break}}return n}function getNewRelId(e){return e._rels.length+e._relsChart.length+e._relsMedia.length+1}function correctShadowOptions(e){if(!e||typeof e!=="object"){return}if(e.type!=="outer"&&e.type!=="inner"&&e.type!=="none"){console.warn("Warning: shadow.type options are `outer`, `inner` or `none`.");e.type="outer"}if(e.angle){if(isNaN(Number(e.angle))||e.angle<0||e.angle>359){console.warn("Warning: shadow.angle can only be 0-359");e.angle=270}e.angle=Math.round(Number(e.angle))}if(e.opacity){if(isNaN(Number(e.opacity))||e.opacity<0||e.opacity>1){console.warn("Warning: shadow.opacity can only be 0-1");e.opacity=.75}e.opacity=Number(e.opacity)}if(e.color){if(e.color.startsWith("#")){console.warn('Warning: shadow.color should not include hash (#) character, , e.g. "FF0000"');e.color=e.color.replace("#","")}}return e}function parseTextToLines(e,t,a){var r,i;const s=2.3+(((r=e.options)===null||r===void 0?void 0:r.autoPageCharWeight)?e.options.autoPageCharWeight:0);const l=Math.floor(t/o*n)/((((i=e.options)===null||i===void 0?void 0:i.fontSize)?e.options.fontSize:m)/s);const c=[];let A=[];const d=[];const p=[];if(e.text&&e.text.toString().trim().length===0){A.push({_type:G.tablecell,text:" "})}else if(typeof e.text==="number"||typeof e.text==="string"){A.push({_type:G.tablecell,text:(e.text||"").toString().trim()})}else if(Array.isArray(e.text)){A=e.text}let u=[];A.forEach((e=>{var t;if(typeof e.text==="string"){if(e.text.split("\n").length>1){e.text.split("\n").forEach((t=>{u.push({_type:G.tablecell,text:t,options:Object.assign(Object.assign({},e.options),{breakLine:true})})}))}else{u.push({_type:G.tablecell,text:e.text.trim(),options:e.options})}if((t=e.options)===null||t===void 0?void 0:t.breakLine){d.push(u);u=[]}}if(u.length>0){d.push(u);u=[]}}));d.forEach((e=>{e.forEach((e=>{const t=[];const a=String(e.text);const r=a.split(" ");r.forEach(((a,n)=>{const o=Object.assign({},e.options);if(o===null||o===void 0?void 0:o.breakLine)o.breakLine=n+1===r.length;t.push({_type:G.tablecell,text:a+(n+1<r.length?" ":""),options:o})}));p.push(t)}))}));p.forEach((e=>{let t=[];let a="";e.forEach((e=>{if(a.length+e.text.length>l){c.push(t);t=[];a=""}t.push(e);a+=e.text.toString()}));if(t.length>0)c.push(t)}));return c}function getSlidesForTableRows(e=[],t={},a,r){let o=x;let i=n*1;let s=n*1;let l=0;let A=0;const d=[];const p=getSmartParseNumber(t.x,"X",a);const u=getSmartParseNumber(t.y,"Y",a);const f=getSmartParseNumber(t.w,"X",a);const h=getSmartParseNumber(t.h,"Y",a);let g=f;function calcSlideTabH(){let e=0;if(d.length===0)e=u||inch2Emu(o[0]);if(d.length>0)e=inch2Emu(t.autoPageSlideStartY||t.newSlideStartY||o[0]);s=(h||a.height)-e-inch2Emu(o[2]);if(d.length>1){if(typeof t.autoPageSlideStartY==="number"){s=(h||a.height)-inch2Emu(t.autoPageSlideStartY+o[2])}else if(typeof t.newSlideStartY==="number"){s=(h||a.height)-inch2Emu(t.newSlideStartY+o[2])}else if(u){s=(h||a.height)-inch2Emu((u/n<o[0]?u/n:o[0])+o[2]);if(s<h)s=h}}}if(t.verbose){console.log("[[VERBOSE MODE]]");console.log("|-- TABLE PROPS --------------------------------------------------------|");console.log(`| presLayout.width ................................ = ${(a.width/n).toFixed(1)}`);console.log(`| presLayout.height ............................... = ${(a.height/n).toFixed(1)}`);console.log(`| tableProps.x .................................... = ${typeof t.x==="number"?(t.x/n).toFixed(1):t.x}`);console.log(`| tableProps.y .................................... = ${typeof t.y==="number"?(t.y/n).toFixed(1):t.y}`);console.log(`| tableProps.w .................................... = ${typeof t.w==="number"?(t.w/n).toFixed(1):t.w}`);console.log(`| tableProps.h .................................... = ${typeof t.h==="number"?(t.h/n).toFixed(1):t.h}`);console.log(`| tableProps.slideMargin .......................... = ${t.slideMargin?String(t.slideMargin):""}`);console.log(`| tableProps.margin ............................... = ${String(t.margin)}`);console.log(`| tableProps.colW ................................. = ${String(t.colW)}`);console.log(`| tableProps.autoPageSlideStartY .................. = ${t.autoPageSlideStartY}`);console.log(`| tableProps.autoPageCharWeight ................... = ${t.autoPageCharWeight}`);console.log("|-- CALCULATIONS -------------------------------------------------------|");console.log(`| tablePropX ...................................... = ${p/n}`);console.log(`| tablePropY ...................................... = ${u/n}`);console.log(`| tablePropW ...................................... = ${f/n}`);console.log(`| tablePropH ...................................... = ${h/n}`);console.log(`| tableCalcW ...................................... = ${g/n}`)}{if(!t.slideMargin&&t.slideMargin!==0)t.slideMargin=x[0];if(r&&typeof r._margin!=="undefined"){if(Array.isArray(r._margin))o=r._margin;else if(!isNaN(Number(r._margin))){o=[Number(r._margin),Number(r._margin),Number(r._margin),Number(r._margin)]}}else if(t.slideMargin||t.slideMargin===0){if(Array.isArray(t.slideMargin))o=t.slideMargin;else if(!isNaN(t.slideMargin))o=[t.slideMargin,t.slideMargin,t.slideMargin,t.slideMargin]}if(t.verbose)console.log(`| arrInchMargins .................................. = [${o.join(", ")}]`)}{const a=e[0]||[];a.forEach((e=>{if(!e)e={_type:G.tablecell};const t=e.options||null;A+=Number((t===null||t===void 0?void 0:t.colspan)?t.colspan:1)}));if(t.verbose)console.log(`| numCols ......................................... = ${A}`)}if(!f&&t.colW){g=Array.isArray(t.colW)?t.colW.reduce(((e,t)=>e+t))*n:t.colW*A||0;if(t.verbose)console.log(`| tableCalcW ...................................... = ${g/n}`)}{i=g||inch2Emu((p?p/n:o[1])+o[3]);if(t.verbose)console.log(`| emuSlideTabW .................................... = ${(i/n).toFixed(1)}`)}if(!t.colW||!Array.isArray(t.colW)){if(t.colW&&!isNaN(Number(t.colW))){const a=[];const r=e[0]||[];r.forEach((()=>a.push(t.colW)));t.colW=[];a.forEach((e=>{if(Array.isArray(t.colW))t.colW.push(e)}))}else{t.colW=[];for(let e=0;e<A;e++){t.colW.push(i/n/A)}}}let v={rows:[]};e.forEach(((e,a)=>{const r=[];let o=0;let i=0;let A=[];e.forEach((e=>{var a,r,n,s;A.push({_type:G.tablecell,text:[],options:e.options});if(e.options.margin&&e.options.margin[0]>=1){if(((a=e.options)===null||a===void 0?void 0:a.margin)&&e.options.margin[0]&&valToPts(e.options.margin[0])>o)o=valToPts(e.options.margin[0]);else if((t===null||t===void 0?void 0:t.margin)&&t.margin[0]&&valToPts(t.margin[0])>o)o=valToPts(t.margin[0]);if(((r=e.options)===null||r===void 0?void 0:r.margin)&&e.options.margin[2]&&valToPts(e.options.margin[2])>i)i=valToPts(e.options.margin[2]);else if((t===null||t===void 0?void 0:t.margin)&&t.margin[2]&&valToPts(t.margin[2])>i)i=valToPts(t.margin[2])}else{if(((n=e.options)===null||n===void 0?void 0:n.margin)&&e.options.margin[0]&&inch2Emu(e.options.margin[0])>o)o=inch2Emu(e.options.margin[0]);else if((t===null||t===void 0?void 0:t.margin)&&t.margin[0]&&inch2Emu(t.margin[0])>o)o=inch2Emu(t.margin[0]);if(((s=e.options)===null||s===void 0?void 0:s.margin)&&e.options.margin[2]&&inch2Emu(e.options.margin[2])>i)i=inch2Emu(e.options.margin[2]);else if((t===null||t===void 0?void 0:t.margin)&&t.margin[2]&&inch2Emu(t.margin[2])>i)i=inch2Emu(t.margin[2])}}));calcSlideTabH();l+=o+i;if(t.verbose&&a===0)console.log(`| SLIDE [${d.length}]: emuSlideTabH ...... = ${(s/n).toFixed(1)} `);e.forEach(((e,a)=>{var n;const o={_type:G.tablecell,_lines:null,_lineHeight:inch2Emu((((n=e.options)===null||n===void 0?void 0:n.fontSize)?e.options.fontSize:t.fontSize?t.fontSize:m)*(c+(t.autoPageLineWeight?t.autoPageLineWeight:0))/100),text:[],options:e.options};if(o.options.rowspan)o._lineHeight=0;o.options.autoPageCharWeight=t.autoPageCharWeight?t.autoPageCharWeight:null;let i=t.colW[a];if(e.options.colspan&&Array.isArray(t.colW)){i=t.colW.filter(((t,r)=>r>=a&&r<r+e.options.colspan)).reduce(((e,t)=>e+t))}o._lines=parseTextToLines(e,i);r.push(o)}));if(t.verbose)console.log(`\n| SLIDE [${d.length}]: ROW [${a}]: START...`);let p=0;let u=0;let f=false;while(!f){const a=r[p];let c=A[p];r.forEach((e=>{if(e._lineHeight>=u)u=e._lineHeight}));if(l+u>s){if(t.verbose){console.log("\n|-----------------------------------------------------------------------|");console.log(`|-- NEW SLIDE CREATED (currTabH+currLineH > maxH) => ${(l/n).toFixed(2)} + ${(a._lineHeight/n).toFixed(2)} > ${s/n}`);console.log("|-----------------------------------------------------------------------|\n\n")}if(A.length>0&&A.map((e=>e.text.length)).reduce(((e,t)=>e+t))>0)v.rows.push(A);d.push(v);const r=[];v={rows:r};A=[];e.forEach((e=>A.push({_type:G.tablecell,text:[],options:e.options})));calcSlideTabH();l+=o+i;if(t.verbose)console.log(`| SLIDE [${d.length}]: emuSlideTabH ...... = ${(s/n).toFixed(1)} `);l=0;if((t.addHeaderToEach||t.autoPageRepeatHeader)&&t._arrObjTabHeadRows){t._arrObjTabHeadRows.forEach((e=>{const t=[];let a=0;e.forEach((e=>{t.push(e);if(e._lineHeight>a)a=e._lineHeight}));v.rows.push(t);l+=a}))}c=A[p]}const h=a._lines.shift();if(Array.isArray(c.text)){if(h)c.text=c.text.concat(h);else if(c.text.length===0)c.text=c.text.concat({_type:G.tablecell,text:""})}if(p===r.length-1)l+=u;p=p<r.length-1?p+1:0;const m=r.map((e=>e._lines.length)).reduce(((e,t)=>e+t));if(m===0)f=true}if(A.length>0)v.rows.push(A);if(t.verbose){console.log(`- SLIDE [${d.length}]: ROW [${a}]: ...COMPLETE ...... emuTabCurrH = ${(l/n).toFixed(2)} ( emuSlideTabH = ${(s/n).toFixed(2)} )`)}}));d.push(v);if(t.verbose){console.log("\n|================================================|");console.log(`| FINAL: tableRowSlides.length = ${d.length}`);d.forEach((e=>console.log(e)));console.log("|================================================|\n\n")}return d}function genTableToSlides(e,t,a={},r){const o=a||{};o.slideMargin=o.slideMargin||o.slideMargin===0?o.slideMargin:.5;let i=o.w||e.presLayout.width;const s=[];const l=[];const c=[];const A=[];const d=[];let p=[.5,.5,.5,.5];let u=0;if(!document.getElementById(t))throw new Error('tableToSlides: Table ID "'+t+'" does not exist!');if(r===null||r===void 0?void 0:r._margin){if(Array.isArray(r._margin))p=r._margin;else if(!isNaN(r._margin))p=[r._margin,r._margin,r._margin,r._margin];o.slideMargin=p}else if(o===null||o===void 0?void 0:o.slideMargin){if(Array.isArray(o.slideMargin))p=o.slideMargin;else if(!isNaN(o.slideMargin))p=[o.slideMargin,o.slideMargin,o.slideMargin,o.slideMargin]}i=(o.w?inch2Emu(o.w):e.presLayout.width)-inch2Emu(p[1]+p[3]);if(o.verbose){console.log("[[VERBOSE MODE]]");console.log("|-- `tableToSlides` ----------------------------------------------------|");console.log(`| tableProps.h .................................... = ${o.h}`);console.log(`| tableProps.w .................................... = ${o.w}`);console.log(`| pptx.presLayout.width ........................... = ${(e.presLayout.width/n).toFixed(1)}`);console.log(`| pptx.presLayout.height .......................... = ${(e.presLayout.height/n).toFixed(1)}`);console.log(`| emuSlideTabW .................................... = ${(i/n).toFixed(1)}`)}let f=document.querySelectorAll(`#${t} tr:first-child th`);if(f.length===0)f=document.querySelectorAll(`#${t} tr:first-child td`);f.forEach((e=>{const t=e;if(t.getAttribute("colspan")){for(let e=0;e<Number(t.getAttribute("colspan"));e++){d.push(Math.round(t.offsetWidth/Number(t.getAttribute("colspan"))))}}else{d.push(t.offsetWidth)}}));d.forEach((e=>{u+=e}));d.forEach(((e,a)=>{const r=Number((Number(i)*(e/u*100)/100/n).toFixed(2));let o=0;const s=document.querySelector(`#${t} thead tr:first-child th:nth-child(${a+1})`);if(s)o=Number(s.getAttribute("data-pptx-min-width"));const l=document.querySelector(`#${t} thead tr:first-child th:nth-child(${a+1})`);if(l)o=Number(l.getAttribute("data-pptx-width"));A.push(o>r?o:r)}));if(o.verbose){console.log(`| arrColW ......................................... = [${A.join(", ")}]`)}const h=["thead","tbody","tfoot"];h.forEach((e=>{document.querySelectorAll(`#${t} ${e} tr`).forEach((t=>{const a=t;const r=[];Array.from(a.cells).forEach((e=>{const t=window.getComputedStyle(e).getPropertyValue("color").replace(/\s+/gi,"").replace("rgba(","").replace("rgb(","").replace(")","").split(",");let a=window.getComputedStyle(e).getPropertyValue("background-color").replace(/\s+/gi,"").replace("rgba(","").replace("rgb(","").replace(")","").split(",");if(window.getComputedStyle(e).getPropertyValue("background-color")==="rgba(0, 0, 0, 0)"||window.getComputedStyle(e).getPropertyValue("transparent")){a=["255","255","255"]}const n={align:null,bold:!!(window.getComputedStyle(e).getPropertyValue("font-weight")==="bold"||Number(window.getComputedStyle(e).getPropertyValue("font-weight"))>=500),border:null,color:rgbToHex(Number(t[0]),Number(t[1]),Number(t[2])),fill:{color:rgbToHex(Number(a[0]),Number(a[1]),Number(a[2]))},fontFace:(window.getComputedStyle(e).getPropertyValue("font-family")||"").split(",")[0].replace(/"/g,"").replace("inherit","").replace("initial","")||null,fontSize:Number(window.getComputedStyle(e).getPropertyValue("font-size").replace(/[a-z]/gi,"")),margin:null,colspan:Number(e.getAttribute("colspan"))||null,rowspan:Number(e.getAttribute("rowspan"))||null,valign:null};if(["left","center","right","start","end"].includes(window.getComputedStyle(e).getPropertyValue("text-align"))){const t=window.getComputedStyle(e).getPropertyValue("text-align").replace("start","left").replace("end","right");n.align=t==="center"?"center":t==="left"?"left":t==="right"?"right":null}if(["top","middle","bottom"].includes(window.getComputedStyle(e).getPropertyValue("vertical-align"))){const t=window.getComputedStyle(e).getPropertyValue("vertical-align");n.valign=t==="top"?"top":t==="middle"?"middle":t==="bottom"?"bottom":null}if(window.getComputedStyle(e).getPropertyValue("padding-left")){n.margin=[0,0,0,0];const t=["padding-top","padding-right","padding-bottom","padding-left"];t.forEach(((t,a)=>{n.margin[a]=Math.round(Number(window.getComputedStyle(e).getPropertyValue(t).replace(/\D/gi,"")))}))}if(window.getComputedStyle(e).getPropertyValue("border-top-width")||window.getComputedStyle(e).getPropertyValue("border-right-width")||window.getComputedStyle(e).getPropertyValue("border-bottom-width")||window.getComputedStyle(e).getPropertyValue("border-left-width")){n.border=[null,null,null,null];const t=["top","right","bottom","left"];t.forEach(((t,a)=>{const r=Math.round(Number(window.getComputedStyle(e).getPropertyValue("border-"+t+"-width").replace("px","")));let o=[];o=window.getComputedStyle(e).getPropertyValue("border-"+t+"-color").replace(/\s+/gi,"").replace("rgba(","").replace("rgb(","").replace(")","").split(",");const i=rgbToHex(Number(o[0]),Number(o[1]),Number(o[2]));n.border[a]={pt:r,color:i}}))}r.push({_type:G.tablecell,text:e.innerText,options:n})}));switch(e){case"thead":s.push(r);break;case"tbody":l.push(r);break;case"tfoot":c.push(r);break;default:console.log(`table parsing: unexpected table part: ${e}`);break}}))}));o._arrObjTabHeadRows=s||null;o.colW=A;getSlidesForTableRows([...s,...l,...c],o,e.presLayout,r).forEach(((t,a)=>{const r=e.addSlide({masterName:o.masterSlideName||null});if(a===0)o.y=o.y||p[0];if(a>0)o.y=o.autoPageSlideStartY||o.newSlideStartY||p[0];if(o.verbose)console.log(`| opts.autoPageSlideStartY: ${o.autoPageSlideStartY} / arrInchMargins[0]: ${p[0]} => opts.y = ${o.y}`);r.addTable(t.rows,{x:o.x||p[3],y:o.y,w:Number(i)/n,colW:A,autoPage:false});if(o.addImage){o.addImage.options=o.addImage.options||{};if(!o.addImage.image||!o.addImage.image.path&&!o.addImage.image.data){console.warn("Warning: tableToSlides.addImage requires either `path` or `data`")}else{r.addImage({path:o.addImage.image.path,data:o.addImage.image.data,x:o.addImage.options.x,y:o.addImage.options.y,w:o.addImage.options.w,h:o.addImage.options.h})}}if(o.addShape)r.addShape(o.addShape.shapeName,o.addShape.options||{});if(o.addTable)r.addTable(o.addTable.rows,o.addTable.options||{});if(o.addText)r.addText(o.addText.text,o.addText.options||{})}))}let J=0;function createSlideMaster(e,t){if(e.bkgd)t.bkgd=e.bkgd;if(e.objects&&Array.isArray(e.objects)&&e.objects.length>0){e.objects.forEach(((e,a)=>{const r=Object.keys(e)[0];const n=t;if(q[r]&&r==="chart")addChartDefinition(n,e[r].type,e[r].data,e[r].opts);else if(q[r]&&r==="image")addImageDefinition(n,e[r]);else if(q[r]&&r==="line")addShapeDefinition(n,j.LINE,e[r]);else if(q[r]&&r==="rect")addShapeDefinition(n,j.RECTANGLE,e[r]);else if(q[r]&&r==="text")addTextDefinition(n,[{text:e[r].text}],e[r].options,false);else if(q[r]&&r==="placeholder"){e[r].options.placeholder=e[r].options.name;delete e[r].options.name;e[r].options._placeholderType=e[r].options.type;delete e[r].options.type;e[r].options._placeholderIdx=100+a;addTextDefinition(n,[{text:e[r].text}],e[r].options,true)}}))}if(e.slideNumber&&typeof e.slideNumber==="object")t._slideNumberProps=e.slideNumber}function addChartDefinition(e,t,a,r){var n;function correctGridLineOptions(e){if(!e||e.style==="none")return;if(e.size!==undefined&&(isNaN(Number(e.size))||e.size<=0)){console.warn("Warning: chart.gridLine.size must be greater than 0.");delete e.size}if(e.style&&!["solid","dash","dot"].includes(e.style)){console.warn("Warning: chart.gridLine.style options: `solid`, `dash`, `dot`.");delete e.style}if(e.cap&&!["flat","square","round"].includes(e.cap)){console.warn("Warning: chart.gridLine.cap options: `flat`, `square`, `round`.");delete e.cap}}const o=++J;const i={_type:null,text:null,options:null,chartRid:null};let s=null;let l=[];if(Array.isArray(t)){t.forEach((e=>{l=l.concat(e.data)}));s=a||r}else{l=a;s=r}l.forEach(((e,t)=>{e._dataIndex=t;if(e.labels!==undefined&&!Array.isArray(e.labels[0])){e.labels=[e.labels]}}));const c=s&&typeof s==="object"?s:{};c._type=t;c.x=typeof c.x!=="undefined"&&c.x!=null&&!isNaN(Number(c.x))?c.x:1;c.y=typeof c.y!=="undefined"&&c.y!=null&&!isNaN(Number(c.y))?c.y:1;c.w=c.w||"50%";c.h=c.h||"50%";c.objectName=c.objectName?encodeXmlEntities(c.objectName):`Chart ${e._slideObjects.filter((e=>e._type===G.chart)).length}`;if(!["bar","col"].includes(c.barDir||""))c.barDir="col";if(c._type===W.AREA){if(!["stacked","standard","percentStacked"].includes(c.barGrouping||""))c.barGrouping="standard"}if(c._type===W.BAR){if(!["clustered","stacked","percentStacked"].includes(c.barGrouping||""))c.barGrouping="clustered"}if(c._type===W.BAR3D){if(!["clustered","stacked","standard","percentStacked"].includes(c.barGrouping||""))c.barGrouping="standard"}if((n=c.barGrouping)===null||n===void 0?void 0:n.includes("tacked")){if(!c.barGapWidthPct)c.barGapWidthPct=50}if(c.dataLabelPosition){if(c._type===W.AREA||c._type===W.BAR3D||c._type===W.DOUGHNUT||c._type===W.RADAR){delete c.dataLabelPosition}if(c._type===W.PIE){if(!["bestFit","ctr","inEnd","outEnd"].includes(c.dataLabelPosition))delete c.dataLabelPosition}if(c._type===W.BUBBLE||c._type===W.BUBBLE3D||c._type===W.LINE||c._type===W.SCATTER){if(!["b","ctr","l","r","t"].includes(c.dataLabelPosition))delete c.dataLabelPosition}if(c._type===W.BAR){if(!["stacked","percentStacked"].includes(c.barGrouping||"")){if(!["ctr","inBase","inEnd"].includes(c.dataLabelPosition))delete c.dataLabelPosition}if(!["clustered"].includes(c.barGrouping||"")){if(!["ctr","inBase","inEnd","outEnd"].includes(c.dataLabelPosition))delete c.dataLabelPosition}}}c.dataLabelBkgrdColors=c.dataLabelBkgrdColors||!c.dataLabelBkgrdColors?c.dataLabelBkgrdColors:false;if(!["b","l","r","t","tr"].includes(c.legendPos||""))c.legendPos="r";if(!["cone","coneToMax","box","cylinder","pyramid","pyramidToMax"].includes(c.bar3DShape||""))c.bar3DShape="box";if(!["circle","dash","diamond","dot","none","square","triangle"].includes(c.lineDataSymbol||""))c.lineDataSymbol="circle";if(!["gap","span"].includes(c.displayBlanksAs||""))c.displayBlanksAs="span";if(!["standard","marker","filled"].includes(c.radarStyle||""))c.radarStyle="standard";c.lineDataSymbolSize=c.lineDataSymbolSize&&!isNaN(c.lineDataSymbolSize)?c.lineDataSymbolSize:6;c.lineDataSymbolLineSize=c.lineDataSymbolLineSize&&!isNaN(c.lineDataSymbolLineSize)?valToPts(c.lineDataSymbolLineSize):valToPts(.75);if(c.layout){["x","y","w","h"].forEach((e=>{const t=c.layout[e];if(isNaN(Number(t))||t<0||t>1){console.warn("Warning: chart.layout."+e+" can only be 0-1");delete c.layout[e]}}))}c.catGridLine=c.catGridLine||(c._type===W.SCATTER?{color:"D9D9D9",size:1}:{style:"none"});c.valGridLine=c.valGridLine||(c._type===W.SCATTER?{color:"D9D9D9",size:1}:{});c.serGridLine=c.serGridLine||(c._type===W.SCATTER?{color:"D9D9D9",size:1}:{style:"none"});correctGridLineOptions(c.catGridLine);correctGridLineOptions(c.valGridLine);correctGridLineOptions(c.serGridLine);correctShadowOptions(c.shadow);c.showDataTable=c.showDataTable||!c.showDataTable?c.showDataTable:false;c.showDataTableHorzBorder=c.showDataTableHorzBorder||!c.showDataTableHorzBorder?c.showDataTableHorzBorder:true;c.showDataTableVertBorder=c.showDataTableVertBorder||!c.showDataTableVertBorder?c.showDataTableVertBorder:true;c.showDataTableOutline=c.showDataTableOutline||!c.showDataTableOutline?c.showDataTableOutline:true;c.showDataTableKeys=c.showDataTableKeys||!c.showDataTableKeys?c.showDataTableKeys:true;c.showLabel=c.showLabel||!c.showLabel?c.showLabel:false;c.showLegend=c.showLegend||!c.showLegend?c.showLegend:false;c.showPercent=c.showPercent||!c.showPercent?c.showPercent:true;c.showTitle=c.showTitle||!c.showTitle?c.showTitle:false;c.showValue=c.showValue||!c.showValue?c.showValue:false;c.showLeaderLines=c.showLeaderLines||!c.showLeaderLines?c.showLeaderLines:false;c.catAxisLineShow=typeof c.catAxisLineShow!=="undefined"?c.catAxisLineShow:true;c.valAxisLineShow=typeof c.valAxisLineShow!=="undefined"?c.valAxisLineShow:true;c.serAxisLineShow=typeof c.serAxisLineShow!=="undefined"?c.serAxisLineShow:true;c.v3DRotX=!isNaN(c.v3DRotX)&&c.v3DRotX>=-90&&c.v3DRotX<=90?c.v3DRotX:30;c.v3DRotY=!isNaN(c.v3DRotY)&&c.v3DRotY>=0&&c.v3DRotY<=360?c.v3DRotY:30;c.v3DRAngAx=c.v3DRAngAx||!c.v3DRAngAx?c.v3DRAngAx:true;c.v3DPerspective=!isNaN(c.v3DPerspective)&&c.v3DPerspective>=0&&c.v3DPerspective<=240?c.v3DPerspective:30;c.barGapWidthPct=!isNaN(c.barGapWidthPct)&&c.barGapWidthPct>=0&&c.barGapWidthPct<=1e3?c.barGapWidthPct:150;c.barGapDepthPct=!isNaN(c.barGapDepthPct)&&c.barGapDepthPct>=0&&c.barGapDepthPct<=1e3?c.barGapDepthPct:150;c.chartColors=Array.isArray(c.chartColors)?c.chartColors:c._type===W.PIE||c._type===W.DOUGHNUT?D:B;c.chartColorsOpacity=c.chartColorsOpacity&&!isNaN(c.chartColorsOpacity)?c.chartColorsOpacity:null;c.border=c.border&&typeof c.border==="object"?c.border:null;if(c.border&&(!c.border.pt||isNaN(c.border.pt)))c.border.pt=u.pt;if(c.border&&(!c.border.color||typeof c.border.color!=="string"))c.border.color=u.color;c.plotArea=c.plotArea||{};c.plotArea.border=c.plotArea.border&&typeof c.plotArea.border==="object"?c.plotArea.border:null;if(c.plotArea.border&&(!c.plotArea.border.pt||isNaN(c.plotArea.border.pt)))c.plotArea.border.pt=u.pt;if(c.plotArea.border&&(!c.plotArea.border.color||typeof c.plotArea.border.color!=="string")){c.plotArea.border.color=u.color}if(c.border)c.plotArea.border=c.border;c.plotArea.fill=c.plotArea.fill||{color:null,transparency:null};if(c.fill)c.plotArea.fill.color=c.fill;c.chartArea=c.chartArea||{};c.chartArea.border=c.chartArea.border&&typeof c.chartArea.border==="object"?c.chartArea.border:null;if(c.chartArea.border){c.chartArea.border={color:c.chartArea.border.color||u.color,pt:c.chartArea.border.pt||u.pt}}c.chartArea.roundedCorners=typeof c.chartArea.roundedCorners==="boolean"?c.chartArea.roundedCorners:true;c.dataBorder=c.dataBorder&&typeof c.dataBorder==="object"?c.dataBorder:null;if(c.dataBorder&&(!c.dataBorder.pt||isNaN(c.dataBorder.pt)))c.dataBorder.pt=.75;if(c.dataBorder&&c.dataBorder.color){const e=typeof c.dataBorder.color==="string"&&c.dataBorder.color.length===6&&/^[0-9A-Fa-f]{6}$/.test(c.dataBorder.color);const t=Object.values(X).includes(c.dataBorder.color);if(!e&&!t){c.dataBorder.color="F9F9F9"}}if(!c.dataLabelFormatCode&&c._type===W.SCATTER)c.dataLabelFormatCode="General";if(!c.dataLabelFormatCode&&(c._type===W.PIE||c._type===W.DOUGHNUT)){c.dataLabelFormatCode=c.showPercent?"0%":"General"}c.dataLabelFormatCode=c.dataLabelFormatCode&&typeof c.dataLabelFormatCode==="string"?c.dataLabelFormatCode:"#,##0";if(!c.dataLabelFormatScatter&&c._type===W.SCATTER)c.dataLabelFormatScatter="custom";c.lineSize=typeof c.lineSize==="number"?c.lineSize:2;c.valAxisMajorUnit=typeof c.valAxisMajorUnit==="number"?c.valAxisMajorUnit:null;if(c._type===W.AREA||c._type===W.BAR||c._type===W.BAR3D||c._type===W.LINE){c.catAxisMultiLevelLabels=!!c.catAxisMultiLevelLabels}else{delete c.catAxisMultiLevelLabels}i._type="chart";i.options=c;i.chartRid=getNewRelId(e);e._relsChart.push({rId:getNewRelId(e),data:l,opts:c,type:c._type,globalId:o,fileName:`chart${o}.xml`,Target:`/ppt/charts/chart${o}.xml`});e._slideObjects.push(i);return i}function addImageDefinition(e,t){const a={_type:null,text:null,options:null,image:null,imageRid:null,hyperlink:null};const r=t.x||0;const n=t.y||0;const o=t.w||0;const i=t.h||0;const s=t.sizing||null;const l=t.hyperlink||"";const c=t.data||"";const A=t.path||"";let d=getNewRelId(e);const p=t.objectName?encodeXmlEntities(t.objectName):`Image ${e._slideObjects.filter((e=>e._type===G.image)).length}`;if(!A&&!c){console.error("ERROR: addImage() requires either 'data' or 'path' parameter!");return null}else if(A&&typeof A!=="string"){console.error(`ERROR: addImage() 'path' should be a string, ex: {path:'/img/sample.png'} - you sent ${String(A)}`);return null}else if(c&&typeof c!=="string"){console.error(`ERROR: addImage() 'data' should be a string, ex: {data:'image/png;base64,NMP[...]'} - you sent ${String(c)}`);return null}else if(c&&typeof c==="string"&&!c.toLowerCase().includes("base64,")){console.error("ERROR: Image `data` value lacks a base64 header! Ex: 'image/png;base64,NMP[...]')");return null}let u=(A.substring(A.lastIndexOf("/")+1).split("?")[0].split(".").pop().split("#")[0]||"png").toLowerCase();if(c&&/image\/(\w+);/.exec(c)&&/image\/(\w+);/.exec(c).length>0){u=/image\/(\w+);/.exec(c)[1]}else if(c===null||c===void 0?void 0:c.toLowerCase().includes("image/svg+xml")){u="svg"}a._type=G.image;a.image=A||"preencoded.png";a.options={x:r||0,y:n||0,w:o||1,h:i||1,altText:t.altText||"",rounding:typeof t.rounding==="boolean"?t.rounding:false,sizing:s,placeholder:t.placeholder,rotate:t.rotate||0,flipV:t.flipV||false,flipH:t.flipH||false,transparency:t.transparency||0,objectName:p,shadow:correctShadowOptions(t.shadow)};if(u==="svg"){e._relsMedia.push({path:A||c+"png",type:"image/png",extn:"png",data:c||"",rId:d,Target:`../media/image-${e._slideNum}-${e._relsMedia.length+1}.png`,isSvgPng:true,svgSize:{w:getSmartParseNumber(a.options.w,"X",e._presLayout),h:getSmartParseNumber(a.options.h,"Y",e._presLayout)}});a.imageRid=d;e._relsMedia.push({path:A||c,type:"image/svg+xml",extn:u,data:c||"",rId:d+1,Target:`../media/image-${e._slideNum}-${e._relsMedia.length+1}.${u}`});a.imageRid=d+1}else{const t=e._relsMedia.filter((e=>e.path&&e.path===A&&e.type==="image/"+u&&!e.isDuplicate))[0];e._relsMedia.push({path:A||"preencoded."+u,type:"image/"+u,extn:u,data:c||"",rId:d,isDuplicate:!!(t===null||t===void 0?void 0:t.Target),Target:(t===null||t===void 0?void 0:t.Target)?t.Target:`../media/image-${e._slideNum}-${e._relsMedia.length+1}.${u}`});a.imageRid=d}if(typeof l==="object"){if(!l.url&&!l.slide)throw new Error("ERROR: `hyperlink` option requires either: `url` or `slide`");else{d++;e._rels.push({type:G.hyperlink,data:l.slide?"slide":"dummy",rId:d,Target:l.url||l.slide.toString()});l._rId=d;a.hyperlink=l}}e._slideObjects.push(a)}function addMediaDefinition(e,t){const a=t.x||0;const r=t.y||0;const n=t.w||2;const o=t.h||2;const i=t.data||"";const s=t.link||"";const l=t.path||"";const c=t.type||"audio";let A="";const d=t.cover||V;const p=t.objectName?encodeXmlEntities(t.objectName):`Media ${e._slideObjects.filter((e=>e._type===G.media)).length}`;const u={_type:G.media};if(!l&&!i&&c!=="online"){throw new Error("addMedia() error: either `data` or `path` are required!")}else if(i&&!i.toLowerCase().includes("base64,")){throw new Error("addMedia() error: `data` value lacks a base64 header! Ex: 'video/mpeg;base64,NMP[...]')")}else if(!d.toLowerCase().includes("base64,")){throw new Error("addMedia() error: `cover` value lacks a base64 header! Ex: 'data:image/png;base64,iV[...]')")}if(c==="online"&&!s){throw new Error("addMedia() error: online videos require `link` value")}A=t.extn||(i?i.split(";")[0].split("/")[1]:l.split(".").pop())||"mp3";u.mtype=c;u.media=l||"preencoded.mov";u.options={};u.options.x=a;u.options.y=r;u.options.w=n;u.options.h=o;u.options.objectName=p;if(c==="online"){const t=getNewRelId(e);e._relsMedia.push({path:l||"preencoded"+A,data:"dummy",type:"online",extn:A,rId:t,Target:s});u.mediaRid=t;e._relsMedia.push({path:"preencoded.png",data:d,type:"image/png",extn:"png",rId:getNewRelId(e),Target:`../media/image-${e._slideNum}-${e._relsMedia.length+1}.png`})}else{const t=e._relsMedia.filter((e=>e.path&&e.path===l&&e.type===c+"/"+A&&!e.isDuplicate))[0];const a=getNewRelId(e);e._relsMedia.push({path:l||"preencoded"+A,type:c+"/"+A,extn:A,data:i||"",rId:a,isDuplicate:!!(t===null||t===void 0?void 0:t.Target),Target:(t===null||t===void 0?void 0:t.Target)?t.Target:`../media/media-${e._slideNum}-${e._relsMedia.length+1}.${A}`});u.mediaRid=a;e._relsMedia.push({path:l||"preencoded"+A,type:c+"/"+A,extn:A,data:i||"",rId:getNewRelId(e),isDuplicate:!!(t===null||t===void 0?void 0:t.Target),Target:(t===null||t===void 0?void 0:t.Target)?t.Target:`../media/media-${e._slideNum}-${e._relsMedia.length+0}.${A}`});e._relsMedia.push({path:"preencoded.png",type:"image/png",extn:"png",data:d,rId:getNewRelId(e),Target:`../media/image-${e._slideNum}-${e._relsMedia.length+1}.png`})}e._slideObjects.push(u)}function addNotesDefinition(e,t){e._slideObjects.push({_type:G.notes,text:[{text:t}]})}function addShapeDefinition(e,t,a){const r=typeof a==="object"?a:{};r.line=r.line||{type:"none"};const n={_type:G.text,shape:t||j.RECTANGLE,options:r,text:null};if(!t)throw new Error("Missing/Invalid shape parameter! Example: `addShape(pptxgen.shapes.LINE, {x:1, y:1, w:1, h:1});`");const o={type:r.line.type||"solid",color:r.line.color||y,transparency:r.line.transparency||0,width:r.line.width||1,dashType:r.line.dashType||"solid",beginArrowType:r.line.beginArrowType||null,endArrowType:r.line.endArrowType||null};if(typeof r.line==="object"&&r.line.type!=="none")r.line=o;r.x=r.x||(r.x===0?0:1);r.y=r.y||(r.y===0?0:1);r.w=r.w||(r.w===0?0:1);r.h=r.h||(r.h===0?0:1);r.objectName=r.objectName?encodeXmlEntities(r.objectName):`Shape ${e._slideObjects.filter((e=>e._type===G.text)).length}`;if(typeof r.line==="string"){const e=o;e.color=String(r.line);r.line=e}if(typeof r.lineSize==="number")r.line.width=r.lineSize;if(typeof r.lineDash==="string")r.line.dashType=r.lineDash;if(typeof r.lineHead==="string")r.line.beginArrowType=r.lineHead;if(typeof r.lineTail==="string")r.line.endArrowType=r.lineTail;createHyperlinkRels(e,n);e._slideObjects.push(n)}function addTableDefinition(e,t,a,r,o,i,s){const l=[e];const c=a&&typeof a==="object"?a:{};c.objectName=c.objectName?encodeXmlEntities(c.objectName):`Table ${e._slideObjects.filter((e=>e._type===G.table)).length}`;{if(t===null||t.length===0||!Array.isArray(t)){throw new Error("addTable: Array expected! EX: 'slide.addTable( [rows], {options} );' (https://gitbrent.github.io/PptxGenJS/docs/api-tables.html)")}if(!t[0]||!Array.isArray(t[0])){throw new Error("addTable: 'rows' should be an array of cells! EX: 'slide.addTable( [ ['A'], ['B'], {text:'C',options:{align:'center'}} ] );' (https://gitbrent.github.io/PptxGenJS/docs/api-tables.html)")}}const A=[];t.forEach((e=>{const t=[];if(Array.isArray(e)){e.forEach((e=>{const a={_type:G.tablecell,text:"",options:typeof e==="object"&&e.options?e.options:{}};if(typeof e==="string"||typeof e==="number")a.text=e.toString();else if(e.text){if(typeof e.text==="string"||typeof e.text==="number")a.text=e.text.toString();else if(e.text)a.text=e.text;if(e.options&&typeof e.options==="object")a.options=e.options}a.options.border=a.options.border||c.border||[{type:"none"},{type:"none"},{type:"none"},{type:"none"}];const r=a.options.border;if(!Array.isArray(r)&&typeof r==="object")a.options.border=[r,r,r,r];if(!a.options.border[0])a.options.border[0]={type:"none"};if(!a.options.border[1])a.options.border[1]={type:"none"};if(!a.options.border[2])a.options.border[2]={type:"none"};if(!a.options.border[3])a.options.border[3]={type:"none"};const n=[0,1,2,3];n.forEach((e=>{a.options.border[e]={type:a.options.border[e].type||d.type,color:a.options.border[e].color||d.color,pt:typeof a.options.border[e].pt==="number"?a.options.border[e].pt:d.pt}}));t.push(a)}))}else{console.log("addTable: tableRows has a bad row. A row should be an array of cells. You provided:");console.log(e)}A.push(t)}));c.x=getSmartParseNumber(c.x||(c.x===0?0:n/2),"X",o);c.y=getSmartParseNumber(c.y||(c.y===0?0:n/2),"Y",o);if(c.h)c.h=getSmartParseNumber(c.h,"Y",o);c.fontSize=c.fontSize||m;c.margin=c.margin===0||c.margin?c.margin:p;if(typeof c.margin==="number")c.margin=[Number(c.margin),Number(c.margin),Number(c.margin),Number(c.margin)];if(JSON.stringify({arrRows:A}).indexOf("hyperlink")===-1){if(!c.color)c.color=c.color||h}if(typeof c.border==="string"){console.warn("addTable `border` option must be an object. Ex: `{border: {type:'none'}}`");c.border=null}else if(Array.isArray(c.border)){[0,1,2,3].forEach((e=>{c.border[e]=c.border[e]?{type:c.border[e].type||d.type,color:c.border[e].color||d.color,pt:c.border[e].pt||d.pt}:{type:"none"}}))}c.autoPage=typeof c.autoPage==="boolean"?c.autoPage:false;c.autoPageRepeatHeader=typeof c.autoPageRepeatHeader==="boolean"?c.autoPageRepeatHeader:false;c.autoPageHeaderRows=typeof c.autoPageHeaderRows!=="undefined"&&!isNaN(Number(c.autoPageHeaderRows))?Number(c.autoPageHeaderRows):1;c.autoPageLineWeight=typeof c.autoPageLineWeight!=="undefined"&&!isNaN(Number(c.autoPageLineWeight))?Number(c.autoPageLineWeight):0;if(c.autoPageLineWeight){if(c.autoPageLineWeight>1)c.autoPageLineWeight=1;else if(c.autoPageLineWeight<-1)c.autoPageLineWeight=-1}let u=x;if(r&&typeof r._margin!=="undefined"){if(Array.isArray(r._margin))u=r._margin;else if(!isNaN(Number(r._margin))){u=[Number(r._margin),Number(r._margin),Number(r._margin),Number(r._margin)]}}if(c.colW){const e=A[0].reduce(((e,t)=>{var a;if(((a=t===null||t===void 0?void 0:t.options)===null||a===void 0?void 0:a.colspan)&&typeof t.options.colspan==="number"){e+=t.options.colspan}else{e+=1}return e}),0);if(typeof c.colW==="string"||typeof c.colW==="number"){c.w=Math.floor(Number(c.colW)*e);c.colW=null}else if(c.colW&&Array.isArray(c.colW)&&c.colW.length===1&&e>1){c.w=Math.floor(Number(c.colW)*e);c.colW=null}else if(c.colW&&Array.isArray(c.colW)&&c.colW.length!==e){console.warn("addTable: mismatch: (colW.length != data.length) Therefore, defaulting to evenly distributed col widths.");c.colW=null}}else if(c.w){c.w=getSmartParseNumber(c.w,"X",o)}else{c.w=Math.floor(o._sizeW/n-u[1]-u[3])}if(c.x&&c.x<20)c.x=inch2Emu(c.x);if(c.y&&c.y<20)c.y=inch2Emu(c.y);if(c.w&&typeof c.w==="number"&&c.w<20)c.w=inch2Emu(c.w);if(c.h&&typeof c.h==="number"&&c.h<20)c.h=inch2Emu(c.h);A.forEach((e=>{e.forEach(((t,a)=>{if(typeof t==="number"||typeof t==="string"){e[a]={_type:G.tablecell,text:String(e[a]),options:c}}else if(typeof t==="object"){if(typeof t.text==="number")e[a].text=e[a].text.toString();else if(typeof t.text==="undefined"||t.text===null)e[a].text="";e[a].options=t.options||{};e[a]._type=G.tablecell}}))}));const f=[];if(c&&!c.autoPage){createHyperlinkRels(e,A);e._slideObjects.push({_type:G.table,arrTabRows:A,options:Object.assign({},c)})}else{if(c.autoPageRepeatHeader)c._arrObjTabHeadRows=A.filter(((e,t)=>t<c.autoPageHeaderRows));getSlidesForTableRows(A,c,o,r).forEach(((t,a)=>{if(!s(e._slideNum+a))l.push(i({masterName:(r===null||r===void 0?void 0:r._name)||null}));if(a>0)c.y=inch2Emu(c.autoPageSlideStartY||c.newSlideStartY||u[0]);{const r=s(e._slideNum+a);c.autoPage=false;createHyperlinkRels(r,t.rows);r.addTable(t.rows,Object.assign({},c));if(a>0)f.push(r)}}))}return f}function addTextDefinition(e,t,a,r){const n={_type:r?G.placeholder:G.text,shape:(a===null||a===void 0?void 0:a.shape)||j.RECTANGLE,text:!t||t.length===0?[{text:"",options:null}]:t,options:a||{}};function cleanOpts(t){{if(!t.placeholder){t.color=t.color||n.options.color||e.color||h}if(t.placeholder||r){t.bullet=t.bullet||false}if(t.placeholder&&e._slideLayout&&e._slideLayout._slideObjects){const a=e._slideLayout._slideObjects.filter((e=>e._type==="placeholder"&&e.options&&e.options.placeholder&&e.options.placeholder===t.placeholder))[0];if(a===null||a===void 0?void 0:a.options)t=Object.assign(Object.assign({},t),a.options)}t.objectName=t.objectName?encodeXmlEntities(t.objectName):`Text ${e._slideObjects.filter((e=>e._type===G.text)).length}`;if(t.shape===j.LINE){const e={type:t.line.type||"solid",color:t.line.color||y,transparency:t.line.transparency||0,width:t.line.width||1,dashType:t.line.dashType||"solid",beginArrowType:t.line.beginArrowType||null,endArrowType:t.line.endArrowType||null};if(typeof t.line==="object")t.line=e;if(typeof t.line==="string"){const a=e;if(typeof t.line==="string")a.color=t.line;t.line=a}if(typeof t.lineSize==="number")t.line.width=t.lineSize;if(typeof t.lineDash==="string")t.line.dashType=t.lineDash;if(typeof t.lineHead==="string")t.line.beginArrowType=t.lineHead;if(typeof t.lineTail==="string")t.line.endArrowType=t.lineTail}t.line=t.line||{};t.lineSpacing=t.lineSpacing&&!isNaN(t.lineSpacing)?t.lineSpacing:null;t.lineSpacingMultiple=t.lineSpacingMultiple&&!isNaN(t.lineSpacingMultiple)?t.lineSpacingMultiple:null;t._bodyProp=t._bodyProp||{};t._bodyProp.autoFit=t.autoFit||false;t._bodyProp.anchor=!t.placeholder?N.ctr:null;t._bodyProp.vert=t.vert||null;t._bodyProp.wrap=typeof t.wrap==="boolean"?t.wrap:true;if(t.inset&&!isNaN(Number(t.inset))||t.inset===0){t._bodyProp.lIns=inch2Emu(t.inset);t._bodyProp.rIns=inch2Emu(t.inset);t._bodyProp.tIns=inch2Emu(t.inset);t._bodyProp.bIns=inch2Emu(t.inset)}if(typeof t.underline==="boolean"&&t.underline===true)t.underline={style:"sng"}}{if((t.align||"").toLowerCase().indexOf("c")===0)t._bodyProp.align=I.center;else if((t.align||"").toLowerCase().indexOf("l")===0)t._bodyProp.align=I.left;else if((t.align||"").toLowerCase().indexOf("r")===0)t._bodyProp.align=I.right;else if((t.align||"").toLowerCase().indexOf("j")===0)t._bodyProp.align=I.justify;if((t.valign||"").toLowerCase().indexOf("b")===0)t._bodyProp.anchor=N.b;else if((t.valign||"").toLowerCase().indexOf("m")===0)t._bodyProp.anchor=N.ctr;else if((t.valign||"").toLowerCase().indexOf("t")===0)t._bodyProp.anchor=N.t}correctShadowOptions(t.shadow);return t}n.options=cleanOpts(n.options);n.text.forEach((e=>e.options=cleanOpts(e.options||{})));createHyperlinkRels(e,n.text||"");e._slideObjects.push(n)}function addPlaceholdersToSlideLayouts(e){(e._slideLayout._slideObjects||[]).forEach((t=>{if(t._type===G.placeholder){if(e._slideObjects.filter((e=>e.options&&e.options.placeholder===t.options.placeholder)).length===0){addTextDefinition(e,[{text:""}],t.options,false)}}}))}function addBackgroundDefinition(e,t){var a;if(t.bkgd){if(!t.background)t.background={};if(typeof t.bkgd==="string")t.background.color=t.bkgd;else{if(t.bkgd.data)t.background.data=t.bkgd.data;if(t.bkgd.path)t.background.path=t.bkgd.path;if(t.bkgd.src)t.background.path=t.bkgd.src}}if((a=t.background)===null||a===void 0?void 0:a.fill)t.background.color=t.background.fill;if(e&&(e.path||e.data)){e.path=e.path||"preencoded.png";let a=(e.path.split(".").pop()||"png").split("?")[0];if(a==="jpg")a="jpeg";t._relsMedia=t._relsMedia||[];const r=t._relsMedia.length+1;t._relsMedia.push({path:e.path,type:G.image,extn:a,data:e.data||null,rId:r,Target:`../media/${(t._name||"").replace(/\s+/gi,"-")}-image-${t._relsMedia.length+1}.${a}`});t._bkgdImgRid=r}}function createHyperlinkRels(e,t,a){let r=[];if(typeof t==="string"||typeof t==="number")return;else if(Array.isArray(t))r=t;else if(typeof t==="object")r=[t];r.forEach(((t,r)=>{if(a&&a[r]&&a[r].hyperlink)t.options=Object.assign(Object.assign({},t.options),a[r]);if(Array.isArray(t)){const a=[];t.forEach((e=>{if(e.options&&!e.text.options){a.push(e.options)}}));createHyperlinkRels(e,t,a)}else if(Array.isArray(t.text)){createHyperlinkRels(e,t.text,a&&a[r]?[a[r]]:undefined)}else if(t&&typeof t==="object"&&t.options&&t.options.hyperlink&&!t.options.hyperlink._rId){if(typeof t.options.hyperlink!=="object"){console.log("ERROR: text `hyperlink` option should be an object. Ex: `hyperlink: {url:'https://github.com'}` ")}else if(!t.options.hyperlink.url&&!t.options.hyperlink.slide){console.log("ERROR: 'hyperlink requires either: `url` or `slide`'")}else{const a=getNewRelId(e);e._rels.push({type:G.hyperlink,data:t.options.hyperlink.slide?"slide":"dummy",rId:a,Target:encodeXmlEntities(t.options.hyperlink.url)||t.options.hyperlink.slide.toString()});t.options.hyperlink._rId=a}}else if(t&&typeof t==="object"&&t.options&&t.options.hyperlink&&t.options.hyperlink._rId){if(e._rels.filter((e=>e.rId===t.options.hyperlink._rId)).length===0){e._rels.push({type:G.hyperlink,data:t.options.hyperlink.slide?"slide":"dummy",rId:t.options.hyperlink._rId,Target:encodeXmlEntities(t.options.hyperlink.url)||t.options.hyperlink.slide.toString()})}}}))}class Slide{constructor(e){var t;this.addSlide=e.addSlide;this.getSlide=e.getSlide;this._name=`Slide ${e.slideNumber}`;this._presLayout=e.presLayout;this._rId=e.slideRId;this._rels=[];this._relsChart=[];this._relsMedia=[];this._setSlideNum=e.setSlideNum;this._slideId=e.slideId;this._slideLayout=e.slideLayout||null;this._slideNum=e.slideNumber;this._slideObjects=[];this._slideNumberProps=((t=this._slideLayout)===null||t===void 0?void 0:t._slideNumberProps)?this._slideLayout._slideNumberProps:null}set bkgd(e){this._bkgd=e;if(!this._background||!this._background.color){if(!this._background)this._background={};if(typeof e==="string")this._background.color=e}}get bkgd(){return this._bkgd}set background(e){this._background=e;if(e)addBackgroundDefinition(e,this)}get background(){return this._background}set color(e){this._color=e}get color(){return this._color}set hidden(e){this._hidden=e}get hidden(){return this._hidden}set slideNumber(e){this._slideNumberProps=e;this._setSlideNum(e)}get slideNumber(){return this._slideNumberProps}get newAutoPagedSlides(){return this._newAutoPagedSlides}addChart(e,t,a){const r=a||{};r._type=e;addChartDefinition(this,e,t,a);return this}addImage(e){addImageDefinition(this,e);return this}addMedia(e){addMediaDefinition(this,e);return this}addNotes(e){addNotesDefinition(this,e);return this}addShape(e,t){addShapeDefinition(this,e,t);return this}addTable(e,t){this._newAutoPagedSlides=addTableDefinition(this,e,t,this._slideLayout,this._presLayout,this.addSlide,this.getSlide);return this}addText(e,t){const a=typeof e==="string"||typeof e==="number"?[{text:e,options:t}]:e;addTextDefinition(this,a,t,false);return this}}function createExcelWorksheet(e,t){return __awaiter(this,void 0,void 0,(function*(){const a=e.data;return yield new Promise(((n,o)=>{var i,s;const l=new r;const c=(a.length-1)*2+1;const A=((s=(i=a[0])===null||i===void 0?void 0:i.labels)===null||s===void 0?void 0:s.length)>1;l.folder("_rels");l.folder("docProps");l.folder("xl/_rels");l.folder("xl/tables");l.folder("xl/theme");l.folder("xl/worksheets");l.folder("xl/worksheets/_rels");{l.file("[Content_Types].xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">'+' <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>'+' <Default Extension="xml" ContentType="application/xml"/>'+' <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>'+' <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>'+' <Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>'+' <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>'+' <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>'+' <Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/>'+' <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>'+' <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>'+"</Types>\n");l.file("_rels/.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+'<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>'+'<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>'+'<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>'+"</Relationships>\n");l.file("docProps/app.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">'+"<Application>Microsoft Macintosh Excel</Application>"+"<DocSecurity>0</DocSecurity>"+"<ScaleCrop>false</ScaleCrop>"+'<HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs>'+'<TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts>'+"<Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion>"+"</Properties>\n");l.file("docProps/core.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'+"<dc:creator>PptxGenJS</dc:creator>"+"<cp:lastModifiedBy>PptxGenJS</cp:lastModifiedBy>"+'<dcterms:created xsi:type="dcterms:W3CDTF">'+(new Date).toISOString()+"</dcterms:created>"+'<dcterms:modified xsi:type="dcterms:W3CDTF">'+(new Date).toISOString()+"</dcterms:modified>"+"</cp:coreProperties>");l.file("xl/_rels/workbook.xml.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+'<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>'+'<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>'+'<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>'+'<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>'+"</Relationships>");l.file("xl/styles.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><numFmts count="1"><numFmt numFmtId="0" formatCode="General"/></numFmts><fonts count="4"><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="10"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="18"/><color indexed="8"/>'+'<name val="Arial"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><dxfs count="0"/><tableStyles count="0"/><colors><indexedColors><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ffff0000"/><rgbColor rgb="ff00ff00"/><rgbColor rgb="ff0000ff"/>'+'<rgbColor rgb="ffffff00"/><rgbColor rgb="ffff00ff"/><rgbColor rgb="ff00ffff"/><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ff878787"/><rgbColor rgb="fff9f9f9"/></indexedColors></colors></styleSheet>\n');l.file("xl/theme/theme1.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>');l.file("xl/workbook.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+'<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">'+'<fileVersion appName="xl" lastEdited="7" lowestEdited="6" rupBuild="10507"/>'+"<workbookPr/>"+'<bookViews><workbookView xWindow="0" yWindow="500" windowWidth="20960" windowHeight="15960"/></bookViews>'+'<sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets>'+'<calcPr calcId="0" concurrentCalc="0"/>'+"</workbook>\n");l.file("xl/worksheets/_rels/sheet1.xml.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+'<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>'+"</Relationships>\n")}{let t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';if(e.opts._type===W.BUBBLE||e.opts._type===W.BUBBLE3D){t+=`<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${c}" uniqueCount="${c}">`}else if(e.opts._type===W.SCATTER){t+=`<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${a.length}" uniqueCount="${a.length}">`}else if(A){let e=a.length;a[0].labels.forEach((t=>e+=t.filter((e=>e&&e!=="")).length));t+=`<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${e}" uniqueCount="${e}">`;t+="<si><t/></si>"}else{const e=a.length+a[0].labels.length*a[0].labels[0].length+a[0].labels.length;const r=a.length+a[0].labels.length*a[0].labels[0].length+1;t+=`<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${e}" uniqueCount="${r}">`;t+='<si><t xml:space="preserve"></t></si>'}if(e.opts._type===W.BUBBLE||e.opts._type===W.BUBBLE3D){a.forEach(((e,a)=>{if(a===0)t+="<si><t>X-Axis</t></si>";else{t+=`<si><t>${encodeXmlEntities(e.name||`Y-Axis${a}`)}</t></si>`;t+=`<si><t>${encodeXmlEntities(`Size${a}`)}</t></si>`}}))}else{a.forEach((e=>{t+=`<si><t>${encodeXmlEntities((e.name||" ").replace("X-Axis","X-Values"))}</t></si>`}))}if(e.opts._type!==W.BUBBLE&&e.opts._type!==W.BUBBLE3D&&e.opts._type!==W.SCATTER){a[0].labels.slice().reverse().forEach((e=>{e.filter((e=>e&&e!=="")).forEach((e=>{t+=`<si><t>${encodeXmlEntities(e)}</t></si>`}))}))}t+="</sst>\n";l.file("xl/sharedStrings.xml",t)}{let t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';if(e.opts._type===W.BUBBLE||e.opts._type===W.BUBBLE3D){t+=`<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(c)}${c}" totalsRowShown="0">`;t+=`<tableColumns count="${c}">`;let e=1;a.forEach(((a,r)=>{if(r===0){t+=`<tableColumn id="${r+1}" name="X-Values"/>`}else{t+=`<tableColumn id="${r+e}" name="${a.name}"/>`;e++;t+=`<tableColumn id="${r+e}" name="Size${r}"/>`}}))}else if(e.opts._type===W.SCATTER){t+=`<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(a.length)}${a[0].values.length+1}" totalsRowShown="0">`;t+=`<tableColumns count="${a.length}">`;a.forEach(((e,a)=>{t+=`<tableColumn id="${a+1}" name="${a===0?"X-Values":"Y-Value "}${a}"/>`}))}else{t+=`<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(a.length+a[0].labels.length)}${a[0].labels[0].length+1}'" totalsRowShown="0">`;t+=`<tableColumns count="${a.length+a[0].labels.length}">`;a[0].labels.forEach(((e,a)=>{t+=`<tableColumn id="${a+1}" name="Column${a+1}"/>`}));a.forEach(((e,r)=>{t+=`<tableColumn id="${r+a[0].labels.length+1}" name="${encodeXmlEntities(e.name)}"/>`}))}t+="</tableColumns>";t+='<tableStyleInfo showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>';t+="</table>";l.file("xl/tables/table1.xml",t)}{let t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';t+='<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">';if(e.opts._type===W.BUBBLE||e.opts._type===W.BUBBLE3D){t+=`<dimension ref="A1:${getExcelColName(c)}${a[0].values.length+1}"/>`}else if(e.opts._type===W.SCATTER){t+=`<dimension ref="A1:${getExcelColName(a.length)}${a[0].values.length+1}"/>`}else{t+=`<dimension ref="A1:${getExcelColName(a.length+1)}${a[0].values.length+1}"/>`}t+='<sheetViews><sheetView tabSelected="1" workbookViewId="0"><selection activeCell="B1" sqref="B1"/></sheetView></sheetViews>';t+='<sheetFormatPr baseColWidth="10" defaultRowHeight="16"/>';if(e.opts._type===W.BUBBLE||e.opts._type===W.BUBBLE3D){t+="<sheetData>";t+=`<row r="1" spans="1:${c}">`;t+='<c r="A1" t="s"><v>0</v></c>';for(let e=1;e<c;e++){t+=`<c r="${getExcelColName(e+1)}1" t="s"><v>${e}</v></c>`}t+="</row>";a[0].values.forEach(((e,r)=>{t+=`<row r="${r+2}" spans="1:${c}">`;t+=`<c r="A${r+2}"><v>${e}</v></c>`;let n=2;for(let e=1;e<a.length;e++){t+=`<c r="${getExcelColName(n)}${r+2}"><v>${a[e].values[r]||""}</v></c>`;n++;t+=`<c r="${getExcelColName(n)}${r+2}"><v>${a[e].sizes[r]||""}</v></c>`;n++}t+="</row>"}))}else if(e.opts._type===W.SCATTER){t+="<sheetData>";t+=`<row r="1" spans="1:${a.length}">`;for(let e=0;e<a.length;e++){t+=`<c r="${getExcelColName(e+1)}1" t="s"><v>${e}</v></c>`}t+="</row>";a[0].values.forEach(((e,r)=>{t+=`<row r="${r+2}" spans="1:${a.length}">`;t+=`<c r="A${r+2}"><v>${e}</v></c>`;for(let e=1;e<a.length;e++){t+=`<c r="${getExcelColName(e+1)}${r+2}"><v>${a[e].values[r]||a[e].values[r]===0?a[e].values[r]:""}</v></c>`}t+="</row>"}))}else{t+="<sheetData>";if(!A){t+=`<row r="1" spans="1:${a.length+a[0].labels.length}">`;a[0].labels.forEach(((e,a)=>{t+=`<c r="${getExcelColName(a+1)}1" t="s"><v>0</v></c>`}));for(let e=0;e<a.length;e++){t+=`<c r="${getExcelColName(e+1+a[0].labels.length)}1" t="s"><v>${e+1}</v></c>`}t+="</row>";a[0].labels[0].forEach(((e,r)=>{t+=`<row r="${r+2}" spans="1:${a.length+a[0].labels.length}">`;for(let e=a[0].labels.length-1;e>=0;e--){t+=`<c r="${getExcelColName(a[0].labels.length-e)}${r+2}" t="s">`;t+=`<v>${a.length+r+1}</v>`;t+="</c>"}for(let e=0;e<a.length;e++){t+=`<c r="${getExcelColName(a[0].labels.length+e+1)}${r+2}"><v>${a[e].values[r]||""}</v></c>`}t+="</row>"}))}else{t+=`<row r="1" spans="1:${a.length+a[0].labels.length}">`;for(let e=0;e<a[0].labels.length;e++){t+=`<c r="${getExcelColName(e+1)}1" t="s"><v>0</v></c>`}for(let e=a[0].labels.length-1;e<a.length+a[0].labels.length-1;e++){t+=`<c r="${getExcelColName(e+a[0].labels.length)}1" t="s"><v>${e}</v></c>`}t+="</row>";const e=a.length;const r=a[0].labels[0].length;const n=a[0].labels.length;for(let o=0;o<r;o++){t+=`<row r="${o+2}" spans="1:${e+n}">`;let r=e;const i=a[0].labels.slice().reverse();i.forEach(((e,a)=>{const n=e[o];if(n){const e=a===0?1:i[a-1].filter((e=>e&&e!=="")).length;r+=e;t+=`<c r="${getExcelColName(o+1+a)}${o+2}" t="s"><v>${r}</v></c>`}}));for(let r=0;r<e;r++){t+=`<c r="${getExcelColName(n+r+1)}${o+2}"><v>${a[r].values[o]||0}</v></c>`}t+="</row>"}}}t+="</sheetData>";t+='<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>';t+="</worksheet>\n";l.file("xl/worksheets/sheet1.xml",t)}l.generateAsync({type:"base64"}).then((a=>{t.file(`ppt/embeddings/Microsoft_Excel_Worksheet${e.globalId}.xlsx`,a,{base64:true});t.file("ppt/charts/_rels/"+e.fileName+".rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+`<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet${e.globalId}.xlsx"/>`+"</Relationships>");t.file(`ppt/charts/${e.fileName}`,makeXmlCharts(e));n("")})).catch((e=>{o(e)}))}))}))}function makeXmlCharts(e){var t,a,r,n;let o='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';let i=false;{o+='<c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">';o+='<c:date1904 val="0"/>';o+=`<c:roundedCorners val="${e.opts.chartArea.roundedCorners?"1":"0"}"/>`;o+="<c:chart>";if(e.opts.showTitle){o+=genXmlTitle({title:e.opts.title||"Chart Title",color:e.opts.titleColor,fontFace:e.opts.titleFontFace,fontSize:e.opts.titleFontSize||g,titleAlign:e.opts.titleAlign,titleBold:e.opts.titleBold,titlePos:e.opts.titlePos,titleRotate:e.opts.titleRotate},e.opts.x,e.opts.y);o+='<c:autoTitleDeleted val="0"/>'}else{o+='<c:autoTitleDeleted val="1"/>'}if(e.opts._type===W.BAR3D){o+=`<c:view3D><c:rotX val="${e.opts.v3DRotX}"/><c:rotY val="${e.opts.v3DRotY}"/><c:rAngAx val="${!e.opts.v3DRAngAx?0:1}"/><c:perspective val="${e.opts.v3DPerspective}"/></c:view3D>`}o+="<c:plotArea>";if(e.opts.layout){o+="<c:layout>";o+=" <c:manualLayout>";o+=' <c:layoutTarget val="inner" />';o+=' <c:xMode val="edge" />';o+=' <c:yMode val="edge" />';o+=' <c:x val="'+(e.opts.layout.x||0)+'" />';o+=' <c:y val="'+(e.opts.layout.y||0)+'" />';o+=' <c:w val="'+(e.opts.layout.w||1)+'" />';o+=' <c:h val="'+(e.opts.layout.h||1)+'" />';o+=" </c:manualLayout>";o+="</c:layout>"}else{o+="<c:layout/>"}}if(Array.isArray(e.opts._type)){e.opts._type.forEach((t=>{const a=Object.assign(Object.assign({},e.opts),t.options);const r=a.secondaryValAxis?k:T;const n=a.secondaryCatAxis?E:P;i=i||a.secondaryValAxis;o+=makeChartType(t.type,t.data,a,r,n)}))}else{o+=makeChartType(e.opts._type,e.data,e.opts,T,P)}if(e.opts._type!==W.PIE&&e.opts._type!==W.DOUGHNUT){if(e.opts.valAxes&&e.opts.valAxes.length>1&&!i){throw new Error("Secondary axis must be used by one of the multiple charts")}if(e.opts.catAxes){if(!e.opts.valAxes||e.opts.valAxes.length!==e.opts.catAxes.length){throw new Error("There must be the same number of value and category axes.")}o+=makeCatAxis(Object.assign(Object.assign({},e.opts),e.opts.catAxes[0]),P,T)}else{o+=makeCatAxis(e.opts,P,T)}if(e.opts.valAxes){o+=makeValAxis(Object.assign(Object.assign({},e.opts),e.opts.valAxes[0]),T);if(e.opts.valAxes[1]){o+=makeValAxis(Object.assign(Object.assign({},e.opts),e.opts.valAxes[1]),k)}}else{o+=makeValAxis(e.opts,T);if(e.opts._type===W.BAR3D){o+=makeSerAxis(e.opts,_,T)}}if(((t=e.opts)===null||t===void 0?void 0:t.catAxes)&&((a=e.opts)===null||a===void 0?void 0:a.catAxes[1])){o+=makeCatAxis(Object.assign(Object.assign({},e.opts),e.opts.catAxes[1]),E,k)}}{if(e.opts.showDataTable){o+="<c:dTable>";o+=` <c:showHorzBorder val="${!e.opts.showDataTableHorzBorder?0:1}"/>`;o+=` <c:showVertBorder val="${!e.opts.showDataTableVertBorder?0:1}"/>`;o+=` <c:showOutline val="${!e.opts.showDataTableOutline?0:1}"/>`;o+=` <c:showKeys val="${!e.opts.showDataTableKeys?0:1}"/>`;o+=" <c:spPr>";o+=" <a:noFill/>";o+=' <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="tx1"><a:lumMod val="15000"/><a:lumOff val="85000"/></a:schemeClr></a:solidFill><a:round/></a:ln>';o+=" <a:effectLst/>";o+=" </c:spPr>";o+=" <c:txPr>";o+=' <a:bodyPr rot="0" spcFirstLastPara="1" vertOverflow="ellipsis" vert="horz" wrap="square" anchor="ctr" anchorCtr="1"/>';o+=" <a:lstStyle/>";o+=" <a:p>";o+=' <a:pPr rtl="0">';o+=` <a:defRPr sz="${Math.round((e.opts.dataTableFontSize||m)*100)}" b="0" i="0" u="none" strike="noStrike" kern="1200" baseline="0">`;o+=' <a:solidFill><a:schemeClr val="tx1"><a:lumMod val="65000"/><a:lumOff val="35000"/></a:schemeClr></a:solidFill>';o+=' <a:latin typeface="+mn-lt"/>';o+=' <a:ea typeface="+mn-ea"/>';o+=' <a:cs typeface="+mn-cs"/>';o+=" </a:defRPr>";o+=" </a:pPr>";o+=' <a:endParaRPr lang="en-US"/>';o+=" </a:p>";o+=" </c:txPr>";o+="</c:dTable>"}o+=" <c:spPr>";o+=((r=e.opts.plotArea.fill)===null||r===void 0?void 0:r.color)?genXmlColorSelection(e.opts.plotArea.fill):"<a:noFill/>";o+=e.opts.plotArea.border?`<a:ln w="${valToPts(e.opts.plotArea.border.pt)}" cap="flat">${genXmlColorSelection(e.opts.plotArea.border.color)}</a:ln>`:"<a:ln><a:noFill/></a:ln>";o+=" <a:effectLst/>";o+=" </c:spPr>";o+="</c:plotArea>";if(e.opts.showLegend){o+="<c:legend>";o+='<c:legendPos val="'+e.opts.legendPos+'"/>';o+='<c:overlay val="0"/>';if(e.opts.legendFontFace||e.opts.legendFontSize||e.opts.legendColor){o+="<c:txPr>";o+=" <a:bodyPr/>";o+=" <a:lstStyle/>";o+=" <a:p>";o+=" <a:pPr>";o+=e.opts.legendFontSize?`<a:defRPr sz="${Math.round(Number(e.opts.legendFontSize)*100)}">`:"<a:defRPr>";if(e.opts.legendColor)o+=genXmlColorSelection(e.opts.legendColor);if(e.opts.legendFontFace)o+='<a:latin typeface="'+e.opts.legendFontFace+'"/>';if(e.opts.legendFontFace)o+='<a:cs typeface="'+e.opts.legendFontFace+'"/>';o+=" </a:defRPr>";o+=" </a:pPr>";o+=' <a:endParaRPr lang="en-US"/>';o+=" </a:p>";o+="</c:txPr>"}o+="</c:legend>"}}o+=' <c:plotVisOnly val="1"/>';o+=' <c:dispBlanksAs val="'+e.opts.displayBlanksAs+'"/>';if(e.opts._type===W.SCATTER)o+='<c:showDLblsOverMax val="1"/>';o+="</c:chart>";o+="<c:spPr>";o+=((n=e.opts.chartArea.fill)===null||n===void 0?void 0:n.color)?genXmlColorSelection(e.opts.chartArea.fill):"<a:noFill/>";o+=e.opts.chartArea.border?`<a:ln w="${valToPts(e.opts.chartArea.border.pt)}" cap="flat">${genXmlColorSelection(e.opts.chartArea.border.color)}</a:ln>`:"<a:ln><a:noFill/></a:ln>";o+=" <a:effectLst/>";o+="</c:spPr>";o+='<c:externalData r:id="rId1"><c:autoUpdate val="0"/></c:externalData>';o+="</c:chartSpace>";return o}function makeChartType(e,t,a,r,n,o){let i=-1;let s=1;let l=null;let c="";switch(e){case W.AREA:case W.BAR:case W.BAR3D:case W.LINE:case W.RADAR:c+=`<c:${e}Chart>`;if(e===W.AREA&&a.barGrouping==="stacked"){c+='<c:grouping val="'+a.barGrouping+'"/>'}if(e===W.BAR||e===W.BAR3D){c+='<c:barDir val="'+a.barDir+'"/>';c+='<c:grouping val="'+(a.barGrouping||"clustered")+'"/>'}if(e===W.RADAR){c+='<c:radarStyle val="'+a.radarStyle+'"/>'}c+='<c:varyColors val="0"/>';t.forEach((r=>{var n;i++;c+="<c:ser>";c+=` <c:idx val="${r._dataIndex}"/><c:order val="${r._dataIndex}"/>`;c+=" <c:tx>";c+=" <c:strRef>";c+=" <c:f>Sheet1!$"+getExcelColName(r._dataIndex+r.labels.length+1)+"$1</c:f>";c+=' <c:strCache><c:ptCount val="1"/><c:pt idx="0"><c:v>'+encodeXmlEntities(r.name)+"</c:v></c:pt></c:strCache>";c+=" </c:strRef>";c+=" </c:tx>";const o=a.chartColors?a.chartColors[i%a.chartColors.length]:null;c+=" <c:spPr>";if(o==="transparent"){c+="<a:noFill/>"}else if(a.chartColorsOpacity){c+="<a:solidFill>"+createColorElement(o,`<a:alpha val="${Math.round(a.chartColorsOpacity*1e3)}"/>`)+"</a:solidFill>"}else{c+="<a:solidFill>"+createColorElement(o)+"</a:solidFill>"}if(e===W.LINE||e===W.RADAR){if(a.lineSize===0){c+="<a:ln><a:noFill/></a:ln>"}else{c+=`<a:ln w="${valToPts(a.lineSize)}" cap="${createLineCap(a.lineCap)}"><a:solidFill>${createColorElement(o)}</a:solidFill>`;c+='<a:prstDash val="'+(a.lineDash||"solid")+'"/><a:round/></a:ln>'}}else if(a.dataBorder){c+=`<a:ln w="${valToPts(a.dataBorder.pt)}" cap="${createLineCap(a.lineCap)}"><a:solidFill>${createColorElement(a.dataBorder.color)}</a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>`}c+=createShadowElement(a.shadow,w);c+=" </c:spPr>";c+=' <c:invertIfNegative val="0"/>';if(e!==W.RADAR){c+="<c:dLbls>";c+=`<c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;if(a.dataLabelBkgrdColors)c+=`<c:spPr><a:solidFill>${createColorElement(o)}</a:solidFill></c:spPr>`;c+="<c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr>";c+=`<a:defRPr b="${a.dataLabelFontBold?1:0}" i="${a.dataLabelFontItalic?1:0}" strike="noStrike" sz="${Math.round((a.dataLabelFontSize||m)*100)}" u="none">`;c+=`<a:solidFill>${createColorElement(a.dataLabelColor||h)}</a:solidFill>`;c+=`<a:latin typeface="${a.dataLabelFontFace||"Arial"}"/>`;c+="</a:defRPr></a:pPr></a:p></c:txPr>";if(a.dataLabelPosition)c+=`<c:dLblPos val="${a.dataLabelPosition}"/>`;c+='<c:showLegendKey val="0"/>';c+=`<c:showVal val="${a.showValue?"1":"0"}"/>`;c+=`<c:showCatName val="0"/><c:showSerName val="${a.showSerName?"1":"0"}"/><c:showPercent val="0"/><c:showBubbleSize val="0"/>`;c+=`<c:showLeaderLines val="${a.showLeaderLines?"1":"0"}"/>`;c+="</c:dLbls>"}if(e===W.LINE||e===W.RADAR){c+="<c:marker>";c+=' <c:symbol val="'+a.lineDataSymbol+'"/>';if(a.lineDataSymbolSize)c+=`<c:size val="${a.lineDataSymbolSize}"/>`;c+=" <c:spPr>";c+=` <a:solidFill>${createColorElement(a.chartColors[r._dataIndex+1>a.chartColors.length?Math.floor(Math.random()*a.chartColors.length):r._dataIndex])}</a:solidFill>`;c+=` <a:ln w="${a.lineDataSymbolLineSize}" cap="flat"><a:solidFill>${createColorElement(a.lineDataSymbolLineColor||o)}</a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>`;c+=" <a:effectLst/>";c+=" </c:spPr>";c+="</c:marker>"}if((e===W.BAR||e===W.BAR3D)&&t.length===1&&(a.chartColors&&a.chartColors!==B&&a.chartColors.length>1||((n=a.invertedColors)===null||n===void 0?void 0:n.length))){r.values.forEach(((t,r)=>{const n=t<0?a.invertedColors||a.chartColors||B:a.chartColors||[];c+=" <c:dPt>";c+=` <c:idx val="${r}"/>`;c+=' <c:invertIfNegative val="0"/>';c+=' <c:bubble3D val="0"/>';c+=" <c:spPr>";if(a.lineSize===0){c+="<a:ln><a:noFill/></a:ln>"}else if(e===W.BAR){c+="<a:solidFill>";c+=' <a:srgbClr val="'+n[r%n.length]+'"/>';c+="</a:solidFill>"}else{c+="<a:ln>";c+=" <a:solidFill>";c+=' <a:srgbClr val="'+n[r%n.length]+'"/>';c+=" </a:solidFill>";c+="</a:ln>"}c+=createShadowElement(a.shadow,w);c+=" </c:spPr>";c+=" </c:dPt>"}))}{c+="<c:cat>";if(a.catLabelFormatCode){c+=" <c:numRef>";c+=` <c:f>Sheet1!$A$2:$A$${r.labels[0].length+1}</c:f>`;c+=" <c:numCache>";c+=" <c:formatCode>"+(a.catLabelFormatCode||"General")+"</c:formatCode>";c+=` <c:ptCount val="${r.labels[0].length}"/>`;r.labels[0].forEach(((e,t)=>c+=`<c:pt idx="${t}"><c:v>${encodeXmlEntities(e)}</c:v></c:pt>`));c+=" </c:numCache>";c+=" </c:numRef>"}else{c+=" <c:multiLvlStrRef>";c+=` <c:f>Sheet1!$A$2:$${getExcelColName(r.labels.length)}$${r.labels[0].length+1}</c:f>`;c+=" <c:multiLvlStrCache>";c+=` <c:ptCount val="${r.labels[0].length}"/>`;r.labels.forEach((e=>{c+="<c:lvl>";e.forEach(((e,t)=>c+=`<c:pt idx="${t}"><c:v>${encodeXmlEntities(e)}</c:v></c:pt>`));c+="</c:lvl>"}));c+=" </c:multiLvlStrCache>";c+=" </c:multiLvlStrRef>"}c+="</c:cat>"}{c+="<c:val>";c+=" <c:numRef>";c+=`<c:f>Sheet1!$${getExcelColName(r._dataIndex+r.labels.length+1)}$2:$${getExcelColName(r._dataIndex+r.labels.length+1)}$${r.labels[0].length+1}</c:f>`;c+=" <c:numCache>";c+=" <c:formatCode>"+(a.valLabelFormatCode||a.dataTableFormatCode||"General")+"</c:formatCode>";c+=` <c:ptCount val="${r.labels[0].length}"/>`;r.values.forEach(((e,t)=>c+=`<c:pt idx="${t}"><c:v>${e||e===0?e:""}</c:v></c:pt>`));c+=" </c:numCache>";c+=" </c:numRef>";c+="</c:val>"}if(e===W.LINE)c+='<c:smooth val="'+(a.lineSmooth?"1":"0")+'"/>';c+="</c:ser>"}));{c+=" <c:dLbls>";c+=` <c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;c+=" <c:txPr>";c+=" <a:bodyPr/>";c+=" <a:lstStyle/>";c+=" <a:p><a:pPr>";c+=` <a:defRPr b="${a.dataLabelFontBold?1:0}" i="${a.dataLabelFontItalic?1:0}" strike="noStrike" sz="${Math.round((a.dataLabelFontSize||m)*100)}" u="none">`;c+=" <a:solidFill>"+createColorElement(a.dataLabelColor||h)+"</a:solidFill>";c+=' <a:latin typeface="'+(a.dataLabelFontFace||"Arial")+'"/>';c+=" </a:defRPr>";c+=" </a:pPr></a:p>";c+=" </c:txPr>";if(a.dataLabelPosition)c+=' <c:dLblPos val="'+a.dataLabelPosition+'"/>';c+=' <c:showLegendKey val="0"/>';c+=' <c:showVal val="'+(a.showValue?"1":"0")+'"/>';c+=' <c:showCatName val="0"/>';c+=' <c:showSerName val="'+(a.showSerName?"1":"0")+'"/>';c+=' <c:showPercent val="0"/>';c+=' <c:showBubbleSize val="0"/>';c+=` <c:showLeaderLines val="${a.showLeaderLines?"1":"0"}"/>`;c+=" </c:dLbls>"}if(e===W.BAR){c+=` <c:gapWidth val="${a.barGapWidthPct}"/>`;c+=` <c:overlap val="${(a.barGrouping||"").includes("tacked")?100:a.barOverlapPct?a.barOverlapPct:0}"/>`}else if(e===W.BAR3D){c+=` <c:gapWidth val="${a.barGapWidthPct}"/>`;c+=` <c:gapDepth val="${a.barGapDepthPct}"/>`;c+=' <c:shape val="'+a.bar3DShape+'"/>'}else if(e===W.LINE){c+=' <c:marker val="1"/>'}c+=`<c:axId val="${n}"/><c:axId val="${r}"/><c:axId val="${_}"/>`;c+=`</c:${e}Chart>`;break;case W.SCATTER:c+="<c:"+e+"Chart>";c+='<c:scatterStyle val="lineMarker"/>';c+='<c:varyColors val="0"/>';i=-1;t.filter(((e,t)=>t>0)).forEach(((e,r)=>{i++;c+="<c:ser>";c+=` <c:idx val="${r}"/>`;c+=` <c:order val="${r}"/>`;c+=" <c:tx>";c+=" <c:strRef>";c+=` <c:f>Sheet1!$${getExcelColName(r+2)}$1</c:f>`;c+=' <c:strCache><c:ptCount val="1"/><c:pt idx="0"><c:v>'+encodeXmlEntities(e.name)+"</c:v></c:pt></c:strCache>";c+=" </c:strRef>";c+=" </c:tx>";c+=" <c:spPr>";{const e=a.chartColors[i%a.chartColors.length];if(e==="transparent"){c+="<a:noFill/>"}else if(a.chartColorsOpacity){c+="<a:solidFill>"+createColorElement(e,'<a:alpha val="'+Math.round(a.chartColorsOpacity*1e3).toString()+'"/>')+"</a:solidFill>"}else{c+="<a:solidFill>"+createColorElement(e)+"</a:solidFill>"}if(a.lineSize===0){c+="<a:ln><a:noFill/></a:ln>"}else{c+=`<a:ln w="${valToPts(a.lineSize)}" cap="${createLineCap(a.lineCap)}"><a:solidFill>${createColorElement(e)}</a:solidFill>`;c+=`<a:prstDash val="${a.lineDash||"solid"}"/><a:round/></a:ln>`}c+=createShadowElement(a.shadow,w)}c+=" </c:spPr>";{c+="<c:marker>";c+=' <c:symbol val="'+a.lineDataSymbol+'"/>';if(a.lineDataSymbolSize){c+=`<c:size val="${a.lineDataSymbolSize}"/>`}c+="<c:spPr>";c+=`<a:solidFill>${createColorElement(a.chartColors[r+1>a.chartColors.length?Math.floor(Math.random()*a.chartColors.length):r])}</a:solidFill>`;c+=`<a:ln w="${a.lineDataSymbolLineSize}" cap="flat"><a:solidFill>${createColorElement(a.lineDataSymbolLineColor||a.chartColors[i%a.chartColors.length])}</a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>`;c+="<a:effectLst/>";c+="</c:spPr>";c+="</c:marker>"}if(a.showLabel){const t=getUuid("-xxxx-xxxx-xxxx-xxxxxxxxxxxx");if(e.labels[0]&&(a.dataLabelFormatScatter==="custom"||a.dataLabelFormatScatter==="customXY")){c+="<c:dLbls>";e.labels[0].forEach(((r,n)=>{if(a.dataLabelFormatScatter==="custom"||a.dataLabelFormatScatter==="customXY"){c+=" <c:dLbl>";c+=` <c:idx val="${n}"/>`;c+=" <c:tx>";c+=" <c:rich>";c+=" <a:bodyPr>";c+=" <a:spAutoFit/>";c+=" </a:bodyPr>";c+=" <a:lstStyle/>";c+=" <a:p>";c+=" <a:pPr>";c+=" <a:defRPr/>";c+=" </a:pPr>";c+=" <a:r>";c+=' <a:rPr lang="'+(a.lang||"en-US")+'" dirty="0"/>';c+=" <a:t>"+encodeXmlEntities(r)+"</a:t>";c+=" </a:r>";if(a.dataLabelFormatScatter==="customXY"&&!/^ *$/.test(r)){c+=" <a:r>";c+=' <a:rPr lang="'+(a.lang||"en-US")+'" baseline="0" dirty="0"/>';c+=" <a:t> (</a:t>";c+=" </a:r>";c+=' <a:fld id="{'+getUuid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")+'}" type="XVALUE">';c+=' <a:rPr lang="'+(a.lang||"en-US")+'" baseline="0"/>';c+=" <a:pPr>";c+=" <a:defRPr/>";c+=" </a:pPr>";c+=" <a:t>["+encodeXmlEntities(e.name)+"</a:t>";c+=" </a:fld>";c+=" <a:r>";c+=' <a:rPr lang="'+(a.lang||"en-US")+'" baseline="0" dirty="0"/>';c+=" <a:t>, </a:t>";c+=" </a:r>";c+=' <a:fld id="{'+getUuid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")+'}" type="YVALUE">';c+=' <a:rPr lang="'+(a.lang||"en-US")+'" baseline="0"/>';c+=" <a:pPr>";c+=" <a:defRPr/>";c+=" </a:pPr>";c+=" <a:t>["+encodeXmlEntities(e.name)+"]</a:t>";c+=" </a:fld>";c+=" <a:r>";c+=' <a:rPr lang="'+(a.lang||"en-US")+'" baseline="0" dirty="0"/>';c+=" <a:t>)</a:t>";c+=" </a:r>";c+=' <a:endParaRPr lang="'+(a.lang||"en-US")+'" dirty="0"/>'}c+=" </a:p>";c+=" </c:rich>";c+=" </c:tx>";c+=" <c:spPr>";c+=" <a:noFill/>";c+=" <a:ln>";c+=" <a:noFill/>";c+=" </a:ln>";c+=" <a:effectLst/>";c+=" </c:spPr>";if(a.dataLabelPosition)c+=' <c:dLblPos val="'+a.dataLabelPosition+'"/>';c+=' <c:showLegendKey val="0"/>';c+=' <c:showVal val="0"/>';c+=' <c:showCatName val="0"/>';c+=' <c:showSerName val="0"/>';c+=' <c:showPercent val="0"/>';c+=' <c:showBubbleSize val="0"/>';c+=' <c:showLeaderLines val="1"/>';c+=" <c:extLst>";c+=' <c:ext uri="{CE6537A1-D6FC-4f65-9D91-7224C49458BB}" xmlns:c15="http://schemas.microsoft.com/office/drawing/2012/chart"/>';c+=' <c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">';c+=` <c16:uniqueId val="{${"00000000".substring(0,8-(n+1).toString().length).toString()}${n+1}${t}}"/>`;c+=" </c:ext>";c+=" </c:extLst>";c+="</c:dLbl>"}}));c+="</c:dLbls>"}if(a.dataLabelFormatScatter==="XY"){c+="<c:dLbls>";c+=" <c:spPr>";c+=" <a:noFill/>";c+=" <a:ln>";c+=" <a:noFill/>";c+=" </a:ln>";c+=" <a:effectLst/>";c+=" </c:spPr>";c+=" <c:txPr>";c+=" <a:bodyPr>";c+=" <a:spAutoFit/>";c+=" </a:bodyPr>";c+=" <a:lstStyle/>";c+=" <a:p>";c+=" <a:pPr>";c+=" <a:defRPr/>";c+=" </a:pPr>";c+=' <a:endParaRPr lang="en-US"/>';c+=" </a:p>";c+=" </c:txPr>";if(a.dataLabelPosition)c+=' <c:dLblPos val="'+a.dataLabelPosition+'"/>';c+=' <c:showLegendKey val="0"/>';c+=` <c:showVal val="${a.showLabel?"1":"0"}"/>`;c+=` <c:showCatName val="${a.showLabel?"1":"0"}"/>`;c+=` <c:showSerName val="${a.showSerName?"1":"0"}"/>`;c+=' <c:showPercent val="0"/>';c+=' <c:showBubbleSize val="0"/>';c+=" <c:extLst>";c+=' <c:ext uri="{CE6537A1-D6FC-4f65-9D91-7224C49458BB}" xmlns:c15="http://schemas.microsoft.com/office/drawing/2012/chart">';c+=' <c15:showLeaderLines val="1"/>';c+=" </c:ext>";c+=" </c:extLst>";c+="</c:dLbls>"}}if(t.length===1&&a.chartColors!==B){e.values.forEach(((e,t)=>{const r=e<0?a.invertedColors||a.chartColors||B:a.chartColors||[];c+=" <c:dPt>";c+=` <c:idx val="${t}"/>`;c+=' <c:invertIfNegative val="0"/>';c+=' <c:bubble3D val="0"/>';c+=" <c:spPr>";if(a.lineSize===0){c+="<a:ln><a:noFill/></a:ln>"}else{c+="<a:solidFill>";c+=' <a:srgbClr val="'+r[t%r.length]+'"/>';c+="</a:solidFill>"}c+=createShadowElement(a.shadow,w);c+=" </c:spPr>";c+=" </c:dPt>"}))}{c+="<c:xVal>";c+=" <c:numRef>";c+=` <c:f>Sheet1!$A$2:$A$${t[0].values.length+1}</c:f>`;c+=" <c:numCache>";c+=" <c:formatCode>General</c:formatCode>";c+=` <c:ptCount val="${t[0].values.length}"/>`;t[0].values.forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${e||e===0?e:""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+="</c:xVal>";c+="<c:yVal>";c+=" <c:numRef>";c+=` <c:f>Sheet1!$${getExcelColName(r+2)}$2:$${getExcelColName(r+2)}$${t[0].values.length+1}</c:f>`;c+=" <c:numCache>";c+=" <c:formatCode>General</c:formatCode>";c+=` <c:ptCount val="${t[0].values.length}"/>`;t[0].values.forEach(((t,a)=>{c+=`<c:pt idx="${a}"><c:v>${e.values[a]||e.values[a]===0?e.values[a]:""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+="</c:yVal>"}c+='<c:smooth val="'+(a.lineSmooth?"1":"0")+'"/>';c+="</c:ser>"}));{c+=" <c:dLbls>";c+=` <c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;c+=" <c:txPr>";c+=" <a:bodyPr/>";c+=" <a:lstStyle/>";c+=" <a:p><a:pPr>";c+=` <a:defRPr b="${a.dataLabelFontBold?"1":"0"}" i="${a.dataLabelFontItalic?"1":"0"}" strike="noStrike" sz="${Math.round((a.dataLabelFontSize||m)*100)}" u="none">`;c+=" <a:solidFill>"+createColorElement(a.dataLabelColor||h)+"</a:solidFill>";c+=' <a:latin typeface="'+(a.dataLabelFontFace||"Arial")+'"/>';c+=" </a:defRPr>";c+=" </a:pPr></a:p>";c+=" </c:txPr>";if(a.dataLabelPosition)c+=' <c:dLblPos val="'+a.dataLabelPosition+'"/>';c+=' <c:showLegendKey val="0"/>';c+=' <c:showVal val="'+(a.showValue?"1":"0")+'"/>';c+=' <c:showCatName val="0"/>';c+=' <c:showSerName val="'+(a.showSerName?"1":"0")+'"/>';c+=' <c:showPercent val="0"/>';c+=' <c:showBubbleSize val="0"/>';c+=" </c:dLbls>"}c+=`<c:axId val="${n}"/><c:axId val="${r}"/>`;c+="</c:"+e+"Chart>";break;case W.BUBBLE:case W.BUBBLE3D:c+="<c:bubbleChart>";c+='<c:varyColors val="0"/>';i=-1;t.filter(((e,t)=>t>0)).forEach(((r,n)=>{i++;c+="<c:ser>";c+=` <c:idx val="${n}"/>`;c+=` <c:order val="${n}"/>`;c+=" <c:tx>";c+=" <c:strRef>";c+=" <c:f>Sheet1!$"+getExcelColName(s+1)+"$1</c:f>";c+=' <c:strCache><c:ptCount val="1"/><c:pt idx="0"><c:v>'+encodeXmlEntities(r.name)+"</c:v></c:pt></c:strCache>";c+=" </c:strRef>";c+=" </c:tx>";{c+="<c:spPr>";const e=a.chartColors[i%a.chartColors.length];if(e==="transparent"){c+="<a:noFill/>"}else if(a.chartColorsOpacity){c+=`<a:solidFill>${createColorElement(e,'<a:alpha val="'+Math.round(a.chartColorsOpacity*1e3).toString()+'"/>')}</a:solidFill>`}else{c+="<a:solidFill>"+createColorElement(e)+"</a:solidFill>"}if(a.lineSize===0){c+="<a:ln><a:noFill/></a:ln>"}else if(a.dataBorder){c+=`<a:ln w="${valToPts(a.dataBorder.pt)}" cap="flat"><a:solidFill>${createColorElement(a.dataBorder.color)}</a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>`}else{c+=`<a:ln w="${valToPts(a.lineSize)}" cap="flat"><a:solidFill>${createColorElement(e)}</a:solidFill>`;c+=`<a:prstDash val="${a.lineDash||"solid"}"/><a:round/></a:ln>`}c+=createShadowElement(a.shadow,w);c+="</c:spPr>"}{c+="<c:xVal>";c+=" <c:numRef>";c+=` <c:f>Sheet1!$A$2:$A$${t[0].values.length+1}</c:f>`;c+=" <c:numCache>";c+=" <c:formatCode>General</c:formatCode>";c+=` <c:ptCount val="${t[0].values.length}"/>`;t[0].values.forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${e||e===0?e:""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+="</c:xVal>";c+="<c:yVal>";c+=" <c:numRef>";c+=`<c:f>Sheet1!$${getExcelColName(s+1)}$2:$${getExcelColName(s+1)}$${t[0].values.length+1}</c:f>`;s++;c+=" <c:numCache>";c+=" <c:formatCode>General</c:formatCode>";c+=` <c:ptCount val="${t[0].values.length}"/>`;t[0].values.forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${r.values[t]||r.values[t]===0?r.values[t]:""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+="</c:yVal>"}c+=" <c:bubbleSize>";c+=" <c:numRef>";c+=`<c:f>Sheet1!$${getExcelColName(s+1)}$2:$${getExcelColName(s+1)}$${r.sizes.length+1}</c:f>`;s++;c+=" <c:numCache>";c+=" <c:formatCode>General</c:formatCode>";c+=` <c:ptCount val="${r.sizes.length}"/>`;r.sizes.forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${e||""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+=" </c:bubbleSize>";c+=' <c:bubble3D val="'+(e===W.BUBBLE3D?"1":"0")+'"/>';c+="</c:ser>"}));{c+="<c:dLbls>";c+=`<c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;c+="<c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr>";c+=`<a:defRPr b="${a.dataLabelFontBold?1:0}" i="${a.dataLabelFontItalic?1:0}" strike="noStrike" sz="${Math.round(Math.round(a.dataLabelFontSize||m)*100)}" u="none">`;c+=`<a:solidFill>${createColorElement(a.dataLabelColor||h)}</a:solidFill>`;c+=`<a:latin typeface="${a.dataLabelFontFace||"Arial"}"/>`;c+="</a:defRPr></a:pPr></a:p></c:txPr>";if(a.dataLabelPosition)c+=`<c:dLblPos val="${a.dataLabelPosition}"/>`;c+='<c:showLegendKey val="0"/>';c+=`<c:showVal val="${a.showValue?"1":"0"}"/>`;c+=`<c:showCatName val="0"/><c:showSerName val="${a.showSerName?"1":"0"}"/><c:showPercent val="0"/><c:showBubbleSize val="0"/>`;c+="<c:extLst>";c+=' <c:ext uri="{CE6537A1-D6FC-4f65-9D91-7224C49458BB}" xmlns:c15="http://schemas.microsoft.com/office/drawing/2012/chart">';c+=' <c15:showLeaderLines val="'+(a.showLeaderLines?"1":"0")+'"/>';c+=" </c:ext>";c+="</c:extLst>";c+="</c:dLbls>"}c+=`<c:axId val="${n}"/><c:axId val="${r}"/>`;c+="</c:bubbleChart>";break;case W.DOUGHNUT:case W.PIE:l=t[0];c+="<c:"+e+"Chart>";c+=' <c:varyColors val="1"/>';c+="<c:ser>";c+=' <c:idx val="0"/>';c+=' <c:order val="0"/>';c+=" <c:tx>";c+=" <c:strRef>";c+=" <c:f>Sheet1!$B$1</c:f>";c+=" <c:strCache>";c+=' <c:ptCount val="1"/>';c+=' <c:pt idx="0"><c:v>'+encodeXmlEntities(l.name)+"</c:v></c:pt>";c+=" </c:strCache>";c+=" </c:strRef>";c+=" </c:tx>";c+=" <c:spPr>";c+=' <a:solidFill><a:schemeClr val="accent1"/></a:solidFill>';c+=' <a:ln w="9525" cap="flat"><a:solidFill><a:srgbClr val="F9F9F9"/></a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>';if(a.dataNoEffects){c+="<a:effectLst/>"}else{c+=createShadowElement(a.shadow,w)}c+=" </c:spPr>";l.labels[0].forEach(((e,t)=>{c+="<c:dPt>";c+=` <c:idx val="${t}"/>`;c+=' <c:bubble3D val="0"/>';c+=" <c:spPr>";c+=`<a:solidFill>${createColorElement(a.chartColors[t+1>a.chartColors.length?Math.floor(Math.random()*a.chartColors.length):t])}</a:solidFill>`;if(a.dataBorder){c+=`<a:ln w="${valToPts(a.dataBorder.pt)}" cap="flat"><a:solidFill>${createColorElement(a.dataBorder.color)}</a:solidFill><a:prstDash val="solid"/><a:round/></a:ln>`}c+=createShadowElement(a.shadow,w);c+=" </c:spPr>";c+="</c:dPt>"}));c+="<c:dLbls>";l.labels[0].forEach(((t,r)=>{c+="<c:dLbl>";c+=` <c:idx val="${r}"/>`;c+=` <c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;c+=" <c:spPr/><c:txPr>";c+=" <a:bodyPr/><a:lstStyle/>";c+=" <a:p><a:pPr>";c+=` <a:defRPr sz="${Math.round((a.dataLabelFontSize||m)*100)}" b="${a.dataLabelFontBold?1:0}" i="${a.dataLabelFontItalic?1:0}" u="none" strike="noStrike">`;c+=" <a:solidFill>"+createColorElement(a.dataLabelColor||h)+"</a:solidFill>";c+=` <a:latin typeface="${a.dataLabelFontFace||"Arial"}"/>`;c+=" </a:defRPr>";c+=" </a:pPr></a:p>";c+=" </c:txPr>";if(e===W.PIE&&a.dataLabelPosition)c+=`<c:dLblPos val="${a.dataLabelPosition}"/>`;c+=' <c:showLegendKey val="0"/>';c+=' <c:showVal val="'+(a.showValue?"1":"0")+'"/>';c+=' <c:showCatName val="'+(a.showLabel?"1":"0")+'"/>';c+=' <c:showSerName val="'+(a.showSerName?"1":"0")+'"/>';c+=' <c:showPercent val="'+(a.showPercent?"1":"0")+'"/>';c+=' <c:showBubbleSize val="0"/>';c+=" </c:dLbl>"}));c+=` <c:numFmt formatCode="${encodeXmlEntities(a.dataLabelFormatCode)||"General"}" sourceLinked="0"/>`;c+=" <c:txPr>";c+=" <a:bodyPr/>";c+=" <a:lstStyle/>";c+=" <a:p>";c+=" <a:pPr>";c+=` <a:defRPr sz="1800" b="${a.dataLabelFontBold?"1":"0"}" i="${a.dataLabelFontItalic?"1":"0"}" u="none" strike="noStrike">`;c+=' <a:solidFill><a:srgbClr val="000000"/></a:solidFill><a:latin typeface="Arial"/>';c+=" </a:defRPr>";c+=" </a:pPr>";c+=" </a:p>";c+=" </c:txPr>";c+=e===W.PIE?'<c:dLblPos val="ctr"/>':"";c+=' <c:showLegendKey val="0"/>';c+=' <c:showVal val="0"/>';c+=' <c:showCatName val="1"/>';c+=' <c:showSerName val="0"/>';c+=' <c:showPercent val="1"/>';c+=' <c:showBubbleSize val="0"/>';c+=` <c:showLeaderLines val="${a.showLeaderLines?"1":"0"}"/>`;c+="</c:dLbls>";c+="<c:cat>";c+=" <c:strRef>";c+=` <c:f>Sheet1!$A$2:$A$${l.labels[0].length+1}</c:f>`;c+=" <c:strCache>";c+=` <c:ptCount val="${l.labels[0].length}"/>`;l.labels[0].forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${encodeXmlEntities(e)}</c:v></c:pt>`}));c+=" </c:strCache>";c+=" </c:strRef>";c+="</c:cat>";c+=" <c:val>";c+=" <c:numRef>";c+=` <c:f>Sheet1!$B$2:$B$${l.labels[0].length+1}</c:f>`;c+=" <c:numCache>";c+=` <c:ptCount val="${l.labels[0].length}"/>`;l.values.forEach(((e,t)=>{c+=`<c:pt idx="${t}"><c:v>${e||e===0?e:""}</c:v></c:pt>`}));c+=" </c:numCache>";c+=" </c:numRef>";c+=" </c:val>";c+=" </c:ser>";c+=` <c:firstSliceAng val="${a.firstSliceAng?Math.round(a.firstSliceAng):0}"/>`;if(e===W.DOUGHNUT)c+=`<c:holeSize val="${typeof a.holeSize==="number"?a.holeSize:"50"}"/>`;c+="</c:"+e+"Chart>";break;default:c+="";break}return c}function makeCatAxis(e,t,a){let r="";if(e._type===W.SCATTER||e._type===W.BUBBLE||e._type===W.BUBBLE3D){r+="<c:valAx>"}else{r+="<c:"+(e.catLabelFormatCode?"dateAx":"catAx")+">"}r+=' <c:axId val="'+t+'"/>';r+=" <c:scaling>";r+='<c:orientation val="'+(e.catAxisOrientation||(e.barDir==="col"?"minMax":"minMax"))+'"/>';if(e.catAxisMaxVal||e.catAxisMaxVal===0)r+=`<c:max val="${e.catAxisMaxVal}"/>`;if(e.catAxisMinVal||e.catAxisMinVal===0)r+=`<c:min val="${e.catAxisMinVal}"/>`;r+="</c:scaling>";r+=' <c:delete val="'+(e.catAxisHidden?"1":"0")+'"/>';r+=' <c:axPos val="'+(e.barDir==="col"?"b":"l")+'"/>';r+=e.catGridLine.style!=="none"?createGridLineElement(e.catGridLine):"";if(e.showCatAxisTitle){r+=genXmlTitle({color:e.catAxisTitleColor,fontFace:e.catAxisTitleFontFace,fontSize:e.catAxisTitleFontSize,titleRotate:e.catAxisTitleRotate,title:e.catAxisTitle||"Axis Title"})}if(e._type===W.SCATTER||e._type===W.BUBBLE||e._type===W.BUBBLE3D){r+=' <c:numFmt formatCode="'+(e.valAxisLabelFormatCode?encodeXmlEntities(e.valAxisLabelFormatCode):"General")+'" sourceLinked="1"/>'}else{r+=' <c:numFmt formatCode="'+(encodeXmlEntities(e.catLabelFormatCode)||"General")+'" sourceLinked="1"/>'}if(e._type===W.SCATTER){r+=' <c:majorTickMark val="none"/>';r+=' <c:minorTickMark val="none"/>';r+=' <c:tickLblPos val="nextTo"/>'}else{r+=' <c:majorTickMark val="'+(e.catAxisMajorTickMark||"out")+'"/>';r+=' <c:minorTickMark val="'+(e.catAxisMinorTickMark||"none")+'"/>';r+=' <c:tickLblPos val="'+(e.catAxisLabelPos||(e.barDir==="col"?"low":"nextTo"))+'"/>'}r+=" <c:spPr>";r+=` <a:ln w="${e.catAxisLineSize?valToPts(e.catAxisLineSize):o}" cap="flat">`;r+=!e.catAxisLineShow?"<a:noFill/>":"<a:solidFill>"+createColorElement(e.catAxisLineColor||f.color)+"</a:solidFill>";r+=' <a:prstDash val="'+(e.catAxisLineStyle||"solid")+'"/>';r+=" <a:round/>";r+=" </a:ln>";r+=" </c:spPr>";r+=" <c:txPr>";if(e.catAxisLabelRotate){r+=`<a:bodyPr rot="${convertRotationDegrees(e.catAxisLabelRotate)}"/>`}else{r+="<a:bodyPr/>"}r+=" <a:lstStyle/>";r+=" <a:p>";r+=" <a:pPr>";r+=` <a:defRPr sz="${Math.round((e.catAxisLabelFontSize||m)*100)}" b="${e.catAxisLabelFontBold?1:0}" i="${e.catAxisLabelFontItalic?1:0}" u="none" strike="noStrike">`;r+=" <a:solidFill>"+createColorElement(e.catAxisLabelColor||h)+"</a:solidFill>";r+=' <a:latin typeface="'+(e.catAxisLabelFontFace||"Arial")+'"/>';r+=" </a:defRPr>";r+=" </a:pPr>";r+=' <a:endParaRPr lang="'+(e.lang||"en-US")+'"/>';r+=" </a:p>";r+=" </c:txPr>";r+=' <c:crossAx val="'+a+'"/>';r+=` <c:${typeof e.valAxisCrossesAt==="number"?"crossesAt":"crosses"} val="${e.valAxisCrossesAt||"autoZero"}"/>`;r+=' <c:auto val="1"/>';r+=' <c:lblAlgn val="ctr"/>';r+=` <c:noMultiLvlLbl val="${e.catAxisMultiLevelLabels?0:1}"/>`;if(e.catAxisLabelFrequency)r+=' <c:tickLblSkip val="'+e.catAxisLabelFrequency+'"/>';if(e.catLabelFormatCode||e._type===W.SCATTER||e._type===W.BUBBLE||e._type===W.BUBBLE3D){if(e.catLabelFormatCode){["catAxisBaseTimeUnit","catAxisMajorTimeUnit","catAxisMinorTimeUnit"].forEach((t=>{if(e[t]&&(typeof e[t]!=="string"||!["days","months","years"].includes(e[t].toLowerCase()))){console.warn(`"${t}" must be one of: 'days','months','years' !`);e[t]=null}}));if(e.catAxisBaseTimeUnit)r+='<c:baseTimeUnit val="'+e.catAxisBaseTimeUnit.toLowerCase()+'"/>';if(e.catAxisMajorTimeUnit)r+='<c:majorTimeUnit val="'+e.catAxisMajorTimeUnit.toLowerCase()+'"/>';if(e.catAxisMinorTimeUnit)r+='<c:minorTimeUnit val="'+e.catAxisMinorTimeUnit.toLowerCase()+'"/>'}if(e.catAxisMajorUnit)r+=`<c:majorUnit val="${e.catAxisMajorUnit}"/>`;if(e.catAxisMinorUnit)r+=`<c:minorUnit val="${e.catAxisMinorUnit}"/>`}if(e._type===W.SCATTER||e._type===W.BUBBLE||e._type===W.BUBBLE3D){r+="</c:valAx>"}else{r+="</c:"+(e.catLabelFormatCode?"dateAx":"catAx")+">"}return r}function makeValAxis(e,t){let a=t===T?e.barDir==="col"?"l":"b":e.barDir!=="col"?"r":"t";if(t===k)a="r";const r=t===T?P:E;let n="";n+="<c:valAx>";n+=' <c:axId val="'+t+'"/>';n+=" <c:scaling>";if(e.valAxisLogScaleBase)n+=`<c:logBase val="${e.valAxisLogScaleBase}"/>`;n+='<c:orientation val="'+(e.valAxisOrientation||(e.barDir==="col"?"minMax":"minMax"))+'"/>';if(e.valAxisMaxVal||e.valAxisMaxVal===0)n+=`<c:max val="${e.valAxisMaxVal}"/>`;if(e.valAxisMinVal||e.valAxisMinVal===0)n+=`<c:min val="${e.valAxisMinVal}"/>`;n+=" </c:scaling>";n+=` <c:delete val="${e.valAxisHidden?1:0}"/>`;n+=' <c:axPos val="'+a+'"/>';if(e.valGridLine.style!=="none")n+=createGridLineElement(e.valGridLine);if(e.showValAxisTitle){n+=genXmlTitle({color:e.valAxisTitleColor,fontFace:e.valAxisTitleFontFace,fontSize:e.valAxisTitleFontSize,titleRotate:e.valAxisTitleRotate,title:e.valAxisTitle||"Axis Title"})}n+=`<c:numFmt formatCode="${e.valAxisLabelFormatCode?encodeXmlEntities(e.valAxisLabelFormatCode):"General"}" sourceLinked="0"/>`;if(e._type===W.SCATTER){n+=' <c:majorTickMark val="none"/>';n+=' <c:minorTickMark val="none"/>';n+=' <c:tickLblPos val="nextTo"/>'}else{n+=' <c:majorTickMark val="'+(e.valAxisMajorTickMark||"out")+'"/>';n+=' <c:minorTickMark val="'+(e.valAxisMinorTickMark||"none")+'"/>';n+=' <c:tickLblPos val="'+(e.valAxisLabelPos||(e.barDir==="col"?"nextTo":"low"))+'"/>'}n+=" <c:spPr>";n+=` <a:ln w="${e.valAxisLineSize?valToPts(e.valAxisLineSize):o}" cap="flat">`;n+=!e.valAxisLineShow?"<a:noFill/>":"<a:solidFill>"+createColorElement(e.valAxisLineColor||f.color)+"</a:solidFill>";n+=' <a:prstDash val="'+(e.valAxisLineStyle||"solid")+'"/>';n+=" <a:round/>";n+=" </a:ln>";n+=" </c:spPr>";n+=" <c:txPr>";n+=` <a:bodyPr${e.valAxisLabelRotate?' rot="'+convertRotationDegrees(e.valAxisLabelRotate).toString()+'"':""}/>`;n+=" <a:lstStyle/>";n+=" <a:p>";n+=" <a:pPr>";n+=` <a:defRPr sz="${Math.round((e.valAxisLabelFontSize||m)*100)}" b="${e.valAxisLabelFontBold?1:0}" i="${e.valAxisLabelFontItalic?1:0}" u="none" strike="noStrike">`;n+=" <a:solidFill>"+createColorElement(e.valAxisLabelColor||h)+"</a:solidFill>";n+=' <a:latin typeface="'+(e.valAxisLabelFontFace||"Arial")+'"/>';n+=" </a:defRPr>";n+=" </a:pPr>";n+=' <a:endParaRPr lang="'+(e.lang||"en-US")+'"/>';n+=" </a:p>";n+=" </c:txPr>";n+=' <c:crossAx val="'+r+'"/>';if(typeof e.catAxisCrossesAt==="number"){n+=` <c:crossesAt val="${e.catAxisCrossesAt}"/>`}else if(typeof e.catAxisCrossesAt==="string"){n+=' <c:crosses val="'+e.catAxisCrossesAt+'"/>'}else{const e=a==="r"||a==="t";const t=e?"max":"autoZero";n+=' <c:crosses val="'+t+'"/>'}n+=' <c:crossBetween val="'+(e._type===W.SCATTER||!!(Array.isArray(e._type)&&e._type.filter((e=>e.type===W.AREA)).length>0)?"midCat":"between")+'"/>';if(e.valAxisMajorUnit)n+=` <c:majorUnit val="${e.valAxisMajorUnit}"/>`;if(e.valAxisDisplayUnit){n+=`<c:dispUnits><c:builtInUnit val="${e.valAxisDisplayUnit}"/>${e.valAxisDisplayUnitLabel?"<c:dispUnitsLbl/>":""}</c:dispUnits>`}n+="</c:valAx>";return n}function makeSerAxis(e,t,a){let r="";r+="<c:serAx>";r+=' <c:axId val="'+t+'"/>';r+=' <c:scaling><c:orientation val="'+(e.serAxisOrientation||(e.barDir==="col"?"minMax":"minMax"))+'"/></c:scaling>';r+=' <c:delete val="'+(e.serAxisHidden?"1":"0")+'"/>';r+=' <c:axPos val="'+(e.barDir==="col"?"b":"l")+'"/>';r+=e.serGridLine.style!=="none"?createGridLineElement(e.serGridLine):"";if(e.showSerAxisTitle){r+=genXmlTitle({color:e.serAxisTitleColor,fontFace:e.serAxisTitleFontFace,fontSize:e.serAxisTitleFontSize,titleRotate:e.serAxisTitleRotate,title:e.serAxisTitle||"Axis Title"})}r+=` <c:numFmt formatCode="${encodeXmlEntities(e.serLabelFormatCode)||"General"}" sourceLinked="0"/>`;r+=' <c:majorTickMark val="out"/>';r+=' <c:minorTickMark val="none"/>';r+=` <c:tickLblPos val="${e.serAxisLabelPos||e.barDir==="col"?"low":"nextTo"}"/>`;r+=" <c:spPr>";r+=' <a:ln w="12700" cap="flat">';r+=!e.serAxisLineShow?"<a:noFill/>":`<a:solidFill>${createColorElement(e.serAxisLineColor||f.color)}</a:solidFill>`;r+=' <a:prstDash val="solid"/>';r+=" <a:round/>";r+=" </a:ln>";r+=" </c:spPr>";r+=" <c:txPr>";r+=" <a:bodyPr/>";r+=" <a:lstStyle/>";r+=" <a:p>";r+=" <a:pPr>";r+=` <a:defRPr sz="${Math.round((e.serAxisLabelFontSize||m)*100)}" b="${e.serAxisLabelFontBold?"1":"0"}" i="${e.serAxisLabelFontItalic?"1":"0"}" u="none" strike="noStrike">`;r+=` <a:solidFill>${createColorElement(e.serAxisLabelColor||h)}</a:solidFill>`;r+=` <a:latin typeface="${e.serAxisLabelFontFace||"Arial"}"/>`;r+=" </a:defRPr>";r+=" </a:pPr>";r+=' <a:endParaRPr lang="'+(e.lang||"en-US")+'"/>';r+=" </a:p>";r+=" </c:txPr>";r+=' <c:crossAx val="'+a+'"/>';r+=' <c:crosses val="autoZero"/>';if(e.serAxisLabelFrequency)r+=' <c:tickLblSkip val="'+e.serAxisLabelFrequency+'"/>';if(e.serLabelFormatCode){["serAxisBaseTimeUnit","serAxisMajorTimeUnit","serAxisMinorTimeUnit"].forEach((t=>{if(e[t]&&(typeof e[t]!=="string"||!["days","months","years"].includes(t.toLowerCase()))){console.warn(`"${t}" must be one of: 'days','months','years' !`);e[t]=null}}));if(e.serAxisBaseTimeUnit)r+=` <c:baseTimeUnit val="${e.serAxisBaseTimeUnit.toLowerCase()}"/>`;if(e.serAxisMajorTimeUnit)r+=` <c:majorTimeUnit val="${e.serAxisMajorTimeUnit.toLowerCase()}"/>`;if(e.serAxisMinorTimeUnit)r+=` <c:minorTimeUnit val="${e.serAxisMinorTimeUnit.toLowerCase()}"/>`;if(e.serAxisMajorUnit)r+=` <c:majorUnit val="${e.serAxisMajorUnit}"/>`;if(e.serAxisMinorUnit)r+=` <c:minorUnit val="${e.serAxisMinorUnit}"/>`}r+="</c:serAx>";return r}function genXmlTitle(e,t,a){const r=e.titleAlign==="left"||e.titleAlign==="right"?`<a:pPr algn="${e.titleAlign.substring(0,1)}">`:"<a:pPr>";const n=e.titleRotate?`<a:bodyPr rot="${convertRotationDegrees(e.titleRotate)}"/>`:"<a:bodyPr/>";const o=e.fontSize?`sz="${Math.round(e.fontSize*100)}"`:"";const i=e.titleBold?1:0;let s="<c:layout/>";if(e.titlePos&&typeof e.titlePos.x==="number"&&typeof e.titlePos.y==="number"){const r=e.titlePos.x+t;const n=e.titlePos.y+a;let o=r===0?0:r*(r/5)/10;if(o>=1)o=o/10;if(o>=.1)o=o/10;let i=n===0?0:n*(n/5)/10;if(i>=1)i=i/10;if(i>=.1)i=i/10;s=`<c:layout><c:manualLayout><c:xMode val="edge"/><c:yMode val="edge"/><c:x val="${o}"/><c:y val="${i}"/></c:manualLayout></c:layout>`}return`<c:title>\n <c:tx>\n <c:rich>\n ${n}\n <a:lstStyle/>\n <a:p>\n ${r}\n <a:defRPr ${o} b="${i}" i="0" u="none" strike="noStrike">\n <a:solidFill>${createColorElement(e.color||h)}</a:solidFill>\n <a:latin typeface="${e.fontFace||"Arial"}"/>\n </a:defRPr>\n </a:pPr>\n <a:r>\n <a:rPr ${o} b="${i}" i="0" u="none" strike="noStrike">\n <a:solidFill>${createColorElement(e.color||h)}</a:solidFill>\n <a:latin typeface="${e.fontFace||"Arial"}"/>\n </a:rPr>\n <a:t>${encodeXmlEntities(e.title)||""}</a:t>\n </a:r>\n </a:p>\n </c:rich>\n </c:tx>\n ${s}\n <c:overlay val="0"/>\n </c:title>`}function getExcelColName(e){let t="";const a=e-1;if(a<=25){t=L[a]}else{t=`${L[Math.floor(a/L.length-1)]}${L[a%L.length]}`}return t}function createShadowElement(e,t){if(!e){return"<a:effectLst/>"}else if(typeof e!=="object"){console.warn("`shadow` options must be an object. Ex: `{shadow: {type:'none'}}`");return"<a:effectLst/>"}let a="<a:effectLst>";const r=Object.assign(Object.assign({},t),e);const n=r.type||"outer";const o=valToPts(r.blur);const i=valToPts(r.offset);const s=Math.round(r.angle*6e4);const l=r.color;const c=Math.round(r.opacity*1e5);const A=r.rotateWithShape?1:0;a+=`<a:${n}Shdw sx="100000" sy="100000" kx="0" ky="0" algn="bl" blurRad="${o}" rotWithShape="${A}" dist="${i}" dir="${s}">`;a+=`<a:srgbClr val="${l}">`;a+=`<a:alpha val="${c}"/></a:srgbClr>`;a+=`</a:${n}Shdw>`;a+="</a:effectLst>";return a}function createGridLineElement(e){let t="<c:majorGridlines>";t+=" <c:spPr>";t+=` <a:ln w="${valToPts(e.size||f.size)}" cap="${createLineCap(e.cap||f.cap)}">`;t+=' <a:solidFill><a:srgbClr val="'+(e.color||f.color)+'"/></a:solidFill>';t+=' <a:prstDash val="'+(e.style||f.style)+'"/><a:round/>';t+=" </a:ln>";t+=" </c:spPr>";t+="</c:majorGridlines>";return t}function createLineCap(e){if(!e||e==="flat"){return"flat"}else if(e==="square"){return"sq"}else if(e==="round"){return"rnd"}else{const t=e;throw new Error(`Invalid chart line cap: ${t}`)}}function encodeSlideMediaRels(e){var t,r;const n=typeof process!=="undefined"&&!!((t=process.versions)===null||t===void 0?void 0:t.node)&&((r=process.release)===null||r===void 0?void 0:r.name)==="node";let o;let i;const s=n?()=>__awaiter(this,void 0,void 0,(function*(){({default:o}=yield Promise.resolve().then(a.t.bind(a,3024,23)));({default:i}=yield Promise.resolve().then(a.t.bind(a,4708,23)))})):()=>__awaiter(this,void 0,void 0,(function*(){}));if(n)s();const l=[];const c=e._relsMedia.filter((e=>e.type!=="online"&&!e.data&&(!e.path||e.path&&!e.path.includes("preencoded"))));const A=[];c.forEach((e=>{if(!A.includes(e.path)){e.isDuplicate=false;A.push(e.path)}else{e.isDuplicate=true}}));c.filter((e=>!e.isDuplicate)).forEach((e=>{l.push((()=>__awaiter(this,void 0,void 0,(function*(){if(!i)yield s();if(n&&o&&e.path.indexOf("http")!==0){try{const t=o.readFileSync(e.path);e.data=Buffer.from(t).toString("base64");c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));return"done"}catch(t){e.data=Y;c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));throw new Error(`ERROR: Unable to read media: "${e.path}"\n${String(t)}`)}}if(n&&i&&e.path.startsWith("http")){return yield new Promise(((t,a)=>{i.get(e.path,(r=>{let n="";r.setEncoding("binary");r.on("data",(e=>n+=e));r.on("end",(()=>{e.data=Buffer.from(n,"binary").toString("base64");c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));t("done")}));r.on("error",(()=>{e.data=Y;c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));a(new Error(`ERROR! Unable to load image (https.get): ${e.path}`))}))}))}))}return yield new Promise(((t,a)=>{const r=new XMLHttpRequest;r.onload=()=>{const n=new FileReader;n.onloadend=()=>{e.data=n.result;c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));if(!e.isSvgPng){t("done")}else{createSvgPngPreview(e).then((()=>t("done"))).catch(a)}};n.readAsDataURL(r.response)};r.onerror=()=>{e.data=Y;c.filter((t=>t.isDuplicate&&t.path===e.path)).forEach((t=>t.data=e.data));a(new Error(`ERROR! Unable to load image (xhr.onerror): ${e.path}`))};r.open("GET",e.path);r.responseType="blob";r.send()}))})))())}));e._relsMedia.filter((e=>e.isSvgPng&&e.data)).forEach((e=>{(()=>__awaiter(this,void 0,void 0,(function*(){if(n&&!o)yield s();if(n&&o){e.data=Y;l.push(Promise.resolve("done"))}else{l.push(createSvgPngPreview(e))}})))()}));return l}function createSvgPngPreview(e){return __awaiter(this,void 0,void 0,(function*(){return yield new Promise(((t,a)=>{const r=new Image;r.onload=()=>{if(r.width+r.height===0){r.onerror("h/w=0")}let a=document.createElement("CANVAS");const n=a.getContext("2d");a.width=r.width;a.height=r.height;n.drawImage(r,0,0);try{e.data=a.toDataURL(e.type);t("done")}catch(e){r.onerror(e.toString())}a=null};r.onerror=()=>{e.data=Y;a(new Error(`ERROR! Unable to load image (image.onerror): ${e.path}`))};r.src=typeof e.data==="string"?e.data:Y}))}))}const K={cover:function(e,t){const a=e.h/e.w;const r=t.h/t.w;const n=r>a;const o=n?t.h/a:t.w;const i=n?t.h:t.w*a;const s=Math.round(1e5*.5*(1-t.w/o));const l=Math.round(1e5*.5*(1-t.h/i));return`<a:srcRect l="${s}" r="${s}" t="${l}" b="${l}"/><a:stretch/>`},contain:function(e,t){const a=e.h/e.w;const r=t.h/t.w;const n=r>a;const o=n?t.w:t.h/a;const i=n?t.w*a:t.h;const s=Math.round(1e5*.5*(1-t.w/o));const l=Math.round(1e5*.5*(1-t.h/i));return`<a:srcRect l="${s}" r="${s}" t="${l}" b="${l}"/><a:stretch/>`},crop:function(e,t){const a=t.x;const r=e.w-(t.x+t.w);const n=t.y;const o=e.h-(t.y+t.h);const i=Math.round(1e5*(a/e.w));const s=Math.round(1e5*(r/e.w));const l=Math.round(1e5*(n/e.h));const c=Math.round(1e5*(o/e.h));return`<a:srcRect l="${i}" r="${s}" t="${l}" b="${c}"/><a:stretch/>`}};function slideObjectToXml(e){var t;let a=e._name?'<p:cSld name="'+e._name+'">':"<p:cSld>";let r=1;if(e._bkgdImgRid){a+=`<p:bg><p:bgPr><a:blipFill dpi="0" rotWithShape="1"><a:blip r:embed="rId${e._bkgdImgRid}"><a:lum/></a:blip><a:srcRect/><a:stretch><a:fillRect/></a:stretch></a:blipFill><a:effectLst/></p:bgPr></p:bg>`}else if((t=e.background)===null||t===void 0?void 0:t.color){a+=`<p:bg><p:bgPr>${genXmlColorSelection(e.background)}</p:bgPr></p:bg>`}else if(!e.bkgd&&e._name&&e._name===b){a+='<p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>'}a+="<p:spTree>";a+='<p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>';a+='<p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/>';a+='<a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr>';e._slideObjects.forEach(((t,o)=>{var i,s,l,c,A,d,u,f;let h=0;let m=0;let g=getSmartParseNumber("75%","X",e._presLayout);let v=0;let b;let y="";let w=null;let x=null;let C=0;let T=0;let k=null;let P=null;const E=(i=t.options)===null||i===void 0?void 0:i.sizing;const _=(s=t.options)===null||s===void 0?void 0:s.rounding;if(e._slideLayout!==undefined&&e._slideLayout._slideObjects!==undefined&&t.options&&t.options.placeholder){b=e._slideLayout._slideObjects.filter((e=>e.options.placeholder===t.options.placeholder))[0]}t.options=t.options||{};if(typeof t.options.x!=="undefined")h=getSmartParseNumber(t.options.x,"X",e._presLayout);if(typeof t.options.y!=="undefined")m=getSmartParseNumber(t.options.y,"Y",e._presLayout);if(typeof t.options.w!=="undefined")g=getSmartParseNumber(t.options.w,"X",e._presLayout);if(typeof t.options.h!=="undefined")v=getSmartParseNumber(t.options.h,"Y",e._presLayout);let L=g;let B=v;if(b){if(b.options.x||b.options.x===0)h=getSmartParseNumber(b.options.x,"X",e._presLayout);if(b.options.y||b.options.y===0)m=getSmartParseNumber(b.options.y,"Y",e._presLayout);if(b.options.w||b.options.w===0)g=getSmartParseNumber(b.options.w,"X",e._presLayout);if(b.options.h||b.options.h===0)v=getSmartParseNumber(b.options.h,"Y",e._presLayout)}if(t.options.flipH)y+=' flipH="1"';if(t.options.flipV)y+=' flipV="1"';if(t.options.rotate)y+=` rot="${convertRotationDegrees(t.options.rotate)}"`;switch(t._type){case G.table:w=t.arrTabRows;x=t.options;C=0;T=0;w[0].forEach((e=>{k=e.options||null;C+=(k===null||k===void 0?void 0:k.colspan)?Number(k.colspan):1}));P=`<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id="${r*e._slideNum+1}" name="${t.options.objectName}"/>`;P+='<p:cNvGraphicFramePr><a:graphicFrameLocks noGrp="1"/></p:cNvGraphicFramePr>'+' <p:nvPr><p:extLst><p:ext uri="{D42A27DB-BD31-4B8C-83A1-F6EECF244321}"><p14:modId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1579011935"/></p:ext></p:extLst></p:nvPr>'+"</p:nvGraphicFramePr>";P+=`<p:xfrm><a:off x="${h||(h===0?0:n)}" y="${m||(m===0?0:n)}"/><a:ext cx="${g||(g===0?0:n)}" cy="${v||n}"/></p:xfrm>`;P+='<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table"><a:tbl><a:tblPr/>';if(Array.isArray(x.colW)){P+="<a:tblGrid>";for(let e=0;e<C;e++){let a=inch2Emu(x.colW[e]);if(a==null||isNaN(a)){a=(typeof t.options.w==="number"?t.options.w:1)/C}P+=`<a:gridCol w="${Math.round(a)}"/>`}P+="</a:tblGrid>"}else{T=x.colW?x.colW:n;if(t.options.w&&!x.colW)T=Math.round((typeof t.options.w==="number"?t.options.w:1)/C);P+="<a:tblGrid>";for(let e=0;e<C;e++){P+=`<a:gridCol w="${T}"/>`}P+="</a:tblGrid>"}w.forEach((e=>{var t,a;for(let r=0;r<e.length;){const n=e[r];const o=(t=n.options)===null||t===void 0?void 0:t.colspan;const i=(a=n.options)===null||a===void 0?void 0:a.rowspan;if(o&&o>1){const t=new Array(o-1).fill(undefined).map((()=>({_type:G.tablecell,options:{rowspan:i},_hmerge:true})));e.splice(r+1,0,...t);r+=o}else{r+=1}}}));w.forEach(((e,t)=>{const a=w[t+1];if(!a)return;e.forEach(((e,t)=>{var r,n;const o=e._rowContinue||((r=e.options)===null||r===void 0?void 0:r.rowspan);const i=(n=e.options)===null||n===void 0?void 0:n.colspan;const s=e._hmerge;if(o&&o>1){const e={_type:G.tablecell,options:{colspan:i},_rowContinue:o-1,_vmerge:true,_hmerge:s};a.splice(t,0,e)}}))}));w.forEach(((e,a)=>{let r=0;if(Array.isArray(x.rowH)&&x.rowH[a])r=inch2Emu(Number(x.rowH[a]));else if(x.rowH&&!isNaN(Number(x.rowH)))r=inch2Emu(Number(x.rowH));else if(t.options.cy||t.options.h){r=Math.round((t.options.h?inch2Emu(t.options.h):typeof t.options.cy==="number"?t.options.cy:1)/w.length)}P+=`<a:tr h="${r}">`;e.forEach((e=>{var t,a,r,n,o;const i=e;const s={rowSpan:((t=i.options)===null||t===void 0?void 0:t.rowspan)>1?i.options.rowspan:undefined,gridSpan:((a=i.options)===null||a===void 0?void 0:a.colspan)>1?i.options.colspan:undefined,vMerge:i._vmerge?1:undefined,hMerge:i._hmerge?1:undefined};let l=Object.keys(s).map((e=>[e,s[e]])).filter((([,e])=>!!e)).map((([e,t])=>`${String(e)}="${String(t)}"`)).join(" ");if(l)l=" "+l;if(i._hmerge||i._vmerge){P+=`<a:tc${l}><a:tcPr/></a:tc>`;return}const c=i.options||{};i.options=c;["align","bold","border","color","fill","fontFace","fontSize","margin","textDirection","underline","valign"].forEach((e=>{if(x[e]&&!c[e]&&c[e]!==0)c[e]=x[e]}));const A=c.valign?` anchor="${c.valign.replace(/^c$/i,"ctr").replace(/^m$/i,"ctr").replace("center","ctr").replace("middle","ctr").replace("top","t").replace("btm","b").replace("bottom","b")}"`:"";const d=c.textDirection&&c.textDirection!=="horz"?` vert="${c.textDirection}"`:"";let u=((n=(r=i._optImp)===null||r===void 0?void 0:r.fill)===null||n===void 0?void 0:n.color)?i._optImp.fill.color:((o=i._optImp)===null||o===void 0?void 0:o.fill)&&typeof i._optImp.fill==="string"?i._optImp.fill:"";u=u||c.fill?c.fill:"";const f=u?genXmlColorSelection(u):"";let h=c.margin===0||c.margin?c.margin:p;if(!Array.isArray(h)&&typeof h==="number")h=[h,h,h,h];let m="";if(h[0]>=1){m=` marL="${valToPts(h[3])}" marR="${valToPts(h[1])}" marT="${valToPts(h[0])}" marB="${valToPts(h[2])}"`}else{m=` marL="${inch2Emu(h[3])}" marR="${inch2Emu(h[1])}" marT="${inch2Emu(h[0])}" marB="${inch2Emu(h[2])}"`}P+=`<a:tc${l}>${genXmlTextBody(i)}<a:tcPr${m}${A}${d}>`;if(c.border&&Array.isArray(c.border)){[{idx:3,name:"lnL"},{idx:1,name:"lnR"},{idx:0,name:"lnT"},{idx:2,name:"lnB"}].forEach((e=>{if(c.border[e.idx].type!=="none"){P+=`<a:${e.name} w="${valToPts(c.border[e.idx].pt)}" cap="flat" cmpd="sng" algn="ctr">`;P+=`<a:solidFill>${createColorElement(c.border[e.idx].color)}</a:solidFill>`;P+=`<a:prstDash val="${c.border[e.idx].type==="dash"?"sysDash":"solid"}"/><a:round/><a:headEnd type="none" w="med" len="med"/><a:tailEnd type="none" w="med" len="med"/>`;P+=`</a:${e.name}>`}else{P+=`<a:${e.name} w="0" cap="flat" cmpd="sng" algn="ctr"><a:noFill/></a:${e.name}>`}}))}P+=f;P+=" </a:tcPr>";P+=" </a:tc>"}));P+="</a:tr>"}));P+=" </a:tbl>";P+=" </a:graphicData>";P+=" </a:graphic>";P+="</p:graphicFrame>";a+=P;r++;break;case G.text:case G.placeholder:if(!t.options.line&&v===0)v=n*.3;if(!t.options._bodyProp)t.options._bodyProp={};if(t.options.margin&&Array.isArray(t.options.margin)){t.options._bodyProp.lIns=valToPts(t.options.margin[0]||0);t.options._bodyProp.rIns=valToPts(t.options.margin[1]||0);t.options._bodyProp.bIns=valToPts(t.options.margin[2]||0);t.options._bodyProp.tIns=valToPts(t.options.margin[3]||0)}else if(typeof t.options.margin==="number"){t.options._bodyProp.lIns=valToPts(t.options.margin);t.options._bodyProp.rIns=valToPts(t.options.margin);t.options._bodyProp.bIns=valToPts(t.options.margin);t.options._bodyProp.tIns=valToPts(t.options.margin)}a+="<p:sp>";a+=`<p:nvSpPr><p:cNvPr id="${o+2}" name="${t.options.objectName}">`;if((l=t.options.hyperlink)===null||l===void 0?void 0:l.url){a+=`<a:hlinkClick r:id="rId${t.options.hyperlink._rId}" tooltip="${t.options.hyperlink.tooltip?encodeXmlEntities(t.options.hyperlink.tooltip):""}"/>`}if((c=t.options.hyperlink)===null||c===void 0?void 0:c.slide){a+=`<a:hlinkClick r:id="rId${t.options.hyperlink._rId}" tooltip="${t.options.hyperlink.tooltip?encodeXmlEntities(t.options.hyperlink.tooltip):""}" action="ppaction://hlinksldjump"/>`}a+="</p:cNvPr>";a+="<p:cNvSpPr"+(((A=t.options)===null||A===void 0?void 0:A.isTextBox)?' txBox="1"/>':"/>");a+=`<p:nvPr>${t._type==="placeholder"?genXmlPlaceholder(t):genXmlPlaceholder(b)}</p:nvPr>`;a+="</p:nvSpPr><p:spPr>";a+=`<a:xfrm${y}>`;a+=`<a:off x="${h}" y="${m}"/>`;a+=`<a:ext cx="${g}" cy="${v}"/></a:xfrm>`;if(t.shape==="custGeom"){a+="<a:custGeom><a:avLst />";a+="<a:gdLst>";a+="</a:gdLst>";a+="<a:ahLst />";a+="<a:cxnLst>";a+="</a:cxnLst>";a+='<a:rect l="l" t="t" r="r" b="b" />';a+="<a:pathLst>";a+=`<a:path w="${g}" h="${v}">`;(d=t.options.points)===null||d===void 0?void 0:d.forEach(((t,r)=>{if("curve"in t){switch(t.curve.type){case"arc":a+=`<a:arcTo hR="${getSmartParseNumber(t.curve.hR,"Y",e._presLayout)}" wR="${getSmartParseNumber(t.curve.wR,"X",e._presLayout)}" stAng="${convertRotationDegrees(t.curve.stAng)}" swAng="${convertRotationDegrees(t.curve.swAng)}" />`;break;case"cubic":a+=`<a:cubicBezTo>\n\t\t\t\t\t\t\t\t\t<a:pt x="${getSmartParseNumber(t.curve.x1,"X",e._presLayout)}" y="${getSmartParseNumber(t.curve.y1,"Y",e._presLayout)}" />\n\t\t\t\t\t\t\t\t\t<a:pt x="${getSmartParseNumber(t.curve.x2,"X",e._presLayout)}" y="${getSmartParseNumber(t.curve.y2,"Y",e._presLayout)}" />\n\t\t\t\t\t\t\t\t\t<a:pt x="${getSmartParseNumber(t.x,"X",e._presLayout)}" y="${getSmartParseNumber(t.y,"Y",e._presLayout)}" />\n\t\t\t\t\t\t\t\t\t</a:cubicBezTo>`;break;case"quadratic":a+=`<a:quadBezTo>\n\t\t\t\t\t\t\t\t\t<a:pt x="${getSmartParseNumber(t.curve.x1,"X",e._presLayout)}" y="${getSmartParseNumber(t.curve.y1,"Y",e._presLayout)}" />\n\t\t\t\t\t\t\t\t\t<a:pt x="${getSmartParseNumber(t.x,"X",e._presLayout)}" y="${getSmartParseNumber(t.y,"Y",e._presLayout)}" />\n\t\t\t\t\t\t\t\t\t</a:quadBezTo>`;break}}else if("close"in t){a+="<a:close />"}else if(t.moveTo||r===0){a+=`<a:moveTo><a:pt x="${getSmartParseNumber(t.x,"X",e._presLayout)}" y="${getSmartParseNumber(t.y,"Y",e._presLayout)}" /></a:moveTo>`}else{a+=`<a:lnTo><a:pt x="${getSmartParseNumber(t.x,"X",e._presLayout)}" y="${getSmartParseNumber(t.y,"Y",e._presLayout)}" /></a:lnTo>`}}));a+="</a:path>";a+="</a:pathLst>";a+="</a:custGeom>"}else{a+='<a:prstGeom prst="'+t.shape+'"><a:avLst>';if(t.options.rectRadius){a+=`<a:gd name="adj" fmla="val ${Math.round(t.options.rectRadius*n*1e5/Math.min(g,v))}"/>`}else if(t.options.angleRange){for(let e=0;e<2;e++){const r=t.options.angleRange[e];a+=`<a:gd name="adj${e+1}" fmla="val ${convertRotationDegrees(r)}" />`}if(t.options.arcThicknessRatio){a+=`<a:gd name="adj3" fmla="val ${Math.round(t.options.arcThicknessRatio*5e4)}" />`}}a+="</a:avLst></a:prstGeom>"}a+=t.options.fill?genXmlColorSelection(t.options.fill):"<a:noFill/>";if(t.options.line){a+=t.options.line.width?`<a:ln w="${valToPts(t.options.line.width)}">`:"<a:ln>";if(t.options.line.color)a+=genXmlColorSelection(t.options.line);if(t.options.line.dashType)a+=`<a:prstDash val="${t.options.line.dashType}"/>`;if(t.options.line.beginArrowType)a+=`<a:headEnd type="${t.options.line.beginArrowType}"/>`;if(t.options.line.endArrowType)a+=`<a:tailEnd type="${t.options.line.endArrowType}"/>`;a+="</a:ln>"}if(t.options.shadow&&t.options.shadow.type!=="none"){t.options.shadow.type=t.options.shadow.type||"outer";t.options.shadow.blur=valToPts(t.options.shadow.blur||8);t.options.shadow.offset=valToPts(t.options.shadow.offset||4);t.options.shadow.angle=Math.round((t.options.shadow.angle||270)*6e4);t.options.shadow.opacity=Math.round((t.options.shadow.opacity||.75)*1e5);t.options.shadow.color=t.options.shadow.color||S.color;a+="<a:effectLst>";a+=` <a:${t.options.shadow.type}Shdw ${t.options.shadow.type==="outer"?'sx="100000" sy="100000" kx="0" ky="0" algn="bl" rotWithShape="0"':""} blurRad="${t.options.shadow.blur}" dist="${t.options.shadow.offset}" dir="${t.options.shadow.angle}">`;a+=` <a:srgbClr val="${t.options.shadow.color}">`;a+=` <a:alpha val="${t.options.shadow.opacity}"/></a:srgbClr>`;a+=" </a:outerShdw>";a+="</a:effectLst>"}a+="</p:spPr>";a+=genXmlTextBody(t);a+="</p:sp>";break;case G.image:a+="<p:pic>";a+=" <p:nvPicPr>";a+=`<p:cNvPr id="${o+2}" name="${t.options.objectName}" descr="${encodeXmlEntities(t.options.altText||t.image)}">`;if((u=t.hyperlink)===null||u===void 0?void 0:u.url){a+=`<a:hlinkClick r:id="rId${t.hyperlink._rId}" tooltip="${t.hyperlink.tooltip?encodeXmlEntities(t.hyperlink.tooltip):""}"/>`}if((f=t.hyperlink)===null||f===void 0?void 0:f.slide){a+=`<a:hlinkClick r:id="rId${t.hyperlink._rId}" tooltip="${t.hyperlink.tooltip?encodeXmlEntities(t.hyperlink.tooltip):""}" action="ppaction://hlinksldjump"/>`}a+=" </p:cNvPr>";a+=' <p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr>';a+=" <p:nvPr>"+genXmlPlaceholder(b)+"</p:nvPr>";a+=" </p:nvPicPr>";a+="<p:blipFill>";if((e._relsMedia||[]).filter((e=>e.rId===t.imageRid))[0]&&(e._relsMedia||[]).filter((e=>e.rId===t.imageRid))[0].extn==="svg"){a+=`<a:blip r:embed="rId${t.imageRid-1}">`;a+=t.options.transparency?` <a:alphaModFix amt="${Math.round((100-t.options.transparency)*1e3)}"/>`:"";a+=" <a:extLst>";a+=' <a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}">';a+=` <asvg:svgBlip xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main" r:embed="rId${t.imageRid}"/>`;a+=" </a:ext>";a+=" </a:extLst>";a+="</a:blip>"}else{a+=`<a:blip r:embed="rId${t.imageRid}">`;a+=t.options.transparency?`<a:alphaModFix amt="${Math.round((100-t.options.transparency)*1e3)}"/>`:"";a+="</a:blip>"}if(E===null||E===void 0?void 0:E.type){const t=E.w?getSmartParseNumber(E.w,"X",e._presLayout):g;const r=E.h?getSmartParseNumber(E.h,"Y",e._presLayout):v;const n=getSmartParseNumber(E.x||0,"X",e._presLayout);const o=getSmartParseNumber(E.y||0,"Y",e._presLayout);a+=K[E.type]({w:L,h:B},{w:t,h:r,x:n,y:o});L=t;B=r}else{a+=" <a:stretch><a:fillRect/></a:stretch>"}a+="</p:blipFill>";a+="<p:spPr>";a+=" <a:xfrm"+y+">";a+=` <a:off x="${h}" y="${m}"/>`;a+=` <a:ext cx="${L}" cy="${B}"/>`;a+=" </a:xfrm>";a+=` <a:prstGeom prst="${_?"ellipse":"rect"}"><a:avLst/></a:prstGeom>`;if(t.options.shadow&&t.options.shadow.type!=="none"){t.options.shadow.type=t.options.shadow.type||"outer";t.options.shadow.blur=valToPts(t.options.shadow.blur||8);t.options.shadow.offset=valToPts(t.options.shadow.offset||4);t.options.shadow.angle=Math.round((t.options.shadow.angle||270)*6e4);t.options.shadow.opacity=Math.round((t.options.shadow.opacity||.75)*1e5);t.options.shadow.color=t.options.shadow.color||S.color;a+="<a:effectLst>";a+=`<a:${t.options.shadow.type}Shdw ${t.options.shadow.type==="outer"?'sx="100000" sy="100000" kx="0" ky="0" algn="bl" rotWithShape="0"':""} blurRad="${t.options.shadow.blur}" dist="${t.options.shadow.offset}" dir="${t.options.shadow.angle}">`;a+=`<a:srgbClr val="${t.options.shadow.color}">`;a+=`<a:alpha val="${t.options.shadow.opacity}"/></a:srgbClr>`;a+=`</a:${t.options.shadow.type}Shdw>`;a+="</a:effectLst>"}a+="</p:spPr>";a+="</p:pic>";break;case G.media:if(t.mtype==="online"){a+="<p:pic>";a+=" <p:nvPicPr>";a+=`<p:cNvPr id="${t.mediaRid+2}" name="${t.options.objectName}"/>`;a+=" <p:cNvPicPr/>";a+=" <p:nvPr>";a+=` <a:videoFile r:link="rId${t.mediaRid}"/>`;a+=" </p:nvPr>";a+=" </p:nvPicPr>";a+=` <p:blipFill><a:blip r:embed="rId${t.mediaRid+1}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill>`;a+=" <p:spPr>";a+=` <a:xfrm${y}><a:off x="${h}" y="${m}"/><a:ext cx="${g}" cy="${v}"/></a:xfrm>`;a+=' <a:prstGeom prst="rect"><a:avLst/></a:prstGeom>';a+=" </p:spPr>";a+="</p:pic>"}else{a+="<p:pic>";a+=" <p:nvPicPr>";a+=`<p:cNvPr id="${t.mediaRid+2}" name="${t.options.objectName}"><a:hlinkClick r:id="" action="ppaction://media"/></p:cNvPr>`;a+=' <p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr>';a+=" <p:nvPr>";a+=` <a:videoFile r:link="rId${t.mediaRid}"/>`;a+=" <p:extLst>";a+=' <p:ext uri="{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}">';a+=` <p14:media xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" r:embed="rId${t.mediaRid+1}"/>`;a+=" </p:ext>";a+=" </p:extLst>";a+=" </p:nvPr>";a+=" </p:nvPicPr>";a+=` <p:blipFill><a:blip r:embed="rId${t.mediaRid+2}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill>`;a+=" <p:spPr>";a+=` <a:xfrm${y}><a:off x="${h}" y="${m}"/><a:ext cx="${g}" cy="${v}"/></a:xfrm>`;a+=' <a:prstGeom prst="rect"><a:avLst/></a:prstGeom>';a+=" </p:spPr>";a+="</p:pic>"}break;case G.chart:a+="<p:graphicFrame>";a+=" <p:nvGraphicFramePr>";a+=` <p:cNvPr id="${o+2}" name="${t.options.objectName}" descr="${encodeXmlEntities(t.options.altText||"")}"/>`;a+=" <p:cNvGraphicFramePr/>";a+=` <p:nvPr>${genXmlPlaceholder(b)}</p:nvPr>`;a+=" </p:nvGraphicFramePr>";a+=` <p:xfrm><a:off x="${h}" y="${m}"/><a:ext cx="${g}" cy="${v}"/></p:xfrm>`;a+=' <a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">';a+=' <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart">';a+=` <c:chart r:id="rId${t.chartRid}" xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"/>`;a+=" </a:graphicData>";a+=" </a:graphic>";a+="</p:graphicFrame>";break;default:a+="";break}}));if(e._slideNumberProps){if(!e._slideNumberProps.align)e._slideNumberProps.align="left";a+="<p:sp>";a+=" <p:nvSpPr>";a+=' <p:cNvPr id="25" name="Slide Number Placeholder 0"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr>';a+=' <p:nvPr><p:ph type="sldNum" sz="quarter" idx="4294967295"/></p:nvPr>';a+=" </p:nvSpPr>";a+=" <p:spPr>";a+="<a:xfrm>"+`<a:off x="${getSmartParseNumber(e._slideNumberProps.x,"X",e._presLayout)}" y="${getSmartParseNumber(e._slideNumberProps.y,"Y",e._presLayout)}"/>`+`<a:ext cx="${e._slideNumberProps.w?getSmartParseNumber(e._slideNumberProps.w,"X",e._presLayout):"800000"}" cy="${e._slideNumberProps.h?getSmartParseNumber(e._slideNumberProps.h,"Y",e._presLayout):"300000"}"/>`+"</a:xfrm>"+' <a:prstGeom prst="rect"><a:avLst/></a:prstGeom>'+' <a:extLst><a:ext uri="{C572A759-6A51-4108-AA02-DFA0A04FC94B}"><ma14:wrappingTextBoxFlag val="0" xmlns:ma14="http://schemas.microsoft.com/office/mac/drawingml/2011/main"/></a:ext></a:extLst>'+"</p:spPr>";a+="<p:txBody>";a+="<a:bodyPr";if(e._slideNumberProps.margin&&Array.isArray(e._slideNumberProps.margin)){a+=` lIns="${valToPts(e._slideNumberProps.margin[3]||0)}"`;a+=` tIns="${valToPts(e._slideNumberProps.margin[0]||0)}"`;a+=` rIns="${valToPts(e._slideNumberProps.margin[1]||0)}"`;a+=` bIns="${valToPts(e._slideNumberProps.margin[2]||0)}"`}else if(typeof e._slideNumberProps.margin==="number"){a+=` lIns="${valToPts(e._slideNumberProps.margin||0)}"`;a+=` tIns="${valToPts(e._slideNumberProps.margin||0)}"`;a+=` rIns="${valToPts(e._slideNumberProps.margin||0)}"`;a+=` bIns="${valToPts(e._slideNumberProps.margin||0)}"`}if(e._slideNumberProps.valign){a+=` anchor="${e._slideNumberProps.valign.replace("top","t").replace("middle","ctr").replace("bottom","b")}"`}a+="/>";a+=" <a:lstStyle><a:lvl1pPr>";if(e._slideNumberProps.fontFace||e._slideNumberProps.fontSize||e._slideNumberProps.color){a+=`<a:defRPr sz="${Math.round((e._slideNumberProps.fontSize||12)*100)}">`;if(e._slideNumberProps.color)a+=genXmlColorSelection(e._slideNumberProps.color);if(e._slideNumberProps.fontFace){a+=`<a:latin typeface="${e._slideNumberProps.fontFace}"/><a:ea typeface="${e._slideNumberProps.fontFace}"/><a:cs typeface="${e._slideNumberProps.fontFace}"/>`}a+="</a:defRPr>"}a+="</a:lvl1pPr></a:lstStyle>";a+="<a:p>";if(e._slideNumberProps.align.startsWith("l"))a+='<a:pPr algn="l"/>';else if(e._slideNumberProps.align.startsWith("c"))a+='<a:pPr algn="ctr"/>';else if(e._slideNumberProps.align.startsWith("r"))a+='<a:pPr algn="r"/>';else a+='<a:pPr algn="l"/>';a+=`<a:fld id="${F}" type="slidenum"><a:rPr b="${e._slideNumberProps.bold?1:0}" lang="en-US"/>`;a+=`<a:t>${e._slideNum}</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p>`;a+="</p:txBody></p:sp>"}a+="</p:spTree>";a+="</p:cSld>";return a}function slideObjectRelationsToXml(e,t){let a=0;let r='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+i+'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';e._rels.forEach((e=>{a=Math.max(a,e.rId);if(e.type.toLowerCase().includes("hyperlink")){if(e.data==="slide"){r+=`<Relationship Id="rId${e.rId}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slide${e.Target}.xml"/>`}else{r+=`<Relationship Id="rId${e.rId}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="${e.Target}" TargetMode="External"/>`}}else if(e.type.toLowerCase().includes("notesSlide")){r+=`<Relationship Id="rId${e.rId}" Target="${e.Target}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"/>`}}));(e._relsChart||[]).forEach((e=>{a=Math.max(a,e.rId);r+=`<Relationship Id="rId${e.rId}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" Target="${e.Target}"/>`}));(e._relsMedia||[]).forEach((e=>{const t=e.rId.toString();a=Math.max(a,e.rId);if(e.type.toLowerCase().includes("image")){r+='<Relationship Id="rId'+t+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="'+e.Target+'"/>'}else if(e.type.toLowerCase().includes("audio")){if(r.includes(' Target="'+e.Target+'"')){r+='<Relationship Id="rId'+t+'" Type="http://schemas.microsoft.com/office/2007/relationships/media" Target="'+e.Target+'"/>'}else{r+='<Relationship Id="rId'+t+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio" Target="'+e.Target+'"/>'}}else if(e.type.toLowerCase().includes("video")){if(r.includes(' Target="'+e.Target+'"')){r+='<Relationship Id="rId'+t+'" Type="http://schemas.microsoft.com/office/2007/relationships/media" Target="'+e.Target+'"/>'}else{r+='<Relationship Id="rId'+t+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" Target="'+e.Target+'"/>'}}else if(e.type.toLowerCase().includes("online")){if(r.includes(' Target="'+e.Target+'"')){r+='<Relationship Id="rId'+t+'" Type="http://schemas.microsoft.com/office/2007/relationships/image" Target="'+e.Target+'"/>'}else{r+='<Relationship Id="rId'+t+'" Target="'+e.Target+'" TargetMode="External" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"/>'}}}));t.forEach(((e,t)=>{r+=`<Relationship Id="rId${a+t+1}" Type="${e.type}" Target="${e.target}"/>`}));r+="</Relationships>";return r}function genXmlParagraphProperties(e,t){var a,r;let n="";let o="";let i="";let s="";const l=t?"a:lvl1pPr":"a:pPr";let c=valToPts(A);let d=`<${l}${e.options.rtlMode?' rtl="1" ':""}`;{if(e.options.align){switch(e.options.align){case"left":d+=' algn="l"';break;case"right":d+=' algn="r"';break;case"center":d+=' algn="ctr"';break;case"justify":d+=' algn="just"';break;default:d+="";break}}if(e.options.lineSpacing){o=`<a:lnSpc><a:spcPts val="${Math.round(e.options.lineSpacing*100)}"/></a:lnSpc>`}else if(e.options.lineSpacingMultiple){o=`<a:lnSpc><a:spcPct val="${Math.round(e.options.lineSpacingMultiple*1e5)}"/></a:lnSpc>`}if(e.options.indentLevel&&!isNaN(Number(e.options.indentLevel))&&e.options.indentLevel>0){d+=` lvl="${e.options.indentLevel}"`}if(e.options.paraSpaceBefore&&!isNaN(Number(e.options.paraSpaceBefore))&&e.options.paraSpaceBefore>0){i+=`<a:spcBef><a:spcPts val="${Math.round(e.options.paraSpaceBefore*100)}"/></a:spcBef>`}if(e.options.paraSpaceAfter&&!isNaN(Number(e.options.paraSpaceAfter))&&e.options.paraSpaceAfter>0){i+=`<a:spcAft><a:spcPts val="${Math.round(e.options.paraSpaceAfter*100)}"/></a:spcAft>`}if(typeof e.options.bullet==="object"){if((r=(a=e===null||e===void 0?void 0:e.options)===null||a===void 0?void 0:a.bullet)===null||r===void 0?void 0:r.indent)c=valToPts(e.options.bullet.indent);if(e.options.bullet.type){if(e.options.bullet.type.toString().toLowerCase()==="number"){d+=` marL="${e.options.indentLevel&&e.options.indentLevel>0?c+c*e.options.indentLevel:c}" indent="-${c}"`;n=`<a:buSzPct val="100000"/><a:buFont typeface="+mj-lt"/><a:buAutoNum type="${e.options.bullet.style||"arabicPeriod"}" startAt="${e.options.bullet.numberStartAt||e.options.bullet.startAt||"1"}"/>`}}else if(e.options.bullet.characterCode){let t=`&#x${e.options.bullet.characterCode};`;if(!/^[0-9A-Fa-f]{4}$/.test(e.options.bullet.characterCode)){console.warn("Warning: `bullet.characterCode should be a 4-digit unicode charatcer (ex: 22AB)`!");t=H.DEFAULT}d+=` marL="${e.options.indentLevel&&e.options.indentLevel>0?c+c*e.options.indentLevel:c}" indent="-${c}"`;n='<a:buSzPct val="100000"/><a:buChar char="'+t+'"/>'}else if(e.options.bullet.code){let t=`&#x${e.options.bullet.code};`;if(!/^[0-9A-Fa-f]{4}$/.test(e.options.bullet.code)){console.warn("Warning: `bullet.code should be a 4-digit hex code (ex: 22AB)`!");t=H.DEFAULT}d+=` marL="${e.options.indentLevel&&e.options.indentLevel>0?c+c*e.options.indentLevel:c}" indent="-${c}"`;n='<a:buSzPct val="100000"/><a:buChar char="'+t+'"/>'}else{d+=` marL="${e.options.indentLevel&&e.options.indentLevel>0?c+c*e.options.indentLevel:c}" indent="-${c}"`;n=`<a:buSzPct val="100000"/><a:buChar char="${H.DEFAULT}"/>`}}else if(e.options.bullet){d+=` marL="${e.options.indentLevel&&e.options.indentLevel>0?c+c*e.options.indentLevel:c}" indent="-${c}"`;n=`<a:buSzPct val="100000"/><a:buChar char="${H.DEFAULT}"/>`}else if(!e.options.bullet){d+=' indent="0" marL="0"';n="<a:buNone/>"}if(e.options.tabStops&&Array.isArray(e.options.tabStops)){const t=e.options.tabStops.map((e=>`<a:tab pos="${inch2Emu(e.position||1)}" algn="${e.alignment||"l"}"/>`)).join("");s=`<a:tabLst>${t}</a:tabLst>`}d+=">"+o+i+n+s;if(t)d+=genXmlTextRunProperties(e.options,true);d+="</"+l+">"}return d}function genXmlTextRunProperties(e,t){var a;let r="";const n=t?"a:defRPr":"a:rPr";r+="<"+n+' lang="'+(e.lang?e.lang:"en-US")+'"'+(e.lang?' altLang="en-US"':"");r+=e.fontSize?` sz="${Math.round(e.fontSize*100)}"`:"";r+=(e===null||e===void 0?void 0:e.bold)?` b="${e.bold?"1":"0"}"`:"";r+=(e===null||e===void 0?void 0:e.italic)?` i="${e.italic?"1":"0"}"`:"";r+=(e===null||e===void 0?void 0:e.strike)?` strike="${typeof e.strike==="string"?e.strike:"sngStrike"}"`:"";if(typeof e.underline==="object"&&((a=e.underline)===null||a===void 0?void 0:a.style)){r+=` u="${e.underline.style}"`}else if(typeof e.underline==="string"){r+=` u="${String(e.underline)}"`}else if(e.hyperlink){r+=' u="sng"'}if(e.baseline){r+=` baseline="${Math.round(e.baseline*50)}"`}else if(e.subscript){r+=' baseline="-40000"'}else if(e.superscript){r+=' baseline="30000"'}r+=e.charSpacing?` spc="${Math.round(e.charSpacing*100)}" kern="0"`:"";r+=' dirty="0">';if(e.color||e.fontFace||e.outline||typeof e.underline==="object"&&e.underline.color){if(e.outline&&typeof e.outline==="object"){r+=`<a:ln w="${valToPts(e.outline.size||.75)}">${genXmlColorSelection(e.outline.color||"FFFFFF")}</a:ln>`}if(e.color)r+=genXmlColorSelection({color:e.color,transparency:e.transparency});if(e.highlight)r+=`<a:highlight>${createColorElement(e.highlight)}</a:highlight>`;if(typeof e.underline==="object"&&e.underline.color)r+=`<a:uFill>${genXmlColorSelection(e.underline.color)}</a:uFill>`;if(e.glow)r+=`<a:effectLst>${createGlowElement(e.glow,C)}</a:effectLst>`;if(e.fontFace){r+=`<a:latin typeface="${e.fontFace}" pitchFamily="34" charset="0"/><a:ea typeface="${e.fontFace}" pitchFamily="34" charset="-122"/><a:cs typeface="${e.fontFace}" pitchFamily="34" charset="-120"/>`}}if(e.hyperlink){if(typeof e.hyperlink!=="object")throw new Error("ERROR: text `hyperlink` option should be an object. Ex: `hyperlink:{url:'https://github.com'}` ");else if(!e.hyperlink.url&&!e.hyperlink.slide)throw new Error("ERROR: 'hyperlink requires either `url` or `slide`'");else if(e.hyperlink.url){r+=`<a:hlinkClick r:id="rId${e.hyperlink._rId}" invalidUrl="" action="" tgtFrame="" tooltip="${e.hyperlink.tooltip?encodeXmlEntities(e.hyperlink.tooltip):""}" history="1" highlightClick="0" endSnd="0"${e.color?">":"/>"}`}else if(e.hyperlink.slide){r+=`<a:hlinkClick r:id="rId${e.hyperlink._rId}" action="ppaction://hlinksldjump" tooltip="${e.hyperlink.tooltip?encodeXmlEntities(e.hyperlink.tooltip):""}"${e.color?">":"/>"}`}if(e.color){r+=" <a:extLst>";r+=' <a:ext uri="{A12FA001-AC4F-418D-AE19-62706E023703}">';r+=' <ahyp:hlinkClr xmlns:ahyp="http://schemas.microsoft.com/office/drawing/2018/hyperlinkcolor" val="tx"/>';r+=" </a:ext>";r+=" </a:extLst>";r+="</a:hlinkClick>"}}r+=`</${n}>`;return r}function genXmlTextRun(e){return e.text?`<a:r>${genXmlTextRunProperties(e.options,false)}<a:t>${encodeXmlEntities(e.text)}</a:t></a:r>`:""}function genXmlBodyProperties(e){let t="<a:bodyPr";if(e&&e._type===G.text&&e.options._bodyProp){t+=e.options._bodyProp.wrap?' wrap="square"':' wrap="none"';if(e.options._bodyProp.lIns||e.options._bodyProp.lIns===0)t+=` lIns="${e.options._bodyProp.lIns}"`;if(e.options._bodyProp.tIns||e.options._bodyProp.tIns===0)t+=` tIns="${e.options._bodyProp.tIns}"`;if(e.options._bodyProp.rIns||e.options._bodyProp.rIns===0)t+=` rIns="${e.options._bodyProp.rIns}"`;if(e.options._bodyProp.bIns||e.options._bodyProp.bIns===0)t+=` bIns="${e.options._bodyProp.bIns}"`;t+=' rtlCol="0"';if(e.options._bodyProp.anchor)t+=' anchor="'+e.options._bodyProp.anchor+'"';if(e.options._bodyProp.vert)t+=' vert="'+e.options._bodyProp.vert+'"';t+=">";if(e.options.fit){if(e.options.fit==="none")t+="";else if(e.options.fit==="shrink")t+="<a:normAutofit/>";else if(e.options.fit==="resize")t+="<a:spAutoFit/>"}if(e.options.shrinkText)t+="<a:normAutofit/>";t+=e.options._bodyProp.autoFit?"<a:spAutoFit/>":"";t+="</a:bodyPr>"}else{t+=' wrap="square" rtlCol="0">';t+="</a:bodyPr>"}return e._type===G.tablecell?"<a:bodyPr/>":t}function genXmlTextBody(e){const t=e.options||{};let a=[];const r=[];if(t&&e._type!==G.tablecell&&(typeof e.text==="undefined"||e.text===null))return"";let n=e._type===G.tablecell?"<a:txBody>":"<p:txBody>";{n+=genXmlBodyProperties(e);if(t.h===0&&t.line&&t.align)n+='<a:lstStyle><a:lvl1pPr algn="l"/></a:lstStyle>';else if(e._type==="placeholder")n+=`<a:lstStyle>${genXmlParagraphProperties(e,true)}</a:lstStyle>`;else n+="<a:lstStyle/>"}if(typeof e.text==="string"||typeof e.text==="number"){a.push({text:e.text.toString(),options:t||{}})}else if(e.text&&!Array.isArray(e.text)&&typeof e.text==="object"&&Object.keys(e.text).includes("text")){a.push({text:e.text||"",options:e.options||{}})}else if(Array.isArray(e.text)){a=e.text.map((e=>({text:e.text,options:e.options})))}a.forEach(((e,a)=>{if(!e.text)e.text="";e.options=e.options||t||{};if(a===0&&e.options&&!e.options.bullet&&t.bullet)e.options.bullet=t.bullet;if(typeof e.text==="string"||typeof e.text==="number"){e.text=e.text.toString().replace(/\r*\n/g,i)}if(e.text.includes(i)&&e.text.match(/\n$/g)===null){e.text.split(i).forEach((t=>{e.options.breakLine=true;r.push({text:t,options:e.options})}))}else{r.push(e)}}));const o=[];let s=[];r.forEach(((e,a)=>{if(s.length>0&&(e.options.align||t.align)){if(e.options.align!==r[a-1].options.align){o.push(s);s=[]}}else if(s.length>0&&e.options.bullet&&s.length>0){o.push(s);s=[];e.options.breakLine=false}s.push(e);if(s.length>0&&e.options.breakLine){if(a+1<r.length){o.push(s);s=[]}}if(a+1===r.length)o.push(s)}));o.forEach((a=>{var r;let o=false;n+="<a:p>";let i=`<a:pPr ${((r=a[0].options)===null||r===void 0?void 0:r.rtlMode)?' rtl="1" ':""}`;a.forEach(((e,a)=>{e.options._lineIdx=a;if(a>0&&e.options.softBreakBefore){n+="<a:br/>"}e.options.align=e.options.align||t.align;e.options.lineSpacing=e.options.lineSpacing||t.lineSpacing;e.options.lineSpacingMultiple=e.options.lineSpacingMultiple||t.lineSpacingMultiple;e.options.indentLevel=e.options.indentLevel||t.indentLevel;e.options.paraSpaceBefore=e.options.paraSpaceBefore||t.paraSpaceBefore;e.options.paraSpaceAfter=e.options.paraSpaceAfter||t.paraSpaceAfter;i=genXmlParagraphProperties(e,false);n+=i.replace("<a:pPr></a:pPr>","");Object.entries(t).filter((([t])=>!(e.options.hyperlink&&t==="color"))).forEach((([t,a])=>{if(t!=="bullet"&&!e.options[t])e.options[t]=a}));n+=genXmlTextRun(e);if(!e.text&&t.fontSize||e.options.fontSize){o=true;t.fontSize=t.fontSize||e.options.fontSize}}));if(e._type===G.tablecell&&(t.fontSize||t.fontFace)){if(t.fontFace){n+=`<a:endParaRPr lang="${t.lang||"en-US"}"`+(t.fontSize?` sz="${Math.round(t.fontSize*100)}"`:"")+' dirty="0">';n+=`<a:latin typeface="${t.fontFace}" charset="0"/>`;n+=`<a:ea typeface="${t.fontFace}" charset="0"/>`;n+=`<a:cs typeface="${t.fontFace}" charset="0"/>`;n+="</a:endParaRPr>"}else{n+=`<a:endParaRPr lang="${t.lang||"en-US"}"`+(t.fontSize?` sz="${Math.round(t.fontSize*100)}"`:"")+' dirty="0"/>'}}else if(o){n+=`<a:endParaRPr lang="${t.lang||"en-US"}"`+(t.fontSize?` sz="${Math.round(t.fontSize*100)}"`:"")+' dirty="0"/>'}else{n+=`<a:endParaRPr lang="${t.lang||"en-US"}" dirty="0"/>`}n+="</a:p>"}));if(n.indexOf("<a:p>")===-1){n+="<a:p><a:endParaRPr/></a:p>"}n+=e._type===G.tablecell?"</a:txBody>":"</p:txBody>";return n}function genXmlPlaceholder(e){var t,a;if(!e)return"";const r=((t=e.options)===null||t===void 0?void 0:t._placeholderIdx)?e.options._placeholderIdx:"";const n=((a=e.options)===null||a===void 0?void 0:a._placeholderType)?e.options._placeholderType:"";const o=n&&Q[n]?Q[n].toString():"";return`<p:ph\n\t\t${r?' idx="'+r.toString()+'"':""}\n\t\t${o&&Q[o]?` type="${o}"`:""}\n\t\t${e.text&&e.text.length>0?' hasCustomPrompt="1"':""}\n\t\t/>`}function makeXmlContTypes(e,t,a){let r='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+i;r+='<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';r+='<Default Extension="xml" ContentType="application/xml"/>';r+='<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>';r+='<Default Extension="jpeg" ContentType="image/jpeg"/>';r+='<Default Extension="jpg" ContentType="image/jpg"/>';r+='<Default Extension="svg" ContentType="image/svg+xml"/>';r+='<Default Extension="png" ContentType="image/png"/>';r+='<Default Extension="gif" ContentType="image/gif"/>';r+='<Default Extension="m4v" ContentType="video/mp4"/>';r+='<Default Extension="mp4" ContentType="video/mp4"/>';e.forEach((e=>{(e._relsMedia||[]).forEach((e=>{if(e.type!=="image"&&e.type!=="online"&&e.type!=="chart"&&e.extn!=="m4v"&&!r.includes(e.type)){r+='<Default Extension="'+e.extn+'" ContentType="'+e.type+'"/>'}}))}));r+='<Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing"/>';r+='<Default Extension="xlsx" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>';r+='<Override PartName="/ppt/presentation.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"/>';r+='<Override PartName="/ppt/notesMasters/notesMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"/>';e.forEach(((e,t)=>{r+=`<Override PartName="/ppt/slideMasters/slideMaster${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/>`;r+=`<Override PartName="/ppt/slides/slide${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/>`;e._relsChart.forEach((e=>{r+=`<Override PartName="${e.Target}" ContentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml"/>`}))}));r+='<Override PartName="/ppt/presProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"/>';r+='<Override PartName="/ppt/viewProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"/>';r+='<Override PartName="/ppt/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>';r+='<Override PartName="/ppt/tableStyles.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"/>';t.forEach(((e,t)=>{r+=`<Override PartName="/ppt/slideLayouts/slideLayout${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/>`;(e._relsChart||[]).forEach((e=>{r+=' <Override PartName="'+e.Target+'" ContentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml"/>'}))}));e.forEach(((e,t)=>{r+=`<Override PartName="/ppt/notesSlides/notesSlide${t+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"/>`}));a._relsChart.forEach((e=>{r+=' <Override PartName="'+e.Target+'" ContentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml"/>'}));a._relsMedia.forEach((e=>{if(e.type!=="image"&&e.type!=="online"&&e.type!=="chart"&&e.extn!=="m4v"&&!r.includes(e.type)){r+=' <Default Extension="'+e.extn+'" ContentType="'+e.type+'"/>'}}));r+=' <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>';r+=' <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>';r+="</Types>";return r}function makeXmlRootRels(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n\t\t<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>\n\t\t<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>\n\t\t<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="ppt/presentation.xml"/>\n\t\t</Relationships>`}function makeXmlApp(e,t){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">\n\t<TotalTime>0</TotalTime>\n\t<Words>0</Words>\n\t<Application>Microsoft Office PowerPoint</Application>\n\t<PresentationFormat>On-screen Show (16:9)</PresentationFormat>\n\t<Paragraphs>0</Paragraphs>\n\t<Slides>${e.length}</Slides>\n\t<Notes>${e.length}</Notes>\n\t<HiddenSlides>0</HiddenSlides>\n\t<MMClips>0</MMClips>\n\t<ScaleCrop>false</ScaleCrop>\n\t<HeadingPairs>\n\t\t<vt:vector size="6" baseType="variant">\n\t\t\t<vt:variant><vt:lpstr>Fonts Used</vt:lpstr></vt:variant>\n\t\t\t<vt:variant><vt:i4>2</vt:i4></vt:variant>\n\t\t\t<vt:variant><vt:lpstr>Theme</vt:lpstr></vt:variant>\n\t\t\t<vt:variant><vt:i4>1</vt:i4></vt:variant>\n\t\t\t<vt:variant><vt:lpstr>Slide Titles</vt:lpstr></vt:variant>\n\t\t\t<vt:variant><vt:i4>${e.length}</vt:i4></vt:variant>\n\t\t</vt:vector>\n\t</HeadingPairs>\n\t<TitlesOfParts>\n\t\t<vt:vector size="${e.length+1+2}" baseType="lpstr">\n\t\t\t<vt:lpstr>Arial</vt:lpstr>\n\t\t\t<vt:lpstr>Calibri</vt:lpstr>\n\t\t\t<vt:lpstr>Office Theme</vt:lpstr>\n\t\t\t${e.map(((e,t)=>`<vt:lpstr>Slide ${t+1}</vt:lpstr>`)).join("")}\n\t\t</vt:vector>\n\t</TitlesOfParts>\n\t<Company>${t}</Company>\n\t<LinksUpToDate>false</LinksUpToDate>\n\t<SharedDoc>false</SharedDoc>\n\t<HyperlinksChanged>false</HyperlinksChanged>\n\t<AppVersion>16.0000</AppVersion>\n\t</Properties>`}function makeXmlCore(e,t,a,r){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n\t<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n\t\t<dc:title>${encodeXmlEntities(e)}</dc:title>\n\t\t<dc:subject>${encodeXmlEntities(t)}</dc:subject>\n\t\t<dc:creator>${encodeXmlEntities(a)}</dc:creator>\n\t\t<cp:lastModifiedBy>${encodeXmlEntities(a)}</cp:lastModifiedBy>\n\t\t<cp:revision>${r}</cp:revision>\n\t\t<dcterms:created xsi:type="dcterms:W3CDTF">${(new Date).toISOString().replace(/\.\d\d\dZ/,"Z")}</dcterms:created>\n\t\t<dcterms:modified xsi:type="dcterms:W3CDTF">${(new Date).toISOString().replace(/\.\d\d\dZ/,"Z")}</dcterms:modified>\n\t</cp:coreProperties>`}function makeXmlPresentationRels(e){let t=1;let a='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+i;a+='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';a+='<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="slideMasters/slideMaster1.xml"/>';for(let r=1;r<=e.length;r++){a+=`<Relationship Id="rId${++t}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide${r}.xml"/>`}t++;a+=`<Relationship Id="rId${t+0}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" Target="notesMasters/notesMaster1.xml"/>`+`<Relationship Id="rId${t+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps" Target="presProps.xml"/>`+`<Relationship Id="rId${t+2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps" Target="viewProps.xml"/>`+`<Relationship Id="rId${t+3}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>`+`<Relationship Id="rId${t+4}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles" Target="tableStyles.xml"/>`+"</Relationships>";return a}function makeXmlSlide(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}`+'<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" '+'xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"'+`${(e===null||e===void 0?void 0:e.hidden)?' show="0"':""}>`+`${slideObjectToXml(e)}`+"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sld>"}function getNotesFromSlide(e){let t="";e._slideObjects.forEach((e=>{if(e._type===G.notes)t+=(e===null||e===void 0?void 0:e.text)&&e.text[0]?e.text[0].text:""}));return t.replace(/\r*\n/g,i)}function makeXmlNotesMaster(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<p:notesMaster xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Header Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="hdr" sz="quarter"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="2971800" cy="458788"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"/><a:lstStyle><a:lvl1pPr algn="l"><a:defRPr sz="1200"/></a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Date Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="dt" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="3884613" y="0"/><a:ext cx="2971800" cy="458788"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"/><a:lstStyle><a:lvl1pPr algn="r"><a:defRPr sz="1200"/></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{5282F153-3F37-0F45-9E97-73ACFA13230C}" type="datetimeFigureOut"><a:rPr lang="en-US"/><a:t>7/23/19</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="4" name="Slide Image Placeholder 3"/><p:cNvSpPr><a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldImg" idx="2"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="685800" y="1143000"/><a:ext cx="5486400" cy="3086100"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/><a:ln w="12700"><a:solidFill><a:prstClr val="black"/></a:solidFill></a:ln></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle/><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="5" name="Notes Placeholder 4"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" sz="quarter" idx="3"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="685800" y="4400550"/><a:ext cx="5486400" cy="3600450"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"/><a:lstStyle/><a:p><a:pPr lvl="0"/><a:r><a:rPr lang="en-US"/><a:t>Click to edit Master text styles</a:t></a:r></a:p><a:p><a:pPr lvl="1"/><a:r><a:rPr lang="en-US"/><a:t>Second level</a:t></a:r></a:p><a:p><a:pPr lvl="2"/><a:r><a:rPr lang="en-US"/><a:t>Third level</a:t></a:r></a:p><a:p><a:pPr lvl="3"/><a:r><a:rPr lang="en-US"/><a:t>Fourth level</a:t></a:r></a:p><a:p><a:pPr lvl="4"/><a:r><a:rPr lang="en-US"/><a:t>Fifth level</a:t></a:r></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="6" name="Footer Placeholder 5"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="ftr" sz="quarter" idx="4"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="0" y="8685213"/><a:ext cx="2971800" cy="458787"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="b"/><a:lstStyle><a:lvl1pPr algn="l"><a:defRPr sz="1200"/></a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="7" name="Slide Number Placeholder 6"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldNum" sz="quarter" idx="5"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="3884613" y="8685213"/><a:ext cx="2971800" cy="458787"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="b"/><a:lstStyle><a:lvl1pPr algn="r"><a:defRPr sz="1200"/></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{CE5E9CC1-C706-0F49-92D6-E571CC5EEA8F}" type="slidenum"><a:rPr lang="en-US"/><a:t>‹#›</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp></p:spTree><p:extLst><p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"><p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1024086991"/></p:ext></p:extLst></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:notesStyle><a:lvl1pPr marL="0" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="457200" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="914400" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1371600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="1828800" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr><a:lvl6pPr marL="2286000" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr><a:lvl7pPr marL="2743200" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr><a:lvl8pPr marL="3200400" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr><a:lvl9pPr marL="3657600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr></p:notesStyle></p:notesMaster>`}function makeXmlNotesSlide(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<p:notes xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:cSld><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Slide Image Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldImg"/></p:nvPr></p:nvSpPr><p:spPr/></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Notes Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr/><p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" dirty="0"/><a:t>${encodeXmlEntities(getNotesFromSlide(e))}</a:t></a:r><a:endParaRPr lang="en-US" dirty="0"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="4" name="Slide Number Placeholder 3"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldNum" sz="quarter" idx="10"/></p:nvPr></p:nvSpPr><p:spPr/><p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:fld id="${F}" type="slidenum"><a:rPr lang="en-US"/><a:t>${e._slideNum}</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp></p:spTree><p:extLst><p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"><p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1024086991"/></p:ext></p:extLst></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:notes>`}function makeXmlLayout(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n\t\t<p:sldLayout xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" preserve="1">\n\t\t${slideObjectToXml(e)}\n\t\t<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`}function makeXmlMaster(e,t){const a=t.map(((t,a)=>`<p:sldLayoutId id="${s+a}" r:id="rId${e._rels.length+a+1}"/>`));let r='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+i;r+='<p:sldMaster xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">';r+=slideObjectToXml(e);r+='<p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/>';r+="<p:sldLayoutIdLst>"+a.join("")+"</p:sldLayoutIdLst>";r+='<p:hf sldNum="0" hdr="0" ftr="0" dt="0"/>';r+="<p:txStyles>"+" <p:titleStyle>"+' <a:lvl1pPr algn="ctr" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="0"/></a:spcBef><a:buNone/><a:defRPr sz="4400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mj-lt"/><a:ea typeface="+mj-ea"/><a:cs typeface="+mj-cs"/></a:defRPr></a:lvl1pPr>'+" </p:titleStyle>"+" <p:bodyStyle>"+' <a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="3200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr>'+' <a:lvl2pPr marL="742950" indent="-285750" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="–"/><a:defRPr sz="2800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr>'+' <a:lvl3pPr marL="1143000" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="2400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr>'+' <a:lvl4pPr marL="1600200" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="–"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr>'+' <a:lvl5pPr marL="2057400" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="»"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr>'+' <a:lvl6pPr marL="2514600" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr>'+' <a:lvl7pPr marL="2971800" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr>'+' <a:lvl8pPr marL="3429000" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr>'+' <a:lvl9pPr marL="3886200" indent="-228600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial" pitchFamily="34" charset="0"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr>'+" </p:bodyStyle>"+" <p:otherStyle>"+' <a:defPPr><a:defRPr lang="en-US"/></a:defPPr>'+' <a:lvl1pPr marL="0" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr>'+' <a:lvl2pPr marL="457200" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr>'+' <a:lvl3pPr marL="914400" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr>'+' <a:lvl4pPr marL="1371600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr>'+' <a:lvl5pPr marL="1828800" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr>'+' <a:lvl6pPr marL="2286000" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr>'+' <a:lvl7pPr marL="2743200" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr>'+' <a:lvl8pPr marL="3200400" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr>'+' <a:lvl9pPr marL="3657600" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr>'+" </p:otherStyle>"+"</p:txStyles>";r+="</p:sldMaster>";return r}function makeXmlSlideLayoutRel(e,t){return slideObjectRelationsToXml(t[e-1],[{target:"../slideMasters/slideMaster1.xml",type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"}])}function makeXmlSlideRel(e,t,a){return slideObjectRelationsToXml(e[a-1],[{target:`../slideLayouts/slideLayout${getLayoutIdxForSlide(e,t,a)}.xml`,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"},{target:`../notesSlides/notesSlide${a}.xml`,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"}])}function makeXmlNotesSlideRel(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n\t\t<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n\t\t\t<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" Target="../notesMasters/notesMaster1.xml"/>\n\t\t\t<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="../slides/slide${e}.xml"/>\n\t\t</Relationships>`}function makeXmlMasterRel(e,t){const a=t.map(((e,t)=>({target:`../slideLayouts/slideLayout${t+1}.xml`,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"})));a.push({target:"../theme/theme1.xml",type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"});return slideObjectRelationsToXml(e,a)}function makeXmlNotesMasterRel(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n\t\t<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="../theme/theme1.xml"/>\n\t\t</Relationships>`}function getLayoutIdxForSlide(e,t,a){for(let r=0;r<t.length;r++){if(t[r]._name===e[a-1]._slideLayout._name){return r+1}}return 1}function makeXmlTheme(e){var t,a,r,n;const o=((t=e.theme)===null||t===void 0?void 0:t.headFontFace)?`<a:latin typeface="${(a=e.theme)===null||a===void 0?void 0:a.headFontFace}"/>`:'<a:latin typeface="Calibri Light" panose="020F0302020204030204"/>';const i=((r=e.theme)===null||r===void 0?void 0:r.bodyFontFace)?`<a:latin typeface="${(n=e.theme)===null||n===void 0?void 0:n.bodyFontFace}"/>`:'<a:latin typeface="Calibri" panose="020F0502020204030204"/>';return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont>${o}<a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont>${i}<a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>`}function makeXmlPresentation(e){let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}`+'<p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" '+`xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" ${e.rtlMode?'rtl="1"':""} saveSubsetFonts="1" autoCompressPictures="0">`;t+='<p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst>';t+="<p:sldIdLst>";e.slides.forEach((e=>t+=`<p:sldId id="${e._slideId}" r:id="rId${e._rId}"/>`));t+="</p:sldIdLst>";t+=`<p:notesMasterIdLst><p:notesMasterId r:id="rId${e.slides.length+2}"/></p:notesMasterIdLst>`;t+=`<p:sldSz cx="${e.presLayout.width}" cy="${e.presLayout.height}"/>`;t+=`<p:notesSz cx="${e.presLayout.height}" cy="${e.presLayout.width}"/>`;t+="<p:defaultTextStyle>";for(let e=1;e<10;e++){t+=`<a:lvl${e}pPr marL="${(e-1)*457200}" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">`+'<a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/>'+`</a:defRPr></a:lvl${e}pPr>`}t+="</p:defaultTextStyle>";if(e.sections&&e.sections.length>0){t+='<p:extLst><p:ext uri="{521415D9-36F7-43E2-AB2F-B90AF26B5E84}">';t+='<p14:sectionLst xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main">';e.sections.forEach((e=>{t+=`<p14:section name="${encodeXmlEntities(e.title)}" id="{${getUuid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}}"><p14:sldIdLst>`;e._slides.forEach((e=>t+=`<p14:sldId id="${e._slideId}"/>`));t+="</p14:sldIdLst></p14:section>"}));t+="</p14:sectionLst></p:ext>";t+='<p:ext uri="{EFAFB233-063F-42B5-8137-9DF3F51BA10A}"><p15:sldGuideLst xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"/></p:ext>';t+="</p:extLst>"}t+="</p:presentation>";return t}function makeXmlPresProps(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<p:presentationPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"/>`}function makeXmlTableStyles(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<a:tblStyleLst xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`}function makeXmlViewProps(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${i}<p:viewPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:normalViewPr horzBarState="maximized"><p:restoredLeft sz="15611"/><p:restoredTop sz="94610"/></p:normalViewPr><p:slideViewPr><p:cSldViewPr snapToGrid="0" snapToObjects="1"><p:cViewPr varScale="1"><p:scale><a:sx n="136" d="100"/><a:sy n="136" d="100"/></p:scale><p:origin x="216" y="312"/></p:cViewPr><p:guideLst/></p:cSldViewPr></p:slideViewPr><p:notesTextViewPr><p:cViewPr><p:scale><a:sx n="1" d="1"/><a:sy n="1" d="1"/></p:scale><p:origin x="0" y="0"/></p:cViewPr></p:notesTextViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`}const Z="4.0.1";class PptxGenJS{set layout(e){const t=this.LAYOUTS[e];if(t){this._layout=e;this._presLayout=t}else{throw new Error("UNKNOWN-LAYOUT")}}get layout(){return this._layout}get version(){return this._version}set author(e){this._author=e}get author(){return this._author}set company(e){this._company=e}get company(){return this._company}set revision(e){this._revision=e}get revision(){return this._revision}set subject(e){this._subject=e}get subject(){return this._subject}set theme(e){this._theme=e}get theme(){return this._theme}set title(e){this._title=e}get title(){return this._title}set rtlMode(e){this._rtlMode=e}get rtlMode(){return this._rtlMode}get masterSlide(){return this._masterSlide}get slides(){return this._slides}get sections(){return this._sections}get slideLayouts(){return this._slideLayouts}get AlignH(){return this._alignH}get AlignV(){return this._alignV}get ChartType(){return this._chartType}get OutputType(){return this._outputType}get presLayout(){return this._presLayout}get SchemeColor(){return this._schemeColor}get ShapeType(){return this._shapeType}get charts(){return this._charts}get colors(){return this._colors}get shapes(){return this._shapes}constructor(){this._version=Z;this._alignH=$;this._alignV=U;this._chartType=M;this._outputType=R;this._schemeColor=z;this._shapeType=O;this._charts=W;this._colors=X;this._shapes=j;this.addNewSlide=e=>{const t=this.sections.length>0&&this.sections[this.sections.length-1]._slides.filter((e=>e._slideNum===this.slides[this.slides.length-1]._slideNum)).length>0;e.sectionTitle=t?this.sections[this.sections.length-1].title:null;return this.addSlide(e)};this.getSlide=e=>this.slides.filter((t=>t._slideNum===e))[0];this.setSlideNumber=e=>{this.masterSlide._slideNumberProps=e;this.slideLayouts.filter((e=>e._name===b))[0]._slideNumberProps=e};this.createChartMediaRels=(e,t,a)=>{e._relsChart.forEach((e=>a.push(createExcelWorksheet(e,t))));e._relsMedia.forEach((e=>{if(e.type!=="online"&&e.type!=="hyperlink"){let a=e.data&&typeof e.data==="string"?e.data:"";if(!a.includes(",")&&!a.includes(";"))a="image/png;base64,"+a;else if(!a.includes(","))a="image/png;base64,"+a;else if(!a.includes(";"))a="image/png;"+a;t.file(e.Target.replace("..","ppt"),a.split(",").pop(),{base64:true})}}))};this.writeFileToBrowser=(e,t)=>__awaiter(this,void 0,void 0,(function*(){const a=document.createElement("a");a.setAttribute("style","display:none;");a.dataset.interception="off";document.body.appendChild(a);if(window.URL.createObjectURL){const r=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}));a.href=r;a.download=e;a.click();setTimeout((()=>{window.URL.revokeObjectURL(r);document.body.removeChild(a)}),100);return yield Promise.resolve(e)}}));this.exportPresentation=e=>__awaiter(this,void 0,void 0,(function*(){const t=[];let a=[];const n=new r;this.slides.forEach((e=>{a=a.concat(encodeSlideMediaRels(e))}));this.slideLayouts.forEach((e=>{a=a.concat(encodeSlideMediaRels(e))}));a=a.concat(encodeSlideMediaRels(this.masterSlide));return yield Promise.all(a).then((()=>__awaiter(this,void 0,void 0,(function*(){this.slides.forEach((e=>{if(e._slideLayout)addPlaceholdersToSlideLayouts(e)}));n.folder("_rels");n.folder("docProps");n.folder("ppt").folder("_rels");n.folder("ppt/charts").folder("_rels");n.folder("ppt/embeddings");n.folder("ppt/media");n.folder("ppt/slideLayouts").folder("_rels");n.folder("ppt/slideMasters").folder("_rels");n.folder("ppt/slides").folder("_rels");n.folder("ppt/theme");n.folder("ppt/notesMasters").folder("_rels");n.folder("ppt/notesSlides").folder("_rels");n.file("[Content_Types].xml",makeXmlContTypes(this.slides,this.slideLayouts,this.masterSlide));n.file("_rels/.rels",makeXmlRootRels());n.file("docProps/app.xml",makeXmlApp(this.slides,this.company));n.file("docProps/core.xml",makeXmlCore(this.title,this.subject,this.author,this.revision));n.file("ppt/_rels/presentation.xml.rels",makeXmlPresentationRels(this.slides));n.file("ppt/theme/theme1.xml",makeXmlTheme(this));n.file("ppt/presentation.xml",makeXmlPresentation(this));n.file("ppt/presProps.xml",makeXmlPresProps());n.file("ppt/tableStyles.xml",makeXmlTableStyles());n.file("ppt/viewProps.xml",makeXmlViewProps());this.slideLayouts.forEach(((e,t)=>{n.file(`ppt/slideLayouts/slideLayout${t+1}.xml`,makeXmlLayout(e));n.file(`ppt/slideLayouts/_rels/slideLayout${t+1}.xml.rels`,makeXmlSlideLayoutRel(t+1,this.slideLayouts))}));this.slides.forEach(((e,t)=>{n.file(`ppt/slides/slide${t+1}.xml`,makeXmlSlide(e));n.file(`ppt/slides/_rels/slide${t+1}.xml.rels`,makeXmlSlideRel(this.slides,this.slideLayouts,t+1));n.file(`ppt/notesSlides/notesSlide${t+1}.xml`,makeXmlNotesSlide(e));n.file(`ppt/notesSlides/_rels/notesSlide${t+1}.xml.rels`,makeXmlNotesSlideRel(t+1))}));n.file("ppt/slideMasters/slideMaster1.xml",makeXmlMaster(this.masterSlide,this.slideLayouts));n.file("ppt/slideMasters/_rels/slideMaster1.xml.rels",makeXmlMasterRel(this.masterSlide,this.slideLayouts));n.file("ppt/notesMasters/notesMaster1.xml",makeXmlNotesMaster());n.file("ppt/notesMasters/_rels/notesMaster1.xml.rels",makeXmlNotesMasterRel());this.slideLayouts.forEach((e=>{this.createChartMediaRels(e,n,t)}));this.slides.forEach((e=>{this.createChartMediaRels(e,n,t)}));this.createChartMediaRels(this.masterSlide,n,t);return yield Promise.all(t).then((()=>__awaiter(this,void 0,void 0,(function*(){if(e.outputType==="STREAM"){return yield n.generateAsync({type:"nodebuffer",compression:e.compression?"DEFLATE":"STORE"})}else if(e.outputType){return yield n.generateAsync({type:e.outputType})}else{return yield n.generateAsync({type:"blob",compression:e.compression?"DEFLATE":"STORE"})}}))))}))))}));const e={name:"screen4x3",width:9144e3,height:6858e3};const t={name:"screen16x9",width:9144e3,height:5143500};const a={name:"screen16x10",width:9144e3,height:5715e3};const n={name:"custom",width:12192e3,height:6858e3};this.LAYOUTS={LAYOUT_4x3:e,LAYOUT_16x9:t,LAYOUT_16x10:a,LAYOUT_WIDE:n};this._author="PptxGenJS";this._company="PptxGenJS";this._revision="1";this._subject="PptxGenJS Presentation";this._title="PptxGenJS Presentation";this._presLayout={name:this.LAYOUTS[v].name,_sizeW:this.LAYOUTS[v].width,_sizeH:this.LAYOUTS[v].height,width:this.LAYOUTS[v].width,height:this.LAYOUTS[v].height};this._rtlMode=false;this._slideLayouts=[{_margin:x,_name:b,_presLayout:this._presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slide:null,_slideNum:1e3,_slideNumberProps:null,_slideObjects:[]}];this._slides=[];this._sections=[];this._masterSlide={addChart:null,addImage:null,addMedia:null,addNotes:null,addShape:null,addTable:null,addText:null,_name:null,_presLayout:this._presLayout,_rId:null,_rels:[],_relsChart:[],_relsMedia:[],_slideId:null,_slideLayout:null,_slideNum:null,_slideNumberProps:null,_slideObjects:[]}}stream(e){return __awaiter(this,void 0,void 0,(function*(){return yield this.exportPresentation({compression:e===null||e===void 0?void 0:e.compression,outputType:"STREAM"})}))}write(e){return __awaiter(this,void 0,void 0,(function*(){const t=typeof e==="object"&&(e===null||e===void 0?void 0:e.outputType)?e.outputType:e?e:null;const a=typeof e==="object"&&(e===null||e===void 0?void 0:e.compression)?e.compression:false;return yield this.exportPresentation({compression:a,outputType:t})}))}writeFile(e){return __awaiter(this,void 0,void 0,(function*(){var t,r;const n=typeof process!=="undefined"&&!!((t=process.versions)===null||t===void 0?void 0:t.node)&&((r=process.release)===null||r===void 0?void 0:r.name)==="node";if(typeof e==="string"){console.warn("[WARNING] writeFile(string) is deprecated - pass { fileName } instead.");e={fileName:e}}const{fileName:o="Presentation.pptx",compression:i=false}=e;const s=o.toLowerCase().endsWith(".pptx")?o:`${o}.pptx`;const l=n?"nodebuffer":null;const c=yield this.exportPresentation({compression:i,outputType:l});if(n){const{promises:e}=yield Promise.resolve().then(a.t.bind(a,3024,23));const{writeFile:t}=e;yield t(s,c);return s}yield this.writeFileToBrowser(s,c);return s}))}addSection(e){if(!e)console.warn("addSection requires an argument");else if(!e.title)console.warn("addSection requires a title");const t={_type:"user",_slides:[],title:e.title};if(e.order)this.sections.splice(e.order,0,t);else this._sections.push(t)}addSlide(e){const t=typeof e==="string"?e:(e===null||e===void 0?void 0:e.masterName)?e.masterName:"";let a={_name:this.LAYOUTS[v].name,_presLayout:this.presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slideNum:this.slides.length+1};if(t){const e=this.slideLayouts.filter((e=>e._name===t))[0];if(e)a=e}const r=new Slide({addSlide:this.addNewSlide,getSlide:this.getSlide,presLayout:this.presLayout,setSlideNum:this.setSlideNumber,slideId:this.slides.length+256,slideRId:this.slides.length+2,slideNumber:this.slides.length+1,slideLayout:a});this._slides.push(r);if(e===null||e===void 0?void 0:e.sectionTitle){const t=this.sections.filter((t=>t.title===e.sectionTitle))[0];if(!t)console.warn(`addSlide: unable to find section with title: "${e.sectionTitle}"`);else t._slides.push(r)}else if(this.sections&&this.sections.length>0&&!(e===null||e===void 0?void 0:e.sectionTitle)){const e=this._sections[this.sections.length-1];if(e._type==="default")e._slides.push(r);else{this._sections.push({title:`Default-${this.sections.filter((e=>e._type==="default")).length+1}`,_type:"default",_slides:[r]})}}return r}defineLayout(e){if(!e)console.warn("defineLayout requires `{name, width, height}`");else if(!e.name)console.warn("defineLayout requires `name`");else if(!e.width)console.warn("defineLayout requires `width`");else if(!e.height)console.warn("defineLayout requires `height`");else if(typeof e.height!=="number")console.warn("defineLayout `height` should be a number (inches)");else if(typeof e.width!=="number")console.warn("defineLayout `width` should be a number (inches)");this.LAYOUTS[e.name]={name:e.name,_sizeW:Math.round(Number(e.width)*n),_sizeH:Math.round(Number(e.height)*n),width:Math.round(Number(e.width)*n),height:Math.round(Number(e.height)*n)}}defineSlideMaster(e){const t=JSON.parse(JSON.stringify(e));if(!t.title)throw new Error("defineSlideMaster() object argument requires a `title` value. (https://gitbrent.github.io/PptxGenJS/docs/masters.html)");const a={_margin:t.margin||x,_name:t.title,_presLayout:this.presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slide:null,_slideNum:1e3+this.slideLayouts.length+1,_slideNumberProps:t.slideNumber||null,_slideObjects:[],background:t.background||null,bkgd:t.bkgd||null};createSlideMaster(t,a);this.slideLayouts.push(a);if(t.background||t.bkgd)addBackgroundDefinition(t.background,a);if(a._slideNumberProps&&!this.masterSlide._slideNumberProps)this.masterSlide._slideNumberProps=a._slideNumberProps}tableToSlides(e,t={}){genTableToSlides(this,e,t,(t===null||t===void 0?void 0:t.masterSlideName)?this.slideLayouts.filter((e=>e._name===t.masterSlideName))[0]:null)}}e.exports=PptxGenJS},6246:e=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,a,r){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var o,i;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function afterTickOne(){e.call(null,t)}));case 3:return process.nextTick((function afterTickTwo(){e.call(null,t,a)}));case 4:return process.nextTick((function afterTickThree(){e.call(null,t,a,r)}));default:o=new Array(n-1);i=0;while(i<o.length){o[i++]=arguments[i]}return process.nextTick((function afterTick(){e.apply(null,o)}))}}},5950:function(){(function(e,t){"use strict";if(e.setImmediate){return}var a=1;var r={};var n=false;var o=e.document;var i;function setImmediate(e){if(typeof e!=="function"){e=new Function(""+e)}var t=new Array(arguments.length-1);for(var n=0;n<t.length;n++){t[n]=arguments[n+1]}var o={callback:e,args:t};r[a]=o;i(a);return a++}function clearImmediate(e){delete r[e]}function run(e){var a=e.callback;var r=e.args;switch(r.length){case 0:a();break;case 1:a(r[0]);break;case 2:a(r[0],r[1]);break;case 3:a(r[0],r[1],r[2]);break;default:a.apply(t,r);break}}function runIfPresent(e){if(n){setTimeout(runIfPresent,0,e)}else{var t=r[e];if(t){n=true;try{run(t)}finally{clearImmediate(e);n=false}}}}function installNextTickImplementation(){i=function(e){process.nextTick((function(){runIfPresent(e)}))}}function canUsePostMessage(){if(e.postMessage&&!e.importScripts){var t=true;var a=e.onmessage;e.onmessage=function(){t=false};e.postMessage("","*");e.onmessage=a;return t}}function installPostMessageImplementation(){var t="setImmediate$"+Math.random()+"$";var onGlobalMessage=function(a){if(a.source===e&&typeof a.data==="string"&&a.data.indexOf(t)===0){runIfPresent(+a.data.slice(t.length))}};if(e.addEventListener){e.addEventListener("message",onGlobalMessage,false)}else{e.attachEvent("onmessage",onGlobalMessage)}i=function(a){e.postMessage(t+a,"*")}}function installMessageChannelImplementation(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;runIfPresent(t)};i=function(t){e.port2.postMessage(t)}}function installReadyStateChangeImplementation(){var e=o.documentElement;i=function(t){var a=o.createElement("script");a.onreadystatechange=function(){runIfPresent(t);a.onreadystatechange=null;e.removeChild(a);a=null};e.appendChild(a)}}function installSetTimeoutImplementation(){i=function(e){setTimeout(runIfPresent,0,e)}}var s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e;if({}.toString.call(e.process)==="[object process]"){installNextTickImplementation()}else if(canUsePostMessage()){installPostMessageImplementation()}else if(e.MessageChannel){installMessageChannelImplementation()}else if(o&&"onreadystatechange"in o.createElement("script")){installReadyStateChangeImplementation()}else{installSetTimeoutImplementation()}s.setImmediate=setImmediate;s.clearImmediate=clearImmediate})(typeof self==="undefined"?typeof global==="undefined"?this:global:self)},8430:(e,t,a)=>{e.exports=a(9023).deprecate},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},6982:e=>{"use strict";e.exports=require("crypto")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},8611:e=>{"use strict";e.exports=require("http")},5692:e=>{"use strict";e.exports=require("https")},4573:e=>{"use strict";e.exports=require("node:buffer")},1421:e=>{"use strict";e.exports=require("node:child_process")},3024:e=>{"use strict";e.exports=require("node:fs")},1455:e=>{"use strict";e.exports=require("node:fs/promises")},4708:e=>{"use strict";e.exports=require("node:https")},8161:e=>{"use strict";e.exports=require("node:os")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},755:e=>{"use strict";e.exports=require("node:url")},7975:e=>{"use strict";e.exports=require("node:util")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},3785:e=>{"use strict";e.exports=require("readline")},2203:e=>{"use strict";e.exports=require("stream")},9023:e=>{"use strict";e.exports=require("util")},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"voxflow","version":"1.7.0","description":"AI audio content creation CLI — stories, podcasts, narration, dubbing, transcription, translation, and video translation with TTS","bin":{"voxflow":"./dist/index.js"},"files":["dist/index.js","dist/935.index.js","README.md"],"engines":{"node":"^20.19.0 || >=22.12.0"},"dependencies":{"open":"^10.0.0","pptxgenjs":"^4.0.1"},"keywords":["tts","story","podcast","ai","audio","text-to-speech","voice","narration","dubbing","synthesize","voices","document","translate","subtitle","srt","transcribe","asr","video-translate","video","voxflow"],"scripts":{"build":"ncc build bin/voxflow.js -o dist --minify && rm -rf dist/cli","prepublishOnly":"npm run build","test":"node --test tests/*.test.js","test:watch":"node --test --watch tests/*.test.js"},"author":"gonghaoran","license":"UNLICENSED","homepage":"https://voxflow.studio","repository":{"type":"git","url":"https://github.com/VoxFlowStudio/FlowStudio","directory":"cli"},"publishConfig":{"access":"public"},"devDependencies":{"@vercel/ncc":"^0.38.4"}}')}};var t={};function __nccwpck_require__(a){var r=t[a];if(r!==undefined){return r.exports}var n=t[a]={exports:{}};var o=true;try{e[a].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[a]}return n.exports}__nccwpck_require__.m=e;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(a,r){if(r&1)a=this(a);if(r&8)return a;if(typeof a==="object"&&a){if(r&4&&a.__esModule)return a;if(r&16&&typeof a.then==="function")return a}var n=Object.create(null);__nccwpck_require__.r(n);var o={};t=t||[null,e({}),e([]),e(e)];for(var i=r&2&&a;typeof i=="object"&&!~t.indexOf(i);i=e(i)){Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>a[e]))}o["default"]=()=>a;__nccwpck_require__.d(n,o);return n}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var a in t){if(__nccwpck_require__.o(t,a)&&!__nccwpck_require__.o(e,a)){Object.defineProperty(e,a,{enumerable:true,get:t[a]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,a)=>{__nccwpck_require__.f[a](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var a=t.modules,r=t.ids,n=t.runtime;for(var o in a){if(__nccwpck_require__.o(a,o)){__nccwpck_require__.m[o]=a[o]}}if(n)n(__nccwpck_require__);for(var i=0;i<r.length;i++)e[r[i]]=1};__nccwpck_require__.f.require=(t,a)=>{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var a={};const{run:r}=__nccwpck_require__(9226);r().catch((e=>{console.error(`\nFatal error: ${e.message}`);process.exit(1)}));module.exports=a})();