ivue 1.6.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,215 +1,97 @@
1
- import { reactive as _, computed as j, markRaw as x, ref as B, shallowRef as T, toRef as z } from "vue";
2
- const I = Array.isArray, M = Object.create, p = Object.defineProperty, D = Object.getPrototypeOf, L = Object.getOwnPropertyNames, U = Object.getOwnPropertyDescriptor, q = Object.getOwnPropertyDescriptors, R = Symbol("IVUE_INSTANCE");
3
- let h = /* @__PURE__ */ new WeakMap();
4
- const A = (e) => {
5
- if (h.has(e))
6
- return h.get(e);
7
- const s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1
+ import { effectScope as h, watch as w, watchEffect as O, toRaw as g, isRef as j } from "vue";
2
+ const m = Object.hasOwn, b = Object.getPrototypeOf, d = Object.getOwnPropertyDescriptor, S = Object.getOwnPropertyNames, a = Object.defineProperty, v = Object.prototype, p = Symbol.for("ivue.raw"), l = Symbol.for("ivue.scope"), y = Symbol.for("ivue.processed");
3
+ function f(e) {
4
+ const r = g(e);
5
+ if (r !== e)
6
+ return r[p] ?? (r[p] = r);
7
+ const n = e[p];
8
+ return n ? n === e ? n : g(n) : e[p] = e;
9
+ }
10
+ function $(e, r, n, o) {
11
+ a(e, r, { configurable: !0, enumerable: !1, get() {
12
+ const t = f(this);
13
+ return t[n] ?? (t[n] = o.bind(t));
14
+ }, set(t) {
15
+ f(this)[n] = t;
16
+ } });
17
+ }
18
+ function E(e, r, n, o, t) {
19
+ const s = r[0] === "$";
20
+ a(e, r, { configurable: !0, enumerable: !1, get: function() {
21
+ const c = f(this);
22
+ if (n in c)
23
+ return c[n];
24
+ const u = o.call(c);
25
+ return s ? (c[n] = u, u) : (j(u) ? c[n] = u : a(e, r, { configurable: !0, enumerable: !1, get() {
26
+ return o.call(f(this));
27
+ }, set: t ? function(i) {
28
+ return t.call(f(this), i);
29
+ } : void 0 }), u);
30
+ }, set: t ? function(c) {
31
+ return t.call(f(this), c);
32
+ } : void 0 });
33
+ }
34
+ function C(e) {
35
+ const r = [];
8
36
  let n = e.prototype;
9
- for (; n && n !== Object.prototype; ) {
10
- const t = q(n);
11
- for (const a in t) {
12
- if (a === "constructor")
37
+ for (; n && n !== v; )
38
+ r.push(n), n = b(n);
39
+ r.reverse();
40
+ for (const o of r) {
41
+ if (m(o, y))
42
+ continue;
43
+ const t = S(o), s = [];
44
+ for (const c of t) {
45
+ if (c === "constructor")
13
46
  continue;
14
- const r = t[a];
15
- r.get || r.set ? s.has(a) || s.set(a, r) : typeof r.value == "function" && o.add(a);
47
+ const u = d(o, c);
48
+ if (typeof u.value == "function") {
49
+ const i = Symbol(c);
50
+ s.push(i), $(o, c, i, u.value);
51
+ } else if (u.get) {
52
+ const i = Symbol(c);
53
+ s.push(i), E(o, c, i, u.get, u.set);
54
+ }
16
55
  }
17
- n = D(n);
56
+ a(o, y, { value: s });
18
57
  }
19
- const c = { accessors: s, methods: o };
20
- return h.set(e, c), c;
21
- };
22
- let v = /* @__PURE__ */ new WeakMap();
23
- const G = /* @__PURE__ */ new Set(["caller", "callee", "arguments", "constructor"]), k = (e) => {
24
- const s = e.constructor;
25
- if (v.has(s))
26
- return v.get(s);
27
- const { accessors: o, methods: n } = h.get(s) ?? A(s), c = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Map();
28
- do {
29
- const r = L(e);
30
- for (let f = 0, g = r.length; f < g; f++) {
31
- const b = r[f];
32
- G.has(b) || t.has(b) || (o.has(b) ? t.set(b, 2) : n.has(b) || (c.add(b), t.set(b, 0)));
33
- }
34
- e = D(e);
35
- } while (e && e.constructor !== Object);
36
- const a = { allProps: t, onlyProps: c };
37
- return v.set(s, a), a;
38
- }, F = (e, ...s) => {
39
- var f, g, b;
40
- const { accessors: o, methods: n } = A(e), c = o != null && o.size ? M(null) : null, t = _(new e(...s));
41
- for (const [i, u] of o)
42
- p(t, i, { get: () => {
43
- var y, m;
44
- return c[i] ?? (c[i] = j({ get: (y = u.get) == null ? void 0 : y.bind(t), set: (m = u.set) == null ? void 0 : m.bind(t) }));
45
- }, enumerable: u.enumerable, configurable: u.configurable });
46
- const a = e == null ? void 0 : e.ivueDisableReactivity;
47
- if (a)
48
- for (const i of a) {
49
- const u = o.get(i);
50
- u ? p(t, i, { get: (f = u.get) == null ? void 0 : f.bind(t), set: (g = u.set) == null ? void 0 : g.bind(t), enumerable: u.enumerable, configurable: u.configurable }) : (console.log("des criptor", i, u), t[i] = x(t[i]));
51
- }
52
- const r = { writable: !0, configurable: !0, enumerable: !1 };
53
- for (const i of n)
54
- r.value = t[i].bind(t), p(t, i, r);
55
- return p(t, "toRefs", { get: (() => {
56
- let i = null;
57
- return () => i ?? (i = N(t, o, c));
58
- })(), enumerable: !1 }), p(t, "clone", { value: (...i) => V(e, s, t, o, n, i), enumerable: !1 }), p(t, R, { value: !0, enumerable: !1, configurable: !1, writable: !1 }), (b = t == null ? void 0 : t.init) == null || b.call(t, !1), t;
59
- }, V = (e, s, o, n, c, t = []) => {
60
- var y, m, S;
61
- const a = n != null && n.size ? M(null) : null, r = _(new e(...s)), { onlyProps: f } = k(r), g = e.ivueCloneByReference, b = P.get(e);
62
- if (g)
63
- for (const l of f)
64
- r[l] = g.has(l) ? o[l] : d(o[l], b);
65
- else
66
- for (const l of f)
67
- r[l] = d(o[l], b);
68
- for (const [l, w] of n)
69
- p(r, l, { get: () => {
70
- var W, C;
71
- return a[l] ?? (a[l] = j({ get: (W = w.get) == null ? void 0 : W.bind(r), set: (C = w.set) == null ? void 0 : C.bind(r) }));
72
- }, enumerable: w.enumerable, configurable: w.configurable });
73
- const i = e == null ? void 0 : e.ivueDisableReactivity;
74
- if (i)
75
- for (const l of i) {
76
- const w = n.get(l);
77
- w ? p(r, l, { get: (y = w.get) == null ? void 0 : y.bind(r), set: (m = w.set) == null ? void 0 : m.bind(r), enumerable: w.enumerable, configurable: w.configurable }) : r[l] = x(r[l]);
78
- }
79
- const u = { writable: !0, configurable: !0, enumerable: !1 };
80
- for (const l of c)
81
- u.value = r[l].bind(r), p(r, l, u);
82
- return p(r, "toRefs", { get: (() => {
83
- let l = null;
84
- return () => l ?? (l = N(r, n, a));
85
- })(), enumerable: !1 }), p(r, "clone", { value: (...l) => V(e, s, r, n, c, l), enumerable: !1 }), p(r, R, { value: !0, enumerable: !1, configurable: !1, writable: !1 }), (S = r == null ? void 0 : r.init) == null || S.call(r, !0, ...t), r;
86
- }, H = B, J = T, Q = (e) => e, N = (e, s, o) => {
87
- const n = s.get.bind(s), { allProps: c } = k(e);
88
- return function(t = !1, a) {
89
- const r = {};
90
- if (I(t))
91
- for (const f of t) {
92
- const g = c.get(f);
93
- E(r, f, g, e, n, o);
58
+ return m(e.prototype, "$stopEffects") || (a(e.prototype, "$watch", { enumerable: !1, configurable: !0, writable: !0, value: function(...o) {
59
+ const t = f(this);
60
+ return (t[l] ?? (t[l] = h(!0))).run(() => w(...o));
61
+ } }), a(e.prototype, "$watchEffect", { enumerable: !1, configurable: !0, writable: !0, value: function(...o) {
62
+ const t = f(this);
63
+ return (t[l] ?? (t[l] = h(!0))).run(() => O(...o));
64
+ } }), a(e.prototype, "$stopEffects", { enumerable: !1, configurable: !0, writable: !0, value: function() {
65
+ const o = f(this);
66
+ try {
67
+ const t = o[l];
68
+ t && t.stop();
69
+ } finally {
70
+ delete o[l];
71
+ let t = b(o);
72
+ for (; t && t !== v; ) {
73
+ const s = t[y];
74
+ if (s)
75
+ for (const c of s)
76
+ delete o[c];
77
+ t = b(t);
94
78
  }
95
- else
96
- for (const [f, g] of c.entries())
97
- E(r, f, g, e, n, o);
98
- return r;
99
- };
100
- }, E = (e, s, o, n, c, t) => {
101
- var a, r;
102
- if (o === 2) {
103
- const f = c(s);
104
- e[s] = t[s] ?? (t[s] = j({ get: (a = f.get) == null ? void 0 : a.bind(n), set: (r = f.set) == null ? void 0 : r.bind(n) }));
105
- } else
106
- o === 0 && (e[s] = z(n, s));
107
- }, K = (e) => {
108
- var s;
109
- return typeof e == "function" && !!e.prototype && !((s = U(e, "prototype")) != null && s.writable);
110
- }, X = (e, s, o = void 0) => {
111
- for (const n in s) {
112
- const c = e == null ? void 0 : e[n];
113
- s[n].required || c !== void 0 && (typeof c == "object" && c !== null ? s[n].default = () => d(c, o) : K(c) ? s[n].default = () => c : s[n].default = c);
114
- }
115
- return s;
116
- }, O = (e, s, o, n) => {
117
- const c = Object.getOwnPropertyDescriptors(e);
118
- for (const t of Reflect.ownKeys(c)) {
119
- const a = c[t];
120
- "value" in a && (a.value = d(a.value, o, n)), Object.defineProperty(s, t, a);
79
+ }
80
+ } })), e;
81
+ }
82
+ const P = (e) => {
83
+ var r;
84
+ return typeof e == "function" && !!e.prototype && !((r = d(e, "prototype")) != null && r.writable);
85
+ }, D = (e, r, n) => {
86
+ const o = {};
87
+ for (const t in r) {
88
+ const s = e == null ? void 0 : e[t], c = r[t];
89
+ o[t] = { ...c }, c.required || s === void 0 || (typeof s == "object" && s !== null ? o[t].default = () => n ? n(s) : structuredClone(s) : P(s) ? o[t].default = () => s : o[t].default = s);
121
90
  }
91
+ return o;
122
92
  };
123
- let P = /* @__PURE__ */ new WeakMap();
124
- const d = (e, s, o = /* @__PURE__ */ new WeakMap()) => {
125
- if (e == null || typeof e != "object")
126
- return e;
127
- if (o.has(e))
128
- return o.get(e);
129
- if (I(e)) {
130
- const t = e.length, a = new Array(t);
131
- o.set(e, a);
132
- for (let r = 0; r < t; r++)
133
- a[r] = d(e[r], s, o);
134
- return a;
135
- }
136
- const n = D(e);
137
- if (n === Object.prototype || n === null) {
138
- const t = M(n);
139
- return o.set(e, t), O(e, t, s, o), t;
140
- }
141
- if (e[R]) {
142
- const t = e.constructor;
143
- if (t.ivueGlobalStore)
144
- return o.set(e, e), e;
145
- let a;
146
- if (s != null && s.has(t)) {
147
- P.set(t, s);
148
- try {
149
- a = e.clone(...s.get(t) ?? []);
150
- } finally {
151
- P.delete(t);
152
- }
153
- } else
154
- a = e.clone();
155
- return o.set(e, a), a;
156
- }
157
- if (e instanceof Date)
158
- return new Date(e.getTime());
159
- if (e instanceof Map) {
160
- const t = new e.constructor();
161
- o.set(e, t);
162
- for (const [a, r] of e)
163
- t.set(d(a, s, o), d(r, s, o));
164
- return t;
165
- }
166
- if (e instanceof Set) {
167
- const t = new e.constructor();
168
- o.set(e, t);
169
- for (const a of e)
170
- t.add(d(a, s, o));
171
- return t;
172
- }
173
- if (e instanceof RegExp) {
174
- const t = new RegExp(e.source, e.flags);
175
- return t.lastIndex = e.lastIndex, t;
176
- }
177
- if (e instanceof Error) {
178
- const t = new e.constructor(e.message);
179
- return o.set(e, t), O(e, t, s, o), t;
180
- }
181
- if (e instanceof Promise || e instanceof WeakMap || e instanceof WeakSet)
182
- return o.set(e, e), e;
183
- if (e instanceof DataView) {
184
- const t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
185
- return o.set(e, t), t;
186
- }
187
- if (ArrayBuffer.isView(e) && !(e instanceof DataView)) {
188
- const t = new e.constructor(e);
189
- return o.set(e, t), t;
190
- }
191
- if (e instanceof ArrayBuffer) {
192
- const t = e.slice(0);
193
- return o.set(e, t), t;
194
- }
195
- const c = M(n);
196
- return o.set(e, c), O(e, c, s, o), c;
197
- }, Z = () => {
198
- h = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
199
- }, $ = { copyOwnProps: O, getClassAccessorsMethodsMap: A, getClassPropertiesAccessorsMap: k };
200
93
  export {
201
- R as IVUE_INSTANCE_SYMBOL,
202
- $ as __test__,
203
- h as accessorsMethodsMaps,
204
- P as activeDeepCloneArgsMap,
205
- Z as clearCache,
206
- O as copyOwnProps,
207
- d as deepClone,
208
- H as iref,
209
- K as isClass,
210
- J as ishallowRef,
211
- Q as iuse,
212
- F as ivue,
213
- v as propertiesAccessorsMaps,
214
- X as propsWithDefaults
94
+ C as Reactive,
95
+ P as isClass,
96
+ D as propsWithDefaults
215
97
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(c,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):p((c=typeof globalThis<"u"?globalThis:c||self).ivue={},c.Vue)})(this,function(c,p){"use strict";const C=Array.isArray,O=Object.create,d=Object.defineProperty,D=Object.getPrototypeOf,_=Object.getOwnPropertyNames,I=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyDescriptors,A=Symbol("IVUE_INSTANCE");c.accessorsMethodsMaps=new WeakMap;const P=e=>{if(c.accessorsMethodsMaps.has(e))return c.accessorsMethodsMaps.get(e);const s=new Map,r=new Set;let t=e.prototype;for(;t&&t!==Object.prototype;){const o=T(t);for(const a in o){if(a==="constructor")continue;const n=o[a];n.get||n.set?s.has(a)||s.set(a,n):typeof n.value=="function"&&r.add(a)}t=D(t)}const i={accessors:s,methods:r};return c.accessorsMethodsMaps.set(e,i),i};c.propertiesAccessorsMaps=new WeakMap;const N=new Set(["caller","callee","arguments","constructor"]),j=e=>{const s=e.constructor;if(c.propertiesAccessorsMaps.has(s))return c.propertiesAccessorsMaps.get(s);const{accessors:r,methods:t}=c.accessorsMethodsMaps.get(s)??P(s),i=new Set,o=new Map;do{const n=_(e);for(let u=0,w=n.length;u<w;u++){const g=n[u];N.has(g)||o.has(g)||(r.has(g)?o.set(g,2):t.has(g)||(i.add(g),o.set(g,0)))}e=D(e)}while(e&&e.constructor!==Object);const a={allProps:o,onlyProps:i};return c.propertiesAccessorsMaps.set(s,a),a},R=(e,s,r,t,i,o=[])=>{var h,v,x;const a=t!=null&&t.size?O(null):null,n=p.reactive(new e(...s)),{onlyProps:u}=j(n),w=e.ivueCloneByReference,g=c.activeDeepCloneArgsMap.get(e);if(w)for(const l of u)n[l]=w.has(l)?r[l]:M(r[l],g);else for(const l of u)n[l]=M(r[l],g);for(const[l,y]of t)d(n,l,{get:()=>{var E,V;return a[l]??(a[l]=p.computed({get:(E=y.get)==null?void 0:E.bind(n),set:(V=y.set)==null?void 0:V.bind(n)}))},enumerable:y.enumerable,configurable:y.configurable});const f=e==null?void 0:e.ivueDisableReactivity;if(f)for(const l of f){const y=t.get(l);y?d(n,l,{get:(h=y.get)==null?void 0:h.bind(n),set:(v=y.set)==null?void 0:v.bind(n),enumerable:y.enumerable,configurable:y.configurable}):n[l]=p.markRaw(n[l])}const b={writable:!0,configurable:!0,enumerable:!1};for(const l of i)b.value=n[l].bind(n),d(n,l,b);return d(n,"toRefs",{get:(()=>{let l=null;return()=>l??(l=S(n,t,a))})(),enumerable:!1}),d(n,"clone",{value:(...l)=>R(e,s,n,t,i,l),enumerable:!1}),d(n,A,{value:!0,enumerable:!1,configurable:!1,writable:!1}),(x=n==null?void 0:n.init)==null||x.call(n,!0,...o),n},B=p.ref,q=p.shallowRef,S=(e,s,r)=>{const t=s.get.bind(s),{allProps:i}=j(e);return function(o=!1,a){const n={};if(C(o))for(const u of o){const w=i.get(u);k(n,u,w,e,t,r)}else for(const[u,w]of i.entries())k(n,u,w,e,t,r);return n}},k=(e,s,r,t,i,o)=>{var a,n;if(r===2){const u=i(s);e[s]=o[s]??(o[s]=p.computed({get:(a=u.get)==null?void 0:a.bind(t),set:(n=u.set)==null?void 0:n.bind(t)}))}else r===0&&(e[s]=p.toRef(t,s))},W=e=>{var s;return typeof e=="function"&&!!e.prototype&&!((s=I(e,"prototype"))!=null&&s.writable)},m=(e,s,r,t)=>{const i=Object.getOwnPropertyDescriptors(e);for(const o of Reflect.ownKeys(i)){const a=i[o];"value"in a&&(a.value=M(a.value,r,t)),Object.defineProperty(s,o,a)}};c.activeDeepCloneArgsMap=new WeakMap;const M=(e,s,r=new WeakMap)=>{if(e==null||typeof e!="object")return e;if(r.has(e))return r.get(e);if(C(e)){const o=e.length,a=new Array(o);r.set(e,a);for(let n=0;n<o;n++)a[n]=M(e[n],s,r);return a}const t=D(e);if(t===Object.prototype||t===null){const o=O(t);return r.set(e,o),m(e,o,s,r),o}if(e[A]){const o=e.constructor;if(o.ivueGlobalStore)return r.set(e,e),e;let a;if(s!=null&&s.has(o)){c.activeDeepCloneArgsMap.set(o,s);try{a=e.clone(...s.get(o)??[])}finally{c.activeDeepCloneArgsMap.delete(o)}}else a=e.clone();return r.set(e,a),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof Map){const o=new e.constructor;r.set(e,o);for(const[a,n]of e)o.set(M(a,s,r),M(n,s,r));return o}if(e instanceof Set){const o=new e.constructor;r.set(e,o);for(const a of e)o.add(M(a,s,r));return o}if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Error){const o=new e.constructor(e.message);return r.set(e,o),m(e,o,s,r),o}if(e instanceof Promise||e instanceof WeakMap||e instanceof WeakSet)return r.set(e,e),e;if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,o),o}if(ArrayBuffer.isView(e)&&!(e instanceof DataView)){const o=new e.constructor(e);return r.set(e,o),o}if(e instanceof ArrayBuffer){const o=e.slice(0);return r.set(e,o),o}const i=O(t);return r.set(e,i),m(e,i,s,r),i},z={copyOwnProps:m,getClassAccessorsMethodsMap:P,getClassPropertiesAccessorsMap:j};c.IVUE_INSTANCE_SYMBOL=A,c.__test__=z,c.clearCache=()=>{c.accessorsMethodsMaps=new WeakMap,c.propertiesAccessorsMaps=new WeakMap,c.activeDeepCloneArgsMap=new WeakMap},c.copyOwnProps=m,c.deepClone=M,c.iref=B,c.isClass=W,c.ishallowRef=q,c.iuse=e=>e,c.ivue=(e,...s)=>{var u,w,g;const{accessors:r,methods:t}=P(e),i=r!=null&&r.size?O(null):null,o=p.reactive(new e(...s));for(const[f,b]of r)d(o,f,{get:()=>{var h,v;return i[f]??(i[f]=p.computed({get:(h=b.get)==null?void 0:h.bind(o),set:(v=b.set)==null?void 0:v.bind(o)}))},enumerable:b.enumerable,configurable:b.configurable});const a=e==null?void 0:e.ivueDisableReactivity;if(a)for(const f of a){const b=r.get(f);b?d(o,f,{get:(u=b.get)==null?void 0:u.bind(o),set:(w=b.set)==null?void 0:w.bind(o),enumerable:b.enumerable,configurable:b.configurable}):(console.log("des criptor",f,b),o[f]=p.markRaw(o[f]))}const n={writable:!0,configurable:!0,enumerable:!1};for(const f of t)n.value=o[f].bind(o),d(o,f,n);return d(o,"toRefs",{get:(()=>{let f=null;return()=>f??(f=S(o,r,i))})(),enumerable:!1}),d(o,"clone",{value:(...f)=>R(e,s,o,r,t,f),enumerable:!1}),d(o,A,{value:!0,enumerable:!1,configurable:!1,writable:!1}),(g=o==null?void 0:o.init)==null||g.call(o,!1),o},c.propsWithDefaults=(e,s,r=void 0)=>{for(const t in s){const i=e==null?void 0:e[t];s[t].required||i!==void 0&&(typeof i=="object"&&i!==null?s[t].default=()=>M(i,r):W(i)?s[t].default=()=>i:s[t].default=i)}return s},Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
1
+ (function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):f((l=typeof globalThis<"u"?globalThis:l||self).ivue={},l.Vue)})(this,function(l,f){"use strict";const g=Object.hasOwn,d=Object.getPrototypeOf,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,a=Object.defineProperty,m=Object.prototype,y=Symbol.for("ivue.raw"),b=Symbol.for("ivue.scope"),h=Symbol.for("ivue.processed");function s(e){const r=f.toRaw(e);if(r!==e)return r[y]??(r[y]=r);const n=e[y];return n?n===e?n:f.toRaw(n):e[y]=e}function j(e,r,n,o){a(e,r,{configurable:!0,enumerable:!1,get(){const t=s(this);return t[n]??(t[n]=o.bind(t))},set(t){s(this)[n]=t}})}function S(e,r,n,o,t){const u=r[0]==="$";a(e,r,{configurable:!0,enumerable:!1,get:function(){const c=s(this);if(n in c)return c[n];const i=o.call(c);return u?(c[n]=i,i):(f.isRef(i)?c[n]=i:a(e,r,{configurable:!0,enumerable:!1,get(){return o.call(s(this))},set:t?function(p){return t.call(s(this),p)}:void 0}),i)},set:t?function(c){return t.call(s(this),c)}:void 0})}const w=e=>{var r;return typeof e=="function"&&!!e.prototype&&!((r=v(e,"prototype"))!=null&&r.writable)};l.Reactive=function(e){const r=[];let n=e.prototype;for(;n&&n!==m;)r.push(n),n=d(n);r.reverse();for(const o of r){if(g(o,h))continue;const t=O(o),u=[];for(const c of t){if(c==="constructor")continue;const i=v(o,c);if(typeof i.value=="function"){const p=Symbol(c);u.push(p),j(o,c,p,i.value)}else if(i.get){const p=Symbol(c);u.push(p),S(o,c,p,i.get,i.set)}}a(o,h,{value:u})}return g(e.prototype,"$stopEffects")||(a(e.prototype,"$watch",{enumerable:!1,configurable:!0,writable:!0,value:function(...o){const t=s(this);return(t[b]??(t[b]=f.effectScope(!0))).run(()=>f.watch(...o))}}),a(e.prototype,"$watchEffect",{enumerable:!1,configurable:!0,writable:!0,value:function(...o){const t=s(this);return(t[b]??(t[b]=f.effectScope(!0))).run(()=>f.watchEffect(...o))}}),a(e.prototype,"$stopEffects",{enumerable:!1,configurable:!0,writable:!0,value:function(){const o=s(this);try{const t=o[b];t&&t.stop()}finally{delete o[b];let t=d(o);for(;t&&t!==m;){const u=t[h];if(u)for(const c of u)delete o[c];t=d(t)}}}})),e},l.isClass=w,l.propsWithDefaults=(e,r,n)=>{const o={};for(const t in r){const u=e==null?void 0:e[t],c=r[t];o[t]={...c},c.required||u===void 0||(typeof u=="object"&&u!==null?o[t].default=()=>n?n(u):structuredClone(u):w(u)?o[t].default=()=>u:o[t].default=u)}return o},Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});