{"version":3,"file":"PreloaderTargets.BUSExjgE.mjs","names":["useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/YTlIsrdOuezvtxeziAnL/nOocEHN7KwjnyK1UgDe9/PreloaderTargets.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";import{useIsStaticRenderer}from\"framer\";// Each override measures only the component it renders. The preloader receives\n// these snapshots through events and never searches or measures the page DOM.\nconst REQUEST=\"rv-preloader-request-v2\";const SNAPSHOT=\"rv-preloader-snapshot-v2\";const COMPLETE=\"rv-preloader-complete-v2\";const CSS=`html.rv-preloading .rv-pl-target { visibility: hidden !important; }`;function assignRef(ref,node){if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;}function measure(el,key,capture){const rect=el.getBoundingClientRect();if(!el.getClientRects().length||rect.width<=0||rect.height<=0)return;const style=window.getComputedStyle(el);let tx=0;let ty=0;const matrix=style.transform.match(/matrix(3d)?\\(([^)]+)\\)/);if(matrix){const values=matrix[2].split(\",\").map(Number);tx=values[matrix[1]?12:4]||0;ty=values[matrix[1]?13:5]||0;}const snapshot={key,left:rect.left-tx,top:rect.top-ty,liveLeft:rect.left,liveTop:rect.top,width:rect.width,height:rect.height,size:parseFloat(style.fontSize)||16,opacity:style.opacity};if(!capture)return snapshot;// Framer's native character effect translates its inner text wrappers.\n// Measure their settled layout rather than the moving animation offset.\nconst textBox=(node,box)=>{let x=0;let y=0;let parent=node.parentElement;while(parent&&parent!==el){const transform=window.getComputedStyle(parent).transform;const matrix=transform.match(/matrix(3d)?\\(([^)]+)\\)/);if(matrix){const values=matrix[2].split(\",\").map(Number);x+=values[matrix[1]?12:4]||0;y+=values[matrix[1]?13:5]||0;}parent=parent.parentElement;}return{left:box.left-x,right:box.right-x,top:box.top-y,bottom:box.bottom-y,width:box.width,height:box.height};};// Ranges give the text's native font box; Canvas supplies its ink ascent\n// and descent. Their difference preserves each font's optical top even\n// when Chuner and Hatton use different line-box metrics.\nconst canvas=document.createElement(\"canvas\");const context=canvas.getContext(\"2d\");const range=document.createRange();let inkTop=Infinity;let inkBottom=-Infinity;const readInk=node=>{if(node.nodeType===Node.TEXT_NODE&&node.textContent?.trim()&&node.parentElement&&context){const textStyle=window.getComputedStyle(node.parentElement);const text=textStyle.textTransform===\"uppercase\"?node.textContent.toUpperCase():textStyle.textTransform===\"lowercase\"?node.textContent.toLowerCase():node.textContent;context.font=`${textStyle.fontStyle} ${textStyle.fontWeight} ${textStyle.fontSize} ${textStyle.fontFamily}`;const metrics=context.measureText(text);range.selectNodeContents(node);const box=textBox(node,range.getBoundingClientRect());const ascent=metrics.fontBoundingBoxAscent??metrics.actualBoundingBoxAscent;const descent=metrics.fontBoundingBoxDescent??metrics.actualBoundingBoxDescent;const baseline=box.top+(box.height-ascent-descent)/2+ascent;inkTop=Math.min(inkTop,baseline-metrics.actualBoundingBoxAscent-rect.top);inkBottom=Math.max(inkBottom,baseline+metrics.actualBoundingBoxDescent-rect.top);}for(const child of Array.from(node.childNodes))readInk(child);};readInk(el);if(Number.isFinite(inkTop)&&inkBottom>inkTop){snapshot.inkTop=inkTop;snapshot.inkHeight=inkBottom-inkTop;}// Measure character boundaries in the intact run. The reveal uses clipped\n// copies of this run, so its kerning and ligatures never change.\nconst letters=[];const readLetters=node=>{if(node.nodeType===Node.TEXT_NODE&&node.textContent){let offset=0;for(const character of Array.from(node.textContent)){const end=offset+character.length;range.setStart(node,offset);range.setEnd(node,end);const box=textBox(node,range.getBoundingClientRect());if(character.trim()&&box.width>0&&box.height>0){letters.push({left:box.left-rect.left,right:box.right-rect.left,top:box.top-rect.top,bottom:box.bottom-rect.top});}offset=end;}}for(const child of Array.from(node.childNodes))readLetters(child);};readLetters(el);snapshot.letters=letters;// Preserve the entire text run, including its p/span structure, natural\n// baseline, kerning and ligatures. Splitting Chuner Demo into glyphs changes\n// its shaping and makes the final handoff look like the logo breaks apart.\nconst clone=el.cloneNode(true);const copyStyles=(source,copy)=>{const computed=window.getComputedStyle(source);const inline=copy.style;copy.removeAttribute(\"id\");copy.removeAttribute(\"class\");copy.removeAttribute(\"autofocus\");copy.setAttribute(\"aria-hidden\",\"true\");copy.setAttribute(\"tabindex\",\"-1\");if(inline){for(let i=0;i<computed.length;i++){const property=computed.item(i);if(property.startsWith(\"animation\")||property.startsWith(\"transition\"))continue;inline.setProperty(property,computed.getPropertyValue(property));}// Snapshots depict the final native text-effect state. The\n// preloader runs its own character reveal over this exact layout.\nif(source!==el){inline.setProperty(\"transform\",\"none\",\"important\");inline.setProperty(\"translate\",\"none\",\"important\");inline.setProperty(\"opacity\",\"1\",\"important\");inline.setProperty(\"filter\",\"none\",\"important\");}// Visibility is inherited from the deliberately hidden live layer.\ninline.setProperty(\"visibility\",\"visible\",\"important\");inline.setProperty(\"animation\",\"none\",\"important\");inline.setProperty(\"transition\",\"none\",\"important\");inline.setProperty(\"pointer-events\",\"none\",\"important\");}snapshot.size=Math.max(snapshot.size,parseFloat(computed.fontSize)||0);for(let i=0;i<source.children.length;i++){if(copy.children[i])copyStyles(source.children[i],copy.children[i]);}};copyStyles(el,clone);// The outer copy is positioned by Word. Remove only the original root's\n// appearance animation and page positioning; retain all inner typography.\nconst rootStyle={position:\"relative\",inset:\"auto\",margin:\"0\",width:`${rect.width}px`,height:`${rect.height}px`,\"box-sizing\":\"border-box\",\"min-width\":\"0\",\"min-height\":\"0\",\"max-width\":\"none\",\"max-height\":\"none\",transform:\"none\",translate:\"none\",rotate:\"none\",scale:\"none\",opacity:\"1\",filter:\"none\",overflow:\"visible\"};for(const[property,value]of Object.entries(rootStyle))clone.style.setProperty(property,value,\"important\");snapshot.html=clone.outerHTML;return snapshot;}function target(Component,key){const Target=/*#__PURE__*/forwardRef(function PreloaderTarget(props,forwardedRef){const element=useRef(null);const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;let cancelled=false;let active=true;let firstFrame=0;let secondFrame=0;const publish=(capture=true)=>{if(cancelled||!element.current)return;const snapshot=measure(element.current,key,capture);if(snapshot)window.dispatchEvent(new CustomEvent(SNAPSHOT,{detail:snapshot}));};const schedule=()=>{if(!active)return;cancelAnimationFrame(firstFrame);cancelAnimationFrame(secondFrame);firstFrame=requestAnimationFrame(()=>{secondFrame=requestAnimationFrame(()=>publish());});};const onRequest=event=>{active=true;publish(event.detail?.capture!==false);};const onComplete=()=>{active=false;cancelAnimationFrame(firstFrame);cancelAnimationFrame(secondFrame);};window.addEventListener(REQUEST,onRequest);window.addEventListener(COMPLETE,onComplete);window.addEventListener(\"resize\",schedule);schedule();// Font readiness may resolve after unmount; publish checks cancelled.\ndocument.fonts?.ready.then(()=>{if(!cancelled)schedule();}).catch(()=>{});return()=>{cancelled=true;cancelAnimationFrame(firstFrame);cancelAnimationFrame(secondFrame);window.removeEventListener(REQUEST,onRequest);window.removeEventListener(COMPLETE,onComplete);window.removeEventListener(\"resize\",schedule);};},[isStatic]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(Component,{...props,ref:node=>{element.current=node;assignRef(forwardedRef,node);},className:`${props.className??\"\"} rv-pl-target rv-pl-${key}`.trim()})]});});Target.displayName=`PreloaderTarget(${key})`;return Target;}export function withPreloadDesign(Component){return target(Component,\"design\");}export function withPreloadIntent(Component){return target(Component,\"intent\");}export function withPreloadLogo(Component){return target(Component,\"logo\");}\nexport const __FramerMetadata__ = {\"exports\":{\"withPreloadLogo\":{\"type\":\"reactHoc\",\"name\":\"withPreloadLogo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPreloadDesign\":{\"type\":\"reactHoc\",\"name\":\"withPreloadDesign\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPreloadIntent\":{\"type\":\"reactHoc\",\"name\":\"withPreloadIntent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Prelo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