{"version":3,"file":"Text_balancer.BGoZBbV7.mjs","names":["t","o","n","e","a","i","s","l","d","p","f","Balancer"],"sources":["https:/ga.jspm.io/npm:react-wrap-balancer@1.1.0/dist/index.mjs","https:/framerusercontent.com/modules/jfqY5BjsZUTHLflRQuzl/FLKDV0SCutHmjOQ7JOyx/Text_balancer.js"],"sourcesContent":["import e from\"react\";\"use client\";var t=\"undefined\"==typeof window,n=t?e.useEffect:e.useLayoutEffect,o=0,b=()=>++o,a=!1;function x(){let[t,o]=e.useState(a?b:void 0);return n((()=>{void 0===t&&o(b()),a=!0}),[]),void 0===t?t:`rwb-${t.toString(32)}`}function R(){return e.useMemo((()=>\"useId\"in e?e.useId:x),[])()}var i=\"__wrap_b\",s=\"__wrap_n\",l=\"__wrap_o\",S=(e,t,n)=>{n=n||document.querySelector(`[data-br=\"${e}\"]`);let o=n.parentElement,c=e=>n.style.maxWidth=e+\"px\";n.style.maxWidth=\"\";let a,i=o.clientWidth,s=o.clientHeight,l=i/2-.25,d=i+.5;if(i){for(c(l),l=Math.max(n.scrollWidth,l);l+1<d;)a=Math.round((l+d)/2),c(a),o.clientHeight===s?d=a:l=a;c(d*t+i*(1-t))}n.__wrap_o||(\"undefined\"!=typeof ResizeObserver?(n.__wrap_o=new ResizeObserver((()=>{self.__wrap_b(0,+n.dataset.brr,n)}))).observe(o):\"development\"===process.env.NODE_ENV&&console.warn(\"The browser you are using does not support the ResizeObserver API. Please consider add polyfill for this API to avoid potential layout shifts or upgrade your browser. Read more: https://github.com/shuding/react-wrap-balancer#browser-support-information\"))},d=S.toString(),p='(self.CSS&&CSS.supports(\"text-wrap\",\"balance\")?1:2)',T=(t,n,o=\"\")=>(o&&(o=`self.${s}!=1&&${o}`),e.createElement(\"script\",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?\"\":`self.${s}=self.${s}||${p};self.${i}=${d};`)+o},nonce:n})),u=e.createContext({preferNative:!0,hasProvider:!1}),$=({preferNative:t=!0,nonce:n,children:o})=>{let a=e.useMemo((()=>({preferNative:t,hasProvider:!0})),[t]);return e.createElement(u.Provider,{value:a},T(!1,n),o)},w=({ratio:t=1,preferNative:o,nonce:a,children:d,...p})=>{let f=R(),y=e.useRef(),v=e.useContext(u),h=null!=o?o:v.preferNative,m=p.as||\"span\";return n((()=>{h&&1===self[s]||y.current&&(self[i]=S)(0,t,y.current)}),[d,h,t]),n((()=>{if(!(h&&1===self[s]))return()=>{if(!y.current)return;let e=y.current[l];e&&(e.disconnect(),delete y.current[l])}}),[h]),\"development\"===process.env.NODE_ENV&&d&&!Array.isArray(d)&&\"object\"==typeof d&&\"type\"in d&&\"string\"==typeof d.type&&\"span\"!==d.type&&console.warn(`<Balancer> should not wrap <${d.type}> inside. Instead, it should directly wrap text or inline nodes.\\n\\nTry changing this:\\n  <Balancer><${d.type}>content</${d.type}></Balancer>\\nTo:\\n  <${d.type}><Balancer>content</Balancer></${d.type}>`),e.createElement(e.Fragment,null,e.createElement(m,{...p,\"data-br\":f,\"data-brr\":t,ref:y,style:{display:\"inline-block\",verticalAlign:\"top\",textDecoration:\"inherit\",textWrap:h?\"balance\":\"initial\"},suppressHydrationWarning:!0},d),T(v.hasProvider,a,`self.${i}(\"${f}\",${t})`))};if(!t&&\"production\"!==process.env.NODE_ENV){let e=document.querySelector(\"[data-next-hide-fouc]\");if(e){let r=n=>{for(let o of n)for(let n of Array.from(o.removedNodes)){if(n!==e)continue;t.disconnect();let o=document.querySelectorAll(\"[data-br]\");for(let e of Array.from(o))self[i](0,+e.dataset.brr,e)}},t=new MutationObserver(r);t.observe(document.head,{childList:!0})}}var f=w;export{w as Balancer,$ as Provider,f as default};\n\n//# sourceMappingURL=index.mjs.map","/**\n * Overrrides - The last Framer component library you’ll ever need\n *\n * https://overrides.com\n * hey@overrides.com\n *\n * This code is provided \"as is\", without warranties or guarantees of any kind.\n * Use at your own risk and discretion. Overrrides holds no liability\n * for any direct or indirect damage or loss resulting from the use of this code.\n *\n * Version: 1.0.0\n */import{jsx as _jsx}from\"react/jsx-runtime\";import Balancer from\"react-wrap-balancer\";export function withTextBalancer(Component){return props=>{var _props_children_props_children,_props_children;const value=(_props_children=props.children)===null||_props_children===void 0?void 0:(_props_children_props_children=_props_children.props.children)===null||_props_children_props_children===void 0?void 0:_props_children_props_children.props.children;if(!value){return /*#__PURE__*/_jsx(Component,{...props});}props.children.props.children.props.children=/*#__PURE__*/_jsx(Balancer,{children:value});return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTextBalancer\":{\"type\":\"reactHoc\",\"name\":\"withTextBalancer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_balancer.map"],"mappings":"kMAAwH,SAAS,GAAG,CAAC,GAAG,CAACA,EAAEC,GAAG,EAAE,SAAS,EAAE,EAAE,IAAK,GAAE,CAAC,OAAO,OAAO,CAAUD,IAAT,IAAK,IAAOC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAUD,IAAT,IAAK,GAAMA,EAAE,OAAOA,EAAE,SAAS,GAAG,GAAG,SAAS,GAAG,CAAC,OAAO,EAAE,aAAa,UAAU,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC,EAAE,oDAAjS,CAAiB,EAAsB,IAApB,OAA2B,EAAE,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAqM,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,EAAE,EAAE,IAAI,CAAC,IAAK,SAAS,cAAc,aAAaG,EAAE,IAAI,CAAC,IAAIF,EAAEC,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,SAASC,EAAE,KAAK,EAAE,MAAM,SAAS,GAAG,IAAIC,EAAEC,EAAEJ,EAAE,YAAYK,EAAEL,EAAE,aAAaM,EAAEF,EAAE,EAAE,IAAIG,EAAEH,EAAE,GA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