12345 |
- /**
- * @vue/reactivity v3.4.38
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
- * @license MIT
- **/var VueReactivity=function(e){"use strict";let t,s;let i=()=>{},r=Object.assign,n=Object.prototype.hasOwnProperty,l=(e,t)=>n.call(e,t),u=Array.isArray,c=e=>"[object Map]"===d(e),a=e=>"function"==typeof e,h=e=>"string"==typeof e,o=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,d=e=>_.call(e),p=e=>d(e).slice(8,-1),v=e=>h(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,g=(e,t)=>!Object.is(e,t),y=(e,t,s,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})};class w{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){let s=t;try{return t=this,e()}finally{t=s}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,s;for(t=0,s=this.effects.length;t<s;t++)this.effects[t].stop();for(t=0,s=this.cleanups.length;t<s;t++)this.cleanups[t]();if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function R(e,s=t){s&&s.active&&s.effects.push(e)}class S{constructor(e,t,s,i){this.fn=e,this.trigger=t,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,R(this,i)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,j();for(let e=0;e<this._depsLength;e++){let t=this.deps[e];if(t.computed&&(t.computed.value,this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),x()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=E,t=s;try{return E=!0,s=this,this._runnings++,b(this),this.fn()}finally{k(this),this._runnings--,s=t,E=e}}stop(){this.active&&(b(this),k(this),this.onStop&&this.onStop(),this.active=!1)}}function b(e){e._trackId++,e._depsLength=0}function k(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)L(e.deps[t],e);e.deps.length=e._depsLength}}function L(e,t){let s=e.get(t);void 0!==s&&t._trackId!==s&&(e.delete(t),0===e.size&&e.cleanup())}let E=!0,O=0,m=[];function j(){m.push(E),E=!1}function x(){let e=m.pop();E=void 0===e||e}function I(){O++}function P(){for(O--;!O&&A.length;)A.shift()()}function T(e,t,s){if(t.get(e)!==e._trackId){t.set(e,e._trackId);let s=e.deps[e._depsLength];s!==t?(s&&L(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}let A=[];function M(e,t,s){for(let s of(I(),e.keys())){let i;s._dirtyLevel<t&&(null!=i?i:i=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=i?i:i=e.get(s)===s._trackId)&&(s.trigger(),(!s._runnings||s.allowRecurse)&&2!==s._dirtyLevel&&(s._shouldSchedule=!1,s.scheduler&&A.push(s.scheduler)))}P()}let V=(e,t)=>{let s=new Map;return s.cleanup=e,s.computed=t,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function D(e,t,i){if(E&&s){let t=W.get(e);t||W.set(e,t=new Map);let r=t.get(i);r||t.set(i,r=V(()=>t.delete(i))),T(s,r)}}function C(e,t,s,i,r,n){let l=W.get(e);if(!l)return;let a=[];if("clear"===t)a=[...l.values()];else if("length"===s&&u(e)){let e=Number(i);l.forEach((t,s)=>{("length"===s||!o(s)&&s>=e)&&a.push(t)})}else switch(void 0!==s&&a.push(l.get(s)),t){case"add":u(e)?v(s)&&a.push(l.get("length")):(a.push(l.get(z)),c(e)&&a.push(l.get(N)));break;case"delete":!u(e)&&(a.push(l.get(z)),c(e)&&a.push(l.get(N)));break;case"set":c(e)&&a.push(l.get(z))}for(let e of(I(),a))e&&M(e,4);P()}let K=/*! #__NO_SIDE_EFFECTS__ */function(e,t){let s=new Set(e.split(","));return e=>s.has(e)}("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(o)),Y=function(){let e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){let s=ex(this);for(let e=0,t=this.length;e<t;e++)D(s,"get",e+"");let i=s[t](...e);return -1===i||!1===i?s[t](...e.map(ex)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){j(),I();let s=ex(this)[t].apply(this,e);return P(),x(),s}}),e}();function F(e){o(e)||(e=String(e));let t=ex(this);return D(t,"has",e),t.hasOwnProperty(e)}class G{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,s){let i=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!i;if("__v_isReadonly"===t)return i;if("__v_isShallow"===t)return r;if("__v_raw"===t)return s===(i?r?eb:eS:r?eR:ew).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;let n=u(e);if(!i){if(n&&l(Y,t))return Reflect.get(Y,t,s);if("hasOwnProperty"===t)return F}let c=Reflect.get(e,t,s);return(o(t)?H.has(t):K(t))?c:(i||D(e,"get",t),r)?c:eW(c)?n&&v(t)?c:c.value:f(c)?i?eL(c):ek(c):c}}class q extends G{constructor(e=!1){super(!1,e)}set(e,t,s,i){let r=e[t];if(!this._isShallow){let t=em(r);if(ej(s)||em(s)||(r=ex(r),s=ex(s)),!u(e)&&eW(r)&&!eW(s))return!t&&(r.value=s,!0)}let n=u(e)&&v(t)?Number(t)<e.length:l(e,t),c=Reflect.set(e,t,s,i);return e===ex(i)&&(n?g(s,r)&&C(e,"set",t,s):C(e,"add",t,s)),c}deleteProperty(e,t){let s=l(e,t);e[t];let i=Reflect.deleteProperty(e,t);return i&&s&&C(e,"delete",t,void 0),i}has(e,t){let s=Reflect.has(e,t);return o(t)&&H.has(t)||D(e,"has",t),s}ownKeys(e){return D(e,"iterate",u(e)?"length":z),Reflect.ownKeys(e)}}class B extends G{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let J=new q,Q=new B,U=new q(!0),X=new B(!0),Z=e=>e,$=e=>Reflect.getPrototypeOf(e);function ee(e,t,s=!1,i=!1){let r=ex(e=e.__v_raw),n=ex(t);s||(g(t,n)&&D(r,"get",t),D(r,"get",n));let{has:l}=$(r),u=i?Z:s?eP:eI;return l.call(r,t)?u(e.get(t)):l.call(r,n)?u(e.get(n)):void(e!==r&&e.get(t))}function et(e,t=!1){let s=this.__v_raw,i=ex(s),r=ex(e);return t||(g(e,r)&&D(i,"has",e),D(i,"has",r)),e===r?s.has(e):s.has(e)||s.has(r)}function es(e,t=!1){return e=e.__v_raw,t||D(ex(e),"iterate",z),Reflect.get(e,"size",e)}function ei(e,t=!1){t||ej(e)||em(e)||(e=ex(e));let s=ex(this);return $(s).has.call(s,e)||(s.add(e),C(s,"add",e,e)),this}function er(e,t,s=!1){s||ej(t)||em(t)||(t=ex(t));let i=ex(this),{has:r,get:n}=$(i),l=r.call(i,e);l||(e=ex(e),l=r.call(i,e));let u=n.call(i,e);return i.set(e,t),l?g(t,u)&&C(i,"set",e,t):C(i,"add",e,t),this}function en(e){let t=ex(this),{has:s,get:i}=$(t),r=s.call(t,e);r||(e=ex(e),r=s.call(t,e)),i&&i.call(t,e);let n=t.delete(e);return r&&C(t,"delete",e,void 0),n}function el(){let e=ex(this),t=0!==e.size,s=e.clear();return t&&C(e,"clear",void 0,void 0),s}function eu(e,t){return function(s,i){let r=this,n=r.__v_raw,l=ex(n),u=t?Z:e?eP:eI;return e||D(l,"iterate",z),n.forEach((e,t)=>s.call(i,u(e),u(t),r))}}function ec(e,t,s){return function(...i){let r=this.__v_raw,n=ex(r),l=c(n),u="entries"===e||e===Symbol.iterator&&l,a=r[e](...i),h=s?Z:t?eP:eI;return t||D(n,"iterate","keys"===e&&l?N:z),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:u?[h(e[0]),h(e[1])]:h(e),done:t}},[Symbol.iterator](){return this}}}}function ea(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[eh,eo,ef,e_]=function(){let e={get(e){return ee(this,e)},get size(){return es(this)},has:et,add:ei,set:er,delete:en,clear:el,forEach:eu(!1,!1)},t={get(e){return ee(this,e,!1,!0)},get size(){return es(this)},has:et,add(e){return ei.call(this,e,!0)},set(e,t){return er.call(this,e,t,!0)},delete:en,clear:el,forEach:eu(!1,!0)},s={get(e){return ee(this,e,!0)},get size(){return es(this,!0)},has(e){return et.call(this,e,!0)},add:ea("add"),set:ea("set"),delete:ea("delete"),clear:ea("clear"),forEach:eu(!0,!1)},i={get(e){return ee(this,e,!0,!0)},get size(){return es(this,!0)},has(e){return et.call(this,e,!0)},add:ea("add"),set:ea("set"),delete:ea("delete"),clear:ea("clear"),forEach:eu(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=ec(r,!1,!1),s[r]=ec(r,!0,!1),t[r]=ec(r,!1,!0),i[r]=ec(r,!0,!0)}),[e,s,t,i]}();function ed(e,t){let s=t?e?e_:ef:e?eo:eh;return(t,i,r)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(l(s,i)&&i in t?s:t,i,r)}let ep={get:ed(!1,!1)},ev={get:ed(!1,!0)},eg={get:ed(!0,!1)},ey={get:ed(!0,!0)},ew=new WeakMap,eR=new WeakMap,eS=new WeakMap,eb=new WeakMap;function ek(e){return em(e)?e:eE(e,!1,J,ep,ew)}function eL(e){return eE(e,!0,Q,eg,eS)}function eE(e,t,s,i,r){if(!f(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(p(e));if(0===l)return e;let u=new Proxy(e,2===l?i:s);return r.set(e,u),u}function eO(e){return em(e)?eO(e.__v_raw):!!(e&&e.__v_isReactive)}function em(e){return!!(e&&e.__v_isReadonly)}function ej(e){return!!(e&&e.__v_isShallow)}function ex(e){let t=e&&e.__v_raw;return t?ex(t):e}let eI=e=>f(e)?ek(e):e,eP=e=>f(e)?eL(e):e;class eT{constructor(e,t,s,i){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new S(()=>e(this._value),()=>eV(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){let e=ex(this);return(!e._cacheable||e.effect.dirty)&&g(e._value,e._value=e.effect.run())&&eV(e,4),eM(e),e.effect._dirtyLevel>=2&&eV(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function eA(e,t,s=!1){let r,n;let l=a(e);return l?(r=e,n=i):(r=e.get,n=e.set),new eT(r,n,l||!n,s)}function eM(e){var t;E&&s&&(e=ex(e),T(s,null!=(t=e.dep)?t:e.dep=V(()=>e.dep=void 0,e instanceof eT?e:void 0)))}function eV(e,t=4,s,i){let r=(e=ex(e)).dep;r&&M(r,t)}function eW(e){return!!(e&&!0===e.__v_isRef)}function ez(e){return eN(e,!1)}function eN(e,t){return eW(e)?e:new eD(e,t)}class eD{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:ex(e),this._value=t?e:eI(e)}get value(){return eM(this),this._value}set value(e){let t=this.__v_isShallow||ej(e)||em(e);g(e=t?e:ex(e),this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=t?e:eI(e),eV(this,4))}}function eC(e){return eW(e)?e.value:e}let eK={get:(e,t,s)=>eC(Reflect.get(e,t,s)),set:(e,t,s,i)=>{let r=e[t];return eW(r)&&!eW(s)?(r.value=s,!0):Reflect.set(e,t,s,i)}};class eH{constructor(e){this.dep=void 0,this.__v_isRef=!0;let{get:t,set:s}=e(()=>eM(this),()=>eV(this));this._get=t,this._set=s}get value(){return this._get()}set value(e){this._set(e)}}class eY{constructor(e,t,s){this._object=e,this._key=t,this._defaultValue=s,this.__v_isRef=!0}get value(){let e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let s=W.get(e);return s&&s.get(t)}(ex(this._object),this._key)}}class eF{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function eG(e,t,s){let i=e[t];return eW(i)?i:new eY(e,t,s)}return e.EffectScope=w,e.ITERATE_KEY=z,e.ReactiveEffect=S,e.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.computed=eA,e.customRef=function(e){return new eH(e)},e.deferredComputed=eA,e.effect=function(e,t){e.effect instanceof S&&(e=e.effect.fn);let s=new S(e,i,()=>{s.dirty&&s.run()});t&&(r(s,t),t.scope&&R(s,t.scope)),t&&t.lazy||s.run();let n=s.run.bind(s);return n.effect=s,n},e.effectScope=function(e){return new w(e)},e.enableTracking=function(){m.push(E),E=!0},e.getCurrentScope=function(){return t},e.isProxy=function(e){return!!e&&!!e.__v_raw},e.isReactive=eO,e.isReadonly=em,e.isRef=eW,e.isShallow=ej,e.markRaw=function(e){return Object.isExtensible(e)&&y(e,"__v_skip",!0),e},e.onScopeDispose=function(e){t&&t.cleanups.push(e)},e.pauseScheduling=I,e.pauseTracking=j,e.proxyRefs=function(e){return eO(e)?e:new Proxy(e,eK)},e.reactive=ek,e.readonly=eL,e.ref=ez,e.resetScheduling=P,e.resetTracking=x,e.shallowReactive=function(e){return eE(e,!1,U,ev,eR)},e.shallowReadonly=function(e){return eE(e,!0,X,ey,eb)},e.shallowRef=function(e){return eN(e,!0)},e.stop=function(e){e.effect.stop()},e.toRaw=ex,e.toRef=function(e,t,s){return eW(e)?e:a(e)?new eF(e):f(e)&&arguments.length>1?eG(e,t,s):ez(e)},e.toRefs=function(e){let t=u(e)?Array(e.length):{};for(let s in e)t[s]=eG(e,s);return t},e.toValue=function(e){return a(e)?e():eC(e)},e.track=D,e.trigger=C,e.triggerRef=function(e){eV(e,4)},e.unref=eC,e}({});
|