@pie-element/simple-cloze 0.1.4-next.15 → 0.1.4-next.17
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.
- package/dist/author/index.js +346 -315
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +2586 -2563
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{client-C4zbv8nl.js → client-e4ZTphpa.js} +727 -712
- package/dist/browser/client-e4ZTphpa.js.map +1 -0
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/{client-C4zbv8nl.js → client-e4ZTphpa.js} +727 -712
- package/dist/browser/editor-runtime/client-e4ZTphpa.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{i18n-gsOjC7sf.js → i18n-C7YV9VIN.js} +291 -217
- package/dist/browser/editor-runtime/i18n-C7YV9VIN.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/editor-runtime/print/index.js.map +1 -1
- package/dist/browser/{i18n-gsOjC7sf.js → i18n-C7YV9VIN.js} +291 -217
- package/dist/browser/i18n-C7YV9VIN.js.map +1 -0
- package/dist/browser/print/index.js +2 -2
- package/dist/browser/print/index.js.map +1 -1
- package/dist/delivery/index.js +282 -199
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +4 -4
- package/dist/print/index.js +280 -197
- package/dist/print/index.js.map +1 -1
- package/module/print.js +847 -758
- package/module/print.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/client-C4zbv8nl.js.map +0 -1
- package/dist/browser/editor-runtime/client-C4zbv8nl.js.map +0 -1
- package/dist/browser/editor-runtime/i18n-gsOjC7sf.js.map +0 -1
- package/dist/browser/i18n-gsOjC7sf.js.map +0 -1
package/dist/print/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/disclose-version.js
|
|
2
2
|
if (typeof window !== "undefined") {
|
|
3
3
|
var _window$__svelte, _window;
|
|
4
4
|
((_window$__svelte = (_window = window).__svelte ?? (_window.__svelte = {})).v ?? (_window$__svelte.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
7
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/constants.js
|
|
8
8
|
var HYDRATION_ERROR = {};
|
|
9
9
|
var UNINITIALIZED = Symbol("uninitialized");
|
|
10
10
|
var NAMESPACE_SVG = "http://www.w3.org/2000/svg";
|
|
11
11
|
var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML";
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
13
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/shared/utils.js
|
|
14
14
|
var is_array = Array.isArray;
|
|
15
15
|
var index_of = Array.prototype.indexOf;
|
|
16
16
|
var includes = Array.prototype.includes;
|
|
@@ -100,13 +100,6 @@ var DESTROYING = 1 << 25;
|
|
|
100
100
|
var EFFECT_TRANSPARENT = 65536;
|
|
101
101
|
var EFFECT_PRESERVED = 1 << 19;
|
|
102
102
|
var USER_EFFECT = 1 << 20;
|
|
103
|
-
/**
|
|
104
|
-
* Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
|
|
105
|
-
* Will be lifted during execution of the derived and during checking its dirty state (both are necessary
|
|
106
|
-
* because a derived might be checked but not executed). This is a pure performance optimization flag and
|
|
107
|
-
* should not be used for any other purpose!
|
|
108
|
-
*/
|
|
109
|
-
var WAS_MARKED = 65536;
|
|
110
103
|
var REACTION_IS_UPDATING = 1 << 21;
|
|
111
104
|
var ASYNC = 1 << 22;
|
|
112
105
|
var ERROR_VALUE = 1 << 23;
|
|
@@ -148,7 +141,7 @@ function svelte_boundary_reset_noop() {
|
|
|
148
141
|
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
149
142
|
}
|
|
150
143
|
//#endregion
|
|
151
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
144
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
152
145
|
/** @import { TemplateNode } from '#client' */
|
|
153
146
|
/**
|
|
154
147
|
* Use this variable to guard everything related to hydration code so it can be treeshaken out
|
|
@@ -227,7 +220,7 @@ function read_hydration_instruction(node) {
|
|
|
227
220
|
return node.data;
|
|
228
221
|
}
|
|
229
222
|
//#endregion
|
|
230
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
223
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
231
224
|
/** @import { Equals } from '#client' */
|
|
232
225
|
/** @type {Equals} */
|
|
233
226
|
function equals(value) {
|
|
@@ -246,7 +239,7 @@ function safe_equals(value) {
|
|
|
246
239
|
return !safe_not_equal(value, this.v);
|
|
247
240
|
}
|
|
248
241
|
//#endregion
|
|
249
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
242
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/errors.js
|
|
250
243
|
/**
|
|
251
244
|
* Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
|
|
252
245
|
* @returns {never}
|
|
@@ -328,13 +321,13 @@ function svelte_boundary_reset_onerror() {
|
|
|
328
321
|
throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
|
|
329
322
|
}
|
|
330
323
|
//#endregion
|
|
331
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
324
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/flags/index.js
|
|
332
325
|
/** True if experimental.async=true */
|
|
333
326
|
var async_mode_flag = false;
|
|
334
327
|
/** True if we're not certain that we only have Svelte 5 code in the compilation */
|
|
335
328
|
var legacy_mode_flag = false;
|
|
336
329
|
//#endregion
|
|
337
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
330
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/context.js
|
|
338
331
|
/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
|
|
339
332
|
/** @type {ComponentContext | null} */
|
|
340
333
|
var component_context = null;
|
|
@@ -394,7 +387,7 @@ function is_runes() {
|
|
|
394
387
|
return !legacy_mode_flag || component_context !== null && component_context.l === null;
|
|
395
388
|
}
|
|
396
389
|
//#endregion
|
|
397
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
390
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/task.js
|
|
398
391
|
/** @type {Array<() => void>} */
|
|
399
392
|
var micro_tasks = [];
|
|
400
393
|
function run_micro_tasks() {
|
|
@@ -421,7 +414,7 @@ function flush_tasks() {
|
|
|
421
414
|
while (micro_tasks.length > 0) run_micro_tasks();
|
|
422
415
|
}
|
|
423
416
|
//#endregion
|
|
424
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
417
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
425
418
|
/** @import { Derived, Signal } from '#client' */
|
|
426
419
|
var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
|
|
427
420
|
/**
|
|
@@ -440,22 +433,8 @@ function update_derived_status(derived) {
|
|
|
440
433
|
else set_signal_status(derived, MAYBE_DIRTY);
|
|
441
434
|
}
|
|
442
435
|
//#endregion
|
|
443
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
444
|
-
/** @import {
|
|
445
|
-
/**
|
|
446
|
-
* @param {Value[] | null} deps
|
|
447
|
-
*/
|
|
448
|
-
function clear_marked(deps) {
|
|
449
|
-
if (deps === null) return;
|
|
450
|
-
for (const dep of deps) {
|
|
451
|
-
if ((dep.f & 2) === 0 || (dep.f & 65536) === 0) continue;
|
|
452
|
-
dep.f ^= WAS_MARKED;
|
|
453
|
-
clear_marked(
|
|
454
|
-
/** @type {Derived} */
|
|
455
|
-
dep.deps
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
436
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
437
|
+
/** @import { Effect } from '#client' */
|
|
459
438
|
/**
|
|
460
439
|
* @param {Effect} effect
|
|
461
440
|
* @param {Set<Effect>} dirty_effects
|
|
@@ -464,41 +443,10 @@ function clear_marked(deps) {
|
|
|
464
443
|
function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
465
444
|
if ((effect.f & 2048) !== 0) dirty_effects.add(effect);
|
|
466
445
|
else if ((effect.f & 4096) !== 0) maybe_dirty_effects.add(effect);
|
|
467
|
-
clear_marked(effect.deps);
|
|
468
446
|
set_signal_status(effect, CLEAN);
|
|
469
447
|
}
|
|
470
448
|
//#endregion
|
|
471
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
472
|
-
/**
|
|
473
|
-
* We set this to `true` when updating a store so that we correctly
|
|
474
|
-
* schedule effects if the update takes place inside a `$:` effect
|
|
475
|
-
*/
|
|
476
|
-
var legacy_is_updating_store = false;
|
|
477
|
-
/**
|
|
478
|
-
* Whether or not the prop currently being read is a store binding, as in
|
|
479
|
-
* `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in
|
|
480
|
-
* runes mode, and skip `binding_property_non_reactive` validation
|
|
481
|
-
*/
|
|
482
|
-
var is_store_binding = false;
|
|
483
|
-
/**
|
|
484
|
-
* Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.
|
|
485
|
-
* Used to prevent `binding_property_non_reactive` validation false positives and
|
|
486
|
-
* ensure that these props are treated as mutable even in runes mode
|
|
487
|
-
* @template T
|
|
488
|
-
* @param {() => T} fn
|
|
489
|
-
* @returns {[T, boolean]}
|
|
490
|
-
*/
|
|
491
|
-
function capture_store_binding(fn) {
|
|
492
|
-
var previous_is_store_binding = is_store_binding;
|
|
493
|
-
try {
|
|
494
|
-
is_store_binding = false;
|
|
495
|
-
return [fn(), is_store_binding];
|
|
496
|
-
} finally {
|
|
497
|
-
is_store_binding = previous_is_store_binding;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region ../../../node_modules/.bun/svelte@5.57.0/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
449
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
502
450
|
/**
|
|
503
451
|
* @template T
|
|
504
452
|
* @param {() => T} fn
|
|
@@ -516,7 +464,7 @@ function without_reactive_context(fn) {
|
|
|
516
464
|
}
|
|
517
465
|
}
|
|
518
466
|
//#endregion
|
|
519
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
467
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
520
468
|
/** @import { Blocker, Effect, Source, Value } from '#client' */
|
|
521
469
|
/**
|
|
522
470
|
* @param {Blocker[]} blockers
|
|
@@ -749,7 +697,6 @@ function execute_derived(derived) {
|
|
|
749
697
|
}
|
|
750
698
|
set_active_effect(parent);
|
|
751
699
|
try {
|
|
752
|
-
derived.f &= ~WAS_MARKED;
|
|
753
700
|
destroy_derived_effects(derived);
|
|
754
701
|
value = update_reaction(derived);
|
|
755
702
|
} finally {
|
|
@@ -836,7 +783,7 @@ function _classPrivateFieldGet2(s, a) {
|
|
|
836
783
|
return s.get(_assertClassBrand(s, a));
|
|
837
784
|
}
|
|
838
785
|
//#endregion
|
|
839
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
786
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
840
787
|
/** @import { Fork } from 'svelte' */
|
|
841
788
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
842
789
|
var _Batch;
|
|
@@ -887,7 +834,7 @@ var _discard_callbacks = /* @__PURE__ */ new WeakMap();
|
|
|
887
834
|
var _pending = /* @__PURE__ */ new WeakMap();
|
|
888
835
|
var _blocking_pending = /* @__PURE__ */ new WeakMap();
|
|
889
836
|
var _deferred = /* @__PURE__ */ new WeakMap();
|
|
890
|
-
var
|
|
837
|
+
var _scheduled = /* @__PURE__ */ new WeakMap();
|
|
891
838
|
var _new_effects = /* @__PURE__ */ new WeakMap();
|
|
892
839
|
var _dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
893
840
|
var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -935,7 +882,7 @@ var Batch = class Batch {
|
|
|
935
882
|
_classPrivateFieldInitSpec(this, _pending, 0);
|
|
936
883
|
_classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
|
|
937
884
|
_classPrivateFieldInitSpec(this, _deferred, null);
|
|
938
|
-
_classPrivateFieldInitSpec(this,
|
|
885
|
+
_classPrivateFieldInitSpec(this, _scheduled, []);
|
|
939
886
|
_classPrivateFieldInitSpec(this, _new_effects, []);
|
|
940
887
|
_classPrivateFieldInitSpec(this, _dirty_effects$1, /* @__PURE__ */ new Set());
|
|
941
888
|
_classPrivateFieldInitSpec(this, _maybe_dirty_effects$1, /* @__PURE__ */ new Set());
|
|
@@ -1124,20 +1071,7 @@ var Batch = class Batch {
|
|
|
1124
1071
|
effect.b.defer_effect(effect);
|
|
1125
1072
|
return;
|
|
1126
1073
|
}
|
|
1127
|
-
|
|
1128
|
-
while (e.parent !== null) {
|
|
1129
|
-
e = e.parent;
|
|
1130
|
-
var flags = e.f;
|
|
1131
|
-
if (collected_effects !== null && e === active_effect) {
|
|
1132
|
-
if (async_mode_flag) return;
|
|
1133
|
-
if ((active_reaction === null || (active_reaction.f & 2) === 0) && !legacy_is_updating_store) return;
|
|
1134
|
-
}
|
|
1135
|
-
if ((flags & 96) !== 0) {
|
|
1136
|
-
if ((flags & 1024) === 0) return;
|
|
1137
|
-
e.f ^= CLEAN;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
_classPrivateFieldGet2(_roots, this).push(e);
|
|
1074
|
+
_classPrivateFieldGet2(_scheduled, this).push(effect);
|
|
1141
1075
|
}
|
|
1142
1076
|
};
|
|
1143
1077
|
_Batch = Batch;
|
|
@@ -1157,12 +1091,40 @@ function _is_deferred() {
|
|
|
1157
1091
|
}
|
|
1158
1092
|
return false;
|
|
1159
1093
|
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Convert the effects that were scheduled in this batch into the root effects
|
|
1096
|
+
* that need to be traversed, marking the path to each effect (by clearing the
|
|
1097
|
+
* `CLEAN` flag on ancestor branches) so that the traversal can find them.
|
|
1098
|
+
* This happens right before traversal rather than at scheduling time, so that
|
|
1099
|
+
* the markers left on the (shared) effect tree are created and consumed within
|
|
1100
|
+
* a single traversal — scheduling into other batches can never observe them
|
|
1101
|
+
* @returns {Effect[]}
|
|
1102
|
+
*/
|
|
1103
|
+
function _resolve$1() {
|
|
1104
|
+
/** @type {Effect[]} */
|
|
1105
|
+
var roots = [];
|
|
1106
|
+
for (const effect of _classPrivateFieldGet2(_scheduled, this)) {
|
|
1107
|
+
if ((effect.f & 16384) !== 0 || (effect.f & 6144) === 0) continue;
|
|
1108
|
+
var e = effect;
|
|
1109
|
+
var covered = false;
|
|
1110
|
+
while (e.parent !== null) {
|
|
1111
|
+
e = e.parent;
|
|
1112
|
+
var flags = e.f;
|
|
1113
|
+
if ((flags & 96) !== 0) {
|
|
1114
|
+
if ((flags & 1024) === 0) {
|
|
1115
|
+
covered = true;
|
|
1116
|
+
break;
|
|
1117
|
+
}
|
|
1118
|
+
e.f ^= CLEAN;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
if (!covered) roots.push(e);
|
|
1122
|
+
}
|
|
1123
|
+
_classPrivateFieldSet2(_scheduled, this, []);
|
|
1124
|
+
return roots;
|
|
1125
|
+
}
|
|
1160
1126
|
function _process() {
|
|
1161
1127
|
_classPrivateFieldSet2(_started, this, true);
|
|
1162
|
-
if (flush_count++ > 1e3) {
|
|
1163
|
-
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1164
|
-
infinite_loop_guard();
|
|
1165
|
-
}
|
|
1166
1128
|
for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
|
|
1167
1129
|
_classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
|
|
1168
1130
|
set_signal_status(e, DIRTY);
|
|
@@ -1172,8 +1134,6 @@ function _process() {
|
|
|
1172
1134
|
set_signal_status(e, MAYBE_DIRTY);
|
|
1173
1135
|
this.schedule(e);
|
|
1174
1136
|
}
|
|
1175
|
-
const roots = _classPrivateFieldGet2(_roots, this);
|
|
1176
|
-
_classPrivateFieldSet2(_roots, this, []);
|
|
1177
1137
|
this.apply();
|
|
1178
1138
|
/** @type {Effect[]} */
|
|
1179
1139
|
var effects = collected_effects = [];
|
|
@@ -1184,12 +1144,18 @@ function _process() {
|
|
|
1184
1144
|
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1185
1145
|
*/
|
|
1186
1146
|
var updates = legacy_updates = [];
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1147
|
+
while (_classPrivateFieldGet2(_scheduled, this).length > 0) {
|
|
1148
|
+
if (flush_count++ > 1e3) {
|
|
1149
|
+
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1150
|
+
infinite_loop_guard();
|
|
1151
|
+
}
|
|
1152
|
+
for (const root of _assertClassBrand(_Batch_brand, this, _resolve$1).call(this)) try {
|
|
1153
|
+
_assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
|
|
1154
|
+
} catch (e) {
|
|
1155
|
+
reset_all(root);
|
|
1156
|
+
if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
|
|
1157
|
+
throw e;
|
|
1158
|
+
}
|
|
1193
1159
|
}
|
|
1194
1160
|
current_batch = null;
|
|
1195
1161
|
if (updates.length > 0) {
|
|
@@ -1223,16 +1189,16 @@ function _process() {
|
|
|
1223
1189
|
previous_batch = null;
|
|
1224
1190
|
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
1225
1191
|
var next_batch = current_batch;
|
|
1226
|
-
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(
|
|
1192
|
+
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_scheduled, this).length === 0 || next_batch !== null)) {
|
|
1227
1193
|
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1228
1194
|
if (async_mode_flag) {
|
|
1229
1195
|
_assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
1230
1196
|
current_batch = next_batch;
|
|
1231
1197
|
}
|
|
1232
1198
|
}
|
|
1233
|
-
if (_classPrivateFieldGet2(
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1199
|
+
if (_classPrivateFieldGet2(_scheduled, this).length > 0) if (next_batch !== null) {
|
|
1200
|
+
for (const e of _classPrivateFieldGet2(_scheduled, this)) _classPrivateFieldGet2(_scheduled, next_batch).push(e);
|
|
1201
|
+
_classPrivateFieldSet2(_scheduled, this, []);
|
|
1236
1202
|
} else next_batch = this;
|
|
1237
1203
|
if (next_batch !== null) {
|
|
1238
1204
|
old_values.clear();
|
|
@@ -1382,10 +1348,9 @@ function _commit$1() {
|
|
|
1382
1348
|
batch.schedule(effect);
|
|
1383
1349
|
} else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
|
|
1384
1350
|
}
|
|
1385
|
-
if (_classPrivateFieldGet2(
|
|
1351
|
+
if (_classPrivateFieldGet2(_scheduled, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
|
|
1386
1352
|
batch.apply();
|
|
1387
|
-
for (var root of
|
|
1388
|
-
_classPrivateFieldSet2(_roots, batch, []);
|
|
1353
|
+
for (var root of _assertClassBrand(_Batch_brand, batch, _resolve$1).call(batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
|
|
1389
1354
|
}
|
|
1390
1355
|
batch.deactivate();
|
|
1391
1356
|
}
|
|
@@ -1552,7 +1517,7 @@ function reset_all(effect) {
|
|
|
1552
1517
|
}
|
|
1553
1518
|
}
|
|
1554
1519
|
//#endregion
|
|
1555
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1520
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
1556
1521
|
/** @import { Derived, Effect, Source, Value } from '#client' */
|
|
1557
1522
|
/** @type {Set<Effect>} */
|
|
1558
1523
|
var eager_effects = /* @__PURE__ */ new Set();
|
|
@@ -1614,6 +1579,16 @@ function set(source, value, should_proxy = false) {
|
|
|
1614
1579
|
return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
|
|
1615
1580
|
}
|
|
1616
1581
|
/**
|
|
1582
|
+
* A set of signals we have already seen while traversing in mark_reactions.
|
|
1583
|
+
* Not always set to balance the common case of sources only having a couple
|
|
1584
|
+
* of (transitive) dependencies (where always creating a Set would be bad for perf)
|
|
1585
|
+
* with the edge case of extremely deep or wide dependency arrays with cycles.
|
|
1586
|
+
* @type {Set<any> | null}
|
|
1587
|
+
*/
|
|
1588
|
+
var seen = null;
|
|
1589
|
+
/** Number of transitive dependencies, see {@link seen} for more info */
|
|
1590
|
+
var count_deps = 0;
|
|
1591
|
+
/**
|
|
1617
1592
|
* @template V
|
|
1618
1593
|
* @param {Source<V>} source
|
|
1619
1594
|
* @param {V} value
|
|
@@ -1632,7 +1607,10 @@ function internal_set(source, value, updated_during_traversal = null) {
|
|
|
1632
1607
|
if (batch_values === null) update_derived_status(derived);
|
|
1633
1608
|
}
|
|
1634
1609
|
source.wv = increment_write_version();
|
|
1610
|
+
seen = null;
|
|
1611
|
+
count_deps = 0;
|
|
1635
1612
|
mark_reactions(source, DIRTY, updated_during_traversal);
|
|
1613
|
+
seen = null;
|
|
1636
1614
|
if (is_runes() && active_effect !== null && (active_effect.f & 1024) !== 0 && (active_effect.f & 96) === 0) if (untracked_writes === null) set_untracked_writes([source]);
|
|
1637
1615
|
else untracked_writes.push(source);
|
|
1638
1616
|
if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) flush_eager_effects();
|
|
@@ -1671,6 +1649,12 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1671
1649
|
if (reactions === null) return;
|
|
1672
1650
|
var runes = is_runes();
|
|
1673
1651
|
var length = reactions.length;
|
|
1652
|
+
count_deps += length;
|
|
1653
|
+
if (count_deps > 1e5 && seen === null) seen = /* @__PURE__ */ new Set();
|
|
1654
|
+
if (seen !== null) {
|
|
1655
|
+
if (seen.has(signal)) return;
|
|
1656
|
+
seen.add(signal);
|
|
1657
|
+
}
|
|
1674
1658
|
for (var i = 0; i < length; i++) {
|
|
1675
1659
|
var reaction = reactions[i];
|
|
1676
1660
|
var flags = reaction.f;
|
|
@@ -1681,10 +1665,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1681
1665
|
else if ((flags & 2) !== 0) {
|
|
1682
1666
|
var derived = reaction;
|
|
1683
1667
|
batch_values?.delete(derived);
|
|
1684
|
-
|
|
1685
|
-
if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
|
|
1686
|
-
mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
|
|
1687
|
-
}
|
|
1668
|
+
mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
|
|
1688
1669
|
} else if (not_dirty) {
|
|
1689
1670
|
var effect = reaction;
|
|
1690
1671
|
if ((flags & 16) !== 0 && eager_block_effects !== null) eager_block_effects.add(effect);
|
|
@@ -1772,14 +1753,14 @@ function proxy(value) {
|
|
|
1772
1753
|
return Reflect.get(target, prop, receiver);
|
|
1773
1754
|
},
|
|
1774
1755
|
getOwnPropertyDescriptor(target, prop) {
|
|
1756
|
+
this.has?.(target, prop);
|
|
1775
1757
|
var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
if (source !== void 0 && value !== UNINITIALIZED) return {
|
|
1758
|
+
var s = sources.get(prop);
|
|
1759
|
+
if (s !== void 0) {
|
|
1760
|
+
var value = get$1(s);
|
|
1761
|
+
if (value === UNINITIALIZED) return;
|
|
1762
|
+
if (descriptor && "value" in descriptor) descriptor.value = value;
|
|
1763
|
+
else return {
|
|
1783
1764
|
enumerable: true,
|
|
1784
1765
|
configurable: true,
|
|
1785
1766
|
value,
|
|
@@ -1852,7 +1833,7 @@ function proxy(value) {
|
|
|
1852
1833
|
});
|
|
1853
1834
|
}
|
|
1854
1835
|
//#endregion
|
|
1855
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1836
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/operations.js
|
|
1856
1837
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
1857
1838
|
/** @type {Window} */
|
|
1858
1839
|
var $window;
|
|
@@ -2077,7 +2058,7 @@ function invoke_error_boundary(error, effect) {
|
|
|
2077
2058
|
throw error;
|
|
2078
2059
|
}
|
|
2079
2060
|
//#endregion
|
|
2080
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2061
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2081
2062
|
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
|
|
2082
2063
|
/**
|
|
2083
2064
|
* @param {'$effect' | '$effect.pre' | '$inspect'} rune
|
|
@@ -2468,14 +2449,14 @@ function move_effect(effect, fragment) {
|
|
|
2468
2449
|
}
|
|
2469
2450
|
}
|
|
2470
2451
|
//#endregion
|
|
2471
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2452
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/legacy.js
|
|
2472
2453
|
/**
|
|
2473
2454
|
* @type {Set<Value> | null}
|
|
2474
2455
|
* @deprecated
|
|
2475
2456
|
*/
|
|
2476
2457
|
var captured_signals = null;
|
|
2477
2458
|
//#endregion
|
|
2478
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2459
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/runtime.js
|
|
2479
2460
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
2480
2461
|
/**
|
|
2481
2462
|
* True if updating in an effect context that is reactive (i.e. not branch/root effects)
|
|
@@ -2507,7 +2488,7 @@ function set_active_effect(effect) {
|
|
|
2507
2488
|
var current_sources = null;
|
|
2508
2489
|
/** @param {Value} value */
|
|
2509
2490
|
function push_reaction_value(value) {
|
|
2510
|
-
if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
|
|
2491
|
+
if (active_reaction !== null && (!async_mode_flag && (active_reaction.f & 2097152) !== 0 || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
|
|
2511
2492
|
}
|
|
2512
2493
|
/**
|
|
2513
2494
|
* The dependencies of the reaction that is currently being executed. In many cases,
|
|
@@ -2551,7 +2532,6 @@ function increment_write_version() {
|
|
|
2551
2532
|
function is_dirty(reaction) {
|
|
2552
2533
|
var flags = reaction.f;
|
|
2553
2534
|
if ((flags & 2048) !== 0) return true;
|
|
2554
|
-
if (flags & 2) reaction.f &= ~WAS_MARKED;
|
|
2555
2535
|
if ((flags & 4096) !== 0) {
|
|
2556
2536
|
var dependencies = reaction.deps;
|
|
2557
2537
|
var length = dependencies.length;
|
|
@@ -2683,10 +2663,7 @@ function remove_reaction(signal, dependency) {
|
|
|
2683
2663
|
}
|
|
2684
2664
|
if (reactions === null && (dependency.f & 2) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
|
|
2685
2665
|
var derived = dependency;
|
|
2686
|
-
if ((derived.f & 512) !== 0)
|
|
2687
|
-
derived.f ^= 512;
|
|
2688
|
-
derived.f &= ~WAS_MARKED;
|
|
2689
|
-
}
|
|
2666
|
+
if ((derived.f & 512) !== 0) derived.f ^= 512;
|
|
2690
2667
|
if (derived.v !== UNINITIALIZED) update_derived_status(derived);
|
|
2691
2668
|
if (derived.ac !== null) without_reactive_context(() => {
|
|
2692
2669
|
/** @type {AbortController} */ derived.ac.abort(STALE_REACTION);
|
|
@@ -2835,7 +2812,7 @@ function untrack(fn) {
|
|
|
2835
2812
|
}
|
|
2836
2813
|
}
|
|
2837
2814
|
//#endregion
|
|
2838
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2815
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
2839
2816
|
/**
|
|
2840
2817
|
* Used on elements, as a map of event type -> event handler,
|
|
2841
2818
|
* and on events themselves to track which element handled an event
|
|
@@ -2926,7 +2903,7 @@ function handle_event_propagation(event) {
|
|
|
2926
2903
|
}
|
|
2927
2904
|
}
|
|
2928
2905
|
//#endregion
|
|
2929
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2906
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
2930
2907
|
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
2931
2908
|
/** @param {string} html */
|
|
2932
2909
|
createHTML: (html) => {
|
|
@@ -2945,7 +2922,7 @@ function create_fragment_from_html(html) {
|
|
|
2945
2922
|
return elem.content;
|
|
2946
2923
|
}
|
|
2947
2924
|
//#endregion
|
|
2948
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2925
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/template.js
|
|
2949
2926
|
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
2950
2927
|
/** @import { TemplateStructure } from './types' */
|
|
2951
2928
|
/**
|
|
@@ -3029,7 +3006,7 @@ function is_passive_event(name) {
|
|
|
3029
3006
|
return PASSIVE_EVENTS.includes(name);
|
|
3030
3007
|
}
|
|
3031
3008
|
//#endregion
|
|
3032
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3009
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
3033
3010
|
/**
|
|
3034
3011
|
* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
|
|
3035
3012
|
* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
|
|
@@ -3102,7 +3079,7 @@ function createSubscriber(start) {
|
|
|
3102
3079
|
};
|
|
3103
3080
|
}
|
|
3104
3081
|
//#endregion
|
|
3105
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3082
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
3106
3083
|
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
3107
3084
|
/**
|
|
3108
3085
|
* @typedef {{
|
|
@@ -3672,7 +3649,7 @@ function unmount(component, options) {
|
|
|
3672
3649
|
return Promise.resolve();
|
|
3673
3650
|
}
|
|
3674
3651
|
//#endregion
|
|
3675
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3652
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
3676
3653
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
3677
3654
|
var _batches = /* @__PURE__ */ new WeakMap();
|
|
3678
3655
|
var _onscreen = /* @__PURE__ */ new WeakMap();
|
|
@@ -3795,7 +3772,7 @@ var BranchManager = class {
|
|
|
3795
3772
|
}
|
|
3796
3773
|
};
|
|
3797
3774
|
//#endregion
|
|
3798
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3775
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
3799
3776
|
/** @import { TemplateNode } from '#client' */
|
|
3800
3777
|
/**
|
|
3801
3778
|
* @param {TemplateNode} node
|
|
@@ -3901,7 +3878,7 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
3901
3878
|
});
|
|
3902
3879
|
}
|
|
3903
3880
|
//#endregion
|
|
3904
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3881
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/css.js
|
|
3905
3882
|
/**
|
|
3906
3883
|
* @param {Node} anchor
|
|
3907
3884
|
* @param {{ hash: string, code: string }} css
|
|
@@ -3920,7 +3897,7 @@ function append_styles(anchor, css) {
|
|
|
3920
3897
|
});
|
|
3921
3898
|
}
|
|
3922
3899
|
//#endregion
|
|
3923
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3900
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
3924
3901
|
/** @import { Blocker, Effect } from '#client' */
|
|
3925
3902
|
var IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
3926
3903
|
var IS_HTML = Symbol("is html");
|
|
@@ -3975,7 +3952,7 @@ function get_setters(element) {
|
|
|
3975
3952
|
return setters;
|
|
3976
3953
|
}
|
|
3977
3954
|
//#endregion
|
|
3978
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3955
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
|
|
3979
3956
|
var _ResizeObserverSingleton;
|
|
3980
3957
|
var _listeners = /* @__PURE__ */ new WeakMap();
|
|
3981
3958
|
var _observer = /* @__PURE__ */ new WeakMap();
|
|
@@ -4027,7 +4004,7 @@ function _getObserver() {
|
|
|
4027
4004
|
}
|
|
4028
4005
|
_defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
|
|
4029
4006
|
//#endregion
|
|
4030
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4007
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
|
|
4031
4008
|
/** @import { ComponentContext, Effect } from '#client' */
|
|
4032
4009
|
/**
|
|
4033
4010
|
* @param {any} bound_value
|
|
@@ -4079,7 +4056,32 @@ function bind_this(element_or_component = mark_as_component(), update, get_value
|
|
|
4079
4056
|
return element_or_component;
|
|
4080
4057
|
}
|
|
4081
4058
|
//#endregion
|
|
4082
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4059
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
4060
|
+
/**
|
|
4061
|
+
* Whether or not the prop currently being read is a store binding, as in
|
|
4062
|
+
* `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in
|
|
4063
|
+
* runes mode, and skip `binding_property_non_reactive` validation
|
|
4064
|
+
*/
|
|
4065
|
+
var is_store_binding = false;
|
|
4066
|
+
/**
|
|
4067
|
+
* Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.
|
|
4068
|
+
* Used to prevent `binding_property_non_reactive` validation false positives and
|
|
4069
|
+
* ensure that these props are treated as mutable even in runes mode
|
|
4070
|
+
* @template T
|
|
4071
|
+
* @param {() => T} fn
|
|
4072
|
+
* @returns {[T, boolean]}
|
|
4073
|
+
*/
|
|
4074
|
+
function capture_store_binding(fn) {
|
|
4075
|
+
var previous_is_store_binding = is_store_binding;
|
|
4076
|
+
try {
|
|
4077
|
+
is_store_binding = false;
|
|
4078
|
+
return [fn(), is_store_binding];
|
|
4079
|
+
} finally {
|
|
4080
|
+
is_store_binding = previous_is_store_binding;
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
//#endregion
|
|
4084
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4083
4085
|
/** @import { Derived, Effect, Source } from './types.js' */
|
|
4084
4086
|
/**
|
|
4085
4087
|
* This function is responsible for synchronizing a possibly bound prop with the inner component state.
|
|
@@ -4172,7 +4174,7 @@ function prop(props, key, flags, fallback) {
|
|
|
4172
4174
|
});
|
|
4173
4175
|
}
|
|
4174
4176
|
//#endregion
|
|
4175
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4177
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/legacy/legacy-client.js
|
|
4176
4178
|
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
4177
4179
|
/**
|
|
4178
4180
|
* Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
|
|
@@ -4291,7 +4293,7 @@ var Svelte4Component = class {
|
|
|
4291
4293
|
}
|
|
4292
4294
|
};
|
|
4293
4295
|
//#endregion
|
|
4294
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4296
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
|
|
4295
4297
|
/**
|
|
4296
4298
|
* @typedef {Object} CustomElementPropDefinition
|
|
4297
4299
|
* @property {string} [attribute]
|
|
@@ -4577,131 +4579,212 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
4577
4579
|
}
|
|
4578
4580
|
//#endregion
|
|
4579
4581
|
//#region ../../shared/math-rendering-mathjax/dist/index.js
|
|
4580
|
-
var e$2 =
|
|
4582
|
+
var e$2 = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page";
|
|
4583
|
+
var t$2 = "pie-mathjax-version-conflict";
|
|
4584
|
+
var n = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
|
|
4585
|
+
function r$1(r, i) {
|
|
4586
|
+
if (typeof window > "u") return;
|
|
4587
|
+
let a = globalThis;
|
|
4588
|
+
a[n] ?? (a[n] = {
|
|
4589
|
+
logged: !1,
|
|
4590
|
+
conditions: []
|
|
4591
|
+
});
|
|
4592
|
+
let o = a[n];
|
|
4593
|
+
if (o.conditions.includes(r)) return;
|
|
4594
|
+
o.conditions.push(r);
|
|
4595
|
+
let s = `[math-rendering] Unsupported page (${r}): ${i}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${e$2}`;
|
|
4596
|
+
o.logged || (o.logged = !0, console.error(s)), window.dispatchEvent(new CustomEvent(t$2, { detail: {
|
|
4597
|
+
condition: r,
|
|
4598
|
+
message: s,
|
|
4599
|
+
docsUrl: e$2
|
|
4600
|
+
} }));
|
|
4601
|
+
}
|
|
4602
|
+
function i() {
|
|
4603
|
+
let e = window.MathJax?.version;
|
|
4604
|
+
return typeof e == "string" && e.startsWith("3.") ? e : void 0;
|
|
4605
|
+
}
|
|
4606
|
+
var a = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js";
|
|
4607
|
+
var o = {
|
|
4581
4608
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
4582
4609
|
overarc: "\\overparen",
|
|
4583
4610
|
napprox: "\\not\\approx",
|
|
4584
4611
|
longdiv: "\\enclose{longdiv}",
|
|
4585
4612
|
abs: ["\\left|#1\\right|", 1]
|
|
4586
4613
|
};
|
|
4587
|
-
var
|
|
4588
|
-
var
|
|
4589
|
-
var
|
|
4590
|
-
var
|
|
4591
|
-
var
|
|
4614
|
+
var s = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
|
|
4615
|
+
var c = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
4616
|
+
var l = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
4617
|
+
var u = /\\embed\{newLine\}\[\]/g;
|
|
4618
|
+
var d = [
|
|
4592
4619
|
["$$", "$$"],
|
|
4593
4620
|
["$", "$"],
|
|
4594
4621
|
["\\[", "\\]"],
|
|
4595
4622
|
["\\(", "\\)"]
|
|
4596
4623
|
];
|
|
4597
|
-
var
|
|
4598
|
-
|
|
4624
|
+
var f = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
|
|
4625
|
+
var p = "PIE-MJX-CHTML-styles";
|
|
4626
|
+
var m = "MJX-CHTML-styles";
|
|
4627
|
+
var h = [m, "MJX-SVG-styles"];
|
|
4628
|
+
var g = 201;
|
|
4629
|
+
function _(e) {
|
|
4630
|
+
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
4631
|
+
for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
|
|
4632
|
+
}
|
|
4633
|
+
function v() {
|
|
4599
4634
|
return window.MathJax;
|
|
4600
4635
|
}
|
|
4601
|
-
function
|
|
4636
|
+
function y(e) {
|
|
4602
4637
|
let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
|
|
4603
|
-
for (let [e, n] of
|
|
4638
|
+
for (let [e, n] of d) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
|
|
4604
4639
|
return t;
|
|
4605
4640
|
}
|
|
4606
|
-
function
|
|
4641
|
+
function b(e) {
|
|
4607
4642
|
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
4608
4643
|
if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
|
|
4609
4644
|
let e = t.textContent;
|
|
4610
|
-
e && (t.textContent = `\\(${
|
|
4645
|
+
e && (t.textContent = `\\(${y(e)}\\)`.replace(u, "\\newline "), t.dataset.mathHandled = "true");
|
|
4611
4646
|
}
|
|
4612
4647
|
}
|
|
4613
|
-
function
|
|
4648
|
+
function x(e, t) {
|
|
4614
4649
|
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
4615
|
-
return (t ?
|
|
4650
|
+
return (t ? l : c).test(e.textContent ?? "");
|
|
4616
4651
|
}
|
|
4617
|
-
function
|
|
4618
|
-
return new Promise((
|
|
4619
|
-
let { useSingleDollar:
|
|
4652
|
+
function S(e) {
|
|
4653
|
+
return new Promise((t, n) => {
|
|
4654
|
+
let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: c = !0, srcUrl: l } = e, u = {
|
|
4620
4655
|
loader: {
|
|
4621
|
-
load:
|
|
4622
|
-
failed: (e) =>
|
|
4656
|
+
load: i ? ["a11y/assistive-mml"] : [],
|
|
4657
|
+
failed: (e) => n(e)
|
|
4623
4658
|
},
|
|
4624
4659
|
startup: {
|
|
4625
4660
|
typeset: !1,
|
|
4626
4661
|
ready: () => {
|
|
4627
|
-
let e =
|
|
4628
|
-
e?.defaultReady?.(), Promise.resolve(
|
|
4662
|
+
let e = v(), r = e?.startup, i = !!e?.version?.startsWith("4.");
|
|
4663
|
+
i && C(e), r?.defaultReady?.(), i && w(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
|
|
4629
4664
|
}
|
|
4630
4665
|
},
|
|
4631
|
-
tex: { macros: { ...
|
|
4666
|
+
tex: { macros: { ...o } },
|
|
4632
4667
|
options: {
|
|
4633
|
-
enableMenu:
|
|
4668
|
+
enableMenu: i,
|
|
4634
4669
|
menuOptions: { settings: {
|
|
4635
|
-
assistiveMml:
|
|
4670
|
+
assistiveMml: i,
|
|
4636
4671
|
enrich: !1,
|
|
4637
4672
|
inTabOrder: !1
|
|
4638
4673
|
} }
|
|
4639
4674
|
}
|
|
4640
4675
|
};
|
|
4641
|
-
|
|
4676
|
+
r && u.tex && (console.warn(s), u.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], u.tex.processEscapes = !0), c || (u.chtml = { fontURL: "" }), window.MathJax = u;
|
|
4642
4677
|
let d = document.createElement("script");
|
|
4643
|
-
d.src = l ||
|
|
4678
|
+
d.src = l || a, d.async = !0, d.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
|
|
4644
4679
|
});
|
|
4645
4680
|
}
|
|
4646
|
-
function
|
|
4681
|
+
function C(e) {
|
|
4682
|
+
let t = e?._?.output?.chtml_ts?.CHTML;
|
|
4683
|
+
t && (t.STYLESHEETID = p);
|
|
4684
|
+
}
|
|
4685
|
+
function w(e) {
|
|
4686
|
+
if (!e) return;
|
|
4687
|
+
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
4688
|
+
let n = e.typesetRoot;
|
|
4689
|
+
!n || t.has(n) || (_(n), t.add(n));
|
|
4690
|
+
};
|
|
4691
|
+
e.addRenderAction?.("pie-strip-latex", g, (e) => {
|
|
4692
|
+
for (let t of e.math ?? []) n(t);
|
|
4693
|
+
return !1;
|
|
4694
|
+
}, (e) => {
|
|
4695
|
+
let t = e.typesetRoot;
|
|
4696
|
+
return t && _(t), !1;
|
|
4697
|
+
});
|
|
4698
|
+
let r = e.outputJax?.chtmlStyles;
|
|
4699
|
+
r?.id === m && (r.id = p), D();
|
|
4700
|
+
}
|
|
4701
|
+
function T(e) {
|
|
4702
|
+
return e instanceof HTMLStyleElement && h.includes(e.id);
|
|
4703
|
+
}
|
|
4704
|
+
function E(e) {
|
|
4705
|
+
r$1("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
4706
|
+
}
|
|
4707
|
+
function D() {
|
|
4708
|
+
let e = document.head, t = [...e.children].find(T);
|
|
4709
|
+
if (t) {
|
|
4710
|
+
E(t);
|
|
4711
|
+
return;
|
|
4712
|
+
}
|
|
4713
|
+
let n = new MutationObserver((e) => {
|
|
4714
|
+
for (let t of e) {
|
|
4715
|
+
let e = [...t.addedNodes].find(T);
|
|
4716
|
+
if (e) {
|
|
4717
|
+
E(e), n.disconnect();
|
|
4718
|
+
return;
|
|
4719
|
+
}
|
|
4720
|
+
}
|
|
4721
|
+
});
|
|
4722
|
+
n.observe(e, { childList: !0 });
|
|
4723
|
+
}
|
|
4724
|
+
function O(e) {
|
|
4647
4725
|
return new Promise((t, n) => {
|
|
4648
4726
|
let r = e.startup ?? {};
|
|
4649
4727
|
e.startup = r;
|
|
4650
4728
|
let i = r.ready;
|
|
4651
4729
|
r.ready = () => {
|
|
4652
|
-
let e =
|
|
4730
|
+
let e = v()?.startup;
|
|
4653
4731
|
i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
|
|
4654
4732
|
};
|
|
4655
4733
|
});
|
|
4656
4734
|
}
|
|
4657
|
-
function
|
|
4658
|
-
let t =
|
|
4659
|
-
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() :
|
|
4735
|
+
function k(e) {
|
|
4736
|
+
let t = v();
|
|
4737
|
+
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : O(t) : S(e);
|
|
4660
4738
|
}
|
|
4661
|
-
function
|
|
4662
|
-
return
|
|
4663
|
-
typeof
|
|
4739
|
+
function A(e) {
|
|
4740
|
+
return k(e).then(() => {
|
|
4741
|
+
typeof v()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
|
|
4664
4742
|
});
|
|
4665
4743
|
}
|
|
4666
|
-
function
|
|
4667
|
-
let t = globalThis, n = t[
|
|
4668
|
-
return n || (n =
|
|
4744
|
+
function j(e) {
|
|
4745
|
+
let t = globalThis, n = t[f];
|
|
4746
|
+
return n || (n = A(e), t[f] = n), n;
|
|
4669
4747
|
}
|
|
4670
|
-
function
|
|
4748
|
+
function M(e = {}) {
|
|
4671
4749
|
let t = e.useSingleDollar ?? !1;
|
|
4672
4750
|
return async (n) => {
|
|
4673
4751
|
if (typeof window > "u") return;
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4752
|
+
let a = i();
|
|
4753
|
+
a && r$1("mathjax-3-global", `window.MathJax is MathJax ${a}`), b(n);
|
|
4754
|
+
let o = j(e);
|
|
4755
|
+
if (!x(n, t)) {
|
|
4756
|
+
o.catch(() => {});
|
|
4678
4757
|
return;
|
|
4679
4758
|
}
|
|
4680
|
-
await
|
|
4681
|
-
let
|
|
4682
|
-
await
|
|
4759
|
+
await o;
|
|
4760
|
+
let s = v();
|
|
4761
|
+
await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([n]), _(n));
|
|
4683
4762
|
};
|
|
4684
4763
|
}
|
|
4685
|
-
var
|
|
4686
|
-
var
|
|
4687
|
-
var
|
|
4688
|
-
function
|
|
4689
|
-
return !!window[
|
|
4764
|
+
var P = "@pie-lib/math-rendering";
|
|
4765
|
+
var F = "@pie-lib/math-rendering@2";
|
|
4766
|
+
var I = null;
|
|
4767
|
+
function L() {
|
|
4768
|
+
return !!window[F]?.opts?.useSingleDollar;
|
|
4690
4769
|
}
|
|
4691
|
-
function
|
|
4692
|
-
return
|
|
4770
|
+
function R() {
|
|
4771
|
+
return I || (I = M({ useSingleDollar: L() })), I;
|
|
4693
4772
|
}
|
|
4694
|
-
function
|
|
4773
|
+
function z() {
|
|
4695
4774
|
if (typeof window > "u") return null;
|
|
4696
|
-
let e = window[
|
|
4775
|
+
let e = window[P];
|
|
4697
4776
|
return typeof e?.renderMath == "function" ? e : null;
|
|
4698
4777
|
}
|
|
4699
|
-
|
|
4778
|
+
function B() {
|
|
4779
|
+
let e = i();
|
|
4780
|
+
e && r$1("legacy-renderer-delegation", `window['${P}'] renders this element's math with MathJax ${e}`);
|
|
4781
|
+
}
|
|
4782
|
+
var V = async (e) => {
|
|
4700
4783
|
if (typeof window > "u") return;
|
|
4701
4784
|
let t = typeof e == "string", n;
|
|
4702
4785
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
4703
|
-
let r =
|
|
4704
|
-
return r ? await r.renderMath?.(n) : await
|
|
4786
|
+
let r = z();
|
|
4787
|
+
return r ? (B(), await r.renderMath?.(n)) : await R()(n), t ? n.innerHTML : void 0;
|
|
4705
4788
|
};
|
|
4706
4789
|
//#endregion
|
|
4707
4790
|
//#region src/controller/plain-text.ts
|
|
@@ -7129,7 +7212,7 @@ function Print($$anchor, $$props) {
|
|
|
7129
7212
|
if (!get$1(promptElement) || !get$1(prompt)) return;
|
|
7130
7213
|
const warn = (err) => console.warn("simple-cloze: MathJax render failed", err);
|
|
7131
7214
|
try {
|
|
7132
|
-
Promise.resolve(
|
|
7215
|
+
Promise.resolve(V(get$1(promptElement))).catch(warn);
|
|
7133
7216
|
} catch (err) {
|
|
7134
7217
|
warn(err);
|
|
7135
7218
|
}
|