forge-terminal 0.5.0 → 0.5.2
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/README.md +18 -11
- package/dist/chunks/{about-credits-5UQU5WHE.js → about-credits-VZQJAWG3.js} +1 -1
- package/dist/chunks/args-FZXEZBPA.js +3 -0
- package/dist/chunks/{available-M6Z62OWE.js → available-TNMISSBA.js} +1 -1
- package/dist/chunks/{boot-MGR26CBU.js → boot-NYKO3NLR.js} +1 -1
- package/dist/chunks/{catalog-VPSTQTFD.js → catalog-FMHWWMUX.js} +1 -1
- package/dist/chunks/chunk-2AFHW44W.js +36 -0
- package/dist/chunks/{chunk-P4RAYEM7.js → chunk-63ZZRDSV.js} +1 -1
- package/dist/chunks/{chunk-63ZK5SRQ.js → chunk-7I2OSTBX.js} +1 -1
- package/dist/chunks/chunk-7KYO62XK.js +3 -0
- package/dist/chunks/{chunk-DZOBIUV6.js → chunk-BIBDLXCG.js} +1 -1
- package/dist/chunks/{chunk-G46QQBT3.js → chunk-BROTSQXG.js} +1 -1
- package/dist/chunks/chunk-CVNYUROW.js +3 -0
- package/dist/chunks/chunk-CW2Y2KDQ.js +3 -0
- package/dist/chunks/chunk-DYIATUFE.js +3 -0
- package/dist/chunks/{chunk-SK2UZ25Y.js → chunk-EITGK5OI.js} +1 -1
- package/dist/chunks/chunk-GRWOJKQB.js +3 -0
- package/dist/chunks/{chunk-HOZ6XGQQ.js → chunk-GT6U6HV3.js} +2 -2
- package/dist/chunks/{chunk-JMBEZPYC.js → chunk-HWCXNKIN.js} +1 -1
- package/dist/chunks/chunk-I25E2XDH.js +3 -0
- package/dist/chunks/chunk-IED6VBE6.js +3 -0
- package/dist/chunks/{chunk-ZZZAPVKM.js → chunk-ITW5FG4K.js} +1 -1
- package/dist/chunks/{chunk-3GJ7GV3V.js → chunk-IVBSXPNS.js} +2 -2
- package/dist/chunks/chunk-J2UQI544.js +4 -0
- package/dist/chunks/{chunk-THDAQBQ3.js → chunk-J6AZTW62.js} +1 -1
- package/dist/chunks/chunk-JGJU3AW5.js +3 -0
- package/dist/chunks/{chunk-LVYQVJOF.js → chunk-K6ERQTUQ.js} +1 -1
- package/dist/chunks/chunk-KMLT45OJ.js +66 -0
- package/dist/chunks/{chunk-K7KKCR7V.js → chunk-LA5JVBFP.js} +1 -1
- package/dist/chunks/chunk-M6LYLTFH.js +3 -0
- package/dist/chunks/{chunk-PE5LAYGF.js → chunk-MF3KKEFB.js} +1 -1
- package/dist/chunks/chunk-O7DK3GJT.js +3 -0
- package/dist/chunks/chunk-Q7ERPAG3.js +7 -0
- package/dist/chunks/{chunk-Y7LOIHFU.js → chunk-R24JCIZ5.js} +1 -1
- package/dist/chunks/{chunk-XBOMWF34.js → chunk-RK3WGALB.js} +1 -1
- package/dist/chunks/chunk-RXI6QLNY.js +82 -0
- package/dist/chunks/chunk-SNFUGJ3M.js +3 -0
- package/dist/chunks/chunk-T37DEXUI.js +3 -0
- package/dist/chunks/chunk-TARDT6LZ.js +55 -0
- package/dist/chunks/{chunk-EKTUUKDP.js → chunk-TYWGB767.js} +1 -1
- package/dist/chunks/chunk-VLVNA4T3.js +3 -0
- package/dist/chunks/{chunk-YINYF6C7.js → chunk-VTA6Z45X.js} +1 -1
- package/dist/chunks/{chunk-WC6SJN5Y.js → chunk-W2QJA73Q.js} +1 -1
- package/dist/chunks/{chunk-PPR7B5AR.js → chunk-XPATZLEH.js} +1 -1
- package/dist/chunks/chunk-XUKYIVJC.js +3 -0
- package/dist/chunks/{chunk-RMD7F3QX.js → chunk-YK26E3OX.js} +1 -1
- package/dist/chunks/{chunk-F34DPQFQ.js → chunk-ZFLFBNIK.js} +1 -1
- package/dist/chunks/{chunk-OK7XOZFO.js → chunk-ZHNPBRCX.js} +1 -1
- package/dist/chunks/{chunk-C4UCCBCX.js → chunk-ZOQA3JAR.js} +1 -1
- package/dist/chunks/clip-command-SLSAWJF4.js +3 -0
- package/dist/chunks/clipboard-7KSZNWWT.js +3 -0
- package/dist/chunks/colour-LMZO2EE6.js +3 -0
- package/dist/chunks/command-DMGGGAPS.js +3 -0
- package/dist/chunks/config-command-6GXRV627.js +3 -0
- package/dist/chunks/continue-editing-4W3XWWCE.js +3 -0
- package/dist/chunks/decoded-SMEHAVCH.js +3 -0
- package/dist/chunks/{entry-TSLQHDP7.js → entry-TV4FJQDR.js} +2 -2
- package/dist/chunks/execute-NEDE4JM6.js +3 -0
- package/dist/chunks/extensions-4UJRQ32J.js +3 -0
- package/dist/chunks/{extensions-command-25JOL47P.js → extensions-command-VROVGVD4.js} +1 -1
- package/dist/chunks/{ffmpeg-3CJ6C37W.js → ffmpeg-OIVMTPY7.js} +1 -1
- package/dist/chunks/image-J5WDYORX.js +3 -0
- package/dist/chunks/install-5XLVERRR.js +3 -0
- package/dist/chunks/install-C6XNONFF.js +3 -0
- package/dist/chunks/launch-5JMWS5CI.js +17 -0
- package/dist/chunks/lock-AFVXUDOM.js +3 -0
- package/dist/chunks/manager-T3WDLUKR.js +4 -0
- package/dist/chunks/{needed-MYXIUZI4.js → needed-YU5BPYD6.js} +1 -1
- package/dist/chunks/notify-LTV7F634.js +3 -0
- package/dist/chunks/{own-WNA6BFYL.js → own-OJAQ5FRQ.js} +1 -1
- package/dist/chunks/{paths-EOYKOUBC.js → paths-6OENILJ4.js} +1 -1
- package/dist/chunks/pdfium-7HNCQ3K3.js +3 -0
- package/dist/chunks/preset-command-VP5RAXBG.js +3 -0
- package/dist/chunks/registry-E5PNQWOZ.js +3 -0
- package/dist/chunks/run-WSETTQXP.js +3 -0
- package/dist/chunks/{server-KKF3XBQG.js → server-EFNTD7ZW.js} +16 -16
- package/dist/chunks/{theme-NAWQ77WF.js → theme-NF3LQHPV.js} +1 -1
- package/dist/chunks/transcribe-CQFHXBTV.js +3 -0
- package/dist/chunks/transcribe-command-ZXB3JJFZ.js +3 -0
- package/dist/chunks/update-command-DJLYU6AB.js +3 -0
- package/dist/chunks/{update-note-FRMHMUMD.js → update-note-CJ5XYKYH.js} +1 -1
- package/dist/chunks/watch-command-ZNMO4SF7.js +3 -0
- package/dist/index.js +13 -13
- package/dist/third-party-licenses.txt +1 -1
- package/package.json +11 -35
- package/dist/chunks/args-QKAIL3E4.js +0 -3
- package/dist/chunks/chunk-37P6QZ5Q.js +0 -3
- package/dist/chunks/chunk-CKZBBDAW.js +0 -3
- package/dist/chunks/chunk-GSK2A3TN.js +0 -3
- package/dist/chunks/chunk-HKINXTUW.js +0 -3
- package/dist/chunks/chunk-I6754KTB.js +0 -36
- package/dist/chunks/chunk-NDECMPOM.js +0 -3
- package/dist/chunks/chunk-NXJGO66P.js +0 -3
- package/dist/chunks/chunk-SNDFMJIX.js +0 -3
- package/dist/chunks/chunk-TL5MACSF.js +0 -3
- package/dist/chunks/chunk-V3I6DSF4.js +0 -3
- package/dist/chunks/chunk-W6SY5PPG.js +0 -4
- package/dist/chunks/chunk-WIPP5TWQ.js +0 -3
- package/dist/chunks/chunk-XRI5XKEB.js +0 -66
- package/dist/chunks/chunk-ZRHYGR2L.js +0 -134
- package/dist/chunks/clip-command-R2NKW4TI.js +0 -3
- package/dist/chunks/clipboard-GICOXMMN.js +0 -3
- package/dist/chunks/colour-APVBMEJQ.js +0 -3
- package/dist/chunks/command-GYCYLUHN.js +0 -3
- package/dist/chunks/config-command-6YUMMZF3.js +0 -3
- package/dist/chunks/continue-editing-QE5RRIMG.js +0 -3
- package/dist/chunks/decoded-UNCEUPNW.js +0 -3
- package/dist/chunks/execute-S5WN34PS.js +0 -3
- package/dist/chunks/extensions-XI5R74TS.js +0 -3
- package/dist/chunks/image-QSTDWHJ4.js +0 -3
- package/dist/chunks/install-IDUHZTTS.js +0 -3
- package/dist/chunks/install-L5C2UT6M.js +0 -3
- package/dist/chunks/launch-LFFWVTFE.js +0 -17
- package/dist/chunks/lock-PTQUMNYX.js +0 -3
- package/dist/chunks/manager-CQ6NNQY4.js +0 -4
- package/dist/chunks/pdfium-WFGSET5S.js +0 -3
- package/dist/chunks/preset-command-HMOFTZSG.js +0 -3
- package/dist/chunks/registry-4IOXO6DT.js +0 -3
- package/dist/chunks/run-HGZVOXRW.js +0 -5
- package/dist/chunks/transcribe-Q5NLWSSR.js +0 -3
- package/dist/chunks/transcribe-command-2L7F7MCG.js +0 -3
- package/dist/chunks/update-command-JCTCRPCS.js +0 -3
- package/dist/chunks/watch-command-XCCMIQIM.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a as M}from"./chunk-U5TEGDGH.js";import{
|
|
3
|
+
import{a as M}from"./chunk-U5TEGDGH.js";import{b as W}from"./chunk-R24JCIZ5.js";import{a as X,b as Q}from"./chunk-HZDYZ5RD.js";import{a as K}from"./chunk-RK3WGALB.js";import{b as J}from"./chunk-EEQSUBBL.js";import{a as D}from"./chunk-HWCXNKIN.js";import{a as Y}from"./chunk-KH5DHZ2U.js";import{a as U}from"./chunk-T37DEXUI.js";import{m as R}from"./chunk-J6AZTW62.js";import{E as d,H}from"./chunk-CVNYUROW.js";import{d as L}from"./chunk-J7FLFHQJ.js";import{b as z}from"./chunk-H3DIRJFE.js";var x=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},v=class extends x{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var E=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new v(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function N(s){let e=s.name()+(s.variadic===!0?"...":"");return s.required?"<"+e+">":"["+e+"]"}import{EventEmitter as le}from"node:events";import G from"node:child_process";import C from"node:path";import F from"node:fs";import m from"node:process";import{stripVTControlCharacters as he}from"node:util";import{stripVTControlCharacters as se}from"node:util";var T=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,o)=>i.name().localeCompare(o.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?t.push(n):n.long&&!o?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>N(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){let i=new Map;return e.forEach(o=>{let r=n(o);i.has(r)||i.set(r,[])}),t.forEach(o=>{let r=n(o);i.has(r)||i.set(r,[]),i.get(r).push(o)}),i}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth??80;function o(c,p){return t.formatItem(c,n,p,t)}let r=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],u=t.commandDescription(e);u.length>0&&(r=r.concat([t.boxWrap(t.styleCommandDescription(u),i),""]));let l=t.visibleArguments(e).map(c=>o(t.styleArgumentTerm(t.argumentTerm(c)),t.styleArgumentDescription(t.argumentDescription(c))));if(r=r.concat(this.formatItemList("Arguments:",l,t)),this.groupItems(e.options,t.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,p)=>{let O=c.map(_=>o(t.styleOptionTerm(t.optionTerm(_)),t.styleOptionDescription(t.optionDescription(_))));r=r.concat(this.formatItemList(p,O,t))}),t.showGlobalOptions){let c=t.visibleGlobalOptions(e).map(p=>o(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));r=r.concat(this.formatItemList("Global Options:",c,t))}return this.groupItems(e.commands,t.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,p)=>{let O=c.map(_=>o(t.styleSubcommandTerm(t.subcommandTerm(_)),t.styleSubcommandDescription(t.subcommandDescription(_))));r=r.concat(this.formatItemList(p,O,t))}),r.join(`
|
|
4
4
|
`)}displayWidth(e){return se(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,i){let r=" ".repeat(2);if(!n)return r+e;let u=e.padEnd(t+e.length-i.displayWidth(e)),l=2,a=(this.helpWidth??80)-t-l-2,c;return a<this.minWidthToWrap||i.preformatted(n)?c=n:c=i.boxWrap(n,a).replace(/\n/g,`
|
|
5
5
|
`+" ".repeat(t+l)),r+u+" ".repeat(l)+c.replace(/\n/g,`
|
|
6
6
|
${r}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return n.forEach(r=>{let u=r.match(i);if(u===null){o.push("");return}let l=[u.shift()],h=this.displayWidth(l[0]);u.forEach(a=>{let c=this.displayWidth(a);if(h+c<=t){l.push(a),h+=c;return}o.push(l.join(""));let p=a.trimStart();l=[p],h=this.displayWidth(p)}),o.push(l.join(""))}),o.join(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a as h,c as Q}from"./chunk-Q6KQWJ4J.js";import{d as L,f as b,g as X}from"./chunk-Y7LOIHFU.js";import{a as J,b as _,e as R}from"./chunk-PPR7B5AR.js";import{a as U,b as w}from"./chunk-V3I6DSF4.js";import{a as g,d as A}from"./chunk-N6RCLJE6.js";import{f as l}from"./chunk-SNDFMJIX.js";import{d as x,l as I}from"./chunk-THDAQBQ3.js";import{b as $,c as N,d as D,e as d,i as B,m as z}from"./chunk-DZOBIUV6.js";import{H as k,v as C}from"./chunk-WIPP5TWQ.js";import{a as p,b as E,c as j}from"./chunk-H3DIRJFE.js";var O=t=>t.length>0&&t.every(e=>e.kind==="image")?t:void 0;function Bt(t,e){let n=J(t);return n.includes(e)?void 0:C(t,e,n)}function G(t){return{target:t.target??"png",background:typeof t.background=="string"?t.background:"#ffffff",keepMetadata:t.keepMetadata===!0,...typeof t.output=="string"?{output:t.output}:{},...t.roots instanceof Map?{roots:t.roots}:{},...typeof t.quality=="number"?{quality:t.quality}:{}}}var W=()=>({kind:"select",id:"target",label:"Save as",default:"png",choices:[{value:"png",label:"PNG",hint:p.png.hint}]}),ot=t=>t===1?"sharp":`${t}x`,it=t=>t===1||t===3||t===4?t:2,Jt={id:"boost",label:"Boost resolution",verb:"Boosting",hint:"sharper, at its size or at 2\xD7, 3\xD7 or 4\xD7",requires:"boost",appliesTo:t=>O(t)!==void 0,unavailable:()=>"images only",options:()=>[{kind:"select",id:"scale",label:"Scale",default:"2",choices:[{value:"1",label:"Sharpen",hint:"the same size, sharper"},{value:"2",label:"2\xD7",hint:"twice the width and height"},{value:"3",label:"3\xD7",hint:"three times the width and height"},{value:"4",label:"4\xD7",hint:"four times the width and height"}]},W()],plan(t,e){let n=O(t);if(!n)return[];let o=G(e),i=it(Number(e.scale??2));return n.map(r=>({op:"boost",sources:[r],outputs:[d({sourcePath:r.path,target:o.target,suffix:ot(i),...o.output===void 0?{}:{output:o.output},...o.roots?.get(r.path)===void 0?{}:{sourceRoot:o.roots.get(r.path)}})],scale:i,target:o.target,options:{background:o.background,keepMetadata:o.keepMetadata,...o.quality===void 0?{}:{quality:o.quality}}}))}},_t={id:"remove-background",label:"Remove background",verb:"Removing",hint:"cut out the subject",requires:"remove-background",appliesTo:t=>O(t)!==void 0,unavailable:()=>"images only",options:()=>[W()],plan(t,e){let n=O(t);if(!n)return[];let o=G(e);return n.map(i=>({op:"remove-background",sources:[i],outputs:[d({sourcePath:i.path,target:o.target,suffix:"cutout",...o.output===void 0?{}:{output:o.output},...o.roots?.get(i.path)===void 0?{}:{sourceRoot:o.roots.get(i.path)}})],target:o.target,options:{background:o.background,keepMetadata:o.keepMetadata,...o.quality===void 0?{}:{quality:o.quality}}}))}};var rt=[{degrees:90,label:"90\xB0 right",suffix:"rotated-right"},{degrees:180,label:"180\xB0",suffix:"rotated-180"},{degrees:270,label:"90\xB0 left",suffix:"rotated-left"}],y=t=>t===90||t===180||t===270,Ut=(t,e)=>e===180?{...t}:{width:t.height,height:t.width},M=t=>rt.find(e=>e.degrees===t).suffix;import{dirname as at,join as H}from"node:path";var K="Same location",V="New subfolder";function st(t,e,n){return t===e?K:t===g("Desktop")?"Desktop":t===g("Downloads")?"Downloads":e!==void 0&&n!==void 0&&t===H(e,n)?V:h(t)||t}function T(t,e,n={}){return pt(at(t.path),e,n)}function pt(t,e,{subfolder:n}={}){let o=A(e.defaultOutput),i=e.lastOutput?A(e.lastOutput):void 0,r=f=>({label:st(f,t,n),path:f}),a=[r(o),...i?[r(i)]:[],r(g("Desktop")),...t===void 0?[]:[{label:K,path:t}],r(g("Downloads")),...n!==void 0&&t!==void 0?[{label:V,path:H(t,n)}]:[]],u=new Set,s=a.filter(f=>u.has(f.path)?!1:(u.add(f.path),!0));return{kind:"path",id:"destination",label:"Save to",default:o,presets:s,...i&&i!==o?{last:i}:{}}}var c=t=>typeof t=="string"&&t!==""?t:void 0;var ee=[2,1.5,1.25,.75,.5],ut=.25,dt=4,Y=-16;function q(t){return{wav:"m4a",aiff:"m4a",flac:"m4a",avi:"mp4",ogg:"opus"}[t]??t}var Z=t=>t.length===1&&t[0]?.kind==="media"?t[0]:void 0,ft=t=>t==="cut"||t==="mute"||t==="speed"||t==="resize"||t==="crop"||t==="rotate"||t==="loudness"||t==="extract"||t==="cleanup";function ct(t,e){let n=e.media??{},o=t.facts?.video,i=[];return e.extract&&i.push("audio"),n.cut&&i.push("trimmed"),n.mute&&i.push("muted"),n.cleanup?i.push("cleaned"):n.loudness!==void 0&&i.push("levelled"),n.speed!==void 0&&i.push(`${n.speed}x`),n.fps!==void 0&&i.push(`${n.fps}fps`),n.bitrate!==void 0&&i.push(`${n.bitrate}k`),e.crop&&i.push(I(e.crop.aspect)),e.resize&&i.push(o?b(l(o,e.resize)):"resized"),e.rotate&&i.push(M(e.rotate)),i.length===1?i[0]:"edited"}function mt(t,e){return t.map(n=>{let o=e.target??n.format,i={background:"#ffffff",keepMetadata:!1};e.media&&Object.keys(e.media).length&&(i.media=e.media),e.resize&&(i.resize=e.resize),e.rotate&&(i.rotate=e.rotate);let r=n.facts?.video;e.crop&&r&&(i.crop={aspect:e.crop.aspect,box:e.crop.box??x(r,e.crop.aspect)});let a=e.roots?.get(n.path),u=d({sourcePath:n.path,target:o,suffix:ct(n,e),...e.output===void 0?{}:{output:e.output},...a===void 0?{}:{sourceRoot:a}});return{op:"convert",sources:[n],outputs:[z(u,c(e.destination),c(e.name))],target:o,options:i}})}function S(t){let e={},n=t.cut;return n&&typeof n.start=="number"&&(e.cut={start:n.start,...typeof n.end=="number"?{end:n.end}:{}}),t.mute===!0&&(e.mute=!0),typeof t.speed=="number"&&(e.speed=t.speed),typeof t.fps=="number"&&(e.fps=t.fps),typeof t.bitrate=="number"&&(e.bitrate=t.bitrate),typeof t.loudness=="number"&&(e.loudness=t.loudness),t.cleanup===!0&&(e.cleanup=!0),Object.keys(e).length?e:void 0}var ne={id:"media-edit",label:"Edit",verb:"Editing",hint:"trim, mute, speed, resize, rotate, crop",appliesTo:t=>Z(t)!==void 0,unavailable:()=>"one video or audio file",options:()=>[],plan(t,e){let n=Z(t);if(!n||!ft(e.tool))return[];let o=e.tool,i={...typeof e.output=="string"?{output:e.output}:{},destination:e.destination,name:e.name};if(o==="cut"){let r=S(e)?.cut;if(!r)return[];i.media={cut:r}}if(o==="mute"&&(i.media={mute:!0}),o==="speed"){let r=e.speed;if(typeof r!="number"||r===1||r<ut||r>dt)return[];i.media={speed:r}}if(o==="loudness"&&(i.media={loudness:typeof e.loudness=="number"?e.loudness:Y}),o==="cleanup"){if(!n.facts?.audio)return[];i.media={cleanup:!0,loudness:Y}}if(o==="extract"){let r=n.facts?.audio;if(!r||!n.facts?.video)return[];i.extract=!0,i.target=Q(r.codec)}if(o==="resize"){if(typeof e.resize!="object"||e.resize===null)return[];i.resize=e.resize}if(o==="rotate"){if(!n.facts?.video||!y(e.turn))return[];i.rotate=e.turn}if(o==="crop"){let r=e.crop;if(!r?.aspect||!n.facts?.video)return[];i.crop=r}return mt([n],i)}};import{dirname as lt,join as gt}from"node:path";var ht=t=>p[t.format].media==="video",bt=t=>t.length===1&&t[0]?.kind==="image"?t[0]:void 0,yt=t=>t.length===1&&t[0]?.kind==="document"?t[0]:void 0,St="-small",m={min:30,max:100,step:35},kt=t=>{let e=Math.ceil((t-m.min)/m.step);return Math.min(m.max,m.min+Math.max(0,e)*m.step)},fe={id:"compress",label:"Compress",verb:"Compressing",hint:"make it smaller",appliesTo:t=>{if(t.length===1&&t[0]?.kind==="media")return!0;let e=bt(t);if(e!==void 0){let o=p[e.format];return o.lossy||o.quantisable===!0}return(yt(t)?.images?.compressible??0)>0},options(t,e,n){let o=t[0];if(!o)return[];let i=[{kind:"select",id:"mode",label:`Compress ${h(o.path)??"this file"}`,choices:[o.kind==="media"?{value:"quality",label:"By quality"}:{value:"quality",label:"By quality",hint:"pick a level, see the result"},{value:"size",label:"To a target size",hint:"smallest quality that fits"}],default:"quality"}];if(e.mode==="quality"&&o.kind==="media"&&!ht(o))i.push({kind:"slider",id:"bitrate",label:"Quality",min:32,max:320,step:32,default:96});else if(e.mode==="quality"){let r=o.kind==="image"&&p[o.format].quantisable===!0;i.push(r?{kind:"slider",id:"quality",label:"Quality",...m,default:kt(n.quality),points:!0}:{kind:"slider",id:"quality",label:"Quality",min:1,max:100,step:5,default:n.quality})}else if(e.mode==="size")i.push({kind:"text",id:"size",label:"Target size",placeholder:"e.g. 500kb or 2mb"});else return i;return i.push(T(o,n)),i},plan(t,e){let n=e.mode;if(n!=="quality"&&n!=="size")throw k(`compressAction.plan() needs a mode of "quality" or "size", got ${JSON.stringify(n)}.`,"This is a caller bug, not a user-facing condition: walk options() before calling plan().");let o=t[0];if(!o)return[];let i=(h(o.path)??"file").replace(/\.[^.]+$/,""),r=typeof e.destination=="string"?e.destination:lt(o.path),a=o.kind==="media"?q(o.format):o.format,u=gt(r,$(i,`${St}${j(a)}`)),s=o.kind==="media"?S(e):void 0;return[{op:"convert",sources:[o],target:a,outputs:[u],options:{background:"#ffffff",keepMetadata:!1,...n==="quality"&&typeof e.quality=="number"?{quality:e.quality}:{},compress:{dither:e.dither===!0},...s?{media:s}:{}}}]}};function xt(t){return{kind:"select",id:"pages",label:"Pages",default:"all",choices:[{value:"all",label:"All pages",hint:`${t.pages} pages`},{value:"first",label:"First page only"},{value:"choose",label:"Choose pages",hint:"pick which ones"}]}}function It(){return{kind:"select",id:"dpi",label:"Resolution",default:"150",choices:[{value:"72",label:"72 dpi",hint:"screen"},{value:"150",label:"150 dpi",badge:"default"},{value:"300",label:"300 dpi",hint:"print"}]}}function zt(t,e){return Array.isArray(e)?w(e):e==="first"?[0]:typeof e=="string"&&e!=="all"&&e!==""?w(U(e,t.pages)):Array.from({length:t.pages},(n,o)=>o)}function Ot(t,e){let n=p[t.format].lossy,o=p[e].lossy;if(n&&!o)return{hint:"likely bigger",tone:"warn"};if(!n&&o)return{hint:"likely smaller",tone:"ok"}}function Mt(t){let e=_(t).filter(o=>o.id!==t.format),n=e[0];return{kind:"select",id:"target",label:`Convert ${p[t.format].label} to`,choices:e.map(o=>{let i=Ot(t,o.id);return{value:o.id,label:o.label,hint:i?.hint??o.hint,...i===void 0?{}:{tone:i.tone}}}),default:n?n.id:""}}function Tt(t){return{kind:"slider",id:"bitrate",label:"Quality",min:64,max:320,step:32,default:t==="opus"?96:128}}var Ft=t=>typeof t=="object"&&t!==null&&("percent"in t||"width"in t||"height"in t);function At(t){let e=t.target,n=typeof e=="string"?E(e):void 0;if(!n)throw k(`convertAction.plan() requires a valid target format, got ${JSON.stringify(e)}.`,"This is a caller bug, not a user-facing condition: call options() and pass one of the target select choices before calling plan().");return n}var ke={id:"convert",label:"Convert",verb:"Converting",hint:"to another format",appliesTo:t=>t.length>=1,options(t,e,n){let o=t[0];if(!o)return[];let i=[Mt(o)],r=e.target;if(typeof r!="string")return i;o.kind==="document"&&R(r)&&i.push(xt(o),It());let a=p[r];return o.kind==="media"?a?.media==="sound"&&a.lossy&&i.push(Tt(r)):a?.lossy&&a.media===void 0&&i.push({kind:"slider",id:"quality",label:"Quality",min:1,max:100,step:5,default:n.quality}),i.push(T(o,n)),i},plan(t,e){let n=t[0];if(!n)return[];let o=At(e),i=o.id,r={background:typeof e.background=="string"?e.background:"#ffffff",keepMetadata:e.keepMetadata===!0};if(o.lossy&&typeof e.quality=="number"&&(r.quality=e.quality),n.kind==="media"){let s=S(e);s&&(r.media=s),Ft(e.resize)&&(r.resize=e.resize)}let a=typeof e.destination=="string"?e.destination:void 0;if(n.kind==="document"&&R(i)){let s=Number(e.dpi);r.dpi=Number.isFinite(s)&&s>0?s:150;let f=zt(n,e.pages);r.pages=f;let et=typeof e.sourceRoot=="string"?e.sourceRoot:void 0,nt=B(n.path,f,i,a,et);return[{op:"convert",sources:[n],outputs:nt,target:i,options:r}]}let u=D({sourcePath:n.path,target:i,...a===void 0?{}:{output:`${a}/`}});return N(u,n.path)&&(u=d({sourcePath:n.path,target:i,suffix:i,...a===void 0?{}:{output:`${a}/`}})),[{op:"convert",sources:[n],outputs:[u],target:i,options:r}]}};function Rt(t,e){if(!e.rotate)return v(t,e);let n=M(e.rotate);return e.trim||e.crop||e.resize?`${v(t,e)}-${n}`:n}function v(t,e){if(e.crop){let n=I(e.crop.aspect);if(!e.resize)return n;let o=e.crop.box??x(t,e.crop.aspect);return`${n}-${b(l(o,e.resize))}`}return e.trim&&e.resize?`trimmed-${X(e.resize)}`:e.resize?b(l(t,e.resize)):"trimmed"}function wt(t,e){if(e.trim&&e.crop)throw new Error("planEdit cannot trim and crop the same image");return t.map(n=>{let o=e.target??L(n),i={background:e.background,keepMetadata:e.keepMetadata,...e.quality===void 0?{}:{quality:e.quality},...e.trim?{trim:!0}:{},...e.resize?{resize:e.resize}:{},...e.crop?{crop:e.crop}:{},...e.rotate?{rotate:e.rotate}:{}},r=e.roots?.get(n.path),a=d({sourcePath:n.path,target:o,suffix:Rt(n,e),...e.output===void 0?{}:{output:e.output},...r===void 0?{}:{sourceRoot:r}});return{op:"convert",sources:[n],outputs:[z(a,c(e.destination),c(e.name))],target:o,options:i}})}var P=t=>t.length>0&&t.every(e=>e.kind==="image")?t:void 0,Pt=t=>typeof t=="object"&&t!==null&&("percent"in t||"width"in t||"height"in t),tt=t=>typeof t=="object"&&t!==null&&"aspect"in t&&typeof t.aspect=="object"&&t.aspect!==null&&"w"in t.aspect&&"h"in t.aspect;function F(t,e,n,o){return{id:t,label:e,verb:n,hint:o,appliesTo:i=>P(i)?.every(r=>t==="resize"||r.frames<=1)===!0,unavailable:i=>P(i)?"animated":"images only",options:()=>[],plan(i,r){let a=P(i);return a?t==="crop"&&!tt(r.crop)?[]:t==="turn"&&!y(r.turn)?[]:wt(a,{trim:t==="trim"||r.trim===!0,...y(r.turn)?{rotate:r.turn}:{},...Pt(r.resize)?{resize:r.resize}:{},...tt(r.crop)?{crop:r.crop}:{},...typeof r.target=="string"?{target:r.target}:{},...typeof r.output=="string"?{output:r.output}:{},...r.roots instanceof Map?{roots:r.roots}:{},destination:r.destination,name:r.name,background:typeof r.background=="string"?r.background:"#ffffff",keepMetadata:r.keepMetadata===!0,...typeof r.quality=="number"?{quality:r.quality}:{}}):[]}}}var Fe=F("trim","Trim edges","Trimming edges","cut empty borders"),Ae=F("resize","Resize","Resizing","smaller or larger"),Re=F("crop","Crop to shape","Cropping","change the shape"),we=F("turn","Rotate","Rotating","turn it");export{Bt as a,Jt as b,_t as c,V as d,T as e,pt as f,c as g,rt as h,Ut as i,ee as j,mt as k,ne as l,fe as m,ke as n,wt as o,Fe as p,Ae as q,Re as r,we as s};
|
|
3
|
+
import{a as h,c as Q}from"./chunk-Q6KQWJ4J.js";import{d as L,f as b,g as X}from"./chunk-R24JCIZ5.js";import{a as J,b as _,e as R}from"./chunk-XPATZLEH.js";import{a as U,b as w}from"./chunk-DYIATUFE.js";import{a as g,d as A}from"./chunk-N6RCLJE6.js";import{g as l}from"./chunk-T37DEXUI.js";import{d as x,l as I}from"./chunk-J6AZTW62.js";import{b as $,c as N,d as D,e as d,i as B,m as z}from"./chunk-BIBDLXCG.js";import{E as k,s as C}from"./chunk-CVNYUROW.js";import{a as p,b as E,c as j}from"./chunk-H3DIRJFE.js";var O=t=>t.length>0&&t.every(e=>e.kind==="image")?t:void 0;function Bt(t,e){let n=J(t);return n.includes(e)?void 0:C(t,e,n)}function G(t){return{target:t.target??"png",background:typeof t.background=="string"?t.background:"#ffffff",keepMetadata:t.keepMetadata===!0,...typeof t.output=="string"?{output:t.output}:{},...t.roots instanceof Map?{roots:t.roots}:{},...typeof t.quality=="number"?{quality:t.quality}:{}}}var W=()=>({kind:"select",id:"target",label:"Save as",default:"png",choices:[{value:"png",label:"PNG",hint:p.png.hint}]}),ot=t=>t===1?"sharp":`${t}x`,it=t=>t===1||t===3||t===4?t:2,Jt={id:"boost",label:"Boost resolution",verb:"Boosting",hint:"sharper, at its size or at 2\xD7, 3\xD7 or 4\xD7",requires:"boost",appliesTo:t=>O(t)!==void 0,unavailable:()=>"images only",options:()=>[{kind:"select",id:"scale",label:"Scale",default:"2",choices:[{value:"1",label:"Sharpen",hint:"the same size, sharper"},{value:"2",label:"2\xD7",hint:"twice the width and height"},{value:"3",label:"3\xD7",hint:"three times the width and height"},{value:"4",label:"4\xD7",hint:"four times the width and height"}]},W()],plan(t,e){let n=O(t);if(!n)return[];let o=G(e),i=it(Number(e.scale??2));return n.map(r=>({op:"boost",sources:[r],outputs:[d({sourcePath:r.path,target:o.target,suffix:ot(i),...o.output===void 0?{}:{output:o.output},...o.roots?.get(r.path)===void 0?{}:{sourceRoot:o.roots.get(r.path)}})],scale:i,target:o.target,options:{background:o.background,keepMetadata:o.keepMetadata,...o.quality===void 0?{}:{quality:o.quality}}}))}},_t={id:"remove-background",label:"Remove background",verb:"Removing",hint:"cut out the subject",requires:"remove-background",appliesTo:t=>O(t)!==void 0,unavailable:()=>"images only",options:()=>[W()],plan(t,e){let n=O(t);if(!n)return[];let o=G(e);return n.map(i=>({op:"remove-background",sources:[i],outputs:[d({sourcePath:i.path,target:o.target,suffix:"cutout",...o.output===void 0?{}:{output:o.output},...o.roots?.get(i.path)===void 0?{}:{sourceRoot:o.roots.get(i.path)}})],target:o.target,options:{background:o.background,keepMetadata:o.keepMetadata,...o.quality===void 0?{}:{quality:o.quality}}}))}};var rt=[{degrees:90,label:"90\xB0 right",suffix:"rotated-right"},{degrees:180,label:"180\xB0",suffix:"rotated-180"},{degrees:270,label:"90\xB0 left",suffix:"rotated-left"}],y=t=>t===90||t===180||t===270,Ut=(t,e)=>e===180?{...t}:{width:t.height,height:t.width},M=t=>rt.find(e=>e.degrees===t).suffix;import{dirname as at,join as H}from"node:path";var K="Same location",V="New subfolder";function st(t,e,n){return t===e?K:t===g("Desktop")?"Desktop":t===g("Downloads")?"Downloads":e!==void 0&&n!==void 0&&t===H(e,n)?V:h(t)||t}function T(t,e,n={}){return pt(at(t.path),e,n)}function pt(t,e,{subfolder:n}={}){let o=A(e.defaultOutput),i=e.lastOutput?A(e.lastOutput):void 0,r=f=>({label:st(f,t,n),path:f}),a=[r(o),...i?[r(i)]:[],r(g("Desktop")),...t===void 0?[]:[{label:K,path:t}],r(g("Downloads")),...n!==void 0&&t!==void 0?[{label:V,path:H(t,n)}]:[]],u=new Set,s=a.filter(f=>u.has(f.path)?!1:(u.add(f.path),!0));return{kind:"path",id:"destination",label:"Save to",default:o,presets:s,...i&&i!==o?{last:i}:{}}}var c=t=>typeof t=="string"&&t!==""?t:void 0;var ee=[2,1.5,1.25,.75,.5],ut=.25,dt=4,Y=-16;function q(t){return{wav:"m4a",aiff:"m4a",flac:"m4a",avi:"mp4",ogg:"opus"}[t]??t}var Z=t=>t.length===1&&t[0]?.kind==="media"?t[0]:void 0,ft=t=>t==="cut"||t==="mute"||t==="speed"||t==="resize"||t==="crop"||t==="rotate"||t==="loudness"||t==="extract"||t==="cleanup";function ct(t,e){let n=e.media??{},o=t.facts?.video,i=[];return e.extract&&i.push("audio"),n.cut&&i.push("trimmed"),n.mute&&i.push("muted"),n.cleanup?i.push("cleaned"):n.loudness!==void 0&&i.push("levelled"),n.speed!==void 0&&i.push(`${n.speed}x`),n.fps!==void 0&&i.push(`${n.fps}fps`),n.bitrate!==void 0&&i.push(`${n.bitrate}k`),e.crop&&i.push(I(e.crop.aspect)),e.resize&&i.push(o?b(l(o,e.resize)):"resized"),e.rotate&&i.push(M(e.rotate)),i.length===1?i[0]:"edited"}function mt(t,e){return t.map(n=>{let o=e.target??n.format,i={background:"#ffffff",keepMetadata:!1};e.media&&Object.keys(e.media).length&&(i.media=e.media),e.resize&&(i.resize=e.resize),e.rotate&&(i.rotate=e.rotate);let r=n.facts?.video;e.crop&&r&&(i.crop={aspect:e.crop.aspect,box:e.crop.box??x(r,e.crop.aspect)});let a=e.roots?.get(n.path),u=d({sourcePath:n.path,target:o,suffix:ct(n,e),...e.output===void 0?{}:{output:e.output},...a===void 0?{}:{sourceRoot:a}});return{op:"convert",sources:[n],outputs:[z(u,c(e.destination),c(e.name))],target:o,options:i}})}function S(t){let e={},n=t.cut;return n&&typeof n.start=="number"&&(e.cut={start:n.start,...typeof n.end=="number"?{end:n.end}:{}}),t.mute===!0&&(e.mute=!0),typeof t.speed=="number"&&(e.speed=t.speed),typeof t.fps=="number"&&(e.fps=t.fps),typeof t.bitrate=="number"&&(e.bitrate=t.bitrate),typeof t.loudness=="number"&&(e.loudness=t.loudness),t.cleanup===!0&&(e.cleanup=!0),Object.keys(e).length?e:void 0}var ne={id:"media-edit",label:"Edit",verb:"Editing",hint:"trim, mute, speed, resize, rotate, crop",appliesTo:t=>Z(t)!==void 0,unavailable:()=>"one video or audio file",options:()=>[],plan(t,e){let n=Z(t);if(!n||!ft(e.tool))return[];let o=e.tool,i={...typeof e.output=="string"?{output:e.output}:{},destination:e.destination,name:e.name};if(o==="cut"){let r=S(e)?.cut;if(!r)return[];i.media={cut:r}}if(o==="mute"&&(i.media={mute:!0}),o==="speed"){let r=e.speed;if(typeof r!="number"||r===1||r<ut||r>dt)return[];i.media={speed:r}}if(o==="loudness"&&(i.media={loudness:typeof e.loudness=="number"?e.loudness:Y}),o==="cleanup"){if(!n.facts?.audio)return[];i.media={cleanup:!0,loudness:Y}}if(o==="extract"){let r=n.facts?.audio;if(!r||!n.facts?.video)return[];i.extract=!0,i.target=Q(r.codec)}if(o==="resize"){if(typeof e.resize!="object"||e.resize===null)return[];i.resize=e.resize}if(o==="rotate"){if(!n.facts?.video||!y(e.turn))return[];i.rotate=e.turn}if(o==="crop"){let r=e.crop;if(!r?.aspect||!n.facts?.video)return[];i.crop=r}return mt([n],i)}};import{dirname as lt,join as gt}from"node:path";var ht=t=>p[t.format].media==="video",bt=t=>t.length===1&&t[0]?.kind==="image"?t[0]:void 0,yt=t=>t.length===1&&t[0]?.kind==="document"?t[0]:void 0,St="-small",m={min:30,max:100,step:35},kt=t=>{let e=Math.ceil((t-m.min)/m.step);return Math.min(m.max,m.min+Math.max(0,e)*m.step)},fe={id:"compress",label:"Compress",verb:"Compressing",hint:"make it smaller",appliesTo:t=>{if(t.length===1&&t[0]?.kind==="media")return!0;let e=bt(t);if(e!==void 0){let o=p[e.format];return o.lossy||o.quantisable===!0}return(yt(t)?.images?.compressible??0)>0},options(t,e,n){let o=t[0];if(!o)return[];let i=[{kind:"select",id:"mode",label:`Compress ${h(o.path)??"this file"}`,choices:[o.kind==="media"?{value:"quality",label:"By quality"}:{value:"quality",label:"By quality",hint:"pick a level, see the result"},{value:"size",label:"To a target size",hint:"smallest quality that fits"}],default:"quality"}];if(e.mode==="quality"&&o.kind==="media"&&!ht(o))i.push({kind:"slider",id:"bitrate",label:"Quality",min:32,max:320,step:32,default:96});else if(e.mode==="quality"){let r=o.kind==="image"&&p[o.format].quantisable===!0;i.push(r?{kind:"slider",id:"quality",label:"Quality",...m,default:kt(n.quality),points:!0}:{kind:"slider",id:"quality",label:"Quality",min:1,max:100,step:5,default:n.quality})}else if(e.mode==="size")i.push({kind:"text",id:"size",label:"Target size",placeholder:"e.g. 500kb or 2mb"});else return i;return i.push(T(o,n)),i},plan(t,e){let n=e.mode;if(n!=="quality"&&n!=="size")throw k(`compressAction.plan() needs a mode of "quality" or "size", got ${JSON.stringify(n)}.`,"This is a caller bug, not a user-facing condition: walk options() before calling plan().");let o=t[0];if(!o)return[];let i=(h(o.path)??"file").replace(/\.[^.]+$/,""),r=typeof e.destination=="string"?e.destination:lt(o.path),a=o.kind==="media"?q(o.format):o.format,u=gt(r,$(i,`${St}${j(a)}`)),s=o.kind==="media"?S(e):void 0;return[{op:"convert",sources:[o],target:a,outputs:[u],options:{background:"#ffffff",keepMetadata:!1,...n==="quality"&&typeof e.quality=="number"?{quality:e.quality}:{},compress:{dither:e.dither===!0},...s?{media:s}:{}}}]}};function xt(t){return{kind:"select",id:"pages",label:"Pages",default:"all",choices:[{value:"all",label:"All pages",hint:`${t.pages} pages`},{value:"first",label:"First page only"},{value:"choose",label:"Choose pages",hint:"pick which ones"}]}}function It(){return{kind:"select",id:"dpi",label:"Resolution",default:"150",choices:[{value:"72",label:"72 dpi",hint:"screen"},{value:"150",label:"150 dpi",badge:"default"},{value:"300",label:"300 dpi",hint:"print"}]}}function zt(t,e){return Array.isArray(e)?w(e):e==="first"?[0]:typeof e=="string"&&e!=="all"&&e!==""?w(U(e,t.pages)):Array.from({length:t.pages},(n,o)=>o)}function Ot(t,e){let n=p[t.format].lossy,o=p[e].lossy;if(n&&!o)return{hint:"likely bigger",tone:"warn"};if(!n&&o)return{hint:"likely smaller",tone:"ok"}}function Mt(t){let e=_(t).filter(o=>o.id!==t.format),n=e[0];return{kind:"select",id:"target",label:`Convert ${p[t.format].label} to`,choices:e.map(o=>{let i=Ot(t,o.id);return{value:o.id,label:o.label,hint:i?.hint??o.hint,...i===void 0?{}:{tone:i.tone}}}),default:n?n.id:""}}function Tt(t){return{kind:"slider",id:"bitrate",label:"Quality",min:64,max:320,step:32,default:t==="opus"?96:128}}var Ft=t=>typeof t=="object"&&t!==null&&("percent"in t||"width"in t||"height"in t);function At(t){let e=t.target,n=typeof e=="string"?E(e):void 0;if(!n)throw k(`convertAction.plan() requires a valid target format, got ${JSON.stringify(e)}.`,"This is a caller bug, not a user-facing condition: call options() and pass one of the target select choices before calling plan().");return n}var ke={id:"convert",label:"Convert",verb:"Converting",hint:"to another format",appliesTo:t=>t.length>=1,options(t,e,n){let o=t[0];if(!o)return[];let i=[Mt(o)],r=e.target;if(typeof r!="string")return i;o.kind==="document"&&R(r)&&i.push(xt(o),It());let a=p[r];return o.kind==="media"?a?.media==="sound"&&a.lossy&&i.push(Tt(r)):a?.lossy&&a.media===void 0&&i.push({kind:"slider",id:"quality",label:"Quality",min:1,max:100,step:5,default:n.quality}),i.push(T(o,n)),i},plan(t,e){let n=t[0];if(!n)return[];let o=At(e),i=o.id,r={background:typeof e.background=="string"?e.background:"#ffffff",keepMetadata:e.keepMetadata===!0};if(o.lossy&&typeof e.quality=="number"&&(r.quality=e.quality),n.kind==="media"){let s=S(e);s&&(r.media=s),Ft(e.resize)&&(r.resize=e.resize)}let a=typeof e.destination=="string"?e.destination:void 0;if(n.kind==="document"&&R(i)){let s=Number(e.dpi);r.dpi=Number.isFinite(s)&&s>0?s:150;let f=zt(n,e.pages);r.pages=f;let et=typeof e.sourceRoot=="string"?e.sourceRoot:void 0,nt=B(n.path,f,i,a,et);return[{op:"convert",sources:[n],outputs:nt,target:i,options:r}]}let u=D({sourcePath:n.path,target:i,...a===void 0?{}:{output:`${a}/`}});return N(u,n.path)&&(u=d({sourcePath:n.path,target:i,suffix:i,...a===void 0?{}:{output:`${a}/`}})),[{op:"convert",sources:[n],outputs:[u],target:i,options:r}]}};function Rt(t,e){if(!e.rotate)return v(t,e);let n=M(e.rotate);return e.trim||e.crop||e.resize?`${v(t,e)}-${n}`:n}function v(t,e){if(e.crop){let n=I(e.crop.aspect);if(!e.resize)return n;let o=e.crop.box??x(t,e.crop.aspect);return`${n}-${b(l(o,e.resize))}`}return e.trim&&e.resize?`trimmed-${X(e.resize)}`:e.resize?b(l(t,e.resize)):"trimmed"}function wt(t,e){if(e.trim&&e.crop)throw new Error("planEdit cannot trim and crop the same image");return t.map(n=>{let o=e.target??L(n),i={background:e.background,keepMetadata:e.keepMetadata,...e.quality===void 0?{}:{quality:e.quality},...e.trim?{trim:!0}:{},...e.resize?{resize:e.resize}:{},...e.crop?{crop:e.crop}:{},...e.rotate?{rotate:e.rotate}:{}},r=e.roots?.get(n.path),a=d({sourcePath:n.path,target:o,suffix:Rt(n,e),...e.output===void 0?{}:{output:e.output},...r===void 0?{}:{sourceRoot:r}});return{op:"convert",sources:[n],outputs:[z(a,c(e.destination),c(e.name))],target:o,options:i}})}var P=t=>t.length>0&&t.every(e=>e.kind==="image")?t:void 0,Pt=t=>typeof t=="object"&&t!==null&&("percent"in t||"width"in t||"height"in t),tt=t=>typeof t=="object"&&t!==null&&"aspect"in t&&typeof t.aspect=="object"&&t.aspect!==null&&"w"in t.aspect&&"h"in t.aspect;function F(t,e,n,o){return{id:t,label:e,verb:n,hint:o,appliesTo:i=>P(i)?.every(r=>t==="resize"||r.frames<=1)===!0,unavailable:i=>P(i)?"animated":"images only",options:()=>[],plan(i,r){let a=P(i);return a?t==="crop"&&!tt(r.crop)?[]:t==="turn"&&!y(r.turn)?[]:wt(a,{trim:t==="trim"||r.trim===!0,...y(r.turn)?{rotate:r.turn}:{},...Pt(r.resize)?{resize:r.resize}:{},...tt(r.crop)?{crop:r.crop}:{},...typeof r.target=="string"?{target:r.target}:{},...typeof r.output=="string"?{output:r.output}:{},...r.roots instanceof Map?{roots:r.roots}:{},destination:r.destination,name:r.name,background:typeof r.background=="string"?r.background:"#ffffff",keepMetadata:r.keepMetadata===!0,...typeof r.quality=="number"?{quality:r.quality}:{}}):[]}}}var Fe=F("trim","Trim edges","Trimming edges","cut empty borders"),Ae=F("resize","Resize","Resizing","smaller or larger"),Re=F("crop","Crop to shape","Cropping","change the shape"),we=F("turn","Rotate","Rotating","turn it");export{Bt as a,Jt as b,_t as c,V as d,T as e,pt as f,c as g,rt as h,Ut as i,ee as j,mt as k,ne as l,fe as m,ke as n,wt as o,Fe as p,Ae as q,Re as r,we as s};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{f as p,q as g,r as f}from"./chunk-
|
|
3
|
+
import{f as p,q as g,r as f}from"./chunk-BIBDLXCG.js";import{randomBytes as l}from"node:crypto";import{copyFile as P,mkdir as w,readdir as h,readFile as y,rename as C,rm as u,stat as k}from"node:fs/promises";import{tmpdir as x}from"node:os";import{extname as c,join as o}from"node:path";function m(){return o(x(),"forge-clip")}var v=5,d={".png":"png",".jpg":"jpeg",".jpeg":"jpeg",".webp":"webp",".heic":"heic",".avif":"avif",".gif":"gif",".tiff":"tiff"};async function O(e,a=m()){let t=`${Date.now().toString(36)}-${l(3).toString("hex")}`,i=o(a,t),r=await e.read(o(i,"in"));if(!r)return await u(i,{recursive:!0,force:!0}),null;let n=o(i,"out");await w(n,{recursive:!0}),await F(a,r.path);let s=o(i,"in","Copied image");return await C(r.path,s),await T(a,t),{source:s,outDir:n,changeCount:r.changeCount}}async function F(e,a){let t=o(e,"last"),i=`Copied image${c(a)}`,r=o(e,`.last-${l(4).toString("hex")}`);await w(r,{recursive:!0}),await P(a,o(r,i)),await u(t,{recursive:!0,force:!0}),await g(r,t)}async function T(e,a){let t=await h(e,{withFileTypes:!0}).catch(()=>[]),r=(await Promise.all(t.filter(n=>n.isDirectory()&&n.name!=="last"&&!n.name.startsWith(".")).map(async n=>({name:n.name,at:(await k(o(e,n.name)).catch(()=>null))?.mtimeMs??0})))).filter(n=>n.name!==a).sort((n,s)=>s.at-n.at).slice(v-1);await Promise.all(r.map(n=>u(o(e,n.name),{recursive:!0,force:!0})))}async function b(e=m()){let a=o(e,"last"),t=(await h(a).catch(()=>[])).find(i=>d[c(i).toLowerCase()]!==void 0);return t===void 0?null:{path:o(a,t),format:d[c(t).toLowerCase()]}}async function S(e,a,t,i){let{changeCount:r}=await e.peek();return r!==a.changeCount?"changed":(await e.write(t,i),"placed")}async function A(e,a,t,i){let{changeCount:r}=await e.peek();return r!==a.changeCount?"changed":(await e.writeText(t,i),"placed")}async function E(e,a=m()){let t=await b(a);return t?(await e.write(t.path,t.format),!0):!1}async function _(e,a){let t=p(o(a,`Copied image${c(e)}`));return await f(t,await y(e)),t}export{O as a,S as b,A as c,E as d,_ as e};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b,c,d}from"./chunk-CW2Y2KDQ.js";import"./chunk-ZOQA3JAR.js";import"./chunk-TYWGB767.js";import"./chunk-J2UQI544.js";import"./chunk-W2QJA73Q.js";import"./chunk-ZHNPBRCX.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-SNFUGJ3M.js";import"./chunk-XUKYIVJC.js";import"./chunk-GRWOJKQB.js";import"./chunk-IED6VBE6.js";import"./chunk-R24JCIZ5.js";import"./chunk-XPATZLEH.js";import"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import"./chunk-RK3WGALB.js";import"./chunk-O7DK3GJT.js";import"./chunk-DYIATUFE.js";import"./chunk-EEQSUBBL.js";import"./chunk-LA5JVBFP.js";import"./chunk-K6ERQTUQ.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-T37DEXUI.js";import"./chunk-J6AZTW62.js";import"./chunk-BIBDLXCG.js";import"./chunk-7KYO62XK.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{b as clipLines,a as runClip,d as runClipCommand,c as runUndo};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b,c}from"./chunk-EITGK5OI.js";import"./chunk-TYWGB767.js";import"./chunk-BIBDLXCG.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as copy,c as linuxText,b as paste};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{h as S,i as k,m as C}from"./chunk-IVBSXPNS.js";import{i as $,k as u,l as w}from"./chunk-VTA6Z45X.js";import{c as I,d as y,f as O}from"./chunk-PBIS2ONZ.js";import{b as m,c as d,h as f,i as p}from"./chunk-QVACE4IE.js";import{a as h,b as g}from"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import{a as l}from"./chunk-RK3WGALB.js";import"./chunk-DYIATUFE.js";import"./chunk-EEQSUBBL.js";import"./chunk-LA5JVBFP.js";import"./chunk-K6ERQTUQ.js";import"./chunk-T37DEXUI.js";import"./chunk-J6AZTW62.js";import"./chunk-BIBDLXCG.js";import"./chunk-7KYO62XK.js";import{k as x}from"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import{c as b}from"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";import{resolve as R}from"node:path";var P=({r:t,g:n,b:o},s)=>s?`\x1B[38;2;${t};${n};${o}m\u2588\u2588\x1B[39m `:"";function N(t,n){let o=d(n),s,e=Number.POSITIVE_INFINITY;for(let r of t){let a=(r.centre.L-o.L)**2+(r.centre.a-o.a)**2+(r.centre.b-o.b)**2;a<e&&(e=a,s=r)}return s}async function D(t,n){let{pixels:o}=await C(t.input),s=I(o);if(s.length===0)throw x(t.input);let e=t.inside?N(s,t.inside):void 0,r=e?y(o,e):s;if(t.svg)return{exitCode:0,stdout:[S(b(t.input),r,"light",e?.hex)],stderr:[]};if(n.json){let i=h(l,{source:R(t.input),...e?{inside:e.hex}:{},colours:r.map(c=>({hex:c.hex,rgb:f(c.rgb),oklch:p(c.rgb),share:c.share}))});return{exitCode:0,stdout:[JSON.stringify(i)],stderr:[]}}let a=O(r.map(i=>i.share));return{exitCode:0,stdout:r.map((i,c)=>`${P(i.rgb,n.colour)}${i.hex} ${String(a[c]).padStart(3)}%`),stderr:[]}}async function H(t,n){let o=$(t.colour);if(t.svg)return{exitCode:0,stdout:[k(t.colour,o)],stderr:[]};let s=o.map(e=>({...e,...w(e.rgb)}));if(n.json){let e=g(l,{reference:m(t.colour),steps:s.map(r=>({step:r.step,hex:r.hex,oklch:p(r.rgb),white:r.white,black:r.black}))});return{exitCode:0,stdout:[JSON.stringify(e)],stderr:[]}}return{exitCode:0,stdout:s.map(e=>`${String(e.step).padStart(4)} ${P(e.rgb,n.colour)}${e.hex} white ${e.white.toFixed(1)} ${u(e.white)} \xB7 black ${e.black.toFixed(1)} ${u(e.black)}`),stderr:[]}}export{D as runPalette,H as runScale};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a as s}from"./chunk-WE6KP4FR.js";import{E as o}from"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";var c=["open","convert","compress","sharpen","open-pdf","preset"];function u(r){let[e,n,...i]=r;if(e==="install"||e==="remove")return{kind:e};if(e==="run"||e==="open"){if(!c.includes(n))throw o(`No menu action called "${n??""}".`);if(n==="preset"){let[t,...a]=i;if(e!=="run"||t===void 0||!s(t))throw o(`No preset called "${t??""}".`);return{kind:"run",action:n,preset:t,paths:a}}return{kind:e,action:n,paths:i}}throw o(`No menu command called "${e??""}".`)}function m(r,e){switch(r){case"convert":return{paths:e,mode:"convert",advance:!0};case"compress":return{paths:e,mode:"compress",advance:!0};case"open-pdf":return{paths:e,mode:"pdf",advance:!1};default:return{paths:[],mode:"convert",advance:!1}}}export{m as openedFor,u as parseMenuArgs};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b}from"./chunk-HWCXNKIN.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as CONFIG_KEYS,b as runConfig};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b,c,d,e}from"./chunk-BROTSQXG.js";import"./chunk-J6AZTW62.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as OPS,d as chainLabels,e as reasonsFor,c as stepLabel,b as withStep};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{g as a,h as b,i as c,j as d}from"./chunk-7KYO62XK.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{b as clearDecodedCacheForTests,a as decodedInput,c as idleDecodedCacheForTests,d as limitDecodedCacheForTests};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a as
|
|
3
|
+
import{a as $,b as R,d as g,e as F,f as m,g as G}from"./chunk-RXI6QLNY.js";import{H as k,a as N,i as I,j as O}from"./chunk-TARDT6LZ.js";import"./chunk-SNFUGJ3M.js";import{c as b}from"./chunk-MF3KKEFB.js";import"./chunk-I25E2XDH.js";import{c as S}from"./chunk-N72E43Z3.js";import{a as T,b as v,c as _,d as A,e as D}from"./chunk-7I2OSTBX.js";import{a as P}from"./chunk-HON4OV7M.js";import{f as E}from"./chunk-BIBDLXCG.js";import{a as y}from"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";import{spawn as ee}from"node:child_process";import{homedir as Te}from"node:os";import{join as M,resolve as ve}from"node:path";import{appendFileSync as te,mkdirSync as C,readFileSync as ne,renameSync as re,rmSync as x,statSync as L}from"node:fs";import{join as j}from"node:path";var ie={quiet:500,cap:3e3,poll:50},oe=15e3,X=e=>new Promise(n=>setTimeout(n,e));async function H(e,n,t,r=ie){C(e,{recursive:!0});let i=j(e,`${n}.spool`),o=j(e,`${n}.lock`),s=p=>{try{return ne(p,"utf8").split(`
|
|
4
4
|
`).filter(Boolean)}catch{return[]}},u=()=>{try{return L(i).size}catch{return 0}};for(te(i,`${t}
|
|
5
|
-
`);;){try{C(o)}catch{try{Date.now()-L(o).mtimeMs>oe&&x(o,{recursive:!0,force:!0})}catch{}if(await X(r.poll),!s(i).includes(t))return null;continue}try{let p=Date.now(),l=u(),c=Date.now();for(;Date.now()-c<r.quiet&&Date.now()-p<r.cap;){await X(r.poll);let d=u();d!==l&&(l=d,c=Date.now())}let a=`${i}.${process.pid}.${Date.now()}`;try{re(i,a)}catch{return[t]}let f=[...new Set(s(a))];return x(a,{force:!0}),f}finally{x(o,{recursive:!0,force:!0})}}}import{realpathSync as se}from"node:fs";import{delimiter as ae,join as ue}from"node:path";function U(e,n,t=process.platform){let r=s=>{try{return se(s)}catch{return}},i=r(e)??e,o=t==="win32"?"node.exe":"node";for(let s of(n??"").split(ae)){if(s==="")continue;let u=ue(s,o);if(u!==e&&r(u)===i)return u}return e}import{basename as w,dirname as ce,extname as le,join as fe}from"node:path";var q={"gnome-terminal":["--"],konsole:["-e"],"xfce4-terminal":["-x"],kitty:[],alacritty:["-e"],wezterm:["start","--"],ghostty:["-e"],xterm:["-e"],"x-terminal-emulator":["-e"],"xdg-terminal-exec":[]},pe=["xdg-terminal-exec","x-terminal-emulator","gnome-terminal","konsole","xfce4-terminal","kitty","alacritty","wezterm","ghostty","xterm"];function B(e,n,t){let i=[...e!==void 0&&e in q?[e]:[],...pe].find(t);return i===void 0?void 0:[i,[...q[i]??[],...n]]}function me(e,n,t){if(t==="linux")return B(e,n,()=>!0)??["xterm",["-e",...n]];if(t==="win32")return e==="wt"?["wt.exe",["-w","new",...n]]:["conhost.exe",n];if(e==="ghostty")return["/usr/bin/open",["-na","Ghostty","--args","-e",...n]];let r=`exec ${n.map(N).join(" ")}`;return["/usr/bin/osascript",[...["on run argv",...e==="iTerm.app"?['tell application "iTerm"',"create window with default profile","tell current session of current window to write text (item 1 of argv)","activate","end tell"]:['if application "Terminal" is running then','tell application "Terminal" to do script (item 1 of argv)',"else",'tell application "Terminal" to do script (item 1 of argv) in window 1',"end if",'tell application "Terminal" to activate'],"end run"].flatMap(o=>["-e",o]),r]]}function W(e){let n=w(e,le(e));return E(fe(ce(e),`${n}-sharp.png`))}function de(e){let n=e.flatMap(o=>"output"in o?[o.output]:[]),t=e.flatMap(o=>"error"in o?[o]:[]),[r]=t;if(r===void 0)return{title:n.length===1?w(n[0]):`${n.length} files`,body:"Sharpened"};let i=r.input?w(r.input):"file";return e.length===1?{title:`${i} not sharpened`,body:r.error}:{title:`${n.length} of ${e.length} files sharpened`,body:`${i}: ${r.error}`}}function ge(e,n){let t=n.flatMap(s=>"output"in s?[s]:[]),r=n.flatMap(s=>"error"in s?[s]:[]),[i]=r;if(i===void 0){let s=t[0]?.chain??[];return{title:t.length===1?w(t[0]?.output??""):`${t.length} files`,body:[e,...s.length>0?[s.join(" \u2500\u25B8 ")]:[]].join(" \xB7 ")}}let o=i.input?w(i.input):"file";return n.length===1?{title:`${e} didn\u2019t finish`,body:`${o}: ${i.error}`}:{title:`${e} finished ${t.length} of ${n.length} files`,body:`${o}: ${i.error}`}}async function z(e,n,t,r){if(e==="preset"){if(r===void 0||t.runPreset===void 0)return;let u=[];for(let a of n){let f=await t.runPreset(r,a);u.push("error"in f?{input:a,...f}:f)}let{title:p,body:l}=ge(r,u);await t.notify(p,l);let c=u.flatMap(a=>"output"in a?[a.output]:[]).at(-1);c!==void 0&&await t.reveal(c);return}if(e==="sharpen"){let u=[];for(let f of n){let d=await t.sharpen(f);u.push("error"in d?{input:f,...d}:d)}let{title:p,body:l}=de(u);await t.notify(p,l);let a=u.flatMap(f=>"output"in f?[f.output]:[]).at(-1);a!==void 0&&await t.reveal(a);return}let i=e==="open"?[]:n,o=[...t.self,"menu","open",e,...i],s=t.platform==="linux"?B(t.terminal,o,t.has??(()=>!0)):me(t.terminal,o,t.platform);if(s===void 0)return t.notify(he,we);await t.launch(...s)}var he="Forge could not open",we="No terminal was found to open it in.";import{mkdirSync as ye,readFileSync as Me,writeFileSync as Pe}from"node:fs";import{join as Re}from"node:path";async function J(e,n){if(!n.global||!F(e.platform))return;let t=R(e);if(n.enabled===!1){t!==void 0&&await m(e);return}if(!(t!==void 0&&$(t,e))&&(await g(e),t===void 0))return e.platform==="darwin"?"Added Forge to Finder\u2019s Quick Actions":"Added Forge to the right-click menu"}async function K(e){let n=R(e);if(n===void 0)return;let{xdgConfigHome:t,...r}=e;await g({...r,...n,presets:e.presets??[]})}var V=e=>Re(e.menuDir,"terminal"),xe=new Set(["Apple_Terminal","iTerm.app","ghostty"]),Ee={WezTerm:"wezterm",ghostty:"ghostty",kitty:"kitty"};function be(e){if(e.TERM_PROGRAM)return Ee[e.TERM_PROGRAM];if(!e.TMUX){if(e.KITTY_WINDOW_ID)return"kitty";if(e.ALACRITTY_WINDOW_ID||e.ALACRITTY_SOCKET)return"alacritty";if(e.KONSOLE_VERSION)return"konsole";if(e.GNOME_TERMINAL_SCREEN||e.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(e.XTERM_VERSION)return"xterm"}}function Y(e,n){let t=e.platform==="win32"?n.WT_SESSION?"wt":"console":e.platform==="linux"?be(n):xe.has(n.TERM_PROGRAM??"")?n.TERM_PROGRAM:void 0;if(t)try{ye(e.menuDir,{recursive:!0}),Pe(V(e),t)}catch{}}function Q(e){try{return Me(V(e),"utf8").trim()||void 0}catch{return}}import{rmSync as Se}from"node:fs";async function Z(e,n){await m(e),n.out("\u2713 Removed Forge from the right-click menu");let{code:t,output:r}=await n.npm(["uninstall","--global","forge-terminal"]);return t!==0?(n.out(`\u2715 npm could not uninstall forge-terminal: ${D(r)}`),1):(n.out("\u2713 Uninstalled forge-terminal"),Se(n.forgeDir,{recursive:!0,force:!0}),n.out("\u2713 Deleted Forge\u2019s settings"),0)}var _e=()=>M(P(),"forge","menu");async function Ae(){try{let{loadPreferences:e}=await import("./preferences-3P4V2EDX.js"),{prefs:n}=await e();return(n.presets??[]).filter(t=>t.quickAction).map(t=>t.name)}catch{return[]}}async function h(e){return{platform:process.platform,home:Te(),menuDir:_e(),node:U(process.execPath,process.env.PATH),execArgv:process.execArgv,forge:v(process.argv[1])??"",...process.env.XDG_CONFIG_HOME?{xdgConfigHome:process.env.XDG_CONFIG_HOME}:{},...process.env.XDG_DATA_HOME?{xdgDataHome:process.env.XDG_DATA_HOME}:{},...process.env.XDG_CONFIG_DIRS?{xdgConfigDirs:process.env.XDG_CONFIG_DIRS}:{},...process.env.PATH?{path:process.env.PATH}:{},version:e,sharpen:await b("boost")!==void 0,presets:await Ae(),run:G}}async function mt(e){if(process.env.FORGE_NO_MENU)return;let n=await h(e);Y(n,process.env);let{loadPreferences:t}=await import("./preferences-3P4V2EDX.js"),{prefs:r}=await t();return J(n,{global:T(n.forge,n.platform),enabled:r.rightClickMenu!==!1})}async function dt(){let{isInstalled:e}=await import("./install-
|
|
5
|
+
`);;){try{C(o)}catch{try{Date.now()-L(o).mtimeMs>oe&&x(o,{recursive:!0,force:!0})}catch{}if(await X(r.poll),!s(i).includes(t))return null;continue}try{let p=Date.now(),l=u(),c=Date.now();for(;Date.now()-c<r.quiet&&Date.now()-p<r.cap;){await X(r.poll);let d=u();d!==l&&(l=d,c=Date.now())}let a=`${i}.${process.pid}.${Date.now()}`;try{re(i,a)}catch{return[t]}let f=[...new Set(s(a))];return x(a,{force:!0}),f}finally{x(o,{recursive:!0,force:!0})}}}import{realpathSync as se}from"node:fs";import{delimiter as ae,join as ue}from"node:path";function U(e,n,t=process.platform){let r=s=>{try{return se(s)}catch{return}},i=r(e)??e,o=t==="win32"?"node.exe":"node";for(let s of(n??"").split(ae)){if(s==="")continue;let u=ue(s,o);if(u!==e&&r(u)===i)return u}return e}import{basename as w,dirname as ce,extname as le,join as fe}from"node:path";var q={"gnome-terminal":["--"],konsole:["-e"],"xfce4-terminal":["-x"],kitty:[],alacritty:["-e"],wezterm:["start","--"],ghostty:["-e"],xterm:["-e"],"x-terminal-emulator":["-e"],"xdg-terminal-exec":[]},pe=["xdg-terminal-exec","x-terminal-emulator","gnome-terminal","konsole","xfce4-terminal","kitty","alacritty","wezterm","ghostty","xterm"];function B(e,n,t){let i=[...e!==void 0&&e in q?[e]:[],...pe].find(t);return i===void 0?void 0:[i,[...q[i]??[],...n]]}function me(e,n,t){if(t==="linux")return B(e,n,()=>!0)??["xterm",["-e",...n]];if(t==="win32")return e==="wt"?["wt.exe",["-w","new",...n]]:["conhost.exe",n];if(e==="ghostty")return["/usr/bin/open",["-na","Ghostty","--args","-e",...n]];let r=`exec ${n.map(N).join(" ")}`;return["/usr/bin/osascript",[...["on run argv",...e==="iTerm.app"?['tell application "iTerm"',"create window with default profile","tell current session of current window to write text (item 1 of argv)","activate","end tell"]:['if application "Terminal" is running then','tell application "Terminal" to do script (item 1 of argv)',"else",'tell application "Terminal" to do script (item 1 of argv) in window 1',"end if",'tell application "Terminal" to activate'],"end run"].flatMap(o=>["-e",o]),r]]}function W(e){let n=w(e,le(e));return E(fe(ce(e),`${n}-sharp.png`))}function de(e){let n=e.flatMap(o=>"output"in o?[o.output]:[]),t=e.flatMap(o=>"error"in o?[o]:[]),[r]=t;if(r===void 0)return{title:n.length===1?w(n[0]):`${n.length} files`,body:"Sharpened"};let i=r.input?w(r.input):"file";return e.length===1?{title:`${i} not sharpened`,body:r.error}:{title:`${n.length} of ${e.length} files sharpened`,body:`${i}: ${r.error}`}}function ge(e,n){let t=n.flatMap(s=>"output"in s?[s]:[]),r=n.flatMap(s=>"error"in s?[s]:[]),[i]=r;if(i===void 0){let s=t[0]?.chain??[];return{title:t.length===1?w(t[0]?.output??""):`${t.length} files`,body:[e,...s.length>0?[s.join(" \u2500\u25B8 ")]:[]].join(" \xB7 ")}}let o=i.input?w(i.input):"file";return n.length===1?{title:`${e} didn\u2019t finish`,body:`${o}: ${i.error}`}:{title:`${e} finished ${t.length} of ${n.length} files`,body:`${o}: ${i.error}`}}async function z(e,n,t,r){if(e==="preset"){if(r===void 0||t.runPreset===void 0)return;let u=[];for(let a of n){let f=await t.runPreset(r,a);u.push("error"in f?{input:a,...f}:f)}let{title:p,body:l}=ge(r,u);await t.notify(p,l);let c=u.flatMap(a=>"output"in a?[a.output]:[]).at(-1);c!==void 0&&await t.reveal(c);return}if(e==="sharpen"){let u=[];for(let f of n){let d=await t.sharpen(f);u.push("error"in d?{input:f,...d}:d)}let{title:p,body:l}=de(u);await t.notify(p,l);let a=u.flatMap(f=>"output"in f?[f.output]:[]).at(-1);a!==void 0&&await t.reveal(a);return}let i=e==="open"?[]:n,o=[...t.self,"menu","open",e,...i],s=t.platform==="linux"?B(t.terminal,o,t.has??(()=>!0)):me(t.terminal,o,t.platform);if(s===void 0)return t.notify(he,we);await t.launch(...s)}var he="Forge could not open",we="No terminal was found to open it in.";import{mkdirSync as ye,readFileSync as Me,writeFileSync as Pe}from"node:fs";import{join as Re}from"node:path";async function J(e,n){if(!n.global||!F(e.platform))return;let t=R(e);if(n.enabled===!1){t!==void 0&&await m(e);return}if(!(t!==void 0&&$(t,e))&&(await g(e),t===void 0))return e.platform==="darwin"?"Added Forge to Finder\u2019s Quick Actions":"Added Forge to the right-click menu"}async function K(e){let n=R(e);if(n===void 0)return;let{xdgConfigHome:t,...r}=e;await g({...r,...n,presets:e.presets??[]})}var V=e=>Re(e.menuDir,"terminal"),xe=new Set(["Apple_Terminal","iTerm.app","ghostty"]),Ee={WezTerm:"wezterm",ghostty:"ghostty",kitty:"kitty"};function be(e){if(e.TERM_PROGRAM)return Ee[e.TERM_PROGRAM];if(!e.TMUX){if(e.KITTY_WINDOW_ID)return"kitty";if(e.ALACRITTY_WINDOW_ID||e.ALACRITTY_SOCKET)return"alacritty";if(e.KONSOLE_VERSION)return"konsole";if(e.GNOME_TERMINAL_SCREEN||e.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(e.XTERM_VERSION)return"xterm"}}function Y(e,n){let t=e.platform==="win32"?n.WT_SESSION?"wt":"console":e.platform==="linux"?be(n):xe.has(n.TERM_PROGRAM??"")?n.TERM_PROGRAM:void 0;if(t)try{ye(e.menuDir,{recursive:!0}),Pe(V(e),t)}catch{}}function Q(e){try{return Me(V(e),"utf8").trim()||void 0}catch{return}}import{rmSync as Se}from"node:fs";async function Z(e,n){await m(e),n.out("\u2713 Removed Forge from the right-click menu");let{code:t,output:r}=await n.npm(["uninstall","--global","forge-terminal"]);return t!==0?(n.out(`\u2715 npm could not uninstall forge-terminal: ${D(r)}`),1):(n.out("\u2713 Uninstalled forge-terminal"),Se(n.forgeDir,{recursive:!0,force:!0}),n.out("\u2713 Deleted Forge\u2019s settings"),0)}var _e=()=>M(P(),"forge","menu");async function Ae(){try{let{loadPreferences:e}=await import("./preferences-3P4V2EDX.js"),{prefs:n}=await e();return(n.presets??[]).filter(t=>t.quickAction).map(t=>t.name)}catch{return[]}}async function h(e){return{platform:process.platform,home:Te(),menuDir:_e(),node:U(process.execPath,process.env.PATH),execArgv:process.execArgv,forge:v(process.argv[1])??"",...process.env.XDG_CONFIG_HOME?{xdgConfigHome:process.env.XDG_CONFIG_HOME}:{},...process.env.XDG_DATA_HOME?{xdgDataHome:process.env.XDG_DATA_HOME}:{},...process.env.XDG_CONFIG_DIRS?{xdgConfigDirs:process.env.XDG_CONFIG_DIRS}:{},...process.env.PATH?{path:process.env.PATH}:{},version:e,sharpen:await b("boost")!==void 0,presets:await Ae(),run:G}}async function mt(e){if(process.env.FORGE_NO_MENU)return;let n=await h(e);Y(n,process.env);let{loadPreferences:t}=await import("./preferences-3P4V2EDX.js"),{prefs:r}=await t();return J(n,{global:T(n.forge,n.platform),enabled:r.rightClickMenu!==!1})}async function dt(){let{isInstalled:e}=await import("./install-5XLVERRR.js");return e(await h(""))}async function gt(e){let{VERSION:n}=await import("./theme-NF3LQHPV.js"),{savePreferences:t}=await import("./preferences-3P4V2EDX.js"),r=await h(n);e?await g(r):await m(r),await t({rightClickMenu:e})}async function ht(){if(!process.env.FORGE_NO_MENU)try{await K(await h(""))}catch{}}async function De(e){let{parseArgs:n}=await import("./args-FZXEZBPA.js"),{runIntent:t}=await import("./execute-NEDE4JM6.js"),r=n([e,"--sharpen","--output",W(e)]),i=await t(r),o=i.results[0]?.job.outputs[0];if(o!==void 0)return{output:o};let s=i.failures[0]?.error;return{error:y(s)?s.detail:"It could not be sharpened."}}async function Ne(e,n){let{runPresetCommand:t}=await import("./preset-command-VP5RAXBG.js"),{loadPreferences:r}=await import("./preferences-3P4V2EDX.js"),{chainLabels:i}=await import("./continue-editing-4W3XWWCE.js");try{let o=await t({kind:"preset",inputs:[n],name:e,force:!1,recursive:!1,debug:!1,keepBoth:!0}),s=o.results[0],u=s?.job.outputs[0];if(s!==void 0&&u!==void 0){let{prefs:l}=await r(),c=l.presets?.find(f=>f.name===e)?.steps,a=s.job.sources[0]?.format;return{output:u,chain:c&&a?i(a,c):[]}}let p=o.failures[0]?.error;return{error:y(p)?p.detail:"It could not be made."}}catch(o){return{error:y(o)?o.detail:"It could not be made."}}}var Ie=(e,n)=>new Promise(t=>{let r=ee(e,n,{detached:!0,stdio:"ignore"});r.on("error",()=>t()),r.unref(),t()});async function wt(e,n){let t=await h(n);if(e.kind==="install")return await g(t),0;if(e.kind==="remove")return await m(t),0;if(e.kind!=="run")return 2;let r=e.paths.map(i=>ve(i));if(t.platform==="win32"&&r.length===1){let i=e.preset===void 0?e.action:`preset-${e.preset}`,o=await H(M(t.menuDir,"spool"),i,r[0]);if(o===null)return 0;r=o}return await z(e.action,r,{platform:t.platform,self:[t.node,...t.execArgv,t.forge],terminal:Q(t),launch:Ie,sharpen:De,runPreset:Ne,notify:(i,o)=>k(i,o,t.platform,{icon:M(t.menuDir,O({paint:"forge"}))}),has:i=>I(i,t.path),reveal:async i=>{await S(i,t.platform)}},e.preset),0}async function yt(e,n){let t=await h(e),r=i=>new Promise(o=>{let s=t.platform==="win32"?A(t.node):void 0,[u,p]=s!==void 0?[t.node,[s,...i]]:[_(t.node),i],l="",c=ee(u,p,{stdio:["ignore","pipe","pipe"]});c.stdout.setEncoding("utf8").on("data",a=>{l+=a}),c.stderr.setEncoding("utf8").on("data",a=>{l+=a}),c.on("error",a=>o({code:null,output:`${l}
|
|
6
6
|
${a.message}`})),c.on("close",a=>o({code:a,output:l}))});return Z(t,{forgeDir:M(P(),"forge"),npm:r,out:n})}export{mt as menuAtStart,dt as menuIsOn,h as realMenuEnv,ht as resyncMenu,wt as runMenuCommand,yt as runUninstall,gt as switchMenu};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{c as a,d as b,e as c,f as d}from"./chunk-J2UQI544.js";import"./chunk-W2QJA73Q.js";import"./chunk-ZHNPBRCX.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-SNFUGJ3M.js";import"./chunk-XUKYIVJC.js";import"./chunk-GRWOJKQB.js";import"./chunk-IED6VBE6.js";import"./chunk-R24JCIZ5.js";import"./chunk-XPATZLEH.js";import"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import"./chunk-RK3WGALB.js";import"./chunk-O7DK3GJT.js";import"./chunk-DYIATUFE.js";import"./chunk-EEQSUBBL.js";import"./chunk-LA5JVBFP.js";import"./chunk-K6ERQTUQ.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-T37DEXUI.js";import"./chunk-J6AZTW62.js";import"./chunk-BIBDLXCG.js";import"./chunk-7KYO62XK.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{d as execute,a as exitCodeFor,c as renderRun,b as runIntent};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{Jb as a,Kb as b,Lb as c,Mb as d,Nb as e}from"./chunk-KMLT45OJ.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-VTA6Z45X.js";import"./chunk-PBIS2ONZ.js";import"./chunk-I25E2XDH.js";import"./chunk-IBPGC4N2.js";import"./chunk-U5TEGDGH.js";import"./chunk-QVACE4IE.js";import"./chunk-RK3WGALB.js";import"./chunk-EEQSUBBL.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{e as ExtensionsFlow,c as byteCount,b as extensionCredits,d as extensionsChip,a as realManager};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{f as d}from"./chunk-
|
|
3
|
+
import{f as d}from"./chunk-I25E2XDH.js";import{a as c}from"./chunk-J7FLFHQJ.js";import"./chunk-TMUK2DD3.js";function y(e){let t=Object.entries(e.assets).find(([n])=>n.startsWith(`${process.platform}-`));return d(e)?.version??t?.[1]?.version??""}function x(e){return{id:e.entry.id,title:e.entry.title,summary:e.entry.summary,version:y(e.entry),licence:e.entry.licence,installed:e.installed??null,updateAvailable:e.updateAvailable,supported:e.supported,...e.reason!==void 0?{reason:e.reason}:{},...e.downloadBytes!==void 0?{downloadBytes:e.downloadBytes}:{}}}function E(e){return e.supported?e.installed===void 0?`not installed${e.downloadBytes?`, ${c(e.downloadBytes)} download`:""}`:e.updateAvailable?`installed ${e.installed}, update to ${d(e.entry)?.version} available`:`installed ${e.installed}`:`not available: ${e.reason??"unsupported here"}`}function v(e){let t=Math.max(...e.map(n=>n.entry.id.length));return e.flatMap((n,a)=>[...a>0?[""]:[],`${n.entry.id.padEnd(t)} ${n.entry.summary}`,`${" ".repeat(t)} ${E(n)}`,`${" ".repeat(t)} ${n.entry.licence}`])}async function w(e,t={}){let{installExtension:n,listExtensions:a,removeExtension:p}=await import("./manager-T3WDLUKR.js"),i,s;if(e.action==="add"&&e.id!==void 0){let o=(await a()).find(f=>f.entry.id===e.id),l=o?.installed!==void 0&&!o.updateAvailable,u=await n(e.id,{onProgress:t.onDownload});i={id:e.id,action:l?"unchanged":"added"},s=l?`${e.id} ${u.version} is already installed`:`Installed ${e.id} ${u.version}`}else if(e.action==="remove"&&e.id!==void 0){let o=await p(e.id);i={id:e.id,action:o?"removed":"unchanged"},s=o?`Removed ${e.id}`:`${e.id} was not installed`}let{hideUnneeded:m}=await import("./needed-YU5BPYD6.js"),r=await m(await a());return{stdout:s===void 0?v(r):[s],data:{extensions:r.map(x),...i?{changed:i}:{}}}}export{w as runExtensions,x as toExtensionJson};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
2
|
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-LA5JVBFP.js";import"./chunk-TMUK2DD3.js";export{a as ffmpegCandidates,c as findFfmpeg,e as forceFfmpegForTests,i as frameAt,g as keyframeAtOrBefore,d as knownFfmpeg,f as probeMedia,b as readNames,j as readProgress,k as runFfmpeg,h as soundLevels};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h}from"./chunk-T37DEXUI.js";import"./chunk-J6AZTW62.js";import"./chunk-BIBDLXCG.js";import"./chunk-7KYO62XK.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{c as decodeToPng,a as encode,d as encodeToBuffer,g as guessCrop,h as imageEngine,f as loadCropView,e as measureImage,b as writeAtomic};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b,c,d,e,f,g}from"./chunk-RXI6QLNY.js";import"./chunk-TARDT6LZ.js";import"./chunk-SNFUGJ3M.js";import"./chunk-BIBDLXCG.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{e as hasMenu,d as installMenu,c as isInstalled,b as readState,f as removeMenu,g as runProgram,a as stateMatches};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
+
import{a,b,c,d,e,f}from"./chunk-7I2OSTBX.js";import"./chunk-CVNYUROW.js";import"./chunk-J7FLFHQJ.js";import"./chunk-VLVNA4T3.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{f as installUpdate,a as installedGlobally,e as lastWords,c as npmBeside,d as npmCliBeside,b as runningScript};
|