conformtools 0.6.13 → 0.6.14

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.
Files changed (33) hide show
  1. package/dist/{bridge-PWYOJ7E7.js → bridge-46P34WCD.js} +1 -1
  2. package/dist/{chunk-LKQTE6T5.js → chunk-5PTQAFU5.js} +3 -3
  3. package/dist/{chunk-H4BU5WA6.js → chunk-764P7TUD.js} +1 -1
  4. package/dist/{chunk-BYMCZJBQ.js → chunk-BO462NEL.js} +1 -1
  5. package/dist/{chunk-LZRCXSUJ.js → chunk-CQSNVQQE.js} +1 -1
  6. package/dist/{chunk-LRGA6QJQ.js → chunk-DP4KJ3KL.js} +5 -5
  7. package/dist/{chunk-ERUN634Q.js → chunk-EKTETRKB.js} +1 -1
  8. package/dist/{chunk-4VFDGL4E.js → chunk-FXK53VEO.js} +1 -1
  9. package/dist/chunk-MJBJI6DV.js +3 -0
  10. package/dist/{chunk-7W5AFZYX.js → chunk-MOSLNNO5.js} +1 -1
  11. package/dist/{chunk-I2Y2P5NH.js → chunk-O372NT7V.js} +2 -2
  12. package/dist/{chunk-Y455Y6V4.js → chunk-P3EOFAZR.js} +1 -1
  13. package/dist/{chunk-G3HBKJ5L.js → chunk-YKKB27VF.js} +1 -1
  14. package/dist/{chunk-B54TEGMG.js → chunk-YYR3FM6A.js} +1 -1
  15. package/dist/cli.js +1 -1
  16. package/dist/{framing-P5RGN5V3.js → framing-4HAHAG4I.js} +1 -1
  17. package/dist/{h264-JI62TU4W.js → h264-MAUQSLPY.js} +1 -1
  18. package/dist/{h264-mxf-J2QPZO4U.js → h264-mxf-2SZ66MPB.js} +1 -1
  19. package/dist/{host-relink-76CFY32O.js → host-relink-664IB3BC.js} +1 -1
  20. package/dist/{hosts-TBHEPV6A.js → hosts-BGWD7BKM.js} +1 -1
  21. package/dist/http.js +2 -2
  22. package/dist/{inspect-U656APGR.js → inspect-ZM7IW23B.js} +1 -1
  23. package/dist/{isobmff-UISATYUR.js → isobmff-6ZPEXUF4.js} +1 -1
  24. package/dist/{mc-video-LSTKUKNL.js → mc-video-KMWTRVES.js} +1 -1
  25. package/dist/mcp.js +1 -1
  26. package/dist/{media-XBNKYKB7.js → media-MSMXMA6E.js} +1 -1
  27. package/dist/{mxf-ZL57VJ3C.js → mxf-GOWHEH4A.js} +1 -1
  28. package/dist/{ops-ZQEQXW2N.js → ops-FI2NBTYK.js} +1 -1
  29. package/dist/{r3d-R4TLYJVE.js → r3d-LO5Z6DEX.js} +1 -1
  30. package/dist/{still-4UR35GZH.js → still-6FU7ALUV.js} +1 -1
  31. package/dist/{timeline-JONFBIA3.js → timeline-WVETLJZN.js} +1 -1
  32. package/package.json +5 -5
  33. package/dist/chunk-JV7TZDKJ.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{c as l}from"./chunk-LZRCXSUJ.js";import{Aa as v,Ba as F,H as _,Ha as O,I as S,Ia as f,J as P,ja as b,ka as R,xa as w}from"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";var g=class{constructor(e=[]){this.ranges=[];for(let[r,n]of e)this.add(r,n)}add(e,r){if(r<=e)return;let n=[],[s,o]=[e,r];for(let[i,a]of this.ranges)a<s||i>o?n.push([i,a]):(s=Math.min(s,i),o=Math.max(o,a));n.push([s,o]),n.sort((i,a)=>i[0]-a[0]),this.ranges=n}has(e,r){return r<=e?!0:this.ranges.some(([n,s])=>n<=e&&s>=r)}missing(e,r){if(r<=e)return[];let n=[],s=e;for(let[o,i]of this.ranges)if(!(i<=s)&&(o>=r||(o>s&&n.push([s,Math.min(o,r)]),s=Math.max(s,i),s>=r)))break;return s<r&&n.push([s,r]),n}count(){return this.ranges.reduce((e,[r,n])=>e+(n-r),0)}toJSON(){return this.ranges.map(([e,r])=>[e,r])}};function U(t,e){let r=new g;for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value,i=Math.max(0,Math.max(0,Math.floor(s))-e),a=Math.floor(s+o)+e;a>i&&r.add(i,a)}return r.toJSON()}function J(t,e,r){let n=U(e,r),s=a=>n.some(([c,u])=>a>=c&&a<u),o=new Map,i=a=>{let c=o.get(a);return c||(c={part:a,structuralRanges:[],essenceRanges:[]},o.set(a,c)),c};for(let a of t.segments){let c=a.part??0;a.kind==="structural"?i(c).structuralRanges.push({offset:a.offset,length:a.length}):(a.kind==="frame"||a.kind==="gop")&&a.frame_in!=null&&s(a.frame_in)&&i(c).essenceRanges.push({offset:a.offset,length:a.length})}return[...o.values()].sort((a,c)=>a.part-c.part)}async function A(t,e){if(!O)return null;try{let n=await(await import("./r3d-I6EYEYX7.js")).decodeR3dRgbaGpu(t,e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function p(t){return(e,r,n)=>t.parts[e].read(r,n)}function d(t){return JSON.stringify(t.parts.map(e=>({name:e.filename,size:e.fileSize})))}function L(t,e){let r=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value;r.push({frame_in:Math.max(0,Math.floor(s)),frame_out:Math.floor(s+o),handles:e})}return JSON.stringify(r)}var k=16,h=new WeakMap,D=new WeakMap;function x(t){let e=D.get(t);return e||(e=t.parts[0].read(0,Math.min(16*1024,t.parts[0].fileSize)),D.set(t,e)),e}async function N(t){let e=h.get(t);return e||(await f(),e=JSON.parse(await b(p(t),d(t))),h.set(t,e)),e}async function G(t){await f();let e=await b(p(t),d(t));return h.set(t,JSON.parse(e)),e}function B(t,e){h.set(t,JSON.parse(e))}async function C(t,e){let r=JSON.parse(await R(p(t),d(t)));return{v:1,container:"r3d",codec:"redcode",frame_count:e.frame_count,granularity:"frame",...t.parts.length>1?{part_names:t.parts.map(n=>n.filename.split(/[/\\]/).pop()??n.filename)}:{},segments:r}}var V={async inspect(t){await f();let e=await w(p(t),d(t)),r=JSON.parse(e);if(!r||r.frame_count===0)return null;let n=t.parts[0],s=r.timecode??null,o=s&&s.fps_denominator>0?s.fps_numerator/s.fps_denominator:null,i=r.width??null,a=r.height??null;return{id:n.filename,kind:"external",target_url:n.filename,available_range:o&&r.frame_count?{start:{value:0,rate:o},duration:{value:r.frame_count,rate:o}}:null,reel_name:r.reel??null,source_timecode:s?.display??null,source_fps:o,source_resolution_w:i,source_resolution_h:a,container:"r3d",codec:"redcode",size_bytes:r.file_size,streams:[{kind:"video",codec:"redcode",width:i??void 0,height:a??void 0,rate:o??void 0,bit_depth:k,codec_specific:{fourcc:r.codec_fourcc??"REDCODE"}}],decode_provenance:r.decode_provenance??null,vendor_metadata:{frame_count:r.frame_count,...s?{drop_frame:s.drop_frame}:{}},binding_state:"unbound",raw_extraction:{r3d_probe:r},metadata:{}}},async extract(t){await f();let e=JSON.parse(await w(p(t),d(t)));return!e||e.frame_count===0?null:C(t,e)},async sparsify(t,e){await f();let r=JSON.parse(await R(p(t),d(t))),n={v:1,container:"r3d",codec:"redcode",frame_count:r.filter(o=>o.kind==="frame").length,granularity:"frame",segments:r},s=new Map;for(let o of r)o.kind==="frame"&&s.set(o.part??0,(s.get(o.part??0)??0)+1);return J(n,e.items,e.handles).map(o=>({filename:t.parts[o.part].filename,fileSize:t.parts[o.part].fileSize,structuralRanges:o.structuralRanges,essenceRanges:o.essenceRanges,frameCount:s.get(o.part)??0,keptFrames:o.essenceRanges.length}))},async trim(t,e){await f();let r=t.parts.some(a=>a.dataRanges!==void 0),n=r?JSON.stringify(t.parts.map(a=>a.dataRanges??[])):"[]",s=r?"[]":L(e.items,e.handles),o=await F(p(t),d(t),s,n);return JSON.parse(o).parts.map(a=>a.trim_plan)},async decode(t,e,r){await f();let n=await N(t);if(e<0||e>=n.length)throw new l(e,n.length);let s=n[e],o=s.part??0,i=t.parts[o];if(!i)throw new l(e,n.length);let a=await i.read(s.essenceOffset,s.essenceLength),c=2,u=await x(t),m;if(r.detail==="coarse")m=_(a,u,0);else if(v(a))m=_(a,u,c);else{let y=await A(a,u);if(y)return y;m=P(a,u)}let M=new DataView(m.buffer,m.byteOffset,8);return{width:M.getUint32(0,!0),height:M.getUint32(4,!0),rgba:m.slice(8)}},async decode16(t,e){await f();let r=await N(t);if(e<0||e>=r.length)throw new l(e,r.length);let n=r[e],s=t.parts[n.part??0];if(!s)throw new l(e,r.length);let o=await s.read(n.essenceOffset,n.essenceLength),i=S(o),a=new DataView(i.buffer,i.byteOffset,8),c=a.getUint32(0,!0),u=a.getUint32(4,!0),m=i.slice(8);return{width:c,height:u,rgb16:new Uint16Array(m.buffer,m.byteOffset,c*u*3)}}};export{G as listR3dFramesJson,V as r3dFormat,B as seedR3dFramesJson};
3
+ import{c as l}from"./chunk-CQSNVQQE.js";import{Aa as v,Ba as F,H as _,Ha as O,I as S,Ia as f,J as P,ja as b,ka as R,xa as w}from"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";var g=class{constructor(e=[]){this.ranges=[];for(let[r,n]of e)this.add(r,n)}add(e,r){if(r<=e)return;let n=[],[s,o]=[e,r];for(let[i,a]of this.ranges)a<s||i>o?n.push([i,a]):(s=Math.min(s,i),o=Math.max(o,a));n.push([s,o]),n.sort((i,a)=>i[0]-a[0]),this.ranges=n}has(e,r){return r<=e?!0:this.ranges.some(([n,s])=>n<=e&&s>=r)}missing(e,r){if(r<=e)return[];let n=[],s=e;for(let[o,i]of this.ranges)if(!(i<=s)&&(o>=r||(o>s&&n.push([s,Math.min(o,r)]),s=Math.max(s,i),s>=r)))break;return s<r&&n.push([s,r]),n}count(){return this.ranges.reduce((e,[r,n])=>e+(n-r),0)}toJSON(){return this.ranges.map(([e,r])=>[e,r])}};function U(t,e){let r=new g;for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value,i=Math.max(0,Math.max(0,Math.floor(s))-e),a=Math.floor(s+o)+e;a>i&&r.add(i,a)}return r.toJSON()}function J(t,e,r){let n=U(e,r),s=a=>n.some(([c,u])=>a>=c&&a<u),o=new Map,i=a=>{let c=o.get(a);return c||(c={part:a,structuralRanges:[],essenceRanges:[]},o.set(a,c)),c};for(let a of t.segments){let c=a.part??0;a.kind==="structural"?i(c).structuralRanges.push({offset:a.offset,length:a.length}):(a.kind==="frame"||a.kind==="gop")&&a.frame_in!=null&&s(a.frame_in)&&i(c).essenceRanges.push({offset:a.offset,length:a.length})}return[...o.values()].sort((a,c)=>a.part-c.part)}async function A(t,e){if(!O)return null;try{let n=await(await import("./r3d-I6EYEYX7.js")).decodeR3dRgbaGpu(t,e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function p(t){return(e,r,n)=>t.parts[e].read(r,n)}function d(t){return JSON.stringify(t.parts.map(e=>({name:e.filename,size:e.fileSize})))}function L(t,e){let r=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value;r.push({frame_in:Math.max(0,Math.floor(s)),frame_out:Math.floor(s+o),handles:e})}return JSON.stringify(r)}var k=16,h=new WeakMap,D=new WeakMap;function x(t){let e=D.get(t);return e||(e=t.parts[0].read(0,Math.min(16*1024,t.parts[0].fileSize)),D.set(t,e)),e}async function N(t){let e=h.get(t);return e||(await f(),e=JSON.parse(await b(p(t),d(t))),h.set(t,e)),e}async function G(t){await f();let e=await b(p(t),d(t));return h.set(t,JSON.parse(e)),e}function B(t,e){h.set(t,JSON.parse(e))}async function C(t,e){let r=JSON.parse(await R(p(t),d(t)));return{v:1,container:"r3d",codec:"redcode",frame_count:e.frame_count,granularity:"frame",...t.parts.length>1?{part_names:t.parts.map(n=>n.filename.split(/[/\\]/).pop()??n.filename)}:{},segments:r}}var V={async inspect(t){await f();let e=await w(p(t),d(t)),r=JSON.parse(e);if(!r||r.frame_count===0)return null;let n=t.parts[0],s=r.timecode??null,o=s&&s.fps_denominator>0?s.fps_numerator/s.fps_denominator:null,i=r.width??null,a=r.height??null;return{id:n.filename,kind:"external",target_url:n.filename,available_range:o&&r.frame_count?{start:{value:0,rate:o},duration:{value:r.frame_count,rate:o}}:null,reel_name:r.reel??null,source_timecode:s?.display??null,source_fps:o,source_resolution_w:i,source_resolution_h:a,container:"r3d",codec:"redcode",size_bytes:r.file_size,streams:[{kind:"video",codec:"redcode",width:i??void 0,height:a??void 0,rate:o??void 0,bit_depth:k,codec_specific:{fourcc:r.codec_fourcc??"REDCODE"}}],decode_provenance:r.decode_provenance??null,vendor_metadata:{frame_count:r.frame_count,...s?{drop_frame:s.drop_frame}:{}},binding_state:"unbound",raw_extraction:{r3d_probe:r},metadata:{}}},async extract(t){await f();let e=JSON.parse(await w(p(t),d(t)));return!e||e.frame_count===0?null:C(t,e)},async sparsify(t,e){await f();let r=JSON.parse(await R(p(t),d(t))),n={v:1,container:"r3d",codec:"redcode",frame_count:r.filter(o=>o.kind==="frame").length,granularity:"frame",segments:r},s=new Map;for(let o of r)o.kind==="frame"&&s.set(o.part??0,(s.get(o.part??0)??0)+1);return J(n,e.items,e.handles).map(o=>({filename:t.parts[o.part].filename,fileSize:t.parts[o.part].fileSize,structuralRanges:o.structuralRanges,essenceRanges:o.essenceRanges,frameCount:s.get(o.part)??0,keptFrames:o.essenceRanges.length}))},async trim(t,e){await f();let r=t.parts.some(a=>a.dataRanges!==void 0),n=r?JSON.stringify(t.parts.map(a=>a.dataRanges??[])):"[]",s=r?"[]":L(e.items,e.handles),o=await F(p(t),d(t),s,n);return JSON.parse(o).parts.map(a=>a.trim_plan)},async decode(t,e,r){await f();let n=await N(t);if(e<0||e>=n.length)throw new l(e,n.length);let s=n[e],o=s.part??0,i=t.parts[o];if(!i)throw new l(e,n.length);let a=await i.read(s.essenceOffset,s.essenceLength),c=2,u=await x(t),m;if(r.detail==="coarse")m=_(a,u,0);else if(v(a))m=_(a,u,c);else{let y=await A(a,u);if(y)return y;m=P(a,u)}let M=new DataView(m.buffer,m.byteOffset,8);return{width:M.getUint32(0,!0),height:M.getUint32(4,!0),rgba:m.slice(8)}},async decode16(t,e){await f();let r=await N(t);if(e<0||e>=r.length)throw new l(e,r.length);let n=r[e],s=t.parts[n.part??0];if(!s)throw new l(e,r.length);let o=await s.read(n.essenceOffset,n.essenceLength),i=S(o),a=new DataView(i.buffer,i.byteOffset,8),c=a.getUint32(0,!0),u=a.getUint32(4,!0),m=i.slice(8);return{width:c,height:u,rgb16:new Uint16Array(m.buffer,m.byteOffset,c*u*3)}}};export{G as listR3dFramesJson,V as r3dFormat,B as seedR3dFramesJson};
@@ -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-RGMTLNMF.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-XACWNFPB.js")).inspectDpxWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="exr"){let r=await(await import("./exr-wasm-FQBUR6QT.js")).inspectExrWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="dng"){let r=await(await import("./dng-wasm-XCPPBXPZ.js")).inspectDngWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="cr3"){let r=await(await import("./cr3-wasm-NYCB34ND.js")).inspectCr3Wasm(t);return r?{width:r.width,height:r.height}:null}if(e==="tif"||e==="tiff"){let r=await(await import("./tiff-wasm-N2S267IA.js")).inspectTiffWasm(t);return r?{width:r.width,height:r.height}:null}let i=await import("./still-wasm-RTPOMH7S.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};
3
+ import{a as l,f as o,g as m}from"./chunk-MJBJI6DV.js";import{a as s}from"./chunk-RGMTLNMF.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-XACWNFPB.js")).inspectDpxWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="exr"){let r=await(await import("./exr-wasm-FQBUR6QT.js")).inspectExrWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="dng"){let r=await(await import("./dng-wasm-XCPPBXPZ.js")).inspectDngWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="cr3"){let r=await(await import("./cr3-wasm-NYCB34ND.js")).inspectCr3Wasm(t);return r?{width:r.width,height:r.height}:null}if(e==="tif"||e==="tiff"){let r=await(await import("./tiff-wasm-N2S267IA.js")).inspectTiffWasm(t);return r?{width:r.width,height:r.height}:null}let i=await import("./still-wasm-RTPOMH7S.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{$b as h,Ub as a,Vb as b,Wb as c,Xb as d,Yb as e,Zb as f,_b as g,ac as i,bc as j,cc as k,dc as l,ec as m,fc as n,gc as o,hc as p,ic as q,jc as r,kc as s}from"./chunk-LKQTE6T5.js";import"./chunk-IN6XVTUS.js";import"./chunk-Y455Y6V4.js";import"./chunk-PFZVET7S.js";import"./chunk-6V4OEOOX.js";import"./chunk-H4BU5WA6.js";import"./chunk-ISKNIQVO.js";import"./chunk-JKOB3U54.js";import"./chunk-EEDLRRKU.js";import"./chunk-WJ5EWXP2.js";import"./chunk-YUO3UWPH.js";import"./chunk-DKGGJM6Z.js";import"./chunk-JV7TZDKJ.js";import"./chunk-RGMTLNMF.js";import"./chunk-XDI6CPPV.js";import"./chunk-7W5AFZYX.js";import"./chunk-LZRCXSUJ.js";import"./chunk-BTS3DFPD.js";import"./chunk-6WLSIH2N.js";import"./chunk-LVGGCRDW.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-DPA26AOI.js";import"./chunk-L3HRAIDR.js";import"./chunk-OD445COC.js";import"./chunk-EP4L2BWV.js";import"./chunk-PHAMF4JF.js";import"./chunk-XI6XF7FQ.js";import"./chunk-PSANHDZM.js";export{i as OPERATION_KINDS,a as READ_FORMATS,j as applyOperation,l as applyOperationWithSources,r as consolidate,g as countFlags,b as detectFormat,s as judge,q as linkText,e as listClips,h as listFlags,f as listMedia,c as readTimeline,m as resolveTarget,p as routesText,d as summarize,k as trackIndex,o as writeDestination,n as writeTimeline};
3
+ import{$b as h,Ub as a,Vb as b,Wb as c,Xb as d,Yb as e,Zb as f,_b as g,ac as i,bc as j,cc as k,dc as l,ec as m,fc as n,gc as o,hc as p,ic as q,jc as r,kc as s}from"./chunk-5PTQAFU5.js";import"./chunk-IN6XVTUS.js";import"./chunk-P3EOFAZR.js";import"./chunk-PFZVET7S.js";import"./chunk-6V4OEOOX.js";import"./chunk-764P7TUD.js";import"./chunk-ISKNIQVO.js";import"./chunk-JKOB3U54.js";import"./chunk-EEDLRRKU.js";import"./chunk-WJ5EWXP2.js";import"./chunk-YUO3UWPH.js";import"./chunk-DKGGJM6Z.js";import"./chunk-MJBJI6DV.js";import"./chunk-RGMTLNMF.js";import"./chunk-XDI6CPPV.js";import"./chunk-MOSLNNO5.js";import"./chunk-CQSNVQQE.js";import"./chunk-BTS3DFPD.js";import"./chunk-6WLSIH2N.js";import"./chunk-LVGGCRDW.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-DPA26AOI.js";import"./chunk-L3HRAIDR.js";import"./chunk-OD445COC.js";import"./chunk-EP4L2BWV.js";import"./chunk-PHAMF4JF.js";import"./chunk-XI6XF7FQ.js";import"./chunk-PSANHDZM.js";export{i as OPERATION_KINDS,a as READ_FORMATS,j as applyOperation,l as applyOperationWithSources,r as consolidate,g as countFlags,b as detectFormat,s as judge,q as linkText,e as listClips,h as listFlags,f as listMedia,c as readTimeline,m as resolveTarget,p as routesText,d as summarize,k as trackIndex,o as writeDestination,n as writeTimeline};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conformtools",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
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.13",
48
- "conformtools-darwin-x64": "0.6.13",
49
- "conformtools-linux-x64": "0.6.13",
50
- "conformtools-windows-x64": "0.6.13"
47
+ "conformtools-darwin-arm64": "0.6.14",
48
+ "conformtools-darwin-x64": "0.6.14",
49
+ "conformtools-linux-x64": "0.6.14",
50
+ "conformtools-windows-x64": "0.6.14"
51
51
  }
52
52
  }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- var F=new Set(["png","jpg","jpeg","tif","tiff","psd","tga","bmp","gif","webp","avif","heic","heif","exr","dpx","pict","pct"]);function B(t){let n=t.split(/[/\\]/).pop()??"",e=n.lastIndexOf(".");return e>0?n.slice(e+1).toLowerCase():""}function k(t){return!!t&&F.has(B(t))}function V(t){return t.content_kind==="still"?!0:t.content_kind!=null?!1:k(t.source_filename)||k(t.target_url)}var U=/\[\d+-\d+\]|%0?\d*d|#{3,}/;function q(t){return t.content_kind==="still"?!1:t.bundle?.kind==="image-sequence"?!0:U.test(t.target_url??"")||U.test(t.display_name??"")}function Y(t){return{size:t.length,async read(n,e){let r=Math.max(0,Math.min(n,t.length)),u=Math.max(r,Math.min(r+e,t.length));return t.subarray(r,u)}}}function J(t){return{size:t.fileSize,read:(n,e)=>t.read(n,e)}}var _=class{constructor(n){this.r=n;this.buf=new Uint8Array(0);this.base=0}async at(n,e){if(n<0||e<=0)return new Uint8Array(0);let r=n-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(n,Math.max(e,65536)),this.base=n,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(t,n)=>t[n]<<8|t[n+1],b=(t,n)=>t[n]|t[n+1]<<8,M=(t,n)=>t[n]|t[n+1]<<8|t[n+2]<<16,m=(t,n)=>(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0,w=(t,n)=>(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0,P=(t,n)=>t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24,g=(t,n,e)=>String.fromCharCode(...t.subarray(n,n+e));function d(t,n){if(!Number.isFinite(t)||!Number.isFinite(n))return null;let e=Math.round(t),r=Math.round(n);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var E=t=>({width:t.height,height:t.width});async function L(t){let n=await t.at(0,24);return n.length<24||n[0]!==137||g(n,1,3)!=="PNG"||g(n,12,4)!=="IHDR"?null:d(m(n,16),m(n,20))}var z=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function O(t){if(t.length<8)return null;let n=t[0]===73&&t[1]===73,e=t[0]===77&&t[1]===77;if(!n&&!e)return null;let r=i=>n?b(t,i):A(t,i),u=i=>n?w(t,i):m(t,i);if(r(2)!==42)return null;let l=u(4);if(l+2>t.length)return null;let c=r(l);for(let i=0;i<c;i++){let s=l+2+i*12;if(s+12>t.length)break;if(r(s)===274)return r(s+8)}return null}async function W(t,n){let e=await t.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,u=null,l=2;for(;l+4<=n;){let c=await t.at(l,4);if(c.length<4)break;if(c[0]!==255){l++;continue}let i=c[1];if(i===255){l++;continue}if(i===1||i>=208&&i<=217){l+=2;continue}if(i===218)break;let s=A(c,2);if(s<2)break;if(z.has(i)){let o=await t.at(l+4,5);o.length>=5&&(u=d(A(o,3),A(o,1)));break}if(i===225){let o=await t.at(l+4,Math.min(s-2,65536));o.length>6&&g(o,0,4)==="Exif"&&(r=O(o.subarray(6))??1)}l+=2+s}return u?r>=5&&r<=8?E(u):u:null}async function C(t){let n=await t.at(0,10);return n.length<10||g(n,0,3)!=="GIF"?null:d(b(n,6),b(n,8))}async function I(t){let n=await t.at(0,26);return n.length<22||g(n,0,2)!=="BM"?null:w(n,14)===12?d(b(n,18),b(n,20)):n.length<26?null:d(P(n,18),Math.abs(P(n,22)))}async function j(t){let n=await t.at(0,30);if(n.length<16||g(n,0,4)!=="RIFF"||g(n,8,4)!=="WEBP")return null;let e=g(n,12,4);if(e==="VP8X")return n.length<30?null:d(M(n,24)+1,M(n,27)+1);if(e==="VP8 ")return n.length<30||n[23]!==157||n[24]!==1||n[25]!==42?null:d(b(n,26)&16383,b(n,28)&16383);if(e==="VP8L"){if(n.length<25||n[20]!==47)return null;let r=w(n,21);return d((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(t,n){let e=[],r=0;async function u(i,s,o){let f=i;for(;f+8<=s&&o<8;){let x=await t.at(f,16);if(x.length<8)return;let a=m(x,0),h=g(x,4,4),y=8;if(a===1){if(x.length<16)return;a=m(x,8)*2**32+m(x,12),y=16}else a===0&&(a=s-f);if(a<y||f+a>s)return;if(h==="meta")await u(f+y+4,f+a,o+1);else if(h==="iprp"||h==="ipco")await u(f+y,f+a,o+1);else if(h==="ispe"){let p=await t.at(f+y+4,8);if(p.length===8){let R=d(m(p,0),m(p,4));R&&e.push(R)}}else if(h==="irot"){let p=await t.at(f+y,1);p.length===1&&(r=p[0]&3)}f+=a}}let l=await t.at(0,12);if(l.length<12||g(l,4,4)!=="ftyp"||(await u(0,n,0),e.length===0))return null;let c=e.reduce((i,s)=>i.width*i.height>=s.width*s.height?i:s);return r===1||r===3?E(c):c}async function N(t){let n=await t.at(0,22);return n.length<22||g(n,0,4)!=="8BPS"?null:d(m(n,18),m(n,14))}var T=new Set([0,1,2,3,9,10,11]);async function X(t){let n=await t.at(0,18);if(n.length<18||n[1]>1||!T.has(n[2]))return null;let e=n[16];return[8,15,16,24,32].includes(e)?d(b(n,12),b(n,14)):null}async function v(t){let n=await t.at(0,8);if(n.length<8)return null;let e=n[0]===73&&n[1]===73,r=n[0]===77&&n[1]===77;if(!e&&!r)return null;let u=(a,h)=>e?b(a,h):A(a,h),l=(a,h)=>e?w(a,h):m(a,h);if(u(n,2)!==42)return null;let c=l(n,4),i=await t.at(c,2);if(i.length<2)return null;let s=u(i,0);if(s<1||s>4096)return null;let o=await t.at(c+2,s*12),f=0,x=0;for(let a=0;a<s;a++){let h=a*12;if(h+12>o.length)break;let y=u(o,h),R=u(o,h+2)===3?u(o,h+8):l(o,h+8);y===256?f=R:y===257&&(x=R)}return d(f,x)}async function D(t,n){let e=await t.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,u=Math.min(n,1<<20);for(;r<u;){let l=await t.at(r,512);if(l.length===0)return null;let c=l.indexOf(0);if(c<=0)return null;let i=g(l,0,c),s=l.subarray(c+1).indexOf(0);if(s<0)return null;let o=c+1+s+1;if(o+4>l.length)return null;let f=w(l,o),x=r+o+4;if(i==="dataWindow"){if(f<16)return null;let a=await t.at(x,16);return a.length<16?null:d(P(a,8)-P(a,0)+1,P(a,12)-P(a,4)+1)}r=x+f}return null}async function G(t){let n=await t.at(0,4);if(n.length<4)return null;let e=g(n,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let u=await t.at(772,8);return u.length<8?null:d(r?m(u,0):w(u,0),r?m(u,4):w(u,4))}var H={png:L,jpg:W,jpeg:W,gif:C,bmp:I,webp:j,avif:S,heic:S,heif:S,psd:N,tga:X,tif:v,tiff:v,exr:D,dpx:G};async function K(t,n){let e=H[(t??"").toLowerCase()];if(!e)return null;try{return await e(new _(n),n.size)}catch{return null}}export{B as a,k as b,V as c,q as d,Y as e,J as f,K as g};