conformtools 0.6.20 → 0.6.22

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 (83) hide show
  1. package/dist/account-ZGDVLMZA.js +3 -0
  2. package/dist/{agent-hook-setup-D2QNHA3V.js → agent-hook-setup-ZY4UBZIG.js} +1 -1
  3. package/dist/{analysis-engine-VNGF3DE4.js → analysis-engine-BBOSGAB2.js} +1 -1
  4. package/dist/{bridge-MLBUD6XW.js → bridge-56MINHUF.js} +1 -1
  5. package/dist/browser/timeline_core_bg.wasm +0 -0
  6. package/dist/{chunk-2WNNDPVR.js → chunk-3KS3547B.js} +1 -1
  7. package/dist/{chunk-L2RTMZCN.js → chunk-4I4MV3DE.js} +1 -1
  8. package/dist/{chunk-OSPDH2RK.js → chunk-64AMZWOI.js} +1 -1
  9. package/dist/{chunk-6IL7M3VP.js → chunk-65SLDY2M.js} +72 -72
  10. package/dist/{chunk-3WJSWOCS.js → chunk-67VLJJ75.js} +2 -2
  11. package/dist/{chunk-EWW5KWAO.js → chunk-6C3EEZH3.js} +1 -1
  12. package/dist/{chunk-4UT55WZA.js → chunk-BFN565RJ.js} +1 -1
  13. package/dist/{chunk-WYI4LL4P.js → chunk-CHEQJC4U.js} +190 -190
  14. package/dist/{chunk-A7AYMSY7.js → chunk-DHDSDH6R.js} +2 -2
  15. package/dist/chunk-E75BCWXY.js +4 -0
  16. package/dist/{chunk-V2FVIZT7.js → chunk-FSXF4K3J.js} +1 -1
  17. package/dist/{chunk-M545OKDZ.js → chunk-HNEKQMQG.js} +1 -1
  18. package/dist/chunk-IW5M45CL.js +3 -0
  19. package/dist/{chunk-2GRXBIJB.js → chunk-JGI5YEGH.js} +1 -1
  20. package/dist/chunk-JUJESM4P.js +3 -0
  21. package/dist/{chunk-567IWIX6.js → chunk-M3DXHHD7.js} +1 -1
  22. package/dist/chunk-NHWWMLZW.js +5 -0
  23. package/dist/{chunk-HROU7LLU.js → chunk-O5HYVCFL.js} +1 -1
  24. package/dist/chunk-OCNKVM26.js +7 -0
  25. package/dist/{chunk-HCT34NDA.js → chunk-OVBFJOO2.js} +1 -1
  26. package/dist/{chunk-ATEWMIY5.js → chunk-PKKUIGZ5.js} +1 -1
  27. package/dist/{chunk-GBNPOZ32.js → chunk-QNVFSA7C.js} +1 -1
  28. package/dist/{chunk-ZAL7Y5VZ.js → chunk-QPSQQEO6.js} +1 -1
  29. package/dist/{chunk-2DEUYEQD.js → chunk-REBF4U5B.js} +1 -1
  30. package/dist/{chunk-2S2ZPQQD.js → chunk-REGL3GQB.js} +1 -1
  31. package/dist/{chunk-4V3KLFCJ.js → chunk-TFKKODSA.js} +1 -1
  32. package/dist/{chunk-JVJUJKUP.js → chunk-Z3LQ56WS.js} +1 -1
  33. package/dist/{chunk-LUKA7UUJ.js → chunk-ZCQTIYXB.js} +1 -1
  34. package/dist/chunk-ZPIY5DOU.js +3 -0
  35. package/dist/{claude-setup-AI4WXN2V.js → claude-setup-6RMV3QZM.js} +1 -1
  36. package/dist/cli.js +2 -2
  37. package/dist/{cr3-wasm-DIWL7CPH.js → cr3-wasm-HWPQ3QAN.js} +1 -1
  38. package/dist/{dng-wasm-PE463PG2.js → dng-wasm-D7HO2OUE.js} +1 -1
  39. package/dist/{dpx-wasm-DKE3LJ6Z.js → dpx-wasm-ASRFRLRT.js} +1 -1
  40. package/dist/{exr-wasm-HAFH3YA5.js → exr-wasm-Y53DGEKJ.js} +1 -1
  41. package/dist/flame/hook/conformtools_flame/verbs.py +21 -4
  42. package/dist/framing-JYGNU6TH.js +3 -0
  43. package/dist/gfx-worker.js +1 -1
  44. package/dist/{h264-4ETGWMKR.js → h264-ZJCLCYYY.js} +1 -1
  45. package/dist/{h264-mxf-EFHHQL7X.js → h264-mxf-BI4ACQUH.js} +1 -1
  46. package/dist/{host-relink-MVHI3YQI.js → host-relink-XMVOQYKN.js} +1 -1
  47. package/dist/hosted-7KVSASRJ.js +3 -0
  48. package/dist/hosts-ZPBLYFYP.js +3 -0
  49. package/dist/http.js +4 -4
  50. package/dist/{inspect-5TMUYGAL.js → inspect-4RF2SDJR.js} +16 -17
  51. package/dist/{isobmff-55TPOVCK.js → isobmff-FZBZCEYH.js} +1 -1
  52. package/dist/{mc-video-GKWEWCEQ.js → mc-video-IUPFHPIS.js} +1 -1
  53. package/dist/mcp.js +1 -1
  54. package/dist/{media-HCKSVARE.js → media-R677IADY.js} +1 -1
  55. package/dist/{media_core-XOKN7UUF.js → media_core-KHSB6EFN.js} +2 -2
  56. package/dist/mxf-IUCZVILV.js +3 -0
  57. package/dist/{ops-UGZODMYE.js → ops-L5X3Q6SQ.js} +1 -1
  58. package/dist/{probe-YOYK7HR5.js → probe-VB6JH6ZJ.js} +1 -1
  59. package/dist/{r3d-EKISZSKU.js → r3d-EIQEVYGC.js} +1 -1
  60. package/dist/{r3d-XHSJUARW.js → r3d-VBXKIIRY.js} +1 -1
  61. package/dist/resolve-bridge.py +208 -13
  62. package/dist/{sequence-patch-5MFTY52Q.js → sequence-patch-OHYBBKKZ.js} +1 -1
  63. package/dist/{still-IDLCMQRD.js → still-XAFHXXC3.js} +1 -1
  64. package/dist/{still-wasm-54HEDTRX.js → still-wasm-ZG6PA67L.js} +1 -1
  65. package/dist/{store-6XN5Q6UG.js → store-ZXNF2RXS.js} +1 -1
  66. package/dist/{tiff-wasm-O7XUGXIO.js → tiff-wasm-AHQJJAK2.js} +1 -1
  67. package/dist/timeline-LJYGRP3R.js +3 -0
  68. package/dist/wasm/media_core_bg.wasm +0 -0
  69. package/dist/wasm-threads/media_core_bg.wasm +0 -0
  70. package/dist/{wav-OLA3QYFJ.js → wav-4COVRAK3.js} +1 -1
  71. package/package.json +5 -5
  72. package/dist/account-VD3EE5UT.js +0 -3
  73. package/dist/chunk-2XQ42O7E.js +0 -7
  74. package/dist/chunk-COALWMI7.js +0 -4
  75. package/dist/chunk-GHP6HDLM.js +0 -3
  76. package/dist/chunk-IPQLKAF2.js +0 -4
  77. package/dist/chunk-MU5AGXSH.js +0 -3
  78. package/dist/chunk-Y7PFSVRX.js +0 -3
  79. package/dist/framing-U46POZQG.js +0 -3
  80. package/dist/hosted-6BLHLZXM.js +0 -3
  81. package/dist/hosts-7UO4QETB.js +0 -3
  82. package/dist/mxf-AJTCMKTX.js +0 -3
  83. package/dist/timeline-TFF3L7JP.js +0 -3
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{readFile as S,writeFile as H,appendFile as q,stat as W,readdir as G,mkdir as _,open as U,copyFile as Y,mkdtemp as K,rm as P,chmod as V,rename as B,cp as X,statfs as Z,realpath as Q}from"node:fs/promises";import{execFile as ee,spawn as j}from"node:child_process";import{createHash as te}from"node:crypto";import{createReadStream as re,chmodSync as ne,cpSync as oe,existsSync as E,statSync as M}from"node:fs";import{homedir as se,hostname as ie,tmpdir as ae,platform as ce,release as le,arch as ue,totalmem as de,availableParallelism as me}from"node:os";import{fileURLToPath as O}from"node:url";import fe from"node:http";import pe from"node:http2";import f from"node:process";import{setTimeout as ge}from"node:timers";import{Buffer as $}from"node:buffer";import{basename as ye,dirname as we,join as h,resolve as C,sep as v}from"node:path";import{createRequire as be}from"node:module";import{basename as Tt,dirname as Dt,extname as Et,join as Mt,relative as Ct,resolve as Nt}from"node:path";{let e=globalThis.fetch,t=typeof globalThis.Deno<"u";e&&!t&&(globalThis.fetch=(async(r,o)=>{let n=typeof r=="string"?r:r instanceof URL?r.href:r.url;if(n.startsWith("file:")){let s=await S(O(n)),i=n.endsWith(".wasm")?"application/wasm":"application/octet-stream";return new Response(s,{status:200,headers:{"content-type":i}})}return e(r,o)}))}var w=e=>f.env[e];function Ie(e,t){ge(e,t).unref()}var He=()=>Number(w("CONFORM_MEMORY_GB")??0)*2**30||de(),We=()=>me(),_e=()=>f.argv.slice(2),Be=e=>f.exit(e),he=()=>f.platform,je=()=>ie(),ze=()=>w("CONFORM_PYTHON")??(he()==="win32"?"python":"python3"),Le=()=>f.arch,z=()=>`${f.platform}-${f.arch}`;function Je(e){try{return h(we(be(import.meta.url).resolve(`${xe(z())}/package.json`)),e)}catch{return null}}var xe=e=>`conformtools-${e==="win32-x64"?"windows-x64":e}`,qe=e=>`${e} is not in this package for ${z()} (conform.tools builds it for darwin-arm64, darwin-x64, linux-x64 and win32-x64)`;function Ge(){let e=f.versions.deno,t=w("CONFORM_APP_VERSION"),r=e?`deno ${e}`:`node ${f.version}`;return{platform:`${ce()} ${le()} ${ue()}`,runtime:t&&/^[0-9A-Za-z.-]{1,32}$/.test(t)?`${r} app ${t}`:r}}var ve=()=>w("CONFORM_MCP_HOME")??h(A(),".conform-mcp"),A=()=>w("HOME")??se();function Ye(e){let t=e.trim();if(t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),/^file:\/\//i.test(t))try{t=O(t)}catch{}return t==="~"?t=A():(t.startsWith("~/")||t.startsWith("~\\"))&&(t=h(A(),t.slice(2))),t&&C(t)+(/[\\/]$/.test(t)&&!/[\\/]$/.test(C(t))?v:"")}async function Ke(e,t){let r=await import("node:sqlite").catch(()=>null);if(r?.DatabaseSync){let n=new r.DatabaseSync(e,{readOnly:!0});try{let s=n.prepare(t);return s.setReadBigInts(!0),s.all().map(i=>Object.fromEntries(Object.entries(i).map(([c,l])=>[c,typeof l=="bigint"?Number(l):l])))}finally{n.close()}}let o=await F("sqlite3",["-readonly","-json",e,t]);if(!o.success)throw new Error(`sqlite3 ${ye(e)}: ${o.stderr.trim()||o.stdout.trim()}`);return o.stdout.trim()?JSON.parse(o.stdout):[]}var Ve=(e,t)=>e?`${e.replace(/[\\/]+$/,"")}${e.includes("\\")&&!e.includes("/")?"\\":"/"}${t}`:t;function Xe(e){let t=O(e),r=t.indexOf(`${v}deno-compile-`);if(r<0||!E(t))return t;let o=t.slice(r+1).split(v).slice(1).join(v),n=h(ve(),"bin",o);try{let s=M(t),i=E(n)?M(n):null;return(!i||s.isFile()&&(i.size!==s.size||i.mtimeMs<s.mtimeMs))&&(oe(t,n,{recursive:!0,force:!0}),s.isFile()&&ne(n,493)),n}catch{return t}}var N=null;var x=e=>N?.owns(e)?N:null;async function I(e){let t=await W(e);return{isFile:t.isFile(),isDirectory:t.isDirectory(),size:t.size,mtimeMs:t.mtimeMs}}function R(e){return x(e)?.stat(e,()=>I(e))??I(e)}async function Ze(e){try{return await R(e),!0}catch{return!1}}async function Qe(e){try{return(await R(e)).isFile}catch{return!1}}async function et(e){try{return(await R(e)).isDirectory}catch{return!1}}async function tt(e){x(e)?.guard(e,"read whole file");let t=await S(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var rt=e=>S(e,"utf8"),nt=(e,t)=>H(e,t),ot=(e,t,r)=>r?.append?q(e,t):H(e,t);async function st(e){await _(e,{recursive:!0})}async function it(e,t={}){let r=Date.now()+(t.timeoutMs??5e3),o=t.staleMs??15e3;for(;;)try{await _(e);break}catch(n){if(n.code!=="EEXIST")throw n;try{if(Date.now()-(await R(e)).mtimeMs>o){await P(e,{recursive:!0,force:!0});continue}}catch{}if(Date.now()>r)break;await new Promise(s=>setTimeout(s,25))}return()=>P(e,{recursive:!0,force:!0}).catch(()=>{})}var at=e=>P(e,{force:!0}),ct=(e,t)=>V(e,t).catch(()=>{}),lt=(e,t)=>Y(e,t),ut=(e,t)=>B(e,t),dt=e=>P(e,{recursive:!0,force:!0}),mt=(e,t)=>X(e,t,{recursive:!0,verbatimSymlinks:!0});async function ft(e){try{let t=await Z(e);return Number(t.bavail)*Number(t.bsize)}catch{return null}}async function pt(e){try{return await Q(e)}catch{return null}}var gt=()=>f.ppid,yt=(e="conform-")=>K(h(ae(),e));async function*wt(e){let t=async()=>(await G(e,{withFileTypes:!0})).map(r=>({name:r.name,isFile:r.isFile(),isDirectory:r.isDirectory()}));yield*await(x(e)?.readDir(e,t)??t())}async function bt(e){x(e)?.guard(e,"read bytes");let t=await U(e,"r"),r=(await t.stat()).size;return{path:e,size:r,async readAt(o,n){let s=new Uint8Array(n),i=0;for(;i<n;){let{bytesRead:c}=await t.read(s,i,n-i,o+i);if(!c)break;i+=c}return i===n?s:s.subarray(0,i)},close:()=>t.close()}}async function ht(e){let t=await U(e,"w");return{async writeAt(r,o){let n=0;for(;n<o.length;){let{bytesWritten:s}=await t.write(o,n,o.length-n,r+n);n+=s}},truncate:r=>t.truncate(r),close:()=>t.close()}}var L=(e,t)=>{for(let r of t)x(r)?.guard(r,`${e.split(/[\\/]/).pop()} ${t[0]}`)};function F(e,t,r={}){return L(e,t),new Promise(o=>{ee(e,t,{maxBuffer:1<<30,env:r.env?{...f.env,...r.env}:void 0,timeout:r.timeoutMs},(n,s,i)=>{let c=n?.code??0;o({success:!n,code:c,stdout:String(s),stderr:String(i)})})})}var Pe="[Console]::OutputEncoding=[Text.Encoding]::UTF8;$t=@{};Get-Process|?{$_.MainWindowTitle}|%{$t[$_.Id]=$_.MainWindowTitle};ConvertTo-Json -Compress -InputObject @(Get-CimInstance Win32_Process|%{[pscustomobject]@{pid=[int]$_.ProcessId;exe=$_.ExecutablePath;cmd=$_.CommandLine;title=$t[[int]$_.ProcessId]}})";async function xt(){let e=await F("powershell.exe",["-NoProfile","-NonInteractive","-Command",Pe],{timeoutMs:3e4});return $e(e.stdout)}function $e(e){let t;try{t=JSON.parse(e.replace(/^/,"").trim()||"[]")}catch{return[]}return(Array.isArray(t)?t:[t]).flatMap(r=>{let o=r??{},n=Number(o.pid);return!Number.isInteger(n)||n<=0?[]:[{pid:n,args:String(o.cmd||o.exe||""),title:typeof o.title=="string"?o.title:""}]})}function vt(e,t,r,o={}){return L(e,t),new Promise((n,s)=>{let i=j(e,t,{env:o.env?{...f.env,...o.env}:void 0,stdio:["ignore","pipe","pipe"]}),c="";i.stdout.on("data",l=>r(l)),i.stderr.on("data",l=>{c+=new TextDecoder().decode(l)}),i.on("error",s),i.on("close",l=>n({code:l,stderr:c})),o.signal?.addEventListener("abort",()=>i.kill(),{once:!0})})}function Pt(e,t,r,o,n={}){let s=j(e,t,{stdio:["pipe","pipe","pipe"],env:n.env?{...f.env,...n.env}:void 0});s.stdin.on("error",()=>{}),s.stdout.on("data",a=>r(a)),s.stderr.on("data",a=>o?.(new TextDecoder().decode(a)));let i=new Promise(a=>{s.on("close",u=>a(u)),s.on("error",()=>a(null))}),c=[s,s.stdout,s.stderr,s.stdin],l=a=>{for(let u of c)(a?u.ref:u.unref)?.call(u)};return l(!1),{write:a=>new Promise((u,p)=>{s.stdin.write(a,m=>m?p(m):u())}),hold:l,close:()=>{try{s.stdin.end(),s.kill()}catch{}},exited:i}}async function $t(e){if(w("CONFORM_NO_BROWSER"))return!1;let[t,r]=f.platform==="darwin"?["open",[e]]:f.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];return(await F(t,r)).success}function Rt(e,t){let r=fe.createServer(async(o,n)=>{try{let s=[];if(o.method!=="GET"&&o.method!=="HEAD")for await(let p of o)s.push(p);let i=s.length>0,c=new Headers;for(let[p,m]of Object.entries(o.headers))m!=null&&c.set(p,Array.isArray(m)?m.join(", "):m);let l=`http://${o.headers.host??`${e.hostname}:${e.port}`}${o.url??"/"}`,a=new AbortController;n.on("close",()=>{n.writableEnded||a.abort()});let u=await t(new Request(l,{method:o.method,headers:c,body:i?$.concat(s):void 0,signal:a.signal}));if(n.statusCode=u.status,u.headers.forEach((p,m)=>n.setHeader(m,p)),u.body&&u.headers.get("content-type")?.startsWith("text/event-stream")){n.flushHeaders();let p=u.body.getReader();for(a.signal.addEventListener("abort",()=>void p.cancel(),{once:!0});;){let{value:m,done:g}=await p.read();if(g)break;n.write(m)}n.end();return}n.end($.from(await u.arrayBuffer()))}catch(s){n.statusCode=500,n.end(JSON.stringify({ok:!1,code:"internal",message:s instanceof Error?s.message:String(s)}))}});return r.listen(e.port,e.hostname,()=>{let o=r.address();e.onListen?.(typeof o=="object"&&o?o.port:e.port)}),{close:()=>r.close()}}var y=class extends Error{constructor(r,o,n){super(o);this.code=r;this.grpcStatus=n}};function kt(e,t,r,o,n){return new Promise((s,i)=>{let c=pe.connect(`http://${e}:${t}`),l=!1,a=(d,J)=>{l||(l=!0,clearTimeout(p),c.destroy(),d?i(d):s(J))},u=!1;c.on("connect",()=>{u=!0});let p=setTimeout(()=>a(u?new y("deadline",`no answer from ${e}:${t} in ${n} ms`):new y("unavailable",`${e}:${t}: no connection in ${n} ms`)),n);c.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`)));let m=$.alloc(5+o.length);m.writeUInt32BE(o.length,1),m.set(o,5);let g=c.request({":method":"POST",":path":r,"content-type":"application/grpc",te:"trailers"}),T=[],b,k="",D=d=>{d["grpc-status"]!=null&&(b=String(d["grpc-status"]),k=decodeURIComponent(String(d["grpc-message"]??"")))};g.on("response",D),g.on("trailers",D),g.on("data",d=>T.push(d)),g.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`))),g.on("end",()=>{if(b!=="0")return a(new y("grpc",`grpc-status ${b??"missing"}${k?`: ${k}`:""}`,b==null?void 0:Number(b)));let d=$.concat(T);if(d.length<5||d[0]!==0)return a(new y("grpc","reply is not one uncompressed gRPC message"));a(null,new Uint8Array(d.subarray(5,5+d.readUInt32BE(1))))}),g.end(m)})}async function At(e){let t=te("sha256");for await(let r of re(e))t.update(r);return t.digest("hex")}async function St(e,t,r){let o=`${t}.part`;for(let n=0;;n++){let s=0;try{s=(await W(o)).size}catch{}try{let i=await fetch(e,{headers:s?{Range:`bytes=${s}-`}:{}});if(i.status===416)break;if(!i.ok||!i.body)throw new Error(`${e} answered ${i.status}`);s&&i.status!==206&&(s=0);let c=s+Number(i.headers.get("content-length")??0),l=await U(o,s?"a":"w");try{let a=s;for await(let u of i.body)await l.write(u),a+=u.length,r?.(a,c)}finally{await l.close()}break}catch(i){if(n>=4)throw i;await new Promise(c=>setTimeout(c,2e3*(n+1)))}}await B(o,t)}function Ut(e){let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)}export{O as a,w as b,Ie as c,He as d,We as e,_e as f,Be as g,he as h,je as i,ze as j,Le as k,Je as l,qe as m,Ge as n,ve as o,A as p,Ye as q,Ke as r,Ve as s,Xe as t,R as u,Ze as v,Qe as w,et as x,tt as y,rt as z,nt as A,ot as B,st as C,it as D,at as E,ct as F,lt as G,ut as H,dt as I,mt as J,ft as K,pt as L,gt as M,yt as N,wt as O,bt as P,ht as Q,F as R,xt as S,vt as T,Pt as U,$t as V,Rt as W,y as X,kt as Y,At as Z,St as _,Ut as $,Tt as aa,Dt as ba,Et as ca,Mt as da,Ct as ea,Nt as fa};
@@ -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 p,S as f}from"./chunk-C2ESM27Z.js";var m={prproj:"prproj","resolve-drt":"drt",aaf:"aaf",avb:"avb",otio:"otio",capcut:"capcut","flame-archive":"flame","resolve-fcpxml":"fcpxml","finalcut-fcpxml":"fcpxml","fcp-xml":"xmeml","premiere-xml":"xmeml","resolve-xml":"xmeml","baselight-blscene":"blscene"};function j(e){return e in m}var l=null;function c(){return l||(l=b()),l}async function b(){let e=await import("./timeline_core-6BRZG4LP.js"),n=(await import("./timeline_core_bg-5COJCLPG.js")).default;return await e.default({module_or_path:n}),e}async function R(e,n){let o=m[n];if(!o)throw new Error(`timelineInspect: no Rust engine for format '${n}'`);let r=await c(),s=e.name.replace(/\.[^.]+$/,""),t=(_,...y)=>r[_](...y),i;switch(o){case"prproj":i=t("inspect_prproj_json",await a(e));break;case"aaf":i=t("inspect_aaf_json",await a(e));break;case"avb":i=t("inspect_avb_json",await a(e));break;case"flame":i=t("inspect_flame_json",await a(e),s);break;case"drt":i=t("inspect_drt_json",await w(e));break;case"otio":i=t("inspect_otio_json",await e.text(),s);break;case"capcut":i=t("inspect_capcut_json",await e.text(),s);break;case"fcpxml":i=t("inspect_fcpxml_json",await e.text(),s);break;case"xmeml":i=t("inspect_xmeml_json",await e.text(),s);break;case"blscene":i=t("inspect_blscene_json",await a(e),s);break}return v(i)}var d=12*1024*1024,g=!1;function S(e){g=e}var x=null,h=8e3;async function I(){!x||g||await Promise.race([x,new Promise(e=>setTimeout(e,h))])}function u(e,n,o){if(g||e.length<=d)return e;let r=(e.length/1048576).toFixed(0),s=o?.length??0;throw s===1?new Error(`This ${n.toUpperCase()} timeline extracts to ${r} MB, past what our conversion server can hold in one pass (the ceiling is ours, not your file \u2014 a single long timeline can exceed it on its own). Get in touch and we will convert it for you while we lift the limit.`):new Error(`This ${n.toUpperCase()} selection${s?` (${s} sequences)`:""} extracts to ${r} MB, past what our conversion server can hold in one pass. Convert a few sequences at a time \u2014 one long timeline is usually about ${(d/1048576).toFixed(0)} MB. If a single timeline still will not go through, get in touch and we will convert it for you.`)}async function W(e,n,o){let r=m[n];if(!r)throw new Error(`timelineExtract: no Rust engine for format '${n}'`);switch(await I(),r){case"otio":case"capcut":case"fcpxml":case"xmeml":return{fmt:r,extract:await e.text()};case"blscene":{let t=(await c()).extract_blscene_json(await a(e));return{fmt:r,extract:u(t,r,o)}}case"drt":{let t=(await c()).extract_drt_json(await w(e));return{fmt:r,extract:u(t,r,o)}}case"prproj":{let s=await c(),t=JSON.stringify(o??[]),i=s.extract_prproj_json(await a(e),t);return{fmt:r,extract:u(i,r,o)}}case"avb":{let s=await c(),t=JSON.stringify(o??[]),i=s.extract_avb_json(await a(e),t);return{fmt:r,extract:u(i,r,o)}}case"aaf":case"flame":{let t=(await c())[`extract_${r}_json`](await a(e));return{fmt:r,extract:u(t,r,o)}}}}async function a(e){return new Uint8Array(await e.arrayBuffer())}async function w(e){let n=f(await a(e)),o={};for(let[r,s]of Object.entries(n))r.toLowerCase().endsWith(".xml")&&(o[r]=p(s));return JSON.stringify(o)}function v(e){let n=JSON.parse(e),o=Array.isArray(n)?n:n?.timelines??n?.sequences??[],r=o.filter(t=>typeof t=="object"&&t!==null),s=o.map(t=>{if(typeof t=="string")return t;let i=t;return i?.name??i?.title??i?.id??""}).filter(t=>!!t);return{names:Array.from(new Set(s)),timelines:r}}async function A(e){let n=await c();return JSON.parse(n.drt_project_colour(e))}async function k(e){let n=await c();return JSON.parse(n.drx_grade_tree(e))}var C="X-Write-Issues";var P=8*1024;function U(e){if(!e)return[];try{let n=JSON.parse(decodeURIComponent(e));return Array.isArray(n)?n:[]}catch{return[]}}export{j as a,R as b,S as c,W as d,A as e,k as f,C as g,U as h};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{jc as a,kc as b,lc as c,mc as d,nc as e,oc as f,pc as g,qc as h,rc as i,sc as j,tc as k,uc as l,vc as m,wc as n,xc as o}from"./chunk-6IL7M3VP.js";import"./chunk-IN6XVTUS.js";import"./chunk-GBNPOZ32.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-GHP6HDLM.js";import"./chunk-LUKA7UUJ.js";import"./chunk-ATEWMIY5.js";import"./chunk-2GRXBIJB.js";import"./chunk-EWW5KWAO.js";import"./chunk-567IWIX6.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-2DEUYEQD.js";import"./chunk-4V3KLFCJ.js";import"./chunk-2S2ZPQQD.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-IPQLKAF2.js";import"./chunk-Y7PFSVRX.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-L2RTMZCN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{k as ASPECTS,a as INPUT_SCALING,g as SIZING_TARGETS,j as alignText,i as alignTimeline,l as aspectOf,m as blankingForAspect,n as blankingQc,o as blankingText,f as cropUnderRef,c as inputFitRatio,h as offlineLane,d as resolveProps,b as scalingOf,e as underRef};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a,b,c,d}from"./chunk-IPQLKAF2.js";import"./chunk-Y7PFSVRX.js";import"./chunk-C2ESM27Z.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as HOSTED_READ_KEYS,b as readHosted,d as shareOriginal,c as writeHosted};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{g as a,h as b,i as c,j as d}from"./chunk-A7AYMSY7.js";import"./chunk-OSPDH2RK.js";import"./chunk-6IL7M3VP.js";import"./chunk-IN6XVTUS.js";import"./chunk-GBNPOZ32.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-V2FVIZT7.js";import"./chunk-GHP6HDLM.js";import"./chunk-LUKA7UUJ.js";import"./chunk-ATEWMIY5.js";import"./chunk-2GRXBIJB.js";import"./chunk-EWW5KWAO.js";import"./chunk-567IWIX6.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-2DEUYEQD.js";import"./chunk-4V3KLFCJ.js";import"./chunk-2S2ZPQQD.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-IPQLKAF2.js";import"./chunk-Y7PFSVRX.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-L2RTMZCN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as AVID_SETUP,b as FLAME_SETUP,d as adapter,c as setAdapter};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a as N}from"./chunk-AACY2V3L.js";import{b as $}from"./chunk-4V3KLFCJ.js";import{b as J}from"./chunk-2S2ZPQQD.js";import{Ha as l,M,R as P,b as U,ca as D,da as T,e as B,ea as C,fa as E,g as S,ga as L,ia as O,ra as V,ua as W,w as k,wa as G}from"./chunk-L2RTMZCN.js";import"./chunk-PSANHDZM.js";var z=new Uint8Array([6,14,43,52,2,5,1,1,13,1,2,1,1,17,1,0]);function oe(t){e:for(let r=t.length-z.length;r>=0;r--){for(let e=0;e<z.length;e++)if(t[r+e]!==z[e])continue e;return r}return-1}function j(t,r){if(r>=t.byteLength)return[null,0];let e=t.getUint8(r);if(e<128)return[e,1];let n=e&127;if(n===0||n>8||r+1+n>t.byteLength)return[null,1];let a=0;for(let i=0;i<n;i++)a=a*256+t.getUint8(r+1+i);return[a,1+n]}function b(t,r){let e=t.getUint32(r,!1),n=t.getUint32(r+4,!1);return e*4294967296+n}async function Z(t){let r=t.fileSize,e=[];if(r<1024)return e;let a=Math.max(0,r-65536),i=r-a,o=await t.read(a,i);e.push({offset:a,length:i});let s=oe(o);if(s<0)return e;let c=new DataView(o.buffer,o.byteOffset,o.byteLength),[f,re]=j(c,s+16);if(f===null||f<16||f>65536)return e;let F=s+16+re;if(F+f>o.length)return e;let A=[],te=new DataView(o.buffer,o.byteOffset+F,f),g=Math.floor((f-4)/12);if(g<1||g>4096)return e;for(let u=0;u<g;u++){let d=b(te,u*12+4);d>=0&&d<r&&A.push(d)}for(let u of A){let d=Math.min(256,r-u),p=await t.read(u,d);if(p.length<80)continue;let _=new DataView(p.buffer,p.byteOffset,p.byteLength),[R,v]=j(_,16);if(R===null)continue;let m=16+v,y,x;if(p.length<m+64){let ie=Math.min(m+64,r-u),h=await t.read(u,ie);if(h.length<m+64)continue;let I=new DataView(h.buffer,h.byteOffset,h.byteLength);y=b(I,m+32),x=b(I,m+40)}else y=b(_,m+32),x=b(_,m+40);let ne=u+16+v+R+y+x,ae=Math.min(ne+65536,r)-u;e.push({offset:u,length:ae})}return e}function H(t,r){let e=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let a=n.source_range.start.value,i=n.source_range.duration.value,o=Math.max(0,Math.floor(a)-r),s=Math.floor(a+i-1)+r;s>=o&&e.push({first_frame:o,last_frame:s})}return e}function se(t,r){let e=[...t].sort((i,o)=>i.offset-o.offset),n=[],a=0;for(let i of e)i.offset>a&&n.push({offset:a,length:i.offset-a}),a=Math.max(a,i.offset+i.length);return a<r&&n.push({offset:a,length:r-a}),n}async function q(t,r,e){let n=H(r,0);if(n.length===0)throw new Error("planMxfTrimsFromItems: no usable trim ranges in items");await l();let a=(o,s)=>t.read(o,s),i=await $(n,e,(o,s)=>V(a,t.fileSize,o,s));return i.map((o,s)=>{let c=JSON.parse(o);return i.length>1&&(c.output_clip_number=s+1,c.output_clip_count=i.length,c.output_part_number=1),c})}async function K(t,r,e){await l();let n=H(r,e),i=await W((s,c)=>t.read(s,c),t.fileSize,JSON.stringify(n));if(i!=="null")return JSON.parse(i);console.warn(`[mxf] no parseable index \u2014 shipping the WHOLE file (${t.fileSize} bytes). The cut's ${n.length} range(s) cannot be addressed; nothing is trimmed.`);let o=(await Z(t)).map(s=>({offset:s.offset,length:s.length}));return{fileSize:t.fileSize,structuralRanges:o,essenceRanges:se(o,t.fileSize),trimInputs:n,wholeFileFallback:!0}}async function Q(t){await l();let e=await G((n,a)=>t.read(n,a),t.fileSize);return JSON.parse(e)}function w(t){return(r,e)=>t.read(r,e)}var Me={async inspect(t){let r=t.parts[0],e=await Q(r);if(!e)return null;let n=e.timecode??null,a=n&&n.fps_denominator>0?n.fps_numerator/n.fps_denominator:null,i=e.width??null,o=e.height??null,s=e.inner_codec==="mpeg2"||e.inner_codec==="dv"?e.inner_codec:null;return{id:r.filename,kind:"external",target_url:r.filename,available_range:a&&e.frame_count?{start:{value:0,rate:a},duration:{value:e.frame_count,rate:a}}:null,reel_name:null,source_timecode:n?.display??null,source_fps:a,source_resolution_w:i,source_resolution_h:o,container:"mxf",codec:s,size_bytes:r.fileSize,streams:[...i||o||a?[{kind:"video",codec:s,width:i??void 0,height:o??void 0,rate:a??void 0,codec_specific:null}]:[],...e.audio?[{kind:"audio",codec:e.audio.codec_fourcc,channels:e.audio.channels??void 0,rate:e.audio.sample_rate??void 0,bit_depth:e.audio.bit_depth??void 0,codec_specific:{fourcc:e.audio.codec_fourcc}}]:[]],decode_provenance:e.decode_provenance??null,vendor_metadata:{frame_count:e.frame_count,...n?{drop_frame:n.drop_frame}:{},...e.inner_codec?{inner_codec:e.inner_codec}:{},...e.truncated?{truncated:!0}:{}},binding_state:"unbound",raw_extraction:{mxf_probe:e},metadata:{}}},async extract(t){await l();let r=t.parts[0],e=JSON.parse(await O(w(r),r.fileSize));return e.length===0?null:{v:1,container:"mxf",codec:"mxf",frame_count:N(e),granularity:"frame",segments:e}},async sparsify(t,r){let e=t.parts[0],n=await K(e,r.items,r.handles);return[{filename:e.filename,fileSize:n.fileSize,structuralRanges:n.structuralRanges,essenceRanges:n.essenceRanges,trimInputs:n.trimInputs,wholeFileFallback:n.wholeFileFallback}]},async trim(t,r){let e=t.parts[0];return q(e,r.items,r.handles)},async decode(t,r,e){await l();let n=t.parts[0],a=w(n),i=await ee(t),o=e.detail==="coarse",s;if(i==="arriraw")s=await S(a,n.fileSize,r,o?"preview:4":"full");else if(i==="arriraw-alev3")s=await B(a,n.fileSize,r,o?"preview:4":"full");else if(i==="dnxhr")s=await M(a,n.fileSize,r,o?"preview":"full");else if(i==="xocn")s=await P(a,n.fileSize,r,o?"preview":"full");else if(i==="prores")s=await k(a,n.fileSize,r,o?"preview":"full");else throw new Error(`mxf decode: no decoder for inner codec '${i}'`);let c=new DataView(s.buffer,s.byteOffset,8);return{width:c.getUint32(0,!0),height:c.getUint32(4,!0),rgba:s.slice(8)}},async decode16(t,r){await l();let e=t.parts[0],n=w(e),a=await ee(t),i;try{if(a==="arriraw"){let o=await ue(t,r);if(o)return o;i=await S(n,e.fileSize,r,"rgb16")}else if(a==="dnxhr")i=await M(n,e.fileSize,r,"rgb16");else if(a==="xocn")i=await P(n,e.fileSize,r,"rgb16");else throw new Error(`mxf decode16: no decoder for inner codec '${a}'`)}catch(o){throw fe(o,a)}return J(i)}};function fe(t,r){let e=typeof t=="string"?t:t instanceof Error?t.message:"";return/has no 16-bit decoder|no rgb16 tier/.test(e)?new Error(`mxf ${r}: has no 16-bit decoder \u2014 ${e}`):t}var X=new WeakMap;async function ue(t,r){if(!!0)return null;try{let e=await import("./arriraw-PS6V532Y.js");if(!await e.arrirawGpuAvailable())return null;let{parseArrirawGpuPayload:n,arrirawFrameToRgb16:a}=await import("./clip-state-B6JOX3JE.js"),i=t.parts[0],o=X.get(t)??null,s=await U(w(i),i.fileSize,r,o?.key),c=n(s,o);if(!c)return null;X.set(t,{key:c.key,state:c.state});let f=await e.decodeArrirawFrameGpu(c.essence,c.state);return f?{width:f.width,height:f.height,rgb16:a(f)}:null}catch{return null}}var Y=new WeakMap;async function ee(t){let r=Y.get(t);if(r)return r;await l();let e=t.parts[0],n=w(e),a="mxf";return await T(n,e.fileSize)?a="arriraw":await D(n,e.fileSize)?a="arriraw-alev3":await E(n,e.fileSize)?a="dnxhr":await L(n,e.fileSize)?a="xocn":await C(n,e.fileSize)&&(a="prores"),Y.set(t,a),a}export{Me as mxfFormat};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{$b as k,Rb as a,Sb as b,Tb as c,Ub as d,Vb as e,Wb as f,Xb as g,Yb as h,Zb as i,_b as j,ac as l,bc as m,cc as n,dc as o,ec as p,fc as q,gc as r,hc as s,ic as t}from"./chunk-6IL7M3VP.js";import"./chunk-IN6XVTUS.js";import"./chunk-GBNPOZ32.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-GHP6HDLM.js";import"./chunk-LUKA7UUJ.js";import"./chunk-ATEWMIY5.js";import"./chunk-2GRXBIJB.js";import"./chunk-EWW5KWAO.js";import"./chunk-567IWIX6.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-2DEUYEQD.js";import"./chunk-4V3KLFCJ.js";import"./chunk-2S2ZPQQD.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-IPQLKAF2.js";import"./chunk-Y7PFSVRX.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-L2RTMZCN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{j as OPERATION_KINDS,a as READ_FORMATS,k as applyOperation,m as applyOperationWithSources,s as consolidate,b as detectFormat,d as detectTimelineFormat,t as judge,r as linkText,g as listClips,i as listFlags,h as listMedia,e as readTimeline,n as resolveTarget,q as routesText,c as sniffFormat,f as summarize,l as trackIndex,p as writeDestination,o as writeTimeline};