clash_for_linux/dashboard/public/assets/index.8bb012c6.js

10 lines
110 KiB
JavaScript
Raw Permalink Normal View History

import{r as p,R as xo,b as ci,j as F,F as ns}from"./index.171f553a.js";const tt=p.exports.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),we=p.exports.createContext({});function bo(){return p.exports.useContext(we).visualElement}const At=p.exports.createContext(null),vt=typeof document<"u",mt=vt?p.exports.useLayoutEffect:p.exports.useEffect,gn=p.exports.createContext({strict:!1});function li(t,e,n,s){const o=bo(),i=p.exports.useContext(gn),r=p.exports.useContext(At),a=p.exports.useContext(tt).reducedMotion,c=p.exports.useRef(void 0);s=s||i.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceId:r?r.id:void 0,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return mt(()=>{l&&l.syncRender()}),p.exports.useEffect(()=>{l&&l.animationState&&l.animationState.animateChanges()}),mt(()=>()=>l&&l.notifyUnmount(),[]),l}function wt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ui(t,e,n){return p.exports.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):wt(n)&&(n.current=s))},[e])}function Nt(t){return typeof t=="string"||Array.isArray(t)}function Te(t){return typeof t=="object"&&typeof t.start=="function"}const fi=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Pe(t){return Te(t.animate)||fi.some(e=>Nt(t[e]))}function So(t){return Boolean(Pe(t)||t.variants)}function di(t,e){if(Pe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Nt(n)?n:void 0,animate:Nt(s)?s:void 0}}return t.inherit!==!1?e:{}}function hi(t){const{initial:e,animate:n}=di(t,p.exports.useContext(we));return p.exports.useMemo(()=>({initial:e,animate:n}),[ss(e),ss(n)])}function ss(t){return Array.isArray(t)?t.join(" "):t}const Q=t=>({isEnabled:e=>t.some(n=>!!e[n])}),zt={measureLayout:Q(["layout","layoutId","drag"]),animation:Q(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Q(["exit"]),drag:Q(["drag","dragControls"]),focus:Q(["whileFocus"]),hover:Q(["whileHover","onHoverStart","onHoverEnd"]),tap:Q(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Q(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Q(["whileInView","onViewportEnter","onViewportLeave"])};function Ye(t){for(const e in t)e==="projectionNodeConstructor"?zt.projectionNodeConstructor=t[e]:zt[e].Component=t[e]}function _(t){const e=p.exports.useRef(null);return e.current===null&&(e.current=t()),e.current}const Dt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let pi=1;function mi(){return _(()=>{if(Dt.hasEverUpdated)return pi++})}const $t=p.exports.createContext({});class gi extends xo.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:n}=this.props;return e&&e.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const Vo=p.exports.createContext({}),yn=Symbol.for("motionComponentSymbol");function wo({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:n,useRender:s,useVisualState:o,Component:i}){t&&Ye(t);function r(c,l){const u={...p.exports.useContext(tt),...c,layoutId:yi(c)},{isStatic:f}=u;let d=null;const h=hi(c),m=f?void 0:mi(),x=o(c,f);if(!f&&vt){h.visualElement=li(i,x,u,e);const S=p.exports.useContext(gn).strict,V=p.exports.useContext(Vo);h.visualElement&&(d=h.visualElement.loadFeatures(u,S,t,m,n||zt.projectionNodeConstructor,V))}return ci(gi,{visualElement:h.visualElement,props:u,children:[d,F(we.Provider,{value:h,children:s(i,c,m,ui(x,h.visualElement,l),x,f,h.visualElement)})]})}const a=p.exports.forwardRef(r);return a[yn]=i,a}function yi({layoutId:t}){const e=p.exports.useContext($t).id;return e&&t!==void 0?e+"-"+t:t}function To(t){function e(s,o={}){return wo(t(s,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const vi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch",
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${i}px !important;
height: ${r}px !important;
top: ${a}px !important;
left: ${c}px !important;
}
`),()=>{document.head.removeChild(l)}},[e]),F(vu,{isPresent:e,childRef:s,sizeRef:o,children:p.exports.cloneElement(t,{ref:s})})}const He=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:o,presenceAffectsLayout:i,mode:r})=>{const a=_(bu),c=p.exports.useId(),l=p.exports.useMemo(()=>({id:c,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;s&&s()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?void 0:[n]);return p.exports.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),p.exports.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),r==="popLayout"&&(t=F(xu,{isPresent:n,children:t})),F(At.Provider,{value:l,children:t})};function bu(){return new Map}const Vt=t=>t.key||"";function Su(t,e){t.forEach(n=>{const s=Vt(n);e.set(s,n)})}function Vu(t){const e=[];return p.exports.Children.forEach(t,n=>{p.exports.isValidElement(n)&&e.push(n)}),e}const _f=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:r="sync"})=>{o&&(r="wait",Le(!1,"Replace exitBeforeEnter with mode='wait'"));let[a]=Zn();const c=p.exports.useContext($t).forceRender;c&&(a=c);const l=Xr(),u=Vu(t);let f=u;const d=new Set,h=p.exports.useRef(f),m=p.exports.useRef(new Map).current,x=p.exports.useRef(!0);if(mt(()=>{x.current=!1,Su(u,m),h.current=f}),Mn(()=>{x.current=!0,m.clear(),d.clear()}),x.current)return F(ns,{children:f.map(g=>F(He,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:r,children:g},Vt(g)))});f=[...f];const S=h.current.map(Vt),V=u.map(Vt),b=S.length;for(let g=0;g<b;g++){const v=S[g];V.indexOf(v)===-1&&d.add(v)}return r==="wait"&&d.size&&(f=[]),d.forEach(g=>{if(V.indexOf(g)!==-1)return;const v=m.get(g);if(!v)return;const w=S.indexOf(g),A=()=>{m.delete(g),d.delete(g);const E=h.current.findIndex(k=>k.key===g);if(h.current.splice(E,1),!d.size){if(h.current=u,l.current===!1)return;a(),s&&s()}};f.splice(w,0,F(He,{isPresent:!1,onExitComplete:A,custom:e,presenceAffectsLayout:i,mode:r,children:v},Vt(v)))}),f=f.map(g=>{const v=g.key;return d.has(v)?g:F(He,{isPresent:!0,presenceAffectsLayout:i,mode:r,children:g},Vt(g))}),Bn!=="production"&&r==="wait"&&f.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),F(ns,{children:d.size?f:f.map(g=>p.exports.cloneElement(g))})},wu=p.exports.createContext(null),Tu=t=>!t.isLayoutDirty&&t.willUpdate(!1);function lo(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Tu);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{var o;t.delete(s),(o=e.get(s))===null||o===void 0||o(),e.delete(s),n()},dirty:n}}const qr=t=>t===!0,Pu=t=>qr(t===!0)||t==="id",Cu=({children:t,id:e,inheritId:n,inherit:s=!0})=>{n!==void 0&&(s=n);const o=p.exports.useContext($t),i=p.exports.useContext(wu),[r,a]=Zn(),c=p.exports.useRef(null),l=o.id||i;c.current===null&&(Pu(s)&&l&&(e=e?l+"-"+e:l),c.current={id:e,group:qr(s)&&o.group||lo()});const u=p.exports.useMemo(()=>({...c.current,forceRender:r}),[a]);return F($t.Provider,{value:u,children:t})};let Au=0;const Bf=({children:t})=>(p.exports.useEffect(()=>{},[]),F(Cu,{id:_(()=>`asl-${Au++}`),children:t}));function Uf({children:t,isValidProp:e,...n}){e&&ko(e),n={...p.exports.useContext(tt),...n},n.isStatic=_(()=>n.isStatic);const s=p.exports.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return F(tt.Provider,{value:s,children:t})}function Nf({children:t,features:e,strict:n=!1}){const[,s]=p.exports.useState(!We(e)),o=p.exports.useRef(void 0);if(!We(e)){const{renderer:i,...r}=e;o.current=i,Ye(r)}return p.exports.useEffect(()=>{We(e)&&e().then(({renderer:i,...r})=>{Ye(r),o.current=i,s(!0)})},[]),F(gn.Provider,{value:{renderer:o.current,strict:n},children:t})}function We(t){return typeof t=="function"}const Zr=p.exports.createContext(null);function Ru(t,e,n,s){if(!s)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=s>0?1:-1,r=t[o+i];if(!r)return t;const a=t[o],c=r.layout,l=L(c.min,c.max,.5);return i===1&&a.lay