| 1 |
- import{L as c}from"./index-DqjK-Rnp.js";const a=t=>JSON.stringify(t),f=t=>{try{return JSON.parse(t)}catch(e){return console.log(e),null}},p=(t,e,o)=>{if(typeof t!="function")return new Error("debounce func is not a function");typeof o===void 0&&(o=!1);let n;return function(...r){const s=this;n&&clearTimeout(n),o&&!n&&t.apply(s,r),n=setTimeout(function(){n=null,o||t.apply(s,r)},e)}},w=t=>{{const e=c("ASSETS_BASE_URL");if(t.indexOf("http")===0){const n=new URL(t).origin;return t.replace(n,e)}else return`${e}${t}`}},y=(t,e)=>{if(typeof t!="function")throw new Error(`${t} is not a function`);let o=0,n=null;return function(...r){const s=this,l=e-(new Date-o);l<=0?(t.call(s,...r),o=new Date,clearTimeout(n),n=null):n||(n=setTimeout(function(){clearTimeout(n),n=null,t.call(s,...r),o=new Date},l))}};export{f as a,p as b,y as c,w as f,a as j};
|