{"version":3,"file":"Encrypted.DSCSTigb.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/v0MSNNvlAH4Fd5ApOWJG/JK6UgjLAOsQNBYqGM2TT/Encrypted.js"],"sourcesContent":["function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";export function scramble(Component){return props=>{const ref=useRef(null);useEffect(()=>{var _ref_current;if(location.host.endsWith(\"framercanvas.com\")&&!location.search.startsWith(\"?target=preview-web\")){return;}const el=ref===null||ref===void 0?void 0:(_ref_current=ref.current)===null||_ref_current===void 0?void 0:_ref_current.querySelector(\".framer-text\");if(!el)return;const fn=new TextScramble(el);fn.setText(el.innerText);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};}class TextScramble{constructor(el){_define_property(this,\"el\",void 0);_define_property(this,\"chars\",\"!-$x___X+*0\");_define_property(this,\"setText\",newText=>{const oldText=this.el.innerText;const length=Math.max(oldText.length,newText.length);const promise=new Promise(resolve=>this.resolve=resolve);this.queue=[];for(let i=0;i<length;i++){const from=oldText[i]||\"\";const to=newText[i]||\"\";const start=Math.floor(Math.random()*20);const end=start+Math.floor(Math.random()*20);this.queue.push({from,to,start,end});}cancelAnimationFrame(this.frameRequest);this.frame=0;this.update();return promise;});_define_property(this,\"update\",()=>{let output=\"\";let complete=0;for(let i=0,n=this.queue.length;i<n;i++){const{from,to,start,end,char}=this.queue[i];if(this.frame>=end){complete++;output+=to;}else if(this.frame>=start){if(!char||Math.random()<.28){this.queue[i].char=this.randomChar();}output+=`<span>${this.queue[i].char}</span>`;}else{output+=from;}}this.el.innerHTML=output;if(complete===this.queue.length){this.resolve();}else{this.frameRequest=requestAnimationFrame(this.update);this.frame++;}});_define_property(this,\"randomChar\",()=>{return this.chars[Math.floor(Math.random()*this.chars.length)];});_define_property(this,\"frame\",0);_define_property(this,\"queue\",[]);_define_property(this,\"resolve\",void 0);_define_property(this,\"frameRequest\",void 0);this.el=el;}}\nexport const __FramerMetadata__ = {\"exports\":{\"scramble\":{\"type\":\"reactHoc\",\"name\":\"scramble\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Encrypted.map"],"mappings":"yHAAA,SAAS,EAAiB,EAAI,EAAI,EAAM,CAAmI,OAA/H,KAAO,EAAK,OAAO,eAAe,EAAI,EAAI,CAAO,QAAM,WAAW,GAAK,aAAa,GAAK,SAAS,GAAK,CAAC,CAAO,EAAI,GAAK,EAAc,EAAoF,SAAgB,EAAS,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAA2W,OAA1W,MAAc,CAAkB,GAAG,SAAS,KAAK,SAAS,mBAAmB,EAAE,CAAC,SAAS,OAAO,WAAW,sBAAsB,CAAE,OAAQ,IAAM,EAAG,GAAkD,SAA2D,cAAc,eAAe,CAAK,GAAmB,IAAI,EAAa,EAAG,CAAI,QAAQ,EAAG,UAAU,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,CAAC,qBAA9gB,IAAoC,CAAof,EAAN,KAAkB,CAAC,YAAY,EAAG,CAAC,EAAiB,KAAK,KAAK,IAAK,GAAE,CAAC,EAAiB,KAAK,QAAQ,cAAc,CAAC,EAAiB,KAAK,UAAU,GAAS,CAAC,IAAM,EAAQ,KAAK,GAAG,UAAgB,EAAO,KAAK,IAAI,EAAQ,OAAO,EAAQ,OAAO,CAAO,EAAQ,IAAI,QAAQ,GAAS,KAAK,QAAQ,EAAQ,CAAC,KAAK,MAAM,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAO,IAAI,CAAC,IAAM,EAAK,EAAQ,IAAI,GAAS,EAAG,EAAQ,IAAI,GAAS,EAAM,KAAK,MAAM,KAAK,QAAQ,CAAC,GAAG,CAAO,EAAI,EAAM,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