@vue/devtools-api 8.0.4 → 8.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3996 @@
1
+ var VueDevToolsApi = (function(exports) {
2
+
3
+ //#region rolldown:runtime
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __commonJS = (cb, mod) => function() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target$1) => (target$1 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target$1, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target$1, mod));
27
+
28
+ //#endregion
29
+
30
+ //#region ../shared/src/env.ts
31
+ const isBrowser = typeof navigator !== "undefined";
32
+ const target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
33
+ const isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
34
+ const isInIframe = isBrowser && target.self !== target.top;
35
+ const isInElectron = typeof navigator !== "undefined" && navigator.userAgent?.toLowerCase().includes("electron");
36
+ const isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
37
+
38
+ //#endregion
39
+ //#region ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js
40
+ var require_rfdc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js": ((exports, module) => {
41
+ module.exports = rfdc$1;
42
+ function copyBuffer(cur) {
43
+ if (cur instanceof Buffer) return Buffer.from(cur);
44
+ return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
45
+ }
46
+ function rfdc$1(opts) {
47
+ opts = opts || {};
48
+ if (opts.circles) return rfdcCircles(opts);
49
+ const constructorHandlers = /* @__PURE__ */ new Map();
50
+ constructorHandlers.set(Date, (o) => new Date(o));
51
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
52
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
53
+ if (opts.constructorHandlers) for (const handler$1 of opts.constructorHandlers) constructorHandlers.set(handler$1[0], handler$1[1]);
54
+ let handler = null;
55
+ return opts.proto ? cloneProto : clone;
56
+ function cloneArray(a, fn) {
57
+ const keys = Object.keys(a);
58
+ const a2 = new Array(keys.length);
59
+ for (let i = 0; i < keys.length; i++) {
60
+ const k = keys[i];
61
+ const cur = a[k];
62
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
63
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
64
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
65
+ else a2[k] = fn(cur);
66
+ }
67
+ return a2;
68
+ }
69
+ function clone(o) {
70
+ if (typeof o !== "object" || o === null) return o;
71
+ if (Array.isArray(o)) return cloneArray(o, clone);
72
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
73
+ const o2 = {};
74
+ for (const k in o) {
75
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
76
+ const cur = o[k];
77
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
78
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
79
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
80
+ else o2[k] = clone(cur);
81
+ }
82
+ return o2;
83
+ }
84
+ function cloneProto(o) {
85
+ if (typeof o !== "object" || o === null) return o;
86
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
87
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
88
+ const o2 = {};
89
+ for (const k in o) {
90
+ const cur = o[k];
91
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
92
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
93
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
94
+ else o2[k] = cloneProto(cur);
95
+ }
96
+ return o2;
97
+ }
98
+ }
99
+ function rfdcCircles(opts) {
100
+ const refs = [];
101
+ const refsNew = [];
102
+ const constructorHandlers = /* @__PURE__ */ new Map();
103
+ constructorHandlers.set(Date, (o) => new Date(o));
104
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
105
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
106
+ if (opts.constructorHandlers) for (const handler$1 of opts.constructorHandlers) constructorHandlers.set(handler$1[0], handler$1[1]);
107
+ let handler = null;
108
+ return opts.proto ? cloneProto : clone;
109
+ function cloneArray(a, fn) {
110
+ const keys = Object.keys(a);
111
+ const a2 = new Array(keys.length);
112
+ for (let i = 0; i < keys.length; i++) {
113
+ const k = keys[i];
114
+ const cur = a[k];
115
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
116
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
117
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
118
+ else {
119
+ const index = refs.indexOf(cur);
120
+ if (index !== -1) a2[k] = refsNew[index];
121
+ else a2[k] = fn(cur);
122
+ }
123
+ }
124
+ return a2;
125
+ }
126
+ function clone(o) {
127
+ if (typeof o !== "object" || o === null) return o;
128
+ if (Array.isArray(o)) return cloneArray(o, clone);
129
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
130
+ const o2 = {};
131
+ refs.push(o);
132
+ refsNew.push(o2);
133
+ for (const k in o) {
134
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
135
+ const cur = o[k];
136
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
137
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
138
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
139
+ else {
140
+ const i = refs.indexOf(cur);
141
+ if (i !== -1) o2[k] = refsNew[i];
142
+ else o2[k] = clone(cur);
143
+ }
144
+ }
145
+ refs.pop();
146
+ refsNew.pop();
147
+ return o2;
148
+ }
149
+ function cloneProto(o) {
150
+ if (typeof o !== "object" || o === null) return o;
151
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
152
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
153
+ const o2 = {};
154
+ refs.push(o);
155
+ refsNew.push(o2);
156
+ for (const k in o) {
157
+ const cur = o[k];
158
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
159
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
160
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
161
+ else {
162
+ const i = refs.indexOf(cur);
163
+ if (i !== -1) o2[k] = refsNew[i];
164
+ else o2[k] = cloneProto(cur);
165
+ }
166
+ }
167
+ refs.pop();
168
+ refsNew.pop();
169
+ return o2;
170
+ }
171
+ }
172
+ }) });
173
+
174
+ //#endregion
175
+ //#region ../shared/src/general.ts
176
+ var import_rfdc = /* @__PURE__ */ __toESM(require_rfdc(), 1);
177
+ const classifyRE = /(?:^|[-_/])(\w)/g;
178
+ function toUpper(_, c) {
179
+ return c ? c.toUpperCase() : "";
180
+ }
181
+ function classify(str) {
182
+ return str && `${str}`.replace(classifyRE, toUpper);
183
+ }
184
+ function basename(filename, ext) {
185
+ let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
186
+ if (normalizedFilename.endsWith(`index${ext}`)) normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
187
+ const lastSlashIndex = normalizedFilename.lastIndexOf("/");
188
+ const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
189
+ if (ext) {
190
+ const extIndex = baseNameWithExt.lastIndexOf(ext);
191
+ return baseNameWithExt.substring(0, extIndex);
192
+ }
193
+ return "";
194
+ }
195
+ const HTTP_URL_RE = /^https?:\/\//;
196
+ /**
197
+ * Check a string is start with `/` or a valid http url
198
+ */
199
+ function isUrlString(str) {
200
+ return str.startsWith("/") || HTTP_URL_RE.test(str);
201
+ }
202
+ /**
203
+ * @copyright [rfdc](https://github.com/davidmarkclements/rfdc)
204
+ * @description A really fast deep clone alternative
205
+ */
206
+ const deepClone = (0, import_rfdc.default)({ circles: true });
207
+
208
+ //#endregion
209
+ //#region ../devtools-kit/src/core/component/utils/index.ts
210
+ function getComponentTypeName(options) {
211
+ const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
212
+ if (name === "index" && options.__file?.endsWith("index.vue")) return "";
213
+ return name;
214
+ }
215
+ function getComponentFileName(options) {
216
+ const file = options.__file;
217
+ if (file) return classify(basename(file, ".vue"));
218
+ }
219
+ function saveComponentGussedName(instance, name) {
220
+ instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
221
+ return name;
222
+ }
223
+ function getAppRecord(instance) {
224
+ if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__) return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
225
+ else if (instance.root) return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
226
+ }
227
+ function isFragment(instance) {
228
+ const subTreeType = instance.subTree?.type;
229
+ const appRecord = getAppRecord(instance);
230
+ if (appRecord) return appRecord?.types?.Fragment === subTreeType;
231
+ return false;
232
+ }
233
+ /**
234
+ * Get the appropriate display name for an instance.
235
+ *
236
+ * @param {Vue} instance
237
+ * @return {string}
238
+ */
239
+ function getInstanceName(instance) {
240
+ const name = getComponentTypeName(instance?.type || {});
241
+ if (name) return name;
242
+ if (instance?.root === instance) return "Root";
243
+ for (const key in instance.parent?.type?.components) if (instance.parent.type.components[key] === instance?.type) return saveComponentGussedName(instance, key);
244
+ for (const key in instance.appContext?.components) if (instance.appContext.components[key] === instance?.type) return saveComponentGussedName(instance, key);
245
+ const fileName = getComponentFileName(instance?.type || {});
246
+ if (fileName) return fileName;
247
+ return "Anonymous Component";
248
+ }
249
+ /**
250
+ * Returns a devtools unique id for instance.
251
+ * @param {Vue} instance
252
+ */
253
+ function getUniqueComponentId(instance) {
254
+ return `${instance?.appContext?.app?.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ ?? 0}:${instance === instance?.root ? "root" : instance.uid}`;
255
+ }
256
+ function getComponentInstance(appRecord, instanceId) {
257
+ instanceId = instanceId || `${appRecord.id}:root`;
258
+ return appRecord.instanceMap.get(instanceId) || appRecord.instanceMap.get(":root");
259
+ }
260
+
261
+ //#endregion
262
+ //#region ../devtools-kit/src/core/component/state/bounding-rect.ts
263
+ function createRect() {
264
+ const rect = {
265
+ top: 0,
266
+ bottom: 0,
267
+ left: 0,
268
+ right: 0,
269
+ get width() {
270
+ return rect.right - rect.left;
271
+ },
272
+ get height() {
273
+ return rect.bottom - rect.top;
274
+ }
275
+ };
276
+ return rect;
277
+ }
278
+ let range;
279
+ function getTextRect(node) {
280
+ if (!range) range = document.createRange();
281
+ range.selectNode(node);
282
+ return range.getBoundingClientRect();
283
+ }
284
+ function getFragmentRect(vnode) {
285
+ const rect = createRect();
286
+ if (!vnode.children) return rect;
287
+ for (let i = 0, l = vnode.children.length; i < l; i++) {
288
+ const childVnode = vnode.children[i];
289
+ let childRect;
290
+ if (childVnode.component) childRect = getComponentBoundingRect(childVnode.component);
291
+ else if (childVnode.el) {
292
+ const el = childVnode.el;
293
+ if (el.nodeType === 1 || el.getBoundingClientRect) childRect = el.getBoundingClientRect();
294
+ else if (el.nodeType === 3 && el.data.trim()) childRect = getTextRect(el);
295
+ }
296
+ if (childRect) mergeRects(rect, childRect);
297
+ }
298
+ return rect;
299
+ }
300
+ function mergeRects(a, b) {
301
+ if (!a.top || b.top < a.top) a.top = b.top;
302
+ if (!a.bottom || b.bottom > a.bottom) a.bottom = b.bottom;
303
+ if (!a.left || b.left < a.left) a.left = b.left;
304
+ if (!a.right || b.right > a.right) a.right = b.right;
305
+ return a;
306
+ }
307
+ const DEFAULT_RECT = {
308
+ top: 0,
309
+ left: 0,
310
+ right: 0,
311
+ bottom: 0,
312
+ width: 0,
313
+ height: 0
314
+ };
315
+ function getComponentBoundingRect(instance) {
316
+ const el = instance.subTree.el;
317
+ if (typeof window === "undefined") return DEFAULT_RECT;
318
+ if (isFragment(instance)) return getFragmentRect(instance.subTree);
319
+ else if (el?.nodeType === 1) return el?.getBoundingClientRect();
320
+ else if (instance.subTree.component) return getComponentBoundingRect(instance.subTree.component);
321
+ else return DEFAULT_RECT;
322
+ }
323
+
324
+ //#endregion
325
+ //#region ../devtools-kit/src/core/component/tree/el.ts
326
+ function getRootElementsFromComponentInstance(instance) {
327
+ if (isFragment(instance)) return getFragmentRootElements(instance.subTree);
328
+ if (!instance.subTree) return [];
329
+ return [instance.subTree.el];
330
+ }
331
+ function getFragmentRootElements(vnode) {
332
+ if (!vnode.children) return [];
333
+ const list = [];
334
+ vnode.children.forEach((childVnode) => {
335
+ if (childVnode.component) list.push(...getRootElementsFromComponentInstance(childVnode.component));
336
+ else if (childVnode?.el) list.push(childVnode.el);
337
+ });
338
+ return list;
339
+ }
340
+
341
+ //#endregion
342
+ //#region ../devtools-kit/src/core/component-highlighter/index.ts
343
+ const CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
344
+ const CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
345
+ const COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
346
+ const INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
347
+ const containerStyles = {
348
+ display: "block",
349
+ zIndex: 2147483640,
350
+ position: "fixed",
351
+ backgroundColor: "#42b88325",
352
+ border: "1px solid #42b88350",
353
+ borderRadius: "5px",
354
+ transition: "all 0.1s ease-in",
355
+ pointerEvents: "none"
356
+ };
357
+ const cardStyles = {
358
+ fontFamily: "Arial, Helvetica, sans-serif",
359
+ padding: "5px 8px",
360
+ borderRadius: "4px",
361
+ textAlign: "left",
362
+ position: "absolute",
363
+ left: 0,
364
+ color: "#e9e9e9",
365
+ fontSize: "14px",
366
+ fontWeight: 600,
367
+ lineHeight: "24px",
368
+ backgroundColor: "#42b883",
369
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
370
+ };
371
+ const indicatorStyles = {
372
+ display: "inline-block",
373
+ fontWeight: 400,
374
+ fontStyle: "normal",
375
+ fontSize: "12px",
376
+ opacity: .7
377
+ };
378
+ function getContainerElement() {
379
+ return document.getElementById(CONTAINER_ELEMENT_ID);
380
+ }
381
+ function getCardElement() {
382
+ return document.getElementById(CARD_ELEMENT_ID);
383
+ }
384
+ function getIndicatorElement() {
385
+ return document.getElementById(INDICATOR_ELEMENT_ID);
386
+ }
387
+ function getNameElement() {
388
+ return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
389
+ }
390
+ function getStyles(bounds) {
391
+ return {
392
+ left: `${Math.round(bounds.left * 100) / 100}px`,
393
+ top: `${Math.round(bounds.top * 100) / 100}px`,
394
+ width: `${Math.round(bounds.width * 100) / 100}px`,
395
+ height: `${Math.round(bounds.height * 100) / 100}px`
396
+ };
397
+ }
398
+ function create(options) {
399
+ const containerEl = document.createElement("div");
400
+ containerEl.id = options.elementId ?? CONTAINER_ELEMENT_ID;
401
+ Object.assign(containerEl.style, {
402
+ ...containerStyles,
403
+ ...getStyles(options.bounds),
404
+ ...options.style
405
+ });
406
+ const cardEl = document.createElement("span");
407
+ cardEl.id = CARD_ELEMENT_ID;
408
+ Object.assign(cardEl.style, {
409
+ ...cardStyles,
410
+ top: options.bounds.top < 35 ? 0 : "-35px"
411
+ });
412
+ const nameEl = document.createElement("span");
413
+ nameEl.id = COMPONENT_NAME_ELEMENT_ID;
414
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
415
+ const indicatorEl = document.createElement("i");
416
+ indicatorEl.id = INDICATOR_ELEMENT_ID;
417
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
418
+ Object.assign(indicatorEl.style, indicatorStyles);
419
+ cardEl.appendChild(nameEl);
420
+ cardEl.appendChild(indicatorEl);
421
+ containerEl.appendChild(cardEl);
422
+ document.body.appendChild(containerEl);
423
+ return containerEl;
424
+ }
425
+ function update(options) {
426
+ const containerEl = getContainerElement();
427
+ const cardEl = getCardElement();
428
+ const nameEl = getNameElement();
429
+ const indicatorEl = getIndicatorElement();
430
+ if (containerEl) {
431
+ Object.assign(containerEl.style, {
432
+ ...containerStyles,
433
+ ...getStyles(options.bounds)
434
+ });
435
+ Object.assign(cardEl.style, { top: options.bounds.top < 35 ? 0 : "-35px" });
436
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
437
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
438
+ }
439
+ }
440
+ function highlight(instance) {
441
+ const bounds = getComponentBoundingRect(instance);
442
+ if (!bounds.width && !bounds.height) return;
443
+ const name = getInstanceName(instance);
444
+ getContainerElement() ? update({
445
+ bounds,
446
+ name
447
+ }) : create({
448
+ bounds,
449
+ name
450
+ });
451
+ }
452
+ function unhighlight() {
453
+ const el = getContainerElement();
454
+ if (el) el.style.display = "none";
455
+ }
456
+ let inspectInstance = null;
457
+ function inspectFn(e) {
458
+ const target$1 = e.target;
459
+ if (target$1) {
460
+ const instance = target$1.__vueParentComponent;
461
+ if (instance) {
462
+ inspectInstance = instance;
463
+ if (instance.vnode.el) {
464
+ const bounds = getComponentBoundingRect(instance);
465
+ const name = getInstanceName(instance);
466
+ getContainerElement() ? update({
467
+ bounds,
468
+ name
469
+ }) : create({
470
+ bounds,
471
+ name
472
+ });
473
+ }
474
+ }
475
+ }
476
+ }
477
+ function selectComponentFn(e, cb) {
478
+ e.preventDefault();
479
+ e.stopPropagation();
480
+ if (inspectInstance) cb(getUniqueComponentId(inspectInstance));
481
+ }
482
+ let inspectComponentHighLighterSelectFn = null;
483
+ function cancelInspectComponentHighLighter() {
484
+ unhighlight();
485
+ window.removeEventListener("mouseover", inspectFn);
486
+ window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
487
+ inspectComponentHighLighterSelectFn = null;
488
+ }
489
+ function inspectComponentHighLighter() {
490
+ window.addEventListener("mouseover", inspectFn);
491
+ return new Promise((resolve) => {
492
+ function onSelect(e) {
493
+ e.preventDefault();
494
+ e.stopPropagation();
495
+ selectComponentFn(e, (id) => {
496
+ window.removeEventListener("click", onSelect, true);
497
+ inspectComponentHighLighterSelectFn = null;
498
+ window.removeEventListener("mouseover", inspectFn);
499
+ const el = getContainerElement();
500
+ if (el) el.style.display = "none";
501
+ resolve(JSON.stringify({ id }));
502
+ });
503
+ }
504
+ inspectComponentHighLighterSelectFn = onSelect;
505
+ window.addEventListener("click", onSelect, true);
506
+ });
507
+ }
508
+ function scrollToComponent(options) {
509
+ const instance = getComponentInstance(activeAppRecord.value, options.id);
510
+ if (instance) {
511
+ const [el] = getRootElementsFromComponentInstance(instance);
512
+ if (typeof el.scrollIntoView === "function") el.scrollIntoView({ behavior: "smooth" });
513
+ else {
514
+ const bounds = getComponentBoundingRect(instance);
515
+ const scrollTarget = document.createElement("div");
516
+ const styles = {
517
+ ...getStyles(bounds),
518
+ position: "absolute"
519
+ };
520
+ Object.assign(scrollTarget.style, styles);
521
+ document.body.appendChild(scrollTarget);
522
+ scrollTarget.scrollIntoView({ behavior: "smooth" });
523
+ setTimeout(() => {
524
+ document.body.removeChild(scrollTarget);
525
+ }, 2e3);
526
+ }
527
+ setTimeout(() => {
528
+ const bounds = getComponentBoundingRect(instance);
529
+ if (bounds.width || bounds.height) {
530
+ const name = getInstanceName(instance);
531
+ const el$1 = getContainerElement();
532
+ el$1 ? update({
533
+ ...options,
534
+ name,
535
+ bounds
536
+ }) : create({
537
+ ...options,
538
+ name,
539
+ bounds
540
+ });
541
+ setTimeout(() => {
542
+ if (el$1) el$1.style.display = "none";
543
+ }, 1500);
544
+ }
545
+ }, 1200);
546
+ }
547
+ }
548
+
549
+ //#endregion
550
+ //#region ../devtools-kit/src/core/component-inspector/index.ts
551
+ target.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ ??= true;
552
+ function waitForInspectorInit(cb) {
553
+ let total = 0;
554
+ const timer = setInterval(() => {
555
+ if (target.__VUE_INSPECTOR__) {
556
+ clearInterval(timer);
557
+ total += 30;
558
+ cb();
559
+ }
560
+ if (total >= 5e3) clearInterval(timer);
561
+ }, 30);
562
+ }
563
+ function setupInspector() {
564
+ const inspector = target.__VUE_INSPECTOR__;
565
+ const _openInEditor = inspector.openInEditor;
566
+ inspector.openInEditor = async (...params) => {
567
+ inspector.disable();
568
+ _openInEditor(...params);
569
+ };
570
+ }
571
+ function getComponentInspector() {
572
+ return new Promise((resolve) => {
573
+ function setup() {
574
+ setupInspector();
575
+ resolve(target.__VUE_INSPECTOR__);
576
+ }
577
+ if (!target.__VUE_INSPECTOR__) waitForInspectorInit(() => {
578
+ setup();
579
+ });
580
+ else setup();
581
+ });
582
+ }
583
+
584
+ //#endregion
585
+ //#region ../devtools-kit/src/shared/stub-vue.ts
586
+ /**
587
+ * To prevent include a **HUGE** vue package in the final bundle of chrome ext / electron
588
+ * we stub the necessary vue module.
589
+ * This implementation is based on the 1c3327a0fa5983aa9078e3f7bb2330f572435425 commit
590
+ */
591
+ /**
592
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/constants.ts#L17-L23)
593
+ */
594
+ let ReactiveFlags = /* @__PURE__ */ function(ReactiveFlags$1) {
595
+ ReactiveFlags$1["SKIP"] = "__v_skip";
596
+ ReactiveFlags$1["IS_REACTIVE"] = "__v_isReactive";
597
+ ReactiveFlags$1["IS_READONLY"] = "__v_isReadonly";
598
+ ReactiveFlags$1["IS_SHALLOW"] = "__v_isShallow";
599
+ ReactiveFlags$1["RAW"] = "__v_raw";
600
+ return ReactiveFlags$1;
601
+ }({});
602
+ /**
603
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L330-L332)
604
+ */
605
+ function isReadonly(value) {
606
+ return !!(value && value[ReactiveFlags.IS_READONLY]);
607
+ }
608
+ /**
609
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L312-L317)
610
+ */
611
+ function isReactive(value) {
612
+ if (isReadonly(value)) return isReactive(value[ReactiveFlags.RAW]);
613
+ return !!(value && value[ReactiveFlags.IS_REACTIVE]);
614
+ }
615
+ function isRef(r) {
616
+ return !!(r && r.__v_isRef === true);
617
+ }
618
+ /**
619
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L372-L375)
620
+ */
621
+ function toRaw(observed) {
622
+ const raw = observed && observed[ReactiveFlags.RAW];
623
+ return raw ? toRaw(raw) : observed;
624
+ }
625
+ /**
626
+ * @from [@vue/runtime-core](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/runtime-core/src/vnode.ts#L63-L68)
627
+ */
628
+ const Fragment = Symbol.for("v-fgt");
629
+
630
+ //#endregion
631
+ //#region ../devtools-kit/src/core/component/state/editor.ts
632
+ var StateEditor = class {
633
+ constructor() {
634
+ this.refEditor = new RefStateEditor();
635
+ }
636
+ set(object, path, value, cb) {
637
+ const sections = Array.isArray(path) ? path : path.split(".");
638
+ while (sections.length > 1) {
639
+ const section = sections.shift();
640
+ if (object instanceof Map) object = object.get(section);
641
+ else if (object instanceof Set) object = Array.from(object.values())[section];
642
+ else object = object[section];
643
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
644
+ }
645
+ const field = sections[0];
646
+ const item = this.refEditor.get(object)[field];
647
+ if (cb) cb(object, field, value);
648
+ else if (this.refEditor.isRef(item)) this.refEditor.set(item, value);
649
+ else object[field] = value;
650
+ }
651
+ get(object, path) {
652
+ const sections = Array.isArray(path) ? path : path.split(".");
653
+ for (let i = 0; i < sections.length; i++) {
654
+ if (object instanceof Map) object = object.get(sections[i]);
655
+ else object = object[sections[i]];
656
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
657
+ if (!object) return void 0;
658
+ }
659
+ return object;
660
+ }
661
+ has(object, path, parent = false) {
662
+ if (typeof object === "undefined") return false;
663
+ const sections = Array.isArray(path) ? path.slice() : path.split(".");
664
+ const size = !parent ? 1 : 2;
665
+ while (object && sections.length > size) {
666
+ const section = sections.shift();
667
+ object = object[section];
668
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
669
+ }
670
+ return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
671
+ }
672
+ createDefaultSetCallback(state) {
673
+ return (object, field, value) => {
674
+ if (state.remove || state.newKey) if (Array.isArray(object)) object.splice(field, 1);
675
+ else if (toRaw(object) instanceof Map) object.delete(field);
676
+ else if (toRaw(object) instanceof Set) object.delete(Array.from(object.values())[field]);
677
+ else Reflect.deleteProperty(object, field);
678
+ if (!state.remove) {
679
+ const target$1 = object[state.newKey || field];
680
+ if (this.refEditor.isRef(target$1)) this.refEditor.set(target$1, value);
681
+ else if (toRaw(object) instanceof Map) object.set(state.newKey || field, value);
682
+ else if (toRaw(object) instanceof Set) object.add(value);
683
+ else object[state.newKey || field] = value;
684
+ }
685
+ };
686
+ }
687
+ };
688
+ var RefStateEditor = class {
689
+ set(ref, value) {
690
+ if (isRef(ref)) ref.value = value;
691
+ else {
692
+ if (ref instanceof Set && Array.isArray(value)) {
693
+ ref.clear();
694
+ value.forEach((v) => ref.add(v));
695
+ return;
696
+ }
697
+ const currentKeys = Object.keys(value);
698
+ if (ref instanceof Map) {
699
+ const previousKeysSet$1 = new Set(ref.keys());
700
+ currentKeys.forEach((key) => {
701
+ ref.set(key, Reflect.get(value, key));
702
+ previousKeysSet$1.delete(key);
703
+ });
704
+ previousKeysSet$1.forEach((key) => ref.delete(key));
705
+ return;
706
+ }
707
+ const previousKeysSet = new Set(Object.keys(ref));
708
+ currentKeys.forEach((key) => {
709
+ Reflect.set(ref, key, Reflect.get(value, key));
710
+ previousKeysSet.delete(key);
711
+ });
712
+ previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
713
+ }
714
+ }
715
+ get(ref) {
716
+ return isRef(ref) ? ref.value : ref;
717
+ }
718
+ isRef(ref) {
719
+ return isRef(ref) || isReactive(ref);
720
+ }
721
+ };
722
+ const stateEditor = new StateEditor();
723
+
724
+ //#endregion
725
+ //#region ../../node_modules/.pnpm/perfect-debounce@2.0.0/node_modules/perfect-debounce/dist/index.mjs
726
+ const DEBOUNCE_DEFAULTS = { trailing: true };
727
+ /**
728
+ Debounce functions
729
+ @param fn - Promise-returning/async function to debounce.
730
+ @param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
731
+ @returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
732
+ @example
733
+ ```
734
+ import { debounce } from 'perfect-debounce';
735
+ const expensiveCall = async input => input;
736
+ const debouncedFn = debounce(expensiveCall, 200);
737
+ for (const number of [1, 2, 3]) {
738
+ console.log(await debouncedFn(number));
739
+ }
740
+ //=> 1
741
+ //=> 2
742
+ //=> 3
743
+ ```
744
+ */
745
+ function debounce(fn, wait = 25, options = {}) {
746
+ options = {
747
+ ...DEBOUNCE_DEFAULTS,
748
+ ...options
749
+ };
750
+ if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
751
+ let leadingValue;
752
+ let timeout;
753
+ let resolveList = [];
754
+ let currentPromise;
755
+ let trailingArgs;
756
+ const applyFn = (_this, args) => {
757
+ currentPromise = _applyPromised(fn, _this, args);
758
+ currentPromise.finally(() => {
759
+ currentPromise = null;
760
+ if (options.trailing && trailingArgs && !timeout) {
761
+ const promise = applyFn(_this, trailingArgs);
762
+ trailingArgs = null;
763
+ return promise;
764
+ }
765
+ });
766
+ return currentPromise;
767
+ };
768
+ const debounced = function(...args) {
769
+ if (options.trailing) trailingArgs = args;
770
+ if (currentPromise) return currentPromise;
771
+ return new Promise((resolve) => {
772
+ const shouldCallNow = !timeout && options.leading;
773
+ clearTimeout(timeout);
774
+ timeout = setTimeout(() => {
775
+ timeout = null;
776
+ const promise = options.leading ? leadingValue : applyFn(this, args);
777
+ trailingArgs = null;
778
+ for (const _resolve of resolveList) _resolve(promise);
779
+ resolveList = [];
780
+ }, wait);
781
+ if (shouldCallNow) {
782
+ leadingValue = applyFn(this, args);
783
+ resolve(leadingValue);
784
+ } else resolveList.push(resolve);
785
+ });
786
+ };
787
+ const _clearTimeout = (timer) => {
788
+ if (timer) {
789
+ clearTimeout(timer);
790
+ timeout = null;
791
+ }
792
+ };
793
+ debounced.isPending = () => !!timeout;
794
+ debounced.cancel = () => {
795
+ _clearTimeout(timeout);
796
+ resolveList = [];
797
+ trailingArgs = null;
798
+ };
799
+ debounced.flush = () => {
800
+ _clearTimeout(timeout);
801
+ if (!trailingArgs || currentPromise) return;
802
+ const args = trailingArgs;
803
+ trailingArgs = null;
804
+ return applyFn(this, args);
805
+ };
806
+ return debounced;
807
+ }
808
+ async function _applyPromised(fn, _this, args) {
809
+ return await fn.apply(_this, args);
810
+ }
811
+
812
+ //#endregion
813
+ //#region ../devtools-kit/src/core/timeline/storage.ts
814
+ const TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
815
+ function getTimelineLayersStateFromStorage() {
816
+ if (typeof window === "undefined" || !isBrowser || typeof localStorage === "undefined" || localStorage === null) return {
817
+ recordingState: false,
818
+ mouseEventEnabled: false,
819
+ keyboardEventEnabled: false,
820
+ componentEventEnabled: false,
821
+ performanceEventEnabled: false,
822
+ selected: ""
823
+ };
824
+ const state = typeof localStorage.getItem !== "undefined" ? localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID) : null;
825
+ return state ? JSON.parse(state) : {
826
+ recordingState: false,
827
+ mouseEventEnabled: false,
828
+ keyboardEventEnabled: false,
829
+ componentEventEnabled: false,
830
+ performanceEventEnabled: false,
831
+ selected: ""
832
+ };
833
+ }
834
+
835
+ //#endregion
836
+ //#region ../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
837
+ function flatHooks(configHooks, hooks$1 = {}, parentName) {
838
+ for (const key in configHooks) {
839
+ const subHook = configHooks[key];
840
+ const name = parentName ? `${parentName}:${key}` : key;
841
+ if (typeof subHook === "object" && subHook !== null) flatHooks(subHook, hooks$1, name);
842
+ else if (typeof subHook === "function") hooks$1[name] = subHook;
843
+ }
844
+ return hooks$1;
845
+ }
846
+ const defaultTask = { run: (function_) => function_() };
847
+ const _createTask = () => defaultTask;
848
+ const createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
849
+ function serialTaskCaller(hooks$1, args) {
850
+ const task = createTask(args.shift());
851
+ return hooks$1.reduce((promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))), Promise.resolve());
852
+ }
853
+ function parallelTaskCaller(hooks$1, args) {
854
+ const task = createTask(args.shift());
855
+ return Promise.all(hooks$1.map((hook$1) => task.run(() => hook$1(...args))));
856
+ }
857
+ function callEachWith(callbacks, arg0) {
858
+ for (const callback of [...callbacks]) callback(arg0);
859
+ }
860
+ var Hookable = class {
861
+ constructor() {
862
+ this._hooks = {};
863
+ this._before = void 0;
864
+ this._after = void 0;
865
+ this._deprecatedMessages = void 0;
866
+ this._deprecatedHooks = {};
867
+ this.hook = this.hook.bind(this);
868
+ this.callHook = this.callHook.bind(this);
869
+ this.callHookWith = this.callHookWith.bind(this);
870
+ }
871
+ hook(name, function_, options = {}) {
872
+ if (!name || typeof function_ !== "function") return () => {};
873
+ const originalName = name;
874
+ let dep;
875
+ while (this._deprecatedHooks[name]) {
876
+ dep = this._deprecatedHooks[name];
877
+ name = dep.to;
878
+ }
879
+ if (dep && !options.allowDeprecated) {
880
+ let message = dep.message;
881
+ if (!message) message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
882
+ if (!this._deprecatedMessages) this._deprecatedMessages = /* @__PURE__ */ new Set();
883
+ if (!this._deprecatedMessages.has(message)) {
884
+ console.warn(message);
885
+ this._deprecatedMessages.add(message);
886
+ }
887
+ }
888
+ if (!function_.name) try {
889
+ Object.defineProperty(function_, "name", {
890
+ get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
891
+ configurable: true
892
+ });
893
+ } catch {}
894
+ this._hooks[name] = this._hooks[name] || [];
895
+ this._hooks[name].push(function_);
896
+ return () => {
897
+ if (function_) {
898
+ this.removeHook(name, function_);
899
+ function_ = void 0;
900
+ }
901
+ };
902
+ }
903
+ hookOnce(name, function_) {
904
+ let _unreg;
905
+ let _function = (...arguments_) => {
906
+ if (typeof _unreg === "function") _unreg();
907
+ _unreg = void 0;
908
+ _function = void 0;
909
+ return function_(...arguments_);
910
+ };
911
+ _unreg = this.hook(name, _function);
912
+ return _unreg;
913
+ }
914
+ removeHook(name, function_) {
915
+ if (this._hooks[name]) {
916
+ const index = this._hooks[name].indexOf(function_);
917
+ if (index !== -1) this._hooks[name].splice(index, 1);
918
+ if (this._hooks[name].length === 0) delete this._hooks[name];
919
+ }
920
+ }
921
+ deprecateHook(name, deprecated) {
922
+ this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
923
+ const _hooks = this._hooks[name] || [];
924
+ delete this._hooks[name];
925
+ for (const hook$1 of _hooks) this.hook(name, hook$1);
926
+ }
927
+ deprecateHooks(deprecatedHooks) {
928
+ Object.assign(this._deprecatedHooks, deprecatedHooks);
929
+ for (const name in deprecatedHooks) this.deprecateHook(name, deprecatedHooks[name]);
930
+ }
931
+ addHooks(configHooks) {
932
+ const hooks$1 = flatHooks(configHooks);
933
+ const removeFns = Object.keys(hooks$1).map((key) => this.hook(key, hooks$1[key]));
934
+ return () => {
935
+ for (const unreg of removeFns.splice(0, removeFns.length)) unreg();
936
+ };
937
+ }
938
+ removeHooks(configHooks) {
939
+ const hooks$1 = flatHooks(configHooks);
940
+ for (const key in hooks$1) this.removeHook(key, hooks$1[key]);
941
+ }
942
+ removeAllHooks() {
943
+ for (const key in this._hooks) delete this._hooks[key];
944
+ }
945
+ callHook(name, ...arguments_) {
946
+ arguments_.unshift(name);
947
+ return this.callHookWith(serialTaskCaller, name, ...arguments_);
948
+ }
949
+ callHookParallel(name, ...arguments_) {
950
+ arguments_.unshift(name);
951
+ return this.callHookWith(parallelTaskCaller, name, ...arguments_);
952
+ }
953
+ callHookWith(caller, name, ...arguments_) {
954
+ const event = this._before || this._after ? {
955
+ name,
956
+ args: arguments_,
957
+ context: {}
958
+ } : void 0;
959
+ if (this._before) callEachWith(this._before, event);
960
+ const result = caller(name in this._hooks ? [...this._hooks[name]] : [], arguments_);
961
+ if (result instanceof Promise) return result.finally(() => {
962
+ if (this._after && event) callEachWith(this._after, event);
963
+ });
964
+ if (this._after && event) callEachWith(this._after, event);
965
+ return result;
966
+ }
967
+ beforeEach(function_) {
968
+ this._before = this._before || [];
969
+ this._before.push(function_);
970
+ return () => {
971
+ if (this._before !== void 0) {
972
+ const index = this._before.indexOf(function_);
973
+ if (index !== -1) this._before.splice(index, 1);
974
+ }
975
+ };
976
+ }
977
+ afterEach(function_) {
978
+ this._after = this._after || [];
979
+ this._after.push(function_);
980
+ return () => {
981
+ if (this._after !== void 0) {
982
+ const index = this._after.indexOf(function_);
983
+ if (index !== -1) this._after.splice(index, 1);
984
+ }
985
+ };
986
+ }
987
+ };
988
+ function createHooks() {
989
+ return new Hookable();
990
+ }
991
+
992
+ //#endregion
993
+ //#region ../devtools-kit/src/ctx/timeline.ts
994
+ target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS ??= [];
995
+ const devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, { get(target$1, prop, receiver) {
996
+ return Reflect.get(target$1, prop, receiver);
997
+ } });
998
+ function addTimelineLayer(options, descriptor) {
999
+ devtoolsState.timelineLayersState[descriptor.id] = false;
1000
+ devtoolsTimelineLayers.push({
1001
+ ...options,
1002
+ descriptorId: descriptor.id,
1003
+ appRecord: getAppRecord(descriptor.app)
1004
+ });
1005
+ }
1006
+
1007
+ //#endregion
1008
+ //#region ../devtools-kit/src/ctx/inspector.ts
1009
+ target.__VUE_DEVTOOLS_KIT_INSPECTOR__ ??= [];
1010
+ const devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, { get(target$1, prop, receiver) {
1011
+ return Reflect.get(target$1, prop, receiver);
1012
+ } });
1013
+ const callInspectorUpdatedHook = debounce(() => {
1014
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT, getActiveInspectors());
1015
+ });
1016
+ function addInspector(inspector, descriptor) {
1017
+ devtoolsInspector.push({
1018
+ options: inspector,
1019
+ descriptor,
1020
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder ?? "Search tree...",
1021
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder ?? "Search state...",
1022
+ treeFilter: "",
1023
+ selectedNodeId: "",
1024
+ appRecord: getAppRecord(descriptor.app)
1025
+ });
1026
+ callInspectorUpdatedHook();
1027
+ }
1028
+ function getActiveInspectors() {
1029
+ return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
1030
+ const descriptor = inspector.descriptor;
1031
+ const options = inspector.options;
1032
+ return {
1033
+ id: options.id,
1034
+ label: options.label,
1035
+ logo: descriptor.logo,
1036
+ icon: `custom-ic-baseline-${options?.icon?.replace(/_/g, "-")}`,
1037
+ packageName: descriptor.packageName,
1038
+ homepage: descriptor.homepage,
1039
+ pluginId: descriptor.id
1040
+ };
1041
+ });
1042
+ }
1043
+ function getInspector(id, app) {
1044
+ return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
1045
+ }
1046
+
1047
+ //#endregion
1048
+ //#region ../devtools-kit/src/ctx/hook.ts
1049
+ let DevToolsV6PluginAPIHookKeys = /* @__PURE__ */ function(DevToolsV6PluginAPIHookKeys$1) {
1050
+ DevToolsV6PluginAPIHookKeys$1["VISIT_COMPONENT_TREE"] = "visitComponentTree";
1051
+ DevToolsV6PluginAPIHookKeys$1["INSPECT_COMPONENT"] = "inspectComponent";
1052
+ DevToolsV6PluginAPIHookKeys$1["EDIT_COMPONENT_STATE"] = "editComponentState";
1053
+ DevToolsV6PluginAPIHookKeys$1["GET_INSPECTOR_TREE"] = "getInspectorTree";
1054
+ DevToolsV6PluginAPIHookKeys$1["GET_INSPECTOR_STATE"] = "getInspectorState";
1055
+ DevToolsV6PluginAPIHookKeys$1["EDIT_INSPECTOR_STATE"] = "editInspectorState";
1056
+ DevToolsV6PluginAPIHookKeys$1["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
1057
+ DevToolsV6PluginAPIHookKeys$1["TIMELINE_CLEARED"] = "timelineCleared";
1058
+ DevToolsV6PluginAPIHookKeys$1["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
1059
+ return DevToolsV6PluginAPIHookKeys$1;
1060
+ }({});
1061
+ let DevToolsContextHookKeys = /* @__PURE__ */ function(DevToolsContextHookKeys$1) {
1062
+ DevToolsContextHookKeys$1["ADD_INSPECTOR"] = "addInspector";
1063
+ DevToolsContextHookKeys$1["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
1064
+ DevToolsContextHookKeys$1["SEND_INSPECTOR_STATE"] = "sendInspectorState";
1065
+ DevToolsContextHookKeys$1["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
1066
+ DevToolsContextHookKeys$1["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
1067
+ DevToolsContextHookKeys$1["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
1068
+ DevToolsContextHookKeys$1["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
1069
+ DevToolsContextHookKeys$1["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
1070
+ DevToolsContextHookKeys$1["GET_COMPONENT_NAME"] = "getComponentName";
1071
+ DevToolsContextHookKeys$1["COMPONENT_HIGHLIGHT"] = "componentHighlight";
1072
+ DevToolsContextHookKeys$1["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
1073
+ return DevToolsContextHookKeys$1;
1074
+ }({});
1075
+ let DevToolsMessagingHookKeys = /* @__PURE__ */ function(DevToolsMessagingHookKeys$1) {
1076
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
1077
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
1078
+ DevToolsMessagingHookKeys$1["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
1079
+ DevToolsMessagingHookKeys$1["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
1080
+ DevToolsMessagingHookKeys$1["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
1081
+ DevToolsMessagingHookKeys$1["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
1082
+ DevToolsMessagingHookKeys$1["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
1083
+ DevToolsMessagingHookKeys$1["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
1084
+ return DevToolsMessagingHookKeys$1;
1085
+ }({});
1086
+ function createDevToolsCtxHooks() {
1087
+ const hooks$1 = createHooks();
1088
+ hooks$1.hook(DevToolsContextHookKeys.ADD_INSPECTOR, ({ inspector, plugin }) => {
1089
+ addInspector(inspector, plugin.descriptor);
1090
+ });
1091
+ const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
1092
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1093
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1094
+ const _payload = {
1095
+ app: plugin.descriptor.app,
1096
+ inspectorId,
1097
+ filter: inspector?.treeFilter || "",
1098
+ rootNodes: []
1099
+ };
1100
+ await new Promise((resolve) => {
1101
+ hooks$1.callHookWith(async (callbacks) => {
1102
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1103
+ resolve();
1104
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1105
+ });
1106
+ hooks$1.callHookWith(async (callbacks) => {
1107
+ await Promise.all(callbacks.map((cb) => cb({
1108
+ inspectorId,
1109
+ rootNodes: _payload.rootNodes
1110
+ })));
1111
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT);
1112
+ }, 120);
1113
+ hooks$1.hook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, debounceSendInspectorTree);
1114
+ const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
1115
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1116
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1117
+ const _payload = {
1118
+ app: plugin.descriptor.app,
1119
+ inspectorId,
1120
+ nodeId: inspector?.selectedNodeId || "",
1121
+ state: null
1122
+ };
1123
+ const ctx = { currentTab: `custom-inspector:${inspectorId}` };
1124
+ if (_payload.nodeId) await new Promise((resolve) => {
1125
+ hooks$1.callHookWith(async (callbacks) => {
1126
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1127
+ resolve();
1128
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1129
+ });
1130
+ hooks$1.callHookWith(async (callbacks) => {
1131
+ await Promise.all(callbacks.map((cb) => cb({
1132
+ inspectorId,
1133
+ nodeId: _payload.nodeId,
1134
+ state: _payload.state
1135
+ })));
1136
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT);
1137
+ }, 120);
1138
+ hooks$1.hook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, debounceSendInspectorState);
1139
+ hooks$1.hook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, ({ inspectorId, nodeId, plugin }) => {
1140
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1141
+ if (!inspector) return;
1142
+ inspector.selectedNodeId = nodeId;
1143
+ });
1144
+ hooks$1.hook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, ({ options, plugin }) => {
1145
+ addTimelineLayer(options, plugin.descriptor);
1146
+ });
1147
+ hooks$1.hook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, ({ options, plugin }) => {
1148
+ if (devtoolsState.highPerfModeEnabled || !devtoolsState.timelineLayersState?.[plugin.descriptor.id] && ![
1149
+ "performance",
1150
+ "component-event",
1151
+ "keyboard",
1152
+ "mouse"
1153
+ ].includes(options.layerId)) return;
1154
+ hooks$1.callHookWith(async (callbacks) => {
1155
+ await Promise.all(callbacks.map((cb) => cb(options)));
1156
+ }, DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT);
1157
+ });
1158
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, async ({ app }) => {
1159
+ const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
1160
+ if (!appRecord) return null;
1161
+ const appId = appRecord.id.toString();
1162
+ return [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
1163
+ });
1164
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, async ({ instance }) => {
1165
+ return getComponentBoundingRect(instance);
1166
+ });
1167
+ hooks$1.hook(DevToolsContextHookKeys.GET_COMPONENT_NAME, ({ instance }) => {
1168
+ return getInstanceName(instance);
1169
+ });
1170
+ hooks$1.hook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, ({ uid }) => {
1171
+ const instance = activeAppRecord.value.instanceMap.get(uid);
1172
+ if (instance) highlight(instance);
1173
+ });
1174
+ hooks$1.hook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT, () => {
1175
+ unhighlight();
1176
+ });
1177
+ return hooks$1;
1178
+ }
1179
+
1180
+ //#endregion
1181
+ //#region ../devtools-kit/src/ctx/state.ts
1182
+ target.__VUE_DEVTOOLS_KIT_APP_RECORDS__ ??= [];
1183
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ ??= {};
1184
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ ??= "";
1185
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ ??= [];
1186
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ ??= [];
1187
+ const STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
1188
+ function initStateFactory() {
1189
+ return {
1190
+ connected: false,
1191
+ clientConnected: false,
1192
+ vitePluginDetected: true,
1193
+ appRecords: [],
1194
+ activeAppRecordId: "",
1195
+ tabs: [],
1196
+ commands: [],
1197
+ highPerfModeEnabled: true,
1198
+ devtoolsClientDetected: {},
1199
+ perfUniqueGroupId: 0,
1200
+ timelineLayersState: getTimelineLayersStateFromStorage()
1201
+ };
1202
+ }
1203
+ target[STATE_KEY] ??= initStateFactory();
1204
+ const callStateUpdatedHook = debounce((state) => {
1205
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED, { state });
1206
+ });
1207
+ const callConnectedUpdatedHook = debounce((state, oldState) => {
1208
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, {
1209
+ state,
1210
+ oldState
1211
+ });
1212
+ });
1213
+ const devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, { get(_target, prop, receiver) {
1214
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
1215
+ return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
1216
+ } });
1217
+ const activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, { get(_target, prop, receiver) {
1218
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
1219
+ else if (prop === "id") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
1220
+ return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
1221
+ } });
1222
+ function updateAllStates() {
1223
+ callStateUpdatedHook({
1224
+ ...target[STATE_KEY],
1225
+ appRecords: devtoolsAppRecords.value,
1226
+ activeAppRecordId: activeAppRecord.id,
1227
+ tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
1228
+ commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
1229
+ });
1230
+ }
1231
+ function setActiveAppRecord(app) {
1232
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
1233
+ updateAllStates();
1234
+ }
1235
+ function setActiveAppRecordId(id) {
1236
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
1237
+ updateAllStates();
1238
+ }
1239
+ const devtoolsState = new Proxy(target[STATE_KEY], {
1240
+ get(target$1, property) {
1241
+ if (property === "appRecords") return devtoolsAppRecords;
1242
+ else if (property === "activeAppRecordId") return activeAppRecord.id;
1243
+ else if (property === "tabs") return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
1244
+ else if (property === "commands") return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1245
+ return target[STATE_KEY][property];
1246
+ },
1247
+ deleteProperty(target$1, property) {
1248
+ delete target$1[property];
1249
+ return true;
1250
+ },
1251
+ set(target$1, property, value) {
1252
+ ({ ...target[STATE_KEY] });
1253
+ target$1[property] = value;
1254
+ target[STATE_KEY][property] = value;
1255
+ return true;
1256
+ }
1257
+ });
1258
+ function onDevToolsConnected(fn) {
1259
+ return new Promise((resolve) => {
1260
+ if (devtoolsState.connected) {
1261
+ fn();
1262
+ resolve();
1263
+ }
1264
+ devtoolsContext.hooks.hook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, ({ state }) => {
1265
+ if (state.connected) {
1266
+ fn();
1267
+ resolve();
1268
+ }
1269
+ });
1270
+ });
1271
+ }
1272
+ const resolveIcon = (icon) => {
1273
+ if (!icon) return;
1274
+ if (icon.startsWith("baseline-")) return `custom-ic-${icon}`;
1275
+ if (icon.startsWith("i-") || isUrlString(icon)) return icon;
1276
+ return `custom-ic-baseline-${icon}`;
1277
+ };
1278
+ function addCustomTab(tab) {
1279
+ const tabs = target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
1280
+ if (tabs.some((t) => t.name === tab.name)) return;
1281
+ tabs.push({
1282
+ ...tab,
1283
+ icon: resolveIcon(tab.icon)
1284
+ });
1285
+ updateAllStates();
1286
+ }
1287
+ function addCustomCommand(action) {
1288
+ const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1289
+ if (commands.some((t) => t.id === action.id)) return;
1290
+ commands.push({
1291
+ ...action,
1292
+ icon: resolveIcon(action.icon),
1293
+ children: action.children ? action.children.map((child) => ({
1294
+ ...child,
1295
+ icon: resolveIcon(child.icon)
1296
+ })) : void 0
1297
+ });
1298
+ updateAllStates();
1299
+ }
1300
+ function removeCustomCommand(actionId) {
1301
+ const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1302
+ const index = commands.findIndex((t) => t.id === actionId);
1303
+ if (index === -1) return;
1304
+ commands.splice(index, 1);
1305
+ updateAllStates();
1306
+ }
1307
+
1308
+ //#endregion
1309
+ //#region ../devtools-kit/src/core/open-in-editor/index.ts
1310
+ function openInEditor(options = {}) {
1311
+ const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
1312
+ if (file) {
1313
+ if (host === "chrome-extension") {
1314
+ const fileName = file.replace(/\\/g, "\\\\");
1315
+ const _baseUrl = window.VUE_DEVTOOLS_CONFIG?.openInEditorHost ?? "/";
1316
+ fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
1317
+ if (!response.ok) {
1318
+ const msg = `Opening component ${fileName} failed`;
1319
+ console.log(`%c${msg}`, "color:red");
1320
+ }
1321
+ });
1322
+ } else if (devtoolsState.vitePluginDetected) {
1323
+ const _baseUrl = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ ?? baseUrl;
1324
+ target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
1325
+ }
1326
+ }
1327
+ }
1328
+
1329
+ //#endregion
1330
+ //#region ../devtools-kit/src/ctx/plugin.ts
1331
+ target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ ??= [];
1332
+ const devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, { get(target$1, prop, receiver) {
1333
+ return Reflect.get(target$1, prop, receiver);
1334
+ } });
1335
+
1336
+ //#endregion
1337
+ //#region ../devtools-kit/src/core/plugin/plugin-settings.ts
1338
+ function _getSettings(settings) {
1339
+ const _settings = {};
1340
+ Object.keys(settings).forEach((key) => {
1341
+ _settings[key] = settings[key].defaultValue;
1342
+ });
1343
+ return _settings;
1344
+ }
1345
+ function getPluginLocalKey(pluginId) {
1346
+ return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
1347
+ }
1348
+ function getPluginSettingsOptions(pluginId) {
1349
+ return (devtoolsPluginBuffer.find((item) => item[0].id === pluginId && !!item[0]?.settings)?.[0] ?? null)?.settings ?? null;
1350
+ }
1351
+ function getPluginSettings(pluginId, fallbackValue) {
1352
+ const localKey = getPluginLocalKey(pluginId);
1353
+ if (localKey) {
1354
+ const localSettings = localStorage.getItem(localKey);
1355
+ if (localSettings) return JSON.parse(localSettings);
1356
+ }
1357
+ if (pluginId) return _getSettings((devtoolsPluginBuffer.find((item) => item[0].id === pluginId)?.[0] ?? null)?.settings ?? {});
1358
+ return _getSettings(fallbackValue);
1359
+ }
1360
+ function initPluginSettings(pluginId, settings) {
1361
+ const localKey = getPluginLocalKey(pluginId);
1362
+ if (!localStorage.getItem(localKey)) localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
1363
+ }
1364
+ function setPluginSettings(pluginId, key, value) {
1365
+ const localKey = getPluginLocalKey(pluginId);
1366
+ const localSettings = localStorage.getItem(localKey);
1367
+ const parsedLocalSettings = JSON.parse(localSettings || "{}");
1368
+ const updated = {
1369
+ ...parsedLocalSettings,
1370
+ [key]: value
1371
+ };
1372
+ localStorage.setItem(localKey, JSON.stringify(updated));
1373
+ devtoolsContext.hooks.callHookWith((callbacks) => {
1374
+ callbacks.forEach((cb) => cb({
1375
+ pluginId,
1376
+ key,
1377
+ oldValue: parsedLocalSettings[key],
1378
+ newValue: value,
1379
+ settings: updated
1380
+ }));
1381
+ }, DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS);
1382
+ }
1383
+
1384
+ //#endregion
1385
+ //#region ../devtools-kit/src/types/hook.ts
1386
+ let DevToolsHooks = /* @__PURE__ */ function(DevToolsHooks$1) {
1387
+ DevToolsHooks$1["APP_INIT"] = "app:init";
1388
+ DevToolsHooks$1["APP_UNMOUNT"] = "app:unmount";
1389
+ DevToolsHooks$1["COMPONENT_UPDATED"] = "component:updated";
1390
+ DevToolsHooks$1["COMPONENT_ADDED"] = "component:added";
1391
+ DevToolsHooks$1["COMPONENT_REMOVED"] = "component:removed";
1392
+ DevToolsHooks$1["COMPONENT_EMIT"] = "component:emit";
1393
+ DevToolsHooks$1["PERFORMANCE_START"] = "perf:start";
1394
+ DevToolsHooks$1["PERFORMANCE_END"] = "perf:end";
1395
+ DevToolsHooks$1["ADD_ROUTE"] = "router:add-route";
1396
+ DevToolsHooks$1["REMOVE_ROUTE"] = "router:remove-route";
1397
+ DevToolsHooks$1["RENDER_TRACKED"] = "render:tracked";
1398
+ DevToolsHooks$1["RENDER_TRIGGERED"] = "render:triggered";
1399
+ DevToolsHooks$1["APP_CONNECTED"] = "app:connected";
1400
+ DevToolsHooks$1["SETUP_DEVTOOLS_PLUGIN"] = "devtools-plugin:setup";
1401
+ return DevToolsHooks$1;
1402
+ }({});
1403
+
1404
+ //#endregion
1405
+ //#region ../devtools-kit/src/hook/index.ts
1406
+ const devtoolsHooks = target.__VUE_DEVTOOLS_HOOK ??= createHooks();
1407
+ const on = {
1408
+ vueAppInit(fn) {
1409
+ devtoolsHooks.hook(DevToolsHooks.APP_INIT, fn);
1410
+ },
1411
+ vueAppUnmount(fn) {
1412
+ devtoolsHooks.hook(DevToolsHooks.APP_UNMOUNT, fn);
1413
+ },
1414
+ vueAppConnected(fn) {
1415
+ devtoolsHooks.hook(DevToolsHooks.APP_CONNECTED, fn);
1416
+ },
1417
+ componentAdded(fn) {
1418
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_ADDED, fn);
1419
+ },
1420
+ componentEmit(fn) {
1421
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_EMIT, fn);
1422
+ },
1423
+ componentUpdated(fn) {
1424
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_UPDATED, fn);
1425
+ },
1426
+ componentRemoved(fn) {
1427
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_REMOVED, fn);
1428
+ },
1429
+ setupDevtoolsPlugin(fn) {
1430
+ devtoolsHooks.hook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, fn);
1431
+ },
1432
+ perfStart(fn) {
1433
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_START, fn);
1434
+ },
1435
+ perfEnd(fn) {
1436
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_END, fn);
1437
+ }
1438
+ };
1439
+ const hook = {
1440
+ on,
1441
+ setupDevToolsPlugin(pluginDescriptor, setupFn) {
1442
+ return devtoolsHooks.callHook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, pluginDescriptor, setupFn);
1443
+ }
1444
+ };
1445
+
1446
+ //#endregion
1447
+ //#region ../devtools-kit/src/api/v6/index.ts
1448
+ var DevToolsV6PluginAPI = class {
1449
+ constructor({ plugin, ctx }) {
1450
+ this.hooks = ctx.hooks;
1451
+ this.plugin = plugin;
1452
+ }
1453
+ get on() {
1454
+ return {
1455
+ visitComponentTree: (handler) => {
1456
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, handler);
1457
+ },
1458
+ inspectComponent: (handler) => {
1459
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT, handler);
1460
+ },
1461
+ editComponentState: (handler) => {
1462
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE, handler);
1463
+ },
1464
+ getInspectorTree: (handler) => {
1465
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE, handler);
1466
+ },
1467
+ getInspectorState: (handler) => {
1468
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE, handler);
1469
+ },
1470
+ editInspectorState: (handler) => {
1471
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE, handler);
1472
+ },
1473
+ inspectTimelineEvent: (handler) => {
1474
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT, handler);
1475
+ },
1476
+ timelineCleared: (handler) => {
1477
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED, handler);
1478
+ },
1479
+ setPluginSettings: (handler) => {
1480
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS, handler);
1481
+ }
1482
+ };
1483
+ }
1484
+ notifyComponentUpdate(instance) {
1485
+ if (devtoolsState.highPerfModeEnabled) return;
1486
+ const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
1487
+ if (inspector?.id) {
1488
+ if (instance) {
1489
+ const args = [
1490
+ instance.appContext.app,
1491
+ instance.uid,
1492
+ instance.parent?.uid,
1493
+ instance
1494
+ ];
1495
+ devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED, ...args);
1496
+ } else devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED);
1497
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1498
+ inspectorId: inspector.id,
1499
+ plugin: this.plugin
1500
+ });
1501
+ }
1502
+ }
1503
+ addInspector(options) {
1504
+ this.hooks.callHook(DevToolsContextHookKeys.ADD_INSPECTOR, {
1505
+ inspector: options,
1506
+ plugin: this.plugin
1507
+ });
1508
+ if (this.plugin.descriptor.settings) initPluginSettings(options.id, this.plugin.descriptor.settings);
1509
+ }
1510
+ sendInspectorTree(inspectorId) {
1511
+ if (devtoolsState.highPerfModeEnabled) return;
1512
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, {
1513
+ inspectorId,
1514
+ plugin: this.plugin
1515
+ });
1516
+ }
1517
+ sendInspectorState(inspectorId) {
1518
+ if (devtoolsState.highPerfModeEnabled) return;
1519
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1520
+ inspectorId,
1521
+ plugin: this.plugin
1522
+ });
1523
+ }
1524
+ selectInspectorNode(inspectorId, nodeId) {
1525
+ this.hooks.callHook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, {
1526
+ inspectorId,
1527
+ nodeId,
1528
+ plugin: this.plugin
1529
+ });
1530
+ }
1531
+ visitComponentTree(payload) {
1532
+ return this.hooks.callHook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, payload);
1533
+ }
1534
+ now() {
1535
+ if (devtoolsState.highPerfModeEnabled) return 0;
1536
+ return Date.now();
1537
+ }
1538
+ addTimelineLayer(options) {
1539
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, {
1540
+ options,
1541
+ plugin: this.plugin
1542
+ });
1543
+ }
1544
+ addTimelineEvent(options) {
1545
+ if (devtoolsState.highPerfModeEnabled) return;
1546
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, {
1547
+ options,
1548
+ plugin: this.plugin
1549
+ });
1550
+ }
1551
+ getSettings(pluginId) {
1552
+ return getPluginSettings(pluginId ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
1553
+ }
1554
+ getComponentInstances(app) {
1555
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, { app });
1556
+ }
1557
+ getComponentBounds(instance) {
1558
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, { instance });
1559
+ }
1560
+ getComponentName(instance) {
1561
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_NAME, { instance });
1562
+ }
1563
+ highlightElement(instance) {
1564
+ const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
1565
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, { uid });
1566
+ }
1567
+ unhighlightElement() {
1568
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT);
1569
+ }
1570
+ };
1571
+
1572
+ //#endregion
1573
+ //#region ../devtools-kit/src/api/index.ts
1574
+ const DevToolsPluginAPI = DevToolsV6PluginAPI;
1575
+
1576
+ //#endregion
1577
+ //#region ../devtools-kit/src/core/component/state/constants.ts
1578
+ const UNDEFINED = "__vue_devtool_undefined__";
1579
+ const INFINITY = "__vue_devtool_infinity__";
1580
+ const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
1581
+ const NAN = "__vue_devtool_nan__";
1582
+
1583
+ //#endregion
1584
+ //#region ../devtools-kit/src/core/component/state/util.ts
1585
+ const tokenMap = {
1586
+ [UNDEFINED]: "undefined",
1587
+ [NAN]: "NaN",
1588
+ [INFINITY]: "Infinity",
1589
+ [NEGATIVE_INFINITY]: "-Infinity"
1590
+ };
1591
+ const reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
1592
+ acc[value] = key;
1593
+ return acc;
1594
+ }, {});
1595
+
1596
+ //#endregion
1597
+ //#region ../devtools-kit/src/core/plugin/index.ts
1598
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ ??= /* @__PURE__ */ new Set();
1599
+ function setupDevToolsPlugin(pluginDescriptor, setupFn) {
1600
+ return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
1601
+ }
1602
+ function callDevToolsPluginSetupFn(plugin, app) {
1603
+ const [pluginDescriptor, setupFn] = plugin;
1604
+ if (pluginDescriptor.app !== app) return;
1605
+ const api = new DevToolsPluginAPI({
1606
+ plugin: {
1607
+ setupFn,
1608
+ descriptor: pluginDescriptor
1609
+ },
1610
+ ctx: devtoolsContext
1611
+ });
1612
+ if (pluginDescriptor.packageName === "vuex") api.on.editInspectorState((payload) => {
1613
+ api.sendInspectorState(payload.inspectorId);
1614
+ });
1615
+ setupFn(api);
1616
+ }
1617
+ function registerDevToolsPlugin(app, options) {
1618
+ if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app)) return;
1619
+ if (devtoolsState.highPerfModeEnabled && !options?.inspectingComponent) return;
1620
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
1621
+ devtoolsPluginBuffer.forEach((plugin) => {
1622
+ callDevToolsPluginSetupFn(plugin, app);
1623
+ });
1624
+ }
1625
+
1626
+ //#endregion
1627
+ //#region ../devtools-kit/src/ctx/router.ts
1628
+ const ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
1629
+ const ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
1630
+ target[ROUTER_INFO_KEY] ??= {
1631
+ currentRoute: null,
1632
+ routes: []
1633
+ };
1634
+ target[ROUTER_KEY] ??= {};
1635
+ const devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], { get(target$1, property) {
1636
+ return target[ROUTER_INFO_KEY][property];
1637
+ } });
1638
+ const devtoolsRouter = new Proxy(target[ROUTER_KEY], { get(target$1, property) {
1639
+ if (property === "value") return target[ROUTER_KEY];
1640
+ } });
1641
+
1642
+ //#endregion
1643
+ //#region ../devtools-kit/src/core/router/index.ts
1644
+ function getRoutes(router) {
1645
+ const routesMap = /* @__PURE__ */ new Map();
1646
+ return (router?.getRoutes() || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
1647
+ }
1648
+ function filterRoutes(routes) {
1649
+ return routes.map((item) => {
1650
+ let { path, name, children, meta } = item;
1651
+ if (children?.length) children = filterRoutes(children);
1652
+ return {
1653
+ path,
1654
+ name,
1655
+ children,
1656
+ meta
1657
+ };
1658
+ });
1659
+ }
1660
+ function filterCurrentRoute(route) {
1661
+ if (route) {
1662
+ const { fullPath, hash, href, path, name, matched, params, query } = route;
1663
+ return {
1664
+ fullPath,
1665
+ hash,
1666
+ href,
1667
+ path,
1668
+ name,
1669
+ params,
1670
+ query,
1671
+ matched: filterRoutes(matched)
1672
+ };
1673
+ }
1674
+ return route;
1675
+ }
1676
+ function normalizeRouterInfo(appRecord, activeAppRecord$1) {
1677
+ function init() {
1678
+ const router = appRecord.app?.config.globalProperties.$router;
1679
+ const currentRoute = filterCurrentRoute(router?.currentRoute.value);
1680
+ const routes = filterRoutes(getRoutes(router));
1681
+ const c = console.warn;
1682
+ console.warn = () => {};
1683
+ target[ROUTER_INFO_KEY] = {
1684
+ currentRoute: currentRoute ? deepClone(currentRoute) : {},
1685
+ routes: deepClone(routes)
1686
+ };
1687
+ target[ROUTER_KEY] = router;
1688
+ console.warn = c;
1689
+ }
1690
+ init();
1691
+ hook.on.componentUpdated(debounce(() => {
1692
+ if (activeAppRecord$1.value?.app !== appRecord.app) return;
1693
+ init();
1694
+ if (devtoolsState.highPerfModeEnabled) return;
1695
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED, { state: target[ROUTER_INFO_KEY] });
1696
+ }, 200));
1697
+ }
1698
+
1699
+ //#endregion
1700
+ //#region ../devtools-kit/src/ctx/api.ts
1701
+ function createDevToolsApi(hooks$1) {
1702
+ return {
1703
+ async getInspectorTree(payload) {
1704
+ const _payload = {
1705
+ ...payload,
1706
+ app: activeAppRecord.value.app,
1707
+ rootNodes: []
1708
+ };
1709
+ await new Promise((resolve) => {
1710
+ hooks$1.callHookWith(async (callbacks) => {
1711
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1712
+ resolve();
1713
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1714
+ });
1715
+ return _payload.rootNodes;
1716
+ },
1717
+ async getInspectorState(payload) {
1718
+ const _payload = {
1719
+ ...payload,
1720
+ app: activeAppRecord.value.app,
1721
+ state: null
1722
+ };
1723
+ const ctx = { currentTab: `custom-inspector:${payload.inspectorId}` };
1724
+ await new Promise((resolve) => {
1725
+ hooks$1.callHookWith(async (callbacks) => {
1726
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1727
+ resolve();
1728
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1729
+ });
1730
+ return _payload.state;
1731
+ },
1732
+ editInspectorState(payload) {
1733
+ const stateEditor$1 = new StateEditor();
1734
+ const _payload = {
1735
+ ...payload,
1736
+ app: activeAppRecord.value.app,
1737
+ set: (obj, path = payload.path, value = payload.state.value, cb) => {
1738
+ stateEditor$1.set(obj, path, value, cb || stateEditor$1.createDefaultSetCallback(payload.state));
1739
+ }
1740
+ };
1741
+ hooks$1.callHookWith((callbacks) => {
1742
+ callbacks.forEach((cb) => cb(_payload));
1743
+ }, DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE);
1744
+ },
1745
+ sendInspectorState(inspectorId) {
1746
+ const inspector = getInspector(inspectorId);
1747
+ hooks$1.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1748
+ inspectorId,
1749
+ plugin: {
1750
+ descriptor: inspector.descriptor,
1751
+ setupFn: () => ({})
1752
+ }
1753
+ });
1754
+ },
1755
+ inspectComponentInspector() {
1756
+ return inspectComponentHighLighter();
1757
+ },
1758
+ cancelInspectComponentInspector() {
1759
+ return cancelInspectComponentHighLighter();
1760
+ },
1761
+ getComponentRenderCode(id) {
1762
+ const instance = getComponentInstance(activeAppRecord.value, id);
1763
+ if (instance) return !(typeof instance?.type === "function") ? instance.render.toString() : instance.type.toString();
1764
+ },
1765
+ scrollToComponent(id) {
1766
+ return scrollToComponent({ id });
1767
+ },
1768
+ openInEditor,
1769
+ getVueInspector: getComponentInspector,
1770
+ toggleApp(id, options) {
1771
+ const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
1772
+ if (appRecord) {
1773
+ setActiveAppRecordId(id);
1774
+ setActiveAppRecord(appRecord);
1775
+ normalizeRouterInfo(appRecord, activeAppRecord);
1776
+ callInspectorUpdatedHook();
1777
+ registerDevToolsPlugin(appRecord.app, options);
1778
+ }
1779
+ },
1780
+ inspectDOM(instanceId) {
1781
+ const instance = getComponentInstance(activeAppRecord.value, instanceId);
1782
+ if (instance) {
1783
+ const [el] = getRootElementsFromComponentInstance(instance);
1784
+ if (el) target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
1785
+ }
1786
+ },
1787
+ updatePluginSettings(pluginId, key, value) {
1788
+ setPluginSettings(pluginId, key, value);
1789
+ },
1790
+ getPluginSettings(pluginId) {
1791
+ return {
1792
+ options: getPluginSettingsOptions(pluginId),
1793
+ values: getPluginSettings(pluginId)
1794
+ };
1795
+ }
1796
+ };
1797
+ }
1798
+
1799
+ //#endregion
1800
+ //#region ../devtools-kit/src/ctx/env.ts
1801
+ target.__VUE_DEVTOOLS_ENV__ ??= { vitePluginDetected: false };
1802
+
1803
+ //#endregion
1804
+ //#region ../devtools-kit/src/ctx/index.ts
1805
+ const hooks = createDevToolsCtxHooks();
1806
+ target.__VUE_DEVTOOLS_KIT_CONTEXT__ ??= {
1807
+ hooks,
1808
+ get state() {
1809
+ return {
1810
+ ...devtoolsState,
1811
+ activeAppRecordId: activeAppRecord.id,
1812
+ activeAppRecord: activeAppRecord.value,
1813
+ appRecords: devtoolsAppRecords.value
1814
+ };
1815
+ },
1816
+ api: createDevToolsApi(hooks)
1817
+ };
1818
+ const devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
1819
+
1820
+ //#endregion
1821
+ //#region ../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js
1822
+ var require_speakingurl$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js": ((exports, module) => {
1823
+ (function(root) {
1824
+ /**
1825
+ * charMap
1826
+ * @type {Object}
1827
+ */
1828
+ var charMap = {
1829
+ "À": "A",
1830
+ "Á": "A",
1831
+ "Â": "A",
1832
+ "Ã": "A",
1833
+ "Ä": "Ae",
1834
+ "Å": "A",
1835
+ "Æ": "AE",
1836
+ "Ç": "C",
1837
+ "È": "E",
1838
+ "É": "E",
1839
+ "Ê": "E",
1840
+ "Ë": "E",
1841
+ "Ì": "I",
1842
+ "Í": "I",
1843
+ "Î": "I",
1844
+ "Ï": "I",
1845
+ "Ð": "D",
1846
+ "Ñ": "N",
1847
+ "Ò": "O",
1848
+ "Ó": "O",
1849
+ "Ô": "O",
1850
+ "Õ": "O",
1851
+ "Ö": "Oe",
1852
+ "Ő": "O",
1853
+ "Ø": "O",
1854
+ "Ù": "U",
1855
+ "Ú": "U",
1856
+ "Û": "U",
1857
+ "Ü": "Ue",
1858
+ "Ű": "U",
1859
+ "Ý": "Y",
1860
+ "Þ": "TH",
1861
+ "ß": "ss",
1862
+ "à": "a",
1863
+ "á": "a",
1864
+ "â": "a",
1865
+ "ã": "a",
1866
+ "ä": "ae",
1867
+ "å": "a",
1868
+ "æ": "ae",
1869
+ "ç": "c",
1870
+ "è": "e",
1871
+ "é": "e",
1872
+ "ê": "e",
1873
+ "ë": "e",
1874
+ "ì": "i",
1875
+ "í": "i",
1876
+ "î": "i",
1877
+ "ï": "i",
1878
+ "ð": "d",
1879
+ "ñ": "n",
1880
+ "ò": "o",
1881
+ "ó": "o",
1882
+ "ô": "o",
1883
+ "õ": "o",
1884
+ "ö": "oe",
1885
+ "ő": "o",
1886
+ "ø": "o",
1887
+ "ù": "u",
1888
+ "ú": "u",
1889
+ "û": "u",
1890
+ "ü": "ue",
1891
+ "ű": "u",
1892
+ "ý": "y",
1893
+ "þ": "th",
1894
+ "ÿ": "y",
1895
+ "ẞ": "SS",
1896
+ "ا": "a",
1897
+ "أ": "a",
1898
+ "إ": "i",
1899
+ "آ": "aa",
1900
+ "ؤ": "u",
1901
+ "ئ": "e",
1902
+ "ء": "a",
1903
+ "ب": "b",
1904
+ "ت": "t",
1905
+ "ث": "th",
1906
+ "ج": "j",
1907
+ "ح": "h",
1908
+ "خ": "kh",
1909
+ "د": "d",
1910
+ "ذ": "th",
1911
+ "ر": "r",
1912
+ "ز": "z",
1913
+ "س": "s",
1914
+ "ش": "sh",
1915
+ "ص": "s",
1916
+ "ض": "dh",
1917
+ "ط": "t",
1918
+ "ظ": "z",
1919
+ "ع": "a",
1920
+ "غ": "gh",
1921
+ "ف": "f",
1922
+ "ق": "q",
1923
+ "ك": "k",
1924
+ "ل": "l",
1925
+ "م": "m",
1926
+ "ن": "n",
1927
+ "ه": "h",
1928
+ "و": "w",
1929
+ "ي": "y",
1930
+ "ى": "a",
1931
+ "ة": "h",
1932
+ "ﻻ": "la",
1933
+ "ﻷ": "laa",
1934
+ "ﻹ": "lai",
1935
+ "ﻵ": "laa",
1936
+ "گ": "g",
1937
+ "چ": "ch",
1938
+ "پ": "p",
1939
+ "ژ": "zh",
1940
+ "ک": "k",
1941
+ "ی": "y",
1942
+ "َ": "a",
1943
+ "ً": "an",
1944
+ "ِ": "e",
1945
+ "ٍ": "en",
1946
+ "ُ": "u",
1947
+ "ٌ": "on",
1948
+ "ْ": "",
1949
+ "٠": "0",
1950
+ "١": "1",
1951
+ "٢": "2",
1952
+ "٣": "3",
1953
+ "٤": "4",
1954
+ "٥": "5",
1955
+ "٦": "6",
1956
+ "٧": "7",
1957
+ "٨": "8",
1958
+ "٩": "9",
1959
+ "۰": "0",
1960
+ "۱": "1",
1961
+ "۲": "2",
1962
+ "۳": "3",
1963
+ "۴": "4",
1964
+ "۵": "5",
1965
+ "۶": "6",
1966
+ "۷": "7",
1967
+ "۸": "8",
1968
+ "۹": "9",
1969
+ "က": "k",
1970
+ "ခ": "kh",
1971
+ "ဂ": "g",
1972
+ "ဃ": "ga",
1973
+ "င": "ng",
1974
+ "စ": "s",
1975
+ "ဆ": "sa",
1976
+ "ဇ": "z",
1977
+ "စျ": "za",
1978
+ "ည": "ny",
1979
+ "ဋ": "t",
1980
+ "ဌ": "ta",
1981
+ "ဍ": "d",
1982
+ "ဎ": "da",
1983
+ "ဏ": "na",
1984
+ "တ": "t",
1985
+ "ထ": "ta",
1986
+ "ဒ": "d",
1987
+ "ဓ": "da",
1988
+ "န": "n",
1989
+ "ပ": "p",
1990
+ "ဖ": "pa",
1991
+ "ဗ": "b",
1992
+ "ဘ": "ba",
1993
+ "မ": "m",
1994
+ "ယ": "y",
1995
+ "ရ": "ya",
1996
+ "လ": "l",
1997
+ "ဝ": "w",
1998
+ "သ": "th",
1999
+ "ဟ": "h",
2000
+ "ဠ": "la",
2001
+ "အ": "a",
2002
+ "ြ": "y",
2003
+ "ျ": "ya",
2004
+ "ွ": "w",
2005
+ "ြွ": "yw",
2006
+ "ျွ": "ywa",
2007
+ "ှ": "h",
2008
+ "ဧ": "e",
2009
+ "၏": "-e",
2010
+ "ဣ": "i",
2011
+ "ဤ": "-i",
2012
+ "ဉ": "u",
2013
+ "ဦ": "-u",
2014
+ "ဩ": "aw",
2015
+ "သြော": "aw",
2016
+ "ဪ": "aw",
2017
+ "၀": "0",
2018
+ "၁": "1",
2019
+ "၂": "2",
2020
+ "၃": "3",
2021
+ "၄": "4",
2022
+ "၅": "5",
2023
+ "၆": "6",
2024
+ "၇": "7",
2025
+ "၈": "8",
2026
+ "၉": "9",
2027
+ "္": "",
2028
+ "့": "",
2029
+ "း": "",
2030
+ "č": "c",
2031
+ "ď": "d",
2032
+ "ě": "e",
2033
+ "ň": "n",
2034
+ "ř": "r",
2035
+ "š": "s",
2036
+ "ť": "t",
2037
+ "ů": "u",
2038
+ "ž": "z",
2039
+ "Č": "C",
2040
+ "Ď": "D",
2041
+ "Ě": "E",
2042
+ "Ň": "N",
2043
+ "Ř": "R",
2044
+ "Š": "S",
2045
+ "Ť": "T",
2046
+ "Ů": "U",
2047
+ "Ž": "Z",
2048
+ "ހ": "h",
2049
+ "ށ": "sh",
2050
+ "ނ": "n",
2051
+ "ރ": "r",
2052
+ "ބ": "b",
2053
+ "ޅ": "lh",
2054
+ "ކ": "k",
2055
+ "އ": "a",
2056
+ "ވ": "v",
2057
+ "މ": "m",
2058
+ "ފ": "f",
2059
+ "ދ": "dh",
2060
+ "ތ": "th",
2061
+ "ލ": "l",
2062
+ "ގ": "g",
2063
+ "ޏ": "gn",
2064
+ "ސ": "s",
2065
+ "ޑ": "d",
2066
+ "ޒ": "z",
2067
+ "ޓ": "t",
2068
+ "ޔ": "y",
2069
+ "ޕ": "p",
2070
+ "ޖ": "j",
2071
+ "ޗ": "ch",
2072
+ "ޘ": "tt",
2073
+ "ޙ": "hh",
2074
+ "ޚ": "kh",
2075
+ "ޛ": "th",
2076
+ "ޜ": "z",
2077
+ "ޝ": "sh",
2078
+ "ޞ": "s",
2079
+ "ޟ": "d",
2080
+ "ޠ": "t",
2081
+ "ޡ": "z",
2082
+ "ޢ": "a",
2083
+ "ޣ": "gh",
2084
+ "ޤ": "q",
2085
+ "ޥ": "w",
2086
+ "ަ": "a",
2087
+ "ާ": "aa",
2088
+ "ި": "i",
2089
+ "ީ": "ee",
2090
+ "ު": "u",
2091
+ "ޫ": "oo",
2092
+ "ެ": "e",
2093
+ "ޭ": "ey",
2094
+ "ޮ": "o",
2095
+ "ޯ": "oa",
2096
+ "ް": "",
2097
+ "ა": "a",
2098
+ "ბ": "b",
2099
+ "გ": "g",
2100
+ "დ": "d",
2101
+ "ე": "e",
2102
+ "ვ": "v",
2103
+ "ზ": "z",
2104
+ "თ": "t",
2105
+ "ი": "i",
2106
+ "კ": "k",
2107
+ "ლ": "l",
2108
+ "მ": "m",
2109
+ "ნ": "n",
2110
+ "ო": "o",
2111
+ "პ": "p",
2112
+ "ჟ": "zh",
2113
+ "რ": "r",
2114
+ "ს": "s",
2115
+ "ტ": "t",
2116
+ "უ": "u",
2117
+ "ფ": "p",
2118
+ "ქ": "k",
2119
+ "ღ": "gh",
2120
+ "ყ": "q",
2121
+ "შ": "sh",
2122
+ "ჩ": "ch",
2123
+ "ც": "ts",
2124
+ "ძ": "dz",
2125
+ "წ": "ts",
2126
+ "ჭ": "ch",
2127
+ "ხ": "kh",
2128
+ "ჯ": "j",
2129
+ "ჰ": "h",
2130
+ "α": "a",
2131
+ "β": "v",
2132
+ "γ": "g",
2133
+ "δ": "d",
2134
+ "ε": "e",
2135
+ "ζ": "z",
2136
+ "η": "i",
2137
+ "θ": "th",
2138
+ "ι": "i",
2139
+ "κ": "k",
2140
+ "λ": "l",
2141
+ "μ": "m",
2142
+ "ν": "n",
2143
+ "ξ": "ks",
2144
+ "ο": "o",
2145
+ "π": "p",
2146
+ "ρ": "r",
2147
+ "σ": "s",
2148
+ "τ": "t",
2149
+ "υ": "y",
2150
+ "φ": "f",
2151
+ "χ": "x",
2152
+ "ψ": "ps",
2153
+ "ω": "o",
2154
+ "ά": "a",
2155
+ "έ": "e",
2156
+ "ί": "i",
2157
+ "ό": "o",
2158
+ "ύ": "y",
2159
+ "ή": "i",
2160
+ "ώ": "o",
2161
+ "ς": "s",
2162
+ "ϊ": "i",
2163
+ "ΰ": "y",
2164
+ "ϋ": "y",
2165
+ "ΐ": "i",
2166
+ "Α": "A",
2167
+ "Β": "B",
2168
+ "Γ": "G",
2169
+ "Δ": "D",
2170
+ "Ε": "E",
2171
+ "Ζ": "Z",
2172
+ "Η": "I",
2173
+ "Θ": "TH",
2174
+ "Ι": "I",
2175
+ "Κ": "K",
2176
+ "Λ": "L",
2177
+ "Μ": "M",
2178
+ "Ν": "N",
2179
+ "Ξ": "KS",
2180
+ "Ο": "O",
2181
+ "Π": "P",
2182
+ "Ρ": "R",
2183
+ "Σ": "S",
2184
+ "Τ": "T",
2185
+ "Υ": "Y",
2186
+ "Φ": "F",
2187
+ "Χ": "X",
2188
+ "Ψ": "PS",
2189
+ "Ω": "O",
2190
+ "Ά": "A",
2191
+ "Έ": "E",
2192
+ "Ί": "I",
2193
+ "Ό": "O",
2194
+ "Ύ": "Y",
2195
+ "Ή": "I",
2196
+ "Ώ": "O",
2197
+ "Ϊ": "I",
2198
+ "Ϋ": "Y",
2199
+ "ā": "a",
2200
+ "ē": "e",
2201
+ "ģ": "g",
2202
+ "ī": "i",
2203
+ "ķ": "k",
2204
+ "ļ": "l",
2205
+ "ņ": "n",
2206
+ "ū": "u",
2207
+ "Ā": "A",
2208
+ "Ē": "E",
2209
+ "Ģ": "G",
2210
+ "Ī": "I",
2211
+ "Ķ": "k",
2212
+ "Ļ": "L",
2213
+ "Ņ": "N",
2214
+ "Ū": "U",
2215
+ "Ќ": "Kj",
2216
+ "ќ": "kj",
2217
+ "Љ": "Lj",
2218
+ "љ": "lj",
2219
+ "Њ": "Nj",
2220
+ "њ": "nj",
2221
+ "Тс": "Ts",
2222
+ "тс": "ts",
2223
+ "ą": "a",
2224
+ "ć": "c",
2225
+ "ę": "e",
2226
+ "ł": "l",
2227
+ "ń": "n",
2228
+ "ś": "s",
2229
+ "ź": "z",
2230
+ "ż": "z",
2231
+ "Ą": "A",
2232
+ "Ć": "C",
2233
+ "Ę": "E",
2234
+ "Ł": "L",
2235
+ "Ń": "N",
2236
+ "Ś": "S",
2237
+ "Ź": "Z",
2238
+ "Ż": "Z",
2239
+ "Є": "Ye",
2240
+ "І": "I",
2241
+ "Ї": "Yi",
2242
+ "Ґ": "G",
2243
+ "є": "ye",
2244
+ "і": "i",
2245
+ "ї": "yi",
2246
+ "ґ": "g",
2247
+ "ă": "a",
2248
+ "Ă": "A",
2249
+ "ș": "s",
2250
+ "Ș": "S",
2251
+ "ț": "t",
2252
+ "Ț": "T",
2253
+ "ţ": "t",
2254
+ "Ţ": "T",
2255
+ "а": "a",
2256
+ "б": "b",
2257
+ "в": "v",
2258
+ "г": "g",
2259
+ "д": "d",
2260
+ "е": "e",
2261
+ "ё": "yo",
2262
+ "ж": "zh",
2263
+ "з": "z",
2264
+ "и": "i",
2265
+ "й": "i",
2266
+ "к": "k",
2267
+ "л": "l",
2268
+ "м": "m",
2269
+ "н": "n",
2270
+ "о": "o",
2271
+ "п": "p",
2272
+ "р": "r",
2273
+ "с": "s",
2274
+ "т": "t",
2275
+ "у": "u",
2276
+ "ф": "f",
2277
+ "х": "kh",
2278
+ "ц": "c",
2279
+ "ч": "ch",
2280
+ "ш": "sh",
2281
+ "щ": "sh",
2282
+ "ъ": "",
2283
+ "ы": "y",
2284
+ "ь": "",
2285
+ "э": "e",
2286
+ "ю": "yu",
2287
+ "я": "ya",
2288
+ "А": "A",
2289
+ "Б": "B",
2290
+ "В": "V",
2291
+ "Г": "G",
2292
+ "Д": "D",
2293
+ "Е": "E",
2294
+ "Ё": "Yo",
2295
+ "Ж": "Zh",
2296
+ "З": "Z",
2297
+ "И": "I",
2298
+ "Й": "I",
2299
+ "К": "K",
2300
+ "Л": "L",
2301
+ "М": "M",
2302
+ "Н": "N",
2303
+ "О": "O",
2304
+ "П": "P",
2305
+ "Р": "R",
2306
+ "С": "S",
2307
+ "Т": "T",
2308
+ "У": "U",
2309
+ "Ф": "F",
2310
+ "Х": "Kh",
2311
+ "Ц": "C",
2312
+ "Ч": "Ch",
2313
+ "Ш": "Sh",
2314
+ "Щ": "Sh",
2315
+ "Ъ": "",
2316
+ "Ы": "Y",
2317
+ "Ь": "",
2318
+ "Э": "E",
2319
+ "Ю": "Yu",
2320
+ "Я": "Ya",
2321
+ "ђ": "dj",
2322
+ "ј": "j",
2323
+ "ћ": "c",
2324
+ "џ": "dz",
2325
+ "Ђ": "Dj",
2326
+ "Ј": "j",
2327
+ "Ћ": "C",
2328
+ "Џ": "Dz",
2329
+ "ľ": "l",
2330
+ "ĺ": "l",
2331
+ "ŕ": "r",
2332
+ "Ľ": "L",
2333
+ "Ĺ": "L",
2334
+ "Ŕ": "R",
2335
+ "ş": "s",
2336
+ "Ş": "S",
2337
+ "ı": "i",
2338
+ "İ": "I",
2339
+ "ğ": "g",
2340
+ "Ğ": "G",
2341
+ "ả": "a",
2342
+ "Ả": "A",
2343
+ "ẳ": "a",
2344
+ "Ẳ": "A",
2345
+ "ẩ": "a",
2346
+ "Ẩ": "A",
2347
+ "đ": "d",
2348
+ "Đ": "D",
2349
+ "ẹ": "e",
2350
+ "Ẹ": "E",
2351
+ "ẽ": "e",
2352
+ "Ẽ": "E",
2353
+ "ẻ": "e",
2354
+ "Ẻ": "E",
2355
+ "ế": "e",
2356
+ "Ế": "E",
2357
+ "ề": "e",
2358
+ "Ề": "E",
2359
+ "ệ": "e",
2360
+ "Ệ": "E",
2361
+ "ễ": "e",
2362
+ "Ễ": "E",
2363
+ "ể": "e",
2364
+ "Ể": "E",
2365
+ "ỏ": "o",
2366
+ "ọ": "o",
2367
+ "Ọ": "o",
2368
+ "ố": "o",
2369
+ "Ố": "O",
2370
+ "ồ": "o",
2371
+ "Ồ": "O",
2372
+ "ổ": "o",
2373
+ "Ổ": "O",
2374
+ "ộ": "o",
2375
+ "Ộ": "O",
2376
+ "ỗ": "o",
2377
+ "Ỗ": "O",
2378
+ "ơ": "o",
2379
+ "Ơ": "O",
2380
+ "ớ": "o",
2381
+ "Ớ": "O",
2382
+ "ờ": "o",
2383
+ "Ờ": "O",
2384
+ "ợ": "o",
2385
+ "Ợ": "O",
2386
+ "ỡ": "o",
2387
+ "Ỡ": "O",
2388
+ "Ở": "o",
2389
+ "ở": "o",
2390
+ "ị": "i",
2391
+ "Ị": "I",
2392
+ "ĩ": "i",
2393
+ "Ĩ": "I",
2394
+ "ỉ": "i",
2395
+ "Ỉ": "i",
2396
+ "ủ": "u",
2397
+ "Ủ": "U",
2398
+ "ụ": "u",
2399
+ "Ụ": "U",
2400
+ "ũ": "u",
2401
+ "Ũ": "U",
2402
+ "ư": "u",
2403
+ "Ư": "U",
2404
+ "ứ": "u",
2405
+ "Ứ": "U",
2406
+ "ừ": "u",
2407
+ "Ừ": "U",
2408
+ "ự": "u",
2409
+ "Ự": "U",
2410
+ "ữ": "u",
2411
+ "Ữ": "U",
2412
+ "ử": "u",
2413
+ "Ử": "ư",
2414
+ "ỷ": "y",
2415
+ "Ỷ": "y",
2416
+ "ỳ": "y",
2417
+ "Ỳ": "Y",
2418
+ "ỵ": "y",
2419
+ "Ỵ": "Y",
2420
+ "ỹ": "y",
2421
+ "Ỹ": "Y",
2422
+ "ạ": "a",
2423
+ "Ạ": "A",
2424
+ "ấ": "a",
2425
+ "Ấ": "A",
2426
+ "ầ": "a",
2427
+ "Ầ": "A",
2428
+ "ậ": "a",
2429
+ "Ậ": "A",
2430
+ "ẫ": "a",
2431
+ "Ẫ": "A",
2432
+ "ắ": "a",
2433
+ "Ắ": "A",
2434
+ "ằ": "a",
2435
+ "Ằ": "A",
2436
+ "ặ": "a",
2437
+ "Ặ": "A",
2438
+ "ẵ": "a",
2439
+ "Ẵ": "A",
2440
+ "⓪": "0",
2441
+ "①": "1",
2442
+ "②": "2",
2443
+ "③": "3",
2444
+ "④": "4",
2445
+ "⑤": "5",
2446
+ "⑥": "6",
2447
+ "⑦": "7",
2448
+ "⑧": "8",
2449
+ "⑨": "9",
2450
+ "⑩": "10",
2451
+ "⑪": "11",
2452
+ "⑫": "12",
2453
+ "⑬": "13",
2454
+ "⑭": "14",
2455
+ "⑮": "15",
2456
+ "⑯": "16",
2457
+ "⑰": "17",
2458
+ "⑱": "18",
2459
+ "⑲": "18",
2460
+ "⑳": "18",
2461
+ "⓵": "1",
2462
+ "⓶": "2",
2463
+ "⓷": "3",
2464
+ "⓸": "4",
2465
+ "⓹": "5",
2466
+ "⓺": "6",
2467
+ "⓻": "7",
2468
+ "⓼": "8",
2469
+ "⓽": "9",
2470
+ "⓾": "10",
2471
+ "⓿": "0",
2472
+ "⓫": "11",
2473
+ "⓬": "12",
2474
+ "⓭": "13",
2475
+ "⓮": "14",
2476
+ "⓯": "15",
2477
+ "⓰": "16",
2478
+ "⓱": "17",
2479
+ "⓲": "18",
2480
+ "⓳": "19",
2481
+ "⓴": "20",
2482
+ "Ⓐ": "A",
2483
+ "Ⓑ": "B",
2484
+ "Ⓒ": "C",
2485
+ "Ⓓ": "D",
2486
+ "Ⓔ": "E",
2487
+ "Ⓕ": "F",
2488
+ "Ⓖ": "G",
2489
+ "Ⓗ": "H",
2490
+ "Ⓘ": "I",
2491
+ "Ⓙ": "J",
2492
+ "Ⓚ": "K",
2493
+ "Ⓛ": "L",
2494
+ "Ⓜ": "M",
2495
+ "Ⓝ": "N",
2496
+ "Ⓞ": "O",
2497
+ "Ⓟ": "P",
2498
+ "Ⓠ": "Q",
2499
+ "Ⓡ": "R",
2500
+ "Ⓢ": "S",
2501
+ "Ⓣ": "T",
2502
+ "Ⓤ": "U",
2503
+ "Ⓥ": "V",
2504
+ "Ⓦ": "W",
2505
+ "Ⓧ": "X",
2506
+ "Ⓨ": "Y",
2507
+ "Ⓩ": "Z",
2508
+ "ⓐ": "a",
2509
+ "ⓑ": "b",
2510
+ "ⓒ": "c",
2511
+ "ⓓ": "d",
2512
+ "ⓔ": "e",
2513
+ "ⓕ": "f",
2514
+ "ⓖ": "g",
2515
+ "ⓗ": "h",
2516
+ "ⓘ": "i",
2517
+ "ⓙ": "j",
2518
+ "ⓚ": "k",
2519
+ "ⓛ": "l",
2520
+ "ⓜ": "m",
2521
+ "ⓝ": "n",
2522
+ "ⓞ": "o",
2523
+ "ⓟ": "p",
2524
+ "ⓠ": "q",
2525
+ "ⓡ": "r",
2526
+ "ⓢ": "s",
2527
+ "ⓣ": "t",
2528
+ "ⓤ": "u",
2529
+ "ⓦ": "v",
2530
+ "ⓥ": "w",
2531
+ "ⓧ": "x",
2532
+ "ⓨ": "y",
2533
+ "ⓩ": "z",
2534
+ "“": "\"",
2535
+ "”": "\"",
2536
+ "‘": "'",
2537
+ "’": "'",
2538
+ "∂": "d",
2539
+ "ƒ": "f",
2540
+ "™": "(TM)",
2541
+ "©": "(C)",
2542
+ "œ": "oe",
2543
+ "Œ": "OE",
2544
+ "®": "(R)",
2545
+ "†": "+",
2546
+ "℠": "(SM)",
2547
+ "…": "...",
2548
+ "˚": "o",
2549
+ "º": "o",
2550
+ "ª": "a",
2551
+ "•": "*",
2552
+ "၊": ",",
2553
+ "။": ".",
2554
+ "$": "USD",
2555
+ "€": "EUR",
2556
+ "₢": "BRN",
2557
+ "₣": "FRF",
2558
+ "£": "GBP",
2559
+ "₤": "ITL",
2560
+ "₦": "NGN",
2561
+ "₧": "ESP",
2562
+ "₩": "KRW",
2563
+ "₪": "ILS",
2564
+ "₫": "VND",
2565
+ "₭": "LAK",
2566
+ "₮": "MNT",
2567
+ "₯": "GRD",
2568
+ "₱": "ARS",
2569
+ "₲": "PYG",
2570
+ "₳": "ARA",
2571
+ "₴": "UAH",
2572
+ "₵": "GHS",
2573
+ "¢": "cent",
2574
+ "¥": "CNY",
2575
+ "元": "CNY",
2576
+ "円": "YEN",
2577
+ "﷼": "IRR",
2578
+ "₠": "EWE",
2579
+ "฿": "THB",
2580
+ "₨": "INR",
2581
+ "₹": "INR",
2582
+ "₰": "PF",
2583
+ "₺": "TRY",
2584
+ "؋": "AFN",
2585
+ "₼": "AZN",
2586
+ "лв": "BGN",
2587
+ "៛": "KHR",
2588
+ "₡": "CRC",
2589
+ "₸": "KZT",
2590
+ "ден": "MKD",
2591
+ "zł": "PLN",
2592
+ "₽": "RUB",
2593
+ "₾": "GEL"
2594
+ };
2595
+ /**
2596
+ * special look ahead character array
2597
+ * These characters form with consonants to become 'single'/consonant combo
2598
+ * @type [Array]
2599
+ */
2600
+ var lookAheadCharArray = ["်", "ް"];
2601
+ /**
2602
+ * diatricMap for languages where transliteration changes entirely as more diatrics are added
2603
+ * @type {Object}
2604
+ */
2605
+ var diatricMap = {
2606
+ "ာ": "a",
2607
+ "ါ": "a",
2608
+ "ေ": "e",
2609
+ "ဲ": "e",
2610
+ "ိ": "i",
2611
+ "ီ": "i",
2612
+ "ို": "o",
2613
+ "ု": "u",
2614
+ "ူ": "u",
2615
+ "ေါင်": "aung",
2616
+ "ော": "aw",
2617
+ "ော်": "aw",
2618
+ "ေါ": "aw",
2619
+ "ေါ်": "aw",
2620
+ "်": "်",
2621
+ "က်": "et",
2622
+ "ိုက်": "aik",
2623
+ "ောက်": "auk",
2624
+ "င်": "in",
2625
+ "ိုင်": "aing",
2626
+ "ောင်": "aung",
2627
+ "စ်": "it",
2628
+ "ည်": "i",
2629
+ "တ်": "at",
2630
+ "ိတ်": "eik",
2631
+ "ုတ်": "ok",
2632
+ "ွတ်": "ut",
2633
+ "ေတ်": "it",
2634
+ "ဒ်": "d",
2635
+ "ိုဒ်": "ok",
2636
+ "ုဒ်": "ait",
2637
+ "န်": "an",
2638
+ "ာန်": "an",
2639
+ "ိန်": "ein",
2640
+ "ုန်": "on",
2641
+ "ွန်": "un",
2642
+ "ပ်": "at",
2643
+ "ိပ်": "eik",
2644
+ "ုပ်": "ok",
2645
+ "ွပ်": "ut",
2646
+ "န်ုပ်": "nub",
2647
+ "မ်": "an",
2648
+ "ိမ်": "ein",
2649
+ "ုမ်": "on",
2650
+ "ွမ်": "un",
2651
+ "ယ်": "e",
2652
+ "ိုလ်": "ol",
2653
+ "ဉ်": "in",
2654
+ "ံ": "an",
2655
+ "ိံ": "ein",
2656
+ "ုံ": "on",
2657
+ "ައް": "ah",
2658
+ "ަށް": "ah"
2659
+ };
2660
+ /**
2661
+ * langCharMap language specific characters translations
2662
+ * @type {Object}
2663
+ */
2664
+ var langCharMap = {
2665
+ "en": {},
2666
+ "az": {
2667
+ "ç": "c",
2668
+ "ə": "e",
2669
+ "ğ": "g",
2670
+ "ı": "i",
2671
+ "ö": "o",
2672
+ "ş": "s",
2673
+ "ü": "u",
2674
+ "Ç": "C",
2675
+ "Ə": "E",
2676
+ "Ğ": "G",
2677
+ "İ": "I",
2678
+ "Ö": "O",
2679
+ "Ş": "S",
2680
+ "Ü": "U"
2681
+ },
2682
+ "cs": {
2683
+ "č": "c",
2684
+ "ď": "d",
2685
+ "ě": "e",
2686
+ "ň": "n",
2687
+ "ř": "r",
2688
+ "š": "s",
2689
+ "ť": "t",
2690
+ "ů": "u",
2691
+ "ž": "z",
2692
+ "Č": "C",
2693
+ "Ď": "D",
2694
+ "Ě": "E",
2695
+ "Ň": "N",
2696
+ "Ř": "R",
2697
+ "Š": "S",
2698
+ "Ť": "T",
2699
+ "Ů": "U",
2700
+ "Ž": "Z"
2701
+ },
2702
+ "fi": {
2703
+ "ä": "a",
2704
+ "Ä": "A",
2705
+ "ö": "o",
2706
+ "Ö": "O"
2707
+ },
2708
+ "hu": {
2709
+ "ä": "a",
2710
+ "Ä": "A",
2711
+ "ö": "o",
2712
+ "Ö": "O",
2713
+ "ü": "u",
2714
+ "Ü": "U",
2715
+ "ű": "u",
2716
+ "Ű": "U"
2717
+ },
2718
+ "lt": {
2719
+ "ą": "a",
2720
+ "č": "c",
2721
+ "ę": "e",
2722
+ "ė": "e",
2723
+ "į": "i",
2724
+ "š": "s",
2725
+ "ų": "u",
2726
+ "ū": "u",
2727
+ "ž": "z",
2728
+ "Ą": "A",
2729
+ "Č": "C",
2730
+ "Ę": "E",
2731
+ "Ė": "E",
2732
+ "Į": "I",
2733
+ "Š": "S",
2734
+ "Ų": "U",
2735
+ "Ū": "U"
2736
+ },
2737
+ "lv": {
2738
+ "ā": "a",
2739
+ "č": "c",
2740
+ "ē": "e",
2741
+ "ģ": "g",
2742
+ "ī": "i",
2743
+ "ķ": "k",
2744
+ "ļ": "l",
2745
+ "ņ": "n",
2746
+ "š": "s",
2747
+ "ū": "u",
2748
+ "ž": "z",
2749
+ "Ā": "A",
2750
+ "Č": "C",
2751
+ "Ē": "E",
2752
+ "Ģ": "G",
2753
+ "Ī": "i",
2754
+ "Ķ": "k",
2755
+ "Ļ": "L",
2756
+ "Ņ": "N",
2757
+ "Š": "S",
2758
+ "Ū": "u",
2759
+ "Ž": "Z"
2760
+ },
2761
+ "pl": {
2762
+ "ą": "a",
2763
+ "ć": "c",
2764
+ "ę": "e",
2765
+ "ł": "l",
2766
+ "ń": "n",
2767
+ "ó": "o",
2768
+ "ś": "s",
2769
+ "ź": "z",
2770
+ "ż": "z",
2771
+ "Ą": "A",
2772
+ "Ć": "C",
2773
+ "Ę": "e",
2774
+ "Ł": "L",
2775
+ "Ń": "N",
2776
+ "Ó": "O",
2777
+ "Ś": "S",
2778
+ "Ź": "Z",
2779
+ "Ż": "Z"
2780
+ },
2781
+ "sv": {
2782
+ "ä": "a",
2783
+ "Ä": "A",
2784
+ "ö": "o",
2785
+ "Ö": "O"
2786
+ },
2787
+ "sk": {
2788
+ "ä": "a",
2789
+ "Ä": "A"
2790
+ },
2791
+ "sr": {
2792
+ "љ": "lj",
2793
+ "њ": "nj",
2794
+ "Љ": "Lj",
2795
+ "Њ": "Nj",
2796
+ "đ": "dj",
2797
+ "Đ": "Dj"
2798
+ },
2799
+ "tr": {
2800
+ "Ü": "U",
2801
+ "Ö": "O",
2802
+ "ü": "u",
2803
+ "ö": "o"
2804
+ }
2805
+ };
2806
+ /**
2807
+ * symbolMap language specific symbol translations
2808
+ * translations must be transliterated already
2809
+ * @type {Object}
2810
+ */
2811
+ var symbolMap = {
2812
+ "ar": {
2813
+ "∆": "delta",
2814
+ "∞": "la-nihaya",
2815
+ "♥": "hob",
2816
+ "&": "wa",
2817
+ "|": "aw",
2818
+ "<": "aqal-men",
2819
+ ">": "akbar-men",
2820
+ "∑": "majmou",
2821
+ "¤": "omla"
2822
+ },
2823
+ "az": {},
2824
+ "ca": {
2825
+ "∆": "delta",
2826
+ "∞": "infinit",
2827
+ "♥": "amor",
2828
+ "&": "i",
2829
+ "|": "o",
2830
+ "<": "menys que",
2831
+ ">": "mes que",
2832
+ "∑": "suma dels",
2833
+ "¤": "moneda"
2834
+ },
2835
+ "cs": {
2836
+ "∆": "delta",
2837
+ "∞": "nekonecno",
2838
+ "♥": "laska",
2839
+ "&": "a",
2840
+ "|": "nebo",
2841
+ "<": "mensi nez",
2842
+ ">": "vetsi nez",
2843
+ "∑": "soucet",
2844
+ "¤": "mena"
2845
+ },
2846
+ "de": {
2847
+ "∆": "delta",
2848
+ "∞": "unendlich",
2849
+ "♥": "Liebe",
2850
+ "&": "und",
2851
+ "|": "oder",
2852
+ "<": "kleiner als",
2853
+ ">": "groesser als",
2854
+ "∑": "Summe von",
2855
+ "¤": "Waehrung"
2856
+ },
2857
+ "dv": {
2858
+ "∆": "delta",
2859
+ "∞": "kolunulaa",
2860
+ "♥": "loabi",
2861
+ "&": "aai",
2862
+ "|": "noonee",
2863
+ "<": "ah vure kuda",
2864
+ ">": "ah vure bodu",
2865
+ "∑": "jumula",
2866
+ "¤": "faisaa"
2867
+ },
2868
+ "en": {
2869
+ "∆": "delta",
2870
+ "∞": "infinity",
2871
+ "♥": "love",
2872
+ "&": "and",
2873
+ "|": "or",
2874
+ "<": "less than",
2875
+ ">": "greater than",
2876
+ "∑": "sum",
2877
+ "¤": "currency"
2878
+ },
2879
+ "es": {
2880
+ "∆": "delta",
2881
+ "∞": "infinito",
2882
+ "♥": "amor",
2883
+ "&": "y",
2884
+ "|": "u",
2885
+ "<": "menos que",
2886
+ ">": "mas que",
2887
+ "∑": "suma de los",
2888
+ "¤": "moneda"
2889
+ },
2890
+ "fa": {
2891
+ "∆": "delta",
2892
+ "∞": "bi-nahayat",
2893
+ "♥": "eshgh",
2894
+ "&": "va",
2895
+ "|": "ya",
2896
+ "<": "kamtar-az",
2897
+ ">": "bishtar-az",
2898
+ "∑": "majmooe",
2899
+ "¤": "vahed"
2900
+ },
2901
+ "fi": {
2902
+ "∆": "delta",
2903
+ "∞": "aarettomyys",
2904
+ "♥": "rakkaus",
2905
+ "&": "ja",
2906
+ "|": "tai",
2907
+ "<": "pienempi kuin",
2908
+ ">": "suurempi kuin",
2909
+ "∑": "summa",
2910
+ "¤": "valuutta"
2911
+ },
2912
+ "fr": {
2913
+ "∆": "delta",
2914
+ "∞": "infiniment",
2915
+ "♥": "Amour",
2916
+ "&": "et",
2917
+ "|": "ou",
2918
+ "<": "moins que",
2919
+ ">": "superieure a",
2920
+ "∑": "somme des",
2921
+ "¤": "monnaie"
2922
+ },
2923
+ "ge": {
2924
+ "∆": "delta",
2925
+ "∞": "usasruloba",
2926
+ "♥": "siqvaruli",
2927
+ "&": "da",
2928
+ "|": "an",
2929
+ "<": "naklebi",
2930
+ ">": "meti",
2931
+ "∑": "jami",
2932
+ "¤": "valuta"
2933
+ },
2934
+ "gr": {},
2935
+ "hu": {
2936
+ "∆": "delta",
2937
+ "∞": "vegtelen",
2938
+ "♥": "szerelem",
2939
+ "&": "es",
2940
+ "|": "vagy",
2941
+ "<": "kisebb mint",
2942
+ ">": "nagyobb mint",
2943
+ "∑": "szumma",
2944
+ "¤": "penznem"
2945
+ },
2946
+ "it": {
2947
+ "∆": "delta",
2948
+ "∞": "infinito",
2949
+ "♥": "amore",
2950
+ "&": "e",
2951
+ "|": "o",
2952
+ "<": "minore di",
2953
+ ">": "maggiore di",
2954
+ "∑": "somma",
2955
+ "¤": "moneta"
2956
+ },
2957
+ "lt": {
2958
+ "∆": "delta",
2959
+ "∞": "begalybe",
2960
+ "♥": "meile",
2961
+ "&": "ir",
2962
+ "|": "ar",
2963
+ "<": "maziau nei",
2964
+ ">": "daugiau nei",
2965
+ "∑": "suma",
2966
+ "¤": "valiuta"
2967
+ },
2968
+ "lv": {
2969
+ "∆": "delta",
2970
+ "∞": "bezgaliba",
2971
+ "♥": "milestiba",
2972
+ "&": "un",
2973
+ "|": "vai",
2974
+ "<": "mazak neka",
2975
+ ">": "lielaks neka",
2976
+ "∑": "summa",
2977
+ "¤": "valuta"
2978
+ },
2979
+ "my": {
2980
+ "∆": "kwahkhyaet",
2981
+ "∞": "asaonasme",
2982
+ "♥": "akhyait",
2983
+ "&": "nhin",
2984
+ "|": "tho",
2985
+ "<": "ngethaw",
2986
+ ">": "kyithaw",
2987
+ "∑": "paungld",
2988
+ "¤": "ngwekye"
2989
+ },
2990
+ "mk": {},
2991
+ "nl": {
2992
+ "∆": "delta",
2993
+ "∞": "oneindig",
2994
+ "♥": "liefde",
2995
+ "&": "en",
2996
+ "|": "of",
2997
+ "<": "kleiner dan",
2998
+ ">": "groter dan",
2999
+ "∑": "som",
3000
+ "¤": "valuta"
3001
+ },
3002
+ "pl": {
3003
+ "∆": "delta",
3004
+ "∞": "nieskonczonosc",
3005
+ "♥": "milosc",
3006
+ "&": "i",
3007
+ "|": "lub",
3008
+ "<": "mniejsze niz",
3009
+ ">": "wieksze niz",
3010
+ "∑": "suma",
3011
+ "¤": "waluta"
3012
+ },
3013
+ "pt": {
3014
+ "∆": "delta",
3015
+ "∞": "infinito",
3016
+ "♥": "amor",
3017
+ "&": "e",
3018
+ "|": "ou",
3019
+ "<": "menor que",
3020
+ ">": "maior que",
3021
+ "∑": "soma",
3022
+ "¤": "moeda"
3023
+ },
3024
+ "ro": {
3025
+ "∆": "delta",
3026
+ "∞": "infinit",
3027
+ "♥": "dragoste",
3028
+ "&": "si",
3029
+ "|": "sau",
3030
+ "<": "mai mic ca",
3031
+ ">": "mai mare ca",
3032
+ "∑": "suma",
3033
+ "¤": "valuta"
3034
+ },
3035
+ "ru": {
3036
+ "∆": "delta",
3037
+ "∞": "beskonechno",
3038
+ "♥": "lubov",
3039
+ "&": "i",
3040
+ "|": "ili",
3041
+ "<": "menshe",
3042
+ ">": "bolshe",
3043
+ "∑": "summa",
3044
+ "¤": "valjuta"
3045
+ },
3046
+ "sk": {
3047
+ "∆": "delta",
3048
+ "∞": "nekonecno",
3049
+ "♥": "laska",
3050
+ "&": "a",
3051
+ "|": "alebo",
3052
+ "<": "menej ako",
3053
+ ">": "viac ako",
3054
+ "∑": "sucet",
3055
+ "¤": "mena"
3056
+ },
3057
+ "sr": {},
3058
+ "tr": {
3059
+ "∆": "delta",
3060
+ "∞": "sonsuzluk",
3061
+ "♥": "ask",
3062
+ "&": "ve",
3063
+ "|": "veya",
3064
+ "<": "kucuktur",
3065
+ ">": "buyuktur",
3066
+ "∑": "toplam",
3067
+ "¤": "para birimi"
3068
+ },
3069
+ "uk": {
3070
+ "∆": "delta",
3071
+ "∞": "bezkinechnist",
3072
+ "♥": "lubov",
3073
+ "&": "i",
3074
+ "|": "abo",
3075
+ "<": "menshe",
3076
+ ">": "bilshe",
3077
+ "∑": "suma",
3078
+ "¤": "valjuta"
3079
+ },
3080
+ "vn": {
3081
+ "∆": "delta",
3082
+ "∞": "vo cuc",
3083
+ "♥": "yeu",
3084
+ "&": "va",
3085
+ "|": "hoac",
3086
+ "<": "nho hon",
3087
+ ">": "lon hon",
3088
+ "∑": "tong",
3089
+ "¤": "tien te"
3090
+ }
3091
+ };
3092
+ var uricChars = [
3093
+ ";",
3094
+ "?",
3095
+ ":",
3096
+ "@",
3097
+ "&",
3098
+ "=",
3099
+ "+",
3100
+ "$",
3101
+ ",",
3102
+ "/"
3103
+ ].join("");
3104
+ var uricNoSlashChars = [
3105
+ ";",
3106
+ "?",
3107
+ ":",
3108
+ "@",
3109
+ "&",
3110
+ "=",
3111
+ "+",
3112
+ "$",
3113
+ ","
3114
+ ].join("");
3115
+ var markChars = [
3116
+ ".",
3117
+ "!",
3118
+ "~",
3119
+ "*",
3120
+ "'",
3121
+ "(",
3122
+ ")"
3123
+ ].join("");
3124
+ /**
3125
+ * getSlug
3126
+ * @param {string} input input string
3127
+ * @param {object|string} opts config object or separator string/char
3128
+ * @api public
3129
+ * @return {string} sluggified string
3130
+ */
3131
+ var getSlug = function getSlug$1(input, opts) {
3132
+ var separator = "-";
3133
+ var result = "";
3134
+ var diatricString = "";
3135
+ var convertSymbols = true;
3136
+ var customReplacements = {};
3137
+ var maintainCase;
3138
+ var titleCase;
3139
+ var truncate;
3140
+ var uricFlag;
3141
+ var uricNoSlashFlag;
3142
+ var markFlag;
3143
+ var symbol;
3144
+ var langChar;
3145
+ var lucky;
3146
+ var i;
3147
+ var ch;
3148
+ var l;
3149
+ var lastCharWasSymbol;
3150
+ var lastCharWasDiatric;
3151
+ var allowedChars = "";
3152
+ if (typeof input !== "string") return "";
3153
+ if (typeof opts === "string") separator = opts;
3154
+ symbol = symbolMap.en;
3155
+ langChar = langCharMap.en;
3156
+ if (typeof opts === "object") {
3157
+ maintainCase = opts.maintainCase || false;
3158
+ customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
3159
+ truncate = +opts.truncate > 1 && opts.truncate || false;
3160
+ uricFlag = opts.uric || false;
3161
+ uricNoSlashFlag = opts.uricNoSlash || false;
3162
+ markFlag = opts.mark || false;
3163
+ convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
3164
+ separator = opts.separator || separator;
3165
+ if (uricFlag) allowedChars += uricChars;
3166
+ if (uricNoSlashFlag) allowedChars += uricNoSlashChars;
3167
+ if (markFlag) allowedChars += markChars;
3168
+ symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
3169
+ langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
3170
+ if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
3171
+ opts.titleCase.forEach(function(v) {
3172
+ customReplacements[v + ""] = v + "";
3173
+ });
3174
+ titleCase = true;
3175
+ } else titleCase = !!opts.titleCase;
3176
+ if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) opts.custom.forEach(function(v) {
3177
+ customReplacements[v + ""] = v + "";
3178
+ });
3179
+ Object.keys(customReplacements).forEach(function(v) {
3180
+ var r;
3181
+ if (v.length > 1) r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
3182
+ else r = new RegExp(escapeChars(v), "gi");
3183
+ input = input.replace(r, customReplacements[v]);
3184
+ });
3185
+ for (ch in customReplacements) allowedChars += ch;
3186
+ }
3187
+ allowedChars += separator;
3188
+ allowedChars = escapeChars(allowedChars);
3189
+ input = input.replace(/(^\s+|\s+$)/g, "");
3190
+ lastCharWasSymbol = false;
3191
+ lastCharWasDiatric = false;
3192
+ for (i = 0, l = input.length; i < l; i++) {
3193
+ ch = input[i];
3194
+ if (isReplacedCustomChar(ch, customReplacements)) lastCharWasSymbol = false;
3195
+ else if (langChar[ch]) {
3196
+ ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
3197
+ lastCharWasSymbol = false;
3198
+ } else if (ch in charMap) {
3199
+ if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
3200
+ diatricString += ch;
3201
+ ch = "";
3202
+ } else if (lastCharWasDiatric === true) {
3203
+ ch = diatricMap[diatricString] + charMap[ch];
3204
+ diatricString = "";
3205
+ } else ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
3206
+ lastCharWasSymbol = false;
3207
+ lastCharWasDiatric = false;
3208
+ } else if (ch in diatricMap) {
3209
+ diatricString += ch;
3210
+ ch = "";
3211
+ if (i === l - 1) ch = diatricMap[diatricString];
3212
+ lastCharWasDiatric = true;
3213
+ } else if (symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)) {
3214
+ ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
3215
+ ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
3216
+ lastCharWasSymbol = true;
3217
+ } else {
3218
+ if (lastCharWasDiatric === true) {
3219
+ ch = diatricMap[diatricString] + ch;
3220
+ diatricString = "";
3221
+ lastCharWasDiatric = false;
3222
+ } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) ch = " " + ch;
3223
+ lastCharWasSymbol = false;
3224
+ }
3225
+ result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
3226
+ }
3227
+ if (titleCase) result = result.replace(/(\w)(\S*)/g, function(_, i$1, r) {
3228
+ var j = i$1.toUpperCase() + (r !== null ? r : "");
3229
+ return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
3230
+ });
3231
+ result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
3232
+ if (truncate && result.length > truncate) {
3233
+ lucky = result.charAt(truncate) === separator;
3234
+ result = result.slice(0, truncate);
3235
+ if (!lucky) result = result.slice(0, result.lastIndexOf(separator));
3236
+ }
3237
+ if (!maintainCase && !titleCase) result = result.toLowerCase();
3238
+ return result;
3239
+ };
3240
+ /**
3241
+ * createSlug curried(opts)(input)
3242
+ * @param {object|string} opts config object or input string
3243
+ * @return {Function} function getSlugWithConfig()
3244
+ **/
3245
+ var createSlug = function createSlug$1(opts) {
3246
+ /**
3247
+ * getSlugWithConfig
3248
+ * @param {string} input string
3249
+ * @return {string} slug string
3250
+ */
3251
+ return function getSlugWithConfig(input) {
3252
+ return getSlug(input, opts);
3253
+ };
3254
+ };
3255
+ /**
3256
+ * escape Chars
3257
+ * @param {string} input string
3258
+ */
3259
+ var escapeChars = function escapeChars$1(input) {
3260
+ return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
3261
+ };
3262
+ /**
3263
+ * check if the char is an already converted char from custom list
3264
+ * @param {char} ch character to check
3265
+ * @param {object} customReplacements custom translation map
3266
+ */
3267
+ var isReplacedCustomChar = function(ch, customReplacements) {
3268
+ for (var c in customReplacements) if (customReplacements[c] === ch) return true;
3269
+ };
3270
+ if (typeof module !== "undefined" && module.exports) {
3271
+ module.exports = getSlug;
3272
+ module.exports.createSlug = createSlug;
3273
+ } else if (typeof define !== "undefined" && define.amd) define([], function() {
3274
+ return getSlug;
3275
+ });
3276
+ else try {
3277
+ if (root.getSlug || root.createSlug) throw "speakingurl: globals exists /(getSlug|createSlug)/";
3278
+ else {
3279
+ root.getSlug = getSlug;
3280
+ root.createSlug = createSlug;
3281
+ }
3282
+ } catch (e) {}
3283
+ })(exports);
3284
+ }) });
3285
+
3286
+ //#endregion
3287
+ //#region ../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js
3288
+ var require_speakingurl = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js": ((exports, module) => {
3289
+ module.exports = require_speakingurl$1();
3290
+ }) });
3291
+
3292
+ //#endregion
3293
+ //#region ../devtools-kit/src/core/app/index.ts
3294
+ var import_speakingurl = /* @__PURE__ */ __toESM(require_speakingurl(), 1);
3295
+ const appRecordInfo = target.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ ??= {
3296
+ id: 0,
3297
+ appIds: /* @__PURE__ */ new Set()
3298
+ };
3299
+
3300
+ //#endregion
3301
+ //#region ../devtools-kit/src/core/index.ts
3302
+ function onDevToolsClientConnected(fn) {
3303
+ return new Promise((resolve) => {
3304
+ if (devtoolsState.connected && devtoolsState.clientConnected) {
3305
+ fn();
3306
+ resolve();
3307
+ return;
3308
+ }
3309
+ devtoolsContext.hooks.hook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, ({ state }) => {
3310
+ if (state.connected && state.clientConnected) {
3311
+ fn();
3312
+ resolve();
3313
+ }
3314
+ });
3315
+ });
3316
+ }
3317
+
3318
+ //#endregion
3319
+ //#region ../devtools-kit/src/core/high-perf-mode/index.ts
3320
+ function toggleHighPerfMode(state) {
3321
+ devtoolsState.highPerfModeEnabled = state ?? !devtoolsState.highPerfModeEnabled;
3322
+ if (!state && activeAppRecord.value) registerDevToolsPlugin(activeAppRecord.value.app);
3323
+ }
3324
+
3325
+ //#endregion
3326
+ //#region ../devtools-kit/src/core/devtools-client/detected.ts
3327
+ function updateDevToolsClientDetected(params) {
3328
+ devtoolsState.devtoolsClientDetected = {
3329
+ ...devtoolsState.devtoolsClientDetected,
3330
+ ...params
3331
+ };
3332
+ toggleHighPerfMode(!Object.values(devtoolsState.devtoolsClientDetected).some(Boolean));
3333
+ }
3334
+ target.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ ??= updateDevToolsClientDetected;
3335
+
3336
+ //#endregion
3337
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.js
3338
+ var DoubleIndexedKV = class {
3339
+ constructor() {
3340
+ this.keyToValue = /* @__PURE__ */ new Map();
3341
+ this.valueToKey = /* @__PURE__ */ new Map();
3342
+ }
3343
+ set(key, value) {
3344
+ this.keyToValue.set(key, value);
3345
+ this.valueToKey.set(value, key);
3346
+ }
3347
+ getByKey(key) {
3348
+ return this.keyToValue.get(key);
3349
+ }
3350
+ getByValue(value) {
3351
+ return this.valueToKey.get(value);
3352
+ }
3353
+ clear() {
3354
+ this.keyToValue.clear();
3355
+ this.valueToKey.clear();
3356
+ }
3357
+ };
3358
+
3359
+ //#endregion
3360
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/registry.js
3361
+ var Registry = class {
3362
+ constructor(generateIdentifier) {
3363
+ this.generateIdentifier = generateIdentifier;
3364
+ this.kv = new DoubleIndexedKV();
3365
+ }
3366
+ register(value, identifier) {
3367
+ if (this.kv.getByValue(value)) return;
3368
+ if (!identifier) identifier = this.generateIdentifier(value);
3369
+ this.kv.set(identifier, value);
3370
+ }
3371
+ clear() {
3372
+ this.kv.clear();
3373
+ }
3374
+ getIdentifier(value) {
3375
+ return this.kv.getByValue(value);
3376
+ }
3377
+ getValue(identifier) {
3378
+ return this.kv.getByKey(identifier);
3379
+ }
3380
+ };
3381
+
3382
+ //#endregion
3383
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/class-registry.js
3384
+ var ClassRegistry = class extends Registry {
3385
+ constructor() {
3386
+ super((c) => c.name);
3387
+ this.classToAllowedProps = /* @__PURE__ */ new Map();
3388
+ }
3389
+ register(value, options) {
3390
+ if (typeof options === "object") {
3391
+ if (options.allowProps) this.classToAllowedProps.set(value, options.allowProps);
3392
+ super.register(value, options.identifier);
3393
+ } else super.register(value, options);
3394
+ }
3395
+ getAllowedProps(value) {
3396
+ return this.classToAllowedProps.get(value);
3397
+ }
3398
+ };
3399
+
3400
+ //#endregion
3401
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/util.js
3402
+ function valuesOfObj(record) {
3403
+ if ("values" in Object) return Object.values(record);
3404
+ const values = [];
3405
+ for (const key in record) if (record.hasOwnProperty(key)) values.push(record[key]);
3406
+ return values;
3407
+ }
3408
+ function find(record, predicate) {
3409
+ const values = valuesOfObj(record);
3410
+ if ("find" in values) return values.find(predicate);
3411
+ const valuesNotNever = values;
3412
+ for (let i = 0; i < valuesNotNever.length; i++) {
3413
+ const value = valuesNotNever[i];
3414
+ if (predicate(value)) return value;
3415
+ }
3416
+ }
3417
+ function forEach(record, run) {
3418
+ Object.entries(record).forEach(([key, value]) => run(value, key));
3419
+ }
3420
+ function includes(arr, value) {
3421
+ return arr.indexOf(value) !== -1;
3422
+ }
3423
+ function findArr(record, predicate) {
3424
+ for (let i = 0; i < record.length; i++) {
3425
+ const value = record[i];
3426
+ if (predicate(value)) return value;
3427
+ }
3428
+ }
3429
+
3430
+ //#endregion
3431
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.js
3432
+ var CustomTransformerRegistry = class {
3433
+ constructor() {
3434
+ this.transfomers = {};
3435
+ }
3436
+ register(transformer) {
3437
+ this.transfomers[transformer.name] = transformer;
3438
+ }
3439
+ findApplicable(v) {
3440
+ return find(this.transfomers, (transformer) => transformer.isApplicable(v));
3441
+ }
3442
+ findByName(name) {
3443
+ return this.transfomers[name];
3444
+ }
3445
+ };
3446
+
3447
+ //#endregion
3448
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/is.js
3449
+ const getType$1 = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
3450
+ const isUndefined$1 = (payload) => typeof payload === "undefined";
3451
+ const isNull$1 = (payload) => payload === null;
3452
+ const isPlainObject$1 = (payload) => {
3453
+ if (typeof payload !== "object" || payload === null) return false;
3454
+ if (payload === Object.prototype) return false;
3455
+ if (Object.getPrototypeOf(payload) === null) return true;
3456
+ return Object.getPrototypeOf(payload) === Object.prototype;
3457
+ };
3458
+ const isEmptyObject = (payload) => isPlainObject$1(payload) && Object.keys(payload).length === 0;
3459
+ const isArray$1 = (payload) => Array.isArray(payload);
3460
+ const isString = (payload) => typeof payload === "string";
3461
+ const isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
3462
+ const isBoolean = (payload) => typeof payload === "boolean";
3463
+ const isRegExp = (payload) => payload instanceof RegExp;
3464
+ const isMap = (payload) => payload instanceof Map;
3465
+ const isSet = (payload) => payload instanceof Set;
3466
+ const isSymbol = (payload) => getType$1(payload) === "Symbol";
3467
+ const isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
3468
+ const isError = (payload) => payload instanceof Error;
3469
+ const isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
3470
+ const isPrimitive = (payload) => isBoolean(payload) || isNull$1(payload) || isUndefined$1(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
3471
+ const isBigint = (payload) => typeof payload === "bigint";
3472
+ const isInfinite = (payload) => payload === Infinity || payload === -Infinity;
3473
+ const isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
3474
+ const isURL = (payload) => payload instanceof URL;
3475
+
3476
+ //#endregion
3477
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.js
3478
+ const escapeKey = (key) => key.replace(/\./g, "\\.");
3479
+ const stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
3480
+ const parsePath = (string) => {
3481
+ const result = [];
3482
+ let segment = "";
3483
+ for (let i = 0; i < string.length; i++) {
3484
+ let char = string.charAt(i);
3485
+ if (char === "\\" && string.charAt(i + 1) === ".") {
3486
+ segment += ".";
3487
+ i++;
3488
+ continue;
3489
+ }
3490
+ if (char === ".") {
3491
+ result.push(segment);
3492
+ segment = "";
3493
+ continue;
3494
+ }
3495
+ segment += char;
3496
+ }
3497
+ const lastSegment = segment;
3498
+ result.push(lastSegment);
3499
+ return result;
3500
+ };
3501
+
3502
+ //#endregion
3503
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/transformer.js
3504
+ function simpleTransformation(isApplicable, annotation, transform, untransform) {
3505
+ return {
3506
+ isApplicable,
3507
+ annotation,
3508
+ transform,
3509
+ untransform
3510
+ };
3511
+ }
3512
+ const simpleRules = [
3513
+ simpleTransformation(isUndefined$1, "undefined", () => null, () => void 0),
3514
+ simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
3515
+ if (typeof BigInt !== "undefined") return BigInt(v);
3516
+ console.error("Please add a BigInt polyfill.");
3517
+ return v;
3518
+ }),
3519
+ simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
3520
+ simpleTransformation(isError, "Error", (v, superJson) => {
3521
+ const baseError = {
3522
+ name: v.name,
3523
+ message: v.message
3524
+ };
3525
+ superJson.allowedErrorProps.forEach((prop) => {
3526
+ baseError[prop] = v[prop];
3527
+ });
3528
+ return baseError;
3529
+ }, (v, superJson) => {
3530
+ const e = new Error(v.message);
3531
+ e.name = v.name;
3532
+ e.stack = v.stack;
3533
+ superJson.allowedErrorProps.forEach((prop) => {
3534
+ e[prop] = v[prop];
3535
+ });
3536
+ return e;
3537
+ }),
3538
+ simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
3539
+ const body = regex.slice(1, regex.lastIndexOf("/"));
3540
+ const flags = regex.slice(regex.lastIndexOf("/") + 1);
3541
+ return new RegExp(body, flags);
3542
+ }),
3543
+ simpleTransformation(isSet, "set", (v) => [...v.values()], (v) => new Set(v)),
3544
+ simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
3545
+ simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
3546
+ if (isNaNValue(v)) return "NaN";
3547
+ if (v > 0) return "Infinity";
3548
+ else return "-Infinity";
3549
+ }, Number),
3550
+ simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
3551
+ return "-0";
3552
+ }, Number),
3553
+ simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
3554
+ ];
3555
+ function compositeTransformation(isApplicable, annotation, transform, untransform) {
3556
+ return {
3557
+ isApplicable,
3558
+ annotation,
3559
+ transform,
3560
+ untransform
3561
+ };
3562
+ }
3563
+ const symbolRule = compositeTransformation((s, superJson) => {
3564
+ if (isSymbol(s)) return !!superJson.symbolRegistry.getIdentifier(s);
3565
+ return false;
3566
+ }, (s, superJson) => {
3567
+ return ["symbol", superJson.symbolRegistry.getIdentifier(s)];
3568
+ }, (v) => v.description, (_, a, superJson) => {
3569
+ const value = superJson.symbolRegistry.getValue(a[1]);
3570
+ if (!value) throw new Error("Trying to deserialize unknown symbol");
3571
+ return value;
3572
+ });
3573
+ const constructorToName = [
3574
+ Int8Array,
3575
+ Uint8Array,
3576
+ Int16Array,
3577
+ Uint16Array,
3578
+ Int32Array,
3579
+ Uint32Array,
3580
+ Float32Array,
3581
+ Float64Array,
3582
+ Uint8ClampedArray
3583
+ ].reduce((obj, ctor) => {
3584
+ obj[ctor.name] = ctor;
3585
+ return obj;
3586
+ }, {});
3587
+ const typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
3588
+ const ctor = constructorToName[a[1]];
3589
+ if (!ctor) throw new Error("Trying to deserialize unknown typed array");
3590
+ return new ctor(v);
3591
+ });
3592
+ function isInstanceOfRegisteredClass(potentialClass, superJson) {
3593
+ if (potentialClass?.constructor) return !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
3594
+ return false;
3595
+ }
3596
+ const classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
3597
+ return ["class", superJson.classRegistry.getIdentifier(clazz.constructor)];
3598
+ }, (clazz, superJson) => {
3599
+ const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
3600
+ if (!allowedProps) return { ...clazz };
3601
+ const result = {};
3602
+ allowedProps.forEach((prop) => {
3603
+ result[prop] = clazz[prop];
3604
+ });
3605
+ return result;
3606
+ }, (v, a, superJson) => {
3607
+ const clazz = superJson.classRegistry.getValue(a[1]);
3608
+ if (!clazz) throw new Error(`Trying to deserialize unknown class '${a[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3609
+ return Object.assign(Object.create(clazz.prototype), v);
3610
+ });
3611
+ const customRule = compositeTransformation((value, superJson) => {
3612
+ return !!superJson.customTransformerRegistry.findApplicable(value);
3613
+ }, (value, superJson) => {
3614
+ return ["custom", superJson.customTransformerRegistry.findApplicable(value).name];
3615
+ }, (value, superJson) => {
3616
+ return superJson.customTransformerRegistry.findApplicable(value).serialize(value);
3617
+ }, (v, a, superJson) => {
3618
+ const transformer = superJson.customTransformerRegistry.findByName(a[1]);
3619
+ if (!transformer) throw new Error("Trying to deserialize unknown custom value");
3620
+ return transformer.deserialize(v);
3621
+ });
3622
+ const compositeRules = [
3623
+ classRule,
3624
+ symbolRule,
3625
+ customRule,
3626
+ typedArrayRule
3627
+ ];
3628
+ const transformValue = (value, superJson) => {
3629
+ const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
3630
+ if (applicableCompositeRule) return {
3631
+ value: applicableCompositeRule.transform(value, superJson),
3632
+ type: applicableCompositeRule.annotation(value, superJson)
3633
+ };
3634
+ const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
3635
+ if (applicableSimpleRule) return {
3636
+ value: applicableSimpleRule.transform(value, superJson),
3637
+ type: applicableSimpleRule.annotation
3638
+ };
3639
+ };
3640
+ const simpleRulesByAnnotation = {};
3641
+ simpleRules.forEach((rule) => {
3642
+ simpleRulesByAnnotation[rule.annotation] = rule;
3643
+ });
3644
+ const untransformValue = (json, type, superJson) => {
3645
+ if (isArray$1(type)) switch (type[0]) {
3646
+ case "symbol": return symbolRule.untransform(json, type, superJson);
3647
+ case "class": return classRule.untransform(json, type, superJson);
3648
+ case "custom": return customRule.untransform(json, type, superJson);
3649
+ case "typed-array": return typedArrayRule.untransform(json, type, superJson);
3650
+ default: throw new Error("Unknown transformation: " + type);
3651
+ }
3652
+ else {
3653
+ const transformation = simpleRulesByAnnotation[type];
3654
+ if (!transformation) throw new Error("Unknown transformation: " + type);
3655
+ return transformation.untransform(json, superJson);
3656
+ }
3657
+ };
3658
+
3659
+ //#endregion
3660
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/accessDeep.js
3661
+ const getNthKey = (value, n) => {
3662
+ if (n > value.size) throw new Error("index out of bounds");
3663
+ const keys = value.keys();
3664
+ while (n > 0) {
3665
+ keys.next();
3666
+ n--;
3667
+ }
3668
+ return keys.next().value;
3669
+ };
3670
+ function validatePath(path) {
3671
+ if (includes(path, "__proto__")) throw new Error("__proto__ is not allowed as a property");
3672
+ if (includes(path, "prototype")) throw new Error("prototype is not allowed as a property");
3673
+ if (includes(path, "constructor")) throw new Error("constructor is not allowed as a property");
3674
+ }
3675
+ const getDeep = (object, path) => {
3676
+ validatePath(path);
3677
+ for (let i = 0; i < path.length; i++) {
3678
+ const key = path[i];
3679
+ if (isSet(object)) object = getNthKey(object, +key);
3680
+ else if (isMap(object)) {
3681
+ const row = +key;
3682
+ const type = +path[++i] === 0 ? "key" : "value";
3683
+ const keyOfRow = getNthKey(object, row);
3684
+ switch (type) {
3685
+ case "key":
3686
+ object = keyOfRow;
3687
+ break;
3688
+ case "value":
3689
+ object = object.get(keyOfRow);
3690
+ break;
3691
+ }
3692
+ } else object = object[key];
3693
+ }
3694
+ return object;
3695
+ };
3696
+ const setDeep = (object, path, mapper) => {
3697
+ validatePath(path);
3698
+ if (path.length === 0) return mapper(object);
3699
+ let parent = object;
3700
+ for (let i = 0; i < path.length - 1; i++) {
3701
+ const key = path[i];
3702
+ if (isArray$1(parent)) {
3703
+ const index = +key;
3704
+ parent = parent[index];
3705
+ } else if (isPlainObject$1(parent)) parent = parent[key];
3706
+ else if (isSet(parent)) {
3707
+ const row = +key;
3708
+ parent = getNthKey(parent, row);
3709
+ } else if (isMap(parent)) {
3710
+ if (i === path.length - 2) break;
3711
+ const row = +key;
3712
+ const type = +path[++i] === 0 ? "key" : "value";
3713
+ const keyOfRow = getNthKey(parent, row);
3714
+ switch (type) {
3715
+ case "key":
3716
+ parent = keyOfRow;
3717
+ break;
3718
+ case "value":
3719
+ parent = parent.get(keyOfRow);
3720
+ break;
3721
+ }
3722
+ }
3723
+ }
3724
+ const lastKey = path[path.length - 1];
3725
+ if (isArray$1(parent)) parent[+lastKey] = mapper(parent[+lastKey]);
3726
+ else if (isPlainObject$1(parent)) parent[lastKey] = mapper(parent[lastKey]);
3727
+ if (isSet(parent)) {
3728
+ const oldValue = getNthKey(parent, +lastKey);
3729
+ const newValue = mapper(oldValue);
3730
+ if (oldValue !== newValue) {
3731
+ parent.delete(oldValue);
3732
+ parent.add(newValue);
3733
+ }
3734
+ }
3735
+ if (isMap(parent)) {
3736
+ const row = +path[path.length - 2];
3737
+ const keyToRow = getNthKey(parent, row);
3738
+ switch (+lastKey === 0 ? "key" : "value") {
3739
+ case "key": {
3740
+ const newKey = mapper(keyToRow);
3741
+ parent.set(newKey, parent.get(keyToRow));
3742
+ if (newKey !== keyToRow) parent.delete(keyToRow);
3743
+ break;
3744
+ }
3745
+ case "value":
3746
+ parent.set(keyToRow, mapper(parent.get(keyToRow)));
3747
+ break;
3748
+ }
3749
+ }
3750
+ return object;
3751
+ };
3752
+
3753
+ //#endregion
3754
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/plainer.js
3755
+ function traverse(tree, walker$1, origin = []) {
3756
+ if (!tree) return;
3757
+ if (!isArray$1(tree)) {
3758
+ forEach(tree, (subtree, key) => traverse(subtree, walker$1, [...origin, ...parsePath(key)]));
3759
+ return;
3760
+ }
3761
+ const [nodeValue, children] = tree;
3762
+ if (children) forEach(children, (child, key) => {
3763
+ traverse(child, walker$1, [...origin, ...parsePath(key)]);
3764
+ });
3765
+ walker$1(nodeValue, origin);
3766
+ }
3767
+ function applyValueAnnotations(plain, annotations, superJson) {
3768
+ traverse(annotations, (type, path) => {
3769
+ plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
3770
+ });
3771
+ return plain;
3772
+ }
3773
+ function applyReferentialEqualityAnnotations(plain, annotations) {
3774
+ function apply(identicalPaths, path) {
3775
+ const object = getDeep(plain, parsePath(path));
3776
+ identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
3777
+ plain = setDeep(plain, identicalObjectPath, () => object);
3778
+ });
3779
+ }
3780
+ if (isArray$1(annotations)) {
3781
+ const [root, other] = annotations;
3782
+ root.forEach((identicalPath) => {
3783
+ plain = setDeep(plain, parsePath(identicalPath), () => plain);
3784
+ });
3785
+ if (other) forEach(other, apply);
3786
+ } else forEach(annotations, apply);
3787
+ return plain;
3788
+ }
3789
+ const isDeep = (object, superJson) => isPlainObject$1(object) || isArray$1(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
3790
+ function addIdentity(object, path, identities) {
3791
+ const existingSet = identities.get(object);
3792
+ if (existingSet) existingSet.push(path);
3793
+ else identities.set(object, [path]);
3794
+ }
3795
+ function generateReferentialEqualityAnnotations(identitites, dedupe) {
3796
+ const result = {};
3797
+ let rootEqualityPaths = void 0;
3798
+ identitites.forEach((paths) => {
3799
+ if (paths.length <= 1) return;
3800
+ if (!dedupe) paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
3801
+ const [representativePath, ...identicalPaths] = paths;
3802
+ if (representativePath.length === 0) rootEqualityPaths = identicalPaths.map(stringifyPath);
3803
+ else result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
3804
+ });
3805
+ if (rootEqualityPaths) if (isEmptyObject(result)) return [rootEqualityPaths];
3806
+ else return [rootEqualityPaths, result];
3807
+ else return isEmptyObject(result) ? void 0 : result;
3808
+ }
3809
+ const walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
3810
+ const primitive = isPrimitive(object);
3811
+ if (!primitive) {
3812
+ addIdentity(object, path, identities);
3813
+ const seen = seenObjects.get(object);
3814
+ if (seen) return dedupe ? { transformedValue: null } : seen;
3815
+ }
3816
+ if (!isDeep(object, superJson)) {
3817
+ const transformed$1 = transformValue(object, superJson);
3818
+ const result$1 = transformed$1 ? {
3819
+ transformedValue: transformed$1.value,
3820
+ annotations: [transformed$1.type]
3821
+ } : { transformedValue: object };
3822
+ if (!primitive) seenObjects.set(object, result$1);
3823
+ return result$1;
3824
+ }
3825
+ if (includes(objectsInThisPath, object)) return { transformedValue: null };
3826
+ const transformationResult = transformValue(object, superJson);
3827
+ const transformed = transformationResult?.value ?? object;
3828
+ const transformedValue = isArray$1(transformed) ? [] : {};
3829
+ const innerAnnotations = {};
3830
+ forEach(transformed, (value, index) => {
3831
+ if (index === "__proto__" || index === "constructor" || index === "prototype") throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
3832
+ const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
3833
+ transformedValue[index] = recursiveResult.transformedValue;
3834
+ if (isArray$1(recursiveResult.annotations)) innerAnnotations[index] = recursiveResult.annotations;
3835
+ else if (isPlainObject$1(recursiveResult.annotations)) forEach(recursiveResult.annotations, (tree, key) => {
3836
+ innerAnnotations[escapeKey(index) + "." + key] = tree;
3837
+ });
3838
+ });
3839
+ const result = isEmptyObject(innerAnnotations) ? {
3840
+ transformedValue,
3841
+ annotations: !!transformationResult ? [transformationResult.type] : void 0
3842
+ } : {
3843
+ transformedValue,
3844
+ annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
3845
+ };
3846
+ if (!primitive) seenObjects.set(object, result);
3847
+ return result;
3848
+ };
3849
+
3850
+ //#endregion
3851
+ //#region ../../node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.js
3852
+ function getType(payload) {
3853
+ return Object.prototype.toString.call(payload).slice(8, -1);
3854
+ }
3855
+ function isArray(payload) {
3856
+ return getType(payload) === "Array";
3857
+ }
3858
+ function isPlainObject(payload) {
3859
+ if (getType(payload) !== "Object") return false;
3860
+ const prototype = Object.getPrototypeOf(payload);
3861
+ return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
3862
+ }
3863
+ function isNull(payload) {
3864
+ return getType(payload) === "Null";
3865
+ }
3866
+ function isOneOf(a, b, c, d, e) {
3867
+ return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
3868
+ }
3869
+ function isUndefined(payload) {
3870
+ return getType(payload) === "Undefined";
3871
+ }
3872
+ const isNullOrUndefined = isOneOf(isNull, isUndefined);
3873
+
3874
+ //#endregion
3875
+ //#region ../../node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.js
3876
+ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
3877
+ const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
3878
+ if (propType === "enumerable") carry[key] = newVal;
3879
+ if (includeNonenumerable && propType === "nonenumerable") Object.defineProperty(carry, key, {
3880
+ value: newVal,
3881
+ enumerable: false,
3882
+ writable: true,
3883
+ configurable: true
3884
+ });
3885
+ }
3886
+ function copy(target$1, options = {}) {
3887
+ if (isArray(target$1)) return target$1.map((item) => copy(item, options));
3888
+ if (!isPlainObject(target$1)) return target$1;
3889
+ const props = Object.getOwnPropertyNames(target$1);
3890
+ const symbols = Object.getOwnPropertySymbols(target$1);
3891
+ return [...props, ...symbols].reduce((carry, key) => {
3892
+ if (isArray(options.props) && !options.props.includes(key)) return carry;
3893
+ const val = target$1[key];
3894
+ assignProp(carry, key, copy(val, options), target$1, options.nonenumerable);
3895
+ return carry;
3896
+ }, {});
3897
+ }
3898
+
3899
+ //#endregion
3900
+ //#region ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.js
3901
+ var SuperJSON = class {
3902
+ /**
3903
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3904
+ */
3905
+ constructor({ dedupe = false } = {}) {
3906
+ this.classRegistry = new ClassRegistry();
3907
+ this.symbolRegistry = new Registry((s) => s.description ?? "");
3908
+ this.customTransformerRegistry = new CustomTransformerRegistry();
3909
+ this.allowedErrorProps = [];
3910
+ this.dedupe = dedupe;
3911
+ }
3912
+ serialize(object) {
3913
+ const identities = /* @__PURE__ */ new Map();
3914
+ const output = walker(object, identities, this, this.dedupe);
3915
+ const res = { json: output.transformedValue };
3916
+ if (output.annotations) res.meta = {
3917
+ ...res.meta,
3918
+ values: output.annotations
3919
+ };
3920
+ const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
3921
+ if (equalityAnnotations) res.meta = {
3922
+ ...res.meta,
3923
+ referentialEqualities: equalityAnnotations
3924
+ };
3925
+ return res;
3926
+ }
3927
+ deserialize(payload) {
3928
+ const { json, meta } = payload;
3929
+ let result = copy(json);
3930
+ if (meta?.values) result = applyValueAnnotations(result, meta.values, this);
3931
+ if (meta?.referentialEqualities) result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
3932
+ return result;
3933
+ }
3934
+ stringify(object) {
3935
+ return JSON.stringify(this.serialize(object));
3936
+ }
3937
+ parse(string) {
3938
+ return this.deserialize(JSON.parse(string));
3939
+ }
3940
+ registerClass(v, options) {
3941
+ this.classRegistry.register(v, options);
3942
+ }
3943
+ registerSymbol(v, identifier) {
3944
+ this.symbolRegistry.register(v, identifier);
3945
+ }
3946
+ registerCustom(transformer, name) {
3947
+ this.customTransformerRegistry.register({
3948
+ name,
3949
+ ...transformer
3950
+ });
3951
+ }
3952
+ allowErrorProps(...props) {
3953
+ this.allowedErrorProps.push(...props);
3954
+ }
3955
+ };
3956
+ SuperJSON.defaultInstance = new SuperJSON();
3957
+ SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
3958
+ SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
3959
+ SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
3960
+ SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
3961
+ SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
3962
+ SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
3963
+ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
3964
+ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
3965
+ const serialize = SuperJSON.serialize;
3966
+ const deserialize = SuperJSON.deserialize;
3967
+ const stringify = SuperJSON.stringify;
3968
+ const parse = SuperJSON.parse;
3969
+ const registerClass = SuperJSON.registerClass;
3970
+ const registerCustom = SuperJSON.registerCustom;
3971
+ const registerSymbol = SuperJSON.registerSymbol;
3972
+ const allowErrorProps = SuperJSON.allowErrorProps;
3973
+
3974
+ //#endregion
3975
+ //#region ../devtools-kit/src/messaging/index.ts
3976
+ target.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ ??= [];
3977
+ target.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ ??= null;
3978
+ target.__VUE_DEVTOOLS_KIT_RPC_SERVER__ ??= null;
3979
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
3980
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
3981
+ target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
3982
+
3983
+ //#endregion
3984
+ //#region ../devtools-kit/src/shared/transfer.ts
3985
+ const MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
3986
+
3987
+ //#endregion
3988
+ exports.addCustomCommand = addCustomCommand;
3989
+ exports.addCustomTab = addCustomTab;
3990
+ exports.onDevToolsClientConnected = onDevToolsClientConnected;
3991
+ exports.onDevToolsConnected = onDevToolsConnected;
3992
+ exports.removeCustomCommand = removeCustomCommand;
3993
+ exports.setupDevToolsPlugin = setupDevToolsPlugin;
3994
+ exports.setupDevtoolsPlugin = setupDevToolsPlugin;
3995
+ return exports;
3996
+ })({});