uni-ticket-system/node_modules/@vue/reactivity/dist/reactivity.global.prod.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
var VueReactivity=function(t){"use strict";function e(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===l(t),u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,_=(t,e)=>!Object.is(t,e);let d;class p{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=d;try{return d=this,t()}finally{d=e}}}on(){d=this}off(){d=this.parent}stop(t){if(this._active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function v(t,e=d){e&&e.active&&e.effects.push(t)}const g=t=>{const e=new Set(t);return e.w=0,e.n=0,e},y=t=>(t.w&m)>0,w=t=>(t.n&m)>0,R=new WeakMap;let b=0,m=1;let S;const k=Symbol(""),O=Symbol("");class j{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=S,e=P;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=S,S=this,P=!0,m=1<<++b,b<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=m})(this):E(this),this.fn()}finally{b<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];y(i)&&!w(i)?i.delete(t):e[n++]=i,i.w&=~m,i.n&=~m}e.length=n}})(this),m=1<<--b,S=this.parent,P=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){S===this?this.deferStop=!0:this.active&&(E(this),this.onStop&&this.onStop(),this.active=!1)}}function E(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let P=!0;const x=[];function M(){x.push(P),P=!1}function z(){const t=x.pop();P=void 0===t||t}function V(t,e,n){if(P&&S){let e=R.get(t);e||R.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=g()),W(s)}}function W(t,e){let n=!1;b<=30?w(t)||(t.n|=m,n=!y(t)):n=!t.has(S),n&&(t.add(S),S.deps.push(t))}function A(t,e,n,s,i,r){const u=R.get(t);if(!u)return;let a=[];if("clear"===e)a=[...u.values()];else if("length"===n&&c(t)){const t=Number(s);u.forEach(((e,n)=>{("length"===n||n>=t)&&a.push(e)}))}else switch(void 0!==n&&a.push(u.get(n)),e){case"add":c(t)?f(n)&&a.push(u.get("length")):(a.push(u.get(k)),o(t)&&a.push(u.get(O)));break;case"delete":c(t)||(a.push(u.get(k)),o(t)&&a.push(u.get(O)));break;case"set":o(t)&&a.push(u.get(k))}if(1===a.length)a[0]&&N(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);N(g(t))}}function N(t,e){const n=c(t)?t:[...t];for(const s of n)s.computed&&T(s);for(const s of n)s.computed||T(s)}function T(t,e){(t!==S||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const C=e("__proto__,__v_isRef,__isVue"),I=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),K=G(),D=G(!1,!0),L=G(!0),Y=G(!0,!0),q=B();function B(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=zt(this);for(let e=0,i=this.length;e<i;e++)V(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(zt)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){M();const n=zt(this)[e].apply(this,t);return z(),n}})),t}function F(t){const e=zt(this);return V(e,0,t),e.hasOwnProperty(t)}function G(t=!1,e=!1){return function(n,s,i){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&i===(t?e?St:mt:e?bt:Rt).get(n))return n;const o=c(n);if(!t){if(o&&r(q,s))return Reflect.get(q,s,i);if("hasOwnPrope