Files
nademitex_user/dist/assets/dist-CUUvbY4x.js
T

1 line
2.6 KiB
JavaScript

import{B as e,G as t,U as n,W as r,_t as i,at as a,dt as o,gt as s,lt as c,mt as l,pt as u,q as d,st as f,tt as p,xt as m,yt as h}from"./BasicIcon-C6boaehV.js";function g(e,t){return f()?(o(e,t),!0):!1}var _=new WeakMap,v=(...t)=>{let i=t[0],a=e()?.proxy??f();if(a==null&&!n())throw Error(`injectLocal must be called in setup`);return a&&_.has(a)&&i in _.get(a)?_.get(a)[i]:r(...t)},y=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var b=Object.prototype.toString,x=e=>b.call(e)===`[object Object]`,S=()=>{},C=w();function w(){var e,t;return y&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function T(...e){if(e.length!==1)return h(...e);let t=e[0];return typeof t==`function`?u(a(()=>({get:t,set:S}))):l(t)}function E(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var D=e=>e();function O(e=D,t={}){let{initialState:n=`active`}=t,r=T(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:s(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function k(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function A(e){return Array.isArray(e)?e:[e]}function j(t){return t||e()}function M(e,t,n={}){let{eventFilter:r=D,...i}=n;return p(e,E(r,t),i)}function N(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=O(r,{initialState:i});return{stop:M(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function P(e,n=!0,r){j(r)?d(e,r):n?e():t(e)}function F(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:a=!1}=n,o=null,l=i(!1);function u(){o&&=(clearInterval(o),null)}function d(){l.value=!1,u()}function f(){let n=m(t);n<=0||(l.value=!0,a&&e(),u(),l.value&&(o=setInterval(e,n)))}return r&&y&&f(),(c(t)||typeof t==`function`)&&g(p(t,()=>{l.value&&y&&f()})),g(d),{isActive:s(l),pause:d,resume:f}}function I(e,t,n={}){let{immediate:r=!0,immediateCallback:a=!1}=n,o=i(!1),c;function l(){c&&=(clearTimeout(c),void 0)}function u(){o.value=!1,l()}function d(...n){a&&e(),l(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=void 0,e(...n)},m(t))}return r&&(o.value=!0,y&&d()),g(u),{isPending:s(o),start:d,stop:u}}function L(e,t,n){return p(e,t,{...n,immediate:!0})}export{S as a,P as c,L as d,N as f,x as i,F as l,y as n,k as o,C as r,A as s,v as t,I as u};