/home/sylamedg/public_html/wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
!function(){"use strict";var e={d:function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{ElementorError:function(){return t},createError:function(){return r},debounce:function(){return c},decodeString:function(){return s},encodeString:function(){return i},ensureError:function(){return o},generateUniqueId:function(){return g},hash:function(){return d},throttle:function(){return l},useDebounceState:function(){return a},useSearchState:function(){return f}});class t extends Error{constructor(e,{code:n,context:t=null,cause:r=null}){super(e,{cause:r}),this.context=t,this.code=n}}const r=({code:e,message:n})=>class extends t{constructor({cause:t,context:r}={}){super(n,{cause:t,code:e,context:r})}},o=e=>{if(e instanceof Error)return e;let n,t=null;try{n=JSON.stringify(e)}catch(e){t=e,n="Unable to stringify the thrown value"}return new Error(`Unexpected non-error thrown: ${n}`,{cause:t})};var u=window.React;function c(e,n){let t=null;const r=()=>{t&&(clearTimeout(t),t=null)},o=(...o)=>{r(),t=setTimeout(()=>{e(...o),t=null},n)};return o.flush=(...n)=>{r(),e(...n)},o.cancel=r,o.pending=()=>!!t,o}function a(e={}){const{delay:n=300,initialValue:t=""}=e,[r,o]=(0,u.useState)(t),[a,l]=(0,u.useState)(t),i=(0,u.useRef)(null);(0,u.useEffect)(()=>()=>{i.current?.cancel?.()},[]);const s=(0,u.useCallback)(e=>{i.current?.cancel?.(),i.current=c(()=>{o(e)},n),i.current()},[n]);return{debouncedValue:r,inputValue:a,handleChange:e=>{l(e),s(e)},setInputValue:l}}function l(e,n,t=!1){let r=null,o=!1;const u=()=>{r&&(clearTimeout(r),r=null)},c=(...u)=>{r?o=!0:(e(...u),r=setTimeout(()=>{r=null,o&&t&&e(...u),o=!1},n))};return c.flush=(...n)=>{u(),e(...n)},c.cancel=u,c.pending=()=>!!r,c}const i=e=>{const n=Array.from((new TextEncoder).encode(e),e=>String.fromCharCode(e)).join("");return btoa(n)},s=(e,n)=>{try{const n=atob(e),t=new Uint8Array(Array.from(n,e=>e.charCodeAt(0)));return(new TextDecoder).decode(t)}catch{return void 0!==n?n:""}};function d(e){return JSON.stringify(e,(e,n)=>function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}(n)?Object.keys(n).sort().reduce((e,t)=>(e[t]=n[t],e),{}):n)}function f({localStorageKey:e}){const{debouncedValue:n,inputValue:t,handleChange:r}=a({delay:300,initialValue:(()=>{if(e){const n=localStorage.getItem(e);if(n)return localStorage.removeItem(e),n}return""})()});return{debouncedValue:n,inputValue:t,handleChange:r}}function g(e=""){return`${e?`${e}-`:""}${Date.now()}-${Math.random().toString(36).substring(2,9)}`}(window.elementorV2=window.elementorV2||{}).utils=n}(),window.elementorV2.utils?.init?.();