hyperframes 0.8.98 → 0.8.99

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 (159) hide show
  1. package/dist/{add-QAX64UD5.js → add-GHUB7AVH.js} +18 -17
  2. package/dist/{animatedGifPrep-5KUI3AAL.js → animatedGifPrep-RZVYVAXD.js} +8 -7
  3. package/dist/{asset-6PAUWV7A.js → asset-MRT34PQQ.js} +2 -2
  4. package/dist/{assetCataloger-FUXNMJYE.js → assetCataloger-BQREHRS2.js} +4 -3
  5. package/dist/{auth-RURB6JL2.js → auth-BBWBKAZF.js} +2 -2
  6. package/dist/{autoUpdate-ZX5GPKIG.js → autoUpdate-BMLRSJPE.js} +2 -2
  7. package/dist/{backgroundChecks-GZ3LYLFZ.js → backgroundChecks-I5JE6HZK.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-2BIKSPOP.js → batchRender-AQN5PRXM.js} +5 -4
  10. package/dist/{beats-FMDUDET7.js → beats-F2YQUUDN.js} +12 -11
  11. package/dist/{benchmark-5NXPAFTK.js → benchmark-RVBTP5TB.js} +14 -13
  12. package/dist/{browser-W5IZK2LF.js → browser-247ZM3UP.js} +11 -10
  13. package/dist/{bundleWithLocalizedFonts-QYS67RJT.js → bundleWithLocalizedFonts-JKJKZR2S.js} +2 -2
  14. package/dist/{capture-Z47X2EG6.js → capture-5BCJWVC7.js} +2 -2
  15. package/dist/{capture-HOXFOHCG.js → capture-QYLHIYKJ.js} +9 -8
  16. package/dist/{catalog-TEUY2DP3.js → catalog-NFO3XKI2.js} +19 -18
  17. package/dist/{check-6KE5ZV6K.js → check-S4WORRJY.js} +34 -32
  18. package/dist/{checkBrowser-F6MKBAL3.js → checkBrowser-UMS7OM7G.js} +33 -31
  19. package/dist/{chunk-45WXLLUL.js → chunk-32Y3HRS3.js} +2 -2
  20. package/dist/{chunk-M7Y4BQAC.js → chunk-4WAMN4IF.js} +1 -1
  21. package/dist/chunk-4Z5O7BTD.js +114 -0
  22. package/dist/{chunk-MRQEWIM3.js → chunk-5LLSHC7N.js} +8 -8
  23. package/dist/{chunk-H5ZRB3SN.js → chunk-6CN2QLB5.js} +3 -3
  24. package/dist/{chunk-6SXRFLBV.js → chunk-6F6EEQNB.js} +5 -12
  25. package/dist/{chunk-UH4PYJXV.js → chunk-7D2QWSXG.js} +1 -1
  26. package/dist/{chunk-OIT6L7OY.js → chunk-AZQLJHAO.js} +1 -1
  27. package/dist/{chunk-DHLZLPIA.js → chunk-CHCKIZRG.js} +8 -8
  28. package/dist/{chunk-B7E6IWMM.js → chunk-EUSLU4BH.js} +1 -1
  29. package/dist/chunk-FOKUJKBN.js +3420 -0
  30. package/dist/{chunk-A67QXF4W.js → chunk-FTPQUXVG.js} +3 -3
  31. package/dist/{chunk-EA5GAMEY.js → chunk-GMECXFAN.js} +1 -1
  32. package/dist/{chunk-QVGB3PQ2.js → chunk-GOI4GCUB.js} +1 -1
  33. package/dist/{chunk-ULER6XBR.js → chunk-HFFR7TN7.js} +1 -1
  34. package/dist/{chunk-J7QMXLNY.js → chunk-HUHJYNST.js} +1 -1
  35. package/dist/{chunk-4CMGNIJD.js → chunk-I6M4GXMC.js} +1 -1
  36. package/dist/{chunk-QPN3GV5R.js → chunk-I77CAR4W.js} +2 -2
  37. package/dist/{chunk-6RC6OPDF.js → chunk-IJ677ALU.js} +9 -9
  38. package/dist/{chunk-UPGW6TTK.js → chunk-IQ4UCWV7.js} +1 -1
  39. package/dist/{chunk-WPP2NJVF.js → chunk-J5ES3BN2.js} +3 -3
  40. package/dist/{chunk-VSVNEDUL.js → chunk-JXXE3SWC.js} +10 -10
  41. package/dist/{chunk-6D7WQM6D.js → chunk-LBZ54I42.js} +1 -1
  42. package/dist/{chunk-KF4BPO7K.js → chunk-M4KS6MJN.js} +4 -4
  43. package/dist/{chunk-IOM5EJZB.js → chunk-MCABWC2G.js} +2 -2
  44. package/dist/{chunk-A7GG3RLG.js → chunk-MDADXVOE.js} +4 -4
  45. package/dist/{chunk-N4H5U5BT.js → chunk-MM7KX3QX.js} +2 -2
  46. package/dist/{chunk-U3ZB2Z53.js → chunk-NDRJHYG6.js} +2 -2
  47. package/dist/{chunk-E6ABDLBN.js → chunk-O5TBFZ7X.js} +3 -3
  48. package/dist/chunk-OFQWTKPW.js +117 -0
  49. package/dist/{chunk-WY7DTUVY.js → chunk-PB2OX2JY.js} +1 -1
  50. package/dist/{chunk-NY4NHA3Y.js → chunk-PUB5XZYL.js} +1 -1
  51. package/dist/{chunk-6P7TUF6Z.js → chunk-R5RF3LGS.js} +1 -1
  52. package/dist/{chunk-RRJU47XY.js → chunk-R6KCZGDI.js} +1 -1
  53. package/dist/{chunk-XMNWWURD.js → chunk-RDMAU7AJ.js} +14 -0
  54. package/dist/{chunk-P7CAZ6YA.js → chunk-T6OPV3KB.js} +3 -3
  55. package/dist/{chunk-TXY724ZK.js → chunk-TEXPOC5V.js} +2 -2
  56. package/dist/{chunk-YVGQM466.js → chunk-TH4APNRP.js} +6 -4
  57. package/dist/{chunk-WFO4PSIZ.js → chunk-TLYU5625.js} +9 -0
  58. package/dist/{chunk-YM2WZIJ7.js → chunk-TMLEIURT.js} +1 -1
  59. package/dist/{chunk-EJQTOUPG.js → chunk-TYA65W4U.js} +4 -4
  60. package/dist/{chunk-XKHIUGY3.js → chunk-USWOTTSP.js} +1 -1
  61. package/dist/{chunk-KVA65K7M.js → chunk-UVUAU3CH.js} +2 -2
  62. package/dist/{chunk-NBQ7RWSG.js → chunk-VBTX4DPW.js} +3 -3
  63. package/dist/{chunk-H7EMX7GA.js → chunk-VW5OMJNG.js} +3 -3
  64. package/dist/{chunk-G7REKKB7.js → chunk-XFVS7YWL.js} +1 -1
  65. package/dist/{chunk-UBSAIOMW.js → chunk-XL2CUGEG.js} +105 -92
  66. package/dist/{chunk-7JABNLBL.js → chunk-XMENEJZ5.js} +5 -5
  67. package/dist/{chunk-5BJFUD4T.js → chunk-XZSH5GS7.js} +4 -4
  68. package/dist/{chunk-CLW66MZ7.js → chunk-Y2CZEJPK.js} +2 -2
  69. package/dist/{clean-GB5Z4WEM.js → clean-65SGSRD3.js} +18 -16
  70. package/dist/cli.js +50 -50
  71. package/dist/{cloud-TEEFEBH2.js → cloud-CBUJO3BE.js} +4 -4
  72. package/dist/{cloudrun-6OB4LUGS.js → cloudrun-ISE6GSUO.js} +6 -5
  73. package/dist/{compare-DVPSR4DL.js → compare-55Y5B73R.js} +28 -26
  74. package/dist/{compiler-CYMKVOVA.js → compiler-QMEZK6CU.js} +4 -3
  75. package/dist/{component-U2INC5IT.js → component-QXUJVQCV.js} +3 -3
  76. package/dist/{compositions-74IQZR7R.js → compositions-ZU4LJ2VE.js} +13 -12
  77. package/dist/{delete-HEYUHORS.js → delete-YCFTXLIQ.js} +5 -3
  78. package/dist/{deterministicFonts-RMJFQXDW.js → deterministicFonts-XS3PGWH5.js} +2 -2
  79. package/dist/{dist-HJFL4ZN5.js → dist-E44WU6LH.js} +1 -1
  80. package/dist/{dist-XAD3AJS3.js → dist-R24TLUYO.js} +13 -11
  81. package/dist/{doctor-ULRZSIUT.js → doctor-R4MX64N7.js} +12 -11
  82. package/dist/{events-DMSH3WM4.js → events-AMCPKS2O.js} +10 -9
  83. package/dist/{events-LESQE4GC.js → events-G2M67K5X.js} +11 -10
  84. package/dist/{feedback-2XHCU2ZK.js → feedback-7PDQW7BY.js} +12 -11
  85. package/dist/{figma-BERLUHLI.js → figma-V3CJKPEP.js} +3 -3
  86. package/dist/fontLocalizeCli.js +11 -10
  87. package/dist/{get-4YBNEMTP.js → get-SVFBRH24.js} +5 -3
  88. package/dist/{gpuPolicy-HKUPBZJK.js → gpuPolicy-BQFPO7UA.js} +8 -7
  89. package/dist/{grade-compare-EPUP4JHB.js → grade-compare-KDJ6L775.js} +28 -26
  90. package/dist/{gsapParser-IQS5TBGJ.js → gsapParser-EZGJSSV5.js} +46 -11
  91. package/dist/{gsapParserAcorn-OYHIHFF5.js → gsapParserAcorn-SZANFUAQ.js} +3 -1
  92. package/dist/{help-7RREVPSW.js → help-EW2PIPB5.js} +1 -1
  93. package/dist/{history-DRM6E3K7.js → history-V7FE6H7U.js} +18 -16
  94. package/dist/hyperframe-runtime.js +1 -1
  95. package/dist/hyperframe.manifest.json +1 -1
  96. package/dist/hyperframe.runtime.iife.js +1 -1
  97. package/dist/hyperframes-player.global.js +1 -1
  98. package/dist/{info-T46MLAIJ.js → info-U32TSQMU.js} +13 -12
  99. package/dist/{init-XUENGFUL.js → init-3S4Y6J5G.js} +23 -22
  100. package/dist/{inspect-UJ6VQ4AQ.js → inspect-WWJPKRGL.js} +29 -27
  101. package/dist/{installer-3EXYDXIP.js → installer-UZSVMUKT.js} +7 -6
  102. package/dist/{keyframes-W3CGZVFU.js → keyframes-Z4R6UFAQ.js} +23 -13
  103. package/dist/{lambda-AORIF7O3.js → lambda-U4WIJQCJ.js} +7 -6
  104. package/dist/{layout-ZWO2PFYM.js → layout-LXW2H5JT.js} +29 -27
  105. package/dist/{lint-363LQDQQ.js → lint-OK2DN3VX.js} +14 -13
  106. package/dist/{lintProject-ESEUOGXF.js → lintProject-4P4C6AN2.js} +1 -1
  107. package/dist/{list-4UY5CXXR.js → list-DTY2BOKI.js} +5 -3
  108. package/dist/{login-GQEPZV6R.js → login-AEKQ24BU.js} +4 -4
  109. package/dist/{media-treatment-ALANZWB6.js → media-treatment-FQQAY66F.js} +14 -13
  110. package/dist/{models-QKXFAS6W.js → models-LXUIU5DC.js} +9 -8
  111. package/dist/{motionShot-BMDELKKS.js → motionShot-XRSPP3G6.js} +12 -11
  112. package/dist/{normalize-audio-IUMGNRZP.js → normalize-audio-KWWA6IIN.js} +12 -11
  113. package/dist/{pipeline-HB3B54ID.js → pipeline-OFFKTFXS.js} +8 -7
  114. package/dist/{play-BPMDBZ4B.js → play-HWFIDZWY.js} +24 -22
  115. package/dist/{preflight-A5GAQUXY.js → preflight-TVCVP5P2.js} +9 -8
  116. package/dist/{present-TVA7OFEX.js → present-EBMTSB5D.js} +19 -17
  117. package/dist/{preview-YPBQWOBV.js → preview-HAWENKYG.js} +20 -19
  118. package/dist/{producer-JX3R2SJD.js → producer-LGG3TOUI.js} +1 -1
  119. package/dist/{projectConfig-D72ZCV4U.js → projectConfig-V53SEFIS.js} +9 -8
  120. package/dist/{publication-NXK5YHOQ.js → publication-7RKKPKLM.js} +6 -5
  121. package/dist/{publish-5OD66ODR.js → publish-TRRFCEMQ.js} +11 -10
  122. package/dist/{remove-background-LBVJV7OI.js → remove-background-HJFT46Z5.js} +9 -8
  123. package/dist/{render-3P4RQGWW.js → render-Q4NHGHBP.js} +16 -14
  124. package/dist/{render-WV3L66CZ.js → render-TDTMQSYX.js} +24 -23
  125. package/dist/{render-ZI2B2XFE.js → render-TPZ5FXHS.js} +5 -4
  126. package/dist/{render-batch-S3H4HVUJ.js → render-batch-4ZF5C2LN.js} +5 -4
  127. package/dist/{renderCancellation-O6XHCGN6.js → renderCancellation-4PYGAN5D.js} +8 -7
  128. package/dist/renderSetupWorker.js +1 -1
  129. package/dist/{resolver-Y3I7ADOB.js → resolver-4JRJPC6S.js} +7 -6
  130. package/dist/{sherpa-NIP27UXM.js → sherpa-MNCWRFD4.js} +11 -9
  131. package/dist/{skills-QIN53D3I.js → skills-FKUY5J3V.js} +13 -12
  132. package/dist/{skillsUpdateCheck-2QDUGU26.js → skillsUpdateCheck-VRGY5IRQ.js} +3 -3
  133. package/dist/{snapshot-U4QNSCIR.js → snapshot-OSW3KFRL.js} +29 -27
  134. package/dist/{src-BH62F364.js → src-QF6RYX76.js} +10 -9
  135. package/dist/{src-3CKPQCXW.js → src-QX5PPANW.js} +7 -6
  136. package/dist/{staticProjectServer-2XMNYJTA.js → staticProjectServer-TEVGFDXU.js} +18 -16
  137. package/dist/{status-RP5AM4YY.js → status-C3IDZFDG.js} +8 -7
  138. package/dist/studio/assets/{hyperframes-player-C6muFtfk.js → hyperframes-player-Rml34FRW.js} +1 -1
  139. package/dist/studio/assets/{index-itc1XziP.js → index-CVDArg3m.js} +178 -178
  140. package/dist/studio/assets/{index-B6vU39NM.js → index-C_fi-jTe.js} +1 -1
  141. package/dist/studio/assets/{index-BxnoLgxG.js → index-D9YzDuBx.js} +1 -1
  142. package/dist/studio/index.html +1 -1
  143. package/dist/studio/index.js +542 -373
  144. package/dist/studio/index.js.map +1 -1
  145. package/dist/{studio-api-OGPSLKV7.js → studio-api-VNIEVFVL.js} +12 -10
  146. package/dist/{studioServer-ZJ22K33M.js → studioServer-YGYE5AZF.js} +48 -44
  147. package/dist/{system-SHCBJHHU.js → system-OAB2LYBV.js} +8 -7
  148. package/dist/{telemetry-GK7XOOXI.js → telemetry-SW2VUF5A.js} +11 -10
  149. package/dist/{timeline-46FRT64J.js → timeline-KXD4SKGX.js} +18 -16
  150. package/dist/{tokens-HJ2LB2GR.js → tokens-TVDW7X7Q.js} +2 -2
  151. package/dist/{transcribe-IK5WYH4B.js → transcribe-AL3E5MBZ.js} +9 -8
  152. package/dist/{transcribe-S75EUMVN.js → transcribe-WNVFCNC5.js} +14 -13
  153. package/dist/{updateCheck-PLFHDWQS.js → updateCheck-DAF2B2QZ.js} +2 -2
  154. package/dist/{upgrade-2VUYCOJA.js → upgrade-ZGJPNQOO.js} +2 -2
  155. package/dist/{urlDownloader-EMO4Y44J.js → urlDownloader-U3TNOPD5.js} +7 -6
  156. package/dist/{validate-G5S2R6QT.js → validate-AY5MWLFK.js} +17 -16
  157. package/dist/{video-5WCMLASZ.js → video-KAHL76HG.js} +8 -7
  158. package/package.json +1 -1
  159. package/dist/chunk-M5YNZQXZ.js +0 -3528
@@ -36,7 +36,7 @@ https://www.w3ctech.com/topic/2226`));let l=n(...a);return l.postcssPlugin=t,l.p
36
36
  0% { outline-color: rgba(59, 130, 246, 0.8); }
37
37
  100% { outline-color: transparent; }
38
38
  }
39
- `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(i=>{i.classList.add("__hf-flash"),setTimeout(()=>i.classList.remove("__hf-flash"),t)})}catch(r){P("bridge.flashElements.querySelector",r)}}var io=e=>4*Number.EPSILON*Math.max(1,Math.abs(e));function _r(e,t){return!Number.isFinite(e)||!Number.isFinite(t)?e===t:Math.abs(e-t)<=io(Math.max(Math.abs(e),Math.abs(t)))}var Wd=(e,t)=>e>=t||_r(e,t),Ut=(e,t,n)=>Wd(e,t)&&e<n&&!_r(e,n),Ly=1e-6,oo=(e,t,n,r)=>Ut(e,t,n)||Wd(e,t)&&r>0&&n>=r-Ly;var ss=null;function Vd(e){ss=e}function Xe(e,t){if(ss)try{ss({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){P("runtime.analytics.site1",n)}}function Fy(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,r=t.length;for(;n<r&&t[n]==="-";)n++;for(;r>n&&t[r-1]==="-";)r--;let i=t.slice(n,r);return i.length>0?i:"node"}function Nn(e){return`--${Fy(e)}`}function $d(e){let t=new Map;for(let n of e){let r=Nn(n),i=t.get(r);i?i.includes(n)||i.push(n):t.set(r,[n])}return[...t.values()].filter(n=>n.length>1)}function qd(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,wr(i));let n=so(),r={...t,...n};for(let i of e)us(i,r);return r}var zd=new Set;function jd(e){let t=e?.getAttribute("data-composition-variables");if(!t)return[];let n;try{n=JSON.parse(t)}catch{return[]}return Array.isArray(n)?n.filter(r=>!!r&&typeof r=="object"):[]}function Dy(e,t){return t?.trim()||e.getAttribute("data-composition-id")?.trim()||e.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()||"composition"}function Iy(e){return Array.isArray(e.options)?e.options.map(t=>t&&typeof t=="object"?t.value:t).filter(t=>typeof t=="string"||typeof t=="number"):[]}function Py(e,t){if(typeof e.id!="string")return null;let n=t[e.id];if(n==null||"default"in e&&String(n)===String(e.default))return null;let r=Iy(e);return r.length===0||r.some(i=>String(i)===String(n))?null:{id:e.id,value:n,allowed:r}}function us(e,t,n){if(!e)return;let r=jd(e);if(r.length===0)return;let i=Dy(e,n);for(let o of r){let a=Py(o,t);if(!a)continue;let l=`${i}|${a.id}|${String(a.value)}`;if(zd.has(l))continue;zd.add(l);let s="default"in o?JSON.stringify(o.default):"the composition default";console.warn(`[hyperframes] runtime_unknown_enum_value: ${i} variable "${a.id}" got ${JSON.stringify(a.value)}, which is not a declared option (${a.allowed.join(", ")}). Rendering ${s} instead.`)}}function wr(e){let t={};for(let n of jd(e))typeof n.id!="string"||!("default"in n)||(t[n.id]=n.default);return t}var ls="data-hf-css-vars";function ao(e){return"style"in e&&typeof e.style?.setProperty=="function"}function cs(e,t){if(!ao(e))return;let n=[];for(let[r,i]of Object.entries(t))if(typeof i=="string"&&i!==""||typeof i=="number"){let o=Nn(r);e.style.setProperty(o,String(i)),n.push(o)}n.length>0&&e.setAttribute(ls,n.join(" "))}function Kd(e,t,n){let r={};for(let[i,o]of Object.entries(t)){let a=Nn(i);((ao(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(r[i]=o)}return r}function Xd(e){if(!ao(e))return;let t=e.getAttribute(ls);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(ls)}}function Yd(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let i of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(i);let n=so(),r=[];for(let i of t)r.push(...Oy(i,n,e.defaultView));for(let i of $d(r))console.warn(`composition variables ${i.join(", ")} collapse to the same CSS property ${Nn(i[0]??"")} \u2014 rename one to avoid cross-talk`)}function Oy(e,t,n){if(!ao(e))return[];let r=wr(e),i={};for(let[o,a]of Object.entries(r)){if(o in t)continue;let l=Nn(o);(e.style.getPropertyValue(l)||(n?n.getComputedStyle(e).getPropertyValue(l):"")).trim()===""&&(i[o]=a)}for(let[o,a]of Object.entries(t))o in r&&(i[o]=a);return cs(e,i),Object.keys(r)}function Jd(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function so(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function Qd(e){let t=[],n=(f,b=()=>f.getAnimations())=>{if(typeof f.getAnimations!="function")return[];try{return b()}catch{return[]}},r=f=>{let b=new Map;if(t.length===0)return b;let h=typeof CSSAnimation<"u";for(let y of n(document,f)){if(h&&!(y instanceof CSSAnimation))continue;let x=y.effect;if(!x?.target||x.pseudoElement)continue;let E=b.get(x.target);E?E.push(y):b.set(x.target,[y])}return b},i=(f=[],b=[])=>[...b,...f.filter(h=>!b.includes(h)&&h.playState!=="idle")],o=f=>{let b=f.closest("[data-start]")??f;return e?.resolveStartSeconds?e.resolveStartSeconds(b):Number.parseFloat(b.getAttribute("data-start")??"0")||0},a=f=>{let b=w=>(w||"").split(",").map(C=>Number.parseFloat(C)/(C.trim().endsWith("ms")?1e3:1)),h=b(f.animationDuration),y=b(f.animationDelay),x=f.animationName.split(","),E=0;return x.forEach((w,C)=>{if(w.trim()==="none")return;let I=y[C%y.length]+h[C%h.length];I>E&&(E=I)}),{cycleSeconds:E,delays:x.map((w,C)=>y[C%y.length]||0)}},l=(f,b)=>{let h=null;try{h=f.effect?.getComputedTiming?.()??null}catch(x){P("runtime.adapters.css.site5",x)}if(!h)return{};let y=Number(h.endTime);return Number.isFinite(y)?{endSeconds:b+y/1e3}:{unbounded:!0}},s=(f,b)=>{for(let h of f){try{h.currentTime=b}catch(y){P("runtime.adapters.css.site1",y)}try{h.pause()}catch(y){P("runtime.adapters.css.site2",y)}}},c=f=>{for(let b of f)try{b.play()}catch(h){P("runtime.adapters.css.site3",h)}},d=f=>{for(let b of f)try{b.pause()}catch(h){P("runtime.adapters.css.site4",h)}},m=f=>{f.baseDelay?f.el.style.animationDelay=f.baseDelay:f.el.style.removeProperty("animation-delay"),f.basePlayState?f.el.style.animationPlayState=f.basePlayState:f.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{for(let h of t)m(h);let f=new Map(t.map(h=>[h.el,h.handles]));t=[];let b=document.querySelectorAll("*");for(let h of b){if(!ye(h))continue;let y=window.getComputedStyle(h);!y.animationName||y.animationName==="none"||t.push({el:h,baseDelay:h.style.animationDelay||"",basePlayState:h.style.animationPlayState||"",...a(y),handles:f.get(h)})}},getAnimationCycleEndSeconds:()=>{let f=0;for(let b of t)!b.el.isConnected||b.cycleSeconds<=0||(f=Math.max(f,o(b.el)+b.cycleSeconds));return f>0?f:null},getInferredDurationSeconds:()=>{let f=0;for(let b of t){if(!b.el.isConnected)continue;let h=o(b.el);for(let y of n(b.el)){let x=l(y,h);x.endSeconds!=null&&(f=Math.max(f,x.endSeconds))}}return f>0?f:null},seek:f=>{let b=Number(f.time)||0,h=r(f.pageAnimations);for(let y of t)y.handles=i(y.handles,h.get(y.el));for(let y of t){if(!y.el.isConnected)continue;let x=o(y.el),E=Math.max(0,b-x)*1e3;if(y.handles?.length){y.el.style.animationDelay!==y.baseDelay&&m(y),s(y.handles,E);continue}y.el.style.animationPlayState="paused",y.el.style.animationDelay=y.delays.map(w=>`${Number((w-E/1e3).toFixed(3))}s`).join(", ")}},pause:f=>{let b=r(f?.pageAnimations);for(let h of t){if(!h.el.isConnected)continue;let y=b.get(h.el);y&&(d(y),m(h))}},play:()=>{let f=r();for(let b of t)b.el.isConnected&&(m(b),c(f.get(b.el)??[]))},revert:()=>{t=[]}}}function Zd(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0),i=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(r+.001,!0),n.totalTime(r,i)):n.seek(r,i)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function ef(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],r=new Set(n);for(let i of t)r.has(i)||n.push(i);window.__hfAnime=n}catch(e){P("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let r of n)try{typeof r.seek=="function"&&r.seek(t)}catch(i){P("runtime.adapters.animejs.site2",i)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){P("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){P("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function af(e){let t=r=>{let i=nf(r),o=i&&typeof i.closest=="function"?i.closest("[data-composition-id]"):null;return o&&e?.resolveStartSeconds?e.resolveStartSeconds(o):0},n=(r,i)=>Math.max(0,i-t(r));return{name:"lottie",discover:()=>{try{let r=window.lottie;if(r&&typeof r.getRegisteredAnimations=="function"){let i=r.getRegisteredAnimations();if(Array.isArray(i)&&i.length>0){let o=window.__hfLottie??[],a=new Set(o);for(let l of i)a.has(l)||o.push(l);window.__hfLottie=o}}}catch(r){P("runtime.adapters.lottie.site1",r)}},seek:r=>{let i=Math.max(0,Number(r.time)||0),o=window.__hfLottie;if(!(!o||o.length===0))for(let a of o)try{let l=n(a,i),s=a.loop===!0;if(lo(a)){let c=l*a.frameRate;a.totalFrames>0&&s?a.goToAndStop(rf(c,a.totalFrames),!0):a.totalFrames>0&&c>=a.totalFrames?a.goToAndStop(a.totalFrames-1,!0):a.goToAndStop(l*1e3,!1)}else if(ds(a)){if(typeof a.setCurrentRawFrameValue=="function"){let c=a.totalFrames??0,d=a.frameRate??30,m=s&&c>0?rf(l*d,c):l*d;c>0&&a.setCurrentRawFrameValue(Math.min(m,c-1))}else if(typeof a.seek=="function"){let c=a.duration??0;if(Number.isFinite(c)&&c>0){let d=Math.min(100,(s?l%c:l)/c*100);a.seek(d)}}}}catch(l){P("runtime.adapters.lottie.site2",l)}},pause:()=>{let r=window.__hfLottie;if(!(!r||r.length===0))for(let i of r)try{(lo(i)||ds(i))&&i.pause()}catch(o){P("runtime.adapters.lottie.site3",o)}},revert:()=>{},getInferredDurationSeconds:()=>tf((r,i)=>i),getAnimationCycleEndSeconds:()=>tf((r,i)=>nf(r)?.isConnected===!1?null:t(r)+i)}}function tf(e){let t=window.__hfLottie;if(!t||t.length===0)return null;let n=0,r=!1;for(let i of t){let o=null;try{let a=Hy(i);o=a==null?null:e(i,a)}catch(a){P("runtime.adapters.lottie.site4",a)}o!=null&&(r=!0,n=Math.max(n,o))}return r?n:null}function nf(e){return lo(e)?e.wrapper:e.canvas}function rf(e,t){let n=e%t;return t-n<1e-6?0:n}function of(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function Hy(e){return lo(e)?of(e.totalFrames,e.frameRate):ds(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:of(e.totalFrames,e.frameRate):null}function lo(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function ds(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var fs=-1,uo=new Set,Ln,ms=0;function sf(e){let t=[],n=!0,r={time:e,waitUntil:i=>{if(!n)throw new Error("hf-seek waitUntil() must be called synchronously from the event listener");t.push(i)}};try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:r}))}catch(i){P("runtime.adapters.seek-dispatch.site1",i)}finally{n=!1}t.length!==0&&Tt(Promise.all(t))}function Tt(e){let t=e.then(()=>({status:"fulfilled"})).catch(n=>({status:"rejected",reason:n}));uo.add(t),t.then(n=>{uo.delete(t)&&n.status==="rejected"&&Ln===void 0&&(Ln={reason:n.reason})})}function co(e){e!==fs&&(fs=e,sf(e))}function fo(e){fs=e,sf(e)}function lf(){return ms>0}async function ps(){ms+=1;let e=Ln;try{for(await Promise.resolve();uo.size>0;){let r=(await Promise.all([...uo])).find(i=>i.status==="rejected");e===void 0&&r?.status==="rejected"&&(e={reason:r.reason})}let t=Ln;if(e===void 0&&(e=t),Ln===t&&(Ln=void 0),e)throw e.reason}finally{ms-=1}}function uf(){let e=null,t=0,n=null,r=null,i=null,o=null,a=()=>{if(typeof window>"u")return null;let d=window.THREE?.DefaultLoadingManager;return!d||typeof d!="object"||typeof d.itemsLoaded!="number"||typeof d.itemsTotal!="number"?null:d},l=c=>{o||c.itemsTotal<=c.itemsLoaded||(o=new Promise(d=>{c.onLoad=function(){try{i?.call(this)}finally{o=null,c.onLoad=i??null,d()}}}))},s=c=>{n!==c&&(n=c,r=c.onStart??null,i=c.onLoad??null,c.onStart=function(d,m,f){try{r?.call(this,d,m,f)}finally{l(c)}})};return{name:"three",discover:()=>{let c=a();c&&(s(c),l(c))},seek:c=>{e=Math.max(0,Number(c.time)||0),t=e,window.__hfThreeTime=e,co(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let c=a();return!c||c.itemsTotal<=c.itemsLoaded?null:(o||l(c),o)}}}function pt(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let r=e.getInstances();if(r.length===0)return null;let i=r.filter(o=>!n.has(o));return i.length===0?null:t||(t=Promise.allSettled(i.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function cf(){return pt({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function df(){return pt({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function ff(){return pt({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function mf(){return pt({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function pf(){return pt({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}var Gy=250;function hf(){let e=null,t=0,n=null,r=()=>{n!==null&&(window.clearInterval(n),n=null)},i=()=>{n===null&&document.querySelector("[data-composition-id][data-requires-webgpu]")&&(n=window.setInterval(()=>{e!==null&&(lf()||(window.__hfTypegpuTime=e,fo(e)))},Gy))};return{name:"typegpu",discover:()=>{},seek:o=>{e=Math.max(0,Number(o.time)||0),t=e,window.__hfTypegpuTime=e,co(e)},pause:()=>{e==null&&(e=Math.max(0,t)),i()},play:()=>{r(),e=null},revert:()=>{r(),e=null,t=0}}}var Cr="data-hf-render-id",gf="data-hf-group-render-id";function By(e){return e.getAttribute(Cr)||e.id||null}var Uy="__render_frame_",Wy="__";function Vy(e){return`${Uy}${e}${Wy}`}function $y(e){let t=By(e);return t?Vy(t):null}function Rt(e){let t=$y(e);if(!t)return null;let n=document.getElementById(t);return Oe(n)?n:null}function bf(e){let t=e.nextElementSibling;if(Oe(t)&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;let n=Rt(e);return n&&n.complete&&n.naturalWidth>0?n:null}function xf(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,r,i){if(Se(n?.source)){let o=bf(n.source);if(o)return t.call(this,{...n,source:o},r,i)}return t.call(this,n,r,i)}}function yf(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let r=n?.prototype;if(r)for(let i of t){let o=r[i];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...l){let s=l.length-1,c=l[s];if(Se(c)){let d=bf(c);d&&(l[s]=d)}return o.apply(this,l)};a.__hfVideoPatched=!0,r[i]=a}}}function Sf(){let e=!1,t=0,n=!1,r,i,o,a=new Set,l=new WeakMap,s=(x=()=>document.getAnimations())=>{if(!document.getAnimations)return[];try{return x()}catch{return[]}},c=x=>{let E=Number(x.currentTime);return Number.isFinite(E)&&E>0?E:0},d=(x,E)=>E<=0?x:x>=E?Math.max(0,x-E):x,m=(x,E)=>{let w=l.get(x);if(w)return w;let C={compositionTimeMs:E,animationTimeMs:e?d(c(x),E):c(x)};return l.set(x,C),C},f=(x,E)=>{if(!a.has(x)){a.add(x);let w=()=>{a.delete(x)};try{x.addEventListener("finish",w,{once:!0}),x.addEventListener("cancel",w,{once:!0})}catch(C){P("runtime.adapters.waapi.site4",C)}}m(x,E)},b=(x,E)=>{for(let w of x)f(w,E)},h=()=>{if(n||typeof Element>"u")return;let x=Element.prototype;if(typeof x.animate!="function"||x.__hfOriginalAnimate)return;let E=x.animate;try{Object.defineProperty(x,"__hfOriginalAnimate",{value:E,configurable:!0});let w=function(...C){let I=E.apply(this,C);return f(I,t),I};x.animate=w,r=x,i=E,o=w,n=!0}catch{}},y=x=>{let E=null;try{E=x.effect?.getComputedTiming?.()??null}catch(I){P("runtime.adapters.waapi.site4",I)}if(!E)return{};let w=Number(E.endTime);return Number.isFinite(w)?{endSeconds:(l.get(x)?.compositionTimeMs??0)/1e3+w/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,h(),b(s(),t)},seek:x=>{let E=Math.max(0,(Number(x.time)||0)*1e3);t=E,(!e||a.size>0)&&b(s(x.pageAnimations),e?E:0);for(let w of a){let C=e?m(w,E):m(w,0),I=C.animationTimeMs+Math.max(0,E-C.compositionTimeMs);try{w.currentTime=I}catch(D){P("runtime.adapters.waapi.site1",D)}try{w.pause()}catch(D){P("runtime.adapters.waapi.site2",D)}}},pause:x=>{e||b(s(x?.pageAnimations),t);for(let E of a)try{E.pause()}catch(w){P("runtime.adapters.waapi.site3",w)}},revert:()=>{if(a.clear(),l=new WeakMap,e=!1,t=0,r&&i&&o&&r.animate===o)try{r.animate=i,r.__hfOriginalAnimate===i&&delete r.__hfOriginalAnimate}catch(x){P("runtime.adapters.waapi.site5",x)}r=void 0,i=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let x=0;for(let E of s()){let w=y(E);w.endSeconds!=null&&(x=Math.max(x,w.endSeconds))}return x>0?x:null}}}var Fn="data-hf-authored-duration",Dn="data-hf-authored-end";function Tr(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:null}function In(e){let t=Tr(e.start);if(t==null)return null;let n=Math.max(0,t),r=Tr(e.duration),i=Tr(e.authoredDuration),o=r!=null&&r>0?r:i!=null&&i>0?i:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=Tr(e.end),l=Tr(e.authoredEnd),s=a!=null&&a>n?a:l!=null&&l>n?l:null;return{start:n,duration:s==null?null:s-n,end:s}}var mo="data-hf-media-start-basis";function vf(e){return e?.trim().toLowerCase()==="global"?"global":"local"}function zy(e){return vf(e.basis)==="global"?e.authoredStart:e.hostStart+e.authoredStart}function Ef(e){return _f(e)?zy({authoredStart:e.authoredStart,hostStart:e.hostStart,basis:e.basis}):e.ordinaryStart()}function Af(e){return _f(e)&&vf(e.basis)==="global"}function _f(e){return!e.hasAutoStart&&e.authoredStart!=null&&e.hostStart>0}function Ye(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,r=e.documentRef??document,i=new WeakMap,o=new WeakMap,a=new Set,l=h=>{let y=r.getElementById(h);return y||(r.querySelector(`[data-composition-id="${CSS.escape(h)}"]`)??null)},s=h=>{let y=o.get(h);if(y!==void 0)return y;let x=null,E=In({start:0,duration:h.getAttribute("data-duration"),authoredDuration:n?h.getAttribute("data-hf-authored-duration"):null});if(E?.duration!=null&&E.duration>0&&(x=E.duration),x==null||x<=0){let w=d(h,0),C=In({start:w,end:h.getAttribute("data-end"),authoredEnd:n?h.getAttribute("data-hf-authored-end"):null});C?.duration!=null&&C.duration>0&&(x=C.duration)}if((x==null||x<=0)&&he(h)&&(x=mt(h,h.duration)),(x==null||x<=0)&&(x=Mn(h)),x==null||x<=0){let w=h.getAttribute("data-composition-id");if(w){let C=t[w]??null;if(C&&typeof C.duration=="function")try{let I=Number(C.duration());Number.isFinite(I)&&I>0&&(x=I)}catch(I){P("runtime.startResolver.site1",I)}}}return x!=null&&Number.isFinite(x)&&x>0?(o.set(h,x),x):(o.set(h,null),null)},c=(h,y)=>{if(h.hasAttribute("data-composition-id")){let E=h.parentElement?.closest("[data-composition-id]");return E?d(E,y):0}let x=h.closest("[data-composition-id]");return x?d(x,y):0},d=(h,y)=>{let x=i.get(h);if(x!==void 0)return x??y;if(a.has(h))return y;a.add(h);try{let E=za(h.getAttribute("data-start"));if(!E){if(h.hasAttribute("data-composition-id")){let F=h.parentElement;if(F&&(F.hasAttribute("data-composition-src")||F.hasAttribute("data-composition-id")||F.hasAttribute("data-composition-file"))){let O=d(F,y);return i.set(h,O),O}}return i.set(h,y),y}if(E.kind==="absolute"){let F=Math.max(0,E.value),O=Math.max(0,c(h,y)+F);return i.set(h,O),O}let w=l(E.refId);if(!w)return i.set(h,y),y;let C=d(w,0),I=s(w);if(I==null||I<=0){let F=Math.max(0,C+E.offset);return i.set(h,F),F}let D=Math.max(0,C+I+E.offset);return i.set(h,D),D}finally{a.delete(h)}},m=h=>{let y=h.closest("[data-composition-id]");return{authoredStart:Me(h.getAttribute("data-start")),hostStart:y?d(y,0):0,hasAutoStart:h.hasAttribute("data-hf-auto-start"),basis:h.getAttribute(mo)}};return{resolveStartForElement:(h,y=0)=>d(h,Math.max(0,y)),resolveDurationForElement:h=>s(h),resolveMediaStartForElement:h=>{let y=m(h);return Ef({...y,ordinaryStart:()=>d(h,y.hostStart)})},resolveHostStartForElement:h=>c(h,0),isRootGlobalMediaStartForElement:h=>he(h)&&Af(m(h))}}function qy(e,t,n){let r=e.filter(o=>Number.isFinite(o.time)&&Number.isFinite(o.volume)).map(o=>({time:Math.max(0,o.time-t),volume:Ke(o.volume)})).sort((o,a)=>o.time-a.time),i=[];for(let o of r){let a=i.at(-1);a&&Math.abs(a.time-o.time)<1e-9?a.volume=o.volume:i.push(o)}return i.length===0||i[0].time>0&&i.unshift({time:0,volume:Ke(n)}),i}function wf(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let r=e[n],i=e[n+1]??r,o=i.time-r.time,a=o<=0?0:Math.min(1,Math.max(0,(t-r.time)/o));return r.volume+(i.volume-r.volume)*a}function jy(e,t,n,r){let i=e.at(-1);!i||Math.abs(i.volume-n.volume)>1e-4?(i&&t&&t.time>i.time&&e.push(t),e.push(n)):r&&n.time>i.time&&e.push(n)}function Ky(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:void 0}function Xy(e,t){let n=Ye({timelineRegistry:window.__timelines,includeAuthoredTimingAttrs:!0}).resolveMediaStartForElement(e),r=Me(e.dataset.end)??void 0,i=Me(e.dataset.duration)??void 0,o=t;i!==void 0&&i>0?o=n+i:r!==void 0&&r>n&&(o=r);let a=Ky(e.dataset.volume)??1;return{start:n,end:o,staticVolume:Ke(a)}}function Yy(e,t,n,r,{start:i,end:o,staticVolume:a}){let l=1/Math.min(60,Math.max(1,r)),s=Math.max(0,i),c=Math.min(n,o),d=fd(e,()=>{e.volume=a;let f=[],b;for(let h=s;h<=c+1e-6;h=Math.min(c,h+l)){t(h);let y=Number(e.volume);if(Number.isFinite(y)){let x={time:Number(h.toFixed(6)),volume:Number(Ke(y).toFixed(6))};jy(f,b,x,h===c),b=x}if(h===c)break}return f});return d.some(f=>Math.abs(f.volume-a)>1e-4)?d:null}function po(e,t,n=0){return n>3||e===null||typeof e!="object"?!1:Array.isArray(e)?e.some(r=>po(r,t,n+1)):Object.getPrototypeOf(e)!==Object.prototype?!1:Object.entries(e).some(([r,i])=>t(r)||po(i,t,n+1))}var Jy=e=>typeof e?.nodeType=="number";function Qy(e,t){for(let n=Object(e);n;n=Object.getPrototypeOf(n)){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return typeof r.set=="function"}return!1}function Zy(e,t){if(typeof e.getChildren!="function")return!0;try{return e.getChildren(!0,!0,!1).some(n=>(n.targets?.()??[]).some(i=>Jy(i)?i===t&&po(n.vars,o=>o==="volume"):po(n.vars,o=>Qy(i,o))))}catch{return!0}}function Cf(e,t,n,r,i={}){if(i.allowLiveTimelineSeek===!1||!t||!he(e)||n<=0||!Zy(t,e))return;let o=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},a=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,l=Xy(e,n),s=Yy(e,o,n,60,l);if(Number.isFinite(a)&&o(a),s){let c=qy(s,l.start,l.staticVolume);c.length>0&&r.set(e,c)}}var kf="data-fade-in",Mf="data-fade-out",dM=kf.slice(5),fM=Mf.slice(5),Nf=Object.freeze({fadeIn:0,fadeOut:0});function hs(e){return Number.isFinite(e)&&e>0?e:0}function Tf(e){return e==null||e===""?0:hs(Number.parseFloat(e))}function Lf(e){return{fadeIn:Tf(e.getAttribute(kf)),fadeOut:Tf(e.getAttribute(Mf))}}function eS(e,t){let n=hs(e.fadeIn),r=hs(e.fadeOut);if(!Number.isFinite(t)||t<=0)return{fadeIn:n,fadeOut:r};let i=n+r;if(i<=t)return{fadeIn:n,fadeOut:r};let o=t/i;return{fadeIn:n*o,fadeOut:r*o}}function Ff(e,t,n){if(!Number.isFinite(e))return 1;let{fadeIn:r,fadeOut:i}=eS(n,t),o=1;return r>0&&(o*=Rf(e/r)),i>0&&Number.isFinite(t)&&(o*=Rf((t-e)/i)),o}function Rf(e){return!Number.isFinite(e)||e<0?0:e>1?1:e}var Pn="hf-audio-group",ho="data-audio-group";function gs(e){let t=e?.getAttribute("data-volume"),n=t?parseFloat(t):1;return Number.isFinite(n)?n:1}function bs(e,t){let n=Array.from(e?.querySelectorAll?.(`${Pn}[${Cr}]`)??[]).find(i=>i.getAttribute(Cr)===t);if(n)return n;let r=e?.getElementById(t)??null;return r&&r.tagName?.toLowerCase()===Pn?r:null}function go(e,t){let n=t?.getAttribute?.(gf)??t?.getAttribute?.(ho);return n?bs(e,n)?.hasAttribute("data-hidden")??!1:!1}function bo(e){return typeof e.tagName!="string"||e.tagName.toLowerCase()!=="audio"||typeof e.getAttribute!="function"?null:e.getAttribute(ho)||null}function Df(e){let t="__hf-audio-group-inert";if(!e?.head||e.getElementById(t))return;let n=e.createElement("style");n.id=t,n.textContent=`${Pn}{display:none!important}`,e.head.appendChild(n)}function ht(e){return Qi(e)}var If=["seeked","loadeddata","error","emptied","abort"],As=5e3,xo=new WeakMap;function Pf(e){let t=e.readyState<e.HAVE_CURRENT_DATA&&e.networkState===e.NETWORK_LOADING&&!window.__HF_EXPORT_RENDER_SEEK_CONFIG;e.tagName!=="VIDEO"||!(e.seeking||t)||Rt(e)||(xo.get(e)?.(),Tt(new Promise(n=>{let r=o=>{if(!(o?.type==="loadeddata"&&e.seeking)){clearTimeout(i);for(let a of If)e.removeEventListener(a,r,!0);xo.get(e)===r&&xo.delete(e),n()}},i=setTimeout(r,As);for(let o of If)e.addEventListener(o,r,!0);xo.set(e,r)})))}function Of(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(r=>r!=null&&Number.isFinite(r)&&r>=0);return n.length>0?Math.min(...n):null}function Hf(e){let t=e?.elements??Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),r=[],i=[],o=0;for(let a of n){let l=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(l))continue;let s=ht(a),c=We(a),d=Bt(a),m=a.loop,f=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,b=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(b)||b<0)&&f!=null&&(b=Math.max(0,mn(d,f-s)));let h=Number.isFinite(b)&&b>=0,y=h?l+b:Number.POSITIVE_INFINITY,x=Number.parseFloat(a.dataset.volume??""),E={el:a,start:l,mediaStart:s,duration:h?b:Number.POSITIVE_INFINITY,end:y,volume:Number.isFinite(x)?x:null,playbackRate:c,rate:d,loop:m,sourceDuration:f,fades:Lf(a)};r.push(E),a.tagName==="VIDEO"&&i.push(E),Number.isFinite(y)&&(o=Math.max(o,y))}return{timedMediaEls:n,mediaClips:r,videoClips:i,maxMediaEnd:o}}var Ss=new WeakMap,yo=new WeakMap,Rr=new WeakMap,vs=new WeakSet,On=new WeakSet,xs=new WeakSet;function tS(e){if(On.has(e))return;On.add(e);let t=()=>On.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var nS=3;function _s(e){return e.error!=null||e.networkState===nS}var Es=new WeakMap;function ys(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function ws(e){Ss.delete(e),yo.delete(e),Rr.delete(e),vs.delete(e),Es.delete(e),kr.delete(e)}var Cs=.5,Wt=.04,rS=.03,iS=.01,kr=new WeakMap;function oS(e,t,n){let r=Math.sign(t),i=kr.get(e);if(Math.abs(t)>Wt)kr.set(e,r);else if(i!==r||Math.abs(t)<=iS)return kr.delete(e),n;return n*(1+r*rS)}function Gf(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:r}=n;if(!r.isConnected)continue;let i=n.rate??n.playbackRate,o=r.tagName==="VIDEO"&&!n.loop,a=Ut(e.timeSeconds,n.start,n.end),l=n.start-e.timeSeconds,s=r.tagName==="AUDIO"&&!a&&l>0&&l*Math.max(1,ns(i,0))<=Math.max(e.cueAheadSeconds??0,xs.has(r)?Wt:0);s?xs.add(r):xs.delete(r);let c=o&&!a&&(e.timeSeconds>=n.end||_r(e.timeSeconds,n.end))&&oo(e.timeSeconds,n.start,n.end,e.getCompositionDuration()),d=Yi(i,Math.max(0,Math.min(e.timeSeconds,n.end)-n.start))+n.mediaStart,m=c||o&&n.sourceDuration!=null&&d>=n.sourceDuration&&a;m&&n.sourceDuration!=null&&(d=Math.min(d,n.sourceDuration));let f=yo.get(r),b=r.tagName==="AUDIO"&&(f===void 0||d<f-.04),h=!n.loop&&n.sourceDuration!=null&&d>=n.mediaStart&&d<n.sourceDuration&&(o||b);if((a||c||s)&&d>=0&&(!r.ended||n.loop||m||h)){if(yo.set(r,d),n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let ee=n.sourceDuration-n.mediaStart;ee>0&&d>=n.sourceDuration&&(d=n.mediaStart+(d-n.mediaStart)%ee)}let E=ys(e.userVolume??1),w=Ke(n.volume??1),C=Es.get(r),I=ys(r.volume),D,F=yd(r,e.timeSeconds-n.start);if(F!==null)D=Ke(F);else if(n.volumeKeyframes&&n.volumeKeyframes.length>0){let ee=e.timeSeconds-n.start;D=Ke(wf(n.volumeKeyframes,ee))}else e.isWebAudioRouted?.(r)?D=w:C===void 0?D=w>1?w:I:Math.abs(I-C)>1e-4?D=I:D=w;let O=n.fades??Nf;(O.fadeIn>0||O.fadeOut>0)&&(D*=Ff(e.timeSeconds-n.start,n.duration,O));let M=r.closest("[data-hidden]")!==null||go(r.ownerDocument,r)?0:ys(D*E);r.volume=M,Es.set(r,M),e.onElementVolume?.(r,M,D),(t||e.isWebAudioOwned?.(r))&&(r.muted=!0),r.preload!=="auto"&&(r.preload="auto");let R=ns(i,e.timeSeconds-n.start)*e.playbackRate,U=2,j=r.currentTime||0,Y=Math.abs(j-d),N=d-j,_=Ss.get(r);Ss.set(r,N);let H=_===void 0,J=!H&&Math.abs(N-_)>.5,B=Y>3,q=r.tagName==="AUDIO"&&H&&j-d>Wt,$=m&&Y>.001||r.ended&&h&&Y>.001||q||Y>Cs&&(H||J||B),X=r.tagName==="VIDEO"&&!r.paused&&e.playing,K=_!==void 0&&Math.abs(N-_)<.004,G=!1;if(!X&&!$&&!H&&K&&Y>Wt){let ee=(Rr.get(r)??0)+1;Rr.set(r,ee),ee>=U&&(G=!0,Rr.set(r,0))}else Y<=Wt&&Rr.set(r,0);let V=!X&&e.forceSync&&Y>.02;try{(!X||$)&&kr.delete(r);let ee=X&&!$?oS(r,N,R):R;Math.abs(r.playbackRate-ee)>1e-6&&(r.playbackRate=ee)}catch(ee){P("runtime.media.site1",ee)}if($||G||V){if(!(r.tagName==="VIDEO"&&!!Rt(r))){try{r.currentTime=d}catch(ce){P("runtime.media.site2",ce)}if(Math.abs(r.currentTime-d)>.5&&!vs.has(r)){vs.add(r),r.load();try{r.currentTime=d}catch(ce){P("runtime.media.site3",ce)}}Pf(r)}On.delete(r)}else e.playing||Pf(r);m?r.paused||r.pause():e.playing&&r.paused&&!On.has(r)&&!_s(r)?(tS(r),r.play().catch(ee=>{On.delete(r),(ee&&typeof ee=="object"&&"name"in ee?String(ee.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!r.paused&&r.pause();continue}let x=Ut(e.timeSeconds,n.start,n.end);ws(r),x&&yo.set(r,d),r.paused||r.pause()}}var Vt=new WeakMap;function Mr(e){return Vt.has(e)?Vt.get(e)??null:e.getAttribute("src")}async function Bf(e,t){let n=0;for(;t();){let r=await fetch(e,{headers:{Range:"bytes=0-0"},cache:"no-store"}).catch(()=>null);r?.body?.cancel().catch(()=>{});let i=r?.status===202||r?.status===503;if(!i&&r?.ok)return!0;if(!i&&++n>3)return!1;let o=Math.min(Number(r?.headers.get("Retry-After"))||2,30);await new Promise(a=>setTimeout(a,o*1e3))}return!1}var aS="hf-proxy",Uf="runtime_media_proxy_fallback",Wf="runtime_media_proxy_unavailable",Vf=new WeakSet,Nr=new WeakMap;function So(e){return e.currentSrc||e.src}function Ts(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:Se(e)&&!!Rt(e)}function Rs(e){let t=So(e);if(!t)return null;let n;try{n=new URL(t,document.baseURI)}catch{return null}if(n.origin!==window.location.origin)return null;try{return decodeURIComponent(n.pathname)}catch{return n.pathname}}function sS(e,t){let n=null;for(let r of Object.keys(t))e.endsWith(r)&&(n===null||r.length>n.length)&&(n=r);return n?t[n]??null:null}function lS(e,t){let n=e.normalize("NFC").toLowerCase(),r=-1,i=null,o=!1;for(let[a,l]of Object.entries(t)){let s=a.normalize("NFC").toLowerCase();n.endsWith(s)&&(s.length>r?(r=s.length,i=l,o=!1):s.length===r&&(o=!0))}return o?null:i}function ks(e,t){return t[e]??sS(e,t)??lS(e,t)}function uS(e,t){let n=new URL(e,document.baseURI);return n.searchParams.set(aS,t?t.hasAlpha?"vp8":"h264":"auto"),n.href}var cS={cross_origin:"video reports zero decodable width but its source is cross-origin; no local proxy can be served for it",proxy_playback_failed:"the authoring proxy itself failed to decode; render output is unaffected",browser_safe_codec:"the file errored but its codec is browser-decodable; a proxy cannot help (the file itself is likely corrupt)",invalid_source_url:"the media source URL is malformed and cannot be proxied"};function $t(e,t,n){if(Vf.has(e))return;Vf.add(e);let r=cS[t];we({source:"hf-preview",type:"diagnostic",code:Wf,details:{asset:n,codecName:null,reason:t,note:r}}),console.info(`[hyperframes] ${Wf}: "${n}" (${t}): ${r}`)}function Ms(e,t=null,n="reactive"){if(Vt.has(e)||Nr.has(e)&&Nr.get(e)===e.getAttribute("src"))return;let r=So(e),i;try{i=uS(r,t)}catch(d){P("runtime.mediaProxy.swap",d),$t(e,"invalid_source_url",r);return}let o=e.getAttribute("src");Nr.set(e,o);let a=()=>e.isConnected&&e.getAttribute("src")===o,l=Bf(i,a).then(d=>{if(!a()){Nr.get(e)===o&&Nr.delete(e);return}if(!d){$t(e,"proxy_playback_failed",r);return}return Vt.set(e,o),ws(e),e.src=i,e.load(),new Promise(m=>{e.addEventListener("loadeddata",m,{once:!0}),e.addEventListener("error",m,{once:!0})})});Tt(Promise.race([l,new Promise(d=>setTimeout(d,As))]));let s=t?.codecName??null;we({source:"hf-preview",type:"diagnostic",code:Uf,details:{asset:r,codecName:s,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${Uf}: "${r}" uses a codec (${s??"unknown"}) this browser can't decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function $f(e){if(Ts(e)||!Se(e)||Vt.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=Rs(e);if(n===null)return;let r=ks(n,t);if(!r||!r.browserHostile)return;let i=r.representativeMime?e.canPlayType(r.representativeMime):"";i==="probably"||i==="maybe"||Ms(e,r,"proactive")}function zf(e){if(Ts(e)||!Se(e)||e.videoWidth!==0)return;let t=So(e);if(Vt.has(e)){$t(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=Rs(e);if(r===null){$t(e,"cross_origin",t);return}let i=ks(r,n);if(i&&!i.browserHostile){$t(e,"browser_safe_codec",t);return}Ms(e,i,"reactive")}function qf(e){if(Ts(e)||!Se(e))return;let t=So(e);if(Vt.has(e)){$t(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=Rs(e);if(r===null){$t(e,"cross_origin",t);return}let i=ks(r,n);if(i&&!i.browserHostile){$t(e,"browser_safe_codec",t);return}Ms(e,i,"tertiary")}var De=class extends Error{constructor(n,r=null){super(r==null?n:`${n} at line ${r}`);ue(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=r}},dS=[0,0,0],fS=[1,1,1],vo=64;function mS(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"'&&(t=!t),r==="#"&&!t)return e.slice(0,n)}return e}function zt(e,t){let n=Number(e);if(!Number.isFinite(n))throw new De(`Invalid number "${e}"`,t);return n}function jf(e,t,n){if(e.length!==3)throw new De(`${t} expects three numbers`,n);return[zt(e[0],n),zt(e[1],n),zt(e[2],n)]}function Kf(e,t,n){if(!e)throw new De(`${t} expects a size`,n);let r=Number(e);if(!Number.isInteger(r)||r<2)throw new De(`${t} must be an integer greater than 1`,n);return r}function pS(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new De("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function hS(e){let t=/^TITLE\s+"([^"]*)"\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\s+(.+)\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function gS(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function Xf(e,t={}){let n=t.maxSize??vo,r=null,i=dS,o=fS,a=null,l=null,s=[],c=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<c.length;m++){let f=m+1,b=mS(c[m]??"").trim();if(!b)continue;let h=b.split(/\s+/),y=(h[0]??"").toUpperCase(),x=h.slice(1);if(y==="TITLE"){r=hS(b);continue}if(y==="DOMAIN_MIN"){i=jf(x,y,f);continue}if(y==="DOMAIN_MAX"){o=jf(x,y,f);continue}if(y==="LUT_3D_INPUT_RANGE"){if(x.length!==2)throw new De(`${y} expects two numbers`,f);let E=zt(x[0],f),w=zt(x[1],f);if(w<=E)throw new De("LUT_3D_INPUT_RANGE max must exceed min",f);i=[E,E,E],o=[w,w,w];continue}if(y==="LUT_1D_SIZE"){a=Kf(x[0],y,f);continue}if(y==="LUT_3D_SIZE"){if(l=Kf(x[0],y,f),l>n)throw new De(`LUT_3D_SIZE ${l} exceeds max ${n}`,f);continue}if(!gS(y)){if(y.startsWith("LUT_"))throw new De(`Unsupported cube keyword ${y}`,f);continue}if(!l)throw a?new De("1D cube LUTs are not supported yet",f):new De("LUT data appears before LUT_3D_SIZE",f);if(h.length!==3)throw new De("LUT data rows must contain three numbers",f);s.push(zt(h[0],f),zt(h[1],f),zt(h[2],f))}if(a&&l)throw new De("Mixed 1D and 3D cube LUTs are not supported yet");if(!l)throw a?new De("1D cube LUTs are not supported yet"):new De("Missing LUT_3D_SIZE");pS(i,o);let d=l*l*l;if(s.length!==d*3)throw new De(`Expected ${d} LUT rows for size ${l}, found ${s.length/3}`);return{title:r,size:l,domainMin:i,domainMax:o,data:new Float32Array(s)}}function bS(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function Lr(e){return Math.round(bS(e)*255)}function Ns(e){let t=e.size,n=t*t,r=t,i=new Uint8Array(n*r*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let l=0;l<t;l++){let s=((o*t+a)*t+l)*3,c=(a*n+o*t+l)*4;i[c]=Lr(e.data[s]??0),i[c+1]=Lr(e.data[s+1]??0),i[c+2]=Lr(e.data[s+2]??0),i[c+3]=255}return{width:n,height:r,data:i}}var Yf="rec709";var Ae={hueDegrees:{min:0,max:360,inclusiveMax:!1},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}};var Jf=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"],Qf=["shadows","midtones","highlights"],Zf=["master","red","green","blue"],em=["hueVsHue","hueVsSaturation","hueVsLuma"];var tm=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],nm=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"];var zM=Ae.unit,qM=Ae.signedUnit,jM=Ae.effects;var gt=1024,Fr=16;function rm(e,t,n,r){let i=((2*e+t)*n-e*r)/(e+t);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Ie(e,t){let n=e[t];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function xS(e){let t=[],n=[],r=Ie(e,0);for(let a of e.slice(1)){let l=a[0]-r[0];t.push(l),n.push((a[1]-r[1])/l),r=a}let i=Ie(n,0);if(e.length===2)return[i,i];let o=new Array(e.length);o[0]=rm(Ie(t,0),Ie(t,1),i,Ie(n,1)),o[o.length-1]=rm(Ie(t,t.length-1),Ie(t,t.length-2),Ie(n,n.length-1),Ie(n,n.length-2));for(let a=1;a<e.length-1;a+=1){let l=Ie(n,a-1),s=Ie(n,a);if(l===0||s===0||Math.sign(l)!==Math.sign(s)){o[a]=0;continue}let c=Ie(t,a-1),d=Ie(t,a),m=2*d+c,f=d+2*c;o[a]=(m+f)/(m/l+f/s)}return o}function im(e,t){if(e.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(t)||t<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(let[r,i]of e){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function yS(e,t,n){if(!Number.isFinite(t)||!Number.isFinite(n)||t>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(e.some(([,r])=>r<t||r>n))throw new RangeError(`Curve outputs must be between ${t} and ${n}`)}function SS(e,t,n,r,i){let o=n[0]-t[0],a=Math.min(1,Math.max(0,(e-t[0])/o)),l=a*a,s=l*a;return(2*s-3*l+1)*t[1]+(s-2*l+a)*o*r+(-2*s+3*l)*n[1]+(s-l)*o*i}function om(e,t,n,r,i){yS(e,r,i);let o=xS(e),a=new Float32Array(t),l=0;for(let s=0;s<t;s+=1){let c=n(s);for(;l<e.length-2&&c>Ie(e,l+1)[0];)l+=1;let d=Ie(e,l),m=Ie(e,l+1),f=SS(c,d,m,Ie(o,l),Ie(o,l+1));a[s]=Math.min(i,Math.max(r,f))}return a}function Hn(e,t=gt){if(im(e,t),e.length>Fr)throw new RangeError(`A color curve supports at most ${Fr} points`);if(e.some(([n])=>n<0||n>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(e[0]?.[0]!==0||e[e.length-1]?.[0]!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return om(e,t,n=>n/(t-1),0,1)}function Fs(e,t,n,r=gt){if(e.length<3)throw new RangeError("A hue curve requires at least three points");if(e.length>Fr)throw new RangeError(`A hue curve supports at most ${Fr} points`);let i=[...e].sort((s,c)=>s[0]-c[0]);for(let s=0;s<i.length;s+=1){let c=i[s];if(!c||c[0]<0||c[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(s>0&&c[0]===i[s-1]?.[0])throw new RangeError("Hue curve inputs must be unique")}let o=i.slice(-2).map(([s,c])=>[s-360,c]),a=i.slice(0,2).map(([s,c])=>[s+360,c]),l=[...o,...i,...a];return im(l,r),om(l,r,s=>s/r*360,t,n)}var Dr="data-color-grading",pn="data-hf-color-grading-source-hidden",hn="data-hf-authored-opacity",cm="__hf_color_grading_",ES=Yf,Ps={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},Os={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},Hs={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5};var _o=Jf,dm=Qf,fm=Zf,mm=em,Bs=tm,Us=nm,am={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},sm={vignette:.18};function Pe(e,t,n={},r={},i={},o=1){return{id:e,label:t,intensity:o,adjust:{...Ps,...n},details:{...Os,...r},effects:{...Hs,...i}}}var Ws=[Pe("neutral","Neutral"),Pe("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),Pe("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),Pe("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),Pe("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),Pe("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),Pe("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),Pe("vintage-wash","Vintage Wash",am,sm),Pe("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),Pe("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),Pe("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),Pe("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),Pe("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),Pe("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),Pe("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),Pe("home-movie-8mm","8mm Home Movie",am,{...sm,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),Pe("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),Pe("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],AS=new Map(Ws.map(e=>[e.id,e])),_S=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,wS={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},Gn={hue:0,amount:0,level:0},lm={amount:Ae.unit,level:Ae.signedUnit},qt=[[0,0],[1,1]],Bn=[],CS={hueVsHue:Ae.secondaryHueShift,hueVsSaturation:Ae.signedUnit,hueVsLuma:Ae.signedUnit},Ds={center:0,range:180,softness:0},Is={min:0,max:1,softness:.05},TS={vignette:Ae.unit,vignetteMidpoint:Ae.unit,vignetteRoundness:Ae.signedUnit,vignetteFeather:Ae.unit,grain:Ae.unit,grainSize:Ae.unit,grainRoughness:Ae.unit},Gs=Ae.unit,RS=Ae.effects,pm=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"];var kS=Ws.filter(e=>pm.some(t=>e.effects[t]>1e-4)),tN=Ws.filter(e=>!kS.includes(e)),nN={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},hm=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];var MS=/^#[0-9a-f]{6}$/i;function NS(e){return!Array.isArray(e)||e.length<2||e.length>6||!e.every(t=>typeof t=="string"&&MS.test(t))?null:e.map(t=>t.toLowerCase())}function He(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ao(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function gm(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Ue(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Ao(n,t.min,t.max):0}function Vs(e,t=0){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?(n%360+360)%360:t}function LS(e){let t=He(e)?e:{};return dm.reduce((n,r)=>{let i=He(t[r])?t[r]:{};return n[r]={hue:Vs(i.hue,Gn.hue),amount:Ue(i.amount??Gn.amount,lm.amount),level:Ue(i.level??Gn.level,lm.level)},n},{shadows:{...Gn},midtones:{...Gn},highlights:{...Gn}})}function FS(e){if(!Array.isArray(e)||e.length!==2)return null;let t=Number(e[0]),n=Number(e[1]);return Number.isFinite(t)&&Number.isFinite(n)?[Ao(t,0,1),Ao(n,0,1)]:null}function bm(e){return e.some((t,n)=>n>0&&t[0]===e[n-1]?.[0])}function DS(e){(e[0]?.[0]??0)>0&&e.unshift([0,0]),(e.at(-1)?.[0]??1)<1&&e.push([1,1])}function IS(e){if(!Array.isArray(e)||e.length<2)return qt;let t=[];for(let n of e){let r=FS(n);if(!r)return qt;t.push(r)}return t.sort((n,r)=>n[0]-r[0]),bm(t)||(DS(t),t.length>16)?qt:t}function PS(e){let t=He(e)?e:{};return fm.reduce((n,r)=>(n[r]=IS(t[r]),n),{master:qt,red:qt,green:qt,blue:qt})}function OS(e,t){if(!Array.isArray(e)||e.length!==2)return null;let n=Number(e[0]),r=Number(e[1]);return Number.isFinite(n)&&Number.isFinite(r)?[Vs(n),Ao(r,t.min,t.max)]:null}function HS(e,t){if(!Array.isArray(e)||e.length<3||e.length>16)return Bn;let n=[];for(let r of e){let i=OS(r,t);if(!i)return Bn;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),bm(n)?Bn:n}function GS(e){let t=He(e)?e:{};return mm.reduce((n,r)=>(n[r]=HS(t[r],CS[r]),n),{hueVsHue:Bn,hueVsSaturation:Bn,hueVsLuma:Bn})}function um(e){let t=He(e)?e:{},n=Ue(t.min??Is.min,Gs),r=Ue(t.max??Is.max,Gs);return{min:Math.min(n,r),max:Math.max(n,r),softness:Ue(t.softness??Is.softness,Ae.secondarySoftRangeSoftness)}}function BS(e){let t=He(e)?e:{},n=Ue(t.range??Ds.range,Ae.secondaryHueRange);return{center:Vs(t.center,Ds.center),range:n,softness:Ue(t.softness??Ds.softness,{min:Ae.secondaryHueSoftness.min,max:Ae.secondaryHueCombinedMax-n})}}function US(e){return{hueShift:Ue(e.hueShift??0,Ae.secondaryHueShift),saturation:Ue(e.saturation??0,Ae.signedUnit),luma:Ue(e.luma??0,Ae.signedUnit),temperature:Ue(e.temperature??0,Ae.signedUnit),tint:Ue(e.tint??0,Ae.signedUnit)}}function WS(e){return!He(e)||!He(e.key)||!He(e.correction)?null:{enabled:e.enabled!==!1,key:{hue:BS(e.key.hue),saturation:um(e.key.saturation),luma:um(e.key.luma)},correction:US(e.correction)}}function VS(e){if(!Array.isArray(e))return[];let t=[];for(let n of e.slice(0,4)){let r=WS(n);r&&t.push(r)}return t}function $S(e){if(e==null)return null;let t=String(e).trim();return t||null}function zS(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!He(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:gm(e.intensity,1)}}function qS(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return He(n)?n:null}catch{return null}return{preset:t}}return He(e)?e:null}function jS(e,t){let n=e.trim().match(_S);if(!n)return e;let r=n[1]??n[2]??"";return r&&Object.hasOwn(t,r)?t[r]:e}function Eo(e,t){if(typeof e=="string"){let r=jS(e,t);if(r!==e)return r;let i=e.trim();if(!i.startsWith("{"))return e;try{return Eo(JSON.parse(i),t)}catch{return e}}if(Array.isArray(e))return e.map(r=>Eo(r,t));if(!He(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=Eo(i,t);return n}function KS(e){return e?AS.get(e)??null:null}function wo(e){let t=qS(e);if(!t||t.enabled===!1)return null;let n=$S(t.preset),r=KS(n),i=r?.adjust??Ps,o=r?.details??Os,a=r?.effects??Hs,l=He(t.adjust)?t.adjust:{},s=He(t.details)?t.details:{},c=He(t.effects)?t.effects:{},d=_o.reduce((b,h)=>(b[h]=Ue(l[h]??i[h],wS[h]),b),{...Ps}),m=Bs.reduce((b,h)=>(b[h]=Ue(s[h]??o[h],TS[h]),b),{...Os}),f=Us.reduce((b,h)=>(b[h]=Ue(c[h]??a[h],RS[h]??Gs),b),{...Hs});return{enabled:!0,preset:n,intensity:gm(t.intensity,r?.intensity??1),adjust:d,wheels:LS(t.wheels),curves:PS(t.curves),hueCurves:GS(t.hueCurves),secondaries:VS(t.secondaries),details:m,effects:f,palette:NS(t.palette),lut:zS(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():ES}}function xm(e,t){return wo(Eo(e,t))}function XS(e){return dm.some(t=>Math.abs(e[t].amount)>1e-4||Math.abs(e[t].level)>1e-4)}function $s(e){return fm.some(t=>e[t].some(([n,r])=>Math.abs(n-r)>1e-4))}function zs(e){return mm.some(t=>e[t].some(([,n])=>Math.abs(n)>1e-4))}function qs(e){return e.some(t=>t.enabled&&Object.values(t.correction).some(n=>Math.abs(n)>1e-4))}function ym(e){return e?.enabled?Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||pm.some(n=>Math.abs(e.effects[n])>1e-4)?!0:e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:_o.some(n=>Math.abs(e.adjust[n])>1e-4)||(e.wheels?XS(e.wheels):!1)||(e.curves?$s(e.curves):!1)||(e.hueCurves?zs(e.hueCurves):!1)||(e.secondaries?qs(e.secondaries):!1):!1}var Co=/^(|transparent|rgba\(.*,\s*0\)|.*\/\s*0%?\s*\))$/,YS=new Set(["IMG","VIDEO","IFRAME","EMBED","OBJECT","CANVAS"]),Sm="http://www.w3.org/2000/svg",JS=new Set(["svg","g","foreignObject"]),QS=["Top","Right","Bottom","Left"],ZS={left:-1/0,right:1/0,top:-1/0,bottom:1/0},vm=e=>!!e.backgroundImage&&e.backgroundImage!=="none"||!Co.test(e.backgroundColor),ev=e=>{let t=e.getPropertyValue("-webkit-text-fill-color")||e.color,n=Number.parseFloat(e.getPropertyValue("-webkit-text-stroke-width"))||0,r=e.getPropertyValue("-webkit-text-stroke-color")||e.color;return!Co.test(t)||n>0&&!Co.test(r)},Em=e=>QS.map(t=>e[`border${t}Style`]!=="none"&&!Co.test(e[`border${t}Color`])&&Number.parseFloat(e[`border${t}Width`])||0),To=e=>e.bottom-e.top,js=(e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom,Am=(e,t)=>({left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}),tv=(e,t)=>t.display==="none"||t.position==="absolute"||t.position==="fixed"||Number.parseFloat(t.opacity)<=.01&&!e.hasAttribute(pn);function nv(e,t,n){if(e.width<=0&&e.height<=0)return!1;let r=3*(Number.parseFloat(t.fontSize)||16),i=Math.max(r,Math.min(2*e.height,20*r/3));return n<e.top-i||n>e.bottom+i}function rv(e,t,n,r){let[i,o,a,l]=Em(t);if(!(i||o||a||l))return!1;let s=e.getBoundingClientRect(),{offsetWidth:c,offsetHeight:d}=e,m=c>0?s.width/c:1,f=d>0?s.height/d:1,b={left:s.left+l*m,right:s.right-o*m,top:s.top+i*f,bottom:s.bottom-a*f};return!js(b,n,r)}function iv(e){let t=[];for(let n of[...e].sort((r,i)=>r.left-i.left)){let r=t.findIndex(i=>n.top<i.bottom&&n.bottom>i.top&&n.left-i.right<=2*Math.max(To(i),To(n)));r<0?t.push(n):t[r]=Am(t[r],n)}return t}function ov(e){let t=[...e].sort((n,r)=>n.top-r.top);return t.flatMap((n,r)=>t.slice(r+1).flatMap(i=>{let o=i.left<n.right&&i.right>n.left,a=i.top-n.bottom<=2*Math.min(To(n),To(i));return o&&a&&i.top>n.bottom?[Am(n,i)]:[]}))}function _m(e,t,n){let r=e.defaultView,i=typeof e.createRange().getClientRects=="function",o=e.createRange(),a=new Map,l=new Map,s=new Map,c=x=>{let E=l.get(x);if(E===void 0){let w=r.getComputedStyle(x);E=tv(x,w)||i&&nv(x.getBoundingClientRect(),w,n),l.set(x,E)}return E},d=x=>{let E=s.get(x);if(E===void 0){let w=x.parentElement,C=w&&x.nodeValue?.trim()?r.getComputedStyle(w):null;E=!!C&&C.visibility!=="hidden"&&ev(C),s.set(x,E)}return E},m=x=>{if(!i)return[ZS];let E=[];o.selectNodeContents(x);for(let w of o.getClientRects()){let C=w.bottom-w.top;w.width>0&&C>0&&n>=w.top-2*C&&n<=w.bottom+2*C&&E.push(w)}return E},f=x=>{let E=a.get(x);if(E)return E;E=[];for(let w of x.childNodes)w.nodeType===3?d(w)&&E.push(...m(w)):w.nodeType===1&&w.hasChildNodes()&&!c(w)&&E.push(...f(w));return a.set(x,E),E};function b(x){let E=iv(f(x));return E.some(w=>js(w,t,n))||ov(E).some(w=>js(w,t,n))}function h(x,E){let w=r.getComputedStyle(x,E);return!w.content||w.content==="none"||w.content==="normal"||w.display==="none"?!1:w.content!=='""'||vm(w)||Em(w).some(C=>C>0)}let y=(x,E)=>/inset/.test(E.boxShadow)||rv(x,E,t,n)||h(x,"::before")||h(x,"::after");return x=>{if(YS.has(x.tagName)||!(x.namespaceURI!==Sm||JS.has(x.localName))||!r)return!0;let w=r.getComputedStyle(x);return vm(w)||y(x,w)||x.namespaceURI!==Sm&&b(x)}}var av=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),sv=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(","),wm="[data-hf-inner-root],[data-composition-id]:not([data-composition-id] *)",Cm=`${wm}{pointer-events:auto!important}`,lv=`@layer hf-picker{${Cm}}`;function Tm(e){let t=!1,n=null,r=null,i=null,o=null,a,l=new Set;function s(N,_){try{window.dispatchEvent(new CustomEvent(N,{detail:_}))}catch(H){P("runtime.picker.site1",H)}}function c(N){i=N,s("hyperframe:picker:hovered",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function d(N){o=N,s("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function m(N){if(l=new Set(Array.from(document.querySelectorAll(wm)).filter(J=>getComputedStyle(J).pointerEvents==="none")),l.size===0)return N();let _=f(),H=_?b(_):h();try{return N()}finally{H(),l=new Set}}function f(){if(a!==void 0)return a;if(a=null,!Array.isArray(document.adoptedStyleSheets)||typeof CSSStyleSheet>"u")return null;try{let N=new CSSStyleSheet;N.replaceSync(lv),a=N}catch(N){P("runtime.picker.site2",N)}return a}function b(N){return document.adoptedStyleSheets=[...document.adoptedStyleSheets,N],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(_=>_!==N)}}function h(){let N=document.createElement("style");return N.textContent=Cm,(document.head??document.documentElement).appendChild(N),()=>N.remove()}function y(N){let _=N.ownerDocument.defaultView;if(!_)return!1;let H=N;if(_.getComputedStyle(N).visibility==="hidden")return!0;for(;H&&H!==document.body&&H!==document.documentElement;){let J=_.getComputedStyle(H);if(J.display==="none"||J.pointerEvents==="none")return!0;let B=Number.parseFloat(J.opacity);if(Number.isFinite(B)&&B<=.01&&!H.hasAttribute(pn))return!0;H=H.parentElement}return!1}function x(N){if(!N||N===document.body||N===document.documentElement)return!1;let _=N.tagName.toLowerCase();return!(_==="script"||_==="style"||_==="link"||_==="meta"||l.has(N)||N.closest(av)||y(N))}function E(N){return!!N?.closest(sv)}function w(N){let _=N.parentElement?.getAttribute("data-composition-id");return!N.hasAttribute("data-hf-inner-root")||!_?null:`[data-composition-id="${CSS.escape(_)}"] > [data-hf-inner-root]`}function C(N){let _=w(N);if(_)return _;let H=N;if(H.id)return`#${CSS.escape(H.id)}`;let J=N.getAttribute("data-composition-id");if(J)return`[data-composition-id="${CSS.escape(J)}"]`;let B=N.getAttribute("data-composition-src");if(B)return`[data-composition-src="${CSS.escape(B)}"]`;let q=N.getAttribute("data-track-index");if(q)return`[data-track-index="${CSS.escape(q)}"]`;let $=N.tagName.toLowerCase(),X=N.parentElement;if(!X)return $;let K=X.querySelectorAll(`:scope > ${$}`);if(K.length===1)return $;for(let G=0;G<K.length;G+=1)if(K[G]===N)return`${$}:nth-of-type(${G+1})`;return $}function I(N){let _=N.tagName.toLowerCase(),H=(N.textContent??"").trim().replace(/\s+/g," "),J=(q,$)=>{let X=Array.from(q);return X.length>$?`${X.slice(0,$-1).join("")}\u2026`:q},B=/^h[1-6]$/.test(_);return B||_==="p"||_==="span"||_==="div"?H.length>0?J(H,56):B?"Heading":"Text":_==="img"?"Image":_==="video"?"Video":_==="audio"?"Audio":_==="svg"?"Shape":N.getAttribute("data-composition-src")?"Composition":_==="section"?"Section":`${_.charAt(0).toUpperCase()}${_.slice(1)}`}function D(N,_,H){let J=typeof H=="number"&&H>0?H:8,B=[];if(document.elementsFromPoint)B=document.elementsFromPoint(N,_);else if(document.elementFromPoint){let G=document.elementFromPoint(N,_);B=G?[G]:[]}if(E(B[0]??null))return[];let q={},$=[],X=[],K=_m(document,N,_);for(let[G,V]of B.entries()){if(!x(V))continue;let ee=`${V.tagName}::${V.id||""}::${G}`;if(!q[ee]&&(q[ee]=!0,$.push(V),(X.some(ce=>V.contains(ce))||K(V))&&(X.push(V),X.length>=J)))break}return X.length>0?X:$.slice(0,J)}function F(N){let _=N.getBoundingClientRect(),H={};for(let B of Array.from(N.attributes))B.name.startsWith("data-")&&(H[B.name]=B.value);return{id:N.id||null,tagName:N.tagName.toLowerCase(),selector:C(N),label:I(N),boundingBox:{x:_.left,y:_.top,width:_.width,height:_.height},textContent:N.textContent?N.textContent.trim().slice(0,200):null,src:N.getAttribute("src")||N.getAttribute("data-composition-src")||null,dataAttributes:H}}function O(N,_,H){return m(()=>D(N,_,H)).map(F)}function T(N){if(!t)return;let _=m(()=>{let J=D(N.clientX,N.clientY,1)[0]??(Le(N.target)?N.target:null);return x(J)?J:null});if(!_||n===_)return;n&&n.classList.remove("__hf-pick-highlight"),n=_,_.classList.add("__hf-pick-highlight");let H=F(_);c(H),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:H})}function M(N){if(!t)return;N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation();let _=O(N.clientX,N.clientY,8);_.length!==0&&(c(_[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:_,selectedIndex:0,point:{x:N.clientX,y:N.clientY}}))}function R(N){N.key==="Escape"&&(j(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function U(){t||(t=!0,r=document.createElement("style"),r.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
39
+ `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(i=>{i.classList.add("__hf-flash"),setTimeout(()=>i.classList.remove("__hf-flash"),t)})}catch(r){P("bridge.flashElements.querySelector",r)}}var io=e=>4*Number.EPSILON*Math.max(1,Math.abs(e));function _r(e,t){return!Number.isFinite(e)||!Number.isFinite(t)?e===t:Math.abs(e-t)<=io(Math.max(Math.abs(e),Math.abs(t)))}var Wd=(e,t)=>e>=t||_r(e,t),Ut=(e,t,n)=>Wd(e,t)&&e<n&&!_r(e,n),Ly=1e-6,oo=(e,t,n,r)=>Ut(e,t,n)||Wd(e,t)&&r>0&&n>=r-Ly;var ss=null;function Vd(e){ss=e}function Xe(e,t){if(ss)try{ss({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){P("runtime.analytics.site1",n)}}function Fy(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,r=t.length;for(;n<r&&t[n]==="-";)n++;for(;r>n&&t[r-1]==="-";)r--;let i=t.slice(n,r);return i.length>0?i:"node"}function Nn(e){return`--${Fy(e)}`}function $d(e){let t=new Map;for(let n of e){let r=Nn(n),i=t.get(r);i?i.includes(n)||i.push(n):t.set(r,[n])}return[...t.values()].filter(n=>n.length>1)}function qd(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,wr(i));let n=so(),r={...t,...n};for(let i of e)us(i,r);return r}var zd=new Set;function jd(e){let t=e?.getAttribute("data-composition-variables");if(!t)return[];let n;try{n=JSON.parse(t)}catch{return[]}return Array.isArray(n)?n.filter(r=>!!r&&typeof r=="object"):[]}function Dy(e,t){return t?.trim()||e.getAttribute("data-composition-id")?.trim()||e.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()||"composition"}function Iy(e){return Array.isArray(e.options)?e.options.map(t=>t&&typeof t=="object"?t.value:t).filter(t=>typeof t=="string"||typeof t=="number"):[]}function Py(e,t){if(typeof e.id!="string")return null;let n=t[e.id];if(n==null||"default"in e&&String(n)===String(e.default))return null;let r=Iy(e);return r.length===0||r.some(i=>String(i)===String(n))?null:{id:e.id,value:n,allowed:r}}function us(e,t,n){if(!e)return;let r=jd(e);if(r.length===0)return;let i=Dy(e,n);for(let o of r){let a=Py(o,t);if(!a)continue;let l=`${i}|${a.id}|${String(a.value)}`;if(zd.has(l))continue;zd.add(l);let s="default"in o?JSON.stringify(o.default):"the composition default";console.warn(`[hyperframes] runtime_unknown_enum_value: ${i} variable "${a.id}" got ${JSON.stringify(a.value)}, which is not a declared option (${a.allowed.join(", ")}). Rendering ${s} instead.`)}}function wr(e){let t={};for(let n of jd(e))typeof n.id!="string"||!("default"in n)||(t[n.id]=n.default);return t}var ls="data-hf-css-vars";function ao(e){return"style"in e&&typeof e.style?.setProperty=="function"}function cs(e,t){if(!ao(e))return;let n=[];for(let[r,i]of Object.entries(t))if(typeof i=="string"&&i!==""||typeof i=="number"){let o=Nn(r);e.style.setProperty(o,String(i)),n.push(o)}n.length>0&&e.setAttribute(ls,n.join(" "))}function Kd(e,t,n){let r={};for(let[i,o]of Object.entries(t)){let a=Nn(i);((ao(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(r[i]=o)}return r}function Xd(e){if(!ao(e))return;let t=e.getAttribute(ls);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(ls)}}function Yd(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let i of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(i);let n=so(),r=[];for(let i of t)r.push(...Oy(i,n,e.defaultView));for(let i of $d(r))console.warn(`composition variables ${i.join(", ")} collapse to the same CSS property ${Nn(i[0]??"")} \u2014 rename one to avoid cross-talk`)}function Oy(e,t,n){if(!ao(e))return[];let r=wr(e),i={};for(let[o,a]of Object.entries(r)){if(o in t)continue;let l=Nn(o);(e.style.getPropertyValue(l)||(n?n.getComputedStyle(e).getPropertyValue(l):"")).trim()===""&&(i[o]=a)}for(let[o,a]of Object.entries(t))o in r&&(i[o]=a);return cs(e,i),Object.keys(r)}function Jd(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function so(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function Qd(e){let t=[],n=(f,b=()=>f.getAnimations())=>{if(typeof f.getAnimations!="function")return[];try{return b()}catch{return[]}},r=f=>{let b=new Map;if(t.length===0)return b;let h=typeof CSSAnimation<"u";for(let y of n(document,f)){if(h&&!(y instanceof CSSAnimation))continue;let x=y.effect;if(!x?.target||x.pseudoElement)continue;let E=b.get(x.target);E?E.push(y):b.set(x.target,[y])}return b},i=(f=[],b=[])=>[...b,...f.filter(h=>!b.includes(h)&&h.playState!=="idle")],o=f=>{let b=f.closest("[data-start]")??f;return e?.resolveStartSeconds?e.resolveStartSeconds(b):Number.parseFloat(b.getAttribute("data-start")??"0")||0},a=f=>{let b=w=>(w||"").split(",").map(C=>Number.parseFloat(C)/(C.trim().endsWith("ms")?1e3:1)),h=b(f.animationDuration),y=b(f.animationDelay),x=f.animationName.split(","),E=0;return x.forEach((w,C)=>{if(w.trim()==="none")return;let I=y[C%y.length]+h[C%h.length];I>E&&(E=I)}),{cycleSeconds:E,delays:x.map((w,C)=>y[C%y.length]||0)}},l=(f,b)=>{let h=null;try{h=f.effect?.getComputedTiming?.()??null}catch(x){P("runtime.adapters.css.site5",x)}if(!h)return{};let y=Number(h.endTime);return Number.isFinite(y)?{endSeconds:b+y/1e3}:{unbounded:!0}},s=(f,b)=>{for(let h of f){try{h.currentTime=b}catch(y){P("runtime.adapters.css.site1",y)}try{h.pause()}catch(y){P("runtime.adapters.css.site2",y)}}},c=f=>{for(let b of f)try{b.play()}catch(h){P("runtime.adapters.css.site3",h)}},d=f=>{for(let b of f)try{b.pause()}catch(h){P("runtime.adapters.css.site4",h)}},m=f=>{f.baseDelay?f.el.style.animationDelay=f.baseDelay:f.el.style.removeProperty("animation-delay"),f.basePlayState?f.el.style.animationPlayState=f.basePlayState:f.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{for(let h of t)m(h);let f=new Map(t.map(h=>[h.el,h.handles]));t=[];let b=document.querySelectorAll("*");for(let h of b){if(!ye(h))continue;let y=window.getComputedStyle(h);!y.animationName||y.animationName==="none"||t.push({el:h,baseDelay:h.style.animationDelay||"",basePlayState:h.style.animationPlayState||"",...a(y),handles:f.get(h)})}},getAnimationCycleEndSeconds:()=>{let f=0;for(let b of t)!b.el.isConnected||b.cycleSeconds<=0||(f=Math.max(f,o(b.el)+b.cycleSeconds));return f>0?f:null},getInferredDurationSeconds:()=>{let f=0;for(let b of t){if(!b.el.isConnected)continue;let h=o(b.el);for(let y of n(b.el)){let x=l(y,h);x.endSeconds!=null&&(f=Math.max(f,x.endSeconds))}}return f>0?f:null},seek:f=>{let b=Number(f.time)||0,h=r(f.pageAnimations);for(let y of t)y.handles=i(y.handles,h.get(y.el));for(let y of t){if(!y.el.isConnected)continue;let x=o(y.el),E=Math.max(0,b-x)*1e3;if(y.handles?.length){y.el.style.animationDelay!==y.baseDelay&&m(y),s(y.handles,E);continue}y.el.style.animationPlayState="paused",y.el.style.animationDelay=y.delays.map(w=>`${Number((w-E/1e3).toFixed(3))}s`).join(", ")}},pause:f=>{let b=r(f?.pageAnimations);for(let h of t){if(!h.el.isConnected)continue;let y=b.get(h.el);y&&(d(y),m(h))}},play:()=>{let f=r();for(let b of t)b.el.isConnected&&(m(b),c(f.get(b.el)??[]))},revert:()=>{t=[]}}}function Zd(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0),i=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(r+.001,!0),n.totalTime(r,i)):n.seek(r,i)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function ef(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],r=new Set(n);for(let i of t)r.has(i)||n.push(i);window.__hfAnime=n}catch(e){P("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let r of n)try{typeof r.seek=="function"&&r.seek(t)}catch(i){P("runtime.adapters.animejs.site2",i)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){P("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){P("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function af(e){let t=r=>{let i=nf(r),o=i&&typeof i.closest=="function"?i.closest("[data-composition-id]"):null;return o&&e?.resolveStartSeconds?e.resolveStartSeconds(o):0},n=(r,i)=>Math.max(0,i-t(r));return{name:"lottie",discover:()=>{try{let r=window.lottie;if(r&&typeof r.getRegisteredAnimations=="function"){let i=r.getRegisteredAnimations();if(Array.isArray(i)&&i.length>0){let o=window.__hfLottie??[],a=new Set(o);for(let l of i)a.has(l)||o.push(l);window.__hfLottie=o}}}catch(r){P("runtime.adapters.lottie.site1",r)}},seek:r=>{let i=Math.max(0,Number(r.time)||0),o=window.__hfLottie;if(!(!o||o.length===0))for(let a of o)try{let l=n(a,i),s=a.loop===!0;if(lo(a)){let c=l*a.frameRate;a.totalFrames>0&&s?a.goToAndStop(rf(c,a.totalFrames),!0):a.totalFrames>0&&c>=a.totalFrames?a.goToAndStop(a.totalFrames-1,!0):a.goToAndStop(l*1e3,!1)}else if(ds(a)){if(typeof a.setCurrentRawFrameValue=="function"){let c=a.totalFrames??0,d=a.frameRate??30,m=s&&c>0?rf(l*d,c):l*d;c>0&&a.setCurrentRawFrameValue(Math.min(m,c-1))}else if(typeof a.seek=="function"){let c=a.duration??0;if(Number.isFinite(c)&&c>0){let d=Math.min(100,(s?l%c:l)/c*100);a.seek(d)}}}}catch(l){P("runtime.adapters.lottie.site2",l)}},pause:()=>{let r=window.__hfLottie;if(!(!r||r.length===0))for(let i of r)try{(lo(i)||ds(i))&&i.pause()}catch(o){P("runtime.adapters.lottie.site3",o)}},revert:()=>{},getInferredDurationSeconds:()=>tf((r,i)=>i),getAnimationCycleEndSeconds:()=>tf((r,i)=>nf(r)?.isConnected===!1?null:t(r)+i)}}function tf(e){let t=window.__hfLottie;if(!t||t.length===0)return null;let n=0,r=!1;for(let i of t){let o=null;try{let a=Hy(i);o=a==null?null:e(i,a)}catch(a){P("runtime.adapters.lottie.site4",a)}o!=null&&(r=!0,n=Math.max(n,o))}return r?n:null}function nf(e){return lo(e)?e.wrapper:e.canvas}function rf(e,t){let n=e%t;return t-n<1e-6?0:n}function of(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function Hy(e){return lo(e)?of(e.totalFrames,e.frameRate):ds(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:of(e.totalFrames,e.frameRate):null}function lo(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function ds(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var fs=-1,uo=new Set,Ln,ms=0;function sf(e){let t=[],n=!0,r={time:e,waitUntil:i=>{if(!n)throw new Error("hf-seek waitUntil() must be called synchronously from the event listener");t.push(i)}};try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:r}))}catch(i){P("runtime.adapters.seek-dispatch.site1",i)}finally{n=!1}t.length!==0&&Tt(Promise.all(t))}function Tt(e){let t=e.then(()=>({status:"fulfilled"})).catch(n=>({status:"rejected",reason:n}));uo.add(t),t.then(n=>{uo.delete(t)&&n.status==="rejected"&&Ln===void 0&&(Ln={reason:n.reason})})}function co(e){e!==fs&&(fs=e,sf(e))}function fo(e){fs=e,sf(e)}function lf(){return ms>0}async function ps(){ms+=1;let e=Ln;try{for(await Promise.resolve();uo.size>0;){let r=(await Promise.all([...uo])).find(i=>i.status==="rejected");e===void 0&&r?.status==="rejected"&&(e={reason:r.reason})}let t=Ln;if(e===void 0&&(e=t),Ln===t&&(Ln=void 0),e)throw e.reason}finally{ms-=1}}function uf(){let e=null,t=0,n=null,r=null,i=null,o=null,a=()=>{if(typeof window>"u")return null;let d=window.THREE?.DefaultLoadingManager;return!d||typeof d!="object"||typeof d.itemsLoaded!="number"||typeof d.itemsTotal!="number"?null:d},l=c=>{o||c.itemsTotal<=c.itemsLoaded||(o=new Promise(d=>{c.onLoad=function(){try{i?.call(this)}finally{o=null,c.onLoad=i??null,d()}}}))},s=c=>{n!==c&&(n=c,r=c.onStart??null,i=c.onLoad??null,c.onStart=function(d,m,f){try{r?.call(this,d,m,f)}finally{l(c)}})};return{name:"three",discover:()=>{let c=a();c&&(s(c),l(c))},seek:c=>{e=Math.max(0,Number(c.time)||0),t=e,window.__hfThreeTime=e,co(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let c=a();return!c||c.itemsTotal<=c.itemsLoaded?null:(o||l(c),o)}}}function pt(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let r=e.getInstances();if(r.length===0)return null;let i=r.filter(o=>!n.has(o));return i.length===0?null:t||(t=Promise.allSettled(i.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function cf(){return pt({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function df(){return pt({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function ff(){return pt({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function mf(){return pt({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function pf(){return pt({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}var Gy=250;function hf(){let e=null,t=0,n=null,r=()=>{n!==null&&(window.clearInterval(n),n=null)},i=()=>{n===null&&document.querySelector("[data-composition-id][data-requires-webgpu]")&&(n=window.setInterval(()=>{e!==null&&(lf()||(window.__hfTypegpuTime=e,fo(e)))},Gy))};return{name:"typegpu",discover:()=>{},seek:o=>{e=Math.max(0,Number(o.time)||0),t=e,window.__hfTypegpuTime=e,co(e)},pause:()=>{e==null&&(e=Math.max(0,t)),i()},play:()=>{r(),e=null},revert:()=>{r(),e=null,t=0}}}var Cr="data-hf-render-id",gf="data-hf-group-render-id";function By(e){return e.getAttribute(Cr)||e.id||null}var Uy="__render_frame_",Wy="__";function Vy(e){return`${Uy}${e}${Wy}`}function $y(e){let t=By(e);return t?Vy(t):null}function Rt(e){let t=$y(e),n=t?document.getElementById(t):null;if(!n)return null;let r=e.nextElementSibling;for(;r&&r.id!==t;)r=r.nextElementSibling;return r??(r=n),Oe(r)?r:null}function bf(e){let t=e.nextElementSibling;if(Oe(t)&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;let n=Rt(e);return n&&n.complete&&n.naturalWidth>0?n:null}function xf(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,r,i){if(Se(n?.source)){let o=bf(n.source);if(o)return t.call(this,{...n,source:o},r,i)}return t.call(this,n,r,i)}}function yf(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let r=n?.prototype;if(r)for(let i of t){let o=r[i];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...l){let s=l.length-1,c=l[s];if(Se(c)){let d=bf(c);d&&(l[s]=d)}return o.apply(this,l)};a.__hfVideoPatched=!0,r[i]=a}}}function Sf(){let e=!1,t=0,n=!1,r,i,o,a=new Set,l=new WeakMap,s=(x=()=>document.getAnimations())=>{if(!document.getAnimations)return[];try{return x()}catch{return[]}},c=x=>{let E=Number(x.currentTime);return Number.isFinite(E)&&E>0?E:0},d=(x,E)=>E<=0?x:x>=E?Math.max(0,x-E):x,m=(x,E)=>{let w=l.get(x);if(w)return w;let C={compositionTimeMs:E,animationTimeMs:e?d(c(x),E):c(x)};return l.set(x,C),C},f=(x,E)=>{if(!a.has(x)){a.add(x);let w=()=>{a.delete(x)};try{x.addEventListener("finish",w,{once:!0}),x.addEventListener("cancel",w,{once:!0})}catch(C){P("runtime.adapters.waapi.site4",C)}}m(x,E)},b=(x,E)=>{for(let w of x)f(w,E)},h=()=>{if(n||typeof Element>"u")return;let x=Element.prototype;if(typeof x.animate!="function"||x.__hfOriginalAnimate)return;let E=x.animate;try{Object.defineProperty(x,"__hfOriginalAnimate",{value:E,configurable:!0});let w=function(...C){let I=E.apply(this,C);return f(I,t),I};x.animate=w,r=x,i=E,o=w,n=!0}catch{}},y=x=>{let E=null;try{E=x.effect?.getComputedTiming?.()??null}catch(I){P("runtime.adapters.waapi.site4",I)}if(!E)return{};let w=Number(E.endTime);return Number.isFinite(w)?{endSeconds:(l.get(x)?.compositionTimeMs??0)/1e3+w/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,h(),b(s(),t)},seek:x=>{let E=Math.max(0,(Number(x.time)||0)*1e3);t=E,(!e||a.size>0)&&b(s(x.pageAnimations),e?E:0);for(let w of a){let C=e?m(w,E):m(w,0),I=C.animationTimeMs+Math.max(0,E-C.compositionTimeMs);try{w.currentTime=I}catch(D){P("runtime.adapters.waapi.site1",D)}try{w.pause()}catch(D){P("runtime.adapters.waapi.site2",D)}}},pause:x=>{e||b(s(x?.pageAnimations),t);for(let E of a)try{E.pause()}catch(w){P("runtime.adapters.waapi.site3",w)}},revert:()=>{if(a.clear(),l=new WeakMap,e=!1,t=0,r&&i&&o&&r.animate===o)try{r.animate=i,r.__hfOriginalAnimate===i&&delete r.__hfOriginalAnimate}catch(x){P("runtime.adapters.waapi.site5",x)}r=void 0,i=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let x=0;for(let E of s()){let w=y(E);w.endSeconds!=null&&(x=Math.max(x,w.endSeconds))}return x>0?x:null}}}var Fn="data-hf-authored-duration",Dn="data-hf-authored-end";function Tr(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:null}function In(e){let t=Tr(e.start);if(t==null)return null;let n=Math.max(0,t),r=Tr(e.duration),i=Tr(e.authoredDuration),o=r!=null&&r>0?r:i!=null&&i>0?i:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=Tr(e.end),l=Tr(e.authoredEnd),s=a!=null&&a>n?a:l!=null&&l>n?l:null;return{start:n,duration:s==null?null:s-n,end:s}}var mo="data-hf-media-start-basis";function vf(e){return e?.trim().toLowerCase()==="global"?"global":"local"}function zy(e){return vf(e.basis)==="global"?e.authoredStart:e.hostStart+e.authoredStart}function Ef(e){return _f(e)?zy({authoredStart:e.authoredStart,hostStart:e.hostStart,basis:e.basis}):e.ordinaryStart()}function Af(e){return _f(e)&&vf(e.basis)==="global"}function _f(e){return!e.hasAutoStart&&e.authoredStart!=null&&e.hostStart>0}function Ye(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,r=e.documentRef??document,i=new WeakMap,o=new WeakMap,a=new Set,l=h=>{let y=r.getElementById(h);return y||(r.querySelector(`[data-composition-id="${CSS.escape(h)}"]`)??null)},s=h=>{let y=o.get(h);if(y!==void 0)return y;let x=null,E=In({start:0,duration:h.getAttribute("data-duration"),authoredDuration:n?h.getAttribute("data-hf-authored-duration"):null});if(E?.duration!=null&&E.duration>0&&(x=E.duration),x==null||x<=0){let w=d(h,0),C=In({start:w,end:h.getAttribute("data-end"),authoredEnd:n?h.getAttribute("data-hf-authored-end"):null});C?.duration!=null&&C.duration>0&&(x=C.duration)}if((x==null||x<=0)&&he(h)&&(x=mt(h,h.duration)),(x==null||x<=0)&&(x=Mn(h)),x==null||x<=0){let w=h.getAttribute("data-composition-id");if(w){let C=t[w]??null;if(C&&typeof C.duration=="function")try{let I=Number(C.duration());Number.isFinite(I)&&I>0&&(x=I)}catch(I){P("runtime.startResolver.site1",I)}}}return x!=null&&Number.isFinite(x)&&x>0?(o.set(h,x),x):(o.set(h,null),null)},c=(h,y)=>{if(h.hasAttribute("data-composition-id")){let E=h.parentElement?.closest("[data-composition-id]");return E?d(E,y):0}let x=h.closest("[data-composition-id]");return x?d(x,y):0},d=(h,y)=>{let x=i.get(h);if(x!==void 0)return x??y;if(a.has(h))return y;a.add(h);try{let E=za(h.getAttribute("data-start"));if(!E){if(h.hasAttribute("data-composition-id")){let F=h.parentElement;if(F&&(F.hasAttribute("data-composition-src")||F.hasAttribute("data-composition-id")||F.hasAttribute("data-composition-file"))){let O=d(F,y);return i.set(h,O),O}}return i.set(h,y),y}if(E.kind==="absolute"){let F=Math.max(0,E.value),O=Math.max(0,c(h,y)+F);return i.set(h,O),O}let w=l(E.refId);if(!w)return i.set(h,y),y;let C=d(w,0),I=s(w);if(I==null||I<=0){let F=Math.max(0,C+E.offset);return i.set(h,F),F}let D=Math.max(0,C+I+E.offset);return i.set(h,D),D}finally{a.delete(h)}},m=h=>{let y=h.closest("[data-composition-id]");return{authoredStart:Me(h.getAttribute("data-start")),hostStart:y?d(y,0):0,hasAutoStart:h.hasAttribute("data-hf-auto-start"),basis:h.getAttribute(mo)}};return{resolveStartForElement:(h,y=0)=>d(h,Math.max(0,y)),resolveDurationForElement:h=>s(h),resolveMediaStartForElement:h=>{let y=m(h);return Ef({...y,ordinaryStart:()=>d(h,y.hostStart)})},resolveHostStartForElement:h=>c(h,0),isRootGlobalMediaStartForElement:h=>he(h)&&Af(m(h))}}function qy(e,t,n){let r=e.filter(o=>Number.isFinite(o.time)&&Number.isFinite(o.volume)).map(o=>({time:Math.max(0,o.time-t),volume:Ke(o.volume)})).sort((o,a)=>o.time-a.time),i=[];for(let o of r){let a=i.at(-1);a&&Math.abs(a.time-o.time)<1e-9?a.volume=o.volume:i.push(o)}return i.length===0||i[0].time>0&&i.unshift({time:0,volume:Ke(n)}),i}function wf(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let r=e[n],i=e[n+1]??r,o=i.time-r.time,a=o<=0?0:Math.min(1,Math.max(0,(t-r.time)/o));return r.volume+(i.volume-r.volume)*a}function jy(e,t,n,r){let i=e.at(-1);!i||Math.abs(i.volume-n.volume)>1e-4?(i&&t&&t.time>i.time&&e.push(t),e.push(n)):r&&n.time>i.time&&e.push(n)}function Ky(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:void 0}function Xy(e,t){let n=Ye({timelineRegistry:window.__timelines,includeAuthoredTimingAttrs:!0}).resolveMediaStartForElement(e),r=Me(e.dataset.end)??void 0,i=Me(e.dataset.duration)??void 0,o=t;i!==void 0&&i>0?o=n+i:r!==void 0&&r>n&&(o=r);let a=Ky(e.dataset.volume)??1;return{start:n,end:o,staticVolume:Ke(a)}}function Yy(e,t,n,r,{start:i,end:o,staticVolume:a}){let l=1/Math.min(60,Math.max(1,r)),s=Math.max(0,i),c=Math.min(n,o),d=fd(e,()=>{e.volume=a;let f=[],b;for(let h=s;h<=c+1e-6;h=Math.min(c,h+l)){t(h);let y=Number(e.volume);if(Number.isFinite(y)){let x={time:Number(h.toFixed(6)),volume:Number(Ke(y).toFixed(6))};jy(f,b,x,h===c),b=x}if(h===c)break}return f});return d.some(f=>Math.abs(f.volume-a)>1e-4)?d:null}function po(e,t,n=0){return n>3||e===null||typeof e!="object"?!1:Array.isArray(e)?e.some(r=>po(r,t,n+1)):Object.getPrototypeOf(e)!==Object.prototype?!1:Object.entries(e).some(([r,i])=>t(r)||po(i,t,n+1))}var Jy=e=>typeof e?.nodeType=="number";function Qy(e,t){for(let n=Object(e);n;n=Object.getPrototypeOf(n)){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return typeof r.set=="function"}return!1}function Zy(e,t){if(typeof e.getChildren!="function")return!0;try{return e.getChildren(!0,!0,!1).some(n=>(n.targets?.()??[]).some(i=>Jy(i)?i===t&&po(n.vars,o=>o==="volume"):po(n.vars,o=>Qy(i,o))))}catch{return!0}}function Cf(e,t,n,r,i={}){if(i.allowLiveTimelineSeek===!1||!t||!he(e)||n<=0||!Zy(t,e))return;let o=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},a=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,l=Xy(e,n),s=Yy(e,o,n,60,l);if(Number.isFinite(a)&&o(a),s){let c=qy(s,l.start,l.staticVolume);c.length>0&&r.set(e,c)}}var kf="data-fade-in",Mf="data-fade-out",dM=kf.slice(5),fM=Mf.slice(5),Nf=Object.freeze({fadeIn:0,fadeOut:0});function hs(e){return Number.isFinite(e)&&e>0?e:0}function Tf(e){return e==null||e===""?0:hs(Number.parseFloat(e))}function Lf(e){return{fadeIn:Tf(e.getAttribute(kf)),fadeOut:Tf(e.getAttribute(Mf))}}function eS(e,t){let n=hs(e.fadeIn),r=hs(e.fadeOut);if(!Number.isFinite(t)||t<=0)return{fadeIn:n,fadeOut:r};let i=n+r;if(i<=t)return{fadeIn:n,fadeOut:r};let o=t/i;return{fadeIn:n*o,fadeOut:r*o}}function Ff(e,t,n){if(!Number.isFinite(e))return 1;let{fadeIn:r,fadeOut:i}=eS(n,t),o=1;return r>0&&(o*=Rf(e/r)),i>0&&Number.isFinite(t)&&(o*=Rf((t-e)/i)),o}function Rf(e){return!Number.isFinite(e)||e<0?0:e>1?1:e}var Pn="hf-audio-group",ho="data-audio-group";function gs(e){let t=e?.getAttribute("data-volume"),n=t?parseFloat(t):1;return Number.isFinite(n)?n:1}function bs(e,t){let n=Array.from(e?.querySelectorAll?.(`${Pn}[${Cr}]`)??[]).find(i=>i.getAttribute(Cr)===t);if(n)return n;let r=e?.getElementById(t)??null;return r&&r.tagName?.toLowerCase()===Pn?r:null}function go(e,t){let n=t?.getAttribute?.(gf)??t?.getAttribute?.(ho);return n?bs(e,n)?.hasAttribute("data-hidden")??!1:!1}function bo(e){return typeof e.tagName!="string"||e.tagName.toLowerCase()!=="audio"||typeof e.getAttribute!="function"?null:e.getAttribute(ho)||null}function Df(e){let t="__hf-audio-group-inert";if(!e?.head||e.getElementById(t))return;let n=e.createElement("style");n.id=t,n.textContent=`${Pn}{display:none!important}`,e.head.appendChild(n)}function ht(e){return Qi(e)}var If=["seeked","loadeddata","error","emptied","abort"],As=5e3,xo=new WeakMap;function Pf(e){let t=e.readyState<e.HAVE_CURRENT_DATA&&e.networkState===e.NETWORK_LOADING&&!window.__HF_EXPORT_RENDER_SEEK_CONFIG;e.tagName!=="VIDEO"||!(e.seeking||t)||Rt(e)||(xo.get(e)?.(),Tt(new Promise(n=>{let r=o=>{if(!(o?.type==="loadeddata"&&e.seeking)){clearTimeout(i);for(let a of If)e.removeEventListener(a,r,!0);xo.get(e)===r&&xo.delete(e),n()}},i=setTimeout(r,As);for(let o of If)e.addEventListener(o,r,!0);xo.set(e,r)})))}function Of(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(r=>r!=null&&Number.isFinite(r)&&r>=0);return n.length>0?Math.min(...n):null}function Hf(e){let t=e?.elements??Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),r=[],i=[],o=0;for(let a of n){let l=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(l))continue;let s=ht(a),c=We(a),d=Bt(a),m=a.loop,f=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,b=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(b)||b<0)&&f!=null&&(b=Math.max(0,mn(d,f-s)));let h=Number.isFinite(b)&&b>=0,y=h?l+b:Number.POSITIVE_INFINITY,x=Number.parseFloat(a.dataset.volume??""),E={el:a,start:l,mediaStart:s,duration:h?b:Number.POSITIVE_INFINITY,end:y,volume:Number.isFinite(x)?x:null,playbackRate:c,rate:d,loop:m,sourceDuration:f,fades:Lf(a)};r.push(E),a.tagName==="VIDEO"&&i.push(E),Number.isFinite(y)&&(o=Math.max(o,y))}return{timedMediaEls:n,mediaClips:r,videoClips:i,maxMediaEnd:o}}var Ss=new WeakMap,yo=new WeakMap,Rr=new WeakMap,vs=new WeakSet,On=new WeakSet,xs=new WeakSet;function tS(e){if(On.has(e))return;On.add(e);let t=()=>On.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var nS=3;function _s(e){return e.error!=null||e.networkState===nS}var Es=new WeakMap;function ys(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function ws(e){Ss.delete(e),yo.delete(e),Rr.delete(e),vs.delete(e),Es.delete(e),kr.delete(e)}var Cs=.5,Wt=.04,rS=.03,iS=.01,kr=new WeakMap;function oS(e,t,n){let r=Math.sign(t),i=kr.get(e);if(Math.abs(t)>Wt)kr.set(e,r);else if(i!==r||Math.abs(t)<=iS)return kr.delete(e),n;return n*(1+r*rS)}function Gf(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:r}=n;if(!r.isConnected)continue;let i=n.rate??n.playbackRate,o=r.tagName==="VIDEO"&&!n.loop,a=Ut(e.timeSeconds,n.start,n.end),l=n.start-e.timeSeconds,s=r.tagName==="AUDIO"&&!a&&l>0&&l*Math.max(1,ns(i,0))<=Math.max(e.cueAheadSeconds??0,xs.has(r)?Wt:0);s?xs.add(r):xs.delete(r);let c=o&&!a&&(e.timeSeconds>=n.end||_r(e.timeSeconds,n.end))&&oo(e.timeSeconds,n.start,n.end,e.getCompositionDuration()),d=Yi(i,Math.max(0,Math.min(e.timeSeconds,n.end)-n.start))+n.mediaStart,m=c||o&&n.sourceDuration!=null&&d>=n.sourceDuration&&a;m&&n.sourceDuration!=null&&(d=Math.min(d,n.sourceDuration));let f=yo.get(r),b=r.tagName==="AUDIO"&&(f===void 0||d<f-.04),h=!n.loop&&n.sourceDuration!=null&&d>=n.mediaStart&&d<n.sourceDuration&&(o||b);if((a||c||s)&&d>=0&&(!r.ended||n.loop||m||h)){if(yo.set(r,d),n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let ee=n.sourceDuration-n.mediaStart;ee>0&&d>=n.sourceDuration&&(d=n.mediaStart+(d-n.mediaStart)%ee)}let E=ys(e.userVolume??1),w=Ke(n.volume??1),C=Es.get(r),I=ys(r.volume),D,F=yd(r,e.timeSeconds-n.start);if(F!==null)D=Ke(F);else if(n.volumeKeyframes&&n.volumeKeyframes.length>0){let ee=e.timeSeconds-n.start;D=Ke(wf(n.volumeKeyframes,ee))}else e.isWebAudioRouted?.(r)?D=w:C===void 0?D=w>1?w:I:Math.abs(I-C)>1e-4?D=I:D=w;let O=n.fades??Nf;(O.fadeIn>0||O.fadeOut>0)&&(D*=Ff(e.timeSeconds-n.start,n.duration,O));let M=r.closest("[data-hidden]")!==null||go(r.ownerDocument,r)?0:ys(D*E);r.volume=M,Es.set(r,M),e.onElementVolume?.(r,M,D),(t||e.isWebAudioOwned?.(r))&&(r.muted=!0),r.preload!=="auto"&&(r.preload="auto");let R=ns(i,e.timeSeconds-n.start)*e.playbackRate,U=2,j=r.currentTime||0,Y=Math.abs(j-d),N=d-j,_=Ss.get(r);Ss.set(r,N);let H=_===void 0,J=!H&&Math.abs(N-_)>.5,B=Y>3,q=r.tagName==="AUDIO"&&H&&j-d>Wt,$=m&&Y>.001||r.ended&&h&&Y>.001||q||Y>Cs&&(H||J||B),X=r.tagName==="VIDEO"&&!r.paused&&e.playing,K=_!==void 0&&Math.abs(N-_)<.004,G=!1;if(!X&&!$&&!H&&K&&Y>Wt){let ee=(Rr.get(r)??0)+1;Rr.set(r,ee),ee>=U&&(G=!0,Rr.set(r,0))}else Y<=Wt&&Rr.set(r,0);let V=!X&&e.forceSync&&Y>.02;try{(!X||$)&&kr.delete(r);let ee=X&&!$?oS(r,N,R):R;Math.abs(r.playbackRate-ee)>1e-6&&(r.playbackRate=ee)}catch(ee){P("runtime.media.site1",ee)}if($||G||V){if(!(r.tagName==="VIDEO"&&!!Rt(r))){try{r.currentTime=d}catch(ce){P("runtime.media.site2",ce)}if(Math.abs(r.currentTime-d)>.5&&!vs.has(r)){vs.add(r),r.load();try{r.currentTime=d}catch(ce){P("runtime.media.site3",ce)}}Pf(r)}On.delete(r)}else e.playing||Pf(r);m?r.paused||r.pause():e.playing&&r.paused&&!On.has(r)&&!_s(r)?(tS(r),r.play().catch(ee=>{On.delete(r),(ee&&typeof ee=="object"&&"name"in ee?String(ee.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!r.paused&&r.pause();continue}let x=Ut(e.timeSeconds,n.start,n.end);ws(r),x&&yo.set(r,d),r.paused||r.pause()}}var Vt=new WeakMap;function Mr(e){return Vt.has(e)?Vt.get(e)??null:e.getAttribute("src")}async function Bf(e,t){let n=0;for(;t();){let r=await fetch(e,{headers:{Range:"bytes=0-0"},cache:"no-store"}).catch(()=>null);r?.body?.cancel().catch(()=>{});let i=r?.status===202||r?.status===503;if(!i&&r?.ok)return!0;if(!i&&++n>3)return!1;let o=Math.min(Number(r?.headers.get("Retry-After"))||2,30);await new Promise(a=>setTimeout(a,o*1e3))}return!1}var aS="hf-proxy",Uf="runtime_media_proxy_fallback",Wf="runtime_media_proxy_unavailable",Vf=new WeakSet,Nr=new WeakMap;function So(e){return e.currentSrc||e.src}function Ts(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:Se(e)&&!!Rt(e)}function Rs(e){let t=So(e);if(!t)return null;let n;try{n=new URL(t,document.baseURI)}catch{return null}if(n.origin!==window.location.origin)return null;try{return decodeURIComponent(n.pathname)}catch{return n.pathname}}function sS(e,t){let n=null;for(let r of Object.keys(t))e.endsWith(r)&&(n===null||r.length>n.length)&&(n=r);return n?t[n]??null:null}function lS(e,t){let n=e.normalize("NFC").toLowerCase(),r=-1,i=null,o=!1;for(let[a,l]of Object.entries(t)){let s=a.normalize("NFC").toLowerCase();n.endsWith(s)&&(s.length>r?(r=s.length,i=l,o=!1):s.length===r&&(o=!0))}return o?null:i}function ks(e,t){return t[e]??sS(e,t)??lS(e,t)}function uS(e,t){let n=new URL(e,document.baseURI);return n.searchParams.set(aS,t?t.hasAlpha?"vp8":"h264":"auto"),n.href}var cS={cross_origin:"video reports zero decodable width but its source is cross-origin; no local proxy can be served for it",proxy_playback_failed:"the authoring proxy itself failed to decode; render output is unaffected",browser_safe_codec:"the file errored but its codec is browser-decodable; a proxy cannot help (the file itself is likely corrupt)",invalid_source_url:"the media source URL is malformed and cannot be proxied"};function $t(e,t,n){if(Vf.has(e))return;Vf.add(e);let r=cS[t];we({source:"hf-preview",type:"diagnostic",code:Wf,details:{asset:n,codecName:null,reason:t,note:r}}),console.info(`[hyperframes] ${Wf}: "${n}" (${t}): ${r}`)}function Ms(e,t=null,n="reactive"){if(Vt.has(e)||Nr.has(e)&&Nr.get(e)===e.getAttribute("src"))return;let r=So(e),i;try{i=uS(r,t)}catch(d){P("runtime.mediaProxy.swap",d),$t(e,"invalid_source_url",r);return}let o=e.getAttribute("src");Nr.set(e,o);let a=()=>e.isConnected&&e.getAttribute("src")===o,l=Bf(i,a).then(d=>{if(!a()){Nr.get(e)===o&&Nr.delete(e);return}if(!d){$t(e,"proxy_playback_failed",r);return}return Vt.set(e,o),ws(e),e.src=i,e.load(),new Promise(m=>{e.addEventListener("loadeddata",m,{once:!0}),e.addEventListener("error",m,{once:!0})})});Tt(Promise.race([l,new Promise(d=>setTimeout(d,As))]));let s=t?.codecName??null;we({source:"hf-preview",type:"diagnostic",code:Uf,details:{asset:r,codecName:s,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${Uf}: "${r}" uses a codec (${s??"unknown"}) this browser can't decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function $f(e){if(Ts(e)||!Se(e)||Vt.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=Rs(e);if(n===null)return;let r=ks(n,t);if(!r||!r.browserHostile)return;let i=r.representativeMime?e.canPlayType(r.representativeMime):"";i==="probably"||i==="maybe"||Ms(e,r,"proactive")}function zf(e){if(Ts(e)||!Se(e)||e.videoWidth!==0)return;let t=So(e);if(Vt.has(e)){$t(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=Rs(e);if(r===null){$t(e,"cross_origin",t);return}let i=ks(r,n);if(i&&!i.browserHostile){$t(e,"browser_safe_codec",t);return}Ms(e,i,"reactive")}function qf(e){if(Ts(e)||!Se(e))return;let t=So(e);if(Vt.has(e)){$t(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=Rs(e);if(r===null){$t(e,"cross_origin",t);return}let i=ks(r,n);if(i&&!i.browserHostile){$t(e,"browser_safe_codec",t);return}Ms(e,i,"tertiary")}var De=class extends Error{constructor(n,r=null){super(r==null?n:`${n} at line ${r}`);ue(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=r}},dS=[0,0,0],fS=[1,1,1],vo=64;function mS(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"'&&(t=!t),r==="#"&&!t)return e.slice(0,n)}return e}function zt(e,t){let n=Number(e);if(!Number.isFinite(n))throw new De(`Invalid number "${e}"`,t);return n}function jf(e,t,n){if(e.length!==3)throw new De(`${t} expects three numbers`,n);return[zt(e[0],n),zt(e[1],n),zt(e[2],n)]}function Kf(e,t,n){if(!e)throw new De(`${t} expects a size`,n);let r=Number(e);if(!Number.isInteger(r)||r<2)throw new De(`${t} must be an integer greater than 1`,n);return r}function pS(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new De("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function hS(e){let t=/^TITLE\s+"([^"]*)"\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\s+(.+)\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function gS(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function Xf(e,t={}){let n=t.maxSize??vo,r=null,i=dS,o=fS,a=null,l=null,s=[],c=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<c.length;m++){let f=m+1,b=mS(c[m]??"").trim();if(!b)continue;let h=b.split(/\s+/),y=(h[0]??"").toUpperCase(),x=h.slice(1);if(y==="TITLE"){r=hS(b);continue}if(y==="DOMAIN_MIN"){i=jf(x,y,f);continue}if(y==="DOMAIN_MAX"){o=jf(x,y,f);continue}if(y==="LUT_3D_INPUT_RANGE"){if(x.length!==2)throw new De(`${y} expects two numbers`,f);let E=zt(x[0],f),w=zt(x[1],f);if(w<=E)throw new De("LUT_3D_INPUT_RANGE max must exceed min",f);i=[E,E,E],o=[w,w,w];continue}if(y==="LUT_1D_SIZE"){a=Kf(x[0],y,f);continue}if(y==="LUT_3D_SIZE"){if(l=Kf(x[0],y,f),l>n)throw new De(`LUT_3D_SIZE ${l} exceeds max ${n}`,f);continue}if(!gS(y)){if(y.startsWith("LUT_"))throw new De(`Unsupported cube keyword ${y}`,f);continue}if(!l)throw a?new De("1D cube LUTs are not supported yet",f):new De("LUT data appears before LUT_3D_SIZE",f);if(h.length!==3)throw new De("LUT data rows must contain three numbers",f);s.push(zt(h[0],f),zt(h[1],f),zt(h[2],f))}if(a&&l)throw new De("Mixed 1D and 3D cube LUTs are not supported yet");if(!l)throw a?new De("1D cube LUTs are not supported yet"):new De("Missing LUT_3D_SIZE");pS(i,o);let d=l*l*l;if(s.length!==d*3)throw new De(`Expected ${d} LUT rows for size ${l}, found ${s.length/3}`);return{title:r,size:l,domainMin:i,domainMax:o,data:new Float32Array(s)}}function bS(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function Lr(e){return Math.round(bS(e)*255)}function Ns(e){let t=e.size,n=t*t,r=t,i=new Uint8Array(n*r*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let l=0;l<t;l++){let s=((o*t+a)*t+l)*3,c=(a*n+o*t+l)*4;i[c]=Lr(e.data[s]??0),i[c+1]=Lr(e.data[s+1]??0),i[c+2]=Lr(e.data[s+2]??0),i[c+3]=255}return{width:n,height:r,data:i}}var Yf="rec709";var Ae={hueDegrees:{min:0,max:360,inclusiveMax:!1},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}};var Jf=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"],Qf=["shadows","midtones","highlights"],Zf=["master","red","green","blue"],em=["hueVsHue","hueVsSaturation","hueVsLuma"];var tm=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],nm=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"];var zM=Ae.unit,qM=Ae.signedUnit,jM=Ae.effects;var gt=1024,Fr=16;function rm(e,t,n,r){let i=((2*e+t)*n-e*r)/(e+t);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Ie(e,t){let n=e[t];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function xS(e){let t=[],n=[],r=Ie(e,0);for(let a of e.slice(1)){let l=a[0]-r[0];t.push(l),n.push((a[1]-r[1])/l),r=a}let i=Ie(n,0);if(e.length===2)return[i,i];let o=new Array(e.length);o[0]=rm(Ie(t,0),Ie(t,1),i,Ie(n,1)),o[o.length-1]=rm(Ie(t,t.length-1),Ie(t,t.length-2),Ie(n,n.length-1),Ie(n,n.length-2));for(let a=1;a<e.length-1;a+=1){let l=Ie(n,a-1),s=Ie(n,a);if(l===0||s===0||Math.sign(l)!==Math.sign(s)){o[a]=0;continue}let c=Ie(t,a-1),d=Ie(t,a),m=2*d+c,f=d+2*c;o[a]=(m+f)/(m/l+f/s)}return o}function im(e,t){if(e.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(t)||t<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(let[r,i]of e){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function yS(e,t,n){if(!Number.isFinite(t)||!Number.isFinite(n)||t>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(e.some(([,r])=>r<t||r>n))throw new RangeError(`Curve outputs must be between ${t} and ${n}`)}function SS(e,t,n,r,i){let o=n[0]-t[0],a=Math.min(1,Math.max(0,(e-t[0])/o)),l=a*a,s=l*a;return(2*s-3*l+1)*t[1]+(s-2*l+a)*o*r+(-2*s+3*l)*n[1]+(s-l)*o*i}function om(e,t,n,r,i){yS(e,r,i);let o=xS(e),a=new Float32Array(t),l=0;for(let s=0;s<t;s+=1){let c=n(s);for(;l<e.length-2&&c>Ie(e,l+1)[0];)l+=1;let d=Ie(e,l),m=Ie(e,l+1),f=SS(c,d,m,Ie(o,l),Ie(o,l+1));a[s]=Math.min(i,Math.max(r,f))}return a}function Hn(e,t=gt){if(im(e,t),e.length>Fr)throw new RangeError(`A color curve supports at most ${Fr} points`);if(e.some(([n])=>n<0||n>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(e[0]?.[0]!==0||e[e.length-1]?.[0]!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return om(e,t,n=>n/(t-1),0,1)}function Fs(e,t,n,r=gt){if(e.length<3)throw new RangeError("A hue curve requires at least three points");if(e.length>Fr)throw new RangeError(`A hue curve supports at most ${Fr} points`);let i=[...e].sort((s,c)=>s[0]-c[0]);for(let s=0;s<i.length;s+=1){let c=i[s];if(!c||c[0]<0||c[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(s>0&&c[0]===i[s-1]?.[0])throw new RangeError("Hue curve inputs must be unique")}let o=i.slice(-2).map(([s,c])=>[s-360,c]),a=i.slice(0,2).map(([s,c])=>[s+360,c]),l=[...o,...i,...a];return im(l,r),om(l,r,s=>s/r*360,t,n)}var Dr="data-color-grading",pn="data-hf-color-grading-source-hidden",hn="data-hf-authored-opacity",cm="__hf_color_grading_",ES=Yf,Ps={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},Os={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},Hs={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5};var _o=Jf,dm=Qf,fm=Zf,mm=em,Bs=tm,Us=nm,am={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},sm={vignette:.18};function Pe(e,t,n={},r={},i={},o=1){return{id:e,label:t,intensity:o,adjust:{...Ps,...n},details:{...Os,...r},effects:{...Hs,...i}}}var Ws=[Pe("neutral","Neutral"),Pe("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),Pe("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),Pe("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),Pe("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),Pe("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),Pe("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),Pe("vintage-wash","Vintage Wash",am,sm),Pe("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),Pe("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),Pe("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),Pe("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),Pe("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),Pe("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),Pe("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),Pe("home-movie-8mm","8mm Home Movie",am,{...sm,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),Pe("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),Pe("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],AS=new Map(Ws.map(e=>[e.id,e])),_S=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,wS={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},Gn={hue:0,amount:0,level:0},lm={amount:Ae.unit,level:Ae.signedUnit},qt=[[0,0],[1,1]],Bn=[],CS={hueVsHue:Ae.secondaryHueShift,hueVsSaturation:Ae.signedUnit,hueVsLuma:Ae.signedUnit},Ds={center:0,range:180,softness:0},Is={min:0,max:1,softness:.05},TS={vignette:Ae.unit,vignetteMidpoint:Ae.unit,vignetteRoundness:Ae.signedUnit,vignetteFeather:Ae.unit,grain:Ae.unit,grainSize:Ae.unit,grainRoughness:Ae.unit},Gs=Ae.unit,RS=Ae.effects,pm=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"];var kS=Ws.filter(e=>pm.some(t=>e.effects[t]>1e-4)),tN=Ws.filter(e=>!kS.includes(e)),nN={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},hm=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];var MS=/^#[0-9a-f]{6}$/i;function NS(e){return!Array.isArray(e)||e.length<2||e.length>6||!e.every(t=>typeof t=="string"&&MS.test(t))?null:e.map(t=>t.toLowerCase())}function He(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ao(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function gm(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Ue(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Ao(n,t.min,t.max):0}function Vs(e,t=0){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?(n%360+360)%360:t}function LS(e){let t=He(e)?e:{};return dm.reduce((n,r)=>{let i=He(t[r])?t[r]:{};return n[r]={hue:Vs(i.hue,Gn.hue),amount:Ue(i.amount??Gn.amount,lm.amount),level:Ue(i.level??Gn.level,lm.level)},n},{shadows:{...Gn},midtones:{...Gn},highlights:{...Gn}})}function FS(e){if(!Array.isArray(e)||e.length!==2)return null;let t=Number(e[0]),n=Number(e[1]);return Number.isFinite(t)&&Number.isFinite(n)?[Ao(t,0,1),Ao(n,0,1)]:null}function bm(e){return e.some((t,n)=>n>0&&t[0]===e[n-1]?.[0])}function DS(e){(e[0]?.[0]??0)>0&&e.unshift([0,0]),(e.at(-1)?.[0]??1)<1&&e.push([1,1])}function IS(e){if(!Array.isArray(e)||e.length<2)return qt;let t=[];for(let n of e){let r=FS(n);if(!r)return qt;t.push(r)}return t.sort((n,r)=>n[0]-r[0]),bm(t)||(DS(t),t.length>16)?qt:t}function PS(e){let t=He(e)?e:{};return fm.reduce((n,r)=>(n[r]=IS(t[r]),n),{master:qt,red:qt,green:qt,blue:qt})}function OS(e,t){if(!Array.isArray(e)||e.length!==2)return null;let n=Number(e[0]),r=Number(e[1]);return Number.isFinite(n)&&Number.isFinite(r)?[Vs(n),Ao(r,t.min,t.max)]:null}function HS(e,t){if(!Array.isArray(e)||e.length<3||e.length>16)return Bn;let n=[];for(let r of e){let i=OS(r,t);if(!i)return Bn;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),bm(n)?Bn:n}function GS(e){let t=He(e)?e:{};return mm.reduce((n,r)=>(n[r]=HS(t[r],CS[r]),n),{hueVsHue:Bn,hueVsSaturation:Bn,hueVsLuma:Bn})}function um(e){let t=He(e)?e:{},n=Ue(t.min??Is.min,Gs),r=Ue(t.max??Is.max,Gs);return{min:Math.min(n,r),max:Math.max(n,r),softness:Ue(t.softness??Is.softness,Ae.secondarySoftRangeSoftness)}}function BS(e){let t=He(e)?e:{},n=Ue(t.range??Ds.range,Ae.secondaryHueRange);return{center:Vs(t.center,Ds.center),range:n,softness:Ue(t.softness??Ds.softness,{min:Ae.secondaryHueSoftness.min,max:Ae.secondaryHueCombinedMax-n})}}function US(e){return{hueShift:Ue(e.hueShift??0,Ae.secondaryHueShift),saturation:Ue(e.saturation??0,Ae.signedUnit),luma:Ue(e.luma??0,Ae.signedUnit),temperature:Ue(e.temperature??0,Ae.signedUnit),tint:Ue(e.tint??0,Ae.signedUnit)}}function WS(e){return!He(e)||!He(e.key)||!He(e.correction)?null:{enabled:e.enabled!==!1,key:{hue:BS(e.key.hue),saturation:um(e.key.saturation),luma:um(e.key.luma)},correction:US(e.correction)}}function VS(e){if(!Array.isArray(e))return[];let t=[];for(let n of e.slice(0,4)){let r=WS(n);r&&t.push(r)}return t}function $S(e){if(e==null)return null;let t=String(e).trim();return t||null}function zS(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!He(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:gm(e.intensity,1)}}function qS(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return He(n)?n:null}catch{return null}return{preset:t}}return He(e)?e:null}function jS(e,t){let n=e.trim().match(_S);if(!n)return e;let r=n[1]??n[2]??"";return r&&Object.hasOwn(t,r)?t[r]:e}function Eo(e,t){if(typeof e=="string"){let r=jS(e,t);if(r!==e)return r;let i=e.trim();if(!i.startsWith("{"))return e;try{return Eo(JSON.parse(i),t)}catch{return e}}if(Array.isArray(e))return e.map(r=>Eo(r,t));if(!He(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=Eo(i,t);return n}function KS(e){return e?AS.get(e)??null:null}function wo(e){let t=qS(e);if(!t||t.enabled===!1)return null;let n=$S(t.preset),r=KS(n),i=r?.adjust??Ps,o=r?.details??Os,a=r?.effects??Hs,l=He(t.adjust)?t.adjust:{},s=He(t.details)?t.details:{},c=He(t.effects)?t.effects:{},d=_o.reduce((b,h)=>(b[h]=Ue(l[h]??i[h],wS[h]),b),{...Ps}),m=Bs.reduce((b,h)=>(b[h]=Ue(s[h]??o[h],TS[h]),b),{...Os}),f=Us.reduce((b,h)=>(b[h]=Ue(c[h]??a[h],RS[h]??Gs),b),{...Hs});return{enabled:!0,preset:n,intensity:gm(t.intensity,r?.intensity??1),adjust:d,wheels:LS(t.wheels),curves:PS(t.curves),hueCurves:GS(t.hueCurves),secondaries:VS(t.secondaries),details:m,effects:f,palette:NS(t.palette),lut:zS(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():ES}}function xm(e,t){return wo(Eo(e,t))}function XS(e){return dm.some(t=>Math.abs(e[t].amount)>1e-4||Math.abs(e[t].level)>1e-4)}function $s(e){return fm.some(t=>e[t].some(([n,r])=>Math.abs(n-r)>1e-4))}function zs(e){return mm.some(t=>e[t].some(([,n])=>Math.abs(n)>1e-4))}function qs(e){return e.some(t=>t.enabled&&Object.values(t.correction).some(n=>Math.abs(n)>1e-4))}function ym(e){return e?.enabled?Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||pm.some(n=>Math.abs(e.effects[n])>1e-4)?!0:e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:_o.some(n=>Math.abs(e.adjust[n])>1e-4)||(e.wheels?XS(e.wheels):!1)||(e.curves?$s(e.curves):!1)||(e.hueCurves?zs(e.hueCurves):!1)||(e.secondaries?qs(e.secondaries):!1):!1}var Co=/^(|transparent|rgba\(.*,\s*0\)|.*\/\s*0%?\s*\))$/,YS=new Set(["IMG","VIDEO","IFRAME","EMBED","OBJECT","CANVAS"]),Sm="http://www.w3.org/2000/svg",JS=new Set(["svg","g","foreignObject"]),QS=["Top","Right","Bottom","Left"],ZS={left:-1/0,right:1/0,top:-1/0,bottom:1/0},vm=e=>!!e.backgroundImage&&e.backgroundImage!=="none"||!Co.test(e.backgroundColor),ev=e=>{let t=e.getPropertyValue("-webkit-text-fill-color")||e.color,n=Number.parseFloat(e.getPropertyValue("-webkit-text-stroke-width"))||0,r=e.getPropertyValue("-webkit-text-stroke-color")||e.color;return!Co.test(t)||n>0&&!Co.test(r)},Em=e=>QS.map(t=>e[`border${t}Style`]!=="none"&&!Co.test(e[`border${t}Color`])&&Number.parseFloat(e[`border${t}Width`])||0),To=e=>e.bottom-e.top,js=(e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom,Am=(e,t)=>({left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}),tv=(e,t)=>t.display==="none"||t.position==="absolute"||t.position==="fixed"||Number.parseFloat(t.opacity)<=.01&&!e.hasAttribute(pn);function nv(e,t,n){if(e.width<=0&&e.height<=0)return!1;let r=3*(Number.parseFloat(t.fontSize)||16),i=Math.max(r,Math.min(2*e.height,20*r/3));return n<e.top-i||n>e.bottom+i}function rv(e,t,n,r){let[i,o,a,l]=Em(t);if(!(i||o||a||l))return!1;let s=e.getBoundingClientRect(),{offsetWidth:c,offsetHeight:d}=e,m=c>0?s.width/c:1,f=d>0?s.height/d:1,b={left:s.left+l*m,right:s.right-o*m,top:s.top+i*f,bottom:s.bottom-a*f};return!js(b,n,r)}function iv(e){let t=[];for(let n of[...e].sort((r,i)=>r.left-i.left)){let r=t.findIndex(i=>n.top<i.bottom&&n.bottom>i.top&&n.left-i.right<=2*Math.max(To(i),To(n)));r<0?t.push(n):t[r]=Am(t[r],n)}return t}function ov(e){let t=[...e].sort((n,r)=>n.top-r.top);return t.flatMap((n,r)=>t.slice(r+1).flatMap(i=>{let o=i.left<n.right&&i.right>n.left,a=i.top-n.bottom<=2*Math.min(To(n),To(i));return o&&a&&i.top>n.bottom?[Am(n,i)]:[]}))}function _m(e,t,n){let r=e.defaultView,i=typeof e.createRange().getClientRects=="function",o=e.createRange(),a=new Map,l=new Map,s=new Map,c=x=>{let E=l.get(x);if(E===void 0){let w=r.getComputedStyle(x);E=tv(x,w)||i&&nv(x.getBoundingClientRect(),w,n),l.set(x,E)}return E},d=x=>{let E=s.get(x);if(E===void 0){let w=x.parentElement,C=w&&x.nodeValue?.trim()?r.getComputedStyle(w):null;E=!!C&&C.visibility!=="hidden"&&ev(C),s.set(x,E)}return E},m=x=>{if(!i)return[ZS];let E=[];o.selectNodeContents(x);for(let w of o.getClientRects()){let C=w.bottom-w.top;w.width>0&&C>0&&n>=w.top-2*C&&n<=w.bottom+2*C&&E.push(w)}return E},f=x=>{let E=a.get(x);if(E)return E;E=[];for(let w of x.childNodes)w.nodeType===3?d(w)&&E.push(...m(w)):w.nodeType===1&&w.hasChildNodes()&&!c(w)&&E.push(...f(w));return a.set(x,E),E};function b(x){let E=iv(f(x));return E.some(w=>js(w,t,n))||ov(E).some(w=>js(w,t,n))}function h(x,E){let w=r.getComputedStyle(x,E);return!w.content||w.content==="none"||w.content==="normal"||w.display==="none"?!1:w.content!=='""'||vm(w)||Em(w).some(C=>C>0)}let y=(x,E)=>/inset/.test(E.boxShadow)||rv(x,E,t,n)||h(x,"::before")||h(x,"::after");return x=>{if(YS.has(x.tagName)||!(x.namespaceURI!==Sm||JS.has(x.localName))||!r)return!0;let w=r.getComputedStyle(x);return vm(w)||y(x,w)||x.namespaceURI!==Sm&&b(x)}}var av=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),sv=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(","),wm="[data-hf-inner-root],[data-composition-id]:not([data-composition-id] *)",Cm=`${wm}{pointer-events:auto!important}`,lv=`@layer hf-picker{${Cm}}`;function Tm(e){let t=!1,n=null,r=null,i=null,o=null,a,l=new Set;function s(N,_){try{window.dispatchEvent(new CustomEvent(N,{detail:_}))}catch(H){P("runtime.picker.site1",H)}}function c(N){i=N,s("hyperframe:picker:hovered",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function d(N){o=N,s("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function m(N){if(l=new Set(Array.from(document.querySelectorAll(wm)).filter(J=>getComputedStyle(J).pointerEvents==="none")),l.size===0)return N();let _=f(),H=_?b(_):h();try{return N()}finally{H(),l=new Set}}function f(){if(a!==void 0)return a;if(a=null,!Array.isArray(document.adoptedStyleSheets)||typeof CSSStyleSheet>"u")return null;try{let N=new CSSStyleSheet;N.replaceSync(lv),a=N}catch(N){P("runtime.picker.site2",N)}return a}function b(N){return document.adoptedStyleSheets=[...document.adoptedStyleSheets,N],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(_=>_!==N)}}function h(){let N=document.createElement("style");return N.textContent=Cm,(document.head??document.documentElement).appendChild(N),()=>N.remove()}function y(N){let _=N.ownerDocument.defaultView;if(!_)return!1;let H=N;if(_.getComputedStyle(N).visibility==="hidden")return!0;for(;H&&H!==document.body&&H!==document.documentElement;){let J=_.getComputedStyle(H);if(J.display==="none"||J.pointerEvents==="none")return!0;let B=Number.parseFloat(J.opacity);if(Number.isFinite(B)&&B<=.01&&!H.hasAttribute(pn))return!0;H=H.parentElement}return!1}function x(N){if(!N||N===document.body||N===document.documentElement)return!1;let _=N.tagName.toLowerCase();return!(_==="script"||_==="style"||_==="link"||_==="meta"||l.has(N)||N.closest(av)||y(N))}function E(N){return!!N?.closest(sv)}function w(N){let _=N.parentElement?.getAttribute("data-composition-id");return!N.hasAttribute("data-hf-inner-root")||!_?null:`[data-composition-id="${CSS.escape(_)}"] > [data-hf-inner-root]`}function C(N){let _=w(N);if(_)return _;let H=N;if(H.id)return`#${CSS.escape(H.id)}`;let J=N.getAttribute("data-composition-id");if(J)return`[data-composition-id="${CSS.escape(J)}"]`;let B=N.getAttribute("data-composition-src");if(B)return`[data-composition-src="${CSS.escape(B)}"]`;let q=N.getAttribute("data-track-index");if(q)return`[data-track-index="${CSS.escape(q)}"]`;let $=N.tagName.toLowerCase(),X=N.parentElement;if(!X)return $;let K=X.querySelectorAll(`:scope > ${$}`);if(K.length===1)return $;for(let G=0;G<K.length;G+=1)if(K[G]===N)return`${$}:nth-of-type(${G+1})`;return $}function I(N){let _=N.tagName.toLowerCase(),H=(N.textContent??"").trim().replace(/\s+/g," "),J=(q,$)=>{let X=Array.from(q);return X.length>$?`${X.slice(0,$-1).join("")}\u2026`:q},B=/^h[1-6]$/.test(_);return B||_==="p"||_==="span"||_==="div"?H.length>0?J(H,56):B?"Heading":"Text":_==="img"?"Image":_==="video"?"Video":_==="audio"?"Audio":_==="svg"?"Shape":N.getAttribute("data-composition-src")?"Composition":_==="section"?"Section":`${_.charAt(0).toUpperCase()}${_.slice(1)}`}function D(N,_,H){let J=typeof H=="number"&&H>0?H:8,B=[];if(document.elementsFromPoint)B=document.elementsFromPoint(N,_);else if(document.elementFromPoint){let G=document.elementFromPoint(N,_);B=G?[G]:[]}if(E(B[0]??null))return[];let q={},$=[],X=[],K=_m(document,N,_);for(let[G,V]of B.entries()){if(!x(V))continue;let ee=`${V.tagName}::${V.id||""}::${G}`;if(!q[ee]&&(q[ee]=!0,$.push(V),(X.some(ce=>V.contains(ce))||K(V))&&(X.push(V),X.length>=J)))break}return X.length>0?X:$.slice(0,J)}function F(N){let _=N.getBoundingClientRect(),H={};for(let B of Array.from(N.attributes))B.name.startsWith("data-")&&(H[B.name]=B.value);return{id:N.id||null,tagName:N.tagName.toLowerCase(),selector:C(N),label:I(N),boundingBox:{x:_.left,y:_.top,width:_.width,height:_.height},textContent:N.textContent?N.textContent.trim().slice(0,200):null,src:N.getAttribute("src")||N.getAttribute("data-composition-src")||null,dataAttributes:H}}function O(N,_,H){return m(()=>D(N,_,H)).map(F)}function T(N){if(!t)return;let _=m(()=>{let J=D(N.clientX,N.clientY,1)[0]??(Le(N.target)?N.target:null);return x(J)?J:null});if(!_||n===_)return;n&&n.classList.remove("__hf-pick-highlight"),n=_,_.classList.add("__hf-pick-highlight");let H=F(_);c(H),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:H})}function M(N){if(!t)return;N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation();let _=O(N.clientX,N.clientY,8);_.length!==0&&(c(_[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:_,selectedIndex:0,point:{x:N.clientX,y:N.clientY}}))}function R(N){N.key==="Escape"&&(j(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function U(){t||(t=!0,r=document.createElement("style"),r.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
40
40
  `),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",T,!0),document.addEventListener("click",M,!0),document.addEventListener("keydown",R,!0),s("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function j(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),r&&(r.remove(),r=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",T,!0),document.removeEventListener("click",M,!0),document.removeEventListener("keydown",R,!0),s("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function Y(){window.__HF_PICKER_API={enable:U,disable:j,isActive:()=>t,getHovered:()=>i,getSelected:()=>o,getCandidatesAtPoint:(N,_,H)=>Number.isFinite(N)&&Number.isFinite(_)?O(N,_,H):[],pickAtPoint:(N,_,H)=>{if(!Number.isFinite(N)||!Number.isFinite(_))return null;let J=O(N,_,8);if(!J.length)return null;let B=Math.max(0,Math.min(J.length-1,Number(H??0))),q=J[B]??null;return q?(d(q),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:q}),j(),q):null},describe:N=>Le(N)?F(N):null,pickManyAtPoint:(N,_,H)=>{if(!Number.isFinite(N)||!Number.isFinite(_))return[];let J=O(N,_,8);if(!J.length)return[];let B=[],q=Array.isArray(H)?H:[0];for(let $ of q){let X=Math.max(0,Math.min(J.length-1,Math.floor(Number($)))),K=J[X];if(!K)continue;B.some(V=>V.selector===K.selector&&V.tagName===K.tagName)||B.push(K)}return B.length?(d(B[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:B}),j(),B):[]}},s("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:U,disablePickMode:j,installPickerApi:Y}}var uv=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function Ks(e){return Number.isFinite(e)&&e>0?e:30}function Xs(e){return Number.isFinite(e)&&e>0?e:0}function Ys(e,t){let n=Ks(t);return Math.floor(Xs(e)*n+1e-9)/n}function Ir(e,t,n){let r=Number.isInteger(n)?n:1;if(r<=1)return Ys(e,t);let i=Ks(t)*r;return Math.round(Xs(e)*i)/i}function Rm(e,t){let n=Ks(t),r=Xs(e),i=r*n,o=Math.round(i);return Math.abs(i-o)<=.001?o/n:r}function km(e,t,n){return{start:Rm(e,n),end:Number.isFinite(t)?Rm(t,n):t}}function Mm(e,t,n=uv){for(let r of n){let i=t.getPropertyValue(r);i&&e.setProperty(r,i)}}function Pr(e,t,n){let r=e?.[t];return typeof r=="function"?Number(r.call(e))||n:typeof r=="number"&&Number.isFinite(r)?r:(r!=null&&P("runtime.player.nonConformantNum",{prop:t,actual:typeof r}),n)}function rt(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&P("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function Or(e,t,n){if(e){for(let r of Object.values(e))if(!(!r||r===t))try{n(r)}catch(i){P("runtime.player.site1",i)}}}function Nm(e,t,n,r){let i=Ir(t,n,r?.subFrameDivisions),o=r?.suppressEvents===!0;return rt(e,"pause"),typeof e.totalTime=="function"?e.totalTime(i,o):typeof e.seek=="function"&&e.seek(i,o),i}function cv(e,t,n,r,i){let o=[];Or(e,t,a=>{rt(a,"play"),o.push(a)});try{return Nm(t,n,r,i)}finally{for(let a of o)try{rt(a,"pause")}catch(l){P("runtime.player.site2",l)}}}function dv(e,t){Or(e,t,n=>{rt(n,"play")})}function Lm(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,r)=>t.seek(n,r),renderSeek:(n,r)=>t.renderSeek(n,r),getTime:()=>t.getTime(),getDuration:()=>t.getDuration(),isPlaying:()=>t.isPlaying(),setPlaybackRate:n=>t.setPlaybackRate(n),getPlaybackRate:()=>t.getPlaybackRate()}:{_timeline:null,play:()=>{let n=e.getTimeline();if(!n||e.getIsPlaying())return;let r=Math.max(0,Number(e.getSafeDuration?.()??Pr(n,"duration",0))||0);r>0&&Math.max(0,Pr(n,"time",0))>=r&&(rt(n,"pause"),typeof n.seek=="function"&&n.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof n.timeScale=="function"&&n.timeScale(e.getPlaybackRate()),rt(n,"play"),Or(e.getTimelineRegistry?.(),n,i=>{typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),rt(i,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;rt(n,"pause"),Or(e.getTimelineRegistry?.(),n,i=>{rt(i,"pause")});let r=Math.max(0,Pr(n,"time",0));e.onDeterministicSeek(r),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},seek:(n,r)=>{let i=e.getTimeline();if(!i)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),l=cv(e.getTimelineRegistry?.(),i,o,e.getCanonicalFps());e.onDeterministicSeek(l),r?.keepPlaying&&a?(typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),rt(i,"play"),Or(e.getTimelineRegistry?.(),i,s=>{typeof s.timeScale=="function"&&s.timeScale(e.getPlaybackRate()),rt(s,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(l,!0)):(e.setIsPlaying(!1),e.onSyncMedia(l,!1)),e.onRenderFrameSeek(l),e.onStatePost(!0)},renderSeek:(n,r)=>{let i=e.getTimeline(),o=e.getCanonicalFps(),a=i?(dv(e.getTimelineRegistry?.(),i),Nm(i,n,o,r)):Ir(Math.max(0,Number(n)||0),o,r?.subFrameDivisions);e.onDeterministicSeek(a,r),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>Pr(e.getTimeline(),"time",0),getDuration:()=>Pr(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function Fm(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}function gn(e){if(e==null||e.trim()==="")return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function Un(e){if(e==null||e.trim()==="")return null;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function kt(){let e=document.querySelector('[data-composition-id][data-root="true"]');return ye(e)?e:document.querySelector("[data-composition-id]")}var fv=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Js(e){return e.id||e.getAttribute("data-hf-id")||null}function mv(e){return Me(e)}function pv(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let r=Number(t[n]?.duration?.());return Number.isFinite(r)&&r>0?r:null}function hv(e){return he(e)?Number.isFinite(e.duration)?mt(e,e.duration):null:Mn(e)}function gv(e,t,n,r){let i=mv(e.getAttribute("data-duration"));return i!=null&&i>0?i:pv(e,t)??hv(e)??Math.max(0,n-r)}function bv(e){for(let[t,n]of e){let r=t.parentElement;for(;r;){let i=e.get(r);if(i){n.parentId=i.id,i.children.push(n);break}r=r.parentElement}}}function Dm(e){let{startResolver:t,timelineRegistry:n,rootDuration:r}=e,i=new Map,o=kt(),a=0;for(let l of document.querySelectorAll("[data-start]")){if(l===o||fv.has(l.tagName))continue;let s=t.resolveStartForElement(l,0);if(gv(l,n,r,s)<=0)continue;let c={id:Js(l)??`__clip-${a++}`,element:l,parentId:null,children:[]};i.set(l,c)}return bv(i),{roots:Array.from(i.values()).filter(l=>l.parentId===null)}}var Qs="css:root",Im=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],xv=new Set([...Im,"contain","isolation","mask-border","mix-blend-mode","opacity"]),yv=new Set(["absolute","relative"]),Sv=new Set(["flex","inline-flex","grid","inline-grid"]),vv=new Set(["layout","paint","strict","content"]),Ev=new Set(["size","inline-size"]);function Av(e){return e.position==="fixed"||e.position==="sticky"}function _v(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(yv.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&Sv.has(n)}function wv(e){let t=Number.parseFloat(e.opacity);if(Number.isFinite(t)&&t<1||e.getPropertyValue("isolation")==="isolate")return!0;let n=e.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:Im.some(r=>{let i=e.getPropertyValue(r);return i!==""&&i!=="none"})}function Cv(e){return e.getPropertyValue("contain").split(/\s+/).some(n=>vv.has(n))?!0:Ev.has(e.getPropertyValue("container-type"))}function Tv(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>xv.has(t))}function Rv(e,t){return Av(t)||_v(e,t)||wv(t)||Cv(t)?!0:Tv(t)}function kv(e){let t=[],n=e;for(;n?.parentElement;)t.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${t.reverse().join(".")}`}function Ro(e){let t=e.ownerDocument.defaultView;if(!t)return Qs;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(Rv(n,t.getComputedStyle(n)))return kv(n)}catch{return Qs}n=n.parentElement}return Qs}function Zs(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var ko=7200;function Mo(e,t){let n=e.tagName.toLowerCase();if(n==="script"||n==="style"||n==="link"||n==="meta")return!1;let i=n==="video"||n==="audio"?t.resolver.resolveMediaStartForElement(e):t.resolver.resolveStartForElement(e,0),o=t.resolver.resolveDurationForElement(e),a=e.getAttribute("data-composition-id");if(a){let c=t.timelineRegistry[a],d=c&&typeof c.duration=="function"?Number(c.duration()):null;!(e.hasAttribute("data-duration")||e.hasAttribute("data-end")||e.hasAttribute(Fn)||e.hasAttribute(Dn))&&(o==null||o<=0)&&d!=null&&Number.isFinite(d)&&d>0&&(o=d)}let l=o!=null&&o>0?i+o:Number.POSITIVE_INFINITY,s=t.exportRenderSeek?km(i,l,t.canonicalFps):{start:i,end:l};return oo(t.currentTime,s.start,s.end,t.compositionDuration)}function Gr(e){return Me(e)}function el(e){let t=e.getAttribute("data-duration"),n=e.getAttribute(Fn),r=In({start:0,duration:t,authoredDuration:n})?.duration;return r??([t,n].map(Gr).some(o=>o!=null&&o<=0)?0:null)}function Pm(e){return In({start:0,end:e.getAttribute("data-end"),authoredEnd:e.getAttribute(Dn)})?.end??null}function tl(e){try{let t=e.style?.zIndex;if(t&&t!=="auto"){let n=parseInt(t,10);if(Number.isFinite(n))return n}return 0}catch{return 0}}function nl(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function Wn(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let r=Number.parseInt(n,10);return Number.isFinite(r)?r:t}function Br(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function Om(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Br(t);let n=e.getAttribute("data-composition-src");if(n)return Br(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Br(r.getAttribute("src")):null}function Nv(e){let t=e.className;return typeof t!="string"?null:t.split(/\s+/).map(n=>n.trim()).find(n=>n&&n!=="clip"&&!n.startsWith("__hf-"))??null}function Lv(e){if(!e)return null;try{return new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)??null}catch{return e.split(/[\\/]/).filter(Boolean).at(-1)??null}}function Fv(e){let t=e.textContent?.replace(/\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Hr(e){let t=e.replace(/\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):e}function Hm(e){return e.getAttribute("data-hf-original-composition-id")??e.getAttribute("data-composition-id")}function Dv(e,t,n){let r=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(r?.trim())return r.trim();let i=Hm(e);if(i)return Hr(i);let o=e.id;if(o)return Hr(o);let a=Nv(e);if(a)return Hr(a);let l=Lv(Om(e));if(l)return Hr(l);let s=Fv(e);return s||`${Hr(t)} ${n+1}`}function rl(e){let n=window.__timelines??{},r=Ye({timelineRegistry:n,includeAuthoredTimingAttrs:!0}),i=K=>{if(!K)return null;let G=n[K]??null;if(!G||typeof G.duration!="function")return null;try{let V=Number(G.duration());return Number.isFinite(V)&&V>0?V:null}catch{return null}},o=()=>{let K=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(K.length===0)return null;let G=0;for(let V of K){let ee=r.resolveMediaStartForElement(V);if(!Number.isFinite(ee))continue;let ce=Zi(V);ce==null||ce<=0||(G=Math.max(G,Math.max(0,ee)+ce))}return G>0?G:null},a=(K,G)=>{let V=[],ee=null,ce=null,ae=null,z=K.parentElement;for(;z;){let Q=z.getAttribute("data-composition-id");Q&&(V.push(Q),!ae&&z!==G&&(ae=Q),ee==null&&(ee=r.resolveStartForElement(z,0)),ce==null&&(ce=Gr(z.getAttribute("data-duration"))??i(Q)??null)),z=z.parentElement}return{parentCompositionId:ae,compositionAncestors:V.reverse(),inheritedStart:ee,inheritedDuration:ce}},l=kt(),s=Array.from(document.querySelectorAll("[data-composition-id]")),c=l?.getAttribute("data-composition-id")??null,d=l?r.resolveStartForElement(l,0):0,m=o(),f=m!=null?Math.max(0,m-Math.max(0,d)):null,b=i(c),h=el(l??document.body),y=nl(...s.filter(K=>K!==l).map(K=>{let G=r.resolveStartForElement(K,0),V=r.resolveDurationForElement(K)??i(K.getAttribute("data-composition-id"))??null;return!Number.isFinite(G)||V==null||V<=0?null:Math.max(0,G)+V})),x=y!=null?Math.max(0,y-Math.max(0,d)):null,E=typeof b=="number"&&Number.isFinite(b)&&b>0?b:null,w=typeof h=="number"&&Number.isFinite(h)&&h>0?h:null,C=typeof f=="number"&&Number.isFinite(f)&&f>0?f:null,I=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,D=nl(C,I),F=E!=null&&D!=null&&E>=ko,T=w??(F?D:nl(E,C,I))??null,R=(T!=null?d+T:null)??(typeof m=="number"&&Number.isFinite(m)&&m>0?m:null),U=(K,G)=>!Number.isFinite(G)||G<=0?0:R==null||!Number.isFinite(R)?G:!Number.isFinite(K)||K>=R?0:Math.max(0,Math.min(G,R-K)),j=[],Y=[],N=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),_=0;for(let[K,G]of N.entries()){if(G===l||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(G.tagName))continue;let V=a(G,l),ee=G.tagName.toLowerCase(),ce=ee==="video"||ee==="audio"?r.resolveMediaStartForElement(G):r.resolveStartForElement(G,V.inheritedStart??0),ae=G.getAttribute("data-composition-id"),z=el(G);if(z==null&&ae&&ae!==c&&(z=i(ae)),z==null&&he(G)&&Number.isFinite(G.duration)&&(z=mt(G,G.duration)),z==null&&(z=Mn(G,ce)),z==null){let $e=V.inheritedDuration;if($e!=null&&$e>0){let At=(V.inheritedStart??0)+$e;z=Math.max(0,At-ce)}}if(z==null||z<=0||(z=U(ce,z),z<=0))continue;let Q=ce+z;_=Math.max(_,Q);let lt=ae&&ae!==c?"composition":ee==="video"?"video":ee==="audio"?"audio":ee==="img"?"image":"element";j.push({id:Js(G)??ae??null,label:Dv(G,lt,j.length),start:ce,duration:z,track:Wn(G,K),zIndex:tl(G),stackingContextId:Ro(G),kind:lt,tagName:ee,compositionId:G.getAttribute("data-composition-id"),compositionAncestors:V.compositionAncestors,parentCompositionId:V.parentCompositionId,nodePath:null,compositionSrc:Br(G.getAttribute("data-composition-src")),playbackStart:ht(G),playbackRate:We(G),assetUrl:Om(G),timelineRole:G.getAttribute("data-timeline-role"),timelineLabel:G.getAttribute("data-timeline-label"),timelineGroup:G.getAttribute("data-timeline-group"),timelinePriority:Gr(G.getAttribute("data-timeline-priority"))})}let H=new Set(j.map(K=>K.id)),J=l?.getAttribute("data-composition-id")??null,B=J?n[J]??null:null;if(B&&l){let K=B;if(typeof K.getChildren=="function")try{let G=K.getChildren(!0,!0,!1)??[],V=new Map;for(let ae of l.children){let z=ae;if(!z.id)continue;let Q=z.tagName.toLowerCase();Q==="script"||Q==="style"||Q==="link"||V.set(z,{id:z.id,start:1/0,end:-1/0})}let ee=ae=>{let z=ae;for(;z;){if(V.has(z))return z;if(z===l)return null;z=z.parentElement}return null};for(let ae of G){if(typeof ae.targets!="function"||typeof ae.startTime!="function"||typeof ae.duration!="function")continue;let z=ae.startTime(),Q=ae.parent;for(;Q&&Q!==B&&typeof Q.startTime=="function";)z+=Q.startTime(),Q=Q.parent;let lt=z+ae.duration();if(!(!Number.isFinite(z)||!Number.isFinite(lt)))for(let $e of ae.targets()){if(!Le($e))continue;let ir=ee($e);if(!ir)continue;let At=V.get(ir);At&&(At.start=Math.min(At.start,z),At.end=Math.max(At.end,lt))}}let ce=j.length>0?Math.max(...j.map(ae=>ae.track))+1:0;for(let[ae,z]of V){if(z.start===1/0||z.end===-1/0)continue;let Q=ae;if(H.has(Q.id))continue;let lt=Math.max(0,z.end-z.start);if(lt<=0)continue;let $e=U(z.start,lt);$e<=0||(_=Math.max(_,z.start+$e),j.push({id:Q.id,label:Q.getAttribute("data-timeline-label")??Q.getAttribute("data-label")??Q.getAttribute("aria-label")??Q.id,start:z.start,duration:$e,track:Wn(Q,ce),zIndex:tl(Q),stackingContextId:Ro(Q),kind:"element",tagName:Q.tagName.toLowerCase(),compositionId:Q.getAttribute("data-composition-id"),compositionAncestors:J?[J]:[],parentCompositionId:J,nodePath:null,compositionSrc:null,playbackStart:ht(Q),playbackRate:We(Q),assetUrl:null,timelineRole:Q.getAttribute("data-timeline-role"),timelineLabel:Q.getAttribute("data-timeline-label"),timelineGroup:Q.getAttribute("data-timeline-group"),timelinePriority:Gr(Q.getAttribute("data-timeline-priority"))}),H.add(Q.id))}}catch(G){P("runtime.timeline.site1",G)}}if(l&&T!=null&&T>0){let K=j.length>0?Math.max(...j.map(G=>G.track))+1:0;for(let G of l.children){let V=G;if(!V.id||H.has(V.id))continue;let ee=V.getAttribute("data-timeline-role");if(ee!=="overlay"&&ee!=="persistent-overlay")continue;let ce=V.tagName.toLowerCase();if(ce==="script"||ce==="style"||ce==="link"||ce==="meta"||window.getComputedStyle(V).display==="none")continue;let z=U(0,T);z<=0||(_=Math.max(_,z),j.push({id:V.id,label:V.getAttribute("data-timeline-label")??V.getAttribute("data-label")??V.getAttribute("aria-label")??V.id,start:0,duration:z,track:Wn(V,K),zIndex:tl(V),stackingContextId:Ro(V),kind:"element",tagName:ce,compositionId:V.getAttribute("data-composition-id"),compositionAncestors:J?[J]:[],parentCompositionId:J,nodePath:null,compositionSrc:null,playbackStart:ht(V),playbackRate:We(V),assetUrl:null,timelineRole:ee,timelineLabel:V.getAttribute("data-timeline-label"),timelineGroup:V.getAttribute("data-timeline-group"),timelinePriority:Gr(V.getAttribute("data-timeline-priority"))}),H.add(V.id))}}for(let K of s){if(K===l)continue;let G=K.getAttribute("data-composition-id");if(!G||!Zs(G))continue;let V=r.resolveStartForElement(K,0),ee=el(K);if((ee==null||ee<=0)&&Pm(K)!=null){let Q=Pm(K);ee=Math.max(0,Q-V)}let ce=i(G),ae=ee&&ee>0?ee:ce;if(ae==null||ae<=0)continue;let z=U(V,ae);z<=0||Y.push({id:G,label:K.getAttribute("data-label")??Hm(K)??G,start:V,duration:z,thumbnailUrl:Br(K.getAttribute("data-thumbnail-url")),avatarName:null})}let q=Math.max(_||0,T??0),$=q>0?q:1,X=Math.max(1,Math.ceil($*Math.max(1,e.canonicalFps)));return{...ro(e.canonicalFps),source:"hf-preview",type:"timeline",compositionContractVersion:1,durationSeconds:$,durationInFrames:X,clips:j,scenes:Y,compositionWidth:Un(l?.getAttribute("data-width"))??1920,compositionHeight:Un(l?.getAttribute("data-height"))??1080}}var Gm=e=>e!==null&&Number.isFinite(e)&&e>0;function Ur(e){let t=e.clipEndsSeconds.filter(r=>r===null).length;if(Gm(e.authoredDurationSeconds))return{seconds:e.authoredDurationSeconds,source:"authored",pendingClips:t};let n=e.clipEndsSeconds.filter(Gm);return n.length>0?{seconds:Math.max(...n),source:"derived",pendingClips:t}:{seconds:null,source:"unresolved",pendingClips:t,reason:t>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var il="data-composition-id",Iv="data-composition-src",Pv=`[${il}]`,XN=`[${Iv}]`,ol="style",al="script",sl='link[rel="stylesheet"], link[rel="preconnect"]',Bm=`${ol}, ${al}, ${sl}`;function bn(e){return e?Array.from(e):[]}function Um(e){let{contentNode:t,head:n,documentElement:r,hasTemplate:i,compositionId:o}=e,a=bn(t.querySelectorAll(Pv)),l=o?a.find(d=>d.getAttribute(il)===o)??null:a[0]??null,s=(l??a[0])?.getAttribute(il)?.trim()||"",c=i?null:n??null;return{innerRoot:l,authoredCompositionId:o||s||null,scriptCompositionId:s||o||null,authoredRootId:l?.getAttribute("id")?.trim()||null,styleSources:[...bn(c?.querySelectorAll(ol)),...bn(t.querySelectorAll(ol))],scriptSources:[...bn(c?.querySelectorAll(al)),...bn(t.querySelectorAll(al))],linkSources:[...bn(n?.querySelectorAll(sl)),...bn(t.querySelectorAll(sl))],variableDefaultCarriers:[r,l].filter(d=>d!=null)}}var Ce=Kx(gh(),1),bh=Ce.default,HL=Ce.default.stringify,GL=Ce.default.fromJSON,BL=Ce.default.plugin,UL=Ce.default.parse,WL=Ce.default.list,VL=Ce.default.document,$L=Ce.default.comment,zL=Ce.default.atRule,qL=Ce.default.rule,jL=Ce.default.decl,KL=Ce.default.root,XL=Ce.default.CssSyntaxError,YL=Ce.default.Declaration,JL=Ce.default.Container,QL=Ce.default.Processor,ZL=Ce.default.Document,eF=Ce.default.Comment,tF=Ce.default.Warning,nF=Ce.default.AtRule,rF=Ce.default.Result,iF=Ce.default.Input,oF=Ce.default.Rule,aF=Ce.default.Root,sF=Ce.default.Node;function hA(e){return e?/[\w-]/.test(e)||e.charCodeAt(0)>=128:!1}function gA(e){return e===" "||e===" "||e===`
41
41
  `||e==="\r"||e==="\f"}var bA=/^[0-9a-fA-F]{1,6}/;function xA(e){let t=e>=55296&&e<=57343;return e===0||e>1114111||t?65533:e}function yA(e,t){return e[t]==="\r"&&e[t+1]===`
42
42
  `?t+2:gA(e[t])?t+1:t}function SA(e,t){let n=e[t+1];if(n===void 0||n===`
@@ -1,4 +1,4 @@
1
- "use strict";var HyperframesPlayer=(()=>{var Me=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var Ln=Object.getOwnPropertyNames;var On=Object.prototype.hasOwnProperty;var Fn=(n,e)=>{for(var t in e)Me(n,t,{get:e[t],enumerable:!0})},Vn=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ln(e))!On.call(n,r)&&r!==t&&Me(n,r,{get:()=>e[r],enumerable:!(i=Pn(e,r))||i.enumerable});return n};var Un=n=>Vn(Me({},"__esModule",{value:!0}),n);var Ar={};Fn(Ar,{HyperframesPlayer:()=>ke,SPEED_PRESETS:()=>De,formatSpeed:()=>G,formatTime:()=>ue});function gt(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function _t(n){return H(n)&&typeof n.getDuration=="function"}function yt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.98/dist/hyperframe.runtime.iife.js";function W(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function Hn(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=W(e.getAttribute("data-width")),i=W(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var se=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let i=!!(t.__hf||t.__player),r=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(gt({hasRuntime:i,hasTimelines:r,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();let s=Hn(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:s});return}}catch{}e>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||H(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=L,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!H(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return yt(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(_t(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var vt=`
1
+ "use strict";var HyperframesPlayer=(()=>{var Me=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var Ln=Object.getOwnPropertyNames;var On=Object.prototype.hasOwnProperty;var Fn=(n,e)=>{for(var t in e)Me(n,t,{get:e[t],enumerable:!0})},Vn=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ln(e))!On.call(n,r)&&r!==t&&Me(n,r,{get:()=>e[r],enumerable:!(i=Pn(e,r))||i.enumerable});return n};var Un=n=>Vn(Me({},"__esModule",{value:!0}),n);var Ar={};Fn(Ar,{HyperframesPlayer:()=>ke,SPEED_PRESETS:()=>De,formatSpeed:()=>G,formatTime:()=>ue});function gt(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function _t(n){return H(n)&&typeof n.getDuration=="function"}function yt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.99/dist/hyperframe.runtime.iife.js";function W(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function Hn(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=W(e.getAttribute("data-width")),i=W(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var se=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let i=!!(t.__hf||t.__player),r=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(gt({hasRuntime:i,hasTimelines:r,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();let s=Hn(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:s});return}}catch{}e>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||H(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=L,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!H(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return yt(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(_t(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var vt=`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-6D7WQM6D.js";
9
+ } from "./chunk-LBZ54I42.js";
10
10
  import {
11
11
  formatBytes,
12
12
  label
@@ -14,31 +14,32 @@ import {
14
14
  import {
15
15
  ensureDOMParser
16
16
  } from "./chunk-PFCFR3KZ.js";
17
- import "./chunk-P7CAZ6YA.js";
18
- import "./chunk-WPP2NJVF.js";
17
+ import "./chunk-T6OPV3KB.js";
18
+ import "./chunk-J5ES3BN2.js";
19
19
  import "./chunk-VWG7OQKU.js";
20
20
  import {
21
21
  c
22
22
  } from "./chunk-ZTZA4UWZ.js";
23
- import "./chunk-NY4NHA3Y.js";
23
+ import "./chunk-PUB5XZYL.js";
24
24
  import "./chunk-AMKC3AXA.js";
25
25
  import {
26
26
  defineCommand
27
27
  } from "./chunk-S3S4TGEH.js";
28
28
  import "./chunk-54HJ63Q2.js";
29
29
  import "./chunk-PBN6GBJE.js";
30
- import "./chunk-H7EMX7GA.js";
31
- import "./chunk-TXY724ZK.js";
30
+ import "./chunk-VW5OMJNG.js";
31
+ import "./chunk-TEXPOC5V.js";
32
32
  import {
33
33
  CANVAS_DIMENSIONS,
34
34
  parseHtml
35
- } from "./chunk-WFO4PSIZ.js";
35
+ } from "./chunk-TLYU5625.js";
36
36
  import "./chunk-DPVXBVLL.js";
37
- import "./chunk-YVGQM466.js";
38
- import "./chunk-M5YNZQXZ.js";
37
+ import "./chunk-TH4APNRP.js";
38
+ import "./chunk-FOKUJKBN.js";
39
39
  import "./chunk-VC76R6W2.js";
40
+ import "./chunk-OFQWTKPW.js";
40
41
  import "./chunk-TWWSYAKJ.js";
41
- import "./chunk-KVA65K7M.js";
42
+ import "./chunk-UVUAU3CH.js";
42
43
  import "./chunk-HBBJFK6I.js";
43
44
  import "./chunk-PJ3HDUCY.js";
44
45
  import "./chunk-TQFG7HTI.js";
@@ -46,12 +47,12 @@ import "./chunk-GK4AIFIH.js";
46
47
  import "./chunk-2PSPARWP.js";
47
48
  import {
48
49
  withMeta
49
- } from "./chunk-B7E6IWMM.js";
50
+ } from "./chunk-EUSLU4BH.js";
50
51
  import "./chunk-K4WIOZFP.js";
51
52
  import "./chunk-XUXGIA7H.js";
52
53
  import "./chunk-WERLJGIC.js";
53
54
  import "./chunk-ISN5GRYI.js";
54
- import "./chunk-N4H5U5BT.js";
55
+ import "./chunk-MM7KX3QX.js";
55
56
  import "./chunk-KNU5COPB.js";
56
57
  import "./chunk-3GXQPCJC.js";
57
58
  import "./chunk-RQVDTPGD.js";