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