{"version":3,"file":"shared-lib.CI34LRAr.mjs","names":["__esmMin","window","init_npm_react_18_3_1","init_ssg_sandbox_shims","ce","init_jsx_runtime","c","navigator","fontStore","init_framer_BWFVvmND","addPropertyControls","ControlType","TQD_SmoothScroll","props","ua","platform","isSafari","isiOS","isMobile","disableOnSafari","disableOniOS","disableOnMobile","scrollingElement","current","target","rafId","isAnimating","lastKnownScroll","isAnchorSyncing","ease","intensity","clamp","min","value","max","getCurrentScroll","getMaxScroll","syncToCurrentScroll","stopAnimation","animate","startAnimation","onWheel","targetElement","event","insideScrollableElement","style","overflowY","isScrollableCSS","hasScrollableContent","isScrollingUp","isScrollingDown","canScrollUp","canScrollDown","maxScroll","realScroll","onResize","onHashChange","onClick","link","href","init_TQD_Smooth_Scroll","fonts","css","className","init_ewV0ud_4n"],"sources":["https:/framerusercontent.com/modules/Ez0Lwb9zhOIGe8HGirMP/5G2pfMpAeWsqeUUjIGUQ/TQD_Smooth_Scroll.js","https:/framerusercontent.com/modules/6nr90j7VqqiMltjbOuYx/zOXPDNH3XKr4Rqz8F4he/ewV0ud_4n.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n */export default function TQD_SmoothScroll(props){const{intensity,disableOnSafari,disableOniOS,disableOnMobile}=props;React.useEffect(()=>{if(typeof window===\"undefined\")return;const ua=navigator.userAgent;const platform=navigator.platform;const isSafari=/^((?!chrome|android).)*safari/i.test(ua);const isiOS=/iPad|iPhone|iPod/.test(ua)||platform===\"MacIntel\"&&navigator.maxTouchPoints>1;const isMobile=window.matchMedia(\"(max-width: 767px)\").matches;if(disableOnSafari&&isSafari)return;if(disableOniOS&&isiOS)return;if(disableOnMobile&&isMobile)return;const scrollingElement=document.scrollingElement||document.documentElement;let current=window.scrollY||scrollingElement.scrollTop||0;let target=current;let rafId=null;let isAnimating=false;let lastKnownScroll=current;let isAnchorSyncing=false;const normalized=Math.max(1,Math.min(intensity,20));/**\n         * Intensity càng cao = càng mượt / càng trễ\n         */const ease=.22-normalized*.006;const clamp=(value,min,max)=>{return Math.max(min,Math.min(value,max));};const getCurrentScroll=()=>{return window.scrollY||scrollingElement.scrollTop||0;};const getMaxScroll=()=>{return scrollingElement.scrollHeight-window.innerHeight;};const syncToCurrentScroll=()=>{current=getCurrentScroll();target=current;lastKnownScroll=current;};const stopAnimation=()=>{if(rafId){cancelAnimationFrame(rafId);rafId=null;}isAnimating=false;};const animate=()=>{current+=(target-current)*ease;if(Math.abs(target-current)<.4){current=target;window.scrollTo(0,current);lastKnownScroll=current;isAnimating=false;rafId=null;return;}window.scrollTo(0,current);lastKnownScroll=current;rafId=requestAnimationFrame(animate);};const startAnimation=()=>{if(!isAnimating){isAnimating=true;rafId=requestAnimationFrame(animate);}};const onWheel=event=>{// Kiểm tra phần tử scroll nội bộ\nlet targetElement=event.target;let insideScrollableElement=false;while(targetElement&&targetElement!==document.body&&targetElement!==document.documentElement){const style=window.getComputedStyle(targetElement);const overflowY=style.overflowY||style.overflow;const isScrollableCSS=overflowY===\"auto\"||overflowY===\"scroll\";const hasScrollableContent=targetElement.scrollHeight>targetElement.clientHeight;if(isScrollableCSS&&hasScrollableContent){const isScrollingUp=event.deltaY<0;const isScrollingDown=event.deltaY>0;const canScrollUp=targetElement.scrollTop>0;const canScrollDown=targetElement.scrollTop+targetElement.clientHeight<targetElement.scrollHeight;if(isScrollingUp&&canScrollUp||isScrollingDown&&canScrollDown){insideScrollableElement=true;break;}}targetElement=targetElement.parentElement;}if(insideScrollableElement){return;}event.preventDefault();const maxScroll=getMaxScroll();const realScroll=getCurrentScroll();const externalJump=Math.abs(realScroll-lastKnownScroll)>80;if(externalJump||isAnchorSyncing){current=realScroll;target=realScroll;isAnchorSyncing=false;}target=clamp(target+event.deltaY,0,maxScroll);startAnimation();};const onResize=()=>{target=clamp(target,0,getMaxScroll());current=getCurrentScroll();lastKnownScroll=current;};const onHashChange=()=>{stopAnimation();isAnchorSyncing=true;window.setTimeout(()=>{syncToCurrentScroll();isAnchorSyncing=false;},120);};const onClick=event=>{const link=event.target.closest?.(\"a\");if(!link)return;const href=link.getAttribute(\"href\");if(!href)return;const isAnchorLink=href.startsWith(\"#\")||href.includes(\"/#\");if(!isAnchorLink)return;stopAnimation();isAnchorSyncing=true;window.setTimeout(()=>{syncToCurrentScroll();isAnchorSyncing=false;},180);};window.addEventListener(\"wheel\",onWheel,{passive:false});window.addEventListener(\"resize\",onResize);window.addEventListener(\"hashchange\",onHashChange);document.addEventListener(\"click\",onClick);return()=>{window.removeEventListener(\"wheel\",onWheel);window.removeEventListener(\"resize\",onResize);window.removeEventListener(\"hashchange\",onHashChange);document.removeEventListener(\"click\",onClick);stopAnimation();};},[intensity,disableOnSafari,disableOniOS,disableOnMobile]);return /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1,opacity:0,pointerEvents:\"none\",position:\"fixed\",top:0,left:0,zIndex:-1}});}TQD_SmoothScroll.defaultProps={intensity:10,disableOnSafari:true,disableOniOS:true,disableOnMobile:true};addPropertyControls(TQD_SmoothScroll,{intensity:{title:\"Intensity\",type:ControlType.Number,min:1,max:20,step:1,defaultValue:10,displayStepper:true},disableOnSafari:{title:\"Disable Safari\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},disableOniOS:{title:\"Disable iOS\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},disableOnMobile:{title:\"Disable Mobile\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TQD_SmoothScroll\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TQD_Smooth_Scroll.map","// Generated by Framer (c439c68)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"FS;Manrope-medium\",\"FS;Manrope-bold\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Manrope\",openType:true,source:\"fontshare\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/BNWG6MUI4RTC6WEND2VPDH4MHMIVU3XZ/R5YXY5FMVG6PXU36GNEEA24MIPMEPGSM/CIM4KQCLZSMMLWPVH25IDDSTY4ENPHEY.woff2\",weight:\"500\"},{cssFamilyName:\"Manrope\",openType:true,source:\"fontshare\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/NGBUP45ES3F7RD5XGKPEDJ6QEPO4TMOK/EXDVWJ2EDDVVV65UENMX33EDDYBX6OF7/6P4FPMFQH7CCC7RZ4UU4NKSGJ2RLF7V5.woff2\",weight:\"700\"}]}];export const css=[\".framer-W4Vne .framer-styles-preset-1urwrc2:not(.rich-text-wrapper), .framer-W4Vne .framer-styles-preset-1urwrc2.rich-text-wrapper h1 { --framer-font-family: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 78px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: -0.044597em; --framer-line-height: 1.05em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-b07cbed0-0471-4146-8bde-4adf703e01d1); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }\",\"@media (max-width: 1199px) and (min-width: 769px) { .framer-W4Vne .framer-styles-preset-1urwrc2:not(.rich-text-wrapper), .framer-W4Vne .framer-styles-preset-1urwrc2.rich-text-wrapper h1 { --framer-font-family: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 50px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: -0.050501em; --framer-line-height: 1.12em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-b07cbed0-0471-4146-8bde-4adf703e01d1); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\",\"@media (max-width: 768px) and (min-width: 0px) { .framer-W4Vne .framer-styles-preset-1urwrc2:not(.rich-text-wrapper), .framer-W4Vne .framer-styles-preset-1urwrc2.rich-text-wrapper h1 { --framer-font-family: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Manrope\\\", \\\"Manrope Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 38px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: -0.0491em; --framer-line-height: 1.12em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-b07cbed0-0471-4146-8bde-4adf703e01d1); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\"];export const className=\"framer-W4Vne\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion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