Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reactivity.global.js 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338
  1. /**
  2. * @vue/reactivity v3.4.38
  3. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  4. * @license MIT
  5. **/
  6. var VueReactivity = (function (exports) {
  7. 'use strict';
  8. /*! #__NO_SIDE_EFFECTS__ */
  9. // @__NO_SIDE_EFFECTS__
  10. function makeMap(str, expectsLowerCase) {
  11. const set = new Set(str.split(","));
  12. return (val) => set.has(val);
  13. }
  14. const NOOP = () => {
  15. };
  16. const extend = Object.assign;
  17. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  18. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  19. const isArray = Array.isArray;
  20. const isMap = (val) => toTypeString(val) === "[object Map]";
  21. const isFunction = (val) => typeof val === "function";
  22. const isString = (val) => typeof val === "string";
  23. const isSymbol = (val) => typeof val === "symbol";
  24. const isObject = (val) => val !== null && typeof val === "object";
  25. const objectToString = Object.prototype.toString;
  26. const toTypeString = (value) => objectToString.call(value);
  27. const toRawType = (value) => {
  28. return toTypeString(value).slice(8, -1);
  29. };
  30. const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  31. const cacheStringFunction = (fn) => {
  32. const cache = /* @__PURE__ */ Object.create(null);
  33. return (str) => {
  34. const hit = cache[str];
  35. return hit || (cache[str] = fn(str));
  36. };
  37. };
  38. const capitalize = cacheStringFunction((str) => {
  39. return str.charAt(0).toUpperCase() + str.slice(1);
  40. });
  41. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  42. const def = (obj, key, value, writable = false) => {
  43. Object.defineProperty(obj, key, {
  44. configurable: true,
  45. enumerable: false,
  46. writable,
  47. value
  48. });
  49. };
  50. function warn(msg, ...args) {
  51. console.warn(`[Vue warn] ${msg}`, ...args);
  52. }
  53. let activeEffectScope;
  54. class EffectScope {
  55. constructor(detached = false) {
  56. this.detached = detached;
  57. /**
  58. * @internal
  59. */
  60. this._active = true;
  61. /**
  62. * @internal
  63. */
  64. this.effects = [];
  65. /**
  66. * @internal
  67. */
  68. this.cleanups = [];
  69. this.parent = activeEffectScope;
  70. if (!detached && activeEffectScope) {
  71. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  72. this
  73. ) - 1;
  74. }
  75. }
  76. get active() {
  77. return this._active;
  78. }
  79. run(fn) {
  80. if (this._active) {
  81. const currentEffectScope = activeEffectScope;
  82. try {
  83. activeEffectScope = this;
  84. return fn();
  85. } finally {
  86. activeEffectScope = currentEffectScope;
  87. }
  88. } else {
  89. warn(`cannot run an inactive effect scope.`);
  90. }
  91. }
  92. /**
  93. * This should only be called on non-detached scopes
  94. * @internal
  95. */
  96. on() {
  97. activeEffectScope = this;
  98. }
  99. /**
  100. * This should only be called on non-detached scopes
  101. * @internal
  102. */
  103. off() {
  104. activeEffectScope = this.parent;
  105. }
  106. stop(fromParent) {
  107. if (this._active) {
  108. let i, l;
  109. for (i = 0, l = this.effects.length; i < l; i++) {
  110. this.effects[i].stop();
  111. }
  112. for (i = 0, l = this.cleanups.length; i < l; i++) {
  113. this.cleanups[i]();
  114. }
  115. if (this.scopes) {
  116. for (i = 0, l = this.scopes.length; i < l; i++) {
  117. this.scopes[i].stop(true);
  118. }
  119. }
  120. if (!this.detached && this.parent && !fromParent) {
  121. const last = this.parent.scopes.pop();
  122. if (last && last !== this) {
  123. this.parent.scopes[this.index] = last;
  124. last.index = this.index;
  125. }
  126. }
  127. this.parent = void 0;
  128. this._active = false;
  129. }
  130. }
  131. }
  132. function effectScope(detached) {
  133. return new EffectScope(detached);
  134. }
  135. function recordEffectScope(effect, scope = activeEffectScope) {
  136. if (scope && scope.active) {
  137. scope.effects.push(effect);
  138. }
  139. }
  140. function getCurrentScope() {
  141. return activeEffectScope;
  142. }
  143. function onScopeDispose(fn) {
  144. if (activeEffectScope) {
  145. activeEffectScope.cleanups.push(fn);
  146. } else {
  147. warn(
  148. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  149. );
  150. }
  151. }
  152. let activeEffect;
  153. class ReactiveEffect {
  154. constructor(fn, trigger, scheduler, scope) {
  155. this.fn = fn;
  156. this.trigger = trigger;
  157. this.scheduler = scheduler;
  158. this.active = true;
  159. this.deps = [];
  160. /**
  161. * @internal
  162. */
  163. this._dirtyLevel = 4;
  164. /**
  165. * @internal
  166. */
  167. this._trackId = 0;
  168. /**
  169. * @internal
  170. */
  171. this._runnings = 0;
  172. /**
  173. * @internal
  174. */
  175. this._shouldSchedule = false;
  176. /**
  177. * @internal
  178. */
  179. this._depsLength = 0;
  180. recordEffectScope(this, scope);
  181. }
  182. get dirty() {
  183. if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
  184. this._dirtyLevel = 1;
  185. pauseTracking();
  186. for (let i = 0; i < this._depsLength; i++) {
  187. const dep = this.deps[i];
  188. if (dep.computed) {
  189. triggerComputed(dep.computed);
  190. if (this._dirtyLevel >= 4) {
  191. break;
  192. }
  193. }
  194. }
  195. if (this._dirtyLevel === 1) {
  196. this._dirtyLevel = 0;
  197. }
  198. resetTracking();
  199. }
  200. return this._dirtyLevel >= 4;
  201. }
  202. set dirty(v) {
  203. this._dirtyLevel = v ? 4 : 0;
  204. }
  205. run() {
  206. this._dirtyLevel = 0;
  207. if (!this.active) {
  208. return this.fn();
  209. }
  210. let lastShouldTrack = shouldTrack;
  211. let lastEffect = activeEffect;
  212. try {
  213. shouldTrack = true;
  214. activeEffect = this;
  215. this._runnings++;
  216. preCleanupEffect(this);
  217. return this.fn();
  218. } finally {
  219. postCleanupEffect(this);
  220. this._runnings--;
  221. activeEffect = lastEffect;
  222. shouldTrack = lastShouldTrack;
  223. }
  224. }
  225. stop() {
  226. if (this.active) {
  227. preCleanupEffect(this);
  228. postCleanupEffect(this);
  229. this.onStop && this.onStop();
  230. this.active = false;
  231. }
  232. }
  233. }
  234. function triggerComputed(computed) {
  235. return computed.value;
  236. }
  237. function preCleanupEffect(effect2) {
  238. effect2._trackId++;
  239. effect2._depsLength = 0;
  240. }
  241. function postCleanupEffect(effect2) {
  242. if (effect2.deps.length > effect2._depsLength) {
  243. for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
  244. cleanupDepEffect(effect2.deps[i], effect2);
  245. }
  246. effect2.deps.length = effect2._depsLength;
  247. }
  248. }
  249. function cleanupDepEffect(dep, effect2) {
  250. const trackId = dep.get(effect2);
  251. if (trackId !== void 0 && effect2._trackId !== trackId) {
  252. dep.delete(effect2);
  253. if (dep.size === 0) {
  254. dep.cleanup();
  255. }
  256. }
  257. }
  258. function effect(fn, options) {
  259. if (fn.effect instanceof ReactiveEffect) {
  260. fn = fn.effect.fn;
  261. }
  262. const _effect = new ReactiveEffect(fn, NOOP, () => {
  263. if (_effect.dirty) {
  264. _effect.run();
  265. }
  266. });
  267. if (options) {
  268. extend(_effect, options);
  269. if (options.scope) recordEffectScope(_effect, options.scope);
  270. }
  271. if (!options || !options.lazy) {
  272. _effect.run();
  273. }
  274. const runner = _effect.run.bind(_effect);
  275. runner.effect = _effect;
  276. return runner;
  277. }
  278. function stop(runner) {
  279. runner.effect.stop();
  280. }
  281. let shouldTrack = true;
  282. let pauseScheduleStack = 0;
  283. const trackStack = [];
  284. function pauseTracking() {
  285. trackStack.push(shouldTrack);
  286. shouldTrack = false;
  287. }
  288. function enableTracking() {
  289. trackStack.push(shouldTrack);
  290. shouldTrack = true;
  291. }
  292. function resetTracking() {
  293. const last = trackStack.pop();
  294. shouldTrack = last === void 0 ? true : last;
  295. }
  296. function pauseScheduling() {
  297. pauseScheduleStack++;
  298. }
  299. function resetScheduling() {
  300. pauseScheduleStack--;
  301. while (!pauseScheduleStack && queueEffectSchedulers.length) {
  302. queueEffectSchedulers.shift()();
  303. }
  304. }
  305. function trackEffect(effect2, dep, debuggerEventExtraInfo) {
  306. var _a;
  307. if (dep.get(effect2) !== effect2._trackId) {
  308. dep.set(effect2, effect2._trackId);
  309. const oldDep = effect2.deps[effect2._depsLength];
  310. if (oldDep !== dep) {
  311. if (oldDep) {
  312. cleanupDepEffect(oldDep, effect2);
  313. }
  314. effect2.deps[effect2._depsLength++] = dep;
  315. } else {
  316. effect2._depsLength++;
  317. }
  318. {
  319. (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  320. }
  321. }
  322. }
  323. const queueEffectSchedulers = [];
  324. function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
  325. var _a;
  326. pauseScheduling();
  327. for (const effect2 of dep.keys()) {
  328. let tracking;
  329. if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  330. effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
  331. effect2._dirtyLevel = dirtyLevel;
  332. }
  333. if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  334. {
  335. (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  336. }
  337. effect2.trigger();
  338. if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
  339. effect2._shouldSchedule = false;
  340. if (effect2.scheduler) {
  341. queueEffectSchedulers.push(effect2.scheduler);
  342. }
  343. }
  344. }
  345. }
  346. resetScheduling();
  347. }
  348. const createDep = (cleanup, computed) => {
  349. const dep = /* @__PURE__ */ new Map();
  350. dep.cleanup = cleanup;
  351. dep.computed = computed;
  352. return dep;
  353. };
  354. const targetMap = /* @__PURE__ */ new WeakMap();
  355. const ITERATE_KEY = Symbol("iterate" );
  356. const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" );
  357. function track(target, type, key) {
  358. if (shouldTrack && activeEffect) {
  359. let depsMap = targetMap.get(target);
  360. if (!depsMap) {
  361. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  362. }
  363. let dep = depsMap.get(key);
  364. if (!dep) {
  365. depsMap.set(key, dep = createDep(() => depsMap.delete(key)));
  366. }
  367. trackEffect(
  368. activeEffect,
  369. dep,
  370. {
  371. target,
  372. type,
  373. key
  374. }
  375. );
  376. }
  377. }
  378. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  379. const depsMap = targetMap.get(target);
  380. if (!depsMap) {
  381. return;
  382. }
  383. let deps = [];
  384. if (type === "clear") {
  385. deps = [...depsMap.values()];
  386. } else if (key === "length" && isArray(target)) {
  387. const newLength = Number(newValue);
  388. depsMap.forEach((dep, key2) => {
  389. if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
  390. deps.push(dep);
  391. }
  392. });
  393. } else {
  394. if (key !== void 0) {
  395. deps.push(depsMap.get(key));
  396. }
  397. switch (type) {
  398. case "add":
  399. if (!isArray(target)) {
  400. deps.push(depsMap.get(ITERATE_KEY));
  401. if (isMap(target)) {
  402. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  403. }
  404. } else if (isIntegerKey(key)) {
  405. deps.push(depsMap.get("length"));
  406. }
  407. break;
  408. case "delete":
  409. if (!isArray(target)) {
  410. deps.push(depsMap.get(ITERATE_KEY));
  411. if (isMap(target)) {
  412. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  413. }
  414. }
  415. break;
  416. case "set":
  417. if (isMap(target)) {
  418. deps.push(depsMap.get(ITERATE_KEY));
  419. }
  420. break;
  421. }
  422. }
  423. pauseScheduling();
  424. for (const dep of deps) {
  425. if (dep) {
  426. triggerEffects(
  427. dep,
  428. 4,
  429. {
  430. target,
  431. type,
  432. key,
  433. newValue,
  434. oldValue,
  435. oldTarget
  436. }
  437. );
  438. }
  439. }
  440. resetScheduling();
  441. }
  442. function getDepFromReactive(object, key) {
  443. const depsMap = targetMap.get(object);
  444. return depsMap && depsMap.get(key);
  445. }
  446. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  447. const builtInSymbols = new Set(
  448. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  449. );
  450. const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
  451. function createArrayInstrumentations() {
  452. const instrumentations = {};
  453. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  454. instrumentations[key] = function(...args) {
  455. const arr = toRaw(this);
  456. for (let i = 0, l = this.length; i < l; i++) {
  457. track(arr, "get", i + "");
  458. }
  459. const res = arr[key](...args);
  460. if (res === -1 || res === false) {
  461. return arr[key](...args.map(toRaw));
  462. } else {
  463. return res;
  464. }
  465. };
  466. });
  467. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  468. instrumentations[key] = function(...args) {
  469. pauseTracking();
  470. pauseScheduling();
  471. const res = toRaw(this)[key].apply(this, args);
  472. resetScheduling();
  473. resetTracking();
  474. return res;
  475. };
  476. });
  477. return instrumentations;
  478. }
  479. function hasOwnProperty(key) {
  480. if (!isSymbol(key)) key = String(key);
  481. const obj = toRaw(this);
  482. track(obj, "has", key);
  483. return obj.hasOwnProperty(key);
  484. }
  485. class BaseReactiveHandler {
  486. constructor(_isReadonly = false, _isShallow = false) {
  487. this._isReadonly = _isReadonly;
  488. this._isShallow = _isShallow;
  489. }
  490. get(target, key, receiver) {
  491. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  492. if (key === "__v_isReactive") {
  493. return !isReadonly2;
  494. } else if (key === "__v_isReadonly") {
  495. return isReadonly2;
  496. } else if (key === "__v_isShallow") {
  497. return isShallow2;
  498. } else if (key === "__v_raw") {
  499. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  500. // this means the receiver is a user proxy of the reactive proxy
  501. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  502. return target;
  503. }
  504. return;
  505. }
  506. const targetIsArray = isArray(target);
  507. if (!isReadonly2) {
  508. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  509. return Reflect.get(arrayInstrumentations, key, receiver);
  510. }
  511. if (key === "hasOwnProperty") {
  512. return hasOwnProperty;
  513. }
  514. }
  515. const res = Reflect.get(target, key, receiver);
  516. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  517. return res;
  518. }
  519. if (!isReadonly2) {
  520. track(target, "get", key);
  521. }
  522. if (isShallow2) {
  523. return res;
  524. }
  525. if (isRef(res)) {
  526. return targetIsArray && isIntegerKey(key) ? res : res.value;
  527. }
  528. if (isObject(res)) {
  529. return isReadonly2 ? readonly(res) : reactive(res);
  530. }
  531. return res;
  532. }
  533. }
  534. class MutableReactiveHandler extends BaseReactiveHandler {
  535. constructor(isShallow2 = false) {
  536. super(false, isShallow2);
  537. }
  538. set(target, key, value, receiver) {
  539. let oldValue = target[key];
  540. if (!this._isShallow) {
  541. const isOldValueReadonly = isReadonly(oldValue);
  542. if (!isShallow(value) && !isReadonly(value)) {
  543. oldValue = toRaw(oldValue);
  544. value = toRaw(value);
  545. }
  546. if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
  547. if (isOldValueReadonly) {
  548. return false;
  549. } else {
  550. oldValue.value = value;
  551. return true;
  552. }
  553. }
  554. }
  555. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  556. const result = Reflect.set(target, key, value, receiver);
  557. if (target === toRaw(receiver)) {
  558. if (!hadKey) {
  559. trigger(target, "add", key, value);
  560. } else if (hasChanged(value, oldValue)) {
  561. trigger(target, "set", key, value, oldValue);
  562. }
  563. }
  564. return result;
  565. }
  566. deleteProperty(target, key) {
  567. const hadKey = hasOwn(target, key);
  568. const oldValue = target[key];
  569. const result = Reflect.deleteProperty(target, key);
  570. if (result && hadKey) {
  571. trigger(target, "delete", key, void 0, oldValue);
  572. }
  573. return result;
  574. }
  575. has(target, key) {
  576. const result = Reflect.has(target, key);
  577. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  578. track(target, "has", key);
  579. }
  580. return result;
  581. }
  582. ownKeys(target) {
  583. track(
  584. target,
  585. "iterate",
  586. isArray(target) ? "length" : ITERATE_KEY
  587. );
  588. return Reflect.ownKeys(target);
  589. }
  590. }
  591. class ReadonlyReactiveHandler extends BaseReactiveHandler {
  592. constructor(isShallow2 = false) {
  593. super(true, isShallow2);
  594. }
  595. set(target, key) {
  596. {
  597. warn(
  598. `Set operation on key "${String(key)}" failed: target is readonly.`,
  599. target
  600. );
  601. }
  602. return true;
  603. }
  604. deleteProperty(target, key) {
  605. {
  606. warn(
  607. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  608. target
  609. );
  610. }
  611. return true;
  612. }
  613. }
  614. const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
  615. const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
  616. const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
  617. true
  618. );
  619. const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
  620. const toShallow = (value) => value;
  621. const getProto = (v) => Reflect.getPrototypeOf(v);
  622. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  623. target = target["__v_raw"];
  624. const rawTarget = toRaw(target);
  625. const rawKey = toRaw(key);
  626. if (!isReadonly2) {
  627. if (hasChanged(key, rawKey)) {
  628. track(rawTarget, "get", key);
  629. }
  630. track(rawTarget, "get", rawKey);
  631. }
  632. const { has: has2 } = getProto(rawTarget);
  633. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  634. if (has2.call(rawTarget, key)) {
  635. return wrap(target.get(key));
  636. } else if (has2.call(rawTarget, rawKey)) {
  637. return wrap(target.get(rawKey));
  638. } else if (target !== rawTarget) {
  639. target.get(key);
  640. }
  641. }
  642. function has(key, isReadonly2 = false) {
  643. const target = this["__v_raw"];
  644. const rawTarget = toRaw(target);
  645. const rawKey = toRaw(key);
  646. if (!isReadonly2) {
  647. if (hasChanged(key, rawKey)) {
  648. track(rawTarget, "has", key);
  649. }
  650. track(rawTarget, "has", rawKey);
  651. }
  652. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  653. }
  654. function size(target, isReadonly2 = false) {
  655. target = target["__v_raw"];
  656. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  657. return Reflect.get(target, "size", target);
  658. }
  659. function add(value, _isShallow = false) {
  660. if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
  661. value = toRaw(value);
  662. }
  663. const target = toRaw(this);
  664. const proto = getProto(target);
  665. const hadKey = proto.has.call(target, value);
  666. if (!hadKey) {
  667. target.add(value);
  668. trigger(target, "add", value, value);
  669. }
  670. return this;
  671. }
  672. function set(key, value, _isShallow = false) {
  673. if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
  674. value = toRaw(value);
  675. }
  676. const target = toRaw(this);
  677. const { has: has2, get: get2 } = getProto(target);
  678. let hadKey = has2.call(target, key);
  679. if (!hadKey) {
  680. key = toRaw(key);
  681. hadKey = has2.call(target, key);
  682. } else {
  683. checkIdentityKeys(target, has2, key);
  684. }
  685. const oldValue = get2.call(target, key);
  686. target.set(key, value);
  687. if (!hadKey) {
  688. trigger(target, "add", key, value);
  689. } else if (hasChanged(value, oldValue)) {
  690. trigger(target, "set", key, value, oldValue);
  691. }
  692. return this;
  693. }
  694. function deleteEntry(key) {
  695. const target = toRaw(this);
  696. const { has: has2, get: get2 } = getProto(target);
  697. let hadKey = has2.call(target, key);
  698. if (!hadKey) {
  699. key = toRaw(key);
  700. hadKey = has2.call(target, key);
  701. } else {
  702. checkIdentityKeys(target, has2, key);
  703. }
  704. const oldValue = get2 ? get2.call(target, key) : void 0;
  705. const result = target.delete(key);
  706. if (hadKey) {
  707. trigger(target, "delete", key, void 0, oldValue);
  708. }
  709. return result;
  710. }
  711. function clear() {
  712. const target = toRaw(this);
  713. const hadItems = target.size !== 0;
  714. const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
  715. const result = target.clear();
  716. if (hadItems) {
  717. trigger(target, "clear", void 0, void 0, oldTarget);
  718. }
  719. return result;
  720. }
  721. function createForEach(isReadonly2, isShallow2) {
  722. return function forEach(callback, thisArg) {
  723. const observed = this;
  724. const target = observed["__v_raw"];
  725. const rawTarget = toRaw(target);
  726. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  727. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  728. return target.forEach((value, key) => {
  729. return callback.call(thisArg, wrap(value), wrap(key), observed);
  730. });
  731. };
  732. }
  733. function createIterableMethod(method, isReadonly2, isShallow2) {
  734. return function(...args) {
  735. const target = this["__v_raw"];
  736. const rawTarget = toRaw(target);
  737. const targetIsMap = isMap(rawTarget);
  738. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  739. const isKeyOnly = method === "keys" && targetIsMap;
  740. const innerIterator = target[method](...args);
  741. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  742. !isReadonly2 && track(
  743. rawTarget,
  744. "iterate",
  745. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  746. );
  747. return {
  748. // iterator protocol
  749. next() {
  750. const { value, done } = innerIterator.next();
  751. return done ? { value, done } : {
  752. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  753. done
  754. };
  755. },
  756. // iterable protocol
  757. [Symbol.iterator]() {
  758. return this;
  759. }
  760. };
  761. };
  762. }
  763. function createReadonlyMethod(type) {
  764. return function(...args) {
  765. {
  766. const key = args[0] ? `on key "${args[0]}" ` : ``;
  767. warn(
  768. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  769. toRaw(this)
  770. );
  771. }
  772. return type === "delete" ? false : type === "clear" ? void 0 : this;
  773. };
  774. }
  775. function createInstrumentations() {
  776. const mutableInstrumentations2 = {
  777. get(key) {
  778. return get(this, key);
  779. },
  780. get size() {
  781. return size(this);
  782. },
  783. has,
  784. add,
  785. set,
  786. delete: deleteEntry,
  787. clear,
  788. forEach: createForEach(false, false)
  789. };
  790. const shallowInstrumentations2 = {
  791. get(key) {
  792. return get(this, key, false, true);
  793. },
  794. get size() {
  795. return size(this);
  796. },
  797. has,
  798. add(value) {
  799. return add.call(this, value, true);
  800. },
  801. set(key, value) {
  802. return set.call(this, key, value, true);
  803. },
  804. delete: deleteEntry,
  805. clear,
  806. forEach: createForEach(false, true)
  807. };
  808. const readonlyInstrumentations2 = {
  809. get(key) {
  810. return get(this, key, true);
  811. },
  812. get size() {
  813. return size(this, true);
  814. },
  815. has(key) {
  816. return has.call(this, key, true);
  817. },
  818. add: createReadonlyMethod("add"),
  819. set: createReadonlyMethod("set"),
  820. delete: createReadonlyMethod("delete"),
  821. clear: createReadonlyMethod("clear"),
  822. forEach: createForEach(true, false)
  823. };
  824. const shallowReadonlyInstrumentations2 = {
  825. get(key) {
  826. return get(this, key, true, true);
  827. },
  828. get size() {
  829. return size(this, true);
  830. },
  831. has(key) {
  832. return has.call(this, key, true);
  833. },
  834. add: createReadonlyMethod("add"),
  835. set: createReadonlyMethod("set"),
  836. delete: createReadonlyMethod("delete"),
  837. clear: createReadonlyMethod("clear"),
  838. forEach: createForEach(true, true)
  839. };
  840. const iteratorMethods = [
  841. "keys",
  842. "values",
  843. "entries",
  844. Symbol.iterator
  845. ];
  846. iteratorMethods.forEach((method) => {
  847. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  848. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  849. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  850. shallowReadonlyInstrumentations2[method] = createIterableMethod(
  851. method,
  852. true,
  853. true
  854. );
  855. });
  856. return [
  857. mutableInstrumentations2,
  858. readonlyInstrumentations2,
  859. shallowInstrumentations2,
  860. shallowReadonlyInstrumentations2
  861. ];
  862. }
  863. const [
  864. mutableInstrumentations,
  865. readonlyInstrumentations,
  866. shallowInstrumentations,
  867. shallowReadonlyInstrumentations
  868. ] = /* @__PURE__ */ createInstrumentations();
  869. function createInstrumentationGetter(isReadonly2, shallow) {
  870. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  871. return (target, key, receiver) => {
  872. if (key === "__v_isReactive") {
  873. return !isReadonly2;
  874. } else if (key === "__v_isReadonly") {
  875. return isReadonly2;
  876. } else if (key === "__v_raw") {
  877. return target;
  878. }
  879. return Reflect.get(
  880. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  881. key,
  882. receiver
  883. );
  884. };
  885. }
  886. const mutableCollectionHandlers = {
  887. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  888. };
  889. const shallowCollectionHandlers = {
  890. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  891. };
  892. const readonlyCollectionHandlers = {
  893. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  894. };
  895. const shallowReadonlyCollectionHandlers = {
  896. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  897. };
  898. function checkIdentityKeys(target, has2, key) {
  899. const rawKey = toRaw(key);
  900. if (rawKey !== key && has2.call(target, rawKey)) {
  901. const type = toRawType(target);
  902. warn(
  903. `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
  904. );
  905. }
  906. }
  907. const reactiveMap = /* @__PURE__ */ new WeakMap();
  908. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  909. const readonlyMap = /* @__PURE__ */ new WeakMap();
  910. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  911. function targetTypeMap(rawType) {
  912. switch (rawType) {
  913. case "Object":
  914. case "Array":
  915. return 1 /* COMMON */;
  916. case "Map":
  917. case "Set":
  918. case "WeakMap":
  919. case "WeakSet":
  920. return 2 /* COLLECTION */;
  921. default:
  922. return 0 /* INVALID */;
  923. }
  924. }
  925. function getTargetType(value) {
  926. return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
  927. }
  928. function reactive(target) {
  929. if (isReadonly(target)) {
  930. return target;
  931. }
  932. return createReactiveObject(
  933. target,
  934. false,
  935. mutableHandlers,
  936. mutableCollectionHandlers,
  937. reactiveMap
  938. );
  939. }
  940. function shallowReactive(target) {
  941. return createReactiveObject(
  942. target,
  943. false,
  944. shallowReactiveHandlers,
  945. shallowCollectionHandlers,
  946. shallowReactiveMap
  947. );
  948. }
  949. function readonly(target) {
  950. return createReactiveObject(
  951. target,
  952. true,
  953. readonlyHandlers,
  954. readonlyCollectionHandlers,
  955. readonlyMap
  956. );
  957. }
  958. function shallowReadonly(target) {
  959. return createReactiveObject(
  960. target,
  961. true,
  962. shallowReadonlyHandlers,
  963. shallowReadonlyCollectionHandlers,
  964. shallowReadonlyMap
  965. );
  966. }
  967. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  968. if (!isObject(target)) {
  969. {
  970. warn(
  971. `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
  972. target
  973. )}`
  974. );
  975. }
  976. return target;
  977. }
  978. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  979. return target;
  980. }
  981. const existingProxy = proxyMap.get(target);
  982. if (existingProxy) {
  983. return existingProxy;
  984. }
  985. const targetType = getTargetType(target);
  986. if (targetType === 0 /* INVALID */) {
  987. return target;
  988. }
  989. const proxy = new Proxy(
  990. target,
  991. targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
  992. );
  993. proxyMap.set(target, proxy);
  994. return proxy;
  995. }
  996. function isReactive(value) {
  997. if (isReadonly(value)) {
  998. return isReactive(value["__v_raw"]);
  999. }
  1000. return !!(value && value["__v_isReactive"]);
  1001. }
  1002. function isReadonly(value) {
  1003. return !!(value && value["__v_isReadonly"]);
  1004. }
  1005. function isShallow(value) {
  1006. return !!(value && value["__v_isShallow"]);
  1007. }
  1008. function isProxy(value) {
  1009. return value ? !!value["__v_raw"] : false;
  1010. }
  1011. function toRaw(observed) {
  1012. const raw = observed && observed["__v_raw"];
  1013. return raw ? toRaw(raw) : observed;
  1014. }
  1015. function markRaw(value) {
  1016. if (Object.isExtensible(value)) {
  1017. def(value, "__v_skip", true);
  1018. }
  1019. return value;
  1020. }
  1021. const toReactive = (value) => isObject(value) ? reactive(value) : value;
  1022. const toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1023. const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;
  1024. class ComputedRefImpl {
  1025. constructor(getter, _setter, isReadonly, isSSR) {
  1026. this.getter = getter;
  1027. this._setter = _setter;
  1028. this.dep = void 0;
  1029. this.__v_isRef = true;
  1030. this["__v_isReadonly"] = false;
  1031. this.effect = new ReactiveEffect(
  1032. () => getter(this._value),
  1033. () => triggerRefValue(
  1034. this,
  1035. this.effect._dirtyLevel === 2 ? 2 : 3
  1036. )
  1037. );
  1038. this.effect.computed = this;
  1039. this.effect.active = this._cacheable = !isSSR;
  1040. this["__v_isReadonly"] = isReadonly;
  1041. }
  1042. get value() {
  1043. const self = toRaw(this);
  1044. if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
  1045. triggerRefValue(self, 4);
  1046. }
  1047. trackRefValue(self);
  1048. if (self.effect._dirtyLevel >= 2) {
  1049. if (this._warnRecursive) {
  1050. warn(COMPUTED_SIDE_EFFECT_WARN, `
  1051. getter: `, this.getter);
  1052. }
  1053. triggerRefValue(self, 2);
  1054. }
  1055. return self._value;
  1056. }
  1057. set value(newValue) {
  1058. this._setter(newValue);
  1059. }
  1060. // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
  1061. get _dirty() {
  1062. return this.effect.dirty;
  1063. }
  1064. set _dirty(v) {
  1065. this.effect.dirty = v;
  1066. }
  1067. // #endregion
  1068. }
  1069. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1070. let getter;
  1071. let setter;
  1072. const onlyGetter = isFunction(getterOrOptions);
  1073. if (onlyGetter) {
  1074. getter = getterOrOptions;
  1075. setter = () => {
  1076. warn("Write operation failed: computed value is readonly");
  1077. } ;
  1078. } else {
  1079. getter = getterOrOptions.get;
  1080. setter = getterOrOptions.set;
  1081. }
  1082. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  1083. if (debugOptions && !isSSR) {
  1084. cRef.effect.onTrack = debugOptions.onTrack;
  1085. cRef.effect.onTrigger = debugOptions.onTrigger;
  1086. }
  1087. return cRef;
  1088. }
  1089. function trackRefValue(ref2) {
  1090. var _a;
  1091. if (shouldTrack && activeEffect) {
  1092. ref2 = toRaw(ref2);
  1093. trackEffect(
  1094. activeEffect,
  1095. (_a = ref2.dep) != null ? _a : ref2.dep = createDep(
  1096. () => ref2.dep = void 0,
  1097. ref2 instanceof ComputedRefImpl ? ref2 : void 0
  1098. ),
  1099. {
  1100. target: ref2,
  1101. type: "get",
  1102. key: "value"
  1103. }
  1104. );
  1105. }
  1106. }
  1107. function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
  1108. ref2 = toRaw(ref2);
  1109. const dep = ref2.dep;
  1110. if (dep) {
  1111. triggerEffects(
  1112. dep,
  1113. dirtyLevel,
  1114. {
  1115. target: ref2,
  1116. type: "set",
  1117. key: "value",
  1118. newValue: newVal,
  1119. oldValue: oldVal
  1120. }
  1121. );
  1122. }
  1123. }
  1124. function isRef(r) {
  1125. return !!(r && r.__v_isRef === true);
  1126. }
  1127. function ref(value) {
  1128. return createRef(value, false);
  1129. }
  1130. function shallowRef(value) {
  1131. return createRef(value, true);
  1132. }
  1133. function createRef(rawValue, shallow) {
  1134. if (isRef(rawValue)) {
  1135. return rawValue;
  1136. }
  1137. return new RefImpl(rawValue, shallow);
  1138. }
  1139. class RefImpl {
  1140. constructor(value, __v_isShallow) {
  1141. this.__v_isShallow = __v_isShallow;
  1142. this.dep = void 0;
  1143. this.__v_isRef = true;
  1144. this._rawValue = __v_isShallow ? value : toRaw(value);
  1145. this._value = __v_isShallow ? value : toReactive(value);
  1146. }
  1147. get value() {
  1148. trackRefValue(this);
  1149. return this._value;
  1150. }
  1151. set value(newVal) {
  1152. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  1153. newVal = useDirectValue ? newVal : toRaw(newVal);
  1154. if (hasChanged(newVal, this._rawValue)) {
  1155. const oldVal = this._rawValue;
  1156. this._rawValue = newVal;
  1157. this._value = useDirectValue ? newVal : toReactive(newVal);
  1158. triggerRefValue(this, 4, newVal, oldVal);
  1159. }
  1160. }
  1161. }
  1162. function triggerRef(ref2) {
  1163. triggerRefValue(ref2, 4, ref2.value );
  1164. }
  1165. function unref(ref2) {
  1166. return isRef(ref2) ? ref2.value : ref2;
  1167. }
  1168. function toValue(source) {
  1169. return isFunction(source) ? source() : unref(source);
  1170. }
  1171. const shallowUnwrapHandlers = {
  1172. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  1173. set: (target, key, value, receiver) => {
  1174. const oldValue = target[key];
  1175. if (isRef(oldValue) && !isRef(value)) {
  1176. oldValue.value = value;
  1177. return true;
  1178. } else {
  1179. return Reflect.set(target, key, value, receiver);
  1180. }
  1181. }
  1182. };
  1183. function proxyRefs(objectWithRefs) {
  1184. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1185. }
  1186. class CustomRefImpl {
  1187. constructor(factory) {
  1188. this.dep = void 0;
  1189. this.__v_isRef = true;
  1190. const { get, set } = factory(
  1191. () => trackRefValue(this),
  1192. () => triggerRefValue(this)
  1193. );
  1194. this._get = get;
  1195. this._set = set;
  1196. }
  1197. get value() {
  1198. return this._get();
  1199. }
  1200. set value(newVal) {
  1201. this._set(newVal);
  1202. }
  1203. }
  1204. function customRef(factory) {
  1205. return new CustomRefImpl(factory);
  1206. }
  1207. function toRefs(object) {
  1208. if (!isProxy(object)) {
  1209. warn(`toRefs() expects a reactive object but received a plain one.`);
  1210. }
  1211. const ret = isArray(object) ? new Array(object.length) : {};
  1212. for (const key in object) {
  1213. ret[key] = propertyToRef(object, key);
  1214. }
  1215. return ret;
  1216. }
  1217. class ObjectRefImpl {
  1218. constructor(_object, _key, _defaultValue) {
  1219. this._object = _object;
  1220. this._key = _key;
  1221. this._defaultValue = _defaultValue;
  1222. this.__v_isRef = true;
  1223. }
  1224. get value() {
  1225. const val = this._object[this._key];
  1226. return val === void 0 ? this._defaultValue : val;
  1227. }
  1228. set value(newVal) {
  1229. this._object[this._key] = newVal;
  1230. }
  1231. get dep() {
  1232. return getDepFromReactive(toRaw(this._object), this._key);
  1233. }
  1234. }
  1235. class GetterRefImpl {
  1236. constructor(_getter) {
  1237. this._getter = _getter;
  1238. this.__v_isRef = true;
  1239. this.__v_isReadonly = true;
  1240. }
  1241. get value() {
  1242. return this._getter();
  1243. }
  1244. }
  1245. function toRef(source, key, defaultValue) {
  1246. if (isRef(source)) {
  1247. return source;
  1248. } else if (isFunction(source)) {
  1249. return new GetterRefImpl(source);
  1250. } else if (isObject(source) && arguments.length > 1) {
  1251. return propertyToRef(source, key, defaultValue);
  1252. } else {
  1253. return ref(source);
  1254. }
  1255. }
  1256. function propertyToRef(source, key, defaultValue) {
  1257. const val = source[key];
  1258. return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1259. }
  1260. const deferredComputed = computed;
  1261. const TrackOpTypes = {
  1262. "GET": "get",
  1263. "HAS": "has",
  1264. "ITERATE": "iterate"
  1265. };
  1266. const TriggerOpTypes = {
  1267. "SET": "set",
  1268. "ADD": "add",
  1269. "DELETE": "delete",
  1270. "CLEAR": "clear"
  1271. };
  1272. const ReactiveFlags = {
  1273. "SKIP": "__v_skip",
  1274. "IS_REACTIVE": "__v_isReactive",
  1275. "IS_READONLY": "__v_isReadonly",
  1276. "IS_SHALLOW": "__v_isShallow",
  1277. "RAW": "__v_raw"
  1278. };
  1279. exports.EffectScope = EffectScope;
  1280. exports.ITERATE_KEY = ITERATE_KEY;
  1281. exports.ReactiveEffect = ReactiveEffect;
  1282. exports.ReactiveFlags = ReactiveFlags;
  1283. exports.TrackOpTypes = TrackOpTypes;
  1284. exports.TriggerOpTypes = TriggerOpTypes;
  1285. exports.computed = computed;
  1286. exports.customRef = customRef;
  1287. exports.deferredComputed = deferredComputed;
  1288. exports.effect = effect;
  1289. exports.effectScope = effectScope;
  1290. exports.enableTracking = enableTracking;
  1291. exports.getCurrentScope = getCurrentScope;
  1292. exports.isProxy = isProxy;
  1293. exports.isReactive = isReactive;
  1294. exports.isReadonly = isReadonly;
  1295. exports.isRef = isRef;
  1296. exports.isShallow = isShallow;
  1297. exports.markRaw = markRaw;
  1298. exports.onScopeDispose = onScopeDispose;
  1299. exports.pauseScheduling = pauseScheduling;
  1300. exports.pauseTracking = pauseTracking;
  1301. exports.proxyRefs = proxyRefs;
  1302. exports.reactive = reactive;
  1303. exports.readonly = readonly;
  1304. exports.ref = ref;
  1305. exports.resetScheduling = resetScheduling;
  1306. exports.resetTracking = resetTracking;
  1307. exports.shallowReactive = shallowReactive;
  1308. exports.shallowReadonly = shallowReadonly;
  1309. exports.shallowRef = shallowRef;
  1310. exports.stop = stop;
  1311. exports.toRaw = toRaw;
  1312. exports.toRef = toRef;
  1313. exports.toRefs = toRefs;
  1314. exports.toValue = toValue;
  1315. exports.track = track;
  1316. exports.trigger = trigger;
  1317. exports.triggerRef = triggerRef;
  1318. exports.unref = unref;
  1319. return exports;
  1320. })({});