conformtools 0.6.9 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -22
- package/dist/account-IUWNSDG5.js +3 -0
- package/dist/analysis-engine-M7W32RRC.js +3 -0
- package/dist/bridge-SV7PCLQY.js +3 -0
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-TXQR2HI2.js → chunk-2CY2OOOJ.js} +1 -1
- package/dist/chunk-2QT5MMBP.js +499 -0
- package/dist/chunk-2WBGXD27.js +8 -0
- package/dist/chunk-5YULBQJX.js +3 -0
- package/dist/chunk-5YWO2LBG.js +3 -0
- package/dist/chunk-64X5DLH5.js +6 -0
- package/dist/{chunk-GM6QKY7W.js → chunk-6HZP2OJA.js} +1 -1
- package/dist/chunk-6NLB5TZ2.js +7 -0
- package/dist/chunk-6VP6G7CY.js +10 -0
- package/dist/{chunk-3D3Z4TBR.js → chunk-DGXZB7MO.js} +1 -1
- package/dist/chunk-DPA26AOI.js +3 -0
- package/dist/{chunk-A7FNR3T5.js → chunk-EEDLRRKU.js} +1 -1
- package/dist/chunk-G3SZDPDS.js +3 -0
- package/dist/chunk-IK6RKNS5.js +3 -0
- package/dist/chunk-IN6XVTUS.js +3 -0
- package/dist/{chunk-D4WPRRBT.js → chunk-ISKNIQVO.js} +1 -1
- package/dist/chunk-JKOB3U54.js +3 -0
- package/dist/{chunk-2BPR6LK6.js → chunk-JXTRQ3UG.js} +1 -1
- package/dist/chunk-LVGGCRDW.js +3 -0
- package/dist/chunk-N34DQ6MH.js +14 -0
- package/dist/chunk-NSQP6CTA.js +20 -0
- package/dist/chunk-QTFFVLVJ.js +8 -0
- package/dist/chunk-RKIRHMON.js +5 -0
- package/dist/chunk-ROPKSAFP.js +6 -0
- package/dist/{chunk-GTJ3EM6H.js → chunk-S6KP52OG.js} +1 -1
- package/dist/chunk-THVX57I3.js +4 -0
- package/dist/chunk-VE423Z2L.js +132 -0
- package/dist/chunk-WJ5EWXP2.js +3 -0
- package/dist/chunk-XDI6CPPV.js +3 -0
- package/dist/chunk-XF3YMBI7.js +3 -0
- package/dist/chunk-XIAG7ACN.js +7 -0
- package/dist/chunk-YU3SUSK3.js +3 -0
- package/dist/chunk-YUO3UWPH.js +3 -0
- package/dist/claude-setup-REU4AOKX.js +13 -0
- package/dist/cli.js +8 -8
- package/dist/{cr3-wasm-HLJWEV2S.js → cr3-wasm-NYCB34ND.js} +1 -1
- package/dist/{dng-wasm-CQDLPM5V.js → dng-wasm-XCPPBXPZ.js} +1 -1
- package/dist/{dpx-wasm-TLGMM7BO.js → dpx-wasm-XACWNFPB.js} +1 -1
- package/dist/emscripten-module-Q67P5WYC-HW3D2R5O.js +2161 -0
- package/dist/engine-274GQLUB.js +5 -0
- package/dist/{exr-wasm-2NPKPTVB.js → exr-wasm-FQBUR6QT.js} +1 -1
- package/dist/ffi-7KTOX2T4.js +3 -0
- package/dist/flame/hook/conformtools_flame/verbs.py +9 -9
- package/dist/framing-ZTMYZR2S.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-JJMZSUWW.js → h264-B2TLLEMI.js} +1 -1
- package/dist/{h264-mxf-DCUOGLDU.js → h264-mxf-3GED5PBT.js} +1 -1
- package/dist/host-relink-FHNXXMHW.js +10 -0
- package/dist/hosted-BWAYLJXR.js +3 -0
- package/dist/hosts-Y6HGDRLM.js +3 -0
- package/dist/http.js +3 -3
- package/dist/{inspect-FJKYPEXL.js → inspect-RJFJQSHZ.js} +3 -3
- package/dist/{isobmff-VJOWP4MH.js → isobmff-C5A2EFKH.js} +1 -1
- package/dist/{mc-video-5MGGOQN4.js → mc-video-ARKIHPA7.js} +1 -1
- package/dist/mcp.js +7 -7
- package/dist/{media-NZYVREUF.js → media-22VAJIVT.js} +1 -1
- package/dist/media_core-XOKN7UUF.js +9 -0
- package/dist/module-ES6BEMUI-L6VQ7K3J.js +3 -0
- package/dist/module-asyncify-2EFITU5U-Z4EEM6X7.js +3 -0
- package/dist/mxf-CQSI6H5T.js +3 -0
- package/dist/nuke/panel/python/conformtools_nuke/verbs.py +5 -5
- package/dist/{ops-X7NAREC4.js → ops-BCTGDBXT.js} +1 -1
- package/dist/peer-kit/ctpeer/__init__.py +1 -1
- package/dist/peer-kit/ctpeer/neutral.py +10 -10
- package/dist/premiere-uxp/lib/edit.js +94 -9
- package/dist/premiere-uxp/lib/markers.js +12 -11
- package/dist/premiere-uxp/lib/probe.js +6 -3
- package/dist/premiere-uxp/lib/verbs.js +1 -1
- package/dist/premiere-uxp/manifest.json +1 -1
- package/dist/{probe-F7WQHMIA.js → probe-72QZKMCC.js} +1 -1
- package/dist/{r3d-T5O6IIZZ.js → r3d-FX7V4BIE.js} +1 -1
- package/dist/{r3d-CXUNG6VS.js → r3d-I6EYEYX7.js} +1 -1
- package/dist/resolve-bridge.py +725 -88
- package/dist/sequence-patch-CN4VC5W3.js +3 -0
- package/dist/{still-P4JJNTEO.js → still-WUCFH2WX.js} +1 -1
- package/dist/{still-wasm-DN5LPASS.js → still-wasm-RTPOMH7S.js} +1 -1
- package/dist/store-H676BOKI.js +3 -0
- package/dist/{tiff-wasm-BPRDR6EB.js → tiff-wasm-N2S267IA.js} +1 -1
- package/dist/timeline-5TGA5HBY.js +3 -0
- package/dist/timeline_core-ZKQQHUA2.js +3 -0
- package/dist/wasm/media_core_bg.wasm +0 -0
- package/dist/wasm-threads/media_core_bg.wasm +0 -0
- package/dist/{wav-64SC6P7U.js → wav-HSCUCY4U.js} +1 -1
- package/package.json +10 -1
- package/dist/account-M53GEV7P.js +0 -3
- package/dist/bridge-SX5TW4LC.js +0 -3
- package/dist/chunk-5BSXYKLN.js +0 -20
- package/dist/chunk-623EA3TK.js +0 -6
- package/dist/chunk-AMRJXYL4.js +0 -3
- package/dist/chunk-DQGINJDV.js +0 -5
- package/dist/chunk-GK4YYKJ6.js +0 -19
- package/dist/chunk-GRQJGEGV.js +0 -378
- package/dist/chunk-HNBA43BF.js +0 -5
- package/dist/chunk-J2JXLEAI.js +0 -3
- package/dist/chunk-MWDF2R26.js +0 -7
- package/dist/chunk-NFJHWZJX.js +0 -3
- package/dist/chunk-PFISREY4.js +0 -3
- package/dist/chunk-PLRB2YXJ.js +0 -3
- package/dist/chunk-QVH44I66.js +0 -39
- package/dist/chunk-RJ6JA2LZ.js +0 -3
- package/dist/chunk-SGLQY53R.js +0 -3
- package/dist/chunk-VIBEEWPC.js +0 -10
- package/dist/chunk-WN53ARHJ.js +0 -3
- package/dist/chunk-XCKQHL4G.js +0 -9
- package/dist/claude-setup-IIWUB4CE.js +0 -5
- package/dist/conformtools-analyze +0 -0
- package/dist/conformtools-decode +0 -0
- package/dist/engine-P6H5P6HP.js +0 -5
- package/dist/framing-3XIVHSUZ.js +0 -3
- package/dist/host-relink-UWML4C7W.js +0 -10
- package/dist/hosts-SRS5TEM6.js +0 -3
- package/dist/i2o-transfer +0 -0
- package/dist/media_core-YZ3PABEG.js +0 -9
- package/dist/mxf-FJSRFLJC.js +0 -3
- package/dist/store-53BBZBND.js +0 -3
- package/dist/timeline-C3OZJBCZ.js +0 -3
- package/dist/timeline_core-IOENXK4Z.js +0 -3
|
@@ -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{a,b,c,d,e,f,g,h}from"./chunk-XF3YMBI7.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{b as APPLIED,a as BACKUP_SUFFIX,e as applyPatch,c as patchFolders,g as patchName,d as planPatch,h as readRecord,f as undoPatch};
|
|
@@ -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-
|
|
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};
|
|
@@ -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-DKGGJM6Z.js";import{
|
|
3
|
+
import{a as s}from"./chunk-DKGGJM6Z.js";import{Ga as i,Ia as a}from"./chunk-DPA26AOI.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};
|
|
@@ -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{A as a,B as b,C as c,D as d,E as e,F as f}from"./chunk-S6KP52OG.js";import"./chunk-6NLB5TZ2.js";import"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{a as createSession,f as getExtra,b as getSession,d as listSessions,e as saveExtra,c 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,c}from"./chunk-
|
|
3
|
+
import{a,b,c}from"./chunk-YUO3UWPH.js";import"./chunk-DKGGJM6Z.js";import"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";export{c as decodeTiffPreviewWasm,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{Ac as l,Bc as m,Cc as n,Dc as o,Ec as p,Fc as q,Gc as r,pc as a,qc as b,rc as c,sc as d,tc as e,uc as f,vc as g,wc as h,xc as i,yc as j,zc as k}from"./chunk-VE423Z2L.js";import"./chunk-IN6XVTUS.js";import"./chunk-6VP6G7CY.js";import"./chunk-PFZVET7S.js";import"./chunk-THVX57I3.js";import"./chunk-LVGGCRDW.js";import"./chunk-IK6RKNS5.js";import"./chunk-YUO3UWPH.js";import"./chunk-JV7TZDKJ.js";import"./chunk-6V4OEOOX.js";import"./chunk-RGMTLNMF.js";import"./chunk-ISKNIQVO.js";import"./chunk-JKOB3U54.js";import"./chunk-EEDLRRKU.js";import"./chunk-DKGGJM6Z.js";import"./chunk-WJ5EWXP2.js";import"./chunk-C2ESM27Z.js";import"./chunk-XDI6CPPV.js";import"./chunk-DGXZB7MO.js";import"./chunk-JXTRQ3UG.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-DPA26AOI.js";import"./chunk-S6KP52OG.js";import"./chunk-6NLB5TZ2.js";import"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{i as OPERATION_KINDS,a as READ_FORMATS,j as applyOperation,k as applyOperationWithSources,q as consolidate,g as countFlags,b as detectFormat,r as judge,p as linkText,e as listClips,h as listFlags,f as listMedia,c as readTimeline,l as resolveTarget,o as routesText,d as summarize,n as writeDestination,m as writeTimeline};
|
|
@@ -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"./chunk-PSANHDZM.js";function O(e,_){let o,t;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.capability_issues_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function S(e){let _=g(e,n.__wbindgen_malloc),o=l,t=n.deobfuscate_ptx(_,o);if(t[3])throw b(t[2]);var r=A(t[0],t[1]).slice();return n.__wbindgen_free(t[0],t[1]*1,1),r}function I(e){let _,o;try{let t=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=l,s=n.drx_grade_tree(t,r);return _=s[0],o=s[1],d(s[0],s[1])}finally{n.__wbindgen_free(_,o,1)}}function U(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.extract_aaf_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function D(e,_){let o,t;try{let i=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.extract_avb_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function F(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.extract_blscene_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function B(e){let _,o;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),i=l,c=n.extract_drt_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function L(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.extract_flame_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function k(e,_){let o,t;try{let i=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.extract_prproj_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function C(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.extract_ptx_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function q(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.inspect_aaf_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function z(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.inspect_avb_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function P(e,_){let o,t;try{let i=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_blscene_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function N(e,_){let o,t;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_capcut_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function V(e){let _,o;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),i=l,c=n.inspect_drt_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function X(e,_){let o,t;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_fcpxml_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function Y(e,_){let o,t;try{let i=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_flame_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function G(e,_){let o,t;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_otio_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function H(e){let _,o;try{let s=g(e,n.__wbindgen_malloc),i=l,c=n.inspect_prproj_json(s,i);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function J(e,_){let o,t;try{let i=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_ptx_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function K(e,_){let o,t;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_xmeml_json(i,c,f,w);var r=a[0],s=a[1];if(a[3])throw r=0,s=0,b(a[2]);return o=r,t=s,d(r,s)}finally{n.__wbindgen_free(o,t,1)}}function j(){return{__proto__:null,"./timeline_core_bg.js":{__proto__:null,__wbg_Error_fdd633d4bb5dd76a:function(_,o){return Error(d(_,o))},__wbindgen_cast_0000000000000001:function(_,o){return d(_,o)},__wbindgen_init_externref_table:function(){let _=n.__wbindgen_externrefs,o=_.grow(4);_.set(0,void 0),_.set(o+0,void 0),_.set(o+1,null),_.set(o+2,!0),_.set(o+3,!1)}}}}function A(e,_){return e=e>>>0,y().subarray(e/1,e/1+_)}function d(e,_){return T(e>>>0,_)}var p=null;function y(){return(p===null||p.byteLength===0)&&(p=new Uint8Array(n.memory.buffer)),p}function g(e,_){let o=_(e.length*1,1)>>>0;return y().set(e,o/1),l=e.length,o}function u(e,_,o){if(o===void 0){let c=x.encode(e),f=_(c.length,1)>>>0;return y().subarray(f,f+c.length).set(c),l=c.length,f}let t=e.length,r=_(t,1)>>>0,s=y(),i=0;for(;i<t;i++){let c=e.charCodeAt(i);if(c>127)break;s[r+i]=c}if(i!==t){i!==0&&(e=e.slice(i)),r=o(r,t,t=i+e.length*3,1)>>>0;let c=y().subarray(r+i,r+t),f=x.encodeInto(e,c);i+=f.written,r=o(r,t,i,1)>>>0}return l=i,r}function b(e){let _=n.__wbindgen_externrefs.get(e);return n.__externref_table_dealloc(e),_}var m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});m.decode();var W=2146435072,v=0;function T(e,_){return v+=_,v>=W&&(m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),m.decode(),v=_),m.decode(y().subarray(e,e+_))}var x=new TextEncoder;"encodeInto"in x||(x.encodeInto=function(e,_){let o=x.encode(e);return _.set(o),{read:e.length,written:o.length}});var l=0,R,E,n;function h(e,_){return E=e,n=e.exports,R=_,p=null,n.__wbindgen_start(),n}async function M(e,_){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,_)}catch(r){if(e.ok&&o(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await e.arrayBuffer();return await WebAssembly.instantiate(t,_)}else{let t=await WebAssembly.instantiate(e,_);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}function o(t){switch(t){case"basic":case"cors":case"default":return!0}return!1}}function Q(e){if(n!==void 0)return n;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let _=j();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let o=new WebAssembly.Instance(e,_);return h(o,e)}async function Z(e){if(n!==void 0)return n;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("timeline_core_bg.wasm",import.meta.url));let _=j();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:o,module:t}=await M(await e,_);return h(o,t)}export{O as capability_issues_json,Z as default,S as deobfuscate_ptx,I as drx_grade_tree,U as extract_aaf_json,D as extract_avb_json,F as extract_blscene_json,B as extract_drt_json,L as extract_flame_json,k as extract_prproj_json,C as extract_ptx_json,Q as initSync,q as inspect_aaf_json,z as inspect_avb_json,P as inspect_blscene_json,N as inspect_capcut_json,V as inspect_drt_json,X as inspect_fcpxml_json,Y as inspect_flame_json,G as inspect_otio_json,H as inspect_prproj_json,J as inspect_ptx_json,K as inspect_xmeml_json};
|
|
Binary file
|
|
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{
|
|
3
|
+
import{a as b}from"./chunk-AACY2V3L.js";import{Ia as u,ba as _,la as f,sa as d,va as g}from"./chunk-DPA26AOI.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.11",
|
|
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",
|
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
"@napi-rs/canvas": "^0.1.80"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
24
25
|
"@modelcontextprotocol/sdk": "1.31.0",
|
|
25
26
|
"esbuild": "^0.25",
|
|
26
27
|
"opentype.js": "^2.0.0",
|
|
28
|
+
"quickjs-emscripten-core": "0.32.0",
|
|
29
|
+
"sucrase": "3.35.1",
|
|
27
30
|
"zod-to-json-schema": "3.25.2"
|
|
28
31
|
},
|
|
29
32
|
"homepage": "https://conform.tools",
|
|
@@ -39,5 +42,11 @@
|
|
|
39
42
|
],
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"optionalDependencies": {
|
|
47
|
+
"conformtools-darwin-arm64": "0.6.11",
|
|
48
|
+
"conformtools-darwin-x64": "0.6.11",
|
|
49
|
+
"conformtools-linux-x64": "0.6.11",
|
|
50
|
+
"conformtools-windows-x64": "0.6.11"
|
|
42
51
|
}
|
|
43
52
|
}
|
package/dist/account-M53GEV7P.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}from"./chunk-XCKQHL4G.js";import"./chunk-PHAMF4JF.js";import"./chunk-PLRB2YXJ.js";import"./chunk-PSANHDZM.js";export{b as NET_TIMEOUT_MS,c as _forgetOffline,d as accessToken,e as accountStatus,a as config,g as includesOf,l as login,m as logout,k as requireApp,i as requireEntitled,j as requireMcp,h as setAccountGate,f as statusText};
|
package/dist/bridge-SX5TW4LC.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,k as e,l as f,m as g,n as h,o as i}from"./chunk-5BSXYKLN.js";import"./chunk-PLRB2YXJ.js";import"./chunk-PSANHDZM.js";export{c as BridgeError,g as HostBridge,e as PANEL_PREFIX,b as PORTS,a as PROTOCOL,h as hostBridge,d as pairingPath,f as panelOrigins,i as resetHostBridge};
|
package/dist/chunk-5BSXYKLN.js
DELETED
|
@@ -1,20 +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 L,Y as P,b as N,k as A,p as O,v as R,x as M,y as W,z as I}from"./chunk-PLRB2YXJ.js";import K from"node:http";import{connect as Y}from"node:net";import{createHash as U,randomBytes as j}from"node:crypto";import{Buffer as m}from"node:buffer";var D="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";function C(o,e,a=!1){let n=e.length,t=a?128:0,s=n<126?m.from([128|o,t|n]):n<65536?m.from([128|o,t|126,n>>8,n&255]):(()=>{let i=m.alloc(10);return i[0]=128|o,i[1]=t|127,i.writeBigUInt64BE(BigInt(n),2),i})();if(!a)return m.concat([s,m.from(e)]);let r=j(4),c=m.from(e);for(let i=0;i<c.length;i++)c[i]^=r[i&3];return m.concat([s,r,c])}function J(o,e,a,n=!1){let t=m.alloc(0),s=[],r=0,c=!1,i=[],p=[],u=()=>{c||(c=!0,p.forEach(l=>l()))},f=(l=1e3,d="")=>{if(c)return;let h=m.from(d),g=m.alloc(2+h.length);g.writeUInt16BE(l,0),h.copy(g,2);try{o.write(C(8,g,n))}catch{}o.end(),u()};return o.on("data",l=>{for(t=m.concat([t,l]);t.length>=2;){let d=(t[0]&128)!==0,h=t[0]&15,g=(t[1]&128)!==0,v=t[1]&127,y=2;if(v===126){if(t.length<4)return;v=t.readUInt16BE(2),y=4}else if(v===127){if(t.length<10)return;let w=t.readBigUInt64BE(2);if(w>BigInt(a))return f(1009,"too big");v=Number(w),y=10}if(g===n)return f(1002,n?"server frames must not be masked":"client frames must be masked");if(v>a||r+v>a)return f(1009,"message too big");let T=g?4:0;if(t.length<y+T+v)return;let S=m.from(t.subarray(y+T,y+T+v));if(g){let w=t.subarray(y,y+4);for(let x=0;x<S.length;x++)S[x]^=w[x&3]}if(t=t.subarray(y+T+v),h===8)return f(1e3);if(h===9){o.write(C(10,S,n));continue}if(h!==10){if(h===1||h===0){if(s.push(S),r+=S.length,d){let w=m.concat(s).toString("utf8");s=[],r=0,i.forEach(x=>x(w))}continue}return f(1003,"text frames only")}}}),o.on("close",u),o.on("error",u),{origin:e,send:l=>{c||o.write(C(1,m.from(l,"utf8"),n))},close:f,onMessage:l=>{i.push(l)},onClose:l=>{p.push(l)}}}function F(o,e){let a=new Set,n=K.createServer((t,s)=>{let r=n.address();o.onHttp?.(t,s,typeof r=="object"&&r?r.port:o.port)||(s.writeHead(426,{"content-type":"text/plain"}),s.end("websocket only"))});return n.on("upgrade",(t,s)=>{let r=t.headers["sec-websocket-key"];if(t.url?.split("?")[0]!==o.path||typeof r!="string"||String(t.headers.upgrade).toLowerCase()!=="websocket"){s.end(`HTTP/1.1 400 Bad Request\r
|
|
4
|
-
\r
|
|
5
|
-
`);return}let c=U("sha1").update(r+D).digest("base64");s.write(`HTTP/1.1 101 Switching Protocols\r
|
|
6
|
-
Upgrade: websocket\r
|
|
7
|
-
Connection: Upgrade\r
|
|
8
|
-
Sec-WebSocket-Accept: ${c}\r
|
|
9
|
-
\r
|
|
10
|
-
`),a.add(s),s.on("close",()=>a.delete(s));let i=typeof t.headers.origin=="string"?t.headers.origin:null;e(J(s,i,o.maxBytes))}),new Promise((t,s)=>{n.once("error",s),n.listen(o.port,o.hostname,()=>{let r=n.address();t({port:typeof r=="object"&&r?r.port:o.port,close:()=>new Promise(c=>{for(let i of a)i.destroy();n.close(()=>c())})})})})}function de(o,e){let a=new URL(o);if(a.protocol!=="ws:")return Promise.reject(new Error(`only ws:// URLs: ${o}`));let n=j(16).toString("base64"),t=U("sha1").update(n+D).digest("base64");return new Promise((s,r)=>{let c=Y({host:a.hostname,port:Number(a.port||80)}),i=f=>{c.destroy(),r(f)};c.setTimeout(e.timeoutMs,()=>i(new Error(`no answer from ${a.host} within ${e.timeoutMs} ms`))),c.once("error",i),c.once("connect",()=>c.write(`GET ${a.pathname}${a.search} HTTP/1.1\r
|
|
11
|
-
Host: ${a.host}\r
|
|
12
|
-
Upgrade: websocket\r
|
|
13
|
-
Connection: Upgrade\r
|
|
14
|
-
Sec-WebSocket-Key: ${n}\r
|
|
15
|
-
Sec-WebSocket-Version: 13\r
|
|
16
|
-
\r
|
|
17
|
-
`));let p=m.alloc(0),u=f=>{p=m.concat([p,f]);let l=p.indexOf(`\r
|
|
18
|
-
\r
|
|
19
|
-
`);if(l<0)return;c.off("data",u);let d=p.subarray(0,l).toString("latin1").split(`\r
|
|
20
|
-
`),h=d.find(y=>/^sec-websocket-accept:/i.test(y))?.split(":")[1]?.trim();if(!/^HTTP\/1\.1 101/.test(d[0])||h!==t)return i(new Error(`${a.host} refused the WebSocket upgrade: ${d[0]}`));c.setTimeout(0),c.off("error",i);let g=p.subarray(l+4),v=J(c,null,e.maxBytes,!0);g.length&&c.emit("data",g),s(v)};c.on("data",u)})}import{existsSync as te,readFileSync as ne}from"node:fs";var $="0.6.9";function Q(o,e){let a=o.split("-")[0].split(".").map(Number),n=e.split("-")[0].split(".").map(Number);for(let t=0;t<Math.max(a.length,n.length);t++){let s=(a[t]||0)-(n[t]||0);if(s)return s>0}return!1}var Z=null;function q(){return N("CONFORM_UPDATE_CHECK")==="off"?Promise.resolve(null):Z??=fetch("https://registry.npmjs.org/conformtools/latest",{signal:AbortSignal.timeout(2e3)}).then(o=>o.ok?o.json():null).then(o=>typeof o?.version=="string"?o.version:null).catch(()=>null)}var ee="run npx -y --prefer-online conformtools@latest mcp (in the MCP client config too; --prefer-online makes npx re-check npm instead of reusing its cached copy), then restart the MCP client; if an old global install is shadowing it: npm rm -g conformtools";async function ve(){let o=await q();return`conformtools ${$}`+(o&&Q(o,$)?` \u2014 update available: ${o} \u2192 ${ee}`:"")}var k=1,re=[48127,48128,48129,48130,48131,48132,48133,48134],oe=5e3,V=4,se=8*1024*1024,b=class extends Error{constructor(a,n){super(n);this.code=a}},_=()=>P(A(),"host-bridge","pairing.json"),B="/avid-panel/",ie="/avid-panel/pairing",G="avid",z={"index.html":"text/html; charset=utf-8","panel.js":"text/javascript; charset=utf-8","panel.css":"text/css; charset=utf-8","icon.svg":"image/svg+xml"},ae="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self' ws://localhost:{port} ws://127.0.0.1:{port} http://localhost:* http://127.0.0.1:* https://localhost:* https://127.0.0.1:*; base-uri 'none'; form-action 'none'; frame-ancestors 'none'",X=o=>[`http://localhost:${o}`,`http://127.0.0.1:${o}`];function ce(){for(let o of["./avid/panel/web-dist/","./avid-panel/"]){let e=O(new URL(o,import.meta.url));if(te(P(e,"index.html")))return e}return null}function le(){let o=new Uint8Array(32);return crypto.getRandomValues(o),Array.from(o,e=>e.toString(16).padStart(2,"0")).join("")}var H=class{constructor(){this.token=le();this.port=0;this.live=new Map;this.waiters=[];this.seq=0;this.events=[]}async start(e=re){let a;for(let n of e)try{this.server=await F({hostname:"127.0.0.1",port:n,path:"/host-bridge",maxBytes:se,onHttp:(t,s,r)=>this.servePanel(t,s,r)},t=>this.accept(t)),this.port=this.server.port;break}catch(t){a=t}if(!this.server)throw new b("no_port",`every host-bridge port (${e.join(", ")}) is taken: ${a}`);await W(P(A(),"host-bridge")),await M(_(),JSON.stringify({protocol:k,url:`ws://127.0.0.1:${this.port}/host-bridge`,port:this.port,token:this.token})),await L(_(),384)}async stop(){for(let e of this.live.values())e.conn.close(1001,"engine stopping");this.live.clear(),await this.server?.close();try{JSON.parse(await R(_())).token===this.token&&await I(_())}catch{}}peers(){return[...this.live.values()].map(e=>e.peer)}peer(e){return this.live.get(e)?.peer}async waitFor(e,a){return this.live.has(e)?this.peer(e):(await Promise.race([new Promise(n=>this.waiters.push({host:e,resolve:n})),new Promise(n=>setTimeout(n,a))]),this.peer(e))}request(e,a,n={},t=3e4){let s=this.live.get(e);if(!s)return Promise.reject(new b("not_connected",`${e}: its panel is not connected`));let r=`r${++this.seq}`;return new Promise((c,i)=>{let p=setTimeout(()=>{s.pending.delete(r),i(new b("timeout",`${e}: no answer to ${a} within ${Math.round(t/1e3)} s`))},t);s.pending.set(r,{resolve:c,reject:i,timer:p}),s.conn.send(JSON.stringify({type:"request",id:r,method:a,params:n}))})}servePanel(e,a,n){let t=(e.url??"").split("?")[0];if(!t.startsWith(B)&&t!==B.slice(0,-1))return!1;let s=(f,l,d,h=!1)=>{let g=typeof d=="string"?new TextEncoder().encode(d):d;return a.writeHead(f,{"content-type":l,"content-length":String(g.length),"cache-control":"no-store","x-content-type-options":"nosniff","referrer-policy":"no-referrer","cross-origin-resource-policy":"same-origin","x-frame-options":"DENY","content-security-policy":ae.replaceAll("{port}",String(n))}),a.end(h?void 0:g),!0},r=(f,l)=>s(f,"text/plain; charset=utf-8",l),c=f=>{let l=e.headers[f];return typeof l=="string"?l:void 0},i=(c("host")??"").toLowerCase();if(i!==`localhost:${n}`&&i!==`127.0.0.1:${n}`)return r(421,"misdirected request");if(t===ie)return e.method==="POST"&&X(n).includes(c("origin")??"")&&(c("sec-fetch-site")??"same-origin")==="same-origin"&&c("x-ct-panel")==="1"&&(c("content-length")??"0").trim()==="0"?s(200,"application/json",JSON.stringify({protocol:k,url:`ws://localhost:${n}/host-bridge`,port:n,token:this.token})):r(403,"forbidden");if(e.method!=="GET"&&e.method!=="HEAD")return r(405,"method not allowed");let p=t.slice(B.length)||"index.html",u=ce();return!z[p]||!u?r(404,"not found"):s(200,z[p],ne(P(u,p)),e.method==="HEAD")}accept(e){let a=!!e.origin&&X(this.port).includes(e.origin);if(e.origin&&/^https?:/i.test(e.origin)&&!a){e.send(JSON.stringify({type:"error",code:"origin_refused",message:"web pages may not use the host bridge"})),e.close(1008,"origin");return}let n=null,t=setTimeout(()=>{n||(e.send(JSON.stringify({type:"error",code:"hello_timeout",message:"no hello"})),e.close(1008,"hello"))},oe);e.onMessage(s=>{let r;try{r=JSON.parse(s)}catch{return}if(!n){let i=(l,d)=>{clearTimeout(t),e.send(JSON.stringify({type:"error",code:l,message:d})),e.close(1008,l)};if(r.type!=="hello")return i("hello_expected","the first frame must be hello");if(r.protocol!==k)return i("protocol_mismatch",`this engine speaks protocol ${k}`);if(r.token!==this.token)return i("bad_token","the pairing token does not match: re-read the pairing file");let p=r.host??{},u=String(p.id??"");if(!/^[a-z][a-z0-9_-]{1,31}$/.test(u))return i("bad_host","host.id is missing or malformed");if(a&&u!==G)return i("origin_mismatch",`a connection from the panel page may only be host ${G}`);if(!this.live.has(u)&&this.live.size>=V)return i("too_many_peers",`at most ${V} panels`);clearTimeout(t),this.live.get(u)?.conn.close(1e3,"replaced by a newer connection"),n=u;let f={id:u,name:String(p.name??u),version:String(p.version??""),platform:String(p.platform??""),capabilities:Array.isArray(r.capabilities)?r.capabilities.map(String):[],optional_verbs:Array.isArray(r.optional_verbs)?r.optional_verbs.map(String):[]};this.live.set(u,{peer:f,conn:e,pending:new Map}),e.send(JSON.stringify({type:"welcome",protocol:k,app:{name:"conformtools",version:$}})),this.waiters=this.waiters.filter(l=>l.host===u?(l.resolve(),!1):!0);return}let c=this.live.get(n);if(!(!c||c.conn!==e))if(r.type==="response"){let i=c.pending.get(String(r.id));if(!i)return;if(c.pending.delete(String(r.id)),clearTimeout(i.timer),r.ok)i.resolve(r.result??null);else{let p=r.error??{};i.reject(new b(p.code??"peer_error",`${n}: ${p.message??p.code??"error"}`))}}else r.type==="event"&&(this.events.push({host:n,name:String(r.name),data:r.data}),this.events.length>200&&this.events.shift())}),e.onClose(()=>{if(clearTimeout(t),!n)return;let s=this.live.get(n);if(s?.conn===e){for(let r of s.pending.values())clearTimeout(r.timer),r.reject(new b("disconnected",`${n}: the panel disconnected`));this.live.delete(n)}})}},E=null;function Pe(){return E??=(async()=>{let o=new H;return await o.start(),o})(),E.catch(()=>{E=null}),E}function ke(){E=null}export{$ as a,Q as b,q as c,ee as d,ve as e,de as f,k as g,re as h,b as i,_ as j,B as k,X as l,H as m,Pe as n,ke as o};
|
package/dist/chunk-623EA3TK.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{M as D,N as F,O as N}from"./chunk-QVH44I66.js";import{n as P}from"./chunk-5BSXYKLN.js";import{B as C,D as M,E as T,H as q,I,L as w,V as b,X as k,Y as _,_ as L,g as v,k as O,p as S,q as A,r as y,s as x,v as H,x as E,y as R}from"./chunk-PLRB2YXJ.js";var B=16e3,h=class extends Error{constructor(t,i){super(i);this.code=t}},j=class d{constructor(e,t=P,i=B){this.spec=e;this.bridge=t;this.waitMs=i;this.renders=new Map;this.host=e.host,e.items&&(this.items=n=>this.modelItems(n??{}))}async peer(){let e=await(await this.bridge()).waitFor(this.host,this.waitMs);if(!e)throw new h("not_connected",`${this.host}: the conform.tools plugin in ${this.spec.label} is not connected. ${this.spec.setup}`);return e}async needs(e){let t=await this.peer();if(!t.capabilities.includes(e))throw new h("panel_old",`${this.host}: the conform.tools plugin open in ${this.spec.label} ${t.version||""} has no ${e} (an older plugin); update it (${this.spec.setup})`);return t}async ask(e,t={},i){return await this.peer(),await(await this.bridge()).request(this.host,e,t,i)}static{this.announced=(e,t)=>e.optional_verbs.includes(t)}async support(){let e={ok:!1,reason:"the renderplugin is a DaVinci Resolve plugin"},t;try{t=await(await this.bridge()).waitFor(this.host,Math.min(3e3,this.waitMs))}catch(s){let a={ok:!1,reason:s instanceof Error?s.message:String(s)};return{export:a,open:a,render:a,markers:a,renderplugin:e}}if(!t){let s={ok:!1,reason:`the conform.tools plugin in ${this.spec.label} is not connected`,setup:this.spec.setup};return{export:s,open:s,render:s,markers:s,renderplugin:e}}let i=(s,a)=>s?{ok:!0}:{ok:!1,reason:`this plugin version has no ${a}`},n=t.capabilities;return{export:i(n.includes("timeline_read")||n.includes("timeline_write"),"timeline_read"),open:i(d.announced(t,"timeline_write.import_file"),"timeline_write.import_file"),render:i(n.includes("render"),"render"),markers:i(n.includes("markers"),"markers"),renderplugin:e}}async current(){let e=await this.ask("session.current_project");if(!e)return{project:"",timelines:[],timeline:""};let t=await this.ask("session.timeline_count",{project:e}),i=[];for(let s=1;s<=t;s++){let a=await this.ask("session.timeline_by_index",{project:e,index:s});a&&i.push(await this.ask("session.name",{handle:a}))}let n=await this.ask("session.current_timeline",{project:e});return{project:await this.ask("session.name",{handle:e}),timelines:i,timeline:n?await this.ask("session.name",{handle:n}):""}}async project(e={}){let t=await this.current();return{project:t.project,timeline:e.timeline??t.timeline,timelines:t.timelines,tracks:[],jobs:[],found:{},pool:{path:"",clips:0,folders:[]}}}async sequence(e){let t=await this.ask("session.current_project");if(!t)throw new h("no_project",`${this.host}: no project is open`);if(!e){let s=await this.ask("session.current_timeline",{project:t});if(!s)throw new h("no_timeline",`${this.host}: no timeline is active`);return{project:t,seq:s,name:await this.ask("session.name",{handle:s})}}let i=await this.ask("session.timeline_count",{project:t}),n=[];for(let s=1;s<=i;s++){let a=await this.ask("session.timeline_by_index",{project:t,index:s});if(!a)continue;let p=await this.ask("session.name",{handle:a});if(p===e)return{project:t,seq:a,name:p};n.push(p)}throw new h("not_found",`${this.host}: no timeline named "${e}" (have: ${n.join(", ")})`)}async model(e){let{project:t,seq:i}=await this.sequence(e);return await this.ask("timeline_read.model",{timeline:i,project:t},12e4)}async export(e){if(!e.out_path)throw new h("usage",`${this.host}: export needs out_path`);let t=await this.peer(),{project:i,seq:n,name:s}=await this.sequence(e.timeline),a=await this.ask("session.name",{handle:i}),p=r=>d.announced(t,r),m=e.out_path,l,c=[];if(p("timeline_write.export_otio")||p("timeline_write.export_xml")){let r=p("timeline_write.export_otio"),o=await this.ask(r?"timeline_write.export_otio":"timeline_write.export_xml",{project:i,timeline:n,path:e.out_path},12e4);if(l=o.format??(r?"otio":"xmeml"),o.ok===!1)throw new h("export_failed",`${this.host}: ${this.spec.label} did not write ${e.out_path}${o.errors?.length?` (${o.errors.join("; ")})`:""}`);o.path&&o.path!==e.out_path&&(m=await this.adopt(o.path,e.out_path)),c=o.warnings??[]}else if(p("timeline_read.export_file")){let r=await this.ask("timeline_read.export_file",{timeline:n,fmt:"otio",path:e.out_path},12e4);if(!r)throw new h("export_failed",`${this.host}: ${this.spec.label} exported no OTIO`);l="otio",r!==e.out_path&&(m=await this.adopt(r,e.out_path))}else{await this.needs("timeline_read");let r=await this.ask("timeline_read.model",{timeline:n,project:i},12e4),o=J(r);await E(e.out_path,JSON.stringify(o.otio)),l="otio",c=o.notes}if(!D.includes(l))throw new h("export_failed",`${this.host}: ${this.spec.label} exported ${l}, which the engine does not read (${m})`);if(!await x(m)||(await A(m)).size===0)throw new h("export_failed",`${this.host}: ${this.spec.label} did not write ${m}`);return{path:m,format:l,project:a,timeline:s,...c.length?{notes:c}:{}}}async adopt(e,t){let i=k(e)&&k(e)!==k(t)?t.slice(0,t.length-k(t).length)+k(e):t;if(await C(e,i),!F(i))throw new h("export_failed",`${this.host}: ${this.spec.label} exported ${b(e)}, which the engine does not read`);return i}async open(e){if(e.into==="scratch")throw new h("unsupported",`${this.host}: opening into a scratch project is not supported; the import lands in the open project`);let t=await this.peer();if(!d.announced(t,"timeline_write.import_file"))throw new h("unsupported",`${this.host}: this conform.tools plugin cannot import timelines (${this.spec.setup})`);let i=await this.ask("session.current_project");if(!i)throw new h("no_project",`${this.host}: no project is open`);let n=await this.ask("timeline_write.import_file",{project:i,path:e.path,sequences:null},3e5);if(!n.ok)throw new h("import_failed",`${this.host}: ${this.spec.label} did not import ${e.path}${n.issues?.length?` (${n.issues.join("; ")})`:""}`);let s=[...n.issues??[]];return n.imported.length>1&&s.push(`imported ${n.imported.length} timelines: ${n.imported.map(a=>a.name).join(", ")}`),e.name&&s.push(`${this.spec.label} names imported timelines after the file's own; name was not applied`),e.media_dirs?.length&&s.push(`${this.spec.label} links media from the paths in the file; media_dirs was not used (relink with timeline_relink before writing)`),{project:await this.ask("session.name",{handle:i}),timeline:n.imported[0]?.name??b(e.path),notes:s,restored:!e.stay,...n.bin?{folder:n.bin}:{}}}async modelItems(e){let t=await this.model(e.timeline),i=[...e.kind==="audio"?[]:t.items.map(n=>({kind:"video",track:n.track,start:n.start-t.start_frame,end:n.end-t.start_frame,id:n.handle?.$h??n.clip_id??"",name:n.name??"",color:n.color??"",flags:n.flags??[],enabled:n.enabled??!0,file:n.file_path})),...e.kind==="video"?[]:(t.audio_items??[]).map(n=>({kind:"audio",track:n.track,start:n.start-t.start_frame,end:n.end-t.start_frame,id:"",name:n.name??"",file:n.file_path??""}))].filter(n=>e.track===void 0||n.track===e.track);return{project:(await this.current()).project,timeline:t.timeline,start_frame:t.start_frame,fps:t.fps,items:i,color_groups:[],layers:1}}async apply(e){let{project:t,seq:i,name:n}=await this.sequence(e.timeline),s=[],a=[],p=l=>l.op.startsWith("marker_")&&!l.item;for(let l=0;l<e.ops.length;){let c=l;for(;c<e.ops.length&&p(e.ops[c])===p(e.ops[l]);)c++;let r=e.ops.slice(l,c),o=p(r[0])?await this.markerOps(i,r):await this.clipOps(i,r,e.timeline);s.push(...o.results),a.unshift(...o.undo),l=c}let m=s.filter(l=>l.ok).length;return{project:await this.ask("session.name",{handle:t}),timeline:n,results:s,undo:a,applied:m,failed:s.length-m}}async clipOps(e,t,i){let n=await this.peer();if(n.capabilities.includes("edit"))return await this.ask("edit.apply",{timeline:e,ops:t},6e4+t.length*500);let s=(c,r)=>({op:c.op,ok:!1,detail:r});if(!n.capabilities.includes("item_meta"))return{results:t.map(c=>s(c,`${this.host}: clip edits are not reachable over this plugin`)),undo:[]};let a=await this.model(i),p=c=>c?"id"in c?{$h:c.id}:(c.kind??"video")!=="video"?null:a.items.find(r=>r.track===c.track&&r.start-a.start_frame===c.start)?.handle??null:null,m=[],l=[];for(let c of t){let r=p(c.item);try{if(!r)m.push(s(c,`no video item at ${JSON.stringify(c.item??null)}`));else if(c.op==="clip_color"){let o=await this.ask("item_meta.color",{handle:r}),u=c.color?await this.ask("item_meta.set_color",{handle:r,color:c.color}):await this.ask("item_meta.clear_color",{handle:r});m.push({op:c.op,ok:u}),u&&l.unshift({op:"clip_color",item:c.item,color:o})}else if(c.op==="enabled"&&d.announced(n,"item_meta.set_enabled")){let o=a.items.find(f=>f.handle?.$h===r.$h)?.enabled??!0,u=await this.ask("item_meta.set_enabled",{item:r,enabled:!!c.on});m.push({op:c.op,ok:u}),u&&l.unshift({op:"enabled",item:c.item,on:o})}else m.push(s(c,`${this.host}: '${c.op}' is not reachable over this plugin`))}catch(o){m.push(s(c,o instanceof Error?o.message:String(o)))}}return{results:m,undo:l}}async markerOps(e,t){let i=await this.peer(),n=r=>d.announced(i,r),s=new Map((await this.ask("markers.list",{target:e})).map(r=>[r.frame,r])),a=[],p=[],m=async r=>{let o=await this.ask("markers.add",{target:e,frame:r.frame,color:r.color??"",name:r.name??"",note:r.note??"",duration:r.duration??1,custom_data:r.custom_data??""});return o&&s.set(r.frame,{color:"",name:"",note:"",duration:1,...r}),o},l=async r=>{let o=await this.ask("markers.delete_at",{target:e,frame:r});return o&&s.delete(r),o},c=r=>({op:"marker_add",frame:r.frame,color:r.color,name:r.name,note:r.note,duration:r.duration,...r.custom_data?{data:r.custom_data}:{}});for(let r of t){let o=Number(r.frame);try{if(r.op==="marker_add"){let u=s.get(o);u&&await l(o);let f=await m({frame:o,color:r.color,name:r.name,note:r.note,duration:Number(r.duration??1),custom_data:r.data});a.push({op:r.op,ok:f}),f&&p.unshift(...u?[c(u)]:[],{op:"marker_delete",frame:o})}else if(r.op==="marker_update"){let u=s.get(o);if(!u){a.push({op:r.op,ok:!1,detail:`no marker at frame ${o}`});continue}let f=r.to_frame!==void 0?Number(r.to_frame):o,$={...u,frame:f,...r.color!==void 0?{color:String(r.color)}:{},...r.name!==void 0?{name:String(r.name)}:{},...r.note!==void 0?{note:String(r.note)}:{}},g=!0;n("markers.set_color")&&n("markers.set_text")&&n("markers.move")?(r.color!==void 0&&(g=await this.ask("markers.set_color",{target:e,frame:o,color:r.color})&&g),(r.name!==void 0||r.note!==void 0)&&(g=await this.ask("markers.set_text",{target:e,frame:o,name:r.name,note:r.note})&&g),f!==o&&(g=await this.ask("markers.move",{target:e,frame:o,to_frame:f})&&g),s.delete(o),s.set(f,$)):g=await l(o)&&await m($),a.push({op:r.op,ok:g}),p.unshift({op:"marker_update",frame:f,color:u.color,name:u.name,note:u.note,...f!==o?{to_frame:o}:{}})}else if(r.op==="marker_delete"){let u=s.get(o),f=!!u&&await l(o);a.push({op:r.op,ok:f,...u?{}:{detail:`no marker at frame ${o}`}}),f&&u&&p.unshift(c(u))}else a.push({op:r.op,ok:!1,detail:`${this.host}: '${r.op}' is not reachable over this plugin`})}catch(u){a.push({op:r.op,ok:!1,detail:u instanceof Error?u.message:String(u)})}}return{results:a,undo:p}}async renderStart(e){if(await this.needs("render"),e.renderplugin)throw new h("unsupported","the renderplugin is a DaVinci Resolve plugin");if(e.disable_tracks?.length||e.audio_tracks?.length)throw new h("unsupported",`${this.host}: disable_tracks / audio_tracks are DaVinci Resolve's; pick a preset that renders what you need`);if(!e.preset)throw new h("usage",`${this.host}: preset is required: one of ${this.spec.label}'s export presets by name`);let{seq:t,name:i}=await this.sequence(e.timeline),n=e.name??i,s={purpose:"deliver",format:"preset",preset:e.preset,target_dir:e.target_dir,name:n,...e.range?{range:[e.range.in,e.range.out]}:{}},a=await this.ask("render.submit",{timeline:t,job:s});if(!a?.id)throw new h("render_refused",`${this.host}: ${a?.error??`${this.spec.label} refused the render`}`);if(!await this.ask("render.start",{job_ids:[a.id]}))throw new h("render_refused",`${this.host}: ${this.spec.label} did not start job ${a.id}`);return this.renders.set(a.id,{dir:e.target_dir,name:n}),{job_id:a.id,state:"queued",percent:0}}async renderStatus(e){let t=await this.ask("render.status",{job_id:e});if(!t)return{job_id:e,state:"failed",percent:0,error:`${this.host}: no render job ${e}`};let i={done:"complete",rendering:"rendering",queued:"queued",failed:"failed",cancelled:"cancelled"}[t.state]??"rendering",n={job_id:e,state:i,percent:Math.round(t.progress??(i==="complete"?100:0)),...t.error?{error:t.error}:{}};if(i==="complete"||i==="failed"||i==="cancelled"){let s=this.renders.get(e);i==="complete"&&s&&(n.outputs=await W(s.dir,s.name)),await this.ask("render.remove",{job_id:e}).catch(()=>!1),this.renders.delete(e)}return n}async renderCancel(e){return await this.ask("render.cancel",{job_id:e})?{job_id:e,state:"cancelled",percent:0}:{...await this.renderStatus(e),error:`${this.spec.label}'s running export cannot be cancelled from here; stop it in ${this.spec.label}`}}};async function W(d,e){let t=[];try{for await(let i of I(d))i.isFile&&i.name.startsWith(`${e}.`)&&t.push(_(d,i.name))}catch{}return t.sort()}function J(d){let e=(l,c)=>({OTIO_SCHEMA:"RationalTime.1",value:l,rate:c}),t=(l,c,r,o=r)=>({OTIO_SCHEMA:"TimeRange.1",start_time:e(l,r),duration:e(c,o)}),i=d.fps,n=d.tracks?.length?d.tracks:[...new Set(d.items.map(l=>l.track))].sort((l,c)=>l-c).map(l=>({index:l,enabled:!0,name:"",items:d.items.filter(c=>c.track===l)})),s=l=>(l.reversed?-1:1)*(l.speed||1)/(l.fps_factor||1),a=new Map;for(let l of d.items)if(l.file_path&&l.start_tc!=null&&l.src_abs_in!=null){let c=l.src_abs_in-l.start_tc+Math.ceil((l.end-l.start)*Math.abs(s(l))*(l.fps_factor||1));a.set(l.file_path,Math.max(a.get(l.file_path)??0,c))}let p=n.map(l=>{let c=d.start_frame,r=[];for(let o of[...l.items].sort((u,f)=>u.start-f.start)){if(o.start<c)continue;o.start>c&&r.push({OTIO_SCHEMA:"Gap.1",name:"",source_range:t(0,o.start-c,i)});let u=o.src_fps||i,f=o.start_tc!=null&&a.has(o.file_path)?o.start_tc:null,$=f!=null?o.src_abs_in:o.src_in??o.src_abs_in??0,g=s(o);r.push({OTIO_SCHEMA:"Clip.2",name:o.name??b(o.file_path||""),enabled:o.enabled!==!1,source_range:t($,o.end-o.start,u,i),media_references:{DEFAULT_MEDIA:{OTIO_SCHEMA:"ExternalReference.1",name:b(o.file_path||""),target_url:o.file_path?`file://${o.file_path}`:"",...f!=null?{available_range:t(f,a.get(o.file_path),u)}:{},metadata:{}}},active_media_reference_key:"DEFAULT_MEDIA",effects:Math.abs(g-1)>1e-6?[{OTIO_SCHEMA:"LinearTimeWarp.1",name:"",effect_name:"LinearTimeWarp",time_scalar:g}]:[],markers:[],metadata:o.reel?{cmx_3600:{reel:o.reel}}:{}}),c=o.end}return{OTIO_SCHEMA:"Track.1",name:l.name||`V${l.index}`,kind:"Video",enabled:l.enabled!==!1,children:r,effects:[],markers:[],metadata:{}}}),m=[];return d.audio_items?.length&&m.push(`${d.audio_items.length} audio clip(s) not carried: the host's plugin reports no audio source times`),d.transitions?.length&&m.push(`${d.transitions.length} transition(s) not carried (cuts in their place)`),{otio:{OTIO_SCHEMA:"Timeline.1",name:d.timeline,global_start_time:e(d.start_frame,i),metadata:{},tracks:{OTIO_SCHEMA:"Stack.1",name:"tracks",children:p,effects:[],markers:[],metadata:{}}},notes:m}}var X=16e3;var G="Install the conform.tools panel (host_setup host=premiere action=install_panel), then in Premiere open Window > UXP Plugins > conform.tools. It connects by itself from then on.";var U=class extends j{constructor(t=P,i=X){super({host:"premiere",label:"Premiere Pro",setup:G},t,i);this.items=async(t={})=>{await this.needs("edit");let{seq:i}=await this.sequence(t.timeline),n=await this.ask("edit.items",{timeline:i,kind:t.kind,track:t.track},12e4),s=n.project_path?await K(n.project_path,n.timeline).catch(p=>({error:p instanceof Error?p.message:String(p)})):{error:"the project has never been saved"},a=0;if(!("error"in s))for(let p of n.items){let m=s.get(`${p.kind}:${p.track}:${p.start}:${Number(p.end)-Number(p.start)}`);m?Object.assign(p,m,{saved:!0}):(p.saved=!1,a++)}return{...n,color_groups:[],layers:1,..."error"in s?{saved_note:`saved project not read: ${s.error}`}:{unsaved_items:a}}};this.premiereRenders=new Map}async current(){let t=await this.ask("session.describe");return{project:t.project,timelines:t.timelines,timeline:t.current}}async model(t){return await super.model(t)}async projectClips(){return await this.needs("edit"),await this.ask("edit.project_clips",{},12e4)}async relinkClips(t){return await this.needs("edit"),await this.ask("edit.relink_clips",{items:t},6e4+t.length*2e3)}async cutIn(t,i){await this.needs("edit");let{seq:n}=await this.sequence(t);return await this.ask("edit.cut_in",{timeline:n,cuts:i},12e4+i.length*3e3)}async renderStart(t){if(t.range)throw new h("unsupported","premiere: a frame range is not supported yet; set in/out on the sequence in Premiere");if(!t.preset||!/\.epr$/i.test(t.preset))throw new h("usage","premiere: preset must be the path of a Media Encoder preset (.epr)");let{seq:i,name:n}=await this.sequence(t.timeline);await R(t.target_dir);let s=_(t.target_dir,`${t.name??n}.mov`),a=await this.ask("render.export_sequence",{timeline:i,output_path:s,preset_path:t.preset,queue:!1},6e4);if(!a.ok)throw new h("render_refused","premiere: Premiere refused the export");let p=a.job||`ppro-${Date.now()}`;return this.premiereRenders.set(p,s),{job_id:p,state:"rendering",percent:0}}async renderStatus(t){let i=await this.ask("render.progress"),n=i[t]??i.last,s=this.premiereRenders.get(t);return n?.event==="error"||n?.event==="onEncodeError"?{job_id:t,state:"failed",percent:0,error:String(n.data??"encode error")}:n?.event==="complete"||n?.event==="onEncodeComplete"||s&&await y(s)&&!n?{job_id:t,state:"complete",percent:100,...s?{outputs:[s]}:{}}:{job_id:t,state:"rendering",percent:typeof n?.data=="number"?Math.round(Number(n.data)*100):0}}async renderCancel(t){return{job_id:t,state:"cancelled",percent:0,error:"Premiere's export cannot be cancelled from here; cancel it in Premiere / Media Encoder"}}};async function K(d,e){let{session:t}=await N(d,"prproj"),i=t.timelines.find(s=>s.name===e),n=new Map;if(!i)throw new Error(`the saved project has no sequence "${e}" (saved before it was made?)`);for(let s of i.tracks)if(!(s.kind!=="Video"&&s.kind!=="Audio"))for(let a of s.items){if(a.kind==="gap"||a.kind==="transition")continue;let p=a;n.set(`${s.kind==="Video"?"video":"audio"}:${s.track_index}:${a.timeline_range.start.value}:${a.timeline_range.duration.value}`,{saved_id:a.id,...p.speed_factor!=null&&p.speed_factor!==1?{retime:p.speed_factor}:{},...p.speed_ramped?{ramped:!0}:{},...p.speed_reverse?{reversed:!0}:{},...a.kind==="nested"?{nested:!0}:{},...p.is_multicam?{multicam:!0}:{},...p.effects?.some(m=>/stabiliz/i.test(m.kind??""))?{stabilized:!0}:{},...p.effects?.length?{saved_effects:p.effects.map(m=>m.name??m.kind??"")}:{}})}return n}function z(d=v()){return d==="darwin"?"/Library/Application Support/Adobe/Adobe Desktop Common/RemoteComponents/UPI/UnifiedPluginInstallerAgent/UnifiedPluginInstallerAgent.app/Contents/MacOS/UnifiedPluginInstallerAgent":d==="win32"?"C:\\Program Files\\Common Files\\Adobe\\Adobe Desktop Common\\RemoteComponents\\UPI\\UnifiedPluginInstallerAgent\\UnifiedPluginInstallerAgent.exe":null}async function V(){for(let d of["./uxp-plugin/","./premiere-uxp/"]){let e=S(new URL(d,import.meta.url));if(await x(_(e,"manifest.json")))return e}throw new Error("premiere: the conform.tools panel is missing from this install")}async function Q(){return JSON.parse(await H(_(await V(),"manifest.json"))).version}async function oe(d=v()){let e=z(d);if(!e||!await y(e))return{installed:!1,listing:"Creative Cloud's plugin installer is not on this machine"};let t=await w(e,d==="win32"?["/list","all"]:["--list","all"],{timeoutMs:6e4}),i=t.stdout.split(`
|
|
4
|
-
`).find(n=>/CONFORM\.TOOLS|conformtools/i.test(n));return{installed:!!i&&/enabled|installed/i.test(i),version:i?.match(/(\d+\.\d+\.\d+)\s*$/)?.[1],listing:t.stdout.trim()}}async function ae(d=v()){let e=z(d);if(!e||!await y(e))throw new Error("premiere: Creative Cloud's plugin installer (UnifiedPluginInstallerAgent) is not on this machine; install Creative Cloud");let t=await V(),i=await Q(),n=await q("conform-ccx-");for(let c of["manifest.json","index.html","index.js","lib","icons"])await T(_(t,c),_(n,c));let s=_(O(),"premiere");await R(s);let a=L(_(s,`conformtools-premiere-${i}.ccx`));await M(a);let p=d==="darwin"?await w("sh",["-c",`cd '${n.replace(/'/g,"'\\''")}' && zip -r -q -X '${a.replace(/'/g,"'\\''")}' manifest.json index.html index.js lib icons`]):await w("powershell",["-NoProfile","-Command",`Compress-Archive -Path '${n}\\*' -DestinationPath '${a.replace(/\.ccx$/,".zip")}' -Force; Move-Item -Force '${a.replace(/\.ccx$/,".zip")}' '${a}'`]);if(await M(n),!p.success)throw new Error(`premiere: could not package the panel: ${p.stderr.trim()}`);await w(e,d==="win32"?["/remove","conform.tools"]:["--remove","conform.tools"],{timeoutMs:12e4});let m=await w(e,d==="win32"?["/install",a]:["--install",a],{timeoutMs:18e4}),l=`${m.stdout}
|
|
5
|
-
${m.stderr}`.trim();if(!m.success||!/Installation Successful/i.test(l))throw new Error(`premiere: Adobe's installer refused the panel: ${l.split(`
|
|
6
|
-
`).pop()}`);return{version:i,ccx:a,output:l}}export{j as a,U as b,K as c,Q as d,oe as e,ae as f};
|
package/dist/chunk-AMRJXYL4.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{Ca as d,Ha as l}from"./chunk-RJ6JA2LZ.js";var u=[{codec:"prores",label:"Apple ProRes",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is DC-only 1/8 COLOR (2026-08-05 \u2014 was gray luma; Y+Cb+Cr DC walks, no AC/IDCT) \u2014 the realtime tier for BOTH playback and scrub: full 4K XQ decode is ~170ms/frame + a 35MB RGBA hand-off, which can hold neither 24fps nor a smooth scrub; the parked frame upgrades to full via the standard 160ms park timer (scrubPreview flipped true 2026-08-05 with the colour preview \u2014 the old 'full decode is scrub-fast' held for 2K 422, not 4K XQ). Both wrappers: .mov (sample table) and MXF OP1a (RDD 44, 2026-07-28 \u2014 is_prores_mxf routes the identical icpf bitstream through the walker via decode_prores_mxf; Suite ap4h fixture gated byte-exact vs ffmpeg 10-bit, rust tests/prores_mxf_gate.rs)"},{codec:"prores_raw",label:"Apple ProRes RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is a TRUE DC-only Bayer decode: the DC-DPCM segment is a strict prefix of each tile component's bitstream, so the preview reads just those prefixes (no AC walk, no IDCT), lands the exact closed-form value the full IDCT produces, and runs the SAME develop on the 1/8 grid (tier_parity gate). Decode = Apple's own reconstruction (RE'd from AppleProResRAWCodec.bundle 2026-10-22): bit-exact vs VideoToolbox's software decode on iPhone 17 Pro / Sony a7S III / Panasonic; the ffmpeg 8.0 byte-exact path remains as decode_bayer. Develop = the ProRes RAW SDK as DaVinci Resolve runs it (kernels transcribed from its Metal AIR, parameters RE'd from Resolve and captured live): noise-gated edge-directed demosaic, mired-interpolated per-CCT WB + forward matrix from the moov (iPhone; header colour otherwise), Apple Log / Apple Wide Gamut output matching a Resolve 21 render to f32 rounding (97.9% of 10-bit codes identical end to end; the rest is Resolve's hardware-decode LSB noise). Viewer tiers render ACEScct log (2026-07-26 \u2014 no baked Rec.709/sRGB; the transcode-grade log form); decode_prores_raw_tier takes the clip's container colour."},{codec:"h264",label:"H.264 / AVC",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park; FALLBACK (2026-10-27): where WebCodecs is absent or refuses the config (Firefox + HEVC, Chrome without HEVC hardware, most 4:2:2 10-bit), and for containers the TS players cannot walk (MKV/WebM, raw Annex-B, fragmented MP4), the identify chain labels the clip 'h264_wasm' and media-core's own decoder answers through the mcvideo lane (wasm video_open/video_decode \u2014 rust video::lane, gated byte-exact vs ffmpeg in tests/h264_mov_gate.rs / hevc_gate.rs / annexb_gate.rs); WebCodecs stays first"},{codec:"hevc",label:"HEVC / H.265",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park; FALLBACK (2026-10-27): where WebCodecs is absent or refuses the config (Firefox + HEVC, Chrome without HEVC hardware, most 4:2:2 10-bit), and for containers the TS players cannot walk (MKV/WebM, raw Annex-B, fragmented MP4), the identify chain labels the clip 'hevc_wasm' and media-core's own decoder answers through the mcvideo lane (wasm video_open/video_decode \u2014 rust video::lane, gated byte-exact vs ffmpeg in tests/h264_mov_gate.rs / hevc_gate.rs / annexb_gate.rs); WebCodecs stays first"},{codec:"xavc",label:"Sony XAVC-Intra",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"webcodecs",notes:"all-intra; already scrub-fast"},{codec:"h264_mxf",label:"H.264 long-GOP (MXF)",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"Camera proxies (Sony CTAPA and kin): H.264 High long-GOP in MXF OP1a. SEPARATE from 'xavc' because XAVC-Intra is all-intra and this is not \u2014 measured on a 1224-frame CTAPA proxy: IBBP, I every 12, but a true RAP (index flag 0x80) only every 48; the intervening I-frames are open-GOP (flag 0x40) and are NOT legal entry points. Decoded by LongGopPlayer: walk the GOP from its RAP, first AU 'key' and the rest 'delta', outputs taken in EMISSION order (WebCodecs owns the B-frame reorder, so the index's temporal_offset is never interpreted). Whole GOP is cached, so any scrub inside those 2s is free. Until 2026-08-10 these files were misidentified as xavc and decoded one isolated AU at a time (submit + flush), so every P/B frame hit a decoder with no reference state, only the leading IDR ever decoded, and the viewer showed frame 0 forever. Gated by oracle/i2o/e2e/mxf-longgop-playback.spec.ts against ffmpeg"},{codec:"r3d",label:"RED R3D",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE RWG/Log3G10 (2026-07-26 \u2014 IPP2 output LUT removed from decoders; display transforms are downstream)"},{codec:"arriraw",label:"ARRIRAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"EVERY STAGE BYTE-EXACT vs the ARRI SDK (2026-07-27): prep, the ADA-7 demosaic (0 of 15,690,240), the LuMaTaLu colour kernel (0 of 31,457,280 \u2014 closed by transcribing the SDK's own f32 op order: the LUT index is fmul-then-fadd not a fused mul_add, the B-spline weights are evaluated expanded with the sixth applied last, and the bicubic accumulates columns before rows), the 1:1 resample (identity) and AfaScaler+BufferScaler (0 of 43,739,136). The shipped master still omits AfaScaler's Rec.709 YCbCr detail and its Jenkins-hash grain \u2014 added looks, not native signal \u2014 so the end-to-end floor gate vs the SDK's DEFAULT output reads 0.16/255; colour is no part of that number. exact AWG4/LogC4 develop (2026-07-21, vs ARRI SDK); preview is colour via the same per-clip develop plan (tier gate corr \u22650.997). Pre-A35 12-bit ALEV-III (Mini/Mini LF) fully wired 2026-07-26: Gen2 develop to native AWG3/LogC3, SDK-gated MAE<0.8/255, probe inner_codec 'arriraw-alev3' \u2192 decode_arriraw12_mxf; other ALEV3 bodies decode flagged calib:parametric-alev3-family-unvalidated"},{codec:"dnxhr",label:"Avid DNxHR / DNxHD",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"DC-only 1/8 preview tier is COLOR (2026-08-05 \u2014 was gray luma) \u2014 playback + scrub ride it (4K/UHD DNxHR full decodes aren't scrub-fast); park upgrades to full"},{codec:"crm",label:"Canon Cinema RAW Light",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview LL tier develops through the SAME tone-exact Canon Log 2 path as Full (2026-07-26 \u2014 replaced the placeholder tone map that drifted -46/255)"},{codec:"braw",label:"Blackmagic RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"per-clip WB develop (bmdf wkel/wtin \u2192 wb_grid tables; Pocket-6K-family sweep-validated); preview is COLOUR-accurate native Gen5 log (gate corr \u22650.996 vs downsampled full). PER-FRAME HEADER LAW (2026-10-27, rust braw::frame_law): family, dequant tables, grain quantisers and edge-strength width are computed from each frame's own header exactly as BlackmagicRawAPI does \u2014 transcribed from the 5.1 binary (dequant builder 0xb98d4: luma M*(qi+4)/32, chroma M*max((qi+5)>>1,4)/32, transposed, DC capped by hdr +0x20/+0x22; M = the frame's in-header matrix (Pocket 6K v2 headers) or a built-in bank entry picked by +0x24; grain setup 0x50358: lo = trunc(hdr+0x1c*40/119), hi = 2*lo, chroma = trunc(hdr+0x1e*80/119); driver select 0x50490 from version/type/strength width). It reproduces all six previously captured quantiser pairs and both Pocket 6K grain captures bit for bit. The ladder only sets the deblock ramp, and ladder AND quant index change frame to frame inside a clip (SAN census: 10,959 frames, 8 ladders, qi 0..53 on one Pocket 6K), so the old ladder-keyed registry (now a witness list, braw::PROFILES) was refusing most Pocket 6K frames and mis-decoding others. A frame is refused with calib:unsupported-entropy-profile only when its header resolves to a decoder driver not yet transcribed. Byte-exact frame gates: (0,0,0,1) C013/C060 8\xD78 byte-exact; and the 12\xD712 family (SHIPPED 2026-07-26) \u2014 (1,2,3,4) URSA 12K, plus BOTH PYXIS encodes (0,1,2,4) and (0,0,1,2), which are the same camera at the same raster with quantisers half a step apart. That family is 12\xD712 luma / 12\xD76 chroma, 2 luma + Cb + Cr per unit off one threaded bit-reader; all four walks (full, multithreaded, DC preview, colour preview) are parametric over it. GRAIN + EDGE FILTER MODELLED 2026-07-26 \u2014 the decode is now essentially the SDK's literal output: the synthesized high-frequency PRNG grain is reproduced (scatter map verified 0 mismatches over 76,896 observations across two clips), its per-frame seed turns out to be carried IN the bitstream (16 BE bytes before the first tile) and re-seeded per tile as s1 ^= broadcast16(region<<5|vtile), and the post-IDCT block-edge filter (A*b + B*(a+c) >> 4) is applied. The filter's per-block STRENGTH byte is solved too (2026-07-26): it is transmitted, not derived - each unit ends with a [ctx+0x68]-bit field on its own reader (the skip the walk used to call 'hf_bias' and discard), packing four 2-bit weight selectors per block (bits 7:6/5:4 = the horizontal cut's two 6-px column spans, 3:2/1:0 = the vertical cut's two 6-px row spans); and the four weights are master[ladder[k]] with master[i] = (16-2i, i), so the header ladder IS the deblock strength ramp and no future profile needs a capture for it. BRAW IS BYTE-EXACT (2026-07-26). Frame-gated vs the SDK's own decoded.bin, through BOTH the oracle bitstream and the real .braw container path: all four captures \u2014 C060 (8x8), URSA 12K, and both PYXIS encodes \u2014 now differ from the SDK in ZERO samples, luma and chroma alike, across 208,099,712 luma samples; the gates assert max == 0 rather than a mean bound, because a tolerance cannot tell 'clean' from 'one wrong block in 400,000'. The last drift (11,248 URSA pixels off by one, ~0.014%) was never a modelling gap: the SDK computes an Arai-Agui-Nakajima SCALED DCT \u2014 coefficients premultiplied by s[u]*s[v] = c(k)/(2*cos(k*pi/2N)), then a unit-scale radix-3 x radix-4 butterfly \u2014 so a dense basis multiply is the same function through a DIFFERENT operation graph and rounds differently in f32, which is why f32, f32+FMA and f64 all missed. Both transforms (luma 12x12 @0x6e9c8, chroma 12x6 @0x6fc68) are now the SDK's literal dataflow, machine-transcribed by oracle/media/braw/t12_transcribe.py \u2014 a symbolic byte-slot emulator of the unrolled NEON \u2014 into the generated rust/media-core/src/codecs/braw_t12_idct.rs. The 8x8 family gains the same seed fix (whole-frame grain, no captured constant) AND the same edge filter: it was never a different algorithm, only a different compiled copy (@0x6b6a4) whose ladder (0,0,0,1) resolves to three identities plus one weak tap - C060 Y 1.76 -> 0.003. Also solved by censusing where the residual sat: the SDK runs horizontal before vertical; a vertical cut is governed by the block to its LEFT; the frame's final vertical cut is not filtered (the SDK handles cuts in pairs and drops the pair whose second cut leaves the frame); and the 8x8 byte is a nibble per block (7:6 h / 5:4 v for block 0, 3:2 h / 1:0 v for block 1). Both PYXIS profiles now carry captured grain quantisers (the PARIS original's were read once its volume was remounted). Also gated: the multithreaded walk is byte-identical to single-threaded, and both preview tiers are exact block means of the full decode (corr 1.0000). Pocket 6K (driver sym1569, single-context scan-wrapping core, inline transforms) byte-exact at qi 7 and qi 27 (C040); the SAN Pocket 6K frames at every other ladder (incl. C030's (0,2,3,4) qi 11) decode through the same driver on law-derived tables \u2014 their SDK frame gates (tests/braw_san_law.rs) are wired and await SDK captures. Still refused: the URSA 12K 8:1-type header (v5, flags 0x0914: type 3, three sub-streams, driver 0x65248, 6x12 blocks \u2014 a fifth walk to transcribe); previously it decoded as 8x8 garbage. See oracle/media/braw/ENTROPY_PROFILE_RE.md \xA713"},{codec:"xocn",label:"Sony X-OCN",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE S-Gamut3/S-Log3 (2026-07-26 \u2014 replaced the adaptive display transform); preview = LL-band-only decode (~1/8 per axis, ~90x faster), colour-consistent with Full by construction. Fitted sensors: Burano LT/8K (SBRg), Venice ST (SBRe), VENICE 2 8.6K (SBRf, 2026-07-26 \u2014 decodes via the same parametric geometry, own C0_VENICE2 matrix R\xB2\u22650.9994). X-OCN IS BYTE-EXACT ACROSS MODES (2026-07-27): LT 6K, Venice ST and Burano 8K all decode to ZERO differing samples vs libSonyRawDev's own decoder output \u2014 86,293,760 samples over the three, gated in tests/xocn_variant_gate.rs against hashes of the SDK's planes. Venice ST and 8K previously lost their top and bottom rows (28 and 12 rows; the interiors were already exact) because the band row ranges were formulas in the LL strip count n, read off the LT capture (y0=10, y1=8n-2 and friends) \u2014 those hold only when 8n == h + 12, which is an LT coincidence. The real rule (xocn::phase_chain): the standalone band carries the frame's h rows CENTRED in its 8n coded rows, and every coarser level is the even subset of the level below, so lo = a[k] and y14 = a[k] + n[k] fall out per level and reproduce LT's captured constants exactly. Settled by MEASURING the bitstream \u2014 strips are byte-aligned, so the row count of a strip is the count whose decode consumes its byte size (harness xocnstrip) \u2014 not by sweeping constants. The write-side dy row shift that used to paper over the phase is gone. SBRf/VENICE 2 decodes through the same path but is not yet re-gated byte-exact (fixture on PARIS)"},{codec:"mpeg2",label:"MPEG-2 / MPEG-1",full:!0,preview:!0,luma:!0,scrubPreview:!1,backend:"wasm",notes:"media-core's own decoder (2026-10-27): XDCAM HD422/EX, HDV, IMX, DVD and broadcast streams in MXF / MOV / PS / TS / ES / AVI through the mcvideo lane (video_open/video_decode, rust video::lane \u2192 video::mpeg2_range): long-GOP from the I frame before the window, display order from the stream's own temporal references; a miss decodes a window of frames and keeps it. decode_mpeg2_{rgba,preview,luma} are the I-frame sample tiers (DC-only 1/8 colour preview). Gated sample-identical to ffmpeg (tests/mpeg2_gate.rs)"},{codec:"dv",label:"DV / DVCPRO / DVCPRO HD",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"media-core's own decoder (2026-10-27), all-intra: DV25 / DVCPRO50 / DVCPRO HD in MXF / MOV / AVI / raw .dv through the mcvideo lane; scrub rides the DC-only 1/8 colour preview, park upgrades to full. decode_dv_{rgba,preview,luma} are the frame tiers. Gated vs ffmpeg (tests/dv_gate.rs)"},{codec:"qtraw",label:"QuickTime raw / Animation / Motion-JPEG",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"wasm",notes:"media-core's codecs::qtraw through the mcvideo lane (2026-10-27): uncompressed raw/2vuy/v210, Animation (rle \u2014 a delta codec, painted forward from the sync sample before the window), Motion-JPEG (jpeg/mjpa/AVDJ/dmb1 on media-core's JPEG decoder, the JPEG's own raster); clean aperture applied. No browser decodes any of them. Gated vs ffmpeg (media-native mov_simple tests; RGB/Animation lossless-identical)"},{codec:"legacy",label:"Legacy & web video (MPEG-4 Part 2, H.263 / Sorenson, DivX 3, VC-1 / WMV, VP6, Cinepak, SVQ3, AV1)",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"wasm",notes:"media-core's legacy decoders through the mcvideo lane (2026-10-27): MOV / MP4 / 3GP, Matroska / WebM, AVI, ASF / WMV, FLV (H.264 in AVI / ASF / FLV too \u2014 only this reader indexes them). Sample-identical to ffmpeg 7.1.1 on 378 of 379 SAN files (the one is ffmpeg concealing a WMV9 picture it misreads); AV1 34,606 / 34,606 frames. Not covered: interlaced VC-1 / VP6, H.263 PB-frames, MS-MPEG4 v1/v2, WMV1/2, AV1 profiles 1/2 and 12-bit"},{codec:"uncompressed",label:"Uncompressed MXF",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"wasm",notes:"Avid 1:1 / alpha mattes / SMPTE 384 uncompressed pictures through the mcvideo lane (qtraw::decode_mxf_uncompressed by the descriptor's PictureLayout, 2026-10-27). Not yet gated against a browser-side fixture (no ffmpeg recipe writes one)"}],h=new Map(u.map(t=>[t.codec,t]));function a(t){let e=(t??"").toLowerCase().trim();return e?e==="aprn"||e==="aprh"?"prores_raw":e==="prores_mxf"||e.startsWith("ap")?"prores":e==="arriraw-alev3"?"arriraw":e==="avc1"||e==="avc3"||e==="h264"?"h264":e.startsWith("hvc")||e.startsWith("hev")||e==="h265"?"hevc":e.startsWith("avd")||e==="dnxh"||e==="dnxhd"?"dnxhr":e==="redcode"?"r3d":e==="h264_wasm"?"h264":e==="hevc_wasm"?"hevc":h.has(e)?e:null:null}function p(t){let e=(t??"").toLowerCase().trim();if(!e)return null;if(e==="aprn"||e==="aprh"||a(e)==="prores_raw"||e==="ap4h"||e==="ap4x")return 12;if(e.startsWith("ap"))return 10;let r=a(e);return r==="r3d"?16:r==="arriraw"||r==="braw"?12:r==="xocn"?16:r==="crm"?12:/dnxhr.?(hqx|444)/.test(e)?10:null}function b(t,e){if(typeof e!="number")return null;let r=a(t);return r==="h264"?[66,77,88,100].includes(e)?8:e===110?10:null:r==="hevc"?e===1?8:e===2?10:null:null}function w(t){let e=(t??"").toLowerCase().trim();if(!e)return null;if(e==="ap4h"||e==="ap4x")return"4:4:4";let r=a(e);return r==="prores_raw"||r==="r3d"||r==="arriraw"||r==="braw"||r==="xocn"||r==="crm"?"bayer":r==="prores"?"4:2:2":/dnxhr.?444/.test(e)?"4:4:4":/dnxhr.?(hqx|hq|sq|lb)/.test(e)?"4:2:2":null}function v(t){let e=t.toLowerCase().replace(/[^0-9a-z]/g,"");return e==="bayer"||e==="raw"?"bayer":e.length>=3&&/^\d+$/.test(e)?e.split("").join(":"):e}function c(t){let e=a(t);return e==="prores"||e==="h264"||e==="hevc"?e:"other"}var f={prores:"ProRes",h264:"H.264",hevc:"HEVC",r3d:"R3D",arriraw:"ARRIRAW",xocn:"X-OCN",vc3:"DNxHR",braw:"BRAW",proresraw:"ProRes RAW",other:"unsupported"};function y(t){return f[t]??"unsupported"}function m(t){let e=JSON.parse(t),r=e.frames??[],o=r.length>>1,s=new Array(o);for(let n=0,i=0;i<o;n+=2,i++)s[i]={offset:r[n],size:r[n+1]};return{offs:s,codec:e.codec,kind:c(e.codec),w:e.width,h:e.height,fps:e.fps??null,startFrame:e.start_frame??0,dropFrame:e.drop_frame??!1}}async function R(t){await l();let r=await d((o,s)=>t.slice(o,o+s).arrayBuffer().then(n=>new Uint8Array(n)),t.size,"mov");return m(r)}export{a,p as b,b as c,w as d,v as e,y as f,m as g,R as h};
|
package/dist/chunk-DQGINJDV.js
DELETED
|
@@ -1,5 +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 L,B as P,C as S,D as T,E as A,F as D,v as x,w as C,x as j,y as R,z as E}from"./chunk-QVH44I66.js";import{V as f,q as v}from"./chunk-PLRB2YXJ.js";async function q(i,t){let c=t.media_root?[t.media_root]:await T();if(!c.length)throw new Error("no media_root given and no remembered locations \u2014 pass the folder to link from");for(let e of c)try{if(!(await v(e)).isDirectory)throw 0}catch{throw new Error(`media_root is not a folder on this machine: ${e}`)}let r=C(i,{ref_ids:t.ref_ids,lane:t.lane,reset:t.reset});if(!r.length)return{session:i,changed:!1,note:"",text:"nothing in scope: every reference in scope is already linked (use reset=true to re-point) or the ids/lane matched nothing"};if(t.reset)for(let e of r)e.binding_state="unbound",delete e.coverage_reason;let h=[],_=!1,u=[];for(let e of c)if(t.gather==="path")for(let n of r){let p=n.local_path??n.target_url??"",s=p?await R(e,p):null;s?h.push(s):u.push(`${n.id} ${f(p)}: not at its recorded path under ${e}`)}else{let n=await j(e,r,t.cap);h.push(...n.paths),_||=n.capped}let{refs:$,failed:g}=await E([...new Set(h)]);t.remember&&t.media_root&&await A(t.media_root);let o=x(t.criteria),a=L(i,r,$,o,t.tolerances),M=t.criteria?.picture?await P(i,a):[],w=[`scope: ${r.length} reference(s)${t.lane!=="both"?` (${t.lane} lane)`:""}${t.ref_ids?` (zone of ${t.ref_ids.length})`:""}; gather=${t.gather} under ${c.join(", ")}: ${$.length} candidate clip(s)${_?` (CAPPED at ${t.cap} \u2014 narrow the folder)`:""}`,`criteria: ${[...Object.entries(o).filter(([,e])=>e===!0).map(([e])=>e),...t.criteria?.picture?["picture"]:[]].join(", ")}${o.fileName?` (${o.fileNameMode})`:""}${o.fileExtensions?`; ext ${o.fileExtensions}`:""}; timecode containment + fps always on`,...g.length?[`could not probe ${g.length}: ${g.slice(0,5).join("; ")}`]:[],...u.slice(0,20),...M.slice(0,40)];if(t.dry_run)return{session:i,changed:!1,note:"",text:[...w,D(i,a,{compare:t.compare}),"(dry run \u2014 nothing changed; pass accept=[{ref_id,candidate_id}] to commit chosen rows, or run again without dry_run to apply every matched row)"].join(`
|
|
4
|
-
`)};let d,l=[];if(t.accept?.length){d=[];for(let e of t.accept){let n=a.rows.find(s=>s.ref_id===e.ref_id);n&&(n.candidate?.id===e.candidate_id||n.alternatives.some(s=>s.id===e.candidate_id))?d.push(e):l.push(`${e.ref_id} \u2192 ${e.candidate_id}: not a proposed match or alternative for that reference`)}}else d=a.rows.filter(e=>e.status==="matched"&&e.candidate).map(e=>({ref_id:e.ref_id,candidate_id:e.candidate.id}));let m=S(i,a,d),b=m.session.media_references??[],k=b.filter(e=>r.some(n=>n.id===e.id)&&e.binding_state==="linked").length,N=m.applied,y=b.filter(e=>r.some(n=>n.id===e.id)&&e.binding_state!=="linked").map(e=>` - ${e.id} ${f(e.target_url??"")}: ${e.coverage_reason??(a.rows.find(n=>n.ref_id===e.id)?.status==="ambiguous"?"ambiguous \u2014 pick one with accept":"no file matched")}`),z=[...w,`Linked ${k} of ${r.length}${l.length?`; ${l.length} pick(s) vetoed`:""}`,...N.map(e=>`- ${e.ref_id}: ${f(e.before.path??"?")} \u2192 ${e.after.path}${e.warning?` \u26A0 ${e.warning}`:""}`),...l.map(e=>` \u2717 ${e}`),...y.length?["unresolved:",...y]:[]].join(`
|
|
5
|
-
`);return{session:m.session,changed:!0,note:`relink ${t.gather} ${c[0]} (${k}/${r.length})`,text:z}}export{q as a};
|