@jxsuite/studio 2.4.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/chunks/{cf-settings-g5fbf2zp.js → cf-settings-zj2cj1ar.js} +6 -3
  2. package/dist/chunks/{content-source-k9724vcv.js → content-source-7fy9qrm0.js} +10 -9
  3. package/dist/chunks/{convert-to-repeater-k10dvcc7.js → convert-to-repeater-6vvx96n2.js} +9 -8
  4. package/dist/chunks/{extension-sections-0ada0xcw.js → extension-sections-kwzvpemr.js} +13 -12
  5. package/dist/chunks/{files-yew27sn9.js → files-xcybanxe.js} +14 -13
  6. package/dist/chunks/{format-host-wewba4nq.js → format-host-8fr3545e.js} +2 -2
  7. package/dist/chunks/{git-panel-2dh1aw50.js → git-panel-g01d93vc.js} +9 -8
  8. package/dist/chunks/{layers-panel-qnsghwwd.js → layers-panel-27essgkc.js} +12 -11
  9. package/dist/chunks/{publish-panel-a0pdft5w.js → publish-panel-09sy2bab.js} +8 -7
  10. package/dist/chunks/{quick-search-9avyc4pc.js → quick-search-sefb61v8.js} +15 -14
  11. package/dist/chunks/{right-panel-kcnhtc5j.js → right-panel-9r32jd5j.js} +11 -10
  12. package/dist/chunks/{studio-aweyr4v1.js → studio-2x9zbxmx.js} +2 -2
  13. package/dist/chunks/{studio-ef8t53vc.js → studio-3dkcd4c5.js} +3 -3
  14. package/dist/chunks/{studio-hb7c46jy.js → studio-5efrtn1m.js} +9 -7
  15. package/dist/chunks/{studio-v1va0vhd.js → studio-6z5eyjwn.js} +24 -25
  16. package/dist/chunks/{studio-ke244pam.js → studio-7p35254k.js} +33 -11
  17. package/dist/chunks/{studio-f5yyvqxv.js → studio-8ezdegcx.js} +13 -11
  18. package/dist/chunks/{studio-cz2j1c0g.js → studio-a0yp7syn.js} +55 -18
  19. package/dist/chunks/{studio-26sv44br.js → studio-dc8s8heb.js} +34 -23
  20. package/dist/chunks/{studio-jnakhg87.js → studio-g5gdqnyd.js} +4 -4
  21. package/dist/chunks/{studio-rqemfhz6.js → studio-hcxzyk3x.js} +2 -2
  22. package/dist/chunks/{studio-ws6ef6js.js → studio-hj2se583.js} +12 -10
  23. package/dist/chunks/{studio-pyrw8h0w.js → studio-j595e748.js} +407 -167
  24. package/dist/chunks/{studio-dgj7gq44.js → studio-k4jvjcfx.js} +4 -4
  25. package/dist/chunks/studio-kfpek536.js +28 -0
  26. package/dist/chunks/{studio-sccge2wf.js → studio-p5dja96s.js} +2 -2
  27. package/dist/chunks/{studio-0b6fs05q.js → studio-pkp61mh8.js} +5 -5
  28. package/dist/chunks/studio-qpfq7xhm.js +1802 -0
  29. package/dist/chunks/{studio-ra7ar50f.js → studio-r5xbtctf.js} +51 -1565
  30. package/dist/chunks/{studio-v2c5pmjj.js → studio-rh1cnamv.js} +17 -15
  31. package/dist/chunks/{studio-28xc8ws4.js → studio-ry1vz5sv.js} +10 -8
  32. package/dist/chunks/{studio-hyn3vhwr.js → studio-xntfdy1x.js} +5 -5
  33. package/dist/iframe-entry.js +344 -26
  34. package/dist/studio.js +274 -247
  35. package/package.json +9 -9
  36. package/src/browse/library-layouts.ts +3 -3
  37. package/src/browse/library-pane.ts +2 -2
  38. package/src/browse/library-preview.ts +19 -3
  39. package/src/canvas/asset-refs.ts +119 -0
  40. package/src/canvas/asset-resolve.ts +256 -0
  41. package/src/canvas/canvas-live-render.ts +23 -15
  42. package/src/canvas/iframe-entry.ts +1 -0
  43. package/src/canvas/iframe-host.ts +4 -0
  44. package/src/canvas/iframe-protocol.ts +9 -0
  45. package/src/canvas/iframe-render.ts +28 -10
  46. package/src/canvas/site-style-css.ts +2 -6
  47. package/src/editor/file-drop-action.ts +2 -1
  48. package/src/files/files.ts +2 -2
  49. package/src/files/media-paths.ts +37 -14
  50. package/src/files/media-upload.ts +47 -6
  51. package/src/grid/grid-idle.ts +45 -0
  52. package/src/grid/grid-view.ts +21 -0
  53. package/src/grid/schema-columns.ts +2 -1
  54. package/src/grid/sources/content-source.ts +24 -3
  55. package/src/new-project/import-tab.ts +3 -2
  56. package/src/panels/ai-chat/composer.ts +30 -13
  57. package/src/panels/frontmatter-fields.ts +6 -2
  58. package/src/panels/properties-panel.ts +8 -2
  59. package/src/panels/seo-modal.ts +5 -6
  60. package/src/panels/signals-panel.ts +2 -1
  61. package/src/platforms/cloud.ts +14 -3
  62. package/src/platforms/devserver.ts +5 -1
  63. package/src/services/ai-models.ts +101 -11
  64. package/src/services/ai-settings.ts +69 -71
  65. package/src/services/cf-settings.ts +19 -37
  66. package/src/services/document-assistant.ts +4 -3
  67. package/src/services/idle.ts +6 -1
  68. package/src/services/settings/definitions.ts +164 -0
  69. package/src/services/settings/kernel.ts +335 -0
  70. package/src/services/settings/write-queue.ts +116 -0
  71. package/src/settings/preferences-accounts.ts +6 -19
  72. package/src/settings/preferences-keymap.ts +8 -18
  73. package/src/settings/schema-field-ui.ts +2 -2
  74. package/src/shell.ts +6 -14
  75. package/src/studio.ts +32 -1
  76. package/src/types.ts +61 -3
  77. package/src/ui/ai-credentials-form.ts +52 -27
  78. package/src/ui/media-picker.ts +6 -11
  79. package/src/utils/studio-utils.ts +45 -3
  80. package/dist/chunks/studio-a7pzveq1.js +0 -110
  81. package/src/canvas/content-assets.ts +0 -263
  82. package/src/services/settings-store.ts +0 -99
@@ -21,12 +21,28 @@ import {
21
21
  requireProjectState,
22
22
  setProjectState
23
23
  } from "./studio-cjm7fdjf.js";
24
+ import {
25
+ SETTINGS,
26
+ computed,
27
+ dismiss,
28
+ effect,
29
+ effectScope,
30
+ notify,
31
+ onScopeDispose,
32
+ pinClock,
33
+ reactive,
34
+ readStoredSetting,
35
+ setSetting,
36
+ shallowRef,
37
+ toRaw,
38
+ toasts
39
+ } from "./studio-qpfq7xhm.js";
24
40
  import {
25
41
  defaultContentFormat,
26
42
  formatByName,
27
43
  formatForPath,
28
44
  loadedMonaco
29
- } from "./studio-rqemfhz6.js";
45
+ } from "./studio-hcxzyk3x.js";
30
46
  import {
31
47
  getPlatform
32
48
  } from "./studio-sas7mt3k.js";
@@ -214,1535 +230,6 @@ function localeSlot(segments) {
214
230
  return -1;
215
231
  }
216
232
 
217
- // ../../node_modules/@vue/shared/dist/shared.esm-bundler.js
218
- function makeMap(str) {
219
- const map = /* @__PURE__ */ Object.create(null);
220
- for (const key of str.split(","))
221
- map[key] = 1;
222
- return (val) => (val in map);
223
- }
224
- var EMPTY_OBJ = Object.freeze({});
225
- var EMPTY_ARR = Object.freeze([]);
226
- var extend = Object.assign;
227
- var hasOwnProperty = Object.prototype.hasOwnProperty;
228
- var hasOwn = (val, key) => hasOwnProperty.call(val, key);
229
- var isArray = Array.isArray;
230
- var isMap = (val) => toTypeString(val) === "[object Map]";
231
- var isFunction = (val) => typeof val === "function";
232
- var isString = (val) => typeof val === "string";
233
- var isSymbol = (val) => typeof val === "symbol";
234
- var isObject = (val) => val !== null && typeof val === "object";
235
- var objectToString = Object.prototype.toString;
236
- var toTypeString = (value) => objectToString.call(value);
237
- var toRawType = (value) => {
238
- return toTypeString(value).slice(8, -1);
239
- };
240
- var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
241
- var cacheStringFunction = (fn) => {
242
- const cache = /* @__PURE__ */ Object.create(null);
243
- return (str) => {
244
- const hit = cache[str];
245
- return hit || (cache[str] = fn(str));
246
- };
247
- };
248
- var camelizeRE = /-\w/g;
249
- var camelize = cacheStringFunction((str) => {
250
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
251
- });
252
- var hyphenateRE = /\B([A-Z])/g;
253
- var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
254
- var capitalize = cacheStringFunction((str) => {
255
- return str.charAt(0).toUpperCase() + str.slice(1);
256
- });
257
- var toHandlerKey = cacheStringFunction((str) => {
258
- const s = str ? `on${capitalize(str)}` : ``;
259
- return s;
260
- });
261
- var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
262
- var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
263
- var isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
264
-
265
- // ../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
266
- function warn(msg, ...args) {
267
- console.warn(`[Vue warn] ${msg}`, ...args);
268
- }
269
- var activeEffectScope;
270
-
271
- class EffectScope {
272
- constructor(detached = false) {
273
- this.detached = detached;
274
- this._active = true;
275
- this._on = 0;
276
- this.effects = [];
277
- this.cleanups = [];
278
- this._isPaused = false;
279
- this._warnOnRun = true;
280
- this.__v_skip = true;
281
- if (!detached && activeEffectScope) {
282
- if (activeEffectScope.active) {
283
- this.parent = activeEffectScope;
284
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
285
- } else {
286
- this._active = false;
287
- this._warnOnRun = false;
288
- }
289
- }
290
- }
291
- get active() {
292
- return this._active;
293
- }
294
- pause() {
295
- if (this._active) {
296
- this._isPaused = true;
297
- let i, l;
298
- if (this.scopes) {
299
- const scopes = this.scopes.slice();
300
- for (i = 0, l = scopes.length;i < l; i++) {
301
- scopes[i].pause();
302
- }
303
- }
304
- for (i = 0, l = this.effects.length;i < l; i++) {
305
- this.effects[i].pause();
306
- }
307
- }
308
- }
309
- resume() {
310
- if (this._active) {
311
- if (this._isPaused) {
312
- this._isPaused = false;
313
- let i, l;
314
- if (this.scopes) {
315
- const scopes = this.scopes.slice();
316
- for (i = 0, l = scopes.length;i < l; i++) {
317
- scopes[i].resume();
318
- }
319
- }
320
- const effects = this.effects.slice();
321
- for (i = 0, l = effects.length;i < l; i++) {
322
- effects[i].resume();
323
- }
324
- }
325
- }
326
- }
327
- run(fn) {
328
- if (this._active) {
329
- const currentEffectScope = activeEffectScope;
330
- try {
331
- activeEffectScope = this;
332
- return fn();
333
- } finally {
334
- activeEffectScope = currentEffectScope;
335
- }
336
- } else if (this._warnOnRun) {
337
- warn(`cannot run an inactive effect scope.`);
338
- }
339
- }
340
- on() {
341
- if (++this._on === 1) {
342
- this.prevScope = activeEffectScope;
343
- activeEffectScope = this;
344
- }
345
- }
346
- off() {
347
- if (this._on > 0 && --this._on === 0) {
348
- if (activeEffectScope === this) {
349
- activeEffectScope = this.prevScope;
350
- } else {
351
- let current = activeEffectScope;
352
- while (current) {
353
- if (current.prevScope === this) {
354
- current.prevScope = this.prevScope;
355
- break;
356
- }
357
- current = current.prevScope;
358
- }
359
- }
360
- this.prevScope = undefined;
361
- }
362
- }
363
- stop(fromParent) {
364
- if (this._active) {
365
- this._active = false;
366
- let i, l;
367
- for (i = 0, l = this.effects.length;i < l; i++) {
368
- this.effects[i].stop();
369
- }
370
- this.effects.length = 0;
371
- for (i = 0, l = this.cleanups.length;i < l; i++) {
372
- this.cleanups[i]();
373
- }
374
- this.cleanups.length = 0;
375
- if (this.scopes) {
376
- const scopes = this.scopes.slice();
377
- for (i = 0, l = scopes.length;i < l; i++) {
378
- scopes[i].stop(true);
379
- }
380
- this.scopes.length = 0;
381
- }
382
- if (!this.detached && this.parent && !fromParent) {
383
- const last = this.parent.scopes.pop();
384
- if (last && last !== this) {
385
- this.parent.scopes[this.index] = last;
386
- last.index = this.index;
387
- }
388
- }
389
- this.parent = undefined;
390
- }
391
- }
392
- }
393
- function effectScope(detached) {
394
- return new EffectScope(detached);
395
- }
396
- function onScopeDispose(fn, failSilently = false) {
397
- if (activeEffectScope) {
398
- activeEffectScope.cleanups.push(fn);
399
- } else if (!failSilently) {
400
- warn(`onScopeDispose() is called when there is no active effect scope to be associated with.`);
401
- }
402
- }
403
- var activeSub;
404
- var pausedQueueEffects = /* @__PURE__ */ new WeakSet;
405
-
406
- class ReactiveEffect {
407
- constructor(fn) {
408
- this.fn = fn;
409
- this.deps = undefined;
410
- this.depsTail = undefined;
411
- this.flags = 1 | 4;
412
- this.next = undefined;
413
- this.cleanup = undefined;
414
- this.scheduler = undefined;
415
- if (activeEffectScope) {
416
- if (activeEffectScope.active) {
417
- activeEffectScope.effects.push(this);
418
- } else {
419
- this.flags &= -2;
420
- }
421
- }
422
- }
423
- pause() {
424
- this.flags |= 64;
425
- }
426
- resume() {
427
- if (this.flags & 64) {
428
- this.flags &= -65;
429
- if (pausedQueueEffects.has(this)) {
430
- pausedQueueEffects.delete(this);
431
- this.trigger();
432
- }
433
- }
434
- }
435
- notify() {
436
- if (this.flags & 2 && !(this.flags & 32)) {
437
- return;
438
- }
439
- if (!(this.flags & 8)) {
440
- batch(this);
441
- }
442
- }
443
- run() {
444
- if (!(this.flags & 1)) {
445
- return this.fn();
446
- }
447
- this.flags |= 2;
448
- cleanupEffect(this);
449
- prepareDeps(this);
450
- const prevEffect = activeSub;
451
- const prevShouldTrack = shouldTrack;
452
- activeSub = this;
453
- shouldTrack = true;
454
- try {
455
- return this.fn();
456
- } finally {
457
- if (activeSub !== this) {
458
- warn("Active effect was not restored correctly - this is likely a Vue internal bug.");
459
- }
460
- cleanupDeps(this);
461
- activeSub = prevEffect;
462
- shouldTrack = prevShouldTrack;
463
- this.flags &= -3;
464
- }
465
- }
466
- stop() {
467
- if (this.flags & 1) {
468
- for (let link = this.deps;link; link = link.nextDep) {
469
- removeSub(link);
470
- }
471
- this.deps = this.depsTail = undefined;
472
- cleanupEffect(this);
473
- this.onStop && this.onStop();
474
- this.flags &= -2;
475
- }
476
- }
477
- trigger() {
478
- if (this.flags & 64) {
479
- pausedQueueEffects.add(this);
480
- } else if (this.scheduler) {
481
- this.scheduler();
482
- } else {
483
- this.runIfDirty();
484
- }
485
- }
486
- runIfDirty() {
487
- if (isDirty(this)) {
488
- this.run();
489
- }
490
- }
491
- get dirty() {
492
- return isDirty(this);
493
- }
494
- }
495
- var batchDepth = 0;
496
- var batchedSub;
497
- var batchedComputed;
498
- function batch(sub, isComputed = false) {
499
- sub.flags |= 8;
500
- if (isComputed) {
501
- sub.next = batchedComputed;
502
- batchedComputed = sub;
503
- return;
504
- }
505
- sub.next = batchedSub;
506
- batchedSub = sub;
507
- }
508
- function startBatch() {
509
- batchDepth++;
510
- }
511
- function endBatch() {
512
- if (--batchDepth > 0) {
513
- return;
514
- }
515
- if (batchedComputed) {
516
- let e = batchedComputed;
517
- batchedComputed = undefined;
518
- while (e) {
519
- const next = e.next;
520
- e.next = undefined;
521
- e.flags &= -9;
522
- e = next;
523
- }
524
- }
525
- let error;
526
- while (batchedSub) {
527
- let e = batchedSub;
528
- batchedSub = undefined;
529
- while (e) {
530
- const next = e.next;
531
- e.next = undefined;
532
- e.flags &= -9;
533
- if (e.flags & 1) {
534
- try {
535
- e.trigger();
536
- } catch (err) {
537
- if (!error)
538
- error = err;
539
- }
540
- }
541
- e = next;
542
- }
543
- }
544
- if (error)
545
- throw error;
546
- }
547
- function prepareDeps(sub) {
548
- for (let link = sub.deps;link; link = link.nextDep) {
549
- link.version = -1;
550
- link.prevActiveLink = link.dep.activeLink;
551
- link.dep.activeLink = link;
552
- }
553
- }
554
- function cleanupDeps(sub) {
555
- let head;
556
- let tail = sub.depsTail;
557
- let link = tail;
558
- while (link) {
559
- const prev = link.prevDep;
560
- if (link.version === -1) {
561
- if (link === tail)
562
- tail = prev;
563
- removeSub(link);
564
- removeDep(link);
565
- } else {
566
- head = link;
567
- }
568
- link.dep.activeLink = link.prevActiveLink;
569
- link.prevActiveLink = undefined;
570
- link = prev;
571
- }
572
- sub.deps = head;
573
- sub.depsTail = tail;
574
- }
575
- function isDirty(sub) {
576
- for (let link = sub.deps;link; link = link.nextDep) {
577
- if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
578
- return true;
579
- }
580
- }
581
- if (sub._dirty) {
582
- return true;
583
- }
584
- return false;
585
- }
586
- function refreshComputed(computed) {
587
- if (computed.flags & 4 && !(computed.flags & 16)) {
588
- return;
589
- }
590
- computed.flags &= -17;
591
- if (computed.globalVersion === globalVersion) {
592
- return;
593
- }
594
- computed.globalVersion = globalVersion;
595
- if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
596
- return;
597
- }
598
- computed.flags |= 2;
599
- const dep = computed.dep;
600
- const prevSub = activeSub;
601
- const prevShouldTrack = shouldTrack;
602
- activeSub = computed;
603
- shouldTrack = true;
604
- try {
605
- prepareDeps(computed);
606
- const value = computed.fn(computed._value);
607
- if (dep.version === 0 || hasChanged(value, computed._value)) {
608
- computed.flags |= 128;
609
- computed._value = value;
610
- dep.version++;
611
- }
612
- } catch (err) {
613
- dep.version++;
614
- throw err;
615
- } finally {
616
- activeSub = prevSub;
617
- shouldTrack = prevShouldTrack;
618
- cleanupDeps(computed);
619
- computed.flags &= -3;
620
- }
621
- }
622
- function removeSub(link, soft = false) {
623
- const { dep, prevSub, nextSub } = link;
624
- if (prevSub) {
625
- prevSub.nextSub = nextSub;
626
- link.prevSub = undefined;
627
- }
628
- if (nextSub) {
629
- nextSub.prevSub = prevSub;
630
- link.nextSub = undefined;
631
- }
632
- if (dep.subsHead === link) {
633
- dep.subsHead = nextSub;
634
- }
635
- if (dep.subs === link) {
636
- dep.subs = prevSub;
637
- if (!prevSub && dep.computed) {
638
- dep.computed.flags &= -5;
639
- for (let l = dep.computed.deps;l; l = l.nextDep) {
640
- removeSub(l, true);
641
- }
642
- }
643
- }
644
- if (!soft && !--dep.sc && dep.map) {
645
- dep.map.delete(dep.key);
646
- }
647
- }
648
- function removeDep(link) {
649
- const { prevDep, nextDep } = link;
650
- if (prevDep) {
651
- prevDep.nextDep = nextDep;
652
- link.prevDep = undefined;
653
- }
654
- if (nextDep) {
655
- nextDep.prevDep = prevDep;
656
- link.nextDep = undefined;
657
- }
658
- }
659
- function effect(fn, options) {
660
- if (fn.effect instanceof ReactiveEffect) {
661
- fn = fn.effect.fn;
662
- }
663
- const e = new ReactiveEffect(fn);
664
- if (options) {
665
- extend(e, options);
666
- }
667
- try {
668
- e.run();
669
- } catch (err) {
670
- e.stop();
671
- throw err;
672
- }
673
- const runner = e.run.bind(e);
674
- runner.effect = e;
675
- return runner;
676
- }
677
- var shouldTrack = true;
678
- var trackStack = [];
679
- function pauseTracking() {
680
- trackStack.push(shouldTrack);
681
- shouldTrack = false;
682
- }
683
- function resetTracking() {
684
- const last = trackStack.pop();
685
- shouldTrack = last === undefined ? true : last;
686
- }
687
- function onEffectCleanup(fn, failSilently = false) {
688
- if (activeSub instanceof ReactiveEffect) {
689
- activeSub.cleanup = fn;
690
- } else if (!failSilently) {
691
- warn(`onEffectCleanup() was called when there was no active effect to associate with.`);
692
- }
693
- }
694
- function cleanupEffect(e) {
695
- const { cleanup } = e;
696
- e.cleanup = undefined;
697
- if (cleanup) {
698
- const prevSub = activeSub;
699
- activeSub = undefined;
700
- try {
701
- cleanup();
702
- } finally {
703
- activeSub = prevSub;
704
- }
705
- }
706
- }
707
- var globalVersion = 0;
708
-
709
- class Link {
710
- constructor(sub, dep) {
711
- this.sub = sub;
712
- this.dep = dep;
713
- this.version = dep.version;
714
- this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = undefined;
715
- }
716
- }
717
-
718
- class Dep {
719
- constructor(computed) {
720
- this.computed = computed;
721
- this.version = 0;
722
- this.activeLink = undefined;
723
- this.subs = undefined;
724
- this.map = undefined;
725
- this.key = undefined;
726
- this.sc = 0;
727
- this.__v_skip = true;
728
- if (true) {
729
- this.subsHead = undefined;
730
- }
731
- }
732
- track(debugInfo) {
733
- if (!activeSub || !shouldTrack || activeSub === this.computed) {
734
- return;
735
- }
736
- let link = this.activeLink;
737
- if (link === undefined || link.sub !== activeSub) {
738
- link = this.activeLink = new Link(activeSub, this);
739
- if (!activeSub.deps) {
740
- activeSub.deps = activeSub.depsTail = link;
741
- } else {
742
- link.prevDep = activeSub.depsTail;
743
- activeSub.depsTail.nextDep = link;
744
- activeSub.depsTail = link;
745
- }
746
- addSub(link);
747
- } else if (link.version === -1) {
748
- link.version = this.version;
749
- if (link.nextDep) {
750
- const next = link.nextDep;
751
- next.prevDep = link.prevDep;
752
- if (link.prevDep) {
753
- link.prevDep.nextDep = next;
754
- }
755
- link.prevDep = activeSub.depsTail;
756
- link.nextDep = undefined;
757
- activeSub.depsTail.nextDep = link;
758
- activeSub.depsTail = link;
759
- if (activeSub.deps === link) {
760
- activeSub.deps = next;
761
- }
762
- }
763
- }
764
- if (activeSub.onTrack) {
765
- activeSub.onTrack(extend({
766
- effect: activeSub
767
- }, debugInfo));
768
- }
769
- return link;
770
- }
771
- trigger(debugInfo) {
772
- this.version++;
773
- globalVersion++;
774
- this.notify(debugInfo);
775
- }
776
- notify(debugInfo) {
777
- startBatch();
778
- try {
779
- if (true) {
780
- for (let head = this.subsHead;head; head = head.nextSub) {
781
- if (head.sub.onTrigger && !(head.sub.flags & 8)) {
782
- head.sub.onTrigger(extend({
783
- effect: head.sub
784
- }, debugInfo));
785
- }
786
- }
787
- }
788
- for (let link = this.subs;link; link = link.prevSub) {
789
- if (link.sub.notify()) {
790
- link.sub.dep.notify();
791
- }
792
- }
793
- } finally {
794
- endBatch();
795
- }
796
- }
797
- }
798
- function addSub(link) {
799
- link.dep.sc++;
800
- if (link.sub.flags & 4) {
801
- const computed = link.dep.computed;
802
- if (computed && !link.dep.subs) {
803
- computed.flags |= 4 | 16;
804
- for (let l = computed.deps;l; l = l.nextDep) {
805
- addSub(l);
806
- }
807
- }
808
- const currentTail = link.dep.subs;
809
- if (currentTail !== link) {
810
- link.prevSub = currentTail;
811
- if (currentTail)
812
- currentTail.nextSub = link;
813
- }
814
- if (link.dep.subsHead === undefined) {
815
- link.dep.subsHead = link;
816
- }
817
- link.dep.subs = link;
818
- }
819
- }
820
- var targetMap = /* @__PURE__ */ new WeakMap;
821
- var ITERATE_KEY = /* @__PURE__ */ Symbol("Object iterate");
822
- var MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("Map keys iterate");
823
- var ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol("Array iterate");
824
- function track(target, type, key) {
825
- if (shouldTrack && activeSub) {
826
- let depsMap = targetMap.get(target);
827
- if (!depsMap) {
828
- targetMap.set(target, depsMap = /* @__PURE__ */ new Map);
829
- }
830
- let dep = depsMap.get(key);
831
- if (!dep) {
832
- depsMap.set(key, dep = new Dep);
833
- dep.map = depsMap;
834
- dep.key = key;
835
- }
836
- if (true) {
837
- dep.track({
838
- target,
839
- type,
840
- key
841
- });
842
- }
843
- }
844
- }
845
- function trigger(target, type, key, newValue, oldValue, oldTarget) {
846
- const depsMap = targetMap.get(target);
847
- if (!depsMap) {
848
- globalVersion++;
849
- return;
850
- }
851
- const run = (dep) => {
852
- if (dep) {
853
- if (true) {
854
- dep.trigger({
855
- target,
856
- type,
857
- key,
858
- newValue,
859
- oldValue,
860
- oldTarget
861
- });
862
- }
863
- }
864
- };
865
- startBatch();
866
- if (type === "clear") {
867
- depsMap.forEach(run);
868
- } else {
869
- const targetIsArray = isArray(target);
870
- const isArrayIndex = targetIsArray && isIntegerKey(key);
871
- if (targetIsArray && key === "length") {
872
- const newLength = Number(newValue);
873
- depsMap.forEach((dep, key2) => {
874
- if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
875
- run(dep);
876
- }
877
- });
878
- } else {
879
- if (key !== undefined || depsMap.has(undefined)) {
880
- run(depsMap.get(key));
881
- }
882
- if (isArrayIndex) {
883
- run(depsMap.get(ARRAY_ITERATE_KEY));
884
- }
885
- switch (type) {
886
- case "add":
887
- if (!targetIsArray) {
888
- run(depsMap.get(ITERATE_KEY));
889
- if (isMap(target)) {
890
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
891
- }
892
- } else if (isArrayIndex) {
893
- run(depsMap.get("length"));
894
- }
895
- break;
896
- case "delete":
897
- if (!targetIsArray) {
898
- run(depsMap.get(ITERATE_KEY));
899
- if (isMap(target)) {
900
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
901
- }
902
- }
903
- break;
904
- case "set":
905
- if (isMap(target)) {
906
- run(depsMap.get(ITERATE_KEY));
907
- }
908
- break;
909
- }
910
- }
911
- }
912
- endBatch();
913
- }
914
- function reactiveReadArray(array) {
915
- const raw = toRaw(array);
916
- if (raw === array)
917
- return raw;
918
- track(raw, "iterate", ARRAY_ITERATE_KEY);
919
- return isShallow(array) ? raw : raw.map(toReactive);
920
- }
921
- function shallowReadArray(arr) {
922
- track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
923
- return arr;
924
- }
925
- function toWrapped(target, item) {
926
- if (isReadonly(target)) {
927
- return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
928
- }
929
- return toReactive(item);
930
- }
931
- var arrayInstrumentations = {
932
- __proto__: null,
933
- [Symbol.iterator]() {
934
- return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
935
- },
936
- concat(...args) {
937
- return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
938
- },
939
- entries() {
940
- return iterator(this, "entries", (value) => {
941
- value[1] = toWrapped(this, value[1]);
942
- return value;
943
- });
944
- },
945
- every(fn, thisArg) {
946
- return apply(this, "every", fn, thisArg, undefined, arguments);
947
- },
948
- filter(fn, thisArg) {
949
- return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
950
- },
951
- find(fn, thisArg) {
952
- return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
953
- },
954
- findIndex(fn, thisArg) {
955
- return apply(this, "findIndex", fn, thisArg, undefined, arguments);
956
- },
957
- findLast(fn, thisArg) {
958
- return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
959
- },
960
- findLastIndex(fn, thisArg) {
961
- return apply(this, "findLastIndex", fn, thisArg, undefined, arguments);
962
- },
963
- forEach(fn, thisArg) {
964
- return apply(this, "forEach", fn, thisArg, undefined, arguments);
965
- },
966
- includes(...args) {
967
- return searchProxy(this, "includes", args);
968
- },
969
- indexOf(...args) {
970
- return searchProxy(this, "indexOf", args);
971
- },
972
- join(separator) {
973
- return reactiveReadArray(this).join(separator);
974
- },
975
- lastIndexOf(...args) {
976
- return searchProxy(this, "lastIndexOf", args);
977
- },
978
- map(fn, thisArg) {
979
- return apply(this, "map", fn, thisArg, undefined, arguments);
980
- },
981
- pop() {
982
- return noTracking(this, "pop");
983
- },
984
- push(...args) {
985
- return noTracking(this, "push", args);
986
- },
987
- reduce(fn, ...args) {
988
- return reduce(this, "reduce", fn, args);
989
- },
990
- reduceRight(fn, ...args) {
991
- return reduce(this, "reduceRight", fn, args);
992
- },
993
- shift() {
994
- return noTracking(this, "shift");
995
- },
996
- some(fn, thisArg) {
997
- return apply(this, "some", fn, thisArg, undefined, arguments);
998
- },
999
- splice(...args) {
1000
- return noTracking(this, "splice", args);
1001
- },
1002
- toReversed() {
1003
- return reactiveReadArray(this).toReversed();
1004
- },
1005
- toSorted(comparer) {
1006
- return reactiveReadArray(this).toSorted(comparer);
1007
- },
1008
- toSpliced(...args) {
1009
- return reactiveReadArray(this).toSpliced(...args);
1010
- },
1011
- unshift(...args) {
1012
- return noTracking(this, "unshift", args);
1013
- },
1014
- values() {
1015
- return iterator(this, "values", (item) => toWrapped(this, item));
1016
- }
1017
- };
1018
- function iterator(self2, method, wrapValue) {
1019
- const arr = shallowReadArray(self2);
1020
- const iter = arr[method]();
1021
- if (arr !== self2 && !isShallow(self2)) {
1022
- iter._next = iter.next;
1023
- iter.next = () => {
1024
- const result = iter._next();
1025
- if (!result.done) {
1026
- result.value = wrapValue(result.value);
1027
- }
1028
- return result;
1029
- };
1030
- }
1031
- return iter;
1032
- }
1033
- var arrayProto = Array.prototype;
1034
- function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
1035
- const arr = shallowReadArray(self2);
1036
- const needsWrap = arr !== self2 && !isShallow(self2);
1037
- const methodFn = arr[method];
1038
- if (methodFn !== arrayProto[method]) {
1039
- const result2 = methodFn.apply(self2, args);
1040
- return needsWrap ? toReactive(result2) : result2;
1041
- }
1042
- let wrappedFn = fn;
1043
- if (arr !== self2) {
1044
- if (needsWrap) {
1045
- wrappedFn = function(item, index) {
1046
- return fn.call(this, toWrapped(self2, item), index, self2);
1047
- };
1048
- } else if (fn.length > 2) {
1049
- wrappedFn = function(item, index) {
1050
- return fn.call(this, item, index, self2);
1051
- };
1052
- }
1053
- }
1054
- const result = methodFn.call(arr, wrappedFn, thisArg);
1055
- return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1056
- }
1057
- function reduce(self2, method, fn, args) {
1058
- const arr = shallowReadArray(self2);
1059
- const needsWrap = arr !== self2 && !isShallow(self2);
1060
- let wrappedFn = fn;
1061
- let wrapInitialAccumulator = false;
1062
- if (arr !== self2) {
1063
- if (needsWrap) {
1064
- wrapInitialAccumulator = args.length === 0;
1065
- wrappedFn = function(acc, item, index) {
1066
- if (wrapInitialAccumulator) {
1067
- wrapInitialAccumulator = false;
1068
- acc = toWrapped(self2, acc);
1069
- }
1070
- return fn.call(this, acc, toWrapped(self2, item), index, self2);
1071
- };
1072
- } else if (fn.length > 3) {
1073
- wrappedFn = function(acc, item, index) {
1074
- return fn.call(this, acc, item, index, self2);
1075
- };
1076
- }
1077
- }
1078
- const result = arr[method](wrappedFn, ...args);
1079
- return wrapInitialAccumulator ? toWrapped(self2, result) : result;
1080
- }
1081
- function searchProxy(self2, method, args) {
1082
- const arr = toRaw(self2);
1083
- track(arr, "iterate", ARRAY_ITERATE_KEY);
1084
- const res = arr[method](...args);
1085
- if ((res === -1 || res === false) && isProxy(args[0])) {
1086
- args[0] = toRaw(args[0]);
1087
- return arr[method](...args);
1088
- }
1089
- return res;
1090
- }
1091
- function noTracking(self2, method, args = []) {
1092
- pauseTracking();
1093
- startBatch();
1094
- const res = toRaw(self2)[method].apply(self2, args);
1095
- endBatch();
1096
- resetTracking();
1097
- return res;
1098
- }
1099
- var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1100
- var builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1101
- function hasOwnProperty2(key) {
1102
- if (!isSymbol(key))
1103
- key = String(key);
1104
- const obj = toRaw(this);
1105
- track(obj, "has", key);
1106
- return obj.hasOwnProperty(key);
1107
- }
1108
-
1109
- class BaseReactiveHandler {
1110
- constructor(_isReadonly = false, _isShallow = false) {
1111
- this._isReadonly = _isReadonly;
1112
- this._isShallow = _isShallow;
1113
- }
1114
- get(target, key, receiver) {
1115
- if (key === "__v_skip")
1116
- return target["__v_skip"];
1117
- const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1118
- if (key === "__v_isReactive") {
1119
- return !isReadonly2;
1120
- } else if (key === "__v_isReadonly") {
1121
- return isReadonly2;
1122
- } else if (key === "__v_isShallow") {
1123
- return isShallow2;
1124
- } else if (key === "__v_raw") {
1125
- if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
1126
- return target;
1127
- }
1128
- return;
1129
- }
1130
- const targetIsArray = isArray(target);
1131
- if (!isReadonly2) {
1132
- let fn;
1133
- if (targetIsArray && (fn = arrayInstrumentations[key])) {
1134
- return fn;
1135
- }
1136
- if (key === "hasOwnProperty") {
1137
- return hasOwnProperty2;
1138
- }
1139
- }
1140
- const res = Reflect.get(target, key, isRef(target) ? target : receiver);
1141
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
1142
- return res;
1143
- }
1144
- if (!isReadonly2) {
1145
- track(target, "get", key);
1146
- }
1147
- if (isShallow2) {
1148
- return res;
1149
- }
1150
- if (isRef(res)) {
1151
- const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1152
- return isReadonly2 && isObject(value) ? readonly(value) : value;
1153
- }
1154
- if (isObject(res)) {
1155
- return isReadonly2 ? readonly(res) : reactive(res);
1156
- }
1157
- return res;
1158
- }
1159
- }
1160
-
1161
- class MutableReactiveHandler extends BaseReactiveHandler {
1162
- constructor(isShallow2 = false) {
1163
- super(false, isShallow2);
1164
- }
1165
- set(target, key, value, receiver) {
1166
- let oldValue = target[key];
1167
- const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
1168
- if (!this._isShallow) {
1169
- const isOldValueReadonly = isReadonly(oldValue);
1170
- if (!isShallow(value) && !isReadonly(value)) {
1171
- oldValue = toRaw(oldValue);
1172
- value = toRaw(value);
1173
- }
1174
- if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) {
1175
- if (isOldValueReadonly) {
1176
- if (true) {
1177
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1178
- }
1179
- return true;
1180
- } else {
1181
- oldValue.value = value;
1182
- return true;
1183
- }
1184
- }
1185
- }
1186
- const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
1187
- const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
1188
- if (target === toRaw(receiver) && result) {
1189
- if (!hadKey) {
1190
- trigger(target, "add", key, value);
1191
- } else if (hasChanged(value, oldValue)) {
1192
- trigger(target, "set", key, value, oldValue);
1193
- }
1194
- }
1195
- return result;
1196
- }
1197
- deleteProperty(target, key) {
1198
- const hadKey = hasOwn(target, key);
1199
- const oldValue = target[key];
1200
- const result = Reflect.deleteProperty(target, key);
1201
- if (result && hadKey) {
1202
- trigger(target, "delete", key, undefined, oldValue);
1203
- }
1204
- return result;
1205
- }
1206
- has(target, key) {
1207
- const result = Reflect.has(target, key);
1208
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
1209
- track(target, "has", key);
1210
- }
1211
- return result;
1212
- }
1213
- ownKeys(target) {
1214
- track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
1215
- return Reflect.ownKeys(target);
1216
- }
1217
- }
1218
-
1219
- class ReadonlyReactiveHandler extends BaseReactiveHandler {
1220
- constructor(isShallow2 = false) {
1221
- super(true, isShallow2);
1222
- }
1223
- set(target, key) {
1224
- if (true) {
1225
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
1226
- }
1227
- return true;
1228
- }
1229
- deleteProperty(target, key) {
1230
- if (true) {
1231
- warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
1232
- }
1233
- return true;
1234
- }
1235
- }
1236
- var mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler;
1237
- var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler;
1238
- var toShallow = (value) => value;
1239
- var getProto = (v) => Reflect.getPrototypeOf(v);
1240
- function createIterableMethod(method, isReadonly2, isShallow2) {
1241
- return function(...args) {
1242
- const target = this["__v_raw"];
1243
- const rawTarget = toRaw(target);
1244
- const targetIsMap = isMap(rawTarget);
1245
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
1246
- const isKeyOnly = method === "keys" && targetIsMap;
1247
- const innerIterator = target[method](...args);
1248
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1249
- !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
1250
- return extend(Object.create(innerIterator), {
1251
- next() {
1252
- const { value, done } = innerIterator.next();
1253
- return done ? { value, done } : {
1254
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1255
- done
1256
- };
1257
- }
1258
- });
1259
- };
1260
- }
1261
- function createReadonlyMethod(type) {
1262
- return function(...args) {
1263
- if (true) {
1264
- const key = args[0] ? `on key "${args[0]}" ` : ``;
1265
- warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
1266
- }
1267
- return type === "delete" ? false : type === "clear" ? undefined : this;
1268
- };
1269
- }
1270
- function createInstrumentations(readonly, shallow) {
1271
- const instrumentations = {
1272
- get(key) {
1273
- const target = this["__v_raw"];
1274
- const rawTarget = toRaw(target);
1275
- const rawKey = toRaw(key);
1276
- if (!readonly) {
1277
- if (hasChanged(key, rawKey)) {
1278
- track(rawTarget, "get", key);
1279
- }
1280
- track(rawTarget, "get", rawKey);
1281
- }
1282
- const { has } = getProto(rawTarget);
1283
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1284
- if (has.call(rawTarget, key)) {
1285
- return wrap(target.get(key));
1286
- } else if (has.call(rawTarget, rawKey)) {
1287
- return wrap(target.get(rawKey));
1288
- } else if (target !== rawTarget) {
1289
- target.get(key);
1290
- }
1291
- },
1292
- get size() {
1293
- const target = this["__v_raw"];
1294
- !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1295
- return target.size;
1296
- },
1297
- has(key) {
1298
- const target = this["__v_raw"];
1299
- const rawTarget = toRaw(target);
1300
- const rawKey = toRaw(key);
1301
- if (!readonly) {
1302
- if (hasChanged(key, rawKey)) {
1303
- track(rawTarget, "has", key);
1304
- }
1305
- track(rawTarget, "has", rawKey);
1306
- }
1307
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1308
- },
1309
- forEach(callback, thisArg) {
1310
- const observed = this;
1311
- const target = observed["__v_raw"];
1312
- const rawTarget = toRaw(target);
1313
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1314
- !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1315
- return target.forEach((value, key) => {
1316
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1317
- });
1318
- }
1319
- };
1320
- extend(instrumentations, readonly ? {
1321
- add: createReadonlyMethod("add"),
1322
- set: createReadonlyMethod("set"),
1323
- delete: createReadonlyMethod("delete"),
1324
- clear: createReadonlyMethod("clear")
1325
- } : {
1326
- add(value) {
1327
- const target = toRaw(this);
1328
- const proto = getProto(target);
1329
- const rawValue = toRaw(value);
1330
- const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
1331
- const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
1332
- if (!hadKey) {
1333
- target.add(valueToAdd);
1334
- trigger(target, "add", valueToAdd, valueToAdd);
1335
- }
1336
- return this;
1337
- },
1338
- set(key, value) {
1339
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
1340
- value = toRaw(value);
1341
- }
1342
- const target = toRaw(this);
1343
- const { has, get } = getProto(target);
1344
- let hadKey = has.call(target, key);
1345
- if (!hadKey) {
1346
- key = toRaw(key);
1347
- hadKey = has.call(target, key);
1348
- } else if (true) {
1349
- checkIdentityKeys(target, has, key);
1350
- }
1351
- const oldValue = get.call(target, key);
1352
- target.set(key, value);
1353
- if (!hadKey) {
1354
- trigger(target, "add", key, value);
1355
- } else if (hasChanged(value, oldValue)) {
1356
- trigger(target, "set", key, value, oldValue);
1357
- }
1358
- return this;
1359
- },
1360
- delete(key) {
1361
- const target = toRaw(this);
1362
- const { has, get } = getProto(target);
1363
- let hadKey = has.call(target, key);
1364
- if (!hadKey) {
1365
- key = toRaw(key);
1366
- hadKey = has.call(target, key);
1367
- } else if (true) {
1368
- checkIdentityKeys(target, has, key);
1369
- }
1370
- const oldValue = get ? get.call(target, key) : undefined;
1371
- const result = target.delete(key);
1372
- if (hadKey) {
1373
- trigger(target, "delete", key, undefined, oldValue);
1374
- }
1375
- return result;
1376
- },
1377
- clear() {
1378
- const target = toRaw(this);
1379
- const hadItems = target.size !== 0;
1380
- const oldTarget = isMap(target) ? new Map(target) : new Set(target);
1381
- const result = target.clear();
1382
- if (hadItems) {
1383
- trigger(target, "clear", undefined, undefined, oldTarget);
1384
- }
1385
- return result;
1386
- }
1387
- });
1388
- const iteratorMethods = [
1389
- "keys",
1390
- "values",
1391
- "entries",
1392
- Symbol.iterator
1393
- ];
1394
- iteratorMethods.forEach((method) => {
1395
- instrumentations[method] = createIterableMethod(method, readonly, shallow);
1396
- });
1397
- return instrumentations;
1398
- }
1399
- function createInstrumentationGetter(isReadonly2, shallow) {
1400
- const instrumentations = createInstrumentations(isReadonly2, shallow);
1401
- return (target, key, receiver) => {
1402
- if (key === "__v_isReactive") {
1403
- return !isReadonly2;
1404
- } else if (key === "__v_isReadonly") {
1405
- return isReadonly2;
1406
- } else if (key === "__v_raw") {
1407
- return target;
1408
- }
1409
- return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1410
- };
1411
- }
1412
- var mutableCollectionHandlers = {
1413
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
1414
- };
1415
- var readonlyCollectionHandlers = {
1416
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
1417
- };
1418
- function checkIdentityKeys(target, has, key) {
1419
- const rawKey = toRaw(key);
1420
- if (rawKey !== key && has.call(target, rawKey)) {
1421
- const type = toRawType(target);
1422
- warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
1423
- }
1424
- }
1425
- var reactiveMap = /* @__PURE__ */ new WeakMap;
1426
- var shallowReactiveMap = /* @__PURE__ */ new WeakMap;
1427
- var readonlyMap = /* @__PURE__ */ new WeakMap;
1428
- var shallowReadonlyMap = /* @__PURE__ */ new WeakMap;
1429
- function targetTypeMap(rawType) {
1430
- switch (rawType) {
1431
- case "Object":
1432
- case "Array":
1433
- return 1;
1434
- case "Map":
1435
- case "Set":
1436
- case "WeakMap":
1437
- case "WeakSet":
1438
- return 2;
1439
- default:
1440
- return 0;
1441
- }
1442
- }
1443
- function reactive(target) {
1444
- if (/* @__PURE__ */ isReadonly(target)) {
1445
- return target;
1446
- }
1447
- return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
1448
- }
1449
- function readonly(target) {
1450
- return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1451
- }
1452
- function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1453
- if (!isObject(target)) {
1454
- if (true) {
1455
- warn(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
1456
- }
1457
- return target;
1458
- }
1459
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1460
- return target;
1461
- }
1462
- if (target["__v_skip"] || !Object.isExtensible(target)) {
1463
- return target;
1464
- }
1465
- const existingProxy = proxyMap.get(target);
1466
- if (existingProxy) {
1467
- return existingProxy;
1468
- }
1469
- const targetType = targetTypeMap(toRawType(target));
1470
- if (targetType === 0) {
1471
- return target;
1472
- }
1473
- const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1474
- proxyMap.set(target, proxy);
1475
- return proxy;
1476
- }
1477
- function isReactive(value) {
1478
- if (/* @__PURE__ */ isReadonly(value)) {
1479
- return /* @__PURE__ */ isReactive(value["__v_raw"]);
1480
- }
1481
- return !!(value && value["__v_isReactive"]);
1482
- }
1483
- function isReadonly(value) {
1484
- return !!(value && value["__v_isReadonly"]);
1485
- }
1486
- function isShallow(value) {
1487
- return !!(value && value["__v_isShallow"]);
1488
- }
1489
- function isProxy(value) {
1490
- return value ? !!value["__v_raw"] : false;
1491
- }
1492
- function toRaw(observed) {
1493
- const raw = observed && observed["__v_raw"];
1494
- return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1495
- }
1496
- var toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1497
- var toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1498
- function isRef(r) {
1499
- return r ? r["__v_isRef"] === true : false;
1500
- }
1501
- function ref2(value) {
1502
- return createRef(value, false);
1503
- }
1504
- function shallowRef(value) {
1505
- return createRef(value, true);
1506
- }
1507
- function createRef(rawValue, shallow) {
1508
- if (/* @__PURE__ */ isRef(rawValue)) {
1509
- return rawValue;
1510
- }
1511
- return new RefImpl(rawValue, shallow);
1512
- }
1513
-
1514
- class RefImpl {
1515
- constructor(value, isShallow2) {
1516
- this.dep = new Dep;
1517
- this["__v_isRef"] = true;
1518
- this["__v_isShallow"] = false;
1519
- this._rawValue = isShallow2 ? value : toRaw(value);
1520
- this._value = isShallow2 ? value : toReactive(value);
1521
- this["__v_isShallow"] = isShallow2;
1522
- }
1523
- get value() {
1524
- if (true) {
1525
- this.dep.track({
1526
- target: this,
1527
- type: "get",
1528
- key: "value"
1529
- });
1530
- }
1531
- return this._value;
1532
- }
1533
- set value(newValue) {
1534
- const oldValue = this._rawValue;
1535
- const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
1536
- newValue = useDirectValue ? newValue : toRaw(newValue);
1537
- if (hasChanged(newValue, oldValue)) {
1538
- this._rawValue = newValue;
1539
- this._value = useDirectValue ? newValue : toReactive(newValue);
1540
- if (true) {
1541
- this.dep.trigger({
1542
- target: this,
1543
- type: "set",
1544
- key: "value",
1545
- newValue,
1546
- oldValue
1547
- });
1548
- }
1549
- }
1550
- }
1551
- }
1552
- class ComputedRefImpl {
1553
- constructor(fn, setter, isSSR) {
1554
- this.fn = fn;
1555
- this.setter = setter;
1556
- this._value = undefined;
1557
- this.dep = new Dep(this);
1558
- this.__v_isRef = true;
1559
- this.deps = undefined;
1560
- this.depsTail = undefined;
1561
- this.flags = 16;
1562
- this.globalVersion = globalVersion - 1;
1563
- this.next = undefined;
1564
- this.effect = this;
1565
- this["__v_isReadonly"] = !setter;
1566
- this.isSSR = isSSR;
1567
- }
1568
- notify() {
1569
- this.flags |= 16;
1570
- if (!(this.flags & 8) && activeSub !== this) {
1571
- batch(this, true);
1572
- return true;
1573
- } else if (true)
1574
- ;
1575
- }
1576
- get value() {
1577
- const link = this.dep.track({
1578
- target: this,
1579
- type: "get",
1580
- key: "value"
1581
- });
1582
- refreshComputed(this);
1583
- if (link) {
1584
- link.version = this.dep.version;
1585
- }
1586
- return this._value;
1587
- }
1588
- set value(newValue) {
1589
- if (this.setter) {
1590
- this.setter(newValue);
1591
- } else if (true) {
1592
- warn("Write operation failed: computed value is readonly");
1593
- }
1594
- }
1595
- }
1596
- function computed(getterOrOptions, debugOptions, isSSR = false) {
1597
- let getter;
1598
- let setter;
1599
- if (isFunction(getterOrOptions)) {
1600
- getter = getterOrOptions;
1601
- } else {
1602
- getter = getterOrOptions.get;
1603
- setter = getterOrOptions.set;
1604
- }
1605
- const cRef = new ComputedRefImpl(getter, setter, isSSR);
1606
- if (debugOptions && !isSSR) {
1607
- cRef.onTrack = debugOptions.onTrack;
1608
- cRef.onTrigger = debugOptions.onTrigger;
1609
- }
1610
- return cRef;
1611
- }
1612
- // src/services/clock.ts
1613
- var _pinned = null;
1614
- function now() {
1615
- return _pinned ?? Date.now();
1616
- }
1617
- function pinClock(at) {
1618
- const ms = at instanceof Date ? at.getTime() : typeof at === "number" ? at : Date.parse(at);
1619
- if (!Number.isFinite(ms)) {
1620
- throw new TypeError(`clock: cannot pin to ${JSON.stringify(at)}`);
1621
- }
1622
- _pinned = ms;
1623
- return ms;
1624
- }
1625
-
1626
- // src/services/announce.ts
1627
- var REGION_ID = {
1628
- assertive: "jx-live-assertive",
1629
- polite: "jx-live-polite"
1630
- };
1631
- function region(politeness) {
1632
- if (typeof document === "undefined") {
1633
- return null;
1634
- }
1635
- const id = REGION_ID[politeness];
1636
- const existing = document.querySelector(`#${id}`);
1637
- if (existing) {
1638
- return existing;
1639
- }
1640
- const node = document.createElement("div");
1641
- node.id = id;
1642
- node.setAttribute("aria-live", politeness);
1643
- node.setAttribute("role", politeness === "assertive" ? "alert" : "status");
1644
- node.setAttribute("aria-atomic", "true");
1645
- node.style.cssText = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;" + "clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0";
1646
- document.body.append(node);
1647
- return node;
1648
- }
1649
- function announce(message, politeness = "polite") {
1650
- if (message === "") {
1651
- return;
1652
- }
1653
- const node = region(politeness);
1654
- if (!node) {
1655
- return;
1656
- }
1657
- node.textContent = "";
1658
- setTimeout(() => {
1659
- node.textContent = message;
1660
- }, 0);
1661
- }
1662
-
1663
- // src/services/notify.ts
1664
- var DEFAULT_TIER = {
1665
- error: "problem",
1666
- info: "toast",
1667
- success: "toast",
1668
- warn: "toast"
1669
- };
1670
- var TOAST_LIFETIME_MS = {
1671
- error: 8000,
1672
- info: 4000,
1673
- success: 4000,
1674
- warn: 8000
1675
- };
1676
- var _seq = 0;
1677
- function nextId() {
1678
- _seq += 1;
1679
- return `n${_seq}`;
1680
- }
1681
- var toasts = reactive([]);
1682
- var problems = reactive([]);
1683
- var MAX_TOASTS = 4;
1684
- function storeFor(tier) {
1685
- return tier === "problem" ? problems : toasts;
1686
- }
1687
- function notify(severity, message, options = {}) {
1688
- const tier = options.tier ?? DEFAULT_TIER[severity];
1689
- const record = {
1690
- at: now(),
1691
- id: nextId(),
1692
- message,
1693
- severity,
1694
- tier,
1695
- ...options.action === undefined ? {} : { action: options.action },
1696
- ...options.actionArgs === undefined ? {} : { actionArgs: options.actionArgs },
1697
- ...options.detail === undefined ? {} : { detail: options.detail },
1698
- ...options.source === undefined ? {} : { source: options.source },
1699
- ...options.path === undefined ? {} : { path: options.path },
1700
- ...options.key === undefined ? {} : { key: options.key },
1701
- ...tier === "toast" ? { timeoutMs: options.timeoutMs ?? TOAST_LIFETIME_MS[severity] } : {}
1702
- };
1703
- const store = storeFor(tier);
1704
- if (record.key !== undefined) {
1705
- const at = store.findIndex((existing) => existing.key === record.key);
1706
- if (at !== -1) {
1707
- store.splice(at, 1);
1708
- }
1709
- }
1710
- store.push(record);
1711
- if (tier === "toast") {
1712
- while (toasts.length > MAX_TOASTS) {
1713
- toasts.shift();
1714
- }
1715
- }
1716
- announce(record.source === undefined ? record.message : `${record.source}: ${record.message}`, severity === "error" ? "assertive" : "polite");
1717
- return record;
1718
- }
1719
- function severityHelper(severity) {
1720
- return (message, options = {}) => notify(severity, message, options);
1721
- }
1722
- notify.success = severityHelper("success");
1723
- notify.info = severityHelper("info");
1724
- notify.warn = severityHelper("warn");
1725
- notify.error = severityHelper("error");
1726
- function dismiss(id) {
1727
- for (const store of [toasts, problems]) {
1728
- const at = store.findIndex((record) => record.id === id);
1729
- if (at !== -1) {
1730
- store.splice(at, 1);
1731
- return true;
1732
- }
1733
- }
1734
- return false;
1735
- }
1736
- function clearProblems(match) {
1737
- const kept = match ? problems.filter((record) => !match(record)) : [];
1738
- const removed = problems.length - kept.length;
1739
- problems.splice(0, problems.length, ...kept);
1740
- return removed;
1741
- }
1742
- function problemCount(severity) {
1743
- return severity === undefined ? problems.length : problems.filter((record) => record.severity === severity).length;
1744
- }
1745
-
1746
233
  // src/view.ts
1747
234
  var view = {
1748
235
  functionEditor: null,
@@ -1854,7 +341,7 @@ function bufferWrites(buffer) {
1854
341
  let isAhead = false;
1855
342
  let isTyped = false;
1856
343
  let isShared = false;
1857
- function track2(key, result) {
344
+ function track(key, result) {
1858
345
  if (typeof result?.then !== "function") {
1859
346
  return result;
1860
347
  }
@@ -1873,7 +360,7 @@ function bufferWrites(buffer) {
1873
360
  timers.set(key, setTimeout(() => {
1874
361
  timers.delete(key);
1875
362
  runs.delete(key);
1876
- track2(key, run());
363
+ track(key, run());
1877
364
  }, ms));
1878
365
  },
1879
366
  cancel() {
@@ -1891,7 +378,7 @@ function bufferWrites(buffer) {
1891
378
  clearTimeout(timers.get(key));
1892
379
  timers.delete(key);
1893
380
  runs.delete(key);
1894
- return track2(key, run());
381
+ return track(key, run());
1895
382
  },
1896
383
  ahead: () => isAhead,
1897
384
  markAhead() {
@@ -2134,6 +621,10 @@ function abbreviateValue(val) {
2134
621
  };
2135
622
  return map[val] || val;
2136
623
  }
624
+ var LOCALE_PLACEHOLDER = "{locale}";
625
+ function isMediaFormat(format) {
626
+ return format === "image" || format === "uri-reference";
627
+ }
2137
628
  function inferInputType(entry) {
2138
629
  if (entry.$shorthand === true) {
2139
630
  return "shorthand";
@@ -2147,7 +638,7 @@ function inferInputType(entry) {
2147
638
  if (entry.format === "color") {
2148
639
  return "color";
2149
640
  }
2150
- if (entry.format === "uri-reference") {
641
+ if (isMediaFormat(entry.format)) {
2151
642
  return "media";
2152
643
  }
2153
644
  if (entry.$units !== undefined) {
@@ -2169,20 +660,22 @@ function findContentTypeSchema(documentPath, projectConfig) {
2169
660
  return null;
2170
661
  }
2171
662
  const docPath = documentPath.replaceAll("\\", "/");
2172
- for (const [name, def2] of Object.entries(projectConfig.content)) {
2173
- if (!def2.source || !def2.schema) {
663
+ for (const [name, def] of Object.entries(projectConfig.content)) {
664
+ if (!def.source || !def.schema) {
2174
665
  continue;
2175
666
  }
2176
- const src = def2.source.replace(/^\.\//, "").replace(/\/$/, "");
2177
- const hasExt = src.includes(".") && !src.endsWith("/");
667
+ const src = def.source.replace(/^\.\//, "").replace(/\/$/, "");
668
+ const hasExt = src.includes(".") && !src.endsWith("/") && !src.includes(LOCALE_PLACEHOLDER);
2178
669
  if (hasExt) {
2179
670
  if (docPath === src || docPath.endsWith(`/${src}`)) {
2180
- return { name, schema: def2.schema };
671
+ return { name, schema: def.schema };
2181
672
  }
2182
673
  } else {
2183
- const ext = def2.format === "json" ? ".json" : formatByName(def2.format)?.extensions[0] ?? defaultContentFormat()?.extensions[0] ?? ".json";
2184
- if (docPath.startsWith(`${src}/`) && docPath.endsWith(ext)) {
2185
- return { name, schema: def2.schema };
674
+ const ext = def.format === "json" ? ".json" : formatByName(def.format)?.extensions[0] ?? defaultContentFormat()?.extensions[0] ?? ".json";
675
+ const prefix = src.includes(LOCALE_PLACEHOLDER) ? new RegExp(`^${src.split(LOCALE_PLACEHOLDER).map((part) => part.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`)).join("[^/]+")}/`) : null;
676
+ const matches = prefix ? prefix.test(docPath) : docPath.startsWith(`${src}/`);
677
+ if (matches && docPath.endsWith(ext)) {
678
+ return { name, schema: def.schema };
2186
679
  }
2187
680
  }
2188
681
  }
@@ -2480,7 +973,7 @@ function setBatchEndNotifier(fn) {
2480
973
  function beginBatch(tab) {
2481
974
  _batchTab = tab;
2482
975
  }
2483
- function endBatch2() {
976
+ function endBatch() {
2484
977
  const tab = _batchTab;
2485
978
  if (tab && !_historyDelegates.has(tab)) {
2486
979
  const raw = toRaw(tab.doc.document);
@@ -2963,13 +1456,13 @@ function mutateReplaceStyle(tab, path, style) {
2963
1456
  recordDocOp(setKeyPair(path, "style", styleBefore, cloneValue(node.style)));
2964
1457
  recordPatch({ op: "set-style", path });
2965
1458
  }
2966
- function mutateAddDef(tab, name, def2) {
1459
+ function mutateAddDef(tab, name, def) {
2967
1460
  const doc = tab.doc.document;
2968
1461
  const before = cloneValue(doc.state);
2969
1462
  if (!doc.state) {
2970
1463
  doc.state = {};
2971
1464
  }
2972
- doc.state[name] = def2;
1465
+ doc.state[name] = def;
2973
1466
  recordDocOp(setKeyPair([], "state", before, cloneValue(doc.state)));
2974
1467
  recordPatch({ key: "state", op: "doc-meta" });
2975
1468
  }
@@ -4120,14 +2613,14 @@ function scheduleMirror(session) {
4120
2613
  if (session.collab.canonicalOf(session.handle.doc) === "source") {
4121
2614
  return;
4122
2615
  }
4123
- const now2 = Date.now();
4124
- session.lastMirrorAt ??= now2;
4125
- if (now2 - session.lastMirrorAt >= MIRROR_MAX_LAG_MS) {
2616
+ const now = Date.now();
2617
+ session.lastMirrorAt ??= now;
2618
+ if (now - session.lastMirrorAt >= MIRROR_MAX_LAG_MS) {
4126
2619
  if (session.mirrorTimer) {
4127
2620
  clearTimeout(session.mirrorTimer);
4128
2621
  session.mirrorTimer = null;
4129
2622
  }
4130
- session.lastMirrorAt = now2;
2623
+ session.lastMirrorAt = now;
4131
2624
  mirrorNow(session);
4132
2625
  return;
4133
2626
  }
@@ -4623,14 +3116,14 @@ function createSession(tab, path, collab, handle) {
4623
3116
  }
4624
3117
  });
4625
3118
  effect(() => {
4626
- const ref3 = toRaw(tab.doc.document);
3119
+ const ref2 = toRaw(tab.doc.document);
4627
3120
  queueMicrotask(() => {
4628
3121
  const current = runtimeOf(tab)?.session;
4629
3122
  if (current !== session || !session.synced || !session.canWrite) {
4630
3123
  return;
4631
3124
  }
4632
3125
  const nowRef = toRaw(tab.doc.document);
4633
- if (nowRef !== ref3 || nowRef === session.lastSeenRef) {
3126
+ if (nowRef !== ref2 || nowRef === session.lastSeenRef) {
4634
3127
  return;
4635
3128
  }
4636
3129
  session.lastSeenRef = nowRef;
@@ -5701,19 +4194,14 @@ function isBottomTabId(value) {
5701
4194
  }
5702
4195
  var CHROME_THEMES = ["light", "dark"];
5703
4196
  var DOCK_STORAGE_KEY = "jx-studio-panel-widths";
5704
- var THEME_STORAGE_KEY = "jx-studio-theme";
5705
4197
  var PROJECT_STORAGE_PREFIX = "jx-studio-project::";
5706
4198
  var DEFAULT_THEME = "dark";
5707
4199
  function isChromeTheme(value) {
5708
4200
  return typeof value === "string" && CHROME_THEMES.includes(value);
5709
4201
  }
5710
4202
  function readPersistedTheme() {
5711
- try {
5712
- const stored = localStorage.getItem(THEME_STORAGE_KEY);
5713
- return isChromeTheme(stored) ? stored : DEFAULT_THEME;
5714
- } catch {
5715
- return DEFAULT_THEME;
5716
- }
4203
+ const stored = readStoredSetting(SETTINGS.theme);
4204
+ return isChromeTheme(stored) ? stored : DEFAULT_THEME;
5717
4205
  }
5718
4206
  var DOCK_IDS = ["left", "right", "bottom"];
5719
4207
  var DOCK_DEFAULTS = {
@@ -6091,9 +4579,7 @@ function setChromeTheme(theme) {
6091
4579
  return;
6092
4580
  }
6093
4581
  shell.theme = theme;
6094
- try {
6095
- localStorage.setItem(THEME_STORAGE_KEY, theme);
6096
- } catch {}
4582
+ setSetting(SETTINGS.theme, theme);
6097
4583
  }
6098
4584
  function toggleActivityTab(tab) {
6099
4585
  if (tab === shell.leftTab && !shell.docks.left.collapsed) {
@@ -6443,7 +4929,7 @@ function extensionsKey(config) {
6443
4929
  return JSON.stringify(config.extensions ?? null);
6444
4930
  }
6445
4931
  async function refreshExtensionSurfaces() {
6446
- const { loadFormats, refreshExtensionUi, refreshFormats } = await import("./format-host-wewba4nq.js");
4932
+ const { loadFormats, refreshExtensionUi, refreshFormats } = await import("./format-host-8fr3545e.js");
6447
4933
  refreshFormats();
6448
4934
  loadFormats();
6449
4935
  refreshExtensionUi(getPlatform());
@@ -6676,7 +5162,7 @@ async function updateSiteConfig(patch) {
6676
5162
  }
6677
5163
  }
6678
5164
 
6679
- export { errorMessage, LANGUAGE_TAG_PATTERN, canonicalizeLocale, isWellFormedLocale, localeDirection, localeLabel, resolveI18n, localeOfPath, servedLocaleOfPath, translationKeyOfPath, translationPathFor, EDITOR_KIND_LABELS, editorKindForMode, canvasViewForMode, inCanvas, hasSelection, hasElementSelection, emptyContext, makeContext, keyScopeStack, effectScope, onScopeDispose, effect, onEffectCleanup, reactive, toRaw, isRef, ref2 as ref, shallowRef, computed, now, problems, notify, dismiss, clearProblems, problemCount, view, STAGE_CLASS, nextRenderGeneration, surfaceForPane, allCanvasSurfaces, stageContaining, registerCanvasSurface, createPaneSurface, setSurfaceTeardown, disposePaneSurface, BUFFER_COMMIT, bufferWrites, commitBufferWrites, cancelBufferWrites, bufferIsLive, bufferMovedOn, commitTabBuffers, tabBufferUnsaved, PROJECT_CONFIG_PATH, editorKindOf, editorKindsOf, modeForEditorKind, primarySelection, selectionAnchor, isSelected, cloneSelection, toggleSelected, rangeSelection, isSpliceablePath, structuralBatch, uniquePaths, unifyValues, setPatchConsumer, recordDocOp, transactDoc, transact, beginBatch, endBatch2 as endBatch, isBatching, batchTab, setHistoryDelegate, canUndo, canRedo, undo, redo, mutateInsertNode, mutateRemoveNode, mutateDuplicateNode, mutateRemoveNodes, mutateDuplicateNodes, mutateWrapNode, mutateMoveNode, mutateUpdateProperty, mutateUpdateStyle, mutateUpdateAttribute, mutateUpdateMediaStyle, mutateUpdateNestedStyle, mutateUpdateMediaNestedStyle, mutateUpdateNestedStylePath, mutateUpdateMediaNestedStylePath, mutateReplaceStyle, mutateAddDef, mutateRemoveDef, mutateUpdateDef, mutateRenameDef, mutateUpdateProp, mutateAddSwitchCase, mutateRemoveSwitchCase, mutateRenameSwitchCase, mutateUpdateFrontmatter, serializeProjectConfig, commitProjectConfig, adoptProjectConfig, REGION_ATTR, resolveRegion, REGION_FOR_FOCUS, paneRegion, paneStripRegion, navigatorPanelRegion, inspectorTabRegion, NAVIGATOR_STATEMENTS_REGION, inspectorStatementsRegion, bottomPanelRegion, overlayRegion, setActiveRegistry, activeRegistry, initLayers, isModalOpen, showDialog, showConfirmDialog, showSaveDiscardDialog, showPromptDialog, openModal, renderPopover, popoverLayerFor, getLayerSlot, overlayIdleBlockers, getEffectiveMedia, getEffectiveStyle, getEffectiveImports, getEffectiveElements, getEffectiveHead, getEffectiveLocales, invalidateLayoutCache, getEffectiveLayoutPath, resolveLayoutDoc, distributePageIntoLayout, updateSiteConfig, collabState, isCollabPath, stringArg, optionalStringArg, boundedNumberArg, booleanArg, enumArg, pathArg, nullablePathArg, pathListArg, argsSchema, enumProperty, numberProperty, booleanProperty, pathProperty, pathListProperty, stringProperty, restoreSession, camelToKebab, camelToLabel, toCamelCase, kebabToLabel, propLabel, attrLabel, abbreviateValue, inferInputType, findContentTypeSchema, friendlyNameToVar, varDisplayName, parseCemType, jsonClone, configureCollabSerializer, configureCollabParser, configureCollabNotifier, collabSourceContext, collabReadOnly, collabSave, flushAllCollab, setCollabEnabled, isCollabEnabled, PRIMARY_PANE, workspace, activeTab, activePane, paneById, paneOfTab, focusPane, isPaneFocused, sidePane, receivingPane, detachTab, insertIntoPane, setWorkspaceProject, isTabActive, tabIsLive, openTab, promoteTab, promoteDirtyPreviewTabs, setTabPinned, moveTab, closeTab, closeAllTabs, replaceAllTabs, activateTab, moveTabToPane, renameTab, registerTabCommands, requireNavigatorPanelId, DEFAULT_INSPECTOR_TAB, isInspectorTabId, BOTTOM_TAB_IDS, DEFAULT_BOTTOM_TAB, isBottomTabId, CHROME_THEMES, DOCK_IDS, DOCK_DEFAULT_SIZES, setPaneSplit, shell, persistDocks, persistedSession, markSessionRestored, flushSession, monacoTheme, registerShellSurface, mountShell, setDockCollapsed, setDockSize, setActivityTab, setBottomTab, setChromeTheme, toggleActivityTab, setLayoutSelection, resetProjectShell, registerShellViewCommands };
5165
+ export { errorMessage, LANGUAGE_TAG_PATTERN, canonicalizeLocale, isWellFormedLocale, localeDirection, localeLabel, resolveI18n, localeOfPath, servedLocaleOfPath, translationKeyOfPath, translationPathFor, EDITOR_KIND_LABELS, editorKindForMode, canvasViewForMode, inCanvas, hasSelection, hasElementSelection, emptyContext, makeContext, keyScopeStack, view, STAGE_CLASS, nextRenderGeneration, surfaceForPane, allCanvasSurfaces, stageContaining, registerCanvasSurface, createPaneSurface, setSurfaceTeardown, disposePaneSurface, BUFFER_COMMIT, bufferWrites, commitBufferWrites, cancelBufferWrites, bufferIsLive, bufferMovedOn, commitTabBuffers, tabBufferUnsaved, PROJECT_CONFIG_PATH, editorKindOf, editorKindsOf, modeForEditorKind, primarySelection, selectionAnchor, isSelected, cloneSelection, toggleSelected, rangeSelection, isSpliceablePath, structuralBatch, uniquePaths, unifyValues, setPatchConsumer, recordDocOp, transactDoc, transact, beginBatch, endBatch, isBatching, batchTab, setHistoryDelegate, canUndo, canRedo, undo, redo, mutateInsertNode, mutateRemoveNode, mutateDuplicateNode, mutateRemoveNodes, mutateDuplicateNodes, mutateWrapNode, mutateMoveNode, mutateUpdateProperty, mutateUpdateStyle, mutateUpdateAttribute, mutateUpdateMediaStyle, mutateUpdateNestedStyle, mutateUpdateMediaNestedStyle, mutateUpdateNestedStylePath, mutateUpdateMediaNestedStylePath, mutateReplaceStyle, mutateAddDef, mutateRemoveDef, mutateUpdateDef, mutateRenameDef, mutateUpdateProp, mutateAddSwitchCase, mutateRemoveSwitchCase, mutateRenameSwitchCase, mutateUpdateFrontmatter, serializeProjectConfig, commitProjectConfig, adoptProjectConfig, REGION_ATTR, resolveRegion, REGION_FOR_FOCUS, paneRegion, paneStripRegion, navigatorPanelRegion, inspectorTabRegion, NAVIGATOR_STATEMENTS_REGION, inspectorStatementsRegion, bottomPanelRegion, overlayRegion, setActiveRegistry, activeRegistry, initLayers, isModalOpen, showDialog, showConfirmDialog, showSaveDiscardDialog, showPromptDialog, openModal, renderPopover, popoverLayerFor, getLayerSlot, overlayIdleBlockers, getEffectiveMedia, getEffectiveStyle, getEffectiveImports, getEffectiveElements, getEffectiveHead, getEffectiveLocales, invalidateLayoutCache, getEffectiveLayoutPath, resolveLayoutDoc, distributePageIntoLayout, updateSiteConfig, collabState, isCollabPath, stringArg, optionalStringArg, boundedNumberArg, booleanArg, enumArg, pathArg, nullablePathArg, pathListArg, argsSchema, enumProperty, numberProperty, booleanProperty, pathProperty, pathListProperty, stringProperty, restoreSession, camelToKebab, camelToLabel, toCamelCase, kebabToLabel, propLabel, attrLabel, abbreviateValue, isMediaFormat, inferInputType, findContentTypeSchema, friendlyNameToVar, varDisplayName, parseCemType, jsonClone, configureCollabSerializer, configureCollabParser, configureCollabNotifier, collabSourceContext, collabReadOnly, collabSave, flushAllCollab, setCollabEnabled, isCollabEnabled, PRIMARY_PANE, workspace, activeTab, activePane, paneById, paneOfTab, focusPane, isPaneFocused, sidePane, receivingPane, detachTab, insertIntoPane, setWorkspaceProject, isTabActive, tabIsLive, openTab, promoteTab, promoteDirtyPreviewTabs, setTabPinned, moveTab, closeTab, closeAllTabs, replaceAllTabs, activateTab, moveTabToPane, renameTab, registerTabCommands, requireNavigatorPanelId, DEFAULT_INSPECTOR_TAB, isInspectorTabId, BOTTOM_TAB_IDS, DEFAULT_BOTTOM_TAB, isBottomTabId, CHROME_THEMES, DOCK_IDS, DOCK_DEFAULT_SIZES, setPaneSplit, shell, persistDocks, persistedSession, markSessionRestored, flushSession, monacoTheme, registerShellSurface, mountShell, setDockCollapsed, setDockSize, setActivityTab, setBottomTab, setChromeTheme, toggleActivityTab, setLayoutSelection, resetProjectShell, registerShellViewCommands };
6680
5166
 
6681
- //# debugId=BC232D1D1532287464756E2164756E21
6682
- //# sourceMappingURL=studio-ra7ar50f.js.map
5167
+ //# debugId=D6F07440896FC9CC64756E2164756E21
5168
+ //# sourceMappingURL=studio-r5xbtctf.js.map