"use strict";(()=>{function ue(e){try{window.parent.postMessage(e,"*")}catch{}}function pt(e){let t=n=>{let r=n.data;if(!r||r.source!=="hf-parent"||r.type!=="control")return;let o=r.action;if(o==="play"){e.onPlay();return}if(o==="pause"){e.onPause();return}if(o==="seek"){e.onSeek(Number(r.frame??0),r.seekMode??"commit");return}if(o==="set-muted"){e.onSetMuted(!!r.muted);return}if(o==="set-playback-rate"){e.onSetPlaybackRate(Number(r.playbackRate??1));return}if(o==="enable-pick-mode"){e.onEnablePickMode();return}if(o==="disable-pick-mode"){e.onDisablePickMode();return}if(o==="flash-elements"){let i=r.selectors,c=r.duration||800;i&&fn(i,c)}};return window.addEventListener("message",t),t}function fn(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
      .__hf-flash {
        outline: 2px solid rgba(59, 130, 246, 0.6) !important;
        outline-offset: 2px !important;
        animation: __hf-flash-pulse ${t}ms ease-out forwards !important;
      }
      @keyframes __hf-flash-pulse {
        0% { outline-color: rgba(59, 130, 246, 0.8); }
        100% { outline-color: transparent; }
      }
    `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(o=>{o.classList.add("__hf-flash"),setTimeout(()=>o.classList.remove("__hf-flash"),t)})}catch{}}var Ye=null;function ht(e){Ye=e}function Be(e,t){if(Ye)try{Ye({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function gt(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=window.getComputedStyle(r);!o.animationName||o.animationName==="none"||t.push({el:r,baseDelay:r.style.animationDelay||"",basePlayState:r.style.animationPlayState||""})}},seek:n=>{let r=Number(n.time)||0;for(let o of t){if(!o.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(o.el):Number.parseFloat(o.el.getAttribute("data-start")??"0")||0,c=Math.max(0,r-i);o.el.style.animationPlayState="paused",o.el.style.animationDelay=`-${c.toFixed(3)}s`}},pause:()=>{for(let n of t)n.el.isConnected&&(n.el.style.animationPlayState=n.basePlayState||"paused",n.baseDelay&&(n.el.style.animationDelay=n.baseDelay))},revert:()=>{t=[]}}}function St(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);typeof n.totalTime=="function"?n.totalTime(r,!1):n.seek(r,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Et(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],r=new Set(n);for(let o of t)r.has(o)||n.push(o);window.__hfLottie=n}}}catch{}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let r of n)try{if(Ft(r))r.goToAndStop(t*1e3,!1);else if(Nt(r)){if(typeof r.setCurrentRawFrameValue=="function"){let o=r.totalFrames??0,i=r.frameRate??30,c=t*i;o>0&&r.setCurrentRawFrameValue(Math.min(c,o-1))}else if(typeof r.seek=="function"){let o=r.duration??1,i=Math.min(100,t/o*100);r.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(Ft(t)||Nt(t))&&t.pause()}catch{}},revert:()=>{}}}function Ft(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function Nt(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function At(){let e=null,t=0;return{name:"three",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfThreeTime=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch{}},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function yt(){return{name:"waapi",discover:()=>{},seek:e=>{if(!document.getAnimations)return;let t=Math.max(0,(Number(e.time)||0)*1e3);for(let n of document.getAnimations())try{n.pause(),n.currentTime=t}catch{}},pause:()=>{if(document.getAnimations)for(let e of document.getAnimations())try{e.pause()}catch{}}}}function bt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],r=[],o=0;for(let i of t){let c=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(c))continue;let m=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,u=i.defaultPlaybackRate,s=Number.isFinite(u)&&u>0?Math.max(.1,Math.min(5,u)):1,l=i.loop,x=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,h=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(h)||h<=0)&&x!=null&&(h=Math.max(0,(x-m)/s));let M=Number.isFinite(h)&&h>0?c+h:Number.POSITIVE_INFINITY,D=Number.parseFloat(i.dataset.volume??""),k={el:i,start:c,mediaStart:m,duration:Number.isFinite(h)&&h>0?h:Number.POSITIVE_INFINITY,end:M,volume:Number.isFinite(D)?D:null,playbackRate:s,loop:l,sourceDuration:x};n.push(k),i.tagName==="VIDEO"&&r.push(k),Number.isFinite(M)&&(o=Math.max(o,M))}return{timedMediaEls:t,mediaClips:n,videoClips:r,maxMediaEnd:o}}var je=new WeakSet;function Mt(e){for(let t of e.clips){let{el:n}=t;if(!n.isConnected)continue;let r=(e.timeSeconds-t.start)*t.playbackRate+t.mediaStart;if(e.timeSeconds>=t.start&&e.timeSeconds<t.end&&r>=0){if(t.loop&&t.sourceDuration!=null&&t.sourceDuration>0){let i=t.sourceDuration-t.mediaStart;i>0&&r>=t.sourceDuration&&(r=t.mediaStart+(r-t.mediaStart)%i)}t.volume!=null&&(n.volume=t.volume);try{n.playbackRate=t.playbackRate*e.playbackRate}catch{}if(Math.abs((n.currentTime||0)-r)>.3)try{n.currentTime=r}catch{}e.playing&&n.paused&&!je.has(n)?n.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA?n.play().catch(()=>{}):(je.add(n),n.preload!=="auto"&&(n.preload="auto"),n.addEventListener("canplay",()=>{je.delete(n),n.paused&&n.play().catch(()=>{})},{once:!0}),n.addEventListener("error",()=>je.delete(n),{once:!0}),n.load()):!e.playing&&!n.paused&&n.pause();continue}n.paused||n.pause()}}function Ct(e){let t=!1,n=null,r=null,o=null,i=null;function c(g,d){try{window.dispatchEvent(new CustomEvent(g,{detail:d}))}catch{}}function m(g){o=g,c("hyperframe:picker:hovered",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function u(g){i=g,c("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function s(g){if(!g||g===document.body||g===document.documentElement)return!1;let d=g.tagName.toLowerCase();return!(d==="script"||d==="style"||d==="link"||d==="meta"||g.classList.contains("__hf-pick-highlight"))}function l(g){let d=g;if(d.id)return`#${d.id}`;let S=g.getAttribute("data-composition-id");if(S)return`[data-composition-id="${S}"]`;let A=g.getAttribute("data-composition-src");if(A)return`[data-composition-src="${A}"]`;let b=g.getAttribute("data-track-index");if(b)return`[data-track-index="${b}"]`;let E=g.tagName.toLowerCase(),v=g.parentElement;if(!v)return E;let _=v.querySelectorAll(`:scope > ${E}`);if(_.length===1)return E;for(let I=0;I<_.length;I+=1)if(_[I]===g)return`${E}:nth-of-type(${I+1})`;return E}function x(g){let d=g.tagName.toLowerCase(),S=(g.textContent??"").trim().replace(/\s+/g," "),A=(b,E)=>b.length>E?`${b.slice(0,E-1)}\u2026`:b;return d==="h1"||d==="h2"||d==="h3"?"Heading":d==="p"||d==="span"||d==="div"?S.length>0?A(S,56):"Text":d==="img"?"Image":d==="video"?"Video":d==="audio"?"Audio":d==="svg"?"Shape":g.getAttribute("data-composition-src")?"Composition":d==="section"?"Section":`${d.charAt(0).toUpperCase()}${d.slice(1)}`}function h(g,d,S){let A=typeof S=="number"&&S>0?S:8,b=[];if(document.elementsFromPoint)b=document.elementsFromPoint(g,d);else if(document.elementFromPoint){let _=document.elementFromPoint(g,d);b=_?[_]:[]}let E={},v=[];for(let _=0;_<b.length;_+=1){let I=b[_];if(!s(I))continue;let X=`${I.tagName}::${I.id||""}::${_}`;if(!E[X]&&(E[X]=!0,v.push(I),v.length>=A))break}return v}function M(g){let d=g.getBoundingClientRect(),S={};for(let b=0;b<g.attributes.length;b+=1){let E=g.attributes[b];E.name.startsWith("data-")&&(S[E.name]=E.value)}return{id:g.id||null,tagName:g.tagName.toLowerCase(),selector:l(g),label:x(g),boundingBox:{x:d.left,y:d.top,width:d.width,height:d.height},textContent:g.textContent?g.textContent.trim().slice(0,200):null,src:g.getAttribute("src")||g.getAttribute("data-composition-src")||null,dataAttributes:S}}function D(g,d,S){return h(g,d,S).map(M)}function k(g){if(!t)return;let S=h(g.clientX,g.clientY,1)[0]??(g.target instanceof Element?g.target:null);if(!s(S)||n===S)return;n&&n.classList.remove("__hf-pick-highlight"),n=S,S.classList.add("__hf-pick-highlight");let A=M(S);m(A),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:A})}function w(g){if(!t)return;g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();let d=D(g.clientX,g.clientY,8);d.length!==0&&(m(d[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:d,selectedIndex:0,point:{x:g.clientX,y:g.clientY}}))}function j(g){g.key==="Escape"&&(B(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function V(){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(`
`),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",k,!0),document.addEventListener("click",w,!0),document.addEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function B(){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",k,!0),document.removeEventListener("click",w,!0),document.removeEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function $(){window.__HF_PICKER_API={enable:V,disable:B,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(g,d,S)=>Number.isFinite(g)&&Number.isFinite(d)?D(g,d,S):[],pickAtPoint:(g,d,S)=>{if(!Number.isFinite(g)||!Number.isFinite(d))return null;let A=D(g,d,8);if(!A.length)return null;let b=Math.max(0,Math.min(A.length-1,Number(S??0))),E=A[b]??null;return E?(u(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),B(),E):null},pickManyAtPoint:(g,d,S)=>{if(!Number.isFinite(g)||!Number.isFinite(d))return[];let A=D(g,d,8);if(!A.length)return[];let b=[],E=Array.isArray(S)?S:[0];for(let v of E){let _=Math.max(0,Math.min(A.length-1,Math.floor(Number(v)))),I=A[_];if(!I)continue;b.some(L=>L.selector===I.selector&&L.tagName===I.tagName)||b.push(I)}return b.length?(u(b[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:b}),B(),b):[]}},c("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:V,disablePickMode:B,installPickerApi:$}}function Dt(e,t){let n=Number.isFinite(t)&&t>0?t:30,r=Number.isFinite(e)&&e>0?e:0;return Math.floor(r*n+1e-9)/n}function kt(e,t,n){let r=Dt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(r,!1):e.seek(r,!1),r}function Lt(e){return{_timeline:null,play:()=>{let t=e.getTimeline();if(!t||e.getIsPlaying())return;let n=Math.max(0,Number(e.getSafeDuration?.()??t.duration()??0)||0);n>0&&Math.max(0,Number(t.time())||0)>=n&&(t.pause(),t.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof t.timeScale=="function"&&t.timeScale(e.getPlaybackRate()),t.play(),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let t=e.getTimeline();if(!t)return;t.pause();let n=Math.max(0,Number(t.time())||0);e.onDeterministicSeek(n),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(n,!1),e.onRenderFrameSeek(n),e.onStatePost(!0)},seek:t=>{let n=e.getTimeline();if(!n)return;let r=Math.max(0,Number(t)||0),o=kt(n,r,e.getCanonicalFps());e.onDeterministicSeek(o),e.setIsPlaying(!1),e.onSyncMedia(o,!1),e.onRenderFrameSeek(o),e.onStatePost(!0)},renderSeek:t=>{let n=e.getTimeline();if(!n)return;let r=kt(n,t,e.getCanonicalFps());e.onDeterministicSeek(r),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},getTime:()=>Number(e.getTimeline()?.time()??0),getDuration:()=>Number(e.getTimeline()?.duration()??0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:t=>e.setPlaybackRate(t),getPlaybackRate:()=>e.getPlaybackRate()}}function Tt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,timelinePollIntervalId:null,controlBridgeHandler:null,clampDurationLoggedRaw:null,beforeUnloadHandler:null,domReadyHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,maxTimelineDurationSeconds:1800,nativeVisualWatchdogTick:0}}function ve(e){let t=Number(e);return Number.isFinite(t)?t:null}function pn(e){let t=(e??"").trim();if(!t)return null;let n=ve(t);if(n!=null)return{kind:"absolute",value:n};let r=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!r)return null;let o=(r[1]??"").trim();if(!o)return null;let i=r[2]??"+",c=r[3]??"0",m=Number.parseFloat(c),u=Number.isFinite(m)?Math.max(0,m):0,s=i==="-"?-u:u;return{kind:"reference",refId:o,offset:s}}function Ce(e){let t=e.timelineRegistry??{},n=new WeakMap,r=new WeakMap,o=new Set,i=u=>{let s=document.getElementById(u);return s||(document.querySelector(`[data-composition-id="${CSS.escape(u)}"]`)??null)},c=u=>{let s=r.get(u);if(s!==void 0)return s;let l=null,x=ve(u.getAttribute("data-duration"));if(x!=null&&x>0&&(l=x),l==null||l<=0){let h=ve(u.getAttribute("data-end"));if(h!=null){let M=m(u,0),D=h-M;Number.isFinite(D)&&D>0&&(l=D)}}if((l==null||l<=0)&&u instanceof HTMLMediaElement){let h=ve(u.getAttribute("data-playback-start"))??ve(u.getAttribute("data-media-start"))??0;Number.isFinite(u.duration)&&u.duration>h&&(l=u.duration-h)}if(l==null||l<=0){let h=u.getAttribute("data-composition-id");if(h){let M=t[h]??null;if(M&&typeof M.duration=="function")try{let D=Number(M.duration());Number.isFinite(D)&&D>0&&(l=D)}catch{}}}return l!=null&&Number.isFinite(l)&&l>0?(r.set(u,l),l):(r.set(u,null),null)},m=(u,s)=>{let l=n.get(u);if(l!==void 0)return l??s;if(o.has(u))return s;o.add(u);try{let x=pn(u.getAttribute("data-start"));if(!x){if(u.hasAttribute("data-composition-id")){let w=u.parentElement;if(w&&(w.hasAttribute("data-composition-src")||w.hasAttribute("data-composition-id"))){let j=m(w,s);return n.set(u,j),j}}return n.set(u,s),s}if(x.kind==="absolute"){let w=Math.max(0,x.value);return n.set(u,w),w}let h=i(x.refId);if(!h)return n.set(u,s),s;let M=m(h,0),D=c(h);if(D==null||D<=0){let w=Math.max(0,M+x.offset);return n.set(u,w),w}let k=Math.max(0,M+D+x.offset);return n.set(u,k),k}finally{o.delete(u)}};return{resolveStartForElement:(u,s=0)=>m(u,Math.max(0,s)),resolveDurationForElement:u=>c(u)}}function ce(e){let t=Number(e);return Number.isFinite(t)?t:null}var wt={composition:0,video:1,image:2,element:3,audio:4};function hn(e){if(e.length===0)return;let t=new Map;for(let c of e){let m=t.get(c.track)??new Set;m.add(c.kind),t.set(c.track,m)}if(!Array.from(t.values()).some(c=>c.size>1))return;let r=0,o=new Map,i=[...t.keys()].sort((c,m)=>c-m);for(let c of i){let m=t.get(c);if(m.size===1)o.set(`${c}:${[...m][0]}`,r++);else{let u=[...m].sort((s,l)=>(wt[s]??99)-(wt[l]??99));for(let s of u)o.set(`${c}:${s}`,r++)}}for(let c of e){let m=`${c.track}:${c.kind}`,u=o.get(m);u!=null&&(c.track=u)}}function Re(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 gn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Re(t);let n=e.getAttribute("data-composition-src");if(n)return Re(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Re(r.getAttribute("src")):null}function Bt(e){let n=window.__timelines??{},r=Ce({timelineRegistry:n}),o=N=>{if(!N)return null;let F=n[N]??null;if(!F||typeof F.duration!="function")return null;try{let T=Number(F.duration());return Number.isFinite(T)&&T>0?T:null}catch{return null}},i=N=>{let F=ce(N.getAttribute("data-duration"));if(F!=null&&F>0)return F;let T=ce(N.getAttribute("data-playback-start"))??ce(N.getAttribute("data-media-start"))??0;return Number.isFinite(N.duration)&&N.duration>T?Math.max(0,N.duration-T):null},c=()=>{let N=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(N.length===0)return null;let F=0;for(let T of N){let W=r.resolveStartForElement(T,0);if(!Number.isFinite(W))continue;let Q=i(T);Q==null||Q<=0||(F=Math.max(F,Math.max(0,W)+Q))}return F>0?F:null},m=N=>{let F=N.trim().toLowerCase();return!(!F||F==="main"||F.includes("caption")||F.includes("ambient"))},u=(N,F)=>{let T=[],W=null,Q=null,R=null,P=N.parentElement;for(;P;){let O=P.getAttribute("data-composition-id");O&&(T.push(O),!R&&P!==F&&(R=O),W==null&&(W=r.resolveStartForElement(P,0)),Q==null&&(Q=ce(P.getAttribute("data-duration"))??o(O)??null)),P=P.parentElement}return{parentCompositionId:R,compositionAncestors:T.reverse(),inheritedStart:W,inheritedDuration:Q}},s=document.querySelector("[data-composition-id]"),l=s?.getAttribute("data-composition-id")??null,x=s?r.resolveStartForElement(s,0):0,h=c(),M=h!=null?Math.max(0,h-Math.max(0,x)):null,D=o(l),k=ce(s?.getAttribute("data-duration")),w=typeof D=="number"&&Number.isFinite(D)&&D>0?D:null,j=typeof k=="number"&&Number.isFinite(k)&&k>0?k:null,V=typeof M=="number"&&Number.isFinite(M)&&M>0?M:null,B=w!=null&&V!=null&&w>V+1,$=j??(B?V:w??V),g=$!=null?Math.min($,e.maxTimelineDurationSeconds):null,S=(g!=null?x+g:null)??(typeof h=="number"&&Number.isFinite(h)&&h>0?h:null),A=(N,F)=>!Number.isFinite(F)||F<=0?0:S==null||!Number.isFinite(S)?F:!Number.isFinite(N)||N>=S?0:Math.max(0,Math.min(F,S-N)),b=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],v=[],_=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),I=0;for(let N=0;N<_.length;N+=1){let F=_[N];if(F===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(F.tagName))continue;let T=u(F,s),W=r.resolveStartForElement(F,T.inheritedStart??0),Q=F.getAttribute("data-composition-id"),R=ce(F.getAttribute("data-duration"));if((R==null||R<=0)&&Q&&Q!==l&&(R=o(Q)),(R==null||R<=0)&&F instanceof HTMLMediaElement){let le=ce(F.getAttribute("data-playback-start"))??ce(F.getAttribute("data-media-start"))??0;Number.isFinite(F.duration)&&F.duration>0&&(R=Math.max(0,F.duration-le))}if(R==null||R<=0){let le=T.inheritedDuration;if(le!=null&&le>0){let pe=(T.inheritedStart??0)+le;R=Math.max(0,pe-W)}}if(R==null||R<=0||(R=A(W,R),R<=0))continue;let P=W+R;I=Math.max(I,P);let O=F.tagName.toLowerCase(),fe=Q&&Q!==l?"composition":O==="video"?"video":O==="audio"?"audio":O==="img"?"image":"element";E.push({id:F.id||Q||`__node__index_${N}`,label:F.getAttribute("data-timeline-label")??F.getAttribute("data-label")??F.getAttribute("aria-label")??Q??F.id??F.className?.split(" ")[0]??fe,start:W,duration:R,track:Number.parseInt(F.getAttribute("data-track-index")??F.getAttribute("data-track")??String(N),10)||0,kind:fe,tagName:O,compositionId:F.getAttribute("data-composition-id"),compositionAncestors:T.compositionAncestors,parentCompositionId:T.parentCompositionId,nodePath:null,compositionSrc:Re(F.getAttribute("data-composition-src")),assetUrl:gn(F),timelineRole:F.getAttribute("data-timeline-role"),timelineLabel:F.getAttribute("data-timeline-label"),timelineGroup:F.getAttribute("data-timeline-group"),timelinePriority:ce(F.getAttribute("data-timeline-priority"))})}let X=new Set(E.map(N=>N.id)),L=s?.getAttribute("data-composition-id")??null,U=L?n[L]??null:null;if(U&&s){let N=U;if(typeof N.getChildren=="function")try{let F=N.getChildren(!0,!0,!1)??[],T=new Map;for(let R of s.children){let P=R;if(!P.id)continue;let O=P.tagName.toLowerCase();O==="script"||O==="style"||O==="link"||T.set(P,{id:P.id,start:1/0,end:-1/0})}let W=R=>{let P=R;for(;P;){if(T.has(P))return P;if(P===s)return null;P=P.parentElement}return null};for(let R of F){if(typeof R.targets!="function"||typeof R.startTime!="function"||typeof R.duration!="function")continue;let P=R.startTime(),O=R.parent;for(;O&&typeof O.startTime=="function";)P+=O.startTime(),O=O.parent;let fe=P+R.duration();if(!(!Number.isFinite(P)||!Number.isFinite(fe)))for(let le of R.targets()){if(!(le instanceof Element))continue;let Te=W(le);if(!Te)continue;let pe=T.get(Te);pe&&(pe.start=Math.min(pe.start,P),pe.end=Math.max(pe.end,fe))}}let Q=E.length>0?Math.max(...E.map(R=>R.track))+1:0;for(let[R,P]of T){if(P.start===1/0||P.end===-1/0)continue;let O=R;if(X.has(O.id))continue;let fe=Math.max(0,P.end-P.start);if(fe<=0)continue;let le=A(P.start,fe);le<=0||(I=Math.max(I,P.start+le),E.push({id:O.id,label:O.getAttribute("data-timeline-label")??O.getAttribute("data-label")??O.getAttribute("aria-label")??O.id,start:P.start,duration:le,track:Number.parseInt(O.getAttribute("data-track-index")??O.getAttribute("data-track")??"",10)||Q,kind:"element",tagName:O.tagName.toLowerCase(),compositionId:O.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:O.getAttribute("data-timeline-role"),timelineLabel:O.getAttribute("data-timeline-label"),timelineGroup:O.getAttribute("data-timeline-group"),timelinePriority:ce(O.getAttribute("data-timeline-priority"))}),X.add(O.id))}}catch{}}if(s&&g!=null&&g>0){let N=E.length>0?Math.max(...E.map(F=>F.track))+1:0;for(let F of s.children){let T=F;if(!T.id||X.has(T.id))continue;let W=T.tagName.toLowerCase();if(W==="script"||W==="style"||W==="link"||W==="meta"||window.getComputedStyle(T).display==="none")continue;let R=A(0,g);R<=0||(I=Math.max(I,R),E.push({id:T.id,label:T.getAttribute("data-timeline-label")??T.getAttribute("data-label")??T.getAttribute("aria-label")??T.id,start:0,duration:R,track:Number.parseInt(T.getAttribute("data-track-index")??T.getAttribute("data-track")??"",10)||N,kind:"element",tagName:W,compositionId:T.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:T.getAttribute("data-timeline-role"),timelineLabel:T.getAttribute("data-timeline-label"),timelineGroup:T.getAttribute("data-timeline-group"),timelinePriority:ce(T.getAttribute("data-timeline-priority"))}),X.add(T.id))}}hn(E);for(let N of b){if(N===s)continue;let F=N.getAttribute("data-composition-id");if(!F||!m(F))continue;let T=r.resolveStartForElement(N,0),W=ce(N.getAttribute("data-duration")),Q=o(F),R=W&&W>0?W:Q;if(R==null||R<=0)continue;let P=A(T,R);P<=0||v.push({id:F,label:N.getAttribute("data-label")??F,start:T,duration:P,thumbnailUrl:Re(N.getAttribute("data-thumbnail-url")),avatarName:null})}let te=Math.max(1,Math.min(I||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:B&&j==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(te*Math.max(1,e.canonicalFps))),clips:E,scenes:v,compositionWidth:ce(s?.getAttribute("data-width"))??1920,compositionHeight:ce(s?.getAttribute("data-height"))??1080}}var Sn=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,Fn=e=>new Promise(t=>{let n=!1,r=Date.now(),o=null,i=c=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:c,elapsedMs:Math.max(0,Date.now()-r)}))};e.addEventListener("load",()=>i("load"),{once:!0}),e.addEventListener("error",()=>i("error"),{once:!0}),o=window.setTimeout(()=>i("timeout"),8e3)});function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function vt(e,t){let n=e.trim();if(!n)return e;try{return Sn.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}async function et(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(s=>s.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode;if(e.headStyles)for(let u of e.headStyles){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let r=Array.from(n.querySelectorAll("style"));for(let u of r){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let o=[];if(e.headScripts)for(let u of e.headScripts){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=vt(l,e.compositionUrl);o.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&o.push({kind:"inline",content:x,type:s})}}let i=Array.from(n.querySelectorAll("script")),c=[...o];for(let u of i){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=vt(l,e.compositionUrl);c.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&c.push({kind:"inline",content:x,type:s})}u.parentNode?.removeChild(u)}let m=Array.from(n.querySelectorAll("style"));for(let u of m)u.parentNode?.removeChild(u);if(t){let u=document.importNode(t,!0),s=t.getAttribute("data-width"),l=t.getAttribute("data-height"),x=e.parseDimensionPx(s),h=e.parseDimensionPx(l);u.style.position="relative",u.style.width=x||"100%",u.style.height=h||"100%",x&&u.style.setProperty("--comp-width",x),h&&u.style.setProperty("--comp-height",h),s&&e.host.setAttribute("data-width",s),l&&e.host.setAttribute("data-height",l),x&&e.host instanceof HTMLElement&&(e.host.style.width=x),h&&e.host instanceof HTMLElement&&(e.host.style.height=h),e.host.appendChild(u)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let u of c){let s=document.createElement("script");if(u.type&&(s.type=u.type),s.async=!1,u.kind==="external"?s.src=u.src:u.type.toLowerCase()==="module"?s.textContent=u.content:s.textContent=`(function(){${u.content}})();`,document.body.appendChild(s),e.injectedScripts.push(s),u.kind==="external"){let l=await Fn(s);l.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:u.src,loadStatus:l.status,elapsedMs:l.elapsedMs}})}}}async function Rt(e){let t=Array.from(document.querySelectorAll("[data-composition-id]:not([data-composition-src])")).filter(n=>{if(n.children.length>0)return!1;let r=n.getAttribute("data-composition-id");return r?!!document.querySelector(`template#${CSS.escape(r)}-template`):!1});if(t.length!==0)for(let n of t){let r=n.getAttribute("data-composition-id"),o=document.querySelector(`template#${CSS.escape(r)}-template`);Xe(n),await et({host:n,hostCompositionId:r,hostCompositionSrc:`template#${r}-template`,sourceNode:o.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function It(e){let t=Array.from(document.querySelectorAll("[data-composition-src]"));t.length!==0&&await Promise.all(t.map(async n=>{let r=n.getAttribute("data-composition-src");if(!r)return;let o=null;try{o=new URL(r,document.baseURI)}catch{o=null}Xe(n);try{let i=n.getAttribute("data-composition-id"),c=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(c){await et({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let m=await fetch(r);if(!m.ok)throw new Error(`HTTP ${m.status}`);let u=await m.text(),l=new DOMParser().parseFromString(u,"text/html"),x=(i?l.querySelector(`template#${CSS.escape(i)}-template`):null)??l.querySelector("template"),h=x?x.content:l.body,M=x?void 0:Array.from(l.head.querySelectorAll("style")),D=x?void 0:Array.from(l.head.querySelectorAll("script"));await et({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:h,hasTemplate:!!x,fallbackBodyInnerHtml:l.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:M,headScripts:D,onDiagnostic:e.onDiagnostic})}catch(i){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:n.getAttribute("data-composition-id"),hostCompositionSrc:r,errorMessage:i instanceof Error?i.message:"unknown_error"}}),Xe(n)}}))}function tt(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=[],r=document.querySelectorAll(".caption-group");for(let o of r){let i=o.querySelectorAll(":scope > span");for(let c of i)n.push(c)}for(let o of t){let i=null;if(o.wordId&&(i=document.getElementById(o.wordId)),!i&&o.wordIndex!==void 0&&(i=n[o.wordIndex]??null),!i||!(i instanceof HTMLElement))continue;let c={},m={};if(o.x!==void 0&&(c.x=o.x),o.y!==void 0&&(c.y=o.y),o.scale!==void 0&&(c.scale=o.scale),o.rotation!==void 0&&(c.rotation=o.rotation),o.opacity!==void 0&&(m.opacity=o.opacity),o.fontSize!==void 0&&(m.fontSize=`${o.fontSize}px`),o.fontWeight!==void 0&&(m.fontWeight=o.fontWeight),o.fontFamily!==void 0&&(m.fontFamily=o.fontFamily),o.activeColor||o.dimColor){let s=e.getTweensOf(i).filter(x=>x.vars.color!==void 0).sort((x,h)=>x.startTime()-h.startTime()),l=s.length>0?String(s[0].vars.color):"";for(let x of s)String(x.vars.color)===l?o.dimColor&&(x.vars.color=o.dimColor):o.activeColor&&(x.vars.color=o.activeColor);o.dimColor&&e.set(i,{color:o.dimColor})}if(Object.keys(m).length>0&&e.set(i,m),Object.keys(c).length>0){let u=document.createElement("span");u.style.display="inline-block",u.dataset.captionWrapper="true",i.parentNode?.insertBefore(u,i),u.appendChild(i),e.set(u,c)}}}).catch(()=>{})}function Pt(){let e=Tt(),t=window,n=null,r=null,o=[],i=new Set,c=null;if(typeof t.__hfRuntimeTeardown=="function")try{t.__hfRuntimeTeardown()}catch{}document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden"),window.__timelines=window.__timelines||{};let m=a=>{o.push(a)},u=(a,f,p)=>{let C=p??`${a}:${JSON.stringify(f)}`;i.has(C)||(i.add(C),ue({source:"hf-preview",type:"diagnostic",code:a,details:f}))},s=a=>{let f={scale:1,focusX:960,focusY:540},p=[],C=[],y={time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:a.play,pause:a.pause,seek:a.seek,getTime:a.getTime,getDuration:a.getDuration,isPlaying:a.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>f,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>p,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:a.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>C,getRenderState:()=>({...y,time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying()})}},l=1/60,x=.75,h=.75,M=.35,D=900,k=3,w=2,j=.05,V=100,B=240,$=a=>{if(a instanceof Error)return a.message||String(a);if(typeof a=="string")return a;try{return JSON.stringify(a)}catch{return String(a??"")}},g=a=>{let f=a.toLowerCase();return f.includes("cannot read properties of null")||f.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:f.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:f.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},d=a=>{if(a==null||a.trim()==="")return null;let f=Number.parseFloat(a);return!Number.isFinite(f)||f<=0?null:`${f}px`},S=()=>{let a=document.querySelector('[data-composition-id][data-root="true"]');if(a instanceof HTMLElement)return a;let f=Array.from(document.querySelectorAll("[data-composition-id]"));return f.length===0?null:f.find(p=>!p.parentElement?.closest("[data-composition-id]"))??f[0]??null},A=()=>{let a=S();if(!a)return;let f=d(a.getAttribute("data-width")),p=d(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p),f&&a.style.setProperty("--comp-width",f),p&&a.style.setProperty("--comp-height",p)},b=()=>{let a=S(),f=Array.from(document.querySelectorAll("[data-composition-id]")).filter(p=>p.hasAttribute("data-duration")||p.hasAttribute("data-end"));for(let p of f)a&&p===a||(p.removeAttribute("data-duration"),p.removeAttribute("data-end"))},E=()=>{let a=S();if(!a)return;a.style.position||(a.style.position="relative"),a.style.overflow="hidden";let f=d(a.getAttribute("data-width")),p=d(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p);let C=Array.from(a.children);for(let y of C){let Z=y.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!y.hasAttribute("data-start"))continue;let se=(y.style.top==="0px"||y.style.top==="0")&&(y.style.left==="0px"||y.style.left==="0")&&y.style.width==="100%"&&y.style.height==="100%",Ee=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(y.style.transform);if(se&&Ee&&!y.hasAttribute("data-width")&&!y.hasAttribute("data-height")){let de=y.style.top,K=y.style.left,z=y.style.width,J=y.style.height;y.style.top="",y.style.left="",y.style.width="",y.style.height="";let G=window.getComputedStyle(y);G.top!=="auto"||G.bottom!=="auto"||G.left!=="auto"||G.right!=="auto"||G.width!=="0px"||G.height!=="0px"||(y.style.top=de,y.style.left=K,y.style.width=z,y.style.height=J)}let ne=window.getComputedStyle(y),ee=ne.position;if(ee!=="absolute"&&ee!=="fixed"&&(y.style.position="absolute"),!!y.style.top||!!y.style.bottom||ne.top!=="auto"||ne.bottom!=="auto"||(y.style.top="0"),!!y.style.left||!!y.style.right||ne.left!=="auto"||ne.right!=="auto"||(y.style.left="0"),Z!=="audio"){let de=d(y.getAttribute("data-width")),K=d(y.getAttribute("data-height")),z=ne.width!=="0px"&&ne.width!=="auto",J=ne.height!=="0px"&&ne.height!=="auto";de?!y.style.width&&!z&&(y.style.width=de):!y.style.width&&ne.width==="0px"&&(y.style.width="100%"),K?!y.style.height&&!J&&(y.style.height=K):!y.style.height&&ne.height==="0px"&&(y.style.height="100%")}}},v=(a,f=0)=>Ce({timelineRegistry:window.__timelines??{}}).resolveStartForElement(a,f),_=a=>Ce({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(a),I=!!document.querySelector("[data-composition-src]"),X=!1;{let a=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let f of a){let p=f.getAttribute("data-composition-id");if(p&&f.children.length===0&&document.querySelector(`template#${CSS.escape(p)}-template`)){X=!0;break}}}let L=!I&&!X,U=a=>{if(!a||typeof a.duration!="function")return null;try{let f=Number(a.duration());return Number.isFinite(f)?Math.max(0,f):null}catch{return null}},te=a=>typeof a=="number"&&Number.isFinite(a)&&a>l,H=a=>{let f=Number(a.getAttribute("data-duration"));if(Number.isFinite(f)&&f>0)return f;let p=Number(a.getAttribute("data-playback-start")??a.getAttribute("data-media-start")??"0"),C=Number.isFinite(p)?Math.max(0,p):0;return Number.isFinite(a.duration)&&a.duration>C?Math.max(0,a.duration-C):null},q=()=>{let a=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(a.length===0)return null;let f=0;for(let p of a){let C=v(p,0);if(!Number.isFinite(C))continue;let y=H(p);y==null||y<=l||(f=Math.max(f,Math.max(0,C)+y))}return f>l?f:null},N=()=>{let a=q();return typeof a!="number"||!Number.isFinite(a)||a<=l?null:a},F=a=>te(a)?Math.max(l,a*x):l,T=(a,f=0)=>{let p=U(a),C=N(),y=Number.isFinite(f)&&f>l?f:0,Z=0;te(p)?Z=Math.max(p,y):te(C)?Z=Math.max(C,y):Z=y;let se=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,se)):0},W=()=>{let a=window.__timelines??{},f=Ce({timelineRegistry:a}),p=N(),C=F(p),y=K=>{let z=document.querySelector(`[data-composition-id="${CSS.escape(K)}"]`);return z?f.resolveStartForElement(z,0):0},Z=K=>{let z=window.gsap;if(!z||typeof z.timeline!="function")return null;let J=z.timeline({paused:!0});for(let G of K)J.add(G.timeline,y(G.compositionId));return J},se=(K,z)=>{if(!te(K))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let G=J.timeline({paused:!0});if(z)try{G.add(z,0)}catch{}let Y=G;if(typeof Y.to=="function")try{Y.to({},{duration:K})}catch{}return G},Ee=(K,z)=>{let J=K;if(typeof J.getChildren!="function")return[];try{let G=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(G))return[];let Y=[];for(let oe of z)if(!G.some(Ae=>Ae===oe.timeline))try{let Ae=y(oe.compositionId);K.add(oe.timeline,Ae),Y.push(oe.compositionId)}catch{}return Y}catch{return[]}},ne=S(),ee=ne?.getAttribute("data-composition-id")??null;if(!ee)return{timeline:null};let ae=a[ee]??null,ie=(()=>{if(!ne)return[];let K=new Set,z=Array.from(ne.querySelectorAll("[data-composition-id]")),J=[];for(let G of z){let Y=G.getAttribute("data-composition-id");if(!Y||Y===ee||K.has(Y))continue;K.add(Y);let oe=a[Y]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Me=U(oe);J.push({compositionId:Y,timeline:oe,durationSeconds:Me??0})}return J})(),de=K=>{for(let z of K){let J=z.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ie.length>0&&de(ie),ae){let K=ie.length>0?Ee(ae,ie):[];if((ie.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+ee+"'])"))&&(R=!0),K.length>0)try{let G=ae.time();ae.seek(G,!1)}catch{}let z=U(ae);if(!te(z)&&ie.length>0){let G=ie.map(xn=>xn.compositionId),Y=Z(ie),oe=U(Y);if(Y&&te(oe))return{timeline:Y,selectedTimelineIds:G,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:C,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,selectedTimelineIds:G,autoNestedChildren:K}}};let Me=se(p??0,ae),Ae=U(Me);if(Me&&te(Ae))return{timeline:Me,selectedTimelineIds:[ee],selectedDurationSeconds:Ae,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Ae,selectedTimelineIds:[ee],autoNestedChildren:K}}}}if(!te(z)&&ie.length===0){let G=se(p??0,ae),Y=U(G);if(G&&te(Y))return{timeline:G,selectedTimelineIds:[ee],selectedDurationSeconds:Y,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Y,selectedTimelineIds:[ee]}}}}let J=ne?.getAttribute("data-duration");if(J){let G=parseFloat(J);if(te(G)&&te(z)&&G>=z+.5){let Y=ae;if(typeof Y.to=="function")try{Y.to({},{duration:0},G)}catch{}let oe=U(ae);if(te(oe))return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:ee,rootDurationSeconds:z,rootDeclaredDur:G,newDur:oe}}}}}return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:z,mediaDurationFloorSeconds:p,diagnostics:K.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:ee,selectedDurationSeconds:z,autoNestedChildren:K}}:void 0}}if(ie.length>0){let K=ie.map(G=>G.compositionId),z=Z(ie),J=U(z);if(z)return{timeline:z,selectedTimelineIds:K,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:ee,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:C,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,selectedTimelineIds:K}}}}return{timeline:null}},Q=()=>{let a=e.capturedTimeline;if(!a||typeof a.time!="function")return;let f=Number(a.time());Number.isFinite(f)&&(e.currentTime=Math.max(0,f))},R=!1,P=()=>{if(!L)return!1;let a=e.capturedTimeline,f=U(a),p=te(f);if(a&&p&&R)return!1;let C=W();return C.timeline?a&&a===C.timeline?(typeof a.timeScale=="function"&&a.timeScale(e.playbackRate),!1):(e.capturedTimeline=C.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),C.diagnostics&&ue({source:"hf-preview",type:"diagnostic",code:C.diagnostics.code,details:C.diagnostics.details}),ue({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:C.selectedTimelineIds??[],selectedDurationSeconds:C.selectedDurationSeconds??null,mediaDurationFloorSeconds:C.mediaDurationFloorSeconds??null}}),!0):!1},O=()=>{let a=S();if(!(a instanceof HTMLElement))return;let f=a.getBoundingClientRect(),p=Number(a.getAttribute("data-width")),C=Number(a.getAttribute("data-height")),y=window.getComputedStyle(a),Z=Number.isFinite(p)&&p>0&&Number.isFinite(C)&&C>0,se=f.width<=0||f.height<=0||a.clientWidth<=0||a.clientHeight<=0;!Z||!se||u("root_stage_layout_zero",{compositionId:a.getAttribute("data-composition-id")??null,declaredWidth:p,declaredHeight:C,rectWidth:Math.round(f.width),rectHeight:Math.round(f.height),clientWidth:a.clientWidth,clientHeight:a.clientHeight,display:y.display,visibility:y.visibility,overflow:y.overflow},`root-stage-layout-zero:${a.getAttribute("data-composition-id")??"unknown"}`)},fe=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,O()}))},le=()=>{n=a=>{let f=$(a.error??a.message).slice(0,B);if(!f)return;let p=g(f);ue({source:"hf-preview",type:"diagnostic",code:p.code,details:{category:p.category,message:f,filename:a.filename||null,line:Number.isFinite(a.lineno)?a.lineno:null,column:Number.isFinite(a.colno)?a.colno:null}})},r=a=>{let f=$(a.reason).slice(0,B);if(!f)return;let p=g(f);ue({source:"hf-preview",type:"diagnostic",code:`${p.code}_unhandled_rejection`,details:{category:`${p.category}-unhandled-rejection`,message:f}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",r)},Te=()=>{let a=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let p of a){let C=()=>{if(!(p instanceof Element))return;let y=p.tagName.toLowerCase(),Z=p.getAttribute("src")??p.getAttribute("href")??p.getAttribute("poster")??null,se=y==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";u(se,{tagName:y,assetUrl:Z,currentSrc:(p instanceof HTMLImageElement||p instanceof HTMLMediaElement)&&p.currentSrc||null,readyState:p instanceof HTMLMediaElement?p.readyState:null,networkState:p instanceof HTMLMediaElement?p.networkState:null},`${se}:${y}:${Z??"unknown"}`)};p.addEventListener("error",C),m(()=>{p.removeEventListener("error",C)})}let f=document.fonts;f&&f.ready.then(()=>{if(e.tornDown)return;let p=Array.from(f).filter(C=>C.status==="error").map(C=>C.family).filter(C=>!!C).slice(0,10);p.length!==0&&u("runtime_font_load_issue",{failedFamilies:p,totalFaces:Array.from(f).length},`runtime-font-load-issue:${p.join("|")}`)}).catch(()=>{})},pe=(a,f)=>{if(!a.timeline)return!1;let p=e.capturedTimeline;if(p&&p===a.timeline)return!1;let C=Math.max(0,e.currentTime||0),y=e.isPlaying;e.capturedTimeline=a.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(C,!1),y&&e.capturedTimeline.play()}catch{}return ue({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:f,previousTime:C,selectedTimelineIds:a.selectedTimelineIds??[],selectedDurationSeconds:a.selectedDurationSeconds??null,mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),!0},Ne=null,ct=!1,Oe=new Set,_e=()=>{e.tornDown||(Ne!=null&&window.clearTimeout(Ne),Ne=window.setTimeout(()=>{if(e.tornDown)return;Ne=null;let a=W();if(!a.timeline||!te(a.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){P()&&(ye(),ge(!0));return}if(ct)return;let p=U(e.capturedTimeline),C=a.selectedDurationSeconds??U(a.timeline);te(C)&&(!te(p)||C>=p+j)&&pe(a,"manual")&&(ct=!0,ue({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:p??null,selectedDurationSeconds:C??null,selectedTimelineIds:a.selectedTimelineIds??[],mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),ye(),ge(!0))},V))},cn=()=>{for(let a of Oe)a.removeEventListener("loadedmetadata",_e),a.removeEventListener("durationchange",_e);Oe.clear()},Ke=()=>{if(e.tornDown)return;let a=Array.from(document.querySelectorAll("video, audio"));for(let f of a)Oe.has(f)||(Oe.add(f),f.addEventListener("loadedmetadata",_e),f.addEventListener("durationchange",_e),f.preload!=="auto"&&(f.preload="auto"),f.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&f.load())},dt=()=>{let a=bt({resolveStartSeconds:C=>v(C,0)});Mt({clips:a.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate});let f=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,p=Array.from(document.querySelectorAll("[data-start]"));for(let C of p){if(!(C instanceof HTMLElement))continue;let y=C.tagName.toLowerCase();if(y==="script"||y==="style"||y==="link"||y==="meta")continue;if(!C.getAttribute("data-composition-id")){let de=C.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(de&&de!==f)continue}let se=v(C,0),Ee=_(C),ne=Ee!=null&&Ee>0?se+Ee:Number.POSITIVE_INFINITY,ee=ne,ae=C.getAttribute("data-composition-id");if(ae&&!Number.isFinite(ne)){let ie=(window.__timelines??{})[ae];if(ie&&typeof ie.duration=="function"){let de=ie.duration();de>0&&(ee=se+de)}}let Ze=e.currentTime>=se&&(Number.isFinite(ee)?e.currentTime<ee:!0);C.style.visibility=Ze?"visible":"hidden"}},ge=a=>{Q();let f=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),p=Date.now();(a||f!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||p-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=f,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=p,ue({source:"hf-preview",type:"state",frame:f,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ye=()=>{b(),A(),E();let a=S();if(a){let p=d(a.getAttribute("data-width")),C=d(a.getAttribute("data-height")),y=p?parseInt(p,10):0,Z=C?parseInt(C,10):0;y>0&&Z>0&&ue({source:"hf-preview",type:"stage-size",width:y,height:Z})}P();let f=Bt({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=f,ue(f),fe()},we=(a,f=0)=>{for(let p of e.deterministicAdapters){try{a==="discover"&&p.discover(),a==="pause"&&p.pause(),a==="play"&&p.play&&p.play()}catch{}if(a==="discover")try{p.seek({time:f})}catch{}}};if(L)tt();else{let a={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:d,onDiagnostic:({code:f,details:p})=>{ue({source:"hf-preview",type:"diagnostic",code:f,details:p})}};It(a).then(()=>Rt(a)).finally(()=>{L=!0,we("discover",e.currentTime),Ke(),Te(),tt(),ye(),ge(!0)})}let We=Ct({postMessage:a=>ue(a)});We.installPickerApi();let mt=a=>{let f=Number(a);!Number.isFinite(f)||f<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,f)),e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let p=document.querySelectorAll("video, audio");for(let C of p)if(C instanceof HTMLMediaElement)try{C.playbackRate=e.playbackRate}catch{}},re=Lt({getTimeline:()=>e.capturedTimeline,setTimeline:a=>{e.capturedTimeline=a},getIsPlaying:()=>e.isPlaying,setIsPlaying:a=>{e.isPlaying=a},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:mt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(a,f)=>{e.currentTime=Math.max(0,Number(a)||0),e.isPlaying=f,dt()},onStatePost:ge,onDeterministicSeek:a=>{for(let f of e.deterministicAdapters)try{f.seek({time:Number(a)||0})}catch{}},onDeterministicPause:()=>we("pause"),onDeterministicPlay:()=>we("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>T(e.capturedTimeline,0)});window.__player=s(re),window.__playerReady=!0,window.__renderReady=!0,ht(ue),Be("composition_loaded",{duration:re.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=pt({onPlay:()=>{re.play(),Be("composition_played",{time:re.getTime()})},onPause:()=>{re.pause(),Be("composition_paused",{time:re.getTime()})},onSeek:(a,f)=>{let p=Math.max(0,a)/e.canonicalFps;re.seek(p),Be("composition_seeked",{time:p})},onSetMuted:a=>{e.bridgeMuted=a;let f=document.querySelectorAll("video, audio");for(let p of f)p instanceof HTMLMediaElement&&(p.muted=a)},onSetPlaybackRate:a=>mt(a),onEnablePickMode:()=>We.enablePickMode(),onDisablePickMode:()=>We.disablePickMode()}),P(),e.capturedTimeline&&(re._timeline=e.capturedTimeline),L&&setTimeout(()=>{let a=e.capturedTimeline;P()&&e.capturedTimeline!==a&&(re._timeline=e.capturedTimeline),we("discover",e.currentTime),ye(),ge(!0)},0),e.deterministicAdapters=[gt({resolveStartSeconds:a=>v(a,0)}),yt(),Et(),At(),St({getTimeline:()=>e.capturedTimeline})],le(),we("discover"),Ke(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let Ve=0,He=null,xt=0,Je=!1,be=0,ft=()=>{xt=Date.now(),Je=!1,be=0};e.timelinePollIntervalId=setInterval(()=>{Ve+=1;let f=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<w?!1:P();if(e.capturedTimeline&&!re._timeline&&(re._timeline=e.capturedTimeline),(f||Ve%20===0)&&ye(),Ve%10===0&&Ke(),Q(),e.isPlaying&&e.capturedTimeline){let p=Math.max(0,e.currentTime||0),C=He,y=T(e.capturedTimeline,0);if(y>0&&p>=y){re.pause(),re.seek(y),He=y,be=0,ge(!0);return}if(C!=null&&C>=h&&p<=M?be+=1:be=0,!Je&&be>=k&&Date.now()-xt>D){let se=W();pe(se,"loop_guard")&&(Je=!0,be=0)}He=Math.max(0,e.currentTime||0)}else He=Math.max(0,e.currentTime||0);e.isPlaying&&dt(),ge(!1)},50),ye(),ge(!0);let dn=re.seek;re.seek=a=>{ft(),dn(a)};let mn=re.renderSeek;re.renderSeek=a=>{ft(),mn(a)};let Qe=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),Ne!=null&&(window.clearTimeout(Ne),Ne=null),c!=null&&(window.cancelAnimationFrame(c),c=null),cn(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),n&&(window.removeEventListener("error",n),n=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),We.disablePickMode();for(let a of e.deterministicAdapters)if(!(!a||typeof a.revert!="function"))try{a.revert()}catch{}e.deterministicAdapters=[];for(let a of o.splice(0))try{a()}catch{}for(let a of e.injectedCompStyles)try{a.remove()}catch{}e.injectedCompStyles=[];for(let a of e.injectedCompScripts)try{a.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===Qe&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=Qe,e.beforeUnloadHandler=Qe,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var Ot=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],nt=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Nn(e){if(e<=255)return Ot[e];let t=0,n=nt.length-1;for(;t<=n;){let r=t+n>>1,o=nt[r];if(e<o[0]){n=r-1;continue}if(e>o[1]){t=r+1;continue}return o[2]}return"L"}function En(e){let t=e.length;if(t===0)return null;let n=new Array(t),r=!1;for(let s=0;s<t;){let l=e.charCodeAt(s),x=l,h=1;if(l>=55296&&l<=56319&&s+1<t){let D=e.charCodeAt(s+1);D>=56320&&D<=57343&&(x=(l-55296<<10)+(D-56320)+65536,h=2)}let M=Nn(x);(M==="R"||M==="AL"||M==="AN")&&(r=!0);for(let D=0;D<h;D++)n[s+D]=M;s+=h}if(!r)return null;let o=0;for(let s=0;s<t;s++){let l=n[s];if(l==="L"){o=0;break}if(l==="R"||l==="AL"){o=1;break}}let i=new Int8Array(t);for(let s=0;s<t;s++)i[s]=o;let c=o&1?"R":"L",m=c,u=m;for(let s=0;s<t;s++)n[s]==="NSM"?n[s]=u:u=n[s];u=m;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="AL"?"AN":"EN":(l==="R"||l==="L"||l==="AL")&&(u=l)}for(let s=0;s<t;s++)n[s]==="AL"&&(n[s]="R");for(let s=1;s<t-1;s++)n[s]==="ES"&&n[s-1]==="EN"&&n[s+1]==="EN"&&(n[s]="EN"),n[s]==="CS"&&(n[s-1]==="EN"||n[s-1]==="AN")&&n[s+1]===n[s-1]&&(n[s]=n[s-1]);for(let s=0;s<t;s++){if(n[s]!=="EN")continue;let l;for(l=s-1;l>=0&&n[l]==="ET";l--)n[l]="EN";for(l=s+1;l<t&&n[l]==="ET";l++)n[l]="EN"}for(let s=0;s<t;s++){let l=n[s];(l==="WS"||l==="ES"||l==="ET"||l==="CS")&&(n[s]="ON")}u=m;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="L"?"L":"EN":(l==="R"||l==="L")&&(u=l)}for(let s=0;s<t;s++){if(n[s]!=="ON")continue;let l=s+1;for(;l<t&&n[l]==="ON";)l++;let x=s>0?n[s-1]:m,h=l<t?n[l]:m,M=x!=="L"?"R":"L";if(M===(h!=="L"?"R":"L"))for(let k=s;k<l;k++)n[k]=M;s=l-1}for(let s=0;s<t;s++)n[s]==="ON"&&(n[s]=c);for(let s=0;s<t;s++){let l=n[s];(i[s]&1)===0?l==="R"?i[s]++:(l==="AN"||l==="EN")&&(i[s]+=2):(l==="L"||l==="AN"||l==="EN")&&i[s]++}return i}function _t(e,t){let n=En(e);if(n===null)return null;let r=new Int8Array(t.length);for(let o=0;o<t.length;o++)r[o]=n[t[o]];return r}var An=/[ \t\n\r\f]+/g,yn=/[\t\n\r\f]| {2,}|^ | $/;function bn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Mn(e){if(!yn.test(e))return e;let t=e.replace(An," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Cn(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
`).replace(/[\r\f]/g,`
`):e.replace(/\r\n/g,`
`)}var it=null,Dn;function kn(){return it===null&&(it=new Intl.Segmenter(Dn,{granularity:"word"})),it}var Ln=/\p{Script=Arabic}/u,ze=/\p{M}/u,$t=/\p{Nd}/u;function Wt(e){return Ln.test(e)}function Ht(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function xe(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){let o=(n-55296<<10)+(r-56320)+65536;if(Ht(o))return!0;t++;continue}}if(Ht(n))return!0}}return!1}function Tn(e){let t=qe(e);return t!==null&&(Ue.has(t)||Se.has(t))}var wn=new Set(["\xA0","\u202F","\u2060","\uFEFF"]);function Bn(e){return xe(e)}function vn(e){let t=qe(e);return t!==null&&wn.has(t)}function Ge(e){return!Tn(e)&&!vn(e)}var Ue=new Set(["\uFF0C","\uFF0E","\uFF01","\uFF1A","\uFF1B","\uFF1F","\u3001","\u3002","\u30FB","\uFF09","\u3015","\u3009","\u300B","\u300D","\u300F","\u3011","\u3017","\u3019","\u301B","\u30FC","\u3005","\u303B","\u309D","\u309E","\u30FD","\u30FE"]),Pe=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),rt=new Set(["'","\u2019"]),Se=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),Rn=new Set([":",".","\u060C","\u061B"]),In=new Set(["\u104F"]),Pn=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function On(e){if(st(e))return!0;let t=!1;for(let n of e){if(Se.has(n)){t=!0;continue}if(!(t&&ze.test(n)))return!1}return t}function _n(e){for(let t of e)if(!Ue.has(t)&&!Se.has(t))return!1;return e.length>0}function Wn(e){if(st(e))return!0;for(let t of e)if(!Pe.has(t)&&!rt.has(t)&&!ze.test(t))return!1;return e.length>0}function st(e){let t=!1;for(let n of e)if(!(n==="\\"||ze.test(n))){if(Pe.has(n)||Se.has(n)||rt.has(n)){t=!0;continue}return!1}return t}function Kt(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let o=n-1;if(o<0)return n;let i=e.charCodeAt(o);return i>=55296&&i<=56319?o:n}function qe(e){if(e.length===0)return null;let t=Kt(e,e.length);return e.slice(t)}function Hn(e){let t=Array.from(e),n=t.length;for(;n>0;){let r=t[n-1];if(ze.test(r)){n--;continue}if(Pe.has(r)||rt.has(r)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function jn(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\u2014"?e:null}function jt(e,t,n,r){let o=t[r],i=e[r];if(o==null)return i;let c=n[r];if(i.length===c)return i;let m=o.repeat(c);return e[r]=m,m}function zt(e,t){return e&&t!==null&&Rn.has(t)}function zn(e){let t=qe(e);return t!==null&&In.has(t)}function Gn(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function $e(e){let t=e.length;for(;t>0;){let n=Kt(e,t),r=e.slice(n,t);if(Pn.has(r))return!0;if(!Se.has(r))return!1;t=n}return!1}function Un(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e==="	")return"tab";if(t.preserveHardBreaks&&e===`
`)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var qn=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function me(e){return e.length===1?e[0]:e.join("")}function $n(e,t){let n=[];for(let r=e.length-1;r>=0;r--)n.push(e[r]);return n.push(t),me(n)}function Kn(e,t,n,r){if(!qn.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let o=[],i=null,c=[],m=n,u=!1,s=0;for(let l of e){let x=Un(l,r),h=x==="text"&&t;if(i!==null&&x===i&&h===u){c.push(l),s+=l.length;continue}i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:m}),i=x,c=[l],m=n+s,u=h,s+=l.length}return i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:m}),o}function ot(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Vn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Jn(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Vn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Qn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Zn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let c=0;c<e.len;c++){if(r[c]!=="text"||!Jn(e,c))continue;let m=[t[c]],u=c+1;for(;u<e.len&&!ot(r[u]);){m.push(t[u]),n[c]=!0;let s=t[u].includes("?");if(r[u]="text",t[u]="",u++,s)break}t[c]=me(m)}let i=0;for(let c=0;c<t.length;c++){let m=t[c];m.length!==0&&(i!==c&&(t[i]=m,n[i]=n[c],r[i]=r[c],o[i]=o[c]),i++)}return t.length=i,n.length=i,r.length=i,o.length=i,{len:i,texts:t,isWordLike:n,kinds:r,starts:o}}function Yn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i]),!Qn(c))continue;let m=i+1;if(m>=e.len||ot(e.kinds[m]))continue;let u=[],s=e.starts[m],l=m;for(;l<e.len&&!ot(e.kinds[l]);)u.push(e.texts[l]),l++;u.length>0&&(t.push(me(u)),n.push(!0),r.push("text"),o.push(s),i=l-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}var Xn=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),Gt=/^[A-Za-z0-9_]+[,:;]*$/,Ut=/[,:;]+$/;function Vt(e){for(let t of e)if($t.test(t))return!0;return!1}function Ie(e){if(e.length===0)return!1;for(let t of e)if(!($t.test(t)||Xn.has(t)))return!1;return!0}function ei(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],m=e.kinds[i];if(m==="text"&&Ie(c)&&Vt(c)){let u=[c],s=i+1;for(;s<e.len&&e.kinds[s]==="text"&&Ie(e.texts[s]);)u.push(e.texts[s]),s++;t.push(me(u)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=s-1;continue}t.push(c),n.push(e.isWordLike[i]),r.push(m),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ti(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],m=e.kinds[i],u=e.isWordLike[i];if(m==="text"&&u&&Gt.test(c)){let s=[c],l=Ut.test(c),x=i+1;for(;l&&x<e.len&&e.kinds[x]==="text"&&e.isWordLike[x]&&Gt.test(e.texts[x]);){let h=e.texts[x];s.push(h),l=Ut.test(h),x++}t.push(me(s)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=x-1;continue}t.push(c),n.push(u),r.push(m),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ni(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(e.kinds[i]==="text"&&c.includes("-")){let m=c.split("-"),u=m.length>1;for(let s=0;s<m.length;s++){let l=m[s];if(!u)break;(l.length===0||!Vt(l)||!Ie(l))&&(u=!1)}if(u){let s=0;for(let l=0;l<m.length;l++){let x=m[l],h=l<m.length-1?`${x}-`:x;t.push(h),n.push(!0),r.push("text"),o.push(e.starts[i]+s),s+=h.length}continue}}t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ii(e){let t=[],n=[],r=[],o=[],i=0;for(;i<e.len;){let c=[e.texts[i]],m=e.isWordLike[i],u=e.kinds[i],s=e.starts[i];if(u==="glue"){let l=[c[0]],x=s;for(i++;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let h=me(l);if(i<e.len&&e.kinds[i]==="text")c[0]=h,c.push(e.texts[i]),m=e.isWordLike[i],u="text",s=x,i++;else{t.push(h),n.push(!1),r.push("glue"),o.push(x);continue}}else i++;if(u==="text")for(;i<e.len&&e.kinds[i]==="glue";){let l=[];for(;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let x=me(l);if(i<e.len&&e.kinds[i]==="text"){c.push(x,e.texts[i]),m=m||e.isWordLike[i],i++;continue}c.push(x)}t.push(me(c)),n.push(m),r.push(u),o.push(s)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function oi(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let i=0;i<t.length-1;i++){if(r[i]!=="text"||r[i+1]!=="text"||!xe(t[i])||!xe(t[i+1]))continue;let c=Hn(t[i]);c!==null&&(t[i]=c.head,t[i+1]=c.tail+t[i+1],o[i+1]=o[i]+c.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function qt(e,t,n){let r=kn(),o=0,i=[],c=[],m=[],u=[],s=[],l=[],x=[],h=[],M=[],D=[],k=[],w=[];for(let d of r.segment(e))for(let S of Kn(d.segment,d.isWordLike??!1,d.index,n)){let U=function(){l[L]!==null&&(c[L]=[jt(i,l,x,L)],l[L]=null),c[L].push(S.text),m[L]=m[L]||S.isWordLike,h[L]=h[L]||E,M[L]=M[L]||v,D[L]=I,k[L]=X,w[L]=zt(M[L],_)},A=S.kind==="text",b=jn(S.text,S.isWordLike,S.kind),E=xe(S.text),v=Wt(S.text),_=qe(S.text),I=$e(S.text),X=zn(S.text),L=o-1;t.carryCJKAfterClosingQuote&&A&&o>0&&u[L]==="text"&&E&&h[L]&&D[L]||A&&o>0&&u[L]==="text"&&_n(S.text)&&h[L]||A&&o>0&&u[L]==="text"&&k[L]?U():A&&o>0&&u[L]==="text"&&S.isWordLike&&v&&w[L]?(U(),m[L]=!0):b!==null&&o>0&&u[L]==="text"&&l[L]===b?x[L]=(x[L]??1)+1:A&&!S.isWordLike&&o>0&&u[L]==="text"&&(On(S.text)||S.text==="-"&&m[L])?U():(i[o]=S.text,c[o]=[S.text],m[o]=S.isWordLike,u[o]=S.kind,s[o]=S.start,l[o]=b,x[o]=b===null?0:1,h[o]=E,M[o]=v,D[o]=I,k[o]=X,w[o]=zt(v,_),o++)}for(let d=0;d<o;d++){if(l[d]!==null){i[d]=jt(i,l,x,d);continue}i[d]=me(c[d])}for(let d=1;d<o;d++)u[d]==="text"&&!m[d]&&st(i[d])&&u[d-1]==="text"&&(i[d-1]+=i[d],m[d-1]=m[d-1]||m[d],i[d]="");let j=Array.from({length:o},()=>null),V=-1;for(let d=o-1;d>=0;d--){let S=i[d];if(S.length!==0){if(u[d]==="text"&&!m[d]&&Wn(S)&&V>=0&&u[V]==="text"){let A=j[V]??[];A.push(S),j[V]=A,s[V]=s[d],i[d]="";continue}V=d}}for(let d=0;d<o;d++){let S=j[d];S!=null&&(i[d]=$n(S,i[d]))}let B=0;for(let d=0;d<o;d++){let S=i[d];S.length!==0&&(B!==d&&(i[B]=S,m[B]=m[d],u[B]=u[d],s[B]=s[d]),B++)}i.length=B,m.length=B,u.length=B,s.length=B;let $=ii({len:B,texts:i,isWordLike:m,kinds:u,starts:s}),g=oi(ti(ni(ei(Yn(Zn($))))));for(let d=0;d<g.len-1;d++){let S=Gn(g.texts[d]);S!==null&&(g.kinds[d]!=="space"&&g.kinds[d]!=="preserved-space"||g.kinds[d+1]!=="text"||!Wt(g.texts[d+1])||(g.texts[d]=S.space,g.isWordLike[d]=!1,g.kinds[d]=g.kinds[d]==="preserved-space"?"preserved-space":"space",g.texts[d+1]=S.marks+g.texts[d+1],g.starts[d+1]=g.starts[d]+S.space.length))}return g}function ri(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let o=0;o<e.len;o++)e.kinds[o]==="hard-break"&&(n.push({startSegmentIndex:r,endSegmentIndex:o,consumedEndSegmentIndex:o+1}),r=o+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function si(e){if(e.len<=1)return e;let t=[],n=[],r=[],o=[],i=null,c=!1,m=0,u=!1,s=!1;function l(){i!==null&&(t.push(me(i)),n.push(c),r.push("text"),o.push(m),i=null)}for(let x=0;x<e.len;x++){let h=e.texts[x],M=e.kinds[x],D=e.isWordLike[x],k=e.starts[x];if(M==="text"){let w=Bn(h),j=Ge(h);if(i!==null&&u&&s){i.push(h),c=c||D,u=u||w,s=j;continue}l(),i=[h],c=D,m=k,u=w,s=j;continue}l(),t.push(h),n.push(D),r.push(M),o.push(k)}return l(),{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Jt(e,t,n="normal",r="normal"){let o=bn(n),i=o.mode==="pre-wrap"?Cn(e):Mn(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let c=r==="keep-all"?si(qt(i,t,o)):qt(i,t,o);return{normalized:i,chunks:ri(c,o),...c}}var De=null,Qt=new Map,ke=null,ai=96,li=/\p{Emoji_Presentation}/u,ui=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,at=null,Zt=new Map;function lt(){if(De!==null)return De;if(typeof OffscreenCanvas<"u")return De=new OffscreenCanvas(1,1).getContext("2d"),De;if(typeof document<"u")return De=document.createElement("canvas").getContext("2d"),De;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function ci(e){let t=Qt.get(e);return t||(t=new Map,Qt.set(e,t)),t}function he(e,t){let n=t.get(e);return n===void 0&&(n={width:lt().measureText(e).width,containsCJK:xe(e)},t.set(e,n)),n}function Le(){if(ke!==null)return ke;if(typeof navigator>"u")return ke={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ke;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),r=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return ke={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:r,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},ke}function di(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function Yt(){return at===null&&(at=new Intl.Segmenter(void 0,{granularity:"grapheme"})),at}function mi(e){return li.test(e)||e.includes("\uFE0F")}function Xt(e){return ui.test(e)}function xi(e,t){let n=Zt.get(e);if(n!==void 0)return n;let r=lt();r.font=e;let o=r.measureText("\u{1F600}").width;if(n=0,o>t+.5&&typeof document<"u"&&document.body!==null){let i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="\u{1F600}",document.body.appendChild(i);let c=i.getBoundingClientRect().width;document.body.removeChild(i),o-c>.5&&(n=o-c)}return Zt.set(e,n),n}function fi(e){let t=0,n=Yt();for(let r of n.segment(e))mi(r.segment)&&t++;return t}function pi(e,t){return t.emojiCount===void 0&&(t.emojiCount=fi(e)),t.emojiCount}function Fe(e,t,n){return n===0?t.width:t.width-pi(e,t)*n}function en(e,t,n,r,o){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let i=Yt(),c=[];for(let l of i.segment(e))c.push(l.segment);if(c.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(o==="sum-graphemes"){let l=[];for(let x of c){let h=he(x,n);l.push(Fe(x,h,r))}return t.breakableFitAdvances=l,t.breakableFitAdvances}if(o==="pair-context"||c.length>ai){let l=[],x=null,h=0;for(let M of c){let D=he(M,n),k=Fe(M,D,r);if(x===null)l.push(k);else{let w=x+M,j=he(w,n);l.push(Fe(w,j,r)-h)}x=M,h=k}return t.breakableFitAdvances=l,t.breakableFitAdvances}let m=[],u="",s=0;for(let l of c){u+=l;let x=he(u,n),h=Fe(u,x,r);m.push(h-s),s=h}return t.breakableFitAdvances=m,t.breakableFitAdvances}function tn(e,t){let n=lt();n.font=e;let r=ci(e),o=di(e),i=t?xi(e,o):0;return{cache:r,fontSize:o,emojiCorrection:i}}function hi(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function gi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Si(e,t,n,r,o){let i=0,c=t;for(;i<e.length;){let m=c+e[i];if((i+1<e.length?m+o:m)>n+r)break;c=m,i++}return{fitCount:i,fittedWidth:c}}function nn(e,t){return e.simpleLineWalkFastPath?on(e,t):rn(e,t)}function on(e,t,n){let{widths:r,kinds:o,breakableFitAdvances:i}=e;if(r.length===0)return 0;let m=Le().lineFitEpsilon,u=t+m,s=0,l=0,x=!1,h=0,M=0,D=0,k=0,w=-1,j=0;function V(){w=-1,j=0}function B(b=D,E=k,v=l){s++,n?.({startSegmentIndex:h,startGraphemeIndex:M,endSegmentIndex:b,endGraphemeIndex:E,width:v}),l=0,x=!1,V()}function $(b,E){x=!0,h=b,M=0,D=b+1,k=0,l=E}function g(b,E,v){x=!0,h=b,M=E,D=b,k=E+1,l=v}function d(b,E){if(!x){$(b,E);return}l+=E,D=b+1,k=0}function S(b,E){let v=i[b];for(let _=E;_<v.length;_++){let I=v[_];x?l+I>u?(B(),g(b,_,I)):(l+=I,D=b,k=_+1):g(b,_,I)}x&&D===b&&k===v.length&&(D=b+1,k=0)}let A=0;for(;A<r.length&&!(!x&&(A=hi(e,A),A>=r.length));){let b=r[A],E=o[A],v=E==="space"||E==="preserved-space"||E==="tab"||E==="zero-width-break"||E==="soft-hyphen";if(!x){b>t&&i[A]!==null?S(A,0):$(A,b),v&&(w=A+1,j=l-b),A++;continue}if(l+b>u){if(v){d(A,b),B(A+1,0,l-b),A++;continue}if(w>=0){if(D>w||D===w&&k>0){B();continue}B(w,0,j);continue}if(b>t&&i[A]!==null){B(),S(A,0),A++;continue}B();continue}d(A,b),v&&(w=A+1,j=l-b),A++}return x&&B(),s}function rn(e,t,n){if(e.simpleLineWalkFastPath)return on(e,t,n);let{widths:r,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:c,breakableFitAdvances:m,discretionaryHyphenWidth:u,tabStopAdvance:s,chunks:l}=e;if(r.length===0||l.length===0)return 0;let x=Le(),h=x.lineFitEpsilon,M=t+h,D=0,k=0,w=!1,j=0,V=0,B=0,$=0,g=-1,d=0,S=0,A=null;function b(){g=-1,d=0,S=0,A=null}function E(H=B,q=$,N=k){D++,n?.({startSegmentIndex:j,startGraphemeIndex:V,endSegmentIndex:H,endGraphemeIndex:q,width:N}),k=0,w=!1,b()}function v(H,q){w=!0,j=H,V=0,B=H+1,$=0,k=q}function _(H,q,N){w=!0,j=H,V=q,B=H,$=q+1,k=N}function I(H,q){if(!w){v(H,q);return}k+=q,B=H+1,$=0}function X(H,q,N,F){if(!q)return;let T=H==="tab"?0:o[N],W=H==="tab"?F:i[N];g=N+1,d=k-F+T,S=k-F+W,A=H}function L(H,q){let N=m[H];for(let F=q;F<N.length;F++){let T=N[F];w?k+T>M?(E(),_(H,F,T)):(k+=T,B=H,$=F+1):_(H,F,T)}w&&B===H&&$===N.length&&(B=H+1,$=0)}function U(H){if(A!=="soft-hyphen")return!1;let q=m[H];if(q==null)return!1;let{fitCount:N,fittedWidth:F}=Si(q,k,t,h,u);return N===0?!1:(k=F,B=H,$=N,b(),N===q.length?(B=H+1,$=0,!0):(E(H,N,F+u),L(H,N),!0))}function te(H){D++,n?.({startSegmentIndex:H.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:H.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),b()}for(let H=0;H<l.length;H++){let q=l[H];if(q.startSegmentIndex===q.endSegmentIndex){te(q);continue}w=!1,k=0,j=q.startSegmentIndex,V=0,B=q.startSegmentIndex,$=0,b();let N=q.startSegmentIndex;for(;N<q.endSegmentIndex;){let F=c[N],T=F==="space"||F==="preserved-space"||F==="tab"||F==="zero-width-break"||F==="soft-hyphen",W=F==="tab"?gi(k,s):r[N];if(F==="soft-hyphen"){w&&(B=N+1,$=0,g=N+1,d=k+u,S=k+u,A=F),N++;continue}if(!w){W>t&&m[N]!==null?L(N,0):v(N,W),X(F,T,N,W),N++;continue}if(k+W>M){let R=k+(F==="tab"?0:o[N]),P=k+(F==="tab"?W:i[N]);if(A==="soft-hyphen"&&x.preferEarlySoftHyphenBreak&&d<=M){E(g,0,S);continue}if(A==="soft-hyphen"&&U(N)){N++;continue}if(T&&R<=M){I(N,W),E(N+1,0,P),N++;continue}if(g>=0&&d<=M){if(B>g||B===g&&$>0){E();continue}let O=g;E(O,0,S),N=O;continue}if(W>t&&m[N]!==null){E(),L(N,0),N++;continue}E();continue}I(N,W),X(F,T,N,W),N++}if(w){let F=g===q.consumedEndSegmentIndex?S:k;E(q.consumedEndSegmentIndex,0,F)}}return D}var ut=null;function Fi(){return ut===null&&(ut=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ut}function Ni(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Ei(e,t){let n=[],r=[],o=0,i=!1,c=!1,m=!1;function u(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(""),start:o}),r=[],i=!1,c=!1,m=!1)}function s(x,h,M){r=[x],o=h,i=M,c=$e(x),m=Pe.has(x)}function l(x,h){r.push(x),i=i||h;let M=$e(x);x.length===1&&Se.has(x)?c=c||M:c=M,m=!1}for(let x of Fi().segment(e)){let h=x.segment,M=xe(h);if(r.length===0){s(h,x.index,M);continue}if(m||Ue.has(h)||Se.has(h)||t.carryCJKAfterClosingQuote&&M&&c){l(h,M);continue}if(!i&&!M){l(h,M);continue}u(),s(h,x.index,M)}return u(),n}function Ai(e){if(e.length<=1)return e;let t=[],n=[e[0].text],r=e[0].start,o=xe(e[0].text),i=Ge(e[0].text);function c(){t.push({text:n.length===1?n[0]:n.join(""),start:r})}for(let m=1;m<e.length;m++){let u=e[m],s=xe(u.text),l=Ge(u.text);if(o&&i){n.push(u.text),o=o||s,i=l;continue}c(),n=[u.text],r=u.start,o=s,i=l}return c(),t}function yi(e,t,n,r){let o=Le(),{cache:i,emojiCorrection:c}=tn(t,Xt(e.normalized)),m=Fe("-",he("-",i),c),s=Fe(" ",he(" ",i),c)*8;if(e.len===0)return Ni(n);let l=[],x=[],h=[],M=[],D=e.chunks.length<=1,k=n?[]:null,w=[],j=n?[]:null,V=Array.from({length:e.len});function B(S,A,b,E,v,_,I){v!=="text"&&v!=="space"&&v!=="zero-width-break"&&(D=!1),l.push(A),x.push(b),h.push(E),M.push(v),k?.push(_),w.push(I),j!==null&&j.push(S)}function $(S,A,b,E,v){let _=he(S,i),I=Fe(S,_,c),X=A==="space"||A==="preserved-space"||A==="zero-width-break"?0:I,L=A==="space"||A==="zero-width-break"?0:I;if(v&&E&&S.length>1){let U="sum-graphemes";Ie(S)?U="pair-context":o.preferPrefixWidthsForBreakableRuns&&(U="segment-prefixes");let te=en(S,_,i,c,U);B(S,I,X,L,A,b,te);return}B(S,I,X,L,A,b,null)}for(let S=0;S<e.len;S++){V[S]=l.length;let A=e.texts[S],b=e.isWordLike[S],E=e.kinds[S],v=e.starts[S];if(E==="soft-hyphen"){B(A,0,m,m,E,v,null);continue}if(E==="hard-break"){B(A,0,0,0,E,v,null);continue}if(E==="tab"){B(A,0,0,0,E,v,null);continue}let _=he(A,i);if(E==="text"&&_.containsCJK){let I=Ei(A,o),X=r==="keep-all"?Ai(I):I;for(let L=0;L<X.length;L++){let U=X[L];$(U.text,"text",v+U.start,b,r==="keep-all"||!xe(U.text))}continue}$(A,E,v,b,!0)}let g=bi(e.chunks,V,l.length),d=k===null?null:_t(e.normalized,k);return j!==null?{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:M,simpleLineWalkFastPath:D,segLevels:d,breakableFitAdvances:w,discretionaryHyphenWidth:m,tabStopAdvance:s,chunks:g,segments:j}:{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:M,simpleLineWalkFastPath:D,segLevels:d,breakableFitAdvances:w,discretionaryHyphenWidth:m,tabStopAdvance:s,chunks:g}}function bi(e,t,n){let r=[];for(let o=0;o<e.length;o++){let i=e[o],c=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n,m=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n,u=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:c,endSegmentIndex:m,consumedEndSegmentIndex:u})}return r}function Mi(e,t,n,r){let o=r?.wordBreak??"normal",i=Jt(e,Le(),r?.whiteSpace,o);return yi(i,t,n,o)}function sn(e,t,n){return Mi(e,t,!1,n)}function an(e,t,n){let r=nn(e,t);return{lineCount:r,height:r*n}}var Ci={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function ln(e,t){let n={...Ci,...t},r=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,c=sn(e,i),{lineCount:m}=an(c,n.maxWidth,o*r);if(m<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:ln};function un(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Pt())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",un,{once:!0}):un();})();

