/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{useTimeoutFn as e,promiseTimeout as n,tryOnScopeDispose as t,identity as a,isClient as o,toArray as i,watchImmediate as r,createSingletonPromise as u,isObject as l}from"../../shared/dist/index.js";import{computed as s,shallowRef as c,readonly as v,watch as d,toValue as p,getCurrentInstance as f,onMounted as y,unref as m,toRaw as b}from"vue";const w=o?window:void 0,g=o?window.navigator:void 0;function O(e){var n;const t=p(e);return null!==(n=null==t?void 0:t.$el)&&void 0!==n?n:t}function I(...e){const n=s(()=>{const n=i(p(e[0])).filter(e=>null!=e);return n.every(e=>"string"!=typeof e)?n:void 0});return r(()=>{var t,a;return[null!==(t=null===(a=n.value)||void 0===a?void 0:a.map(e=>O(e)))&&void 0!==t?t:[w].filter(e=>null!=e),i(p(n.value?e[1]:e[0])),i(m(n.value?e[2]:e[1])),p(n.value?e[3]:e[2])]},([e,n,t,a],o,i)=>{if(!(null==e?void 0:e.length)||!(null==n?void 0:n.length)||!(null==t?void 0:t.length))return;const r=l(a)?{...a}:a,u=e.flatMap(e=>n.flatMap(n=>t.map(t=>((e,n,t,a)=>(e.addEventListener(n,t,a),()=>e.removeEventListener(n,t,a)))(e,n,t,r))));i(()=>{u.forEach(e=>e())})},{flush:"post"})}function h(){const e=c(!1),n=f();return n&&y(()=>{e.value=!0},n),e}function x(e){const n=/* @__PURE__ */h();return s(()=>(n.value,Boolean(e())))}function Q(e,n={}){const{controls:t=!1,navigator:a=g}=n,o=/* @__PURE__ */x(()=>a&&"permissions"in a),i=c(),r="string"==typeof e?{name:e}:e,l=c(),s=()=>{var e,n;l.value=null!==(e=null===(n=i.value)||void 0===n?void 0:n.state)&&void 0!==e?e:"prompt"};I(i,"change",s,{passive:!0});const v=u(async()=>{if(o.value){if(!i.value)try{i.value=await a.permissions.query(r)}catch(e){i.value=void 0}finally{s()}return t?b(i.value):void 0}});return v(),t?{state:l,isSupported:o,query:v}:l}function A(n={}){const{navigator:t=g,read:a=!1,source:o,copiedDuring:i=1500,legacy:r=!1}=n,u=/* @__PURE__ */x(()=>t&&"clipboard"in t),l=/* @__PURE__ */Q("clipboard-read"),d=/* @__PURE__ */Q("clipboard-write"),f=s(()=>u.value||r),y=c(""),m=c(!1),b=e(()=>m.value=!1,i,{immediate:!1});function w(e){return"granted"===e||"prompt"===e}return f.value&&a&&I(["copy","cut"],async function(){let e=!(u.value&&w(l.value));if(!e)try{y.value=await t.clipboard.readText()}catch(i){e=!0}var n,a,o;e&&(y.value=null!==(n=null===(a=document)||void 0===a||null===(o=a.getSelection)||void 0===o||null===(o=o.call(a))||void 0===o?void 0:o.toString())&&void 0!==n?n:"")},{passive:!0}),{isSupported:f,text:v(y),copied:v(m),copy:async function(e=p(o)){if(f.value&&null!=e){let a=!(u.value&&w(d.value));if(!a)try{await t.clipboard.writeText(e)}catch(n){a=!0}a&&function(e){const n=document.createElement("textarea");n.value=e,n.style.position="absolute",n.style.opacity="0",n.setAttribute("readonly",""),document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove()}(e),y.value=e,m.value=!0,b.start()}}}}const C={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]},E=/* @__PURE__ */Object.assign({},{linear:a},C);function S([e,n,t,a]){const o=(e,n)=>1-3*n+3*e,i=(e,n)=>3*n-6*e,r=e=>3*e,u=(e,n,t)=>((o(n,t)*e+i(n,t))*e+r(n))*e,l=(e,n,t)=>3*o(n,t)*e*e+2*i(n,t)*e+r(n);return o=>e===n&&t===a?o:u((n=>{let a=n;for(let o=0;o<4;++o){const o=l(a,e,t);if(0===o)return a;a-=(u(a,e,t)-n)/o}return a})(o),n,a)}function k(e,n,t){return e+t*(n-e)}function B(e,n,t){const a=p(e),o=p(n);if("number"==typeof a&&"number"==typeof o)return k(a,o,t);if(Array.isArray(a)&&Array.isArray(o))return a.map((e,n)=>k(e,p(o[n]),t));throw new TypeError("Unknown transition type, specify an interpolation function.")}function D(e){var n;return"function"==typeof e?e:null!==(n=p(e))&&void 0!==n?n:a}function q(e,n,t,a={}){var o;const{window:i=w}=a,r=p(n),u=p(t),l=null!==(o=p(a.duration))&&void 0!==o?o:1e3,s=Date.now(),c=Date.now()+l,v="function"==typeof a.interpolation?a.interpolation:B,d=void 0!==a.easing?D(a.easing):D(a.transition),f="function"==typeof d?d:S(d);return new Promise(n=>{e.value=r;const t=()=>{var o;if(null===(o=a.abort)||void 0===o?void 0:o.call(a))return void n();const d=Date.now();e.value=v(r,u,f((d-s)/l)),d<c?null==i||i.requestAnimationFrame(t):(e.value=u,n())};t()})}function T(e,a={}){let o=0;const i=()=>{const n=p(e);return void 0===a.interpolation&&Array.isArray(n)?n.map(p):n},r=c(i());return d(i,async e=>{var t,i;if(p(a.disabled))return;const u=++o;a.delay&&await n(p(a.delay)),u===o&&(null===(t=a.onStarted)||void 0===t||t.call(a),await q(r,r.value,e,{...a,abort:()=>{var e;return u!==o||(null===(e=a.abort)||void 0===e?void 0:e.call(a))}}),null===(i=a.onFinished)||void 0===i||i.call(a))},{deep:!0}),d(()=>p(a.disabled),e=>{e&&(o++,r.value=i())}),t(()=>{o++}),s(()=>p(a.disabled)?i():r.value)}export{E as TransitionPresets,u as createSingletonPromise,g as defaultNavigator,w as defaultWindow,a as identity,o as isClient,l as isObject,n as promiseTimeout,i as toArray,q as transition,t as tryOnScopeDispose,O as unrefElement,A as useClipboard,I as useEventListener,h as useMounted,Q as usePermission,x as useSupported,e as useTimeoutFn,T as useTransition,r as watchImmediate};