index.iife.js 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796
  1. var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
  2. if (VueDemi.install) {
  3. return VueDemi
  4. }
  5. if (!Vue) {
  6. console.error('[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.')
  7. return VueDemi
  8. }
  9. // Vue 2.7
  10. if (Vue.version.slice(0, 4) === '2.7.') {
  11. for (var key in Vue) {
  12. VueDemi[key] = Vue[key]
  13. }
  14. VueDemi.isVue2 = true
  15. VueDemi.isVue3 = false
  16. VueDemi.install = function () {}
  17. VueDemi.Vue = Vue
  18. VueDemi.Vue2 = Vue
  19. VueDemi.version = Vue.version
  20. VueDemi.warn = Vue.util.warn
  21. function createApp(rootComponent, rootProps) {
  22. var vm
  23. var provide = {}
  24. var app = {
  25. config: Vue.config,
  26. use: Vue.use.bind(Vue),
  27. mixin: Vue.mixin.bind(Vue),
  28. component: Vue.component.bind(Vue),
  29. provide: function (key, value) {
  30. provide[key] = value
  31. return this
  32. },
  33. directive: function (name, dir) {
  34. if (dir) {
  35. Vue.directive(name, dir)
  36. return app
  37. } else {
  38. return Vue.directive(name)
  39. }
  40. },
  41. mount: function (el, hydrating) {
  42. if (!vm) {
  43. vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))
  44. vm.$mount(el, hydrating)
  45. return vm
  46. } else {
  47. return vm
  48. }
  49. },
  50. unmount: function () {
  51. if (vm) {
  52. vm.$destroy()
  53. vm = undefined
  54. }
  55. },
  56. }
  57. return app
  58. }
  59. VueDemi.createApp = createApp
  60. }
  61. // Vue 2.6.x
  62. else if (Vue.version.slice(0, 2) === '2.') {
  63. if (VueCompositionAPI) {
  64. for (var key in VueCompositionAPI) {
  65. VueDemi[key] = VueCompositionAPI[key]
  66. }
  67. VueDemi.isVue2 = true
  68. VueDemi.isVue3 = false
  69. VueDemi.install = function () {}
  70. VueDemi.Vue = Vue
  71. VueDemi.Vue2 = Vue
  72. VueDemi.version = Vue.version
  73. } else {
  74. console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.')
  75. }
  76. }
  77. // Vue 3
  78. else if (Vue.version.slice(0, 2) === '3.') {
  79. for (var key in Vue) {
  80. VueDemi[key] = Vue[key]
  81. }
  82. VueDemi.isVue2 = false
  83. VueDemi.isVue3 = true
  84. VueDemi.install = function () {}
  85. VueDemi.Vue = Vue
  86. VueDemi.Vue2 = undefined
  87. VueDemi.version = Vue.version
  88. VueDemi.set = function (target, key, val) {
  89. if (Array.isArray(target)) {
  90. target.length = Math.max(target.length, key)
  91. target.splice(key, 1, val)
  92. return val
  93. }
  94. target[key] = val
  95. return val
  96. }
  97. VueDemi.del = function (target, key) {
  98. if (Array.isArray(target)) {
  99. target.splice(key, 1)
  100. return
  101. }
  102. delete target[key]
  103. }
  104. } else {
  105. console.error('[vue-demi] Vue version ' + Vue.version + ' is unsupported.')
  106. }
  107. return VueDemi
  108. })(
  109. (this.VueDemi = this.VueDemi || (typeof VueDemi !== 'undefined' ? VueDemi : {})),
  110. this.Vue || (typeof Vue !== 'undefined' ? Vue : undefined),
  111. this.VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
  112. );
  113. ;
  114. ;(function (exports, vueDemi) {
  115. 'use strict';
  116. var __defProp$9 = Object.defineProperty;
  117. var __defProps$6 = Object.defineProperties;
  118. var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
  119. var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
  120. var __hasOwnProp$b = Object.prototype.hasOwnProperty;
  121. var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
  122. var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  123. var __spreadValues$9 = (a, b) => {
  124. for (var prop in b || (b = {}))
  125. if (__hasOwnProp$b.call(b, prop))
  126. __defNormalProp$9(a, prop, b[prop]);
  127. if (__getOwnPropSymbols$b)
  128. for (var prop of __getOwnPropSymbols$b(b)) {
  129. if (__propIsEnum$b.call(b, prop))
  130. __defNormalProp$9(a, prop, b[prop]);
  131. }
  132. return a;
  133. };
  134. var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
  135. function computedEager(fn, options) {
  136. var _a;
  137. const result = vueDemi.shallowRef();
  138. vueDemi.watchEffect(() => {
  139. result.value = fn();
  140. }, __spreadProps$6(__spreadValues$9({}, options), {
  141. flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
  142. }));
  143. return vueDemi.readonly(result);
  144. }
  145. var _a;
  146. const isClient = typeof window !== "undefined";
  147. const isDef = (val) => typeof val !== "undefined";
  148. const assert = (condition, ...infos) => {
  149. if (!condition)
  150. console.warn(...infos);
  151. };
  152. const toString = Object.prototype.toString;
  153. const isBoolean = (val) => typeof val === "boolean";
  154. const isFunction = (val) => typeof val === "function";
  155. const isNumber = (val) => typeof val === "number";
  156. const isString = (val) => typeof val === "string";
  157. const isObject = (val) => toString.call(val) === "[object Object]";
  158. const isWindow = (val) => typeof window !== "undefined" && toString.call(val) === "[object Window]";
  159. const now = () => Date.now();
  160. const timestamp = () => +Date.now();
  161. const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
  162. const noop = () => {
  163. };
  164. const rand = (min, max) => {
  165. min = Math.ceil(min);
  166. max = Math.floor(max);
  167. return Math.floor(Math.random() * (max - min + 1)) + min;
  168. };
  169. const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
  170. const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);
  171. function resolveUnref(r) {
  172. return typeof r === "function" ? r() : vueDemi.unref(r);
  173. }
  174. function createFilterWrapper(filter, fn) {
  175. function wrapper(...args) {
  176. return new Promise((resolve, reject) => {
  177. Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
  178. });
  179. }
  180. return wrapper;
  181. }
  182. const bypassFilter = (invoke) => {
  183. return invoke();
  184. };
  185. function debounceFilter(ms, options = {}) {
  186. let timer;
  187. let maxTimer;
  188. let lastRejector = noop;
  189. const _clearTimeout = (timer2) => {
  190. clearTimeout(timer2);
  191. lastRejector();
  192. lastRejector = noop;
  193. };
  194. const filter = (invoke) => {
  195. const duration = resolveUnref(ms);
  196. const maxDuration = resolveUnref(options.maxWait);
  197. if (timer)
  198. _clearTimeout(timer);
  199. if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
  200. if (maxTimer) {
  201. _clearTimeout(maxTimer);
  202. maxTimer = null;
  203. }
  204. return Promise.resolve(invoke());
  205. }
  206. return new Promise((resolve, reject) => {
  207. lastRejector = options.rejectOnCancel ? reject : resolve;
  208. if (maxDuration && !maxTimer) {
  209. maxTimer = setTimeout(() => {
  210. if (timer)
  211. _clearTimeout(timer);
  212. maxTimer = null;
  213. resolve(invoke());
  214. }, maxDuration);
  215. }
  216. timer = setTimeout(() => {
  217. if (maxTimer)
  218. _clearTimeout(maxTimer);
  219. maxTimer = null;
  220. resolve(invoke());
  221. }, duration);
  222. });
  223. };
  224. return filter;
  225. }
  226. function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
  227. let lastExec = 0;
  228. let timer;
  229. let isLeading = true;
  230. let lastRejector = noop;
  231. let lastValue;
  232. const clear = () => {
  233. if (timer) {
  234. clearTimeout(timer);
  235. timer = void 0;
  236. lastRejector();
  237. lastRejector = noop;
  238. }
  239. };
  240. const filter = (_invoke) => {
  241. const duration = resolveUnref(ms);
  242. const elapsed = Date.now() - lastExec;
  243. const invoke = () => {
  244. return lastValue = _invoke();
  245. };
  246. clear();
  247. if (duration <= 0) {
  248. lastExec = Date.now();
  249. return invoke();
  250. }
  251. if (elapsed > duration && (leading || !isLeading)) {
  252. lastExec = Date.now();
  253. invoke();
  254. } else if (trailing) {
  255. lastValue = new Promise((resolve, reject) => {
  256. lastRejector = rejectOnCancel ? reject : resolve;
  257. timer = setTimeout(() => {
  258. lastExec = Date.now();
  259. isLeading = true;
  260. resolve(invoke());
  261. clear();
  262. }, Math.max(0, duration - elapsed));
  263. });
  264. }
  265. if (!leading && !timer)
  266. timer = setTimeout(() => isLeading = true, duration);
  267. isLeading = false;
  268. return lastValue;
  269. };
  270. return filter;
  271. }
  272. function pausableFilter(extendFilter = bypassFilter) {
  273. const isActive = vueDemi.ref(true);
  274. function pause() {
  275. isActive.value = false;
  276. }
  277. function resume() {
  278. isActive.value = true;
  279. }
  280. const eventFilter = (...args) => {
  281. if (isActive.value)
  282. extendFilter(...args);
  283. };
  284. return { isActive: vueDemi.readonly(isActive), pause, resume, eventFilter };
  285. }
  286. function __onlyVue3(name = "this function") {
  287. if (vueDemi.isVue3)
  288. return;
  289. throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
  290. }
  291. function __onlyVue27Plus(name = "this function") {
  292. if (vueDemi.isVue3 || vueDemi.version.startsWith("2.7."))
  293. return;
  294. throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);
  295. }
  296. const directiveHooks = {
  297. mounted: vueDemi.isVue3 ? "mounted" : "inserted",
  298. updated: vueDemi.isVue3 ? "updated" : "componentUpdated",
  299. unmounted: vueDemi.isVue3 ? "unmounted" : "unbind"
  300. };
  301. function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
  302. return new Promise((resolve, reject) => {
  303. if (throwOnTimeout)
  304. setTimeout(() => reject(reason), ms);
  305. else
  306. setTimeout(resolve, ms);
  307. });
  308. }
  309. function identity(arg) {
  310. return arg;
  311. }
  312. function createSingletonPromise(fn) {
  313. let _promise;
  314. function wrapper() {
  315. if (!_promise)
  316. _promise = fn();
  317. return _promise;
  318. }
  319. wrapper.reset = async () => {
  320. const _prev = _promise;
  321. _promise = void 0;
  322. if (_prev)
  323. await _prev;
  324. };
  325. return wrapper;
  326. }
  327. function invoke(fn) {
  328. return fn();
  329. }
  330. function containsProp(obj, ...props) {
  331. return props.some((k) => k in obj);
  332. }
  333. function increaseWithUnit(target, delta) {
  334. var _a;
  335. if (typeof target === "number")
  336. return target + delta;
  337. const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
  338. const unit = target.slice(value.length);
  339. const result = parseFloat(value) + delta;
  340. if (Number.isNaN(result))
  341. return target;
  342. return result + unit;
  343. }
  344. function objectPick(obj, keys, omitUndefined = false) {
  345. return keys.reduce((n, k) => {
  346. if (k in obj) {
  347. if (!omitUndefined || obj[k] !== void 0)
  348. n[k] = obj[k];
  349. }
  350. return n;
  351. }, {});
  352. }
  353. function computedWithControl(source, fn) {
  354. let v = void 0;
  355. let track;
  356. let trigger;
  357. const dirty = vueDemi.ref(true);
  358. const update = () => {
  359. dirty.value = true;
  360. trigger();
  361. };
  362. vueDemi.watch(source, update, { flush: "sync" });
  363. const get = isFunction(fn) ? fn : fn.get;
  364. const set = isFunction(fn) ? void 0 : fn.set;
  365. const result = vueDemi.customRef((_track, _trigger) => {
  366. track = _track;
  367. trigger = _trigger;
  368. return {
  369. get() {
  370. if (dirty.value) {
  371. v = get();
  372. dirty.value = false;
  373. }
  374. track();
  375. return v;
  376. },
  377. set(v2) {
  378. set == null ? void 0 : set(v2);
  379. }
  380. };
  381. });
  382. if (Object.isExtensible(result))
  383. result.trigger = update;
  384. return result;
  385. }
  386. function tryOnScopeDispose(fn) {
  387. if (vueDemi.getCurrentScope()) {
  388. vueDemi.onScopeDispose(fn);
  389. return true;
  390. }
  391. return false;
  392. }
  393. function createEventHook() {
  394. const fns = [];
  395. const off = (fn) => {
  396. const index = fns.indexOf(fn);
  397. if (index !== -1)
  398. fns.splice(index, 1);
  399. };
  400. const on = (fn) => {
  401. fns.push(fn);
  402. const offFn = () => off(fn);
  403. tryOnScopeDispose(offFn);
  404. return {
  405. off: offFn
  406. };
  407. };
  408. const trigger = (param) => {
  409. fns.forEach((fn) => fn(param));
  410. };
  411. return {
  412. on,
  413. off,
  414. trigger
  415. };
  416. }
  417. function createGlobalState(stateFactory) {
  418. let initialized = false;
  419. let state;
  420. const scope = vueDemi.effectScope(true);
  421. return () => {
  422. if (!initialized) {
  423. state = scope.run(stateFactory);
  424. initialized = true;
  425. }
  426. return state;
  427. };
  428. }
  429. function createInjectionState(composable) {
  430. const key = Symbol("InjectionState");
  431. const useProvidingState = (...args) => {
  432. const state = composable(...args);
  433. vueDemi.provide(key, state);
  434. return state;
  435. };
  436. const useInjectedState = () => vueDemi.inject(key);
  437. return [useProvidingState, useInjectedState];
  438. }
  439. function createSharedComposable(composable) {
  440. let subscribers = 0;
  441. let state;
  442. let scope;
  443. const dispose = () => {
  444. subscribers -= 1;
  445. if (scope && subscribers <= 0) {
  446. scope.stop();
  447. state = void 0;
  448. scope = void 0;
  449. }
  450. };
  451. return (...args) => {
  452. subscribers += 1;
  453. if (!state) {
  454. scope = vueDemi.effectScope(true);
  455. state = scope.run(() => composable(...args));
  456. }
  457. tryOnScopeDispose(dispose);
  458. return state;
  459. };
  460. }
  461. function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
  462. __onlyVue27Plus();
  463. for (const [key, value] of Object.entries(extend)) {
  464. if (key === "value")
  465. continue;
  466. if (vueDemi.isRef(value) && unwrap) {
  467. Object.defineProperty(ref, key, {
  468. get() {
  469. return value.value;
  470. },
  471. set(v) {
  472. value.value = v;
  473. },
  474. enumerable
  475. });
  476. } else {
  477. Object.defineProperty(ref, key, { value, enumerable });
  478. }
  479. }
  480. return ref;
  481. }
  482. function get(obj, key) {
  483. if (key == null)
  484. return vueDemi.unref(obj);
  485. return vueDemi.unref(obj)[key];
  486. }
  487. function isDefined(v) {
  488. return vueDemi.unref(v) != null;
  489. }
  490. var __defProp$8 = Object.defineProperty;
  491. var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
  492. var __hasOwnProp$a = Object.prototype.hasOwnProperty;
  493. var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
  494. var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  495. var __spreadValues$8 = (a, b) => {
  496. for (var prop in b || (b = {}))
  497. if (__hasOwnProp$a.call(b, prop))
  498. __defNormalProp$8(a, prop, b[prop]);
  499. if (__getOwnPropSymbols$a)
  500. for (var prop of __getOwnPropSymbols$a(b)) {
  501. if (__propIsEnum$a.call(b, prop))
  502. __defNormalProp$8(a, prop, b[prop]);
  503. }
  504. return a;
  505. };
  506. function makeDestructurable(obj, arr) {
  507. if (typeof Symbol !== "undefined") {
  508. const clone = __spreadValues$8({}, obj);
  509. Object.defineProperty(clone, Symbol.iterator, {
  510. enumerable: false,
  511. value() {
  512. let index = 0;
  513. return {
  514. next: () => ({
  515. value: arr[index++],
  516. done: index > arr.length
  517. })
  518. };
  519. }
  520. });
  521. return clone;
  522. } else {
  523. return Object.assign([...arr], obj);
  524. }
  525. }
  526. function reactify(fn, options) {
  527. const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vueDemi.unref : resolveUnref;
  528. return function(...args) {
  529. return vueDemi.computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
  530. };
  531. }
  532. function reactifyObject(obj, optionsOrKeys = {}) {
  533. let keys = [];
  534. let options;
  535. if (Array.isArray(optionsOrKeys)) {
  536. keys = optionsOrKeys;
  537. } else {
  538. options = optionsOrKeys;
  539. const { includeOwnProperties = true } = optionsOrKeys;
  540. keys.push(...Object.keys(obj));
  541. if (includeOwnProperties)
  542. keys.push(...Object.getOwnPropertyNames(obj));
  543. }
  544. return Object.fromEntries(keys.map((key) => {
  545. const value = obj[key];
  546. return [
  547. key,
  548. typeof value === "function" ? reactify(value.bind(obj), options) : value
  549. ];
  550. }));
  551. }
  552. function toReactive(objectRef) {
  553. if (!vueDemi.isRef(objectRef))
  554. return vueDemi.reactive(objectRef);
  555. const proxy = new Proxy({}, {
  556. get(_, p, receiver) {
  557. return vueDemi.unref(Reflect.get(objectRef.value, p, receiver));
  558. },
  559. set(_, p, value) {
  560. if (vueDemi.isRef(objectRef.value[p]) && !vueDemi.isRef(value))
  561. objectRef.value[p].value = value;
  562. else
  563. objectRef.value[p] = value;
  564. return true;
  565. },
  566. deleteProperty(_, p) {
  567. return Reflect.deleteProperty(objectRef.value, p);
  568. },
  569. has(_, p) {
  570. return Reflect.has(objectRef.value, p);
  571. },
  572. ownKeys() {
  573. return Object.keys(objectRef.value);
  574. },
  575. getOwnPropertyDescriptor() {
  576. return {
  577. enumerable: true,
  578. configurable: true
  579. };
  580. }
  581. });
  582. return vueDemi.reactive(proxy);
  583. }
  584. function reactiveComputed(fn) {
  585. return toReactive(vueDemi.computed(fn));
  586. }
  587. function reactiveOmit(obj, ...keys) {
  588. const flatKeys = keys.flat();
  589. return reactiveComputed(() => Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));
  590. }
  591. function reactivePick(obj, ...keys) {
  592. const flatKeys = keys.flat();
  593. return vueDemi.reactive(Object.fromEntries(flatKeys.map((k) => [k, vueDemi.toRef(obj, k)])));
  594. }
  595. function refAutoReset(defaultValue, afterMs = 1e4) {
  596. return vueDemi.customRef((track, trigger) => {
  597. let value = defaultValue;
  598. let timer;
  599. const resetAfter = () => setTimeout(() => {
  600. value = defaultValue;
  601. trigger();
  602. }, resolveUnref(afterMs));
  603. tryOnScopeDispose(() => {
  604. clearTimeout(timer);
  605. });
  606. return {
  607. get() {
  608. track();
  609. return value;
  610. },
  611. set(newValue) {
  612. value = newValue;
  613. trigger();
  614. clearTimeout(timer);
  615. timer = resetAfter();
  616. }
  617. };
  618. });
  619. }
  620. function useDebounceFn(fn, ms = 200, options = {}) {
  621. return createFilterWrapper(debounceFilter(ms, options), fn);
  622. }
  623. function refDebounced(value, ms = 200, options = {}) {
  624. const debounced = vueDemi.ref(value.value);
  625. const updater = useDebounceFn(() => {
  626. debounced.value = value.value;
  627. }, ms, options);
  628. vueDemi.watch(value, () => updater());
  629. return debounced;
  630. }
  631. function refDefault(source, defaultValue) {
  632. return vueDemi.computed({
  633. get() {
  634. var _a;
  635. return (_a = source.value) != null ? _a : defaultValue;
  636. },
  637. set(value) {
  638. source.value = value;
  639. }
  640. });
  641. }
  642. function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
  643. return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
  644. }
  645. function refThrottled(value, delay = 200, trailing = true, leading = true) {
  646. if (delay <= 0)
  647. return value;
  648. const throttled = vueDemi.ref(value.value);
  649. const updater = useThrottleFn(() => {
  650. throttled.value = value.value;
  651. }, delay, trailing, leading);
  652. vueDemi.watch(value, () => updater());
  653. return throttled;
  654. }
  655. function refWithControl(initial, options = {}) {
  656. let source = initial;
  657. let track;
  658. let trigger;
  659. const ref = vueDemi.customRef((_track, _trigger) => {
  660. track = _track;
  661. trigger = _trigger;
  662. return {
  663. get() {
  664. return get();
  665. },
  666. set(v) {
  667. set(v);
  668. }
  669. };
  670. });
  671. function get(tracking = true) {
  672. if (tracking)
  673. track();
  674. return source;
  675. }
  676. function set(value, triggering = true) {
  677. var _a, _b;
  678. if (value === source)
  679. return;
  680. const old = source;
  681. if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
  682. return;
  683. source = value;
  684. (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
  685. if (triggering)
  686. trigger();
  687. }
  688. const untrackedGet = () => get(false);
  689. const silentSet = (v) => set(v, false);
  690. const peek = () => get(false);
  691. const lay = (v) => set(v, false);
  692. return extendRef(ref, {
  693. get,
  694. set,
  695. untrackedGet,
  696. silentSet,
  697. peek,
  698. lay
  699. }, { enumerable: true });
  700. }
  701. const controlledRef = refWithControl;
  702. function resolveRef(r) {
  703. return typeof r === "function" ? vueDemi.computed(r) : vueDemi.ref(r);
  704. }
  705. function set(...args) {
  706. if (args.length === 2) {
  707. const [ref, value] = args;
  708. ref.value = value;
  709. }
  710. if (args.length === 3) {
  711. if (vueDemi.isVue2) {
  712. vueDemi.set(...args);
  713. } else {
  714. const [target, key, value] = args;
  715. target[key] = value;
  716. }
  717. }
  718. }
  719. function syncRef(left, right, options = {}) {
  720. var _a, _b;
  721. const {
  722. flush = "sync",
  723. deep = false,
  724. immediate = true,
  725. direction = "both",
  726. transform = {}
  727. } = options;
  728. let watchLeft;
  729. let watchRight;
  730. const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;
  731. const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;
  732. if (direction === "both" || direction === "ltr") {
  733. watchLeft = vueDemi.watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });
  734. }
  735. if (direction === "both" || direction === "rtl") {
  736. watchRight = vueDemi.watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });
  737. }
  738. return () => {
  739. watchLeft == null ? void 0 : watchLeft();
  740. watchRight == null ? void 0 : watchRight();
  741. };
  742. }
  743. function syncRefs(source, targets, options = {}) {
  744. const {
  745. flush = "sync",
  746. deep = false,
  747. immediate = true
  748. } = options;
  749. if (!Array.isArray(targets))
  750. targets = [targets];
  751. return vueDemi.watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });
  752. }
  753. var __defProp$7 = Object.defineProperty;
  754. var __defProps$5 = Object.defineProperties;
  755. var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
  756. var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
  757. var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
  758. var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
  759. var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  760. var __spreadValues$7 = (a, b) => {
  761. for (var prop in b || (b = {}))
  762. if (__hasOwnProp$9.call(b, prop))
  763. __defNormalProp$7(a, prop, b[prop]);
  764. if (__getOwnPropSymbols$9)
  765. for (var prop of __getOwnPropSymbols$9(b)) {
  766. if (__propIsEnum$9.call(b, prop))
  767. __defNormalProp$7(a, prop, b[prop]);
  768. }
  769. return a;
  770. };
  771. var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
  772. function toRefs(objectRef) {
  773. if (!vueDemi.isRef(objectRef))
  774. return vueDemi.toRefs(objectRef);
  775. const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};
  776. for (const key in objectRef.value) {
  777. result[key] = vueDemi.customRef(() => ({
  778. get() {
  779. return objectRef.value[key];
  780. },
  781. set(v) {
  782. if (Array.isArray(objectRef.value)) {
  783. const copy = [...objectRef.value];
  784. copy[key] = v;
  785. objectRef.value = copy;
  786. } else {
  787. const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });
  788. Object.setPrototypeOf(newObject, objectRef.value);
  789. objectRef.value = newObject;
  790. }
  791. }
  792. }));
  793. }
  794. return result;
  795. }
  796. function tryOnBeforeMount(fn, sync = true) {
  797. if (vueDemi.getCurrentInstance())
  798. vueDemi.onBeforeMount(fn);
  799. else if (sync)
  800. fn();
  801. else
  802. vueDemi.nextTick(fn);
  803. }
  804. function tryOnBeforeUnmount(fn) {
  805. if (vueDemi.getCurrentInstance())
  806. vueDemi.onBeforeUnmount(fn);
  807. }
  808. function tryOnMounted(fn, sync = true) {
  809. if (vueDemi.getCurrentInstance())
  810. vueDemi.onMounted(fn);
  811. else if (sync)
  812. fn();
  813. else
  814. vueDemi.nextTick(fn);
  815. }
  816. function tryOnUnmounted(fn) {
  817. if (vueDemi.getCurrentInstance())
  818. vueDemi.onUnmounted(fn);
  819. }
  820. function createUntil(r, isNot = false) {
  821. function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
  822. let stop = null;
  823. const watcher = new Promise((resolve) => {
  824. stop = vueDemi.watch(r, (v) => {
  825. if (condition(v) !== isNot) {
  826. stop == null ? void 0 : stop();
  827. resolve(v);
  828. }
  829. }, {
  830. flush,
  831. deep,
  832. immediate: true
  833. });
  834. });
  835. const promises = [watcher];
  836. if (timeout != null) {
  837. promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));
  838. }
  839. return Promise.race(promises);
  840. }
  841. function toBe(value, options) {
  842. if (!vueDemi.isRef(value))
  843. return toMatch((v) => v === value, options);
  844. const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
  845. let stop = null;
  846. const watcher = new Promise((resolve) => {
  847. stop = vueDemi.watch([r, value], ([v1, v2]) => {
  848. if (isNot !== (v1 === v2)) {
  849. stop == null ? void 0 : stop();
  850. resolve(v1);
  851. }
  852. }, {
  853. flush,
  854. deep,
  855. immediate: true
  856. });
  857. });
  858. const promises = [watcher];
  859. if (timeout != null) {
  860. promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {
  861. stop == null ? void 0 : stop();
  862. return resolveUnref(r);
  863. }));
  864. }
  865. return Promise.race(promises);
  866. }
  867. function toBeTruthy(options) {
  868. return toMatch((v) => Boolean(v), options);
  869. }
  870. function toBeNull(options) {
  871. return toBe(null, options);
  872. }
  873. function toBeUndefined(options) {
  874. return toBe(void 0, options);
  875. }
  876. function toBeNaN(options) {
  877. return toMatch(Number.isNaN, options);
  878. }
  879. function toContains(value, options) {
  880. return toMatch((v) => {
  881. const array = Array.from(v);
  882. return array.includes(value) || array.includes(resolveUnref(value));
  883. }, options);
  884. }
  885. function changed(options) {
  886. return changedTimes(1, options);
  887. }
  888. function changedTimes(n = 1, options) {
  889. let count = -1;
  890. return toMatch(() => {
  891. count += 1;
  892. return count >= n;
  893. }, options);
  894. }
  895. if (Array.isArray(resolveUnref(r))) {
  896. const instance = {
  897. toMatch,
  898. toContains,
  899. changed,
  900. changedTimes,
  901. get not() {
  902. return createUntil(r, !isNot);
  903. }
  904. };
  905. return instance;
  906. } else {
  907. const instance = {
  908. toMatch,
  909. toBe,
  910. toBeTruthy,
  911. toBeNull,
  912. toBeNaN,
  913. toBeUndefined,
  914. changed,
  915. changedTimes,
  916. get not() {
  917. return createUntil(r, !isNot);
  918. }
  919. };
  920. return instance;
  921. }
  922. }
  923. function until(r) {
  924. return createUntil(r);
  925. }
  926. function useArrayEvery(list, fn) {
  927. return vueDemi.computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));
  928. }
  929. function useArrayFilter(list, fn) {
  930. return vueDemi.computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));
  931. }
  932. function useArrayFind(list, fn) {
  933. return vueDemi.computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));
  934. }
  935. function useArrayFindIndex(list, fn) {
  936. return vueDemi.computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));
  937. }
  938. function findLast(arr, cb) {
  939. let index = arr.length;
  940. while (index-- > 0) {
  941. if (cb(arr[index], index, arr))
  942. return arr[index];
  943. }
  944. return void 0;
  945. }
  946. function useArrayFindLast(list, fn) {
  947. return vueDemi.computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));
  948. }
  949. function useArrayJoin(list, separator) {
  950. return vueDemi.computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));
  951. }
  952. function useArrayMap(list, fn) {
  953. return vueDemi.computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));
  954. }
  955. function useArrayReduce(list, reducer, ...args) {
  956. const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);
  957. return vueDemi.computed(() => {
  958. const resolved = resolveUnref(list);
  959. return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);
  960. });
  961. }
  962. function useArraySome(list, fn) {
  963. return vueDemi.computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));
  964. }
  965. function useArrayUnique(list) {
  966. return vueDemi.computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);
  967. }
  968. function useCounter(initialValue = 0, options = {}) {
  969. const count = vueDemi.ref(initialValue);
  970. const {
  971. max = Infinity,
  972. min = -Infinity
  973. } = options;
  974. const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
  975. const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
  976. const get = () => count.value;
  977. const set = (val) => count.value = Math.max(min, Math.min(max, val));
  978. const reset = (val = initialValue) => {
  979. initialValue = val;
  980. return set(val);
  981. };
  982. return { count, inc, dec, get, set, reset };
  983. }
  984. const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
  985. const REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
  986. const defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {
  987. let m = hours < 12 ? "AM" : "PM";
  988. if (hasPeriod)
  989. m = m.split("").reduce((acc, curr) => acc += `${curr}.`, "");
  990. return isLowercase ? m.toLowerCase() : m;
  991. };
  992. const formatDate = (date, formatStr, options = {}) => {
  993. var _a;
  994. const years = date.getFullYear();
  995. const month = date.getMonth();
  996. const days = date.getDate();
  997. const hours = date.getHours();
  998. const minutes = date.getMinutes();
  999. const seconds = date.getSeconds();
  1000. const milliseconds = date.getMilliseconds();
  1001. const day = date.getDay();
  1002. const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;
  1003. const matches = {
  1004. YY: () => String(years).slice(-2),
  1005. YYYY: () => years,
  1006. M: () => month + 1,
  1007. MM: () => `${month + 1}`.padStart(2, "0"),
  1008. MMM: () => date.toLocaleDateString(options.locales, { month: "short" }),
  1009. MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }),
  1010. D: () => String(days),
  1011. DD: () => `${days}`.padStart(2, "0"),
  1012. H: () => String(hours),
  1013. HH: () => `${hours}`.padStart(2, "0"),
  1014. h: () => `${hours % 12 || 12}`.padStart(1, "0"),
  1015. hh: () => `${hours % 12 || 12}`.padStart(2, "0"),
  1016. m: () => String(minutes),
  1017. mm: () => `${minutes}`.padStart(2, "0"),
  1018. s: () => String(seconds),
  1019. ss: () => `${seconds}`.padStart(2, "0"),
  1020. SSS: () => `${milliseconds}`.padStart(3, "0"),
  1021. d: () => day,
  1022. dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }),
  1023. ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }),
  1024. dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }),
  1025. A: () => meridiem(hours, minutes),
  1026. AA: () => meridiem(hours, minutes, false, true),
  1027. a: () => meridiem(hours, minutes, true),
  1028. aa: () => meridiem(hours, minutes, true, true)
  1029. };
  1030. return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());
  1031. };
  1032. const normalizeDate = (date) => {
  1033. if (date === null)
  1034. return new Date(NaN);
  1035. if (date === void 0)
  1036. return new Date();
  1037. if (date instanceof Date)
  1038. return new Date(date);
  1039. if (typeof date === "string" && !/Z$/i.test(date)) {
  1040. const d = date.match(REGEX_PARSE);
  1041. if (d) {
  1042. const m = d[2] - 1 || 0;
  1043. const ms = (d[7] || "0").substring(0, 3);
  1044. return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
  1045. }
  1046. }
  1047. return new Date(date);
  1048. };
  1049. function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) {
  1050. return vueDemi.computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));
  1051. }
  1052. function useIntervalFn(cb, interval = 1e3, options = {}) {
  1053. const {
  1054. immediate = true,
  1055. immediateCallback = false
  1056. } = options;
  1057. let timer = null;
  1058. const isActive = vueDemi.ref(false);
  1059. function clean() {
  1060. if (timer) {
  1061. clearInterval(timer);
  1062. timer = null;
  1063. }
  1064. }
  1065. function pause() {
  1066. isActive.value = false;
  1067. clean();
  1068. }
  1069. function resume() {
  1070. const intervalValue = resolveUnref(interval);
  1071. if (intervalValue <= 0)
  1072. return;
  1073. isActive.value = true;
  1074. if (immediateCallback)
  1075. cb();
  1076. clean();
  1077. timer = setInterval(cb, intervalValue);
  1078. }
  1079. if (immediate && isClient)
  1080. resume();
  1081. if (vueDemi.isRef(interval) || isFunction(interval)) {
  1082. const stopWatch = vueDemi.watch(interval, () => {
  1083. if (isActive.value && isClient)
  1084. resume();
  1085. });
  1086. tryOnScopeDispose(stopWatch);
  1087. }
  1088. tryOnScopeDispose(pause);
  1089. return {
  1090. isActive,
  1091. pause,
  1092. resume
  1093. };
  1094. }
  1095. var __defProp$6 = Object.defineProperty;
  1096. var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
  1097. var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
  1098. var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
  1099. var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1100. var __spreadValues$6 = (a, b) => {
  1101. for (var prop in b || (b = {}))
  1102. if (__hasOwnProp$8.call(b, prop))
  1103. __defNormalProp$6(a, prop, b[prop]);
  1104. if (__getOwnPropSymbols$8)
  1105. for (var prop of __getOwnPropSymbols$8(b)) {
  1106. if (__propIsEnum$8.call(b, prop))
  1107. __defNormalProp$6(a, prop, b[prop]);
  1108. }
  1109. return a;
  1110. };
  1111. function useInterval(interval = 1e3, options = {}) {
  1112. const {
  1113. controls: exposeControls = false,
  1114. immediate = true,
  1115. callback
  1116. } = options;
  1117. const counter = vueDemi.ref(0);
  1118. const update = () => counter.value += 1;
  1119. const reset = () => {
  1120. counter.value = 0;
  1121. };
  1122. const controls = useIntervalFn(callback ? () => {
  1123. update();
  1124. callback(counter.value);
  1125. } : update, interval, { immediate });
  1126. if (exposeControls) {
  1127. return __spreadValues$6({
  1128. counter,
  1129. reset
  1130. }, controls);
  1131. } else {
  1132. return counter;
  1133. }
  1134. }
  1135. function useLastChanged(source, options = {}) {
  1136. var _a;
  1137. const ms = vueDemi.ref((_a = options.initialValue) != null ? _a : null);
  1138. vueDemi.watch(source, () => ms.value = timestamp(), options);
  1139. return ms;
  1140. }
  1141. function useTimeoutFn(cb, interval, options = {}) {
  1142. const {
  1143. immediate = true
  1144. } = options;
  1145. const isPending = vueDemi.ref(false);
  1146. let timer = null;
  1147. function clear() {
  1148. if (timer) {
  1149. clearTimeout(timer);
  1150. timer = null;
  1151. }
  1152. }
  1153. function stop() {
  1154. isPending.value = false;
  1155. clear();
  1156. }
  1157. function start(...args) {
  1158. clear();
  1159. isPending.value = true;
  1160. timer = setTimeout(() => {
  1161. isPending.value = false;
  1162. timer = null;
  1163. cb(...args);
  1164. }, resolveUnref(interval));
  1165. }
  1166. if (immediate) {
  1167. isPending.value = true;
  1168. if (isClient)
  1169. start();
  1170. }
  1171. tryOnScopeDispose(stop);
  1172. return {
  1173. isPending: vueDemi.readonly(isPending),
  1174. start,
  1175. stop
  1176. };
  1177. }
  1178. var __defProp$5 = Object.defineProperty;
  1179. var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
  1180. var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
  1181. var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
  1182. var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1183. var __spreadValues$5 = (a, b) => {
  1184. for (var prop in b || (b = {}))
  1185. if (__hasOwnProp$7.call(b, prop))
  1186. __defNormalProp$5(a, prop, b[prop]);
  1187. if (__getOwnPropSymbols$7)
  1188. for (var prop of __getOwnPropSymbols$7(b)) {
  1189. if (__propIsEnum$7.call(b, prop))
  1190. __defNormalProp$5(a, prop, b[prop]);
  1191. }
  1192. return a;
  1193. };
  1194. function useTimeout(interval = 1e3, options = {}) {
  1195. const {
  1196. controls: exposeControls = false,
  1197. callback
  1198. } = options;
  1199. const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);
  1200. const ready = vueDemi.computed(() => !controls.isPending.value);
  1201. if (exposeControls) {
  1202. return __spreadValues$5({
  1203. ready
  1204. }, controls);
  1205. } else {
  1206. return ready;
  1207. }
  1208. }
  1209. function useToNumber(value, options = {}) {
  1210. const {
  1211. method = "parseFloat",
  1212. radix,
  1213. nanToZero
  1214. } = options;
  1215. return vueDemi.computed(() => {
  1216. let resolved = resolveUnref(value);
  1217. if (typeof resolved === "string")
  1218. resolved = Number[method](resolved, radix);
  1219. if (nanToZero && isNaN(resolved))
  1220. resolved = 0;
  1221. return resolved;
  1222. });
  1223. }
  1224. function useToString(value) {
  1225. return vueDemi.computed(() => `${resolveUnref(value)}`);
  1226. }
  1227. function useToggle(initialValue = false, options = {}) {
  1228. const {
  1229. truthyValue = true,
  1230. falsyValue = false
  1231. } = options;
  1232. const valueIsRef = vueDemi.isRef(initialValue);
  1233. const _value = vueDemi.ref(initialValue);
  1234. function toggle(value) {
  1235. if (arguments.length) {
  1236. _value.value = value;
  1237. return _value.value;
  1238. } else {
  1239. const truthy = resolveUnref(truthyValue);
  1240. _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;
  1241. return _value.value;
  1242. }
  1243. }
  1244. if (valueIsRef)
  1245. return toggle;
  1246. else
  1247. return [_value, toggle];
  1248. }
  1249. function watchArray(source, cb, options) {
  1250. let oldList = (options == null ? void 0 : options.immediate) ? [] : [
  1251. ...source instanceof Function ? source() : Array.isArray(source) ? source : vueDemi.unref(source)
  1252. ];
  1253. return vueDemi.watch(source, (newList, _, onCleanup) => {
  1254. const oldListRemains = new Array(oldList.length);
  1255. const added = [];
  1256. for (const obj of newList) {
  1257. let found = false;
  1258. for (let i = 0; i < oldList.length; i++) {
  1259. if (!oldListRemains[i] && obj === oldList[i]) {
  1260. oldListRemains[i] = true;
  1261. found = true;
  1262. break;
  1263. }
  1264. }
  1265. if (!found)
  1266. added.push(obj);
  1267. }
  1268. const removed = oldList.filter((_2, i) => !oldListRemains[i]);
  1269. cb(newList, oldList, added, removed, onCleanup);
  1270. oldList = [...newList];
  1271. }, options);
  1272. }
  1273. var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
  1274. var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
  1275. var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
  1276. var __objRest$5 = (source, exclude) => {
  1277. var target = {};
  1278. for (var prop in source)
  1279. if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
  1280. target[prop] = source[prop];
  1281. if (source != null && __getOwnPropSymbols$6)
  1282. for (var prop of __getOwnPropSymbols$6(source)) {
  1283. if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
  1284. target[prop] = source[prop];
  1285. }
  1286. return target;
  1287. };
  1288. function watchWithFilter(source, cb, options = {}) {
  1289. const _a = options, {
  1290. eventFilter = bypassFilter
  1291. } = _a, watchOptions = __objRest$5(_a, [
  1292. "eventFilter"
  1293. ]);
  1294. return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
  1295. }
  1296. var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
  1297. var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
  1298. var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
  1299. var __objRest$4 = (source, exclude) => {
  1300. var target = {};
  1301. for (var prop in source)
  1302. if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
  1303. target[prop] = source[prop];
  1304. if (source != null && __getOwnPropSymbols$5)
  1305. for (var prop of __getOwnPropSymbols$5(source)) {
  1306. if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
  1307. target[prop] = source[prop];
  1308. }
  1309. return target;
  1310. };
  1311. function watchAtMost(source, cb, options) {
  1312. const _a = options, {
  1313. count
  1314. } = _a, watchOptions = __objRest$4(_a, [
  1315. "count"
  1316. ]);
  1317. const current = vueDemi.ref(0);
  1318. const stop = watchWithFilter(source, (...args) => {
  1319. current.value += 1;
  1320. if (current.value >= resolveUnref(count))
  1321. vueDemi.nextTick(() => stop());
  1322. cb(...args);
  1323. }, watchOptions);
  1324. return { count: current, stop };
  1325. }
  1326. var __defProp$4 = Object.defineProperty;
  1327. var __defProps$4 = Object.defineProperties;
  1328. var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
  1329. var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
  1330. var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
  1331. var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
  1332. var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1333. var __spreadValues$4 = (a, b) => {
  1334. for (var prop in b || (b = {}))
  1335. if (__hasOwnProp$4.call(b, prop))
  1336. __defNormalProp$4(a, prop, b[prop]);
  1337. if (__getOwnPropSymbols$4)
  1338. for (var prop of __getOwnPropSymbols$4(b)) {
  1339. if (__propIsEnum$4.call(b, prop))
  1340. __defNormalProp$4(a, prop, b[prop]);
  1341. }
  1342. return a;
  1343. };
  1344. var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
  1345. var __objRest$3 = (source, exclude) => {
  1346. var target = {};
  1347. for (var prop in source)
  1348. if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
  1349. target[prop] = source[prop];
  1350. if (source != null && __getOwnPropSymbols$4)
  1351. for (var prop of __getOwnPropSymbols$4(source)) {
  1352. if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
  1353. target[prop] = source[prop];
  1354. }
  1355. return target;
  1356. };
  1357. function watchDebounced(source, cb, options = {}) {
  1358. const _a = options, {
  1359. debounce = 0,
  1360. maxWait = void 0
  1361. } = _a, watchOptions = __objRest$3(_a, [
  1362. "debounce",
  1363. "maxWait"
  1364. ]);
  1365. return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {
  1366. eventFilter: debounceFilter(debounce, { maxWait })
  1367. }));
  1368. }
  1369. var __defProp$3 = Object.defineProperty;
  1370. var __defProps$3 = Object.defineProperties;
  1371. var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
  1372. var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
  1373. var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
  1374. var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
  1375. var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1376. var __spreadValues$3 = (a, b) => {
  1377. for (var prop in b || (b = {}))
  1378. if (__hasOwnProp$3.call(b, prop))
  1379. __defNormalProp$3(a, prop, b[prop]);
  1380. if (__getOwnPropSymbols$3)
  1381. for (var prop of __getOwnPropSymbols$3(b)) {
  1382. if (__propIsEnum$3.call(b, prop))
  1383. __defNormalProp$3(a, prop, b[prop]);
  1384. }
  1385. return a;
  1386. };
  1387. var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
  1388. var __objRest$2 = (source, exclude) => {
  1389. var target = {};
  1390. for (var prop in source)
  1391. if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
  1392. target[prop] = source[prop];
  1393. if (source != null && __getOwnPropSymbols$3)
  1394. for (var prop of __getOwnPropSymbols$3(source)) {
  1395. if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
  1396. target[prop] = source[prop];
  1397. }
  1398. return target;
  1399. };
  1400. function watchIgnorable(source, cb, options = {}) {
  1401. const _a = options, {
  1402. eventFilter = bypassFilter
  1403. } = _a, watchOptions = __objRest$2(_a, [
  1404. "eventFilter"
  1405. ]);
  1406. const filteredCb = createFilterWrapper(eventFilter, cb);
  1407. let ignoreUpdates;
  1408. let ignorePrevAsyncUpdates;
  1409. let stop;
  1410. if (watchOptions.flush === "sync") {
  1411. const ignore = vueDemi.ref(false);
  1412. ignorePrevAsyncUpdates = () => {
  1413. };
  1414. ignoreUpdates = (updater) => {
  1415. ignore.value = true;
  1416. updater();
  1417. ignore.value = false;
  1418. };
  1419. stop = vueDemi.watch(source, (...args) => {
  1420. if (!ignore.value)
  1421. filteredCb(...args);
  1422. }, watchOptions);
  1423. } else {
  1424. const disposables = [];
  1425. const ignoreCounter = vueDemi.ref(0);
  1426. const syncCounter = vueDemi.ref(0);
  1427. ignorePrevAsyncUpdates = () => {
  1428. ignoreCounter.value = syncCounter.value;
  1429. };
  1430. disposables.push(vueDemi.watch(source, () => {
  1431. syncCounter.value++;
  1432. }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: "sync" })));
  1433. ignoreUpdates = (updater) => {
  1434. const syncCounterPrev = syncCounter.value;
  1435. updater();
  1436. ignoreCounter.value += syncCounter.value - syncCounterPrev;
  1437. };
  1438. disposables.push(vueDemi.watch(source, (...args) => {
  1439. const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
  1440. ignoreCounter.value = 0;
  1441. syncCounter.value = 0;
  1442. if (ignore)
  1443. return;
  1444. filteredCb(...args);
  1445. }, watchOptions));
  1446. stop = () => {
  1447. disposables.forEach((fn) => fn());
  1448. };
  1449. }
  1450. return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
  1451. }
  1452. function watchOnce(source, cb, options) {
  1453. const stop = vueDemi.watch(source, (...args) => {
  1454. vueDemi.nextTick(() => stop());
  1455. return cb(...args);
  1456. }, options);
  1457. }
  1458. var __defProp$2 = Object.defineProperty;
  1459. var __defProps$2 = Object.defineProperties;
  1460. var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
  1461. var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
  1462. var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
  1463. var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
  1464. var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1465. var __spreadValues$2 = (a, b) => {
  1466. for (var prop in b || (b = {}))
  1467. if (__hasOwnProp$2.call(b, prop))
  1468. __defNormalProp$2(a, prop, b[prop]);
  1469. if (__getOwnPropSymbols$2)
  1470. for (var prop of __getOwnPropSymbols$2(b)) {
  1471. if (__propIsEnum$2.call(b, prop))
  1472. __defNormalProp$2(a, prop, b[prop]);
  1473. }
  1474. return a;
  1475. };
  1476. var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
  1477. var __objRest$1 = (source, exclude) => {
  1478. var target = {};
  1479. for (var prop in source)
  1480. if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
  1481. target[prop] = source[prop];
  1482. if (source != null && __getOwnPropSymbols$2)
  1483. for (var prop of __getOwnPropSymbols$2(source)) {
  1484. if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
  1485. target[prop] = source[prop];
  1486. }
  1487. return target;
  1488. };
  1489. function watchPausable(source, cb, options = {}) {
  1490. const _a = options, {
  1491. eventFilter: filter
  1492. } = _a, watchOptions = __objRest$1(_a, [
  1493. "eventFilter"
  1494. ]);
  1495. const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
  1496. const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {
  1497. eventFilter
  1498. }));
  1499. return { stop, pause, resume, isActive };
  1500. }
  1501. var __defProp$1 = Object.defineProperty;
  1502. var __defProps$1 = Object.defineProperties;
  1503. var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
  1504. var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
  1505. var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
  1506. var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
  1507. var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1508. var __spreadValues$1 = (a, b) => {
  1509. for (var prop in b || (b = {}))
  1510. if (__hasOwnProp$1.call(b, prop))
  1511. __defNormalProp$1(a, prop, b[prop]);
  1512. if (__getOwnPropSymbols$1)
  1513. for (var prop of __getOwnPropSymbols$1(b)) {
  1514. if (__propIsEnum$1.call(b, prop))
  1515. __defNormalProp$1(a, prop, b[prop]);
  1516. }
  1517. return a;
  1518. };
  1519. var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
  1520. var __objRest = (source, exclude) => {
  1521. var target = {};
  1522. for (var prop in source)
  1523. if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
  1524. target[prop] = source[prop];
  1525. if (source != null && __getOwnPropSymbols$1)
  1526. for (var prop of __getOwnPropSymbols$1(source)) {
  1527. if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
  1528. target[prop] = source[prop];
  1529. }
  1530. return target;
  1531. };
  1532. function watchThrottled(source, cb, options = {}) {
  1533. const _a = options, {
  1534. throttle = 0,
  1535. trailing = true,
  1536. leading = true
  1537. } = _a, watchOptions = __objRest(_a, [
  1538. "throttle",
  1539. "trailing",
  1540. "leading"
  1541. ]);
  1542. return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {
  1543. eventFilter: throttleFilter(throttle, trailing, leading)
  1544. }));
  1545. }
  1546. var __defProp = Object.defineProperty;
  1547. var __defProps = Object.defineProperties;
  1548. var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
  1549. var __getOwnPropSymbols = Object.getOwnPropertySymbols;
  1550. var __hasOwnProp = Object.prototype.hasOwnProperty;
  1551. var __propIsEnum = Object.prototype.propertyIsEnumerable;
  1552. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  1553. var __spreadValues = (a, b) => {
  1554. for (var prop in b || (b = {}))
  1555. if (__hasOwnProp.call(b, prop))
  1556. __defNormalProp(a, prop, b[prop]);
  1557. if (__getOwnPropSymbols)
  1558. for (var prop of __getOwnPropSymbols(b)) {
  1559. if (__propIsEnum.call(b, prop))
  1560. __defNormalProp(a, prop, b[prop]);
  1561. }
  1562. return a;
  1563. };
  1564. var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
  1565. function watchTriggerable(source, cb, options = {}) {
  1566. let cleanupFn;
  1567. function onEffect() {
  1568. if (!cleanupFn)
  1569. return;
  1570. const fn = cleanupFn;
  1571. cleanupFn = void 0;
  1572. fn();
  1573. }
  1574. function onCleanup(callback) {
  1575. cleanupFn = callback;
  1576. }
  1577. const _cb = (value, oldValue) => {
  1578. onEffect();
  1579. return cb(value, oldValue, onCleanup);
  1580. };
  1581. const res = watchIgnorable(source, _cb, options);
  1582. const { ignoreUpdates } = res;
  1583. const trigger = () => {
  1584. let res2;
  1585. ignoreUpdates(() => {
  1586. res2 = _cb(getWatchSources(source), getOldValue(source));
  1587. });
  1588. return res2;
  1589. };
  1590. return __spreadProps(__spreadValues({}, res), {
  1591. trigger
  1592. });
  1593. }
  1594. function getWatchSources(sources) {
  1595. if (vueDemi.isReactive(sources))
  1596. return sources;
  1597. if (Array.isArray(sources))
  1598. return sources.map((item) => getOneWatchSource(item));
  1599. return getOneWatchSource(sources);
  1600. }
  1601. function getOneWatchSource(source) {
  1602. return typeof source === "function" ? source() : vueDemi.unref(source);
  1603. }
  1604. function getOldValue(source) {
  1605. return Array.isArray(source) ? source.map(() => void 0) : void 0;
  1606. }
  1607. function whenever(source, cb, options) {
  1608. return vueDemi.watch(source, (v, ov, onInvalidate) => {
  1609. if (v)
  1610. cb(v, ov, onInvalidate);
  1611. }, options);
  1612. }
  1613. exports.__onlyVue27Plus = __onlyVue27Plus;
  1614. exports.__onlyVue3 = __onlyVue3;
  1615. exports.assert = assert;
  1616. exports.autoResetRef = refAutoReset;
  1617. exports.bypassFilter = bypassFilter;
  1618. exports.clamp = clamp;
  1619. exports.computedEager = computedEager;
  1620. exports.computedWithControl = computedWithControl;
  1621. exports.containsProp = containsProp;
  1622. exports.controlledComputed = computedWithControl;
  1623. exports.controlledRef = controlledRef;
  1624. exports.createEventHook = createEventHook;
  1625. exports.createFilterWrapper = createFilterWrapper;
  1626. exports.createGlobalState = createGlobalState;
  1627. exports.createInjectionState = createInjectionState;
  1628. exports.createReactiveFn = reactify;
  1629. exports.createSharedComposable = createSharedComposable;
  1630. exports.createSingletonPromise = createSingletonPromise;
  1631. exports.debounceFilter = debounceFilter;
  1632. exports.debouncedRef = refDebounced;
  1633. exports.debouncedWatch = watchDebounced;
  1634. exports.directiveHooks = directiveHooks;
  1635. exports.eagerComputed = computedEager;
  1636. exports.extendRef = extendRef;
  1637. exports.formatDate = formatDate;
  1638. exports.get = get;
  1639. exports.hasOwn = hasOwn;
  1640. exports.identity = identity;
  1641. exports.ignorableWatch = watchIgnorable;
  1642. exports.increaseWithUnit = increaseWithUnit;
  1643. exports.invoke = invoke;
  1644. exports.isBoolean = isBoolean;
  1645. exports.isClient = isClient;
  1646. exports.isDef = isDef;
  1647. exports.isDefined = isDefined;
  1648. exports.isFunction = isFunction;
  1649. exports.isIOS = isIOS;
  1650. exports.isNumber = isNumber;
  1651. exports.isObject = isObject;
  1652. exports.isString = isString;
  1653. exports.isWindow = isWindow;
  1654. exports.makeDestructurable = makeDestructurable;
  1655. exports.noop = noop;
  1656. exports.normalizeDate = normalizeDate;
  1657. exports.now = now;
  1658. exports.objectPick = objectPick;
  1659. exports.pausableFilter = pausableFilter;
  1660. exports.pausableWatch = watchPausable;
  1661. exports.promiseTimeout = promiseTimeout;
  1662. exports.rand = rand;
  1663. exports.reactify = reactify;
  1664. exports.reactifyObject = reactifyObject;
  1665. exports.reactiveComputed = reactiveComputed;
  1666. exports.reactiveOmit = reactiveOmit;
  1667. exports.reactivePick = reactivePick;
  1668. exports.refAutoReset = refAutoReset;
  1669. exports.refDebounced = refDebounced;
  1670. exports.refDefault = refDefault;
  1671. exports.refThrottled = refThrottled;
  1672. exports.refWithControl = refWithControl;
  1673. exports.resolveRef = resolveRef;
  1674. exports.resolveUnref = resolveUnref;
  1675. exports.set = set;
  1676. exports.syncRef = syncRef;
  1677. exports.syncRefs = syncRefs;
  1678. exports.throttleFilter = throttleFilter;
  1679. exports.throttledRef = refThrottled;
  1680. exports.throttledWatch = watchThrottled;
  1681. exports.timestamp = timestamp;
  1682. exports.toReactive = toReactive;
  1683. exports.toRefs = toRefs;
  1684. exports.tryOnBeforeMount = tryOnBeforeMount;
  1685. exports.tryOnBeforeUnmount = tryOnBeforeUnmount;
  1686. exports.tryOnMounted = tryOnMounted;
  1687. exports.tryOnScopeDispose = tryOnScopeDispose;
  1688. exports.tryOnUnmounted = tryOnUnmounted;
  1689. exports.until = until;
  1690. exports.useArrayEvery = useArrayEvery;
  1691. exports.useArrayFilter = useArrayFilter;
  1692. exports.useArrayFind = useArrayFind;
  1693. exports.useArrayFindIndex = useArrayFindIndex;
  1694. exports.useArrayFindLast = useArrayFindLast;
  1695. exports.useArrayJoin = useArrayJoin;
  1696. exports.useArrayMap = useArrayMap;
  1697. exports.useArrayReduce = useArrayReduce;
  1698. exports.useArraySome = useArraySome;
  1699. exports.useArrayUnique = useArrayUnique;
  1700. exports.useCounter = useCounter;
  1701. exports.useDateFormat = useDateFormat;
  1702. exports.useDebounce = refDebounced;
  1703. exports.useDebounceFn = useDebounceFn;
  1704. exports.useInterval = useInterval;
  1705. exports.useIntervalFn = useIntervalFn;
  1706. exports.useLastChanged = useLastChanged;
  1707. exports.useThrottle = refThrottled;
  1708. exports.useThrottleFn = useThrottleFn;
  1709. exports.useTimeout = useTimeout;
  1710. exports.useTimeoutFn = useTimeoutFn;
  1711. exports.useToNumber = useToNumber;
  1712. exports.useToString = useToString;
  1713. exports.useToggle = useToggle;
  1714. exports.watchArray = watchArray;
  1715. exports.watchAtMost = watchAtMost;
  1716. exports.watchDebounced = watchDebounced;
  1717. exports.watchIgnorable = watchIgnorable;
  1718. exports.watchOnce = watchOnce;
  1719. exports.watchPausable = watchPausable;
  1720. exports.watchThrottled = watchThrottled;
  1721. exports.watchTriggerable = watchTriggerable;
  1722. exports.watchWithFilter = watchWithFilter;
  1723. exports.whenever = whenever;
  1724. })(this.VueUse = this.VueUse || {}, VueDemi);