conformtools 0.6.21 → 0.6.23
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/account-ZGDVLMZA.js +3 -0
- package/dist/{agent-hook-setup-D2QNHA3V.js → agent-hook-setup-IACTYSVL.js} +1 -1
- package/dist/{analysis-engine-VNGF3DE4.js → analysis-engine-BBOSGAB2.js} +1 -1
- package/dist/{bridge-GW2VQP2I.js → bridge-6XEVB67I.js} +1 -1
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-M56WEBZY.js → chunk-3AR7KSPH.js} +1 -1
- package/dist/{chunk-2WNNDPVR.js → chunk-3KS3547B.js} +1 -1
- package/dist/{chunk-X7C4YS2J.js → chunk-3LGFQ42R.js} +1 -1
- package/dist/{chunk-CXOK4SF6.js → chunk-5JDF2IUF.js} +1 -1
- package/dist/{chunk-5YCUHHZO.js → chunk-5VQ2IHWO.js} +1 -1
- package/dist/{chunk-3WJSWOCS.js → chunk-67VLJJ75.js} +2 -2
- package/dist/chunk-6U2DUMIM.js +3 -0
- package/dist/{chunk-5XJVAA6N.js → chunk-BHBBS26Z.js} +1 -1
- package/dist/{chunk-LKX3HCRN.js → chunk-DCO5D65W.js} +1 -1
- package/dist/{chunk-AY72AUHE.js → chunk-DESBZZGR.js} +94 -94
- package/dist/chunk-E75BCWXY.js +4 -0
- package/dist/{chunk-2WD3MDPB.js → chunk-EZYCCYY7.js} +1 -1
- package/dist/{chunk-XAUMTGJZ.js → chunk-GN5T5S6K.js} +2 -2
- package/dist/{chunk-M545OKDZ.js → chunk-HNEKQMQG.js} +1 -1
- package/dist/chunk-IDADYIY6.js +7 -0
- package/dist/{chunk-SQCGMF6W.js → chunk-ISG6PEOD.js} +1 -1
- package/dist/chunk-IW5M45CL.js +3 -0
- package/dist/{chunk-OR6IMPAS.js → chunk-KDNIWB5V.js} +1 -1
- package/dist/{chunk-JCNKPRYY.js → chunk-LBROV5JN.js} +1 -1
- package/dist/chunk-NHWWMLZW.js +5 -0
- package/dist/{chunk-I6WBZBGN.js → chunk-NQDVV2PX.js} +1 -1
- package/dist/chunk-OCNKVM26.js +7 -0
- package/dist/{chunk-P6MSAFNR.js → chunk-Q72JSDNU.js} +1 -1
- package/dist/{chunk-PENDVYIL.js → chunk-V6MI7VE3.js} +1 -1
- package/dist/{chunk-Z42CP7YT.js → chunk-XIFURVIB.js} +1 -1
- package/dist/{chunk-WW6XAQKM.js → chunk-XX7QQIBI.js} +1 -1
- package/dist/{chunk-5WL2ZPPB.js → chunk-ZEVOSOP4.js} +185 -184
- package/dist/{chunk-26ZNWQLT.js → chunk-ZNUIZEPF.js} +1 -1
- package/dist/chunk-ZPIY5DOU.js +3 -0
- package/dist/{claude-setup-AI4WXN2V.js → claude-setup-6RMV3QZM.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{cr3-wasm-CVZ2A7HA.js → cr3-wasm-CQ5YEFUF.js} +1 -1
- package/dist/{demo-engine-MOHHYVGV.js → demo-engine-O5T6QRYL.js} +1 -1
- package/dist/{dng-wasm-TN64FKIN.js → dng-wasm-K6PWOV4P.js} +1 -1
- package/dist/{dpx-wasm-BO2NDGTA.js → dpx-wasm-RJZANW6N.js} +1 -1
- package/dist/{engine-WMOJ3HRU.js → engine-WEGECPAH.js} +2 -2
- package/dist/{exr-wasm-W4K6W6JZ.js → exr-wasm-EZY3GZ2L.js} +1 -1
- package/dist/framing-V3AI35RV.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-LC27KFZT.js → h264-KMDAFD3Q.js} +1 -1
- package/dist/{h264-mxf-GQCFBTTP.js → h264-mxf-IJYHBYKB.js} +1 -1
- package/dist/hook.js +3 -3
- package/dist/{host-relink-BYLBYTPH.js → host-relink-IDTSHA4V.js} +1 -1
- package/dist/hosted-7KVSASRJ.js +3 -0
- package/dist/hosts-5VFREDGW.js +3 -0
- package/dist/http.js +4 -4
- package/dist/{inspect-63MCOFOQ.js → inspect-VS5N6SKX.js} +16 -17
- package/dist/isobmff-4FUKPUL3.js +3 -0
- package/dist/{mc-video-G4KNAHGG.js → mc-video-DTMHUECT.js} +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{media-Z23SL7RZ.js → media-3XXQBZNW.js} +1 -1
- package/dist/mxf-LGRSWF7S.js +3 -0
- package/dist/{ops-T6ZV7RAM.js → ops-QAML7C35.js} +1 -1
- package/dist/{probe-YOYK7HR5.js → probe-VB6JH6ZJ.js} +1 -1
- package/dist/{r3d-6P6K47AH.js → r3d-AWQQHTQC.js} +1 -1
- package/dist/{r3d-ISLQ6I3S.js → r3d-OL6DVR3C.js} +1 -1
- package/dist/resolve-bridge.py +208 -13
- package/dist/{sequence-patch-5MFTY52Q.js → sequence-patch-OHYBBKKZ.js} +1 -1
- package/dist/{still-DMZJUM7M.js → still-CDF26BQZ.js} +1 -1
- package/dist/{still-wasm-ZLP224QL.js → still-wasm-3EBYMLVL.js} +1 -1
- package/dist/{store-6XN5Q6UG.js → store-ZXNF2RXS.js} +1 -1
- package/dist/{tiff-wasm-TAEKNO4Q.js → tiff-wasm-JIBA5AI4.js} +1 -1
- package/dist/timeline-BAMMSL7B.js +3 -0
- package/dist/wasm/media_core_bg.wasm +0 -0
- package/dist/{wav-BNOX5U7S.js → wav-N6EWJR2P.js} +1 -1
- package/package.json +5 -5
- package/dist/account-VD3EE5UT.js +0 -3
- package/dist/chunk-2XQ42O7E.js +0 -7
- package/dist/chunk-BUOYYO22.js +0 -3
- package/dist/chunk-COALWMI7.js +0 -4
- package/dist/chunk-MU5AGXSH.js +0 -3
- package/dist/chunk-QJPOC4SW.js +0 -3
- package/dist/chunk-VG73BE6N.js +0 -4
- package/dist/chunk-ZAL7Y5VZ.js +0 -7
- package/dist/framing-GOLRVBBJ.js +0 -3
- package/dist/hosted-ASNIPMSH.js +0 -3
- package/dist/hosts-EYVK23A3.js +0 -3
- package/dist/isobmff-IMEN2G3B.js +0 -3
- package/dist/mxf-ZEM6EEZU.js +0 -3
- package/dist/timeline-P4GJT36O.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as l,f as o,g as m}from"./chunk-JV7TZDKJ.js";import{a as s}from"./chunk-BBCQMZQN.js";import"./chunk-PSANHDZM.js";var h=e=>{let t=e.split(/[/\\]/).pop()??"",i=t.lastIndexOf(".");return i>0?t.slice(i+1).toLowerCase():""};async function f(e,t){try{if(e==="dpx"){let r=await(await import("./dpx-wasm-
|
|
3
|
+
import{a as l,f as o,g as m}from"./chunk-JV7TZDKJ.js";import{a as s}from"./chunk-BBCQMZQN.js";import"./chunk-PSANHDZM.js";var h=e=>{let t=e.split(/[/\\]/).pop()??"",i=t.lastIndexOf(".");return i>0?t.slice(i+1).toLowerCase():""};async function f(e,t){try{if(e==="dpx"){let r=await(await import("./dpx-wasm-RJZANW6N.js")).inspectDpxWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="exr"){let r=await(await import("./exr-wasm-EZY3GZ2L.js")).inspectExrWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="dng"){let r=await(await import("./dng-wasm-K6PWOV4P.js")).inspectDngWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="cr3"){let r=await(await import("./cr3-wasm-CQ5YEFUF.js")).inspectCr3Wasm(t);return r?{width:r.width,height:r.height}:null}if(e==="tif"||e==="tiff"){let r=await(await import("./tiff-wasm-JIBA5AI4.js")).inspectTiffWasm(t);return r?{width:r.width,height:r.height}:null}let i=await import("./still-wasm-3EBYMLVL.js"),n=await i.inspectPhotoRawWasm(e,t);if(n)return{width:n.width,height:n.height};let a=await i.decodeStillWasm(e,t);return a?{width:a.width,height:a.height}:null}catch{}return null}async function p(e){if(typeof createImageBitmap!="function"||typeof Blob>"u")return null;try{let t=await createImageBitmap(new Blob([e])),i={width:t.width,height:t.height};return t.close?.(),i.width>0&&i.height>0?i:null}catch{return null}}async function c(e){let t=h(e.filename),i=await m(t,o(e));if(i)return i;let n=s(t);if(n===null||n==="none")return null;let a;try{a=await e.read(0,e.fileSize)}catch{return null}return n==="wasm-decoder"?await f(t,a):await p(a)}function u(e){let t=l(e);return t==="jpg"?"jpeg":t==="tif"?"tiff":t||"still"}var R={async inspect(e){let t=e.parts[0],i=await c(t);return{id:t.filename,kind:"external",content_kind:"still",target_url:t.filename,available_range:null,reel_name:null,source_timecode:null,container:l(t.filename)||"still",codec:u(t.filename),size_bytes:t.fileSize,bitrate_bps:null,source_resolution_w:i?.width??null,source_resolution_h:i?.height??null,source_pixel_aspect:i?1:null,streams:[],vendor_metadata:{},binding_state:"unbound",raw_extraction:{},metadata:{}}},async extract(e){let t=e.parts.map((i,n)=>({kind:"frame",part:n,offset:0,length:i.fileSize,frame_in:n,frame_out:n}));return t.length===0?null:{v:1,container:l(e.parts[0].filename)||"still",codec:u(e.parts[0].filename),frame_count:t.length,granularity:"frame",segments:t,...e.parts.length>1?{part_names:e.parts.map(i=>i.filename)}:{}}},async sparsify(){throw new Error("stillFormat.sparsify: stills ship whole \u2014 no sparse plan exists")},async trim(){throw new Error("stillFormat.trim: stills ship whole \u2014 no trim plan exists")}};export{R as stillFormat};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as s}from"./chunk-OSUIS4JU.js";import{Ga as i,Ha as a}from"./chunk-
|
|
3
|
+
import{a as s}from"./chunk-OSUIS4JU.js";import{Ga as i,Ha as a}from"./chunk-DCO5D65W.js";import"./chunk-PSANHDZM.js";var u={dpx:"dpx",tif:"tiff",tiff:"tiff",exr:"exr",j2c:"j2k",j2k:"j2k",jp2:"j2k",jph:"j2k",dng:"dng",cr3:"cr3",cr2:"cr2",arw:"arw",psd:"psd",tga:"tga",heic:"heic",heif:"heic",png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",bmp:"bmp",webp:"webp"};function l(e){return Object.prototype.hasOwnProperty.call(u,(e??"").toLowerCase())}var d=e=>{let n=i[e];return typeof n=="function"?n:void 0};async function g(e,n){let r=e.toLowerCase();if(r!=="arw"&&r!=="cr2")return null;await a();let t=i[`inspect_${r}`];if(typeof t!="function")return null;let o=t(n);return o==="null"?null:JSON.parse(o)}async function m(e,n,r=1){let t=u[e.toLowerCase()];if(!t)return null;await a();try{let o=r>1?d(`decode_${t}_preview`):void 0;if(o)return s(o(n,r));let c=d(`decode_${t}_rgba`);return c?s(c(n)):null}catch{return null}}export{u as STILL_WASM_BASE,m as decodeStillWasm,l as hasStillWasm,g as inspectPhotoRawWasm};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-
|
|
3
|
+
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-67VLJJ75.js";import"./chunk-OCNKVM26.js";import"./chunk-HNEKQMQG.js";import"./chunk-E75BCWXY.js";import"./chunk-ZPIY5DOU.js";import"./chunk-PSANHDZM.js";export{a as createSession,g as getExtra,c as getSession,b as lastSessionId,e as listSessions,f as saveExtra,d as updateSession};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-
|
|
3
|
+
import{a,b}from"./chunk-LBROV5JN.js";import"./chunk-DCO5D65W.js";import"./chunk-PSANHDZM.js";export{b as decodeTiffWasm,a as inspectTiffWasm};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{$b as k,Rb as a,Sb as b,Tb as c,Ub as d,Vb as e,Wb as f,Xb as g,Yb as h,Zb as i,_b as j,ac as l,bc as m,cc as n,dc as o,ec as p,fc as q,gc as r,hc as s,ic as t}from"./chunk-DESBZZGR.js";import"./chunk-IN6XVTUS.js";import"./chunk-BHBBS26Z.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-6U2DUMIM.js";import"./chunk-XIFURVIB.js";import"./chunk-V6MI7VE3.js";import"./chunk-EZYCCYY7.js";import"./chunk-KDNIWB5V.js";import"./chunk-LBROV5JN.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-NQDVV2PX.js";import"./chunk-XX7QQIBI.js";import"./chunk-5JDF2IUF.js";import"./chunk-IDADYIY6.js";import"./chunk-IW5M45CL.js";import"./chunk-NHWWMLZW.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-DCO5D65W.js";import"./chunk-67VLJJ75.js";import"./chunk-OCNKVM26.js";import"./chunk-HNEKQMQG.js";import"./chunk-E75BCWXY.js";import"./chunk-ZPIY5DOU.js";import"./chunk-PSANHDZM.js";export{j as OPERATION_KINDS,a as READ_FORMATS,k as applyOperation,m as applyOperationWithSources,s as consolidate,b as detectFormat,d as detectTimelineFormat,t as judge,r as linkText,g as listClips,i as listFlags,h as listMedia,e as readTimeline,n as resolveTarget,q as routesText,c as sniffFormat,f as summarize,l as trackIndex,p as writeDestination,o as writeTimeline};
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as b}from"./chunk-AACY2V3L.js";import{Ha as u,ba as _,la as f,sa as d,va as g}from"./chunk-
|
|
3
|
+
import{a as b}from"./chunk-AACY2V3L.js";import{Ha as u,ba as _,la as f,sa as d,va as g}from"./chunk-DCO5D65W.js";import"./chunk-PSANHDZM.js";function p(s){return(r,t)=>s.read(r,t)}function S(s){let r=[];for(let t of s)t.kind!=="clip"||!t.source_range||r.push({start_frame:t.source_range.start.value,dur_frames:t.source_range.duration.value,fps:t.source_range.start.rate??1});return r}var w={async inspect(s){await u();let r=s.parts[0],t=await _(p(r),r.fileSize),e=JSON.parse(t);if(!e||!e.sample_rate)return null;let a=e.byte_rate>0?e.data_length/e.byte_rate:null,m=a?Math.round(a*e.sample_rate):0,n=[{kind:"audio",codec:"pcm",rate:e.sample_rate,channels:e.channels,bit_depth:e.bits_per_sample,codec_specific:{bits_per_sample:e.bits_per_sample}}];return{id:r.filename,kind:"external",content_kind:"audio",target_url:r.filename,available_range:a?{start:{value:0,rate:e.sample_rate},duration:{value:m,rate:e.sample_rate}}:null,reel_name:null,source_timecode:e.source_timecode??null,container:"wav",codec:"pcm",size_bytes:r.fileSize,bitrate_bps:e.byte_rate*8,streams:n,vendor_metadata:e.bext?{bext:e.bext}:{},binding_state:"unbound",raw_extraction:{wav_meta:e},metadata:{}}},async extract(s){await u();let r=s.parts[0],t=JSON.parse(await f(p(r),r.fileSize));return t.length===0?null:{v:1,container:"wav",codec:"pcm",frame_count:b(t),granularity:"second",segments:t}},async sparsify(s,r){await u();let t=s.parts[0],e=await g(p(t),t.fileSize,JSON.stringify(S(r.items)),r.handles),a=JSON.parse(e);return[{filename:t.filename,fileSize:a.fileSize,structuralRanges:a.structuralRanges,essenceRanges:a.essenceRanges,trimInputs:a.trimInputs}]},async trim(s,r){await u();let t=s.parts[0],e=[];for(let n of r.items){if(n.kind!=="clip"||!n.source_range)continue;let i=n.source_range.start.rate??1,o=Math.max(0,(n.source_range.start.value-r.handles)/i),c=(n.source_range.start.value+n.source_range.duration.value+r.handles)/i;c>o&&e.push([o,c])}if(e.length===0)throw new Error("wav trim: no usable trim ranges in items");e.sort((n,i)=>n[0]-i[0]);let a=[];for(let[n,i]of e){let o=a[a.length-1];o&&n<=o[1]?o[1]=Math.max(o[1],i):a.push([n,i])}let m=[];for(let[n,[i,o]]of a.entries()){let c=await d(p(t),t.fileSize,i,o,1),l=JSON.parse(c);a.length>1&&(l.output_clip_number=n+1,l.output_clip_count=a.length,l.output_part_number=1),m.push(l)}return m}};export{w as wavFormat};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conformtools",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.23",
|
|
4
4
|
"description": "conform.tools on your machine: timeline exchange, relink, media trim, delivery and auto conform, as MCP tools for Claude and other AI apps, a CLI and a local HTTP API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"conformtools-darwin-arm64": "0.6.
|
|
48
|
-
"conformtools-darwin-x64": "0.6.
|
|
49
|
-
"conformtools-linux-x64": "0.6.
|
|
50
|
-
"conformtools-windows-x64": "0.6.
|
|
47
|
+
"conformtools-darwin-arm64": "0.6.23",
|
|
48
|
+
"conformtools-darwin-x64": "0.6.23",
|
|
49
|
+
"conformtools-linux-x64": "0.6.23",
|
|
50
|
+
"conformtools-windows-x64": "0.6.23"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/dist/account-VD3EE5UT.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p}from"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{c as NET_TIMEOUT_MS,d as _forgetOffline,f as accessToken,g as accountStatus,a as config,i as includesOf,b as legacyKvStorePath,o as login,p as logout,e as modelKey,m as requireApp,k as requireEntitled,l as requireMcp,n as requireStudioTool,j as setAccountGate,h as statusText};
|
package/dist/chunk-2XQ42O7E.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as ee}from"./chunk-M545OKDZ.js";import{a as d}from"./chunk-COALWMI7.js";import{B as I,C as M,D as q,E as S,F as V,O as X,R as Z,V as W,W as Q,b as c,da as s,h as g,i as Y,o as p,p as _,v as H,z as f}from"./chunk-MU5AGXSH.js";var _e=["pro","studio","enterprise"],Be=e=>_e.includes((e??"").toLowerCase()),te=["align","reconform","conform-reference"],he={transferGB:2e3},l={payg:{id:"payg",name:"Pay As You Go",includes:{web:!0,mcp:!1,app:!1,studio_tools:!1}},web:{id:"web",name:"Indie",unlisted:!0,includes:{web:!0,mcp:!1,app:!1,studio_tools:!1},allowance:{transferGB:50}},indie:{id:"indie",name:"Pro",popular:!0,includes:{web:!0,mcp:!0,app:!0,studio_tools:!1},allowance:{transferGB:250}},pro:{id:"pro",name:"Studio",includes:{web:!0,mcp:!0,app:!0,studio_tools:!0},allowance:{transferGB:1e3}},studio:{id:"studio",name:"Enterprise",includes:{web:!0,mcp:!0,app:!0,studio_tools:!0},allowance:he}},ne={web:!0,mcp:!0,app:!0,studio_tools:!0};import{createPrivateKey as Je,createPublicKey as we,sign as Ke,verify as ye}from"node:crypto";import{Buffer as h}from"node:buffer";var be="CONFORMTOOLS_LICENSE_V1",ae=/^[0-9A-F]{8}(-[0-9A-F]{8}){3}$/,re=e=>JSON.stringify({dev_mode:e.dev_mode??!1,email:e.email,expires_at:e.expires_at,features:e.features,issued_at:e.issued_at,machine_fingerprint:e.machine_fingerprint,tier:e.tier});function ie(e){let t=e.split(/\r?\n/).map(a=>a.trim()).filter(a=>a&&!a.startsWith("#")&&!a.startsWith("-----")).join(""),n=JSON.parse(h.from(t,"base64").toString("utf8"));if(n?.magic!==be||!n.payload?.data)throw new Error("not a conform.tools licence");return n.payload}function oe(e,t){let n=h.from(e.signature,"base64"),a=h.from(re(e.data));return n.length!==64?!1:t.some(r=>ye(null,a,we({key:h.concat([h.from("302a300506032b6570032100","hex"),h.from(r)]),format:"der",type:"spki"}),n))}var xe=["cMwVBrEYKMzlG6pC7FF2lNKIoEqGz2xB5yph6clNnTg=","qnheqkkDU09l1oI6h2CFh4uQ97bY/hkTA5niGKH0+X8="],ve=xe.map(e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)));function E(){let e=c("CONFORM_RECORDS_DIR");if(e)return e;let t=_(),n=g()==="darwin"?s(t,"Library/Application Support"):g()==="win32"?c("LOCALAPPDATA")??s(t,"AppData/Local"):c("XDG_DATA_HOME")??s(t,".local/share");return s(n,"conform.tools")}var Se=()=>c("CONFORM_LICENSE_PATH")??s(E(),"license.lic"),N=()=>s(E(),"grant.lic"),ke=null;function $(){return ke??=(async()=>{let e=await ee();if(!e)return[];let t=await Z(e,["machine"],{timeoutMs:15e3}).catch(()=>null);try{return JSON.parse(t?.stdout??"").machines.filter(n=>ae.test(n))}catch{return[]}})()}function Oe(e,t,n=Date.now()){if(!oe(e,ve))return{ok:!1,reason:"invalid licence signature"};let a=Date.parse(e.data.expires_at);return!Number.isFinite(a)||a<n?{ok:!1,reason:`licence expired ${e.data.expires_at}`}:[t??[]].flat().includes(e.data.machine_fingerprint)?{ok:!0,data:e.data}:{ok:!1,reason:"licence is for another machine"}}async function se(){let e;try{e=await f(Se())}catch{return null}try{return Oe(ie(e),await $())}catch(t){return{ok:!1,reason:t.message}}}var Ae={production:{supabaseUrl:"https://sttpwvjbpsetzbhrkohl.supabase.co",anonKey:"sb_publishable_cyuIPsrQa5Ye7lqFxjnknQ_ozDuwwzp",appBase:"https://conform.tools"},staging:{supabaseUrl:"https://slxggvbvgzkiwojcgykx.supabase.co",anonKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNseGdndmJ2Z3praXdvamNneWt4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzEyODUzMTksImV4cCI6MjA4Njg2MTMxOX0.b18iDsWftny0k9VmOCcbN6kLlyZsZ7GULn_jRH9CE9I",appBase:"https://beta.conform.tools"}};function i(){let e=c("CONFORM_ENV")==="staging"?"staging":"production",t=Ae[e];return{env:e,supabaseUrl:c("CONFORM_SUPABASE_URL")??t.supabaseUrl,anonKey:c("CONFORM_SUPABASE_ANON_KEY")??t.anonKey,appBase:c("CONFORM_APP_BASE")??t.appBase}}var Pe=600*1e3,ce=72*3600*1e3,Le=300*1e3,y=()=>s(p(),i().env==="production"?"auth.json":`auth-${i().env}.json`);async function b(){for(let e of new Set([y(),s(p(),"auth.json")]))try{let t=JSON.parse(await f(e));if(t.env===i().env&&t.access_token)return t}catch{}return await Ee()}var Ie=()=>{let e=g()==="win32"?c("APPDATA")??s(_(),"AppData","Roaming"):g()==="darwin"?s(_(),"Library","Application Support"):c("XDG_CONFIG_HOME")??s(_(),".config");return s(e,"conform-tools","kv-store.json")};async function Ee(){let e=Ie();try{let t=JSON.parse(await f(e)),n=JSON.parse(t["ct-supabase-auth"]??"null");if(!n?.access_token||!n.refresh_token)return null;let a=n.access_token.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");if(JSON.parse(atob(a+"=".repeat(-a.length&3))).iss!==`${i().supabaseUrl}/auth/v1`)return null;let o={env:i().env,access_token:n.access_token,refresh_token:n.refresh_token,expires_at:n.expires_at??0};return await D(o),delete t["ct-supabase-auth"],await I(e,JSON.stringify(t)),o}catch{return null}}async function Ne(){try{for await(let e of X(p())){if(!/^auth(?:-(\w+))?\.json$/.exec(e.name))continue;let n=JSON.parse(await f(s(p(),e.name)));if(n.access_token&&n.env&&n.env!==i().env)return{other_env:n.env}}}catch{}return{}}async function D(e){await M(p()),await I(y(),JSON.stringify(e)),await V(y(),384)}var j=6e3,A=0,B=()=>Date.now()<A,ue=()=>{A=Date.now()+6e4};function nt(){A=0}var pe=e=>e.expires_at-60>Date.now()/1e3;async function R(e){let t=await b();return t&&t.refresh_token!==e.refresh_token&&Object.assign(e,t),pe(e)}async function G(e){if(pe(e))return e.access_token;if(B())return null;if(await R(e))return e.access_token;let t=await q(`${y()}.lock`);try{if(await R(e))return e.access_token;let n=i(),a=await fetch(`${n.supabaseUrl}/auth/v1/token?grant_type=refresh_token`,{method:"POST",headers:{apikey:n.anonKey,"content-type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token}),signal:AbortSignal.timeout(j)}).catch(o=>{throw ue(),o});if(!a.ok)return a.status!==400&&a.status!==401?null:await R(e)?e.access_token:"";let r=await a.json();return e.access_token=r.access_token,r.refresh_token&&(e.refresh_token=r.refresh_token),e.expires_at=r.expires_at??Math.floor(Date.now()/1e3)+(r.expires_in??3600),await D(e),e.access_token}catch{return null}finally{await t()}}async function at(){return(await b().catch(()=>null))?.last_entitlement?.model_key??null}async function rt(){let e=await b();return e&&await G(e)||null}var w=null;function le(e,t){return{signed_in:!0,entitled:e.entitled,env:i().env,email:e.email,access:e.access,tier:e.tier,trial_days_remaining:e.trial_days_remaining,source:t,...e.entitled?{}:{reason:"not_entitled"},...e.invite_only?{invite_only:!0}:{}}}async function fe(e={}){let t=await se();if(t?.ok)return{signed_in:!!await b().catch(()=>null),entitled:!0,env:i().env,email:t.data.email,access:"licence",tier:t.data.tier,source:"licence"};let n=await $e(e);return t&&!n.entitled?{...n,licence_error:t.reason}:n}async function $e(e){if(!e.force&&w&&Date.now()-w.at<Pe)return{...w.status,source:"cache"};let t=i(),n=await b();if(!n)return{signed_in:!1,entitled:!1,env:t.env,reason:"not_signed_in",...await Ne()};let a=await G(n);if(a==="")return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(a&&!B())try{let r=(await $())[0],o=await fetch(`${t.supabaseUrl}/functions/v1/v1-billing/v1/billing/entitlement${r?`?machine=${r}`:""}`,{headers:{authorization:`Bearer ${a}`,apikey:t.anonKey},signal:AbortSignal.timeout(j)}).catch(u=>{throw ue(),u});if(o.status===401||o.status===403)return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(o.ok){let{grant:u,...P}=(await o.json()).data;r&&await De(u),n.last_entitlement=P,n.last_entitlement_at=Date.now(),await D(n);let L=le(P,"live");return w={at:Date.now(),status:L},L}}catch{}if(n.last_entitlement&&n.last_entitlement_at&&Date.now()-n.last_entitlement_at<ce){let r=ce-(Date.now()-n.last_entitlement_at);return{...le(n.last_entitlement,"grace"),grace_remaining_h:Math.round(r/36e4)/10}}return{signed_in:!0,entitled:!1,env:t.env,reason:"offline_grace_expired"}}async function De(e){try{if(!e)return await S(N());await M(E()),await I(N(),e)}catch{}}function Te(e){return e.source==="licence"?`${e.email} \xB7 machine licence (${e.tier}) \u2014 runs offline, no account check`:Ce(e)+(e.licence_error?`
|
|
4
|
-
(the machine licence was not used: ${e.licence_error})`:"")}function Ce(e){let t=i();if(!e.signed_in)return`not signed in (${t.env})${e.other_env?`; you are signed in to ${e.other_env} only (each server keeps its own sign-in)`:""}. Run the account_login tool, or \`npx -y conformtools@latest login\` in a terminal.`;if(e.reason==="auth_rejected")return"signed-in session was rejected (expired or revoked) \u2014 sign in again with account_login.";if(e.reason==="offline_grace_expired")return"offline for more than 72 h since the last account check \u2014 reconnect and run account_status.";let n=`${e.email??"(unknown email)"} \xB7 ${t.env}`;if(!e.entitled&&e.invite_only)return`${n}
|
|
5
|
-
the conform.tools engine (the MCP and the app) is invite-only for now, and ${e.email??"this account"} is not on the list. If that is the wrong Google account, run account_logout, then account_login with the invited one.`;if(!e.entitled)return`${n}
|
|
6
|
-
no active plan on ${e.email??"this account"}: the MCP is in the ${l.indie.name} plan and up. If that is the wrong Google account, run account_logout, then account_login and pick the account with the plan; otherwise choose a plan at ${t.appBase}/pricing, then run account_status.`;let a=e.access==="trial"?`trial, ${e.trial_days_remaining??"?"} day(s) left`:e.access==="allowlist"?"invited (early access)":`subscribed${e.tier?` (${F(e.tier)})`:""}`,r=T(e),o=r?` \xB7 includes ${[r.web&&"the web tools",r.mcp&&"the MCP",r.app&&"the app"].filter(Boolean).join(", ")||"the web tools"}`:"";return`${n}
|
|
7
|
-
${a}${o}${e.source==="grace"?` \u2014 offline, using the last check (${e.grace_remaining_h} h of grace left)`:""}`}function F(e){return l[e.toLowerCase()]?.name??e}function T(e){if(e.access==="trial")return ne;let t=(e.tier??"").toLowerCase();return(t==="enterprise"?l.studio:l[t])?.includes??null}var de=()=>fe();function it(e){de=e}async function me(){let e=await de();if(e.entitled)return e;let t=e.signed_in&&e.reason==="not_entitled"?"not_entitled":"not_signed_in";throw new d(t,Te(e),{account:e})}async function ot(){let e=await me();if(e.source==="licence"||T(e)?.mcp!==!1)return e;throw new d("not_entitled",`The conform.tools MCP is in the ${l.indie.name} plan and up. ${e.access==="trial"?"Your trial":`Your plan${e.tier?` (${F(e.tier)})`:""}`} includes Timeline Exchange and Conform Connect on ${i().appBase}, but not the engine on this machine. Upgrade at ${i().appBase}/pricing, then run account_status.`,{account:e,needs:"mcp"})}async function Ue(){let e=await me();if(e.source==="licence")return e;if(!T(e)?.app)throw new d("not_entitled",`The conform.tools app is in the ${l.indie.name} plan and up. ${e.access==="trial"?"Your trial":`Your plan${e.tier?` (${F(e.tier)})`:""}`} does not include the app. Upgrade at ${i().appBase}/pricing, then reopen the app.`,{account:e,needs:"app"});let t=await Re();if(t)throw new d("seat_in_use",`This seat is in use on ${t}. Each seat runs the app on one computer at a time: quit the app there (or sign out), or wait 15 minutes after it last ran, then reopen it here.`,{account:e,needs:"seat",in_use_by:t});return e}async function st(e){if(!te.includes(e))return;let t=await Ue();if(!(t.source==="licence"||T(t)?.studio_tools!==!1))throw new d("not_entitled",`This tool is in the ${l.pro.name} plan. Upgrade at ${i().appBase}/pricing.`,{account:t,needs:"studio_tools"})}var Me=240*1e3,O=null;async function Re(){if(O&&Date.now()-O.at<Me)return O.busy;let e=await ge("POST").catch(()=>null);return O={at:Date.now(),busy:e},e}async function ge(e){let t=i(),n=await b(),a=(await $())[0],r=n&&await G(n);if(!r||!a||B())return null;let o=await fetch(`${t.supabaseUrl}/functions/v1/v1-billing/v1/billing/seat`,{method:e,headers:{authorization:`Bearer ${r}`,apikey:t.anonKey,"content-type":"application/json"},body:JSON.stringify({machine:a,name:Y()}),signal:AbortSignal.timeout(j)});return o.status===409?(await o.json()).in_use_by??"another computer":null}var k=null;function ct(e={}){if(k)return k;let t=i(),n=crypto.randomUUID().replaceAll("-","");return k=new Promise((a,r)=>{let o=!1,u=x=>{o||(o=!0,clearTimeout(L),setTimeout(()=>P.close(),250),k=null,x())},P=Q({hostname:"127.0.0.1",port:0,onListen:async x=>{let v=`${t.appBase}/plugin-auth?client=engine&port=${x}&state=${n}`,m=await W(v);e.onUrl?.(v,m)}},async x=>{let v=new URL(x.url);if(v.pathname!=="/callback")return new Response("not found",{status:404});let m=v.searchParams,J=m.get("access_token")??"",K=m.get("refresh_token")??"",C=!!J&&!!K&&m.get("state")===n;if(C){let z=Number(m.get("expires_at"));await D({env:t.env,access_token:J,refresh_token:K,expires_at:z>0?z:Math.floor(Date.now()/1e3)+3600}),w=null,A=0,fe({force:!0}).then(U=>u(()=>a(U)),U=>u(()=>r(U)))}return new Response(je(C),{status:C?200:400,headers:{"content-type":"text/html; charset=utf-8"}})}),L=setTimeout(()=>u(()=>r(new d("not_signed_in","sign-in was not completed within 5 minutes"))),e.timeoutMs??Le)}),k}async function lt(){await ge("DELETE").catch(()=>{}),O=null,w=null,A=0,await H(y())&&await S(y()),await S(N()).catch(()=>{});let e=s(p(),"auth.json");try{JSON.parse(await f(e)).env===i().env&&await S(e)}catch{}}function je(e){let[t,n]=e?["Connected","You're signed in \u2014 you can close this tab."]:["Sign-in failed","Please try again."];return`<!doctype html><meta charset=utf-8><title>conform.tools</title><body style='font:16px -apple-system,Helvetica,Arial,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f5f5f7;color:#1d1d1f'><div style='text-align:center'><div style='font-size:22px;font-weight:700'>conform<span style='color:#ff3c00'>.tools</span></div><div style='margin-top:14px;font-size:20px;font-weight:600'>${t}</div><div style='margin-top:6px;color:#6e6e73'>${n}</div></div></body>`}export{Be as a,l as b,$ as c,i as d,Ie as e,j as f,nt as g,at as h,rt as i,fe as j,Te as k,T as l,it as m,me as n,ot as o,Ue as p,st as q,ct as r,lt as s};
|
package/dist/chunk-BUOYYO22.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{G as f,S as l}from"./chunk-C2ESM27Z.js";var g={prproj:"prproj","resolve-drt":"drt",aaf:"aaf",avb:"avb",otio:"otio",capcut:"capcut","flame-archive":"flame","resolve-fcpxml":"fcpxml","finalcut-fcpxml":"fcpxml","fcp-xml":"xmeml","premiere-xml":"xmeml","resolve-xml":"xmeml","baselight-blscene":"blscene"};function R(e){return e in g}var m=null;function c(){return m||(m=b()),m}async function b(){let e=await import("./timeline_core-6BRZG4LP.js"),t=(await import("./timeline_core_bg-5COJCLPG.js")).default;return await e.default({module_or_path:t}),e}async function A(e,t){let i=g[t];if(!i)throw new Error(`timelineInspect: no Rust engine for format '${t}'`);let n=await c(),r=e.name.replace(/\.[^.]+$/,""),s=(_,...y)=>n[_](...y),o;switch(i){case"prproj":o=s("inspect_prproj_json",await a(e));break;case"aaf":o=s("inspect_aaf_json",await a(e));break;case"avb":o=s("inspect_avb_json",await a(e));break;case"flame":o=s("inspect_flame_json",await a(e),r);break;case"drt":o=s("inspect_drt_json",await w(e));break;case"otio":o=s("inspect_otio_json",await e.text(),r);break;case"capcut":o=s("inspect_capcut_json",await e.text(),r);break;case"fcpxml":o=s("inspect_fcpxml_json",await e.text(),r);break;case"xmeml":o=s("inspect_xmeml_json",await e.text(),r);break;case"blscene":o=s("inspect_blscene_json",await a(e),r);break}return S(o)}var x=12*1024*1024,p=!1;function W(e){p=e}var d=null,h=8e3;async function I(){!d||p||await Promise.race([d,new Promise(e=>setTimeout(e,h))])}function u(e,t,i){if(p||e.length<=x)return e;let n=(e.length/1048576).toFixed(0),r=i?.length??0;throw r===1?new Error(`This ${t.toUpperCase()} timeline extracts to ${n} MB, past what our conversion server can hold in one pass (the ceiling is ours, not your file \u2014 a single long timeline can exceed it on its own). Get in touch and we will convert it for you while we lift the limit.`):new Error(`This ${t.toUpperCase()} selection${r?` (${r} sequences)`:""} extracts to ${n} MB, past what our conversion server can hold in one pass. Convert a few sequences at a time \u2014 one long timeline is usually about ${(x/1048576).toFixed(0)} MB. If a single timeline still will not go through, get in touch and we will convert it for you.`)}async function T(e,t,i){let n=g[t];if(!n)throw new Error(`timelineExtract: no Rust engine for format '${t}'`);switch(await I(),n){case"otio":case"capcut":case"fcpxml":case"xmeml":return{fmt:n,extract:await e.text()};case"blscene":{let s=(await c()).extract_blscene_json(await a(e));return{fmt:n,extract:u(s,n,i)}}case"drt":{let s=(await c()).extract_drt_json(await w(e));return{fmt:n,extract:u(s,n,i)}}case"prproj":{let r=await c(),s=JSON.stringify(i??[]),o=r.extract_prproj_json(await a(e),s);return{fmt:n,extract:u(o,n,i)}}case"avb":{let r=await c(),s=JSON.stringify(i??[]),o=r.extract_avb_json(await a(e),s);return{fmt:n,extract:u(o,n,i)}}case"flame":return{fmt:n,extract:u(JSON.stringify({flame_header_b64:E(v(await a(e)))}),n,i)};case"aaf":{let s=(await c())[`extract_${n}_json`](await a(e));return{fmt:n,extract:u(s,n,i)}}}}async function a(e){return new Uint8Array(await e.arrayBuffer())}function v(e){if(e[0]!==80||e[1]!==75)return e;let t=r=>r.length>=4&&r[0]===128&&r[1]===130&&r[2]===167&&r[3]===214,i=l(e,{filter:r=>!/_\d+\.seg$/.test(r.name)}),n=Object.values(i).find(t);if(!n)throw new Error("This zip holds no Flame archive header (the extension-less file next to the _1.seg).");return n}function E(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}async function w(e){let t=l(await a(e)),i={};for(let[n,r]of Object.entries(t))n.toLowerCase().endsWith(".xml")&&(i[n]=f(r));return JSON.stringify(i)}function S(e){let t=JSON.parse(e),i=Array.isArray(t)?t:t?.timelines??t?.sequences??[],n=i.filter(s=>typeof s=="object"&&s!==null),r=i.map(s=>{if(typeof s=="string")return s;let o=s;return o?.name??o?.title??o?.id??""}).filter(s=>!!s);return{names:Array.from(new Set(r)),timelines:n}}async function k(e){let t=await c();return JSON.parse(t.drt_project_colour(e))}async function C(e){let t=await c();return JSON.parse(t.drx_grade_tree(e))}var P="X-Write-Issues";var O=8*1024;function F(e){if(!e)return[];try{let t=JSON.parse(decodeURIComponent(e));return Array.isArray(t)?t:[]}catch{return[]}}export{R as a,A as b,W as c,T as d,k as e,C as f,P as g,F as h};
|
package/dist/chunk-COALWMI7.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
var n=class extends Error{constructor(o,r,s){super(r);this.code=o;this.data=s;this.name="ConformError"}};function u(e,t){return{content:[{type:"text",text:e}],...t?{structuredContent:{ok:!0,...t}}:{}}}var l=e=>u(e);function f(e){let t=e instanceof n?e:d(e);return{content:[{type:"text",text:`error [${t.code}]: ${t.message}`}],structuredContent:{ok:!1,code:t.code,message:t.message,...t.data?{data:t.data}:{}},isError:!0}}function d(e){let t=e instanceof Error?e.message:String(e);return/Cannot find module ['"]?[^'"\s]*\/(dist|conformtools)\/[^'"\s]+\.js['"]? imported from/.test(t)||/Cannot find module ['"]?\.\//.test(t)&&/imported from/.test(t)?new n("internal","conformtools was updated on this machine while this session was running, and the running copy can't load its own files any more. Reconnect it (Claude Code: /mcp \u2192 conformtools \u2192 Reconnect; or restart the agent app), then try again."):/unknown session_id|not found on this machine|No such file|NotFound/i.test(t)?new n("not_found",t):/unsupported|not supported|no local decoder|cannot detect/i.test(t)?new n("unsupported",t):/before the file start|past the last frame|is before|required|unknown (operation|target|verb)/i.test(t)?new n("invalid_args",t):/could not read|failed to parse|engine read failed/i.test(t)?new n("unreadable",t):/refused|coverage|never shipped/i.test(t)?new n("refused",t):/abort|cancel/i.test(t)?new n("cancelled",t):new n("engine",t)}function g(e,t){let[o,...r]=t.content,s=`[conformtools ${e}]`,a=o?[{...o,text:`${s} ${o.text}`},...r]:[{type:"text",text:s}],i=t.structuredContent;return{...t,content:a,...i&&!("text"in i)?{structuredContent:{...i,text:a.map(c=>c.text).join(`
|
|
4
|
-
`)}}:{}}}function p(e){let{images:t,...o}=e;return t?.length?{...o,content:[...e.content,...t.map(r=>({type:"image",...r}))]}:o}export{n as a,u as b,l as c,f as d,g as e,p as f};
|
package/dist/chunk-MU5AGXSH.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{readFile as S,writeFile as H,appendFile as q,stat as W,readdir as G,mkdir as _,open as U,copyFile as Y,mkdtemp as K,rm as P,chmod as V,rename as B,cp as X,statfs as Z,realpath as Q}from"node:fs/promises";import{execFile as ee,spawn as j}from"node:child_process";import{createHash as te}from"node:crypto";import{createReadStream as re,chmodSync as ne,cpSync as oe,existsSync as E,statSync as M}from"node:fs";import{homedir as se,hostname as ie,tmpdir as ae,platform as ce,release as le,arch as ue,totalmem as de,availableParallelism as me}from"node:os";import{fileURLToPath as O}from"node:url";import fe from"node:http";import pe from"node:http2";import f from"node:process";import{setTimeout as ge}from"node:timers";import{Buffer as $}from"node:buffer";import{basename as ye,dirname as we,join as h,resolve as C,sep as v}from"node:path";import{createRequire as be}from"node:module";import{basename as Tt,dirname as Dt,extname as Et,join as Mt,relative as Ct,resolve as Nt}from"node:path";{let e=globalThis.fetch,t=typeof globalThis.Deno<"u";e&&!t&&(globalThis.fetch=(async(r,o)=>{let n=typeof r=="string"?r:r instanceof URL?r.href:r.url;if(n.startsWith("file:")){let s=await S(O(n)),i=n.endsWith(".wasm")?"application/wasm":"application/octet-stream";return new Response(s,{status:200,headers:{"content-type":i}})}return e(r,o)}))}var w=e=>f.env[e];function Ie(e,t){ge(e,t).unref()}var He=()=>Number(w("CONFORM_MEMORY_GB")??0)*2**30||de(),We=()=>me(),_e=()=>f.argv.slice(2),Be=e=>f.exit(e),he=()=>f.platform,je=()=>ie(),ze=()=>w("CONFORM_PYTHON")??(he()==="win32"?"python":"python3"),Le=()=>f.arch,z=()=>`${f.platform}-${f.arch}`;function Je(e){try{return h(we(be(import.meta.url).resolve(`${xe(z())}/package.json`)),e)}catch{return null}}var xe=e=>`conformtools-${e==="win32-x64"?"windows-x64":e}`,qe=e=>`${e} is not in this package for ${z()} (conform.tools builds it for darwin-arm64, darwin-x64, linux-x64 and win32-x64)`;function Ge(){let e=f.versions.deno,t=w("CONFORM_APP_VERSION"),r=e?`deno ${e}`:`node ${f.version}`;return{platform:`${ce()} ${le()} ${ue()}`,runtime:t&&/^[0-9A-Za-z.-]{1,32}$/.test(t)?`${r} app ${t}`:r}}var ve=()=>w("CONFORM_MCP_HOME")??h(A(),".conform-mcp"),A=()=>w("HOME")??se();function Ye(e){let t=e.trim();if(t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),/^file:\/\//i.test(t))try{t=O(t)}catch{}return t==="~"?t=A():(t.startsWith("~/")||t.startsWith("~\\"))&&(t=h(A(),t.slice(2))),t&&C(t)+(/[\\/]$/.test(t)&&!/[\\/]$/.test(C(t))?v:"")}async function Ke(e,t){let r=await import("node:sqlite").catch(()=>null);if(r?.DatabaseSync){let n=new r.DatabaseSync(e,{readOnly:!0});try{let s=n.prepare(t);return s.setReadBigInts(!0),s.all().map(i=>Object.fromEntries(Object.entries(i).map(([c,l])=>[c,typeof l=="bigint"?Number(l):l])))}finally{n.close()}}let o=await F("sqlite3",["-readonly","-json",e,t]);if(!o.success)throw new Error(`sqlite3 ${ye(e)}: ${o.stderr.trim()||o.stdout.trim()}`);return o.stdout.trim()?JSON.parse(o.stdout):[]}var Ve=(e,t)=>e?`${e.replace(/[\\/]+$/,"")}${e.includes("\\")&&!e.includes("/")?"\\":"/"}${t}`:t;function Xe(e){let t=O(e),r=t.indexOf(`${v}deno-compile-`);if(r<0||!E(t))return t;let o=t.slice(r+1).split(v).slice(1).join(v),n=h(ve(),"bin",o);try{let s=M(t),i=E(n)?M(n):null;return(!i||s.isFile()&&(i.size!==s.size||i.mtimeMs<s.mtimeMs))&&(oe(t,n,{recursive:!0,force:!0}),s.isFile()&&ne(n,493)),n}catch{return t}}var N=null;var x=e=>N?.owns(e)?N:null;async function I(e){let t=await W(e);return{isFile:t.isFile(),isDirectory:t.isDirectory(),size:t.size,mtimeMs:t.mtimeMs}}function R(e){return x(e)?.stat(e,()=>I(e))??I(e)}async function Ze(e){try{return await R(e),!0}catch{return!1}}async function Qe(e){try{return(await R(e)).isFile}catch{return!1}}async function et(e){try{return(await R(e)).isDirectory}catch{return!1}}async function tt(e){x(e)?.guard(e,"read whole file");let t=await S(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var rt=e=>S(e,"utf8"),nt=(e,t)=>H(e,t),ot=(e,t,r)=>r?.append?q(e,t):H(e,t);async function st(e){await _(e,{recursive:!0})}async function it(e,t={}){let r=Date.now()+(t.timeoutMs??5e3),o=t.staleMs??15e3;for(;;)try{await _(e);break}catch(n){if(n.code!=="EEXIST")throw n;try{if(Date.now()-(await R(e)).mtimeMs>o){await P(e,{recursive:!0,force:!0});continue}}catch{}if(Date.now()>r)break;await new Promise(s=>setTimeout(s,25))}return()=>P(e,{recursive:!0,force:!0}).catch(()=>{})}var at=e=>P(e,{force:!0}),ct=(e,t)=>V(e,t).catch(()=>{}),lt=(e,t)=>Y(e,t),ut=(e,t)=>B(e,t),dt=e=>P(e,{recursive:!0,force:!0}),mt=(e,t)=>X(e,t,{recursive:!0,verbatimSymlinks:!0});async function ft(e){try{let t=await Z(e);return Number(t.bavail)*Number(t.bsize)}catch{return null}}async function pt(e){try{return await Q(e)}catch{return null}}var gt=()=>f.ppid,yt=(e="conform-")=>K(h(ae(),e));async function*wt(e){let t=async()=>(await G(e,{withFileTypes:!0})).map(r=>({name:r.name,isFile:r.isFile(),isDirectory:r.isDirectory()}));yield*await(x(e)?.readDir(e,t)??t())}async function bt(e){x(e)?.guard(e,"read bytes");let t=await U(e,"r"),r=(await t.stat()).size;return{path:e,size:r,async readAt(o,n){let s=new Uint8Array(n),i=0;for(;i<n;){let{bytesRead:c}=await t.read(s,i,n-i,o+i);if(!c)break;i+=c}return i===n?s:s.subarray(0,i)},close:()=>t.close()}}async function ht(e){let t=await U(e,"w");return{async writeAt(r,o){let n=0;for(;n<o.length;){let{bytesWritten:s}=await t.write(o,n,o.length-n,r+n);n+=s}},truncate:r=>t.truncate(r),close:()=>t.close()}}var L=(e,t)=>{for(let r of t)x(r)?.guard(r,`${e.split(/[\\/]/).pop()} ${t[0]}`)};function F(e,t,r={}){return L(e,t),new Promise(o=>{ee(e,t,{maxBuffer:1<<30,env:r.env?{...f.env,...r.env}:void 0,timeout:r.timeoutMs},(n,s,i)=>{let c=n?.code??0;o({success:!n,code:c,stdout:String(s),stderr:String(i)})})})}var Pe="[Console]::OutputEncoding=[Text.Encoding]::UTF8;$t=@{};Get-Process|?{$_.MainWindowTitle}|%{$t[$_.Id]=$_.MainWindowTitle};ConvertTo-Json -Compress -InputObject @(Get-CimInstance Win32_Process|%{[pscustomobject]@{pid=[int]$_.ProcessId;exe=$_.ExecutablePath;cmd=$_.CommandLine;title=$t[[int]$_.ProcessId]}})";async function xt(){let e=await F("powershell.exe",["-NoProfile","-NonInteractive","-Command",Pe],{timeoutMs:3e4});return $e(e.stdout)}function $e(e){let t;try{t=JSON.parse(e.replace(/^/,"").trim()||"[]")}catch{return[]}return(Array.isArray(t)?t:[t]).flatMap(r=>{let o=r??{},n=Number(o.pid);return!Number.isInteger(n)||n<=0?[]:[{pid:n,args:String(o.cmd||o.exe||""),title:typeof o.title=="string"?o.title:""}]})}function vt(e,t,r,o={}){return L(e,t),new Promise((n,s)=>{let i=j(e,t,{env:o.env?{...f.env,...o.env}:void 0,stdio:["ignore","pipe","pipe"]}),c="";i.stdout.on("data",l=>r(l)),i.stderr.on("data",l=>{c+=new TextDecoder().decode(l)}),i.on("error",s),i.on("close",l=>n({code:l,stderr:c})),o.signal?.addEventListener("abort",()=>i.kill(),{once:!0})})}function Pt(e,t,r,o,n={}){let s=j(e,t,{stdio:["pipe","pipe","pipe"],env:n.env?{...f.env,...n.env}:void 0});s.stdin.on("error",()=>{}),s.stdout.on("data",a=>r(a)),s.stderr.on("data",a=>o?.(new TextDecoder().decode(a)));let i=new Promise(a=>{s.on("close",u=>a(u)),s.on("error",()=>a(null))}),c=[s,s.stdout,s.stderr,s.stdin],l=a=>{for(let u of c)(a?u.ref:u.unref)?.call(u)};return l(!1),{write:a=>new Promise((u,p)=>{s.stdin.write(a,m=>m?p(m):u())}),hold:l,close:()=>{try{s.stdin.end(),s.kill()}catch{}},exited:i}}async function $t(e){if(w("CONFORM_NO_BROWSER"))return!1;let[t,r]=f.platform==="darwin"?["open",[e]]:f.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];return(await F(t,r)).success}function Rt(e,t){let r=fe.createServer(async(o,n)=>{try{let s=[];if(o.method!=="GET"&&o.method!=="HEAD")for await(let p of o)s.push(p);let i=s.length>0,c=new Headers;for(let[p,m]of Object.entries(o.headers))m!=null&&c.set(p,Array.isArray(m)?m.join(", "):m);let l=`http://${o.headers.host??`${e.hostname}:${e.port}`}${o.url??"/"}`,a=new AbortController;n.on("close",()=>{n.writableEnded||a.abort()});let u=await t(new Request(l,{method:o.method,headers:c,body:i?$.concat(s):void 0,signal:a.signal}));if(n.statusCode=u.status,u.headers.forEach((p,m)=>n.setHeader(m,p)),u.body&&u.headers.get("content-type")?.startsWith("text/event-stream")){n.flushHeaders();let p=u.body.getReader();for(a.signal.addEventListener("abort",()=>void p.cancel(),{once:!0});;){let{value:m,done:g}=await p.read();if(g)break;n.write(m)}n.end();return}n.end($.from(await u.arrayBuffer()))}catch(s){n.statusCode=500,n.end(JSON.stringify({ok:!1,code:"internal",message:s instanceof Error?s.message:String(s)}))}});return r.listen(e.port,e.hostname,()=>{let o=r.address();e.onListen?.(typeof o=="object"&&o?o.port:e.port)}),{close:()=>r.close()}}var y=class extends Error{constructor(r,o,n){super(o);this.code=r;this.grpcStatus=n}};function kt(e,t,r,o,n){return new Promise((s,i)=>{let c=pe.connect(`http://${e}:${t}`),l=!1,a=(d,J)=>{l||(l=!0,clearTimeout(p),c.destroy(),d?i(d):s(J))},u=!1;c.on("connect",()=>{u=!0});let p=setTimeout(()=>a(u?new y("deadline",`no answer from ${e}:${t} in ${n} ms`):new y("unavailable",`${e}:${t}: no connection in ${n} ms`)),n);c.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`)));let m=$.alloc(5+o.length);m.writeUInt32BE(o.length,1),m.set(o,5);let g=c.request({":method":"POST",":path":r,"content-type":"application/grpc",te:"trailers"}),T=[],b,k="",D=d=>{d["grpc-status"]!=null&&(b=String(d["grpc-status"]),k=decodeURIComponent(String(d["grpc-message"]??"")))};g.on("response",D),g.on("trailers",D),g.on("data",d=>T.push(d)),g.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`))),g.on("end",()=>{if(b!=="0")return a(new y("grpc",`grpc-status ${b??"missing"}${k?`: ${k}`:""}`,b==null?void 0:Number(b)));let d=$.concat(T);if(d.length<5||d[0]!==0)return a(new y("grpc","reply is not one uncompressed gRPC message"));a(null,new Uint8Array(d.subarray(5,5+d.readUInt32BE(1))))}),g.end(m)})}async function At(e){let t=te("sha256");for await(let r of re(e))t.update(r);return t.digest("hex")}async function St(e,t,r){let o=`${t}.part`;for(let n=0;;n++){let s=0;try{s=(await W(o)).size}catch{}try{let i=await fetch(e,{headers:s?{Range:`bytes=${s}-`}:{}});if(i.status===416)break;if(!i.ok||!i.body)throw new Error(`${e} answered ${i.status}`);s&&i.status!==206&&(s=0);let c=s+Number(i.headers.get("content-length")??0),l=await U(o,s?"a":"w");try{let a=s;for await(let u of i.body)await l.write(u),a+=u.length,r?.(a,c)}finally{await l.close()}break}catch(i){if(n>=4)throw i;await new Promise(c=>setTimeout(c,2e3*(n+1)))}}await B(o,t)}function Ut(e){let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)}export{O as a,w as b,Ie as c,He as d,We as e,_e as f,Be as g,he as h,je as i,ze as j,Le as k,Je as l,qe as m,Ge as n,ve as o,A as p,Ye as q,Ke as r,Ve as s,Xe as t,R as u,Ze as v,Qe as w,et as x,tt as y,rt as z,nt as A,ot as B,st as C,it as D,at as E,ct as F,lt as G,ut as H,dt as I,mt as J,ft as K,pt as L,gt as M,yt as N,wt as O,bt as P,ht as Q,F as R,xt as S,vt as T,Pt as U,$t as V,Rt as W,y as X,kt as Y,At as Z,St as _,Ut as $,Tt as aa,Dt as ba,Et as ca,Mt as da,Ct as ea,Nt as fa};
|
package/dist/chunk-QJPOC4SW.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{b as o}from"./chunk-MU5AGXSH.js";var i="0.6.21";function a(t,n){let r=t.split("-")[0].split(".").map(Number),s=n.split("-")[0].split(".").map(Number);for(let e=0;e<Math.max(r.length,s.length);e++){let l=(r[e]||0)-(s[e]||0);if(l)return l>0}return!1}var p=null;function u(){return o("CONFORM_UPDATE_CHECK")==="off"?Promise.resolve(null):p??=fetch("https://registry.npmjs.org/conformtools/latest",{signal:AbortSignal.timeout(2e3)}).then(t=>t.ok?t.json():null).then(t=>typeof t?.version=="string"?t.version:null).catch(()=>null)}var c="run npx -y conformtools@latest setup claude (or setup codex) once: it registers the server so every new session runs the newest version (npx --prefer-online), then restart the MCP client; if an old global install is shadowing it: npm rm -g conformtools";async function m(){let t=o("CONFORM_APP_VERSION");if(t)return`conform.tools app ${t}`;let n=await u();return`conformtools ${i}`+(n&&a(n,i)?` \u2014 update available: ${n} \u2192 ${c}`:"")}export{i as a,a as b,u as c,c as d,m as e};
|
package/dist/chunk-VG73BE6N.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{c as u,d as y,g as w,h}from"./chunk-BUOYYO22.js";import{d as f,i as p}from"./chunk-2XQ42O7E.js";import{a}from"./chunk-COALWMI7.js";import{b as g}from"./chunk-MU5AGXSH.js";u(!0);var b={aaf:"aaf",avb:"avb",prproj:"prproj",drt:"resolve-drt",otio:"otio",capcut:"capcut",flame:"flame-archive",fcpxml:"resolve-fcpxml",xmeml:"fcp-xml",blscene:"baselight-blscene"},R=Object.keys(b),v=new Set([502,503,504,529,546]),d=(e,o)=>`${f().supabaseUrl}/functions/v1/${e}${o}`;async function m(){let e=await p();if(!e&&g("CONFORM_ANONYMOUS_READ")==="1")return f().anonKey;if(!e)throw new a("not_signed_in","reading and writing timelines runs on conform.tools \u2014 sign in first (account_login)");return e}async function S(e,o){let t;for(let n=0;n<3;n++){try{let i=await fetch(e,o);if(!v.has(i.status)||n===2)return i;t=new Error(`status ${i.status}`)}catch(i){if(t=i,n===2)break}await new Promise(i=>setTimeout(i,1500*(n+1)))}throw new a("offline",`conform.tools is unreachable (${t instanceof Error?t.message:String(t)}) \u2014 reading and writing timelines need the network`)}async function _(e,o){let n=(await e.json().catch(()=>({})))?.error?.message??`${o} failed (${e.status})`;throw e.status===401?new a("not_signed_in",`${n} \u2014 sign in again (account_login)`):e.status===402||e.status===403?new a("not_entitled",n):new a(e.status>=500?"engine":"refused",n)}async function P(e,o){let t=b[e];if(!t)throw new a("unsupported",`'${e}' timelines are not read by conform.tools yet`);let{fmt:n,extract:i}=await y(o,t),c=JSON.stringify({format:n,source_filename:o.name,persist:!1})+`
|
|
4
|
-
`+(typeof i=="string"?i:JSON.stringify(i)),s=await S(d("v1-timeline-canonicalize","/v1/timeline-canonicalize"),{method:"POST",headers:{"content-type":"application/x-ct-canonicalize-v1",authorization:`Bearer ${await m()}`,apikey:f().anonKey},body:c});s.ok||await _(s,"read");let l=await s.json();return JSON.stringify(l.session)}async function N(e,o){let t=await S(d("v1-write","/v1/write"),{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${await m()}`,apikey:f().anonKey,"x-engine-accept-delivery":"cdn"},body:JSON.stringify({target_format:e,session:o})});t.ok||await _(t,"write");let n=h(t.headers.get(w))??[];if(t.headers.get("x-engine-delivery")==="cdn"){let r=await t.json(),c=await fetch(r.download_url);if(!c.ok)throw new a("engine",`download failed (${c.status})`);let s=new Uint8Array(await c.arrayBuffer());if(s.byteLength!==r.size)throw new a("engine",`download incomplete: ${s.byteLength} of ${r.size} bytes`);return{body:s,contentType:r.content_type,filenameSuggestion:r.filename,issues:n,serverSession:r.session_id??void 0}}let i=t.headers.get("content-disposition")?.match(/filename="([^"]+)"/)?.[1];return{body:new Uint8Array(await t.arrayBuffer()),contentType:t.headers.get("content-type")??"application/octet-stream",filenameSuggestion:i??`timeline.${e}`,issues:n,serverSession:t.headers.get("x-session-id")??void 0}}async function j(e,o,t){try{let n={"content-type":"application/json",authorization:`Bearer ${await m()}`,apikey:f().anonKey},i=k=>d("v1-sessions",`/v1/sessions/${encodeURIComponent(e)}/original${k}`),r=await fetch(i(""),{method:"POST",headers:n,body:JSON.stringify({filename:o,content_type:"application/octet-stream"})});if(!r.ok)return!1;let{key:c,upload:s}=await r.json();return(await fetch(s.url,{method:s.method??"PUT",headers:s.headers??{"content-type":"application/octet-stream"},body:t})).ok?(await fetch(i("/complete"),{method:"POST",headers:n,body:JSON.stringify({key:c})})).ok:!1}catch{return!1}}export{R as a,P as b,N as c,j as d};
|
package/dist/chunk-ZAL7Y5VZ.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{B as S,C as x,G as y,a as h,da as c,o as w,p as g,v as u,z as C}from"./chunk-MU5AGXSH.js";var I=new Set(["ffmpeg","ffprobe","ffplay","sox","soxi","mediainfo","exiftool","mkvmerge","mkvextract","mp4box","bmxtranswrap","raw2rgb","redline","art-cmd","oiiotool","iconvert","idiff","asdcp-wrap","asdcp-unwrap","asdcp-info","opendcp","dcp_inspect","handbrakecli","gst-launch-1.0","mencoder","mplayer","sips","afconvert","avconvert","qtfaststart","mediaconch","bwfmetaedit","x264","x265","aomenc","svtav1encapp","otiotool","otioconvert","otioview","cineform","ale2csv"]),N=["mov","mp4","m4v","mxf","mkv","avi","webm","mts","m2ts","mpg","mpeg","r3d","braw","ari","arx","crm","dng","dpx","exr","wav","aif","aiff","bwf","flac","mp3","aac","m4a","caf"],L=["aaf","avb","edl","drt","otio","fcpxml","fcpxmld","prproj","ptx","ale","xml","csv"],J=new Set(["xml","csv","png","jpg","jpeg","tif","tiff"]),M=new Set([...N,...L,...J]);var m="conformtools-hook",d=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{},k=o=>!!o&&typeof o=="object"&&typeof o.command=="string"&&o.command.includes(m),A=[["PostToolUse","Bash"],["UserPromptSubmit",null]];function U(o,e,t,n){let r=Array.isArray(o[e])?[...o[e]]:[],s=(i,a)=>({...i,...t?{matcher:t}:{},hooks:a});for(let i=0;i<r.length;i++){let a=d(r[i]),l=Array.isArray(a.hooks)?a.hooks:[],f=l.findIndex(k);if(f<0)continue;if(JSON.stringify(l[f])===JSON.stringify(n)&&(!t||a.matcher===t))return"kept";let H=[...l];return H[f]=n,r[i]=s(a,H),o[e]=r,"updated"}return o[e]=[...r,s({},[n])],"installed"}function $(o,e,t={}){let n={...d(o.hooks)},r=A.map(([s,i])=>U(n,s,i,{type:"command",command:e,timeout:10,...t.async&&i?{async:!0}:{}}));return r.every(s=>s==="kept")?{settings:o,result:"kept"}:{settings:{...o,hooks:n},result:r.every(s=>s==="installed")?"installed":"updated"}}function E(o){let e={...d(o.hooks)},t=!1;for(let[r]of A){if(!Array.isArray(e[r]))continue;let s=e[r].map(i=>{let a=d(i);if(!Array.isArray(a.hooks))return i;let l=a.hooks.filter(f=>!k(f));return l.length!==a.hooks.length&&(t=!0),l.length?{...a,hooks:l}:null}).filter(i=>i!==null);s.length?e[r]=s:delete e[r]}if(!t)return{settings:o,removed:!1};let n={...o};return Object.keys(e).length?n.hooks=e:delete n.hooks,{settings:n,removed:!0}}function _(o,e,t){let n=d(o.hooks),r=Array.isArray(n.afterShellExecution)?[...n.afterShellExecution]:[],s={command:e,timeout:10,matcher:t},i=r.findIndex(k);return i>=0&&JSON.stringify(r[i])===JSON.stringify(s)?{settings:o,result:"kept"}:(i>=0?r[i]=s:r.push(s),{settings:{version:1,...o,hooks:{...n,afterShellExecution:r}},result:i>=0?"updated":"installed"})}function j(o){let e=d(o.hooks);if(!Array.isArray(e.afterShellExecution))return{settings:o,removed:!1};let t=e.afterShellExecution.filter(s=>!k(s));if(t.length===e.afterShellExecution.length)return{settings:o,removed:!1};let n={...e};t.length?n.afterShellExecution=t:delete n.afterShellExecution;let r={...o};return Object.keys(n).length?r.hooks=n:delete r.hooks,{settings:r,removed:!0}}function O(){return`\\b(${[...I].map(e=>e.replace(/[.+-]/g,"\\$&")).join("|")})\\b|\\.(${[...M].join("|")})\\b`}function B(o){let e=(o??"").toLowerCase();return e?e.includes("claude-code")||e.includes("claude code")?"claude":e.includes("codex")?"codex":e.includes("cursor")?"cursor":null:null}var z=["claude","codex","cursor"],p=()=>({claude:c(g(),".claude","settings.json"),codex:c(g(),".codex","hooks.json"),cursor:c(g(),".cursor","hooks.json")});async function D(){let o=new URL(import.meta.url),e=h(new URL("./hook.js",o));if(await u(e)){await x(w());let n=c(w(),`${m}.js`);return await y(e,n),`node "${n}"`}let t=h(new URL("../adapters/hook.ts",o));return await u(t)?`deno run --allow-read --allow-write --allow-env --no-check --unstable-sloppy-imports "${t}" ${m}`:null}async function v(o){if(!await u(o))return{};let e=await C(o);try{return e.trim()?JSON.parse(e):{}}catch{return"invalid"}}async function P(o,e){let t;return await u(o)?(t=`${o}.conformtools-backup`,await y(o,t)):await x(c(o,"..")),await S(o,JSON.stringify(e,null,2)+`
|
|
4
|
-
`),t}async function F(o,e={}){let t=e.file??p()[o];try{let n=e.command??await D();if(!n)return{client:o,file:t,result:"skipped",detail:"no hook script beside this build"};let r=await v(t);if(r==="invalid")return{client:o,file:t,result:"failed",detail:`${t} is not valid JSON; nothing was changed`};let s=o==="cursor"?_(r,n,O()):$(r,n,{async:o==="codex"});if(s.result==="kept")return{client:o,file:t,result:"kept"};let i=await P(t,s.settings);return{client:o,file:t,result:s.result,backup:i}}catch(n){return{client:o,file:t,result:"failed",detail:n instanceof Error?n.message:String(n)}}}async function K(o,e={}){let t=e.file??p()[o],n=await v(t);if(n==="invalid")return{client:o,file:t,removed:!1};let r=o==="cursor"?j(n):E(n);if(!r.removed)return{client:o,file:t,removed:!1};let s=await P(t,r.settings);return{client:o,file:t,removed:!0,backup:s}}async function R(){let o=p(),e=[];for(let t of z)await u(c(o[t],".."))&&e.push(t);return e}var G=async()=>Promise.all((await R()).map(o=>F(o))),V=async()=>Promise.all((await R()).map(o=>K(o)));async function X(o,e=p()[o]){let t=await v(e);return t!=="invalid"&&JSON.stringify(t).includes(m)}var b={claude:"Claude Code",codex:"Codex",cursor:"Cursor"},T="which other programs the agent ran on media or timeline files (program names and file extensions only; never a command, a path, a name, a prompt or an output), and on each message you send it reminds the agent to log your request with every name and path taken out (the hook itself sends nothing of the message)";function Q(o){return o.length?o.map(e=>{let t=b[e.client],n={installed:`${t}: agent hook installed in ${e.file}${e.backup?` (backup: ${e.backup})`:""}`,updated:`${t}: agent hook refreshed in ${e.file}`,kept:`${t}: agent hook already in ${e.file}`,skipped:`${t}: agent hook not installed (${e.detail})`,failed:`${t}: agent hook not installed: ${e.detail}`}[e.result];return e.client==="codex"&&(e.result==="installed"||e.result==="updated")?`${n}; Codex asks you to trust it once (/hooks)`:n}).concat(`It records ${T}. conformtools hooks off removes it; conformtools telemetry off removes it with the rest.`).join(`
|
|
5
|
-
`):"Agent hook: no Claude Code, Codex or Cursor folder on this machine; nothing to install."}function Y(o){let e=o.filter(t=>t.removed);return e.length?e.map(t=>`${b[t.client]}: agent hook removed from ${t.file}`).join(`
|
|
6
|
-
`):"Agent hook: not installed anywhere on this machine."}async function oo(){let o=await R();return o.length?[...await Promise.all(o.map(async t=>`${b[t]}: agent hook ${await X(t)?"on":"off"} (${p()[t]})`)),`It records ${T}. conformtools hooks on|off.`].join(`
|
|
7
|
-
`):"Agent hook: no Claude Code, Codex or Cursor folder on this machine."}export{B as a,z as b,p as c,D as d,F as e,K as f,R as g,G as h,V as i,X as j,T as k,Q as l,Y as m,oo as n};
|
package/dist/framing-GOLRVBBJ.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{jc as a,kc as b,lc as c,mc as d,nc as e,oc as f,pc as g,qc as h,rc as i,sc as j,tc as k,uc as l,vc as m,wc as n,xc as o}from"./chunk-AY72AUHE.js";import"./chunk-IN6XVTUS.js";import"./chunk-5XJVAA6N.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-QJPOC4SW.js";import"./chunk-Z42CP7YT.js";import"./chunk-PENDVYIL.js";import"./chunk-2WD3MDPB.js";import"./chunk-OR6IMPAS.js";import"./chunk-JCNKPRYY.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-I6WBZBGN.js";import"./chunk-WW6XAQKM.js";import"./chunk-CXOK4SF6.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-VG73BE6N.js";import"./chunk-BUOYYO22.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-LKX3HCRN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{k as ASPECTS,a as INPUT_SCALING,g as SIZING_TARGETS,j as alignText,i as alignTimeline,l as aspectOf,m as blankingForAspect,n as blankingQc,o as blankingText,f as cropUnderRef,c as inputFitRatio,h as offlineLane,d as resolveProps,b as scalingOf,e as underRef};
|
package/dist/hosted-ASNIPMSH.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d}from"./chunk-VG73BE6N.js";import"./chunk-BUOYYO22.js";import"./chunk-C2ESM27Z.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as HOSTED_READ_KEYS,b as readHosted,d as shareOriginal,c as writeHosted};
|
package/dist/hosts-EYVK23A3.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{g as a,h as b,i as c,j as d}from"./chunk-XAUMTGJZ.js";import"./chunk-X7C4YS2J.js";import"./chunk-AY72AUHE.js";import"./chunk-IN6XVTUS.js";import"./chunk-5XJVAA6N.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-P6MSAFNR.js";import"./chunk-QJPOC4SW.js";import"./chunk-Z42CP7YT.js";import"./chunk-PENDVYIL.js";import"./chunk-2WD3MDPB.js";import"./chunk-OR6IMPAS.js";import"./chunk-JCNKPRYY.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-I6WBZBGN.js";import"./chunk-WW6XAQKM.js";import"./chunk-CXOK4SF6.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-VG73BE6N.js";import"./chunk-BUOYYO22.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-LKX3HCRN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as AVID_SETUP,b as FLAME_SETUP,d as adapter,c as setAdapter};
|
package/dist/isobmff-IMEN2G3B.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as U}from"./chunk-TK55FA56.js";import{a as J,b as T}from"./chunk-AACY2V3L.js";import{b as p,c as N,g as O}from"./chunk-I6WBZBGN.js";import{b as L}from"./chunk-WW6XAQKM.js";import{b as V,c as _}from"./chunk-CXOK4SF6.js";import{$ as f,A as P,B as x,C as F,D as A,Da as I,Ga as C,Ha as d,N as D,O as z,ha as E,k as w,m as v,n as y,p as R,qa as k,ta as H,x as S,y as M}from"./chunk-LKX3HCRN.js";import"./chunk-PSANHDZM.js";function m(e){return(t,n)=>e.read(t,n)}function $(e){let t=e.toLowerCase().trim();return t==="aprn"||t==="aprh"?"prores_raw":t==="apch"||t==="apcn"||t==="apcs"||t==="apco"||t==="ap4h"||t==="ap4x"?"prores":t==="avdn"?"dnxhd":t==="dnxh"?"dnxhr":t==="avc1"||t==="avc3"?"h264":t==="hev1"||t==="hvc1"?"h265":t==="braw"?"braw":e}var h={apco:"Proxy",apcs:"LT",apcn:"422",apch:"HQ",ap4h:"4444",ap4x:"4444 XQ"},Z={1:"bt709",2:"unknown",4:"bt470m",5:"bt470bg",6:"smpte170m",7:"smpte240m",8:"film",9:"bt2020",10:"smpte428",11:"smpte431",12:"smpte432",22:"jedec-p22"},ee={1:"bt709",2:"unknown",4:"gamma22",5:"gamma28",6:"smpte170m",7:"smpte240m",8:"linear",9:"log100",10:"log316",11:"iec61966-2-4",12:"bt1361e",13:"iec61966-2-1",14:"bt2020-10",15:"bt2020-12",16:"smpte2084",17:"smpte428",18:"arib-std-b67"},re={0:"gbr",1:"bt709",2:"unknown",4:"fcc",5:"bt470bg",6:"smpte170m",7:"smpte240m",8:"ycgco",9:"bt2020nc",10:"bt2020c",14:"ictcp"};function te(e,t){return e==="ap4h"||e==="ap4x"?t===32?"yuva444p12le":"yuv444p12le":e in h?"yuv422p10le":void 0}var B={66:"Baseline",77:"Main",88:"Extended",100:"High",110:"High 10",122:"High 4:2:2",244:"High 4:4:4"},Q={1:"Main",2:"Main 10",3:"Main Still",4:"Rext"},ne={1270:"DNxHR 444",1271:"DNxHR HQX",1272:"DNxHR HQ",1273:"DNxHR SQ",1274:"DNxHR LB"};function oe(e,t){if(h[e.codec_fourcc])return`ProRes ${h[e.codec_fourcc]}`;if(e.vc3_cid)return ne[e.vc3_cid]??`DNxHD ${e.vc3_cid}`;if(e.video_profile!=null){if(t==="h264"&&B[e.video_profile])return`H.264 ${B[e.video_profile]}`;if(t==="h265"&&Q[e.video_profile])return`HEVC ${Q[e.video_profile]}`}}function ie(e,t){let n=e.video_chroma,r=e.video_bit_depth;if(n==null&&t==="h264"&&[66,77,88].includes(e.video_profile??-1)&&([n,r]=[1,8]),n==null&&e.vc3_cid&&(n=e.vc3_cid===1270||e.vc3_cid===1256?3:2),n==null||r==null)return;let i=["gray","yuv420p","yuv422p","yuv444p"][n];return r>8?`${i}${r}le`:i}function j(e,t){let n=[];for(let r of e){if(r.kind!=="clip"||!r.source_range)continue;let i=r.source_range.start.value,o=r.source_range.duration.value,c=Math.max(0,Math.floor(i)-t),a=Math.floor(i+o-1)+t;a>=c&&n.push({first_frame:c,last_frame:a})}return n}var be={async inspect(e){await d();let t=e.parts[0],n=await f(m(t),t.fileSize,e.format),r=JSON.parse(n);if(!r)return null;let i=r.timecode&&r.timecode.fps_denominator>0?r.timecode.fps_numerator/r.timecode.fps_denominator:null,o=$(r.codec_fourcc),c=[{kind:"video",codec:o,width:r.width??void 0,height:r.height??void 0,rate:i??void 0,bit_depth:p(r.codec_fourcc)??p(o)??N(o,r.video_profile)??r.video_bit_depth??void 0,codec_specific:{fourcc:r.codec_fourcc,profile:oe(r,o),pixel_format:te(r.codec_fourcc,r.video_depth)??ie(r,o),colr:r.colr?{primaries:Z[r.colr.primaries]??r.colr.primaries,transfer:ee[r.colr.transfer]??r.colr.transfer,matrix:re[r.colr.matrix]??r.colr.matrix}:void 0}}];for(let a of r.audio_tracks??(r.audio?[r.audio]:[]))c.push({kind:"audio",codec:a.codec_fourcc,channels:a.channels??void 0,rate:a.sample_rate??void 0,bit_depth:a.bit_depth??void 0,codec_specific:{fourcc:a.codec_fourcc,channel_layout:a.channel_layout??void 0}});return{id:t.filename,kind:"external",target_url:t.filename,available_range:i&&r.duration_seconds?{start:{value:0,rate:i},duration:{value:Math.round(r.duration_seconds*i),rate:i}}:null,reel_name:null,source_timecode:r.timecode?.display??null,container:e.format==="mov"?"mov":e.format,codec:o,size_bytes:t.fileSize,source_fps:i,source_resolution_w:r.width??null,source_resolution_h:r.height??null,source_pixel_aspect:r.par?r.par[0]/r.par[1]:null,streams:c,decode_provenance:r.decode_provenance??null,vendor_metadata:r.timecode?{drop_frame:r.timecode.drop_frame}:{},binding_state:"unbound",raw_extraction:{mov_probe:r},metadata:{}}},async extract(e){await d();let t=e.parts[0],n=JSON.parse(await E(m(t),t.fileSize,e.format));if(n.length===0)return null;let r=JSON.parse(await f(m(t),t.fileSize,e.format)),i=r?$(r.codec_fourcc):e.format,o=r?.timecode&&r.timecode.fps_denominator>0?r.timecode.fps_numerator/r.timecode.fps_denominator:void 0;return{v:1,container:e.format==="mov"?"mov":e.format,codec:i,width:r?.width??void 0,height:r?.height??void 0,fps:o,frame_count:J(n),timecode:r?.timecode?.display??void 0,granularity:T(n),segments:n}},async sparsify(e,t){await d();let n=e.parts[0],r=j(t.items,t.handles),i=await H(m(n),n.fileSize,JSON.stringify(r),e.format),o=JSON.parse(i);return[{filename:n.filename,fileSize:o.fileSize,structuralRanges:o.structuralRanges,essenceRanges:o.essenceRanges,trimInputs:o.trimInputs}]},async trim(e,t){await d();let n=e.parts[0],r=j(t.items,0);if(r.length===0)throw new Error("isobmff trim: no usable trim ranges in items");let i=await L(r,t.handles,(o,c)=>k(m(n),n.fileSize,o,c,e.format));return i.map((o,c)=>{let a=JSON.parse(o);return i.length>1&&(a.output_clip_number=c+1,a.output_clip_count=i.length,a.output_part_number=1),a})},async decode(e,t,n){await d();let r=n.detail==="coarse",i=e.parts[0];if(e.format==="crm"){let l=await R(m(i),i.fileSize,t,r?"preview":"full");return s(l)}let o=await K(e);if(t<0||t>=o.length)throw new _(t,o.length);let c=o[t],a=await i.read(c.offset,c.size);if(e.format==="braw")return s(r?v(a,0):y(a));if(b(a)){let l=await X(e);return s(l?u.decode_prores_raw_tier(a,r?"preview":"full",l):r?P(a,0):x(a))}if(G(a))return s(r?D(a,0):z(a));if(r)return s(S(a,0));let g=await ae(a);return g||s(A(a))},async decode16(e,t){await d();let n=e.parts[0];if(e.format==="crm")throw new Error("crm: no 16-bit decoder");let r=await K(e);if(t<0||t>=r.length)throw new _(t,r.length);let i=r[t],o=await n.read(i.offset,i.size),c=b(o)?await X(e):null,a=e.format==="braw"?w(o):b(o)?c?u.decode_prores_raw_tier(o,"rgb16",c):M(o):G(o)?(()=>{throw new Error("vc3: no 16-bit decoder")})():F(o);return V(a)}};async function ae(e){if(!!0)return null;try{let t=await import("./prores-CFX64NME.js");if(!await t.proresGpuAvailable())return null;let n=await t.decodeProResRgbaGpu(e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function G(e){return e.length>=4&&e[0]===0&&e[1]===0&&e[2]===2&&e[3]===128}function b(e){return e.length>=8&&e[4]===112&&e[5]===114&&e[6]===114&&e[7]===102}function s(e){let t=new DataView(e.buffer,e.byteOffset,8);return{width:t.getUint32(0,!0),height:t.getUint32(4,!0),rgba:e.slice(8)}}var u=C,W=new WeakMap;function X(e){let t=W.get(e);if(!t){let n=e.parts[0];t=u.prores_raw_container_color&&u.decode_prores_raw_tier?U({fileSize:n.fileSize,read:n.read}).then(r=>{let i=u.prores_raw_container_color(r);return i.length?i:null}):Promise.resolve(null),W.set(e,t)}return t}var q=new WeakMap;async function K(e){let t=q.get(e);if(!t){let n=e.parts[0],r=O(await I(m(n),n.fileSize,e.format));if(!r.w||!r.h)throw new Error("could not find a video sample table");t=r.offs,q.set(e,t)}return t}export{be as isobmffFormat};
|
package/dist/mxf-ZEM6EEZU.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as N}from"./chunk-AACY2V3L.js";import{b as $}from"./chunk-WW6XAQKM.js";import{b as J}from"./chunk-CXOK4SF6.js";import{Ha as l,M,R as P,b as U,ca as D,da as T,e as B,ea as C,fa as E,g as S,ga as L,ia as O,ra as V,ua as W,w as k,wa as G}from"./chunk-LKX3HCRN.js";import"./chunk-PSANHDZM.js";var z=new Uint8Array([6,14,43,52,2,5,1,1,13,1,2,1,1,17,1,0]);function oe(t){e:for(let r=t.length-z.length;r>=0;r--){for(let e=0;e<z.length;e++)if(t[r+e]!==z[e])continue e;return r}return-1}function j(t,r){if(r>=t.byteLength)return[null,0];let e=t.getUint8(r);if(e<128)return[e,1];let n=e&127;if(n===0||n>8||r+1+n>t.byteLength)return[null,1];let a=0;for(let i=0;i<n;i++)a=a*256+t.getUint8(r+1+i);return[a,1+n]}function b(t,r){let e=t.getUint32(r,!1),n=t.getUint32(r+4,!1);return e*4294967296+n}async function Z(t){let r=t.fileSize,e=[];if(r<1024)return e;let a=Math.max(0,r-65536),i=r-a,o=await t.read(a,i);e.push({offset:a,length:i});let s=oe(o);if(s<0)return e;let c=new DataView(o.buffer,o.byteOffset,o.byteLength),[f,re]=j(c,s+16);if(f===null||f<16||f>65536)return e;let F=s+16+re;if(F+f>o.length)return e;let A=[],te=new DataView(o.buffer,o.byteOffset+F,f),g=Math.floor((f-4)/12);if(g<1||g>4096)return e;for(let u=0;u<g;u++){let d=b(te,u*12+4);d>=0&&d<r&&A.push(d)}for(let u of A){let d=Math.min(256,r-u),p=await t.read(u,d);if(p.length<80)continue;let _=new DataView(p.buffer,p.byteOffset,p.byteLength),[R,v]=j(_,16);if(R===null)continue;let m=16+v,y,x;if(p.length<m+64){let ie=Math.min(m+64,r-u),h=await t.read(u,ie);if(h.length<m+64)continue;let I=new DataView(h.buffer,h.byteOffset,h.byteLength);y=b(I,m+32),x=b(I,m+40)}else y=b(_,m+32),x=b(_,m+40);let ne=u+16+v+R+y+x,ae=Math.min(ne+65536,r)-u;e.push({offset:u,length:ae})}return e}function H(t,r){let e=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let a=n.source_range.start.value,i=n.source_range.duration.value,o=Math.max(0,Math.floor(a)-r),s=Math.floor(a+i-1)+r;s>=o&&e.push({first_frame:o,last_frame:s})}return e}function se(t,r){let e=[...t].sort((i,o)=>i.offset-o.offset),n=[],a=0;for(let i of e)i.offset>a&&n.push({offset:a,length:i.offset-a}),a=Math.max(a,i.offset+i.length);return a<r&&n.push({offset:a,length:r-a}),n}async function q(t,r,e){let n=H(r,0);if(n.length===0)throw new Error("planMxfTrimsFromItems: no usable trim ranges in items");await l();let a=(o,s)=>t.read(o,s),i=await $(n,e,(o,s)=>V(a,t.fileSize,o,s));return i.map((o,s)=>{let c=JSON.parse(o);return i.length>1&&(c.output_clip_number=s+1,c.output_clip_count=i.length,c.output_part_number=1),c})}async function K(t,r,e){await l();let n=H(r,e),i=await W((s,c)=>t.read(s,c),t.fileSize,JSON.stringify(n));if(i!=="null")return JSON.parse(i);console.warn(`[mxf] no parseable index \u2014 shipping the WHOLE file (${t.fileSize} bytes). The cut's ${n.length} range(s) cannot be addressed; nothing is trimmed.`);let o=(await Z(t)).map(s=>({offset:s.offset,length:s.length}));return{fileSize:t.fileSize,structuralRanges:o,essenceRanges:se(o,t.fileSize),trimInputs:n,wholeFileFallback:!0}}async function Q(t){await l();let e=await G((n,a)=>t.read(n,a),t.fileSize);return JSON.parse(e)}function w(t){return(r,e)=>t.read(r,e)}var Me={async inspect(t){let r=t.parts[0],e=await Q(r);if(!e)return null;let n=e.timecode??null,a=n&&n.fps_denominator>0?n.fps_numerator/n.fps_denominator:null,i=e.width??null,o=e.height??null,s=e.inner_codec==="mpeg2"||e.inner_codec==="dv"?e.inner_codec:null;return{id:r.filename,kind:"external",target_url:r.filename,available_range:a&&e.frame_count?{start:{value:0,rate:a},duration:{value:e.frame_count,rate:a}}:null,reel_name:null,source_timecode:n?.display??null,source_fps:a,source_resolution_w:i,source_resolution_h:o,container:"mxf",codec:s,size_bytes:r.fileSize,streams:[...i||o||a?[{kind:"video",codec:s,width:i??void 0,height:o??void 0,rate:a??void 0,codec_specific:null}]:[],...e.audio?[{kind:"audio",codec:e.audio.codec_fourcc,channels:e.audio.channels??void 0,rate:e.audio.sample_rate??void 0,bit_depth:e.audio.bit_depth??void 0,codec_specific:{fourcc:e.audio.codec_fourcc}}]:[]],decode_provenance:e.decode_provenance??null,vendor_metadata:{frame_count:e.frame_count,...n?{drop_frame:n.drop_frame}:{},...e.inner_codec?{inner_codec:e.inner_codec}:{},...e.truncated?{truncated:!0}:{}},binding_state:"unbound",raw_extraction:{mxf_probe:e},metadata:{}}},async extract(t){await l();let r=t.parts[0],e=JSON.parse(await O(w(r),r.fileSize));return e.length===0?null:{v:1,container:"mxf",codec:"mxf",frame_count:N(e),granularity:"frame",segments:e}},async sparsify(t,r){let e=t.parts[0],n=await K(e,r.items,r.handles);return[{filename:e.filename,fileSize:n.fileSize,structuralRanges:n.structuralRanges,essenceRanges:n.essenceRanges,trimInputs:n.trimInputs,wholeFileFallback:n.wholeFileFallback}]},async trim(t,r){let e=t.parts[0];return q(e,r.items,r.handles)},async decode(t,r,e){await l();let n=t.parts[0],a=w(n),i=await ee(t),o=e.detail==="coarse",s;if(i==="arriraw")s=await S(a,n.fileSize,r,o?"preview:4":"full");else if(i==="arriraw-alev3")s=await B(a,n.fileSize,r,o?"preview:4":"full");else if(i==="dnxhr")s=await M(a,n.fileSize,r,o?"preview":"full");else if(i==="xocn")s=await P(a,n.fileSize,r,o?"preview":"full");else if(i==="prores")s=await k(a,n.fileSize,r,o?"preview":"full");else throw new Error(`mxf decode: no decoder for inner codec '${i}'`);let c=new DataView(s.buffer,s.byteOffset,8);return{width:c.getUint32(0,!0),height:c.getUint32(4,!0),rgba:s.slice(8)}},async decode16(t,r){await l();let e=t.parts[0],n=w(e),a=await ee(t),i;try{if(a==="arriraw"){let o=await ue(t,r);if(o)return o;i=await S(n,e.fileSize,r,"rgb16")}else if(a==="dnxhr")i=await M(n,e.fileSize,r,"rgb16");else if(a==="xocn")i=await P(n,e.fileSize,r,"rgb16");else throw new Error(`mxf decode16: no decoder for inner codec '${a}'`)}catch(o){throw fe(o,a)}return J(i)}};function fe(t,r){let e=typeof t=="string"?t:t instanceof Error?t.message:"";return/has no 16-bit decoder|no rgb16 tier/.test(e)?new Error(`mxf ${r}: has no 16-bit decoder \u2014 ${e}`):t}var X=new WeakMap;async function ue(t,r){if(!!0)return null;try{let e=await import("./arriraw-PS6V532Y.js");if(!await e.arrirawGpuAvailable())return null;let{parseArrirawGpuPayload:n,arrirawFrameToRgb16:a}=await import("./clip-state-B6JOX3JE.js"),i=t.parts[0],o=X.get(t)??null,s=await U(w(i),i.fileSize,r,o?.key),c=n(s,o);if(!c)return null;X.set(t,{key:c.key,state:c.state});let f=await e.decodeArrirawFrameGpu(c.essence,c.state);return f?{width:f.width,height:f.height,rgb16:a(f)}:null}catch{return null}}var Y=new WeakMap;async function ee(t){let r=Y.get(t);if(r)return r;await l();let e=t.parts[0],n=w(e),a="mxf";return await T(n,e.fileSize)?a="arriraw":await D(n,e.fileSize)?a="arriraw-alev3":await E(n,e.fileSize)?a="dnxhr":await L(n,e.fileSize)?a="xocn":await C(n,e.fileSize)&&(a="prores"),Y.set(t,a),a}export{Me as mxfFormat};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{$b as k,Rb as a,Sb as b,Tb as c,Ub as d,Vb as e,Wb as f,Xb as g,Yb as h,Zb as i,_b as j,ac as l,bc as m,cc as n,dc as o,ec as p,fc as q,gc as r,hc as s,ic as t}from"./chunk-AY72AUHE.js";import"./chunk-IN6XVTUS.js";import"./chunk-5XJVAA6N.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-QJPOC4SW.js";import"./chunk-Z42CP7YT.js";import"./chunk-PENDVYIL.js";import"./chunk-2WD3MDPB.js";import"./chunk-OR6IMPAS.js";import"./chunk-JCNKPRYY.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-I6WBZBGN.js";import"./chunk-WW6XAQKM.js";import"./chunk-CXOK4SF6.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-VG73BE6N.js";import"./chunk-BUOYYO22.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-LKX3HCRN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{j as OPERATION_KINDS,a as READ_FORMATS,k as applyOperation,m as applyOperationWithSources,s as consolidate,b as detectFormat,d as detectTimelineFormat,t as judge,r as linkText,g as listClips,i as listFlags,h as listMedia,e as readTimeline,n as resolveTarget,q as routesText,c as sniffFormat,f as summarize,l as trackIndex,p as writeDestination,o as writeTimeline};
|