import{g as n}from"./@braintree-BnqQ9vdI.js";var t,e,l,u,o,i={},r={},c={};function a(){return t||(t=1,n=c,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),n.debounce=function(n,t,{signal:e,edges:l}={}){let u,o=null;const i=null!=l&&l.includes("leading"),r=null==l||l.includes("trailing"),c=()=>{null!==o&&(n.apply(u,o),u=void 0,o=null)};let a=null;const s=()=>{null!=a&&clearTimeout(a),a=setTimeout(()=>{a=null,r&&c(),d()},t)},d=()=>{null!==a&&(clearTimeout(a),a=null),u=void 0,o=null},f=function(...n){if(e?.aborted)return;u=this,o=n;const t=null==a;s(),i&&t&&c()};return f.schedule=s,f.cancel=d,f.flush=()=>{c()},e?.addEventListener("abort",d,{once:!0}),f}),c;var n}function s(){return e||(e=1,function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const t=a();n.debounce=function(n,e=0,l={}){"object"!=typeof l&&(l={});const{leading:u=!1,trailing:o=!0,maxWait:i}=l,r=Array(2);let c;u&&(r[0]="leading"),o&&(r[1]="trailing");let a=null;const s=t.debounce(function(...t){c=n.apply(this,t),a=null},e,{edges:r}),d=function(...t){return null!=i&&(null===a&&(a=Date.now()),Date.now()-a>=i)?(c=n.apply(this,t),a=Date.now(),s.cancel(),s.schedule(),c):(s.apply(this,t),c)};return d.cancel=s.cancel,d.flush=()=>(s.flush(),c),d}}(r)),r}function d(){return l||(l=1,function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const t=s();n.throttle=function(n,e=0,l={}){const{leading:u=!0,trailing:o=!0}=l;return t.debounce(n,e,{leading:u,maxWait:e,trailing:o})}}(i)),i}function f(){return o?u:(o=1,u=d().throttle)}const g=n(f());export{g as t};
