@pie-players/pie-assessment-toolkit 0.3.58 → 0.3.59
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/components/ItemToolBar.custom-element.js +344 -150
- package/dist/components/PieAssessmentToolkit.custom-element.js +10 -1
- package/dist/components/SectionToolBar.custom-element.js +342 -150
- package/dist/context/assessment-toolkit-context.d.ts +7 -0
- package/dist/context/assessment-toolkit-context.js.map +1 -1
- package/dist/runtime/core/engine-resolver.d.ts +16 -0
- package/dist/runtime/core/engine-resolver.js.map +1 -1
- package/package.json +7 -7
|
@@ -4073,6 +4073,23 @@ function if_block(node, fn, elseif = false) {
|
|
|
4073
4073
|
}
|
|
4074
4074
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/key.js
|
|
4075
4075
|
var NAN = Symbol("NaN");
|
|
4076
|
+
function key(node, get_key, render_fn) {
|
|
4077
|
+
if (hydrating) {
|
|
4078
|
+
hydrate_next();
|
|
4079
|
+
}
|
|
4080
|
+
var branches = new BranchManager(node);
|
|
4081
|
+
var legacy = !is_runes();
|
|
4082
|
+
block(() => {
|
|
4083
|
+
var key2 = get_key();
|
|
4084
|
+
if (key2 !== key2) {
|
|
4085
|
+
key2 = NAN;
|
|
4086
|
+
}
|
|
4087
|
+
if (legacy && key2 !== null && typeof key2 === "object") {
|
|
4088
|
+
key2 = {};
|
|
4089
|
+
}
|
|
4090
|
+
branches.ensure(key2, render_fn);
|
|
4091
|
+
});
|
|
4092
|
+
}
|
|
4076
4093
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/each.js
|
|
4077
4094
|
function pause_effects(state2, to_destroy, controlled_anchor) {
|
|
4078
4095
|
var transitions = [];
|
|
@@ -4121,8 +4138,8 @@ function destroy_effects(state2, to_destroy, remove_dom = true) {
|
|
|
4121
4138
|
if (state2.pending.size > 0) {
|
|
4122
4139
|
preserved_effects = new Set;
|
|
4123
4140
|
for (const keys of state2.pending.values()) {
|
|
4124
|
-
for (const
|
|
4125
|
-
preserved_effects.add(state2.items.get(
|
|
4141
|
+
for (const key2 of keys) {
|
|
4142
|
+
preserved_effects.add(state2.items.get(key2).e);
|
|
4126
4143
|
}
|
|
4127
4144
|
}
|
|
4128
4145
|
}
|
|
@@ -4208,14 +4225,14 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
|
|
|
4208
4225
|
set_hydrating(false);
|
|
4209
4226
|
}
|
|
4210
4227
|
var value = array[index];
|
|
4211
|
-
var
|
|
4228
|
+
var key2 = get_key(value, index);
|
|
4212
4229
|
if (true_default) {
|
|
4213
4230
|
var key_again = get_key(value, index);
|
|
4214
|
-
if (
|
|
4215
|
-
each_key_volatile(String(index), String(
|
|
4231
|
+
if (key2 !== key_again) {
|
|
4232
|
+
each_key_volatile(String(index), String(key2), String(key_again));
|
|
4216
4233
|
}
|
|
4217
4234
|
}
|
|
4218
|
-
var item = first_run ? null : items.get(
|
|
4235
|
+
var item = first_run ? null : items.get(key2);
|
|
4219
4236
|
if (item) {
|
|
4220
4237
|
if (item.v)
|
|
4221
4238
|
internal_set(item.v, value);
|
|
@@ -4225,13 +4242,13 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
|
|
|
4225
4242
|
batch.unskip_effect(item.e);
|
|
4226
4243
|
}
|
|
4227
4244
|
} else {
|
|
4228
|
-
item = create_item(items, first_run ? anchor : offscreen_anchor ??= create_text(), value,
|
|
4245
|
+
item = create_item(items, first_run ? anchor : offscreen_anchor ??= create_text(), value, key2, index, render_fn, flags2, get_collection);
|
|
4229
4246
|
if (!first_run) {
|
|
4230
4247
|
item.e.f |= EFFECT_OFFSCREEN;
|
|
4231
4248
|
}
|
|
4232
|
-
items.set(
|
|
4249
|
+
items.set(key2, item);
|
|
4233
4250
|
}
|
|
4234
|
-
keys.add(
|
|
4251
|
+
keys.add(key2);
|
|
4235
4252
|
}
|
|
4236
4253
|
if (length === 0 && fallback_fn && !fallback) {
|
|
4237
4254
|
if (first_run) {
|
|
@@ -4254,8 +4271,8 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
|
|
|
4254
4271
|
if (!first_run) {
|
|
4255
4272
|
pending.set(batch, keys);
|
|
4256
4273
|
if (defer) {
|
|
4257
|
-
for (const [
|
|
4258
|
-
if (!keys.has(
|
|
4274
|
+
for (const [key3, item2] of items) {
|
|
4275
|
+
if (!keys.has(key3)) {
|
|
4259
4276
|
batch.skip_effect(item2.e);
|
|
4260
4277
|
}
|
|
4261
4278
|
}
|
|
@@ -4293,14 +4310,14 @@ function reconcile(state2, array, anchor, flags2, get_key) {
|
|
|
4293
4310
|
var matched = [];
|
|
4294
4311
|
var stashed = [];
|
|
4295
4312
|
var value;
|
|
4296
|
-
var
|
|
4313
|
+
var key2;
|
|
4297
4314
|
var effect2;
|
|
4298
4315
|
var i;
|
|
4299
4316
|
if (is_animated) {
|
|
4300
4317
|
for (i = 0;i < length; i += 1) {
|
|
4301
4318
|
value = array[i];
|
|
4302
|
-
|
|
4303
|
-
effect2 = items.get(
|
|
4319
|
+
key2 = get_key(value, i);
|
|
4320
|
+
effect2 = items.get(key2).e;
|
|
4304
4321
|
if ((effect2.f & EFFECT_OFFSCREEN) === 0) {
|
|
4305
4322
|
effect2.nodes?.a?.measure();
|
|
4306
4323
|
(to_animate ??= new Set).add(effect2);
|
|
@@ -4309,8 +4326,8 @@ function reconcile(state2, array, anchor, flags2, get_key) {
|
|
|
4309
4326
|
}
|
|
4310
4327
|
for (i = 0;i < length; i += 1) {
|
|
4311
4328
|
value = array[i];
|
|
4312
|
-
|
|
4313
|
-
effect2 = items.get(
|
|
4329
|
+
key2 = get_key(value, i);
|
|
4330
|
+
effect2 = items.get(key2).e;
|
|
4314
4331
|
if (state2.outrogroups !== null) {
|
|
4315
4332
|
for (const group of state2.outrogroups) {
|
|
4316
4333
|
group.pending.delete(effect2);
|
|
@@ -4446,7 +4463,7 @@ function reconcile(state2, array, anchor, flags2, get_key) {
|
|
|
4446
4463
|
});
|
|
4447
4464
|
}
|
|
4448
4465
|
}
|
|
4449
|
-
function create_item(items, anchor, value,
|
|
4466
|
+
function create_item(items, anchor, value, key2, index, render_fn, flags2, get_collection) {
|
|
4450
4467
|
var v = (flags2 & EACH_ITEM_REACTIVE) !== 0 ? (flags2 & EACH_ITEM_IMMUTABLE) === 0 ? mutable_source(value, false, false) : source(value) : null;
|
|
4451
4468
|
var i = (flags2 & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;
|
|
4452
4469
|
if (true_default && v) {
|
|
@@ -4460,7 +4477,7 @@ function create_item(items, anchor, value, key, index, render_fn, flags2, get_co
|
|
|
4460
4477
|
e: branch(() => {
|
|
4461
4478
|
render_fn(anchor, v ?? value, i ?? index, get_collection);
|
|
4462
4479
|
return () => {
|
|
4463
|
-
items.delete(
|
|
4480
|
+
items.delete(key2);
|
|
4464
4481
|
};
|
|
4465
4482
|
})
|
|
4466
4483
|
};
|
|
@@ -4496,16 +4513,16 @@ function validate_each_keys(array, key_fn) {
|
|
|
4496
4513
|
const keys = new Map;
|
|
4497
4514
|
const length = array.length;
|
|
4498
4515
|
for (let i = 0;i < length; i++) {
|
|
4499
|
-
const
|
|
4500
|
-
if (keys.has(
|
|
4501
|
-
const a = String(keys.get(
|
|
4516
|
+
const key2 = key_fn(array[i], i);
|
|
4517
|
+
if (keys.has(key2)) {
|
|
4518
|
+
const a = String(keys.get(key2));
|
|
4502
4519
|
const b = String(i);
|
|
4503
|
-
let k = String(
|
|
4520
|
+
let k = String(key2);
|
|
4504
4521
|
if (k.startsWith("[object "))
|
|
4505
4522
|
k = null;
|
|
4506
4523
|
each_key_duplicate(a, b, k);
|
|
4507
4524
|
}
|
|
4508
|
-
keys.set(
|
|
4525
|
+
keys.set(key2, i);
|
|
4509
4526
|
}
|
|
4510
4527
|
}
|
|
4511
4528
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/html.js
|
|
@@ -4644,13 +4661,13 @@ function to_class(value, hash2, directives) {
|
|
|
4644
4661
|
classname = classname ? classname + " " + hash2 : hash2;
|
|
4645
4662
|
}
|
|
4646
4663
|
if (directives) {
|
|
4647
|
-
for (var
|
|
4648
|
-
if (directives[
|
|
4649
|
-
classname = classname ? classname + " " +
|
|
4664
|
+
for (var key2 of Object.keys(directives)) {
|
|
4665
|
+
if (directives[key2]) {
|
|
4666
|
+
classname = classname ? classname + " " + key2 : key2;
|
|
4650
4667
|
} else if (classname.length) {
|
|
4651
|
-
var len =
|
|
4668
|
+
var len = key2.length;
|
|
4652
4669
|
var a = 0;
|
|
4653
|
-
while ((a = classname.indexOf(
|
|
4670
|
+
while ((a = classname.indexOf(key2, a)) >= 0) {
|
|
4654
4671
|
var b = a + len;
|
|
4655
4672
|
if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) {
|
|
4656
4673
|
classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1);
|
|
@@ -4663,6 +4680,99 @@ function to_class(value, hash2, directives) {
|
|
|
4663
4680
|
}
|
|
4664
4681
|
return classname === "" ? null : classname;
|
|
4665
4682
|
}
|
|
4683
|
+
function append_styles2(styles, important = false) {
|
|
4684
|
+
var separator = important ? " !important;" : ";";
|
|
4685
|
+
var css = "";
|
|
4686
|
+
for (var key2 of Object.keys(styles)) {
|
|
4687
|
+
var value = styles[key2];
|
|
4688
|
+
if (value != null && value !== "") {
|
|
4689
|
+
css += " " + key2 + ": " + value + separator;
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4692
|
+
return css;
|
|
4693
|
+
}
|
|
4694
|
+
function to_css_name(name) {
|
|
4695
|
+
if (name[0] !== "-" || name[1] !== "-") {
|
|
4696
|
+
return name.toLowerCase();
|
|
4697
|
+
}
|
|
4698
|
+
return name;
|
|
4699
|
+
}
|
|
4700
|
+
function to_style(value, styles) {
|
|
4701
|
+
if (styles) {
|
|
4702
|
+
var new_style = "";
|
|
4703
|
+
var normal_styles;
|
|
4704
|
+
var important_styles;
|
|
4705
|
+
if (Array.isArray(styles)) {
|
|
4706
|
+
normal_styles = styles[0];
|
|
4707
|
+
important_styles = styles[1];
|
|
4708
|
+
} else {
|
|
4709
|
+
normal_styles = styles;
|
|
4710
|
+
}
|
|
4711
|
+
if (value) {
|
|
4712
|
+
value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
4713
|
+
var in_str = false;
|
|
4714
|
+
var in_apo = 0;
|
|
4715
|
+
var in_comment = false;
|
|
4716
|
+
var reserved_names = [];
|
|
4717
|
+
if (normal_styles) {
|
|
4718
|
+
reserved_names.push(...Object.keys(normal_styles).map(to_css_name));
|
|
4719
|
+
}
|
|
4720
|
+
if (important_styles) {
|
|
4721
|
+
reserved_names.push(...Object.keys(important_styles).map(to_css_name));
|
|
4722
|
+
}
|
|
4723
|
+
var start_index = 0;
|
|
4724
|
+
var name_index = -1;
|
|
4725
|
+
const len = value.length;
|
|
4726
|
+
for (var i = 0;i < len; i++) {
|
|
4727
|
+
var c = value[i];
|
|
4728
|
+
if (in_comment) {
|
|
4729
|
+
if (c === "/" && value[i - 1] === "*") {
|
|
4730
|
+
in_comment = false;
|
|
4731
|
+
}
|
|
4732
|
+
} else if (in_str) {
|
|
4733
|
+
if (in_str === c) {
|
|
4734
|
+
in_str = false;
|
|
4735
|
+
}
|
|
4736
|
+
} else if (c === "/" && value[i + 1] === "*") {
|
|
4737
|
+
in_comment = true;
|
|
4738
|
+
} else if (c === '"' || c === "'") {
|
|
4739
|
+
in_str = c;
|
|
4740
|
+
} else if (c === "(") {
|
|
4741
|
+
in_apo++;
|
|
4742
|
+
} else if (c === ")") {
|
|
4743
|
+
in_apo--;
|
|
4744
|
+
}
|
|
4745
|
+
if (!in_comment && in_str === false && in_apo === 0) {
|
|
4746
|
+
if (c === ":" && name_index === -1) {
|
|
4747
|
+
name_index = i;
|
|
4748
|
+
} else if (c === ";" || i === len - 1) {
|
|
4749
|
+
if (name_index !== -1) {
|
|
4750
|
+
var name = to_css_name(value.substring(start_index, name_index).trim());
|
|
4751
|
+
if (!reserved_names.includes(name)) {
|
|
4752
|
+
if (c !== ";") {
|
|
4753
|
+
i++;
|
|
4754
|
+
}
|
|
4755
|
+
var property = value.substring(start_index, i).trim();
|
|
4756
|
+
new_style += " " + property + ";";
|
|
4757
|
+
}
|
|
4758
|
+
}
|
|
4759
|
+
start_index = i + 1;
|
|
4760
|
+
name_index = -1;
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4763
|
+
}
|
|
4764
|
+
}
|
|
4765
|
+
if (normal_styles) {
|
|
4766
|
+
new_style += append_styles2(normal_styles);
|
|
4767
|
+
}
|
|
4768
|
+
if (important_styles) {
|
|
4769
|
+
new_style += append_styles2(important_styles, true);
|
|
4770
|
+
}
|
|
4771
|
+
new_style = new_style.trim();
|
|
4772
|
+
return new_style === "" ? null : new_style;
|
|
4773
|
+
}
|
|
4774
|
+
return value == null ? null : String(value);
|
|
4775
|
+
}
|
|
4666
4776
|
|
|
4667
4777
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/class.js
|
|
4668
4778
|
function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
|
|
@@ -4680,16 +4790,52 @@ function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
|
|
|
4680
4790
|
}
|
|
4681
4791
|
dom[CLASS_CACHE] = value;
|
|
4682
4792
|
} else if (next_classes && prev_classes !== next_classes) {
|
|
4683
|
-
for (var
|
|
4684
|
-
var is_present = !!next_classes[
|
|
4685
|
-
if (prev_classes == null || is_present !== !!prev_classes[
|
|
4686
|
-
dom.classList.toggle(
|
|
4793
|
+
for (var key2 in next_classes) {
|
|
4794
|
+
var is_present = !!next_classes[key2];
|
|
4795
|
+
if (prev_classes == null || is_present !== !!prev_classes[key2]) {
|
|
4796
|
+
dom.classList.toggle(key2, is_present);
|
|
4687
4797
|
}
|
|
4688
4798
|
}
|
|
4689
4799
|
}
|
|
4690
4800
|
return next_classes;
|
|
4691
4801
|
}
|
|
4692
4802
|
|
|
4803
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/style.js
|
|
4804
|
+
function update_styles(dom, prev = {}, next2, priority) {
|
|
4805
|
+
for (var key2 in next2) {
|
|
4806
|
+
var value = next2[key2];
|
|
4807
|
+
if (prev[key2] !== value) {
|
|
4808
|
+
if (next2[key2] == null) {
|
|
4809
|
+
dom.style.removeProperty(key2);
|
|
4810
|
+
} else {
|
|
4811
|
+
dom.style.setProperty(key2, value, priority);
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4816
|
+
function set_style(dom, value, prev_styles, next_styles) {
|
|
4817
|
+
var prev = dom[STYLE_CACHE];
|
|
4818
|
+
if (hydrating || prev !== value) {
|
|
4819
|
+
var next_style_attr = to_style(value, next_styles);
|
|
4820
|
+
if (!hydrating || next_style_attr !== dom.getAttribute("style")) {
|
|
4821
|
+
if (next_style_attr == null) {
|
|
4822
|
+
dom.removeAttribute("style");
|
|
4823
|
+
} else {
|
|
4824
|
+
dom.style.cssText = next_style_attr;
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
dom[STYLE_CACHE] = value;
|
|
4828
|
+
} else if (next_styles) {
|
|
4829
|
+
if (Array.isArray(next_styles)) {
|
|
4830
|
+
update_styles(dom, prev_styles?.[0], next_styles[0]);
|
|
4831
|
+
update_styles(dom, prev_styles?.[1], next_styles[1], "important");
|
|
4832
|
+
} else {
|
|
4833
|
+
update_styles(dom, prev_styles, next_styles);
|
|
4834
|
+
}
|
|
4835
|
+
}
|
|
4836
|
+
return next_styles;
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4693
4839
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
4694
4840
|
var CLASS = Symbol("class");
|
|
4695
4841
|
var STYLE = Symbol("style");
|
|
@@ -4761,9 +4907,9 @@ function get_setters(element) {
|
|
|
4761
4907
|
var element_proto = Element.prototype;
|
|
4762
4908
|
while (element_proto !== proto) {
|
|
4763
4909
|
descriptors = get_descriptors(proto);
|
|
4764
|
-
for (var
|
|
4765
|
-
if (descriptors[
|
|
4766
|
-
setters.push(
|
|
4910
|
+
for (var key2 in descriptors) {
|
|
4911
|
+
if (descriptors[key2].set && key2 !== "innerHTML" && key2 !== "textContent" && key2 !== "innerText") {
|
|
4912
|
+
setters.push(key2);
|
|
4767
4913
|
}
|
|
4768
4914
|
}
|
|
4769
4915
|
proto = get_prototype_of(proto);
|
|
@@ -4870,7 +5016,7 @@ function bind_this(element_or_component = {}, update2, get_value, get_parts) {
|
|
|
4870
5016
|
return element_or_component;
|
|
4871
5017
|
}
|
|
4872
5018
|
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4873
|
-
function prop(props,
|
|
5019
|
+
function prop(props, key2, flags2, fallback) {
|
|
4874
5020
|
var runes = !legacy_mode_flag || (flags2 & PROPS_IS_RUNES) !== 0;
|
|
4875
5021
|
var bindable = (flags2 & PROPS_IS_BINDABLE) !== 0;
|
|
4876
5022
|
var lazy = (flags2 & PROPS_IS_LAZY_INITIAL) !== 0;
|
|
@@ -4891,27 +5037,27 @@ function prop(props, key, flags2, fallback) {
|
|
|
4891
5037
|
let setter;
|
|
4892
5038
|
if (bindable) {
|
|
4893
5039
|
var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;
|
|
4894
|
-
setter = get_descriptor(props,
|
|
5040
|
+
setter = get_descriptor(props, key2)?.set ?? (is_entry_props && key2 in props ? (v) => props[key2] = v : undefined);
|
|
4895
5041
|
}
|
|
4896
5042
|
var initial_value;
|
|
4897
5043
|
var is_store_sub = false;
|
|
4898
5044
|
if (bindable) {
|
|
4899
|
-
[initial_value, is_store_sub] = capture_store_binding(() => props[
|
|
5045
|
+
[initial_value, is_store_sub] = capture_store_binding(() => props[key2]);
|
|
4900
5046
|
} else {
|
|
4901
|
-
initial_value = props[
|
|
5047
|
+
initial_value = props[key2];
|
|
4902
5048
|
}
|
|
4903
5049
|
if (initial_value === undefined && fallback !== undefined) {
|
|
4904
5050
|
initial_value = get_fallback();
|
|
4905
5051
|
if (setter) {
|
|
4906
5052
|
if (runes)
|
|
4907
|
-
props_invalid_value(
|
|
5053
|
+
props_invalid_value(key2);
|
|
4908
5054
|
setter(initial_value);
|
|
4909
5055
|
}
|
|
4910
5056
|
}
|
|
4911
5057
|
var getter;
|
|
4912
5058
|
if (runes) {
|
|
4913
5059
|
getter = () => {
|
|
4914
|
-
var value = props[
|
|
5060
|
+
var value = props[key2];
|
|
4915
5061
|
if (value === undefined)
|
|
4916
5062
|
return get_fallback();
|
|
4917
5063
|
fallback_dirty = true;
|
|
@@ -4919,7 +5065,7 @@ function prop(props, key, flags2, fallback) {
|
|
|
4919
5065
|
};
|
|
4920
5066
|
} else {
|
|
4921
5067
|
getter = () => {
|
|
4922
|
-
var value = props[
|
|
5068
|
+
var value = props[key2];
|
|
4923
5069
|
if (value !== undefined) {
|
|
4924
5070
|
fallback_value = undefined;
|
|
4925
5071
|
}
|
|
@@ -4947,7 +5093,7 @@ function prop(props, key, flags2, fallback) {
|
|
|
4947
5093
|
return getter();
|
|
4948
5094
|
});
|
|
4949
5095
|
if (true_default) {
|
|
4950
|
-
d.label =
|
|
5096
|
+
d.label = key2;
|
|
4951
5097
|
}
|
|
4952
5098
|
if (bindable)
|
|
4953
5099
|
get2(d);
|
|
@@ -4977,9 +5123,9 @@ class Svelte4Component {
|
|
|
4977
5123
|
#instance;
|
|
4978
5124
|
constructor(options) {
|
|
4979
5125
|
var sources = new Map;
|
|
4980
|
-
var add_source = (
|
|
5126
|
+
var add_source = (key2, value) => {
|
|
4981
5127
|
var s = mutable_source(value, false, false);
|
|
4982
|
-
sources.set(
|
|
5128
|
+
sources.set(key2, s);
|
|
4983
5129
|
return s;
|
|
4984
5130
|
};
|
|
4985
5131
|
const props = new Proxy({ ...options.props || {}, $$events: {} }, {
|
|
@@ -5010,15 +5156,15 @@ class Svelte4Component {
|
|
|
5010
5156
|
flushSync();
|
|
5011
5157
|
}
|
|
5012
5158
|
this.#events = props.$$events;
|
|
5013
|
-
for (const
|
|
5014
|
-
if (
|
|
5159
|
+
for (const key2 of Object.keys(this.#instance)) {
|
|
5160
|
+
if (key2 === "$set" || key2 === "$destroy" || key2 === "$on")
|
|
5015
5161
|
continue;
|
|
5016
|
-
define_property(this,
|
|
5162
|
+
define_property(this, key2, {
|
|
5017
5163
|
get() {
|
|
5018
|
-
return this.#instance[
|
|
5164
|
+
return this.#instance[key2];
|
|
5019
5165
|
},
|
|
5020
5166
|
set(value) {
|
|
5021
|
-
this.#instance[
|
|
5167
|
+
this.#instance[key2] = value;
|
|
5022
5168
|
},
|
|
5023
5169
|
enumerable: true
|
|
5024
5170
|
});
|
|
@@ -5121,10 +5267,10 @@ if (typeof HTMLElement === "function") {
|
|
|
5121
5267
|
this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp");
|
|
5122
5268
|
}
|
|
5123
5269
|
}
|
|
5124
|
-
for (const
|
|
5125
|
-
if (!(
|
|
5126
|
-
this.$$d[
|
|
5127
|
-
delete this[
|
|
5270
|
+
for (const key2 in this.$$p_d) {
|
|
5271
|
+
if (!(key2 in this.$$d) && this[key2] !== undefined) {
|
|
5272
|
+
this.$$d[key2] = this[key2];
|
|
5273
|
+
delete this[key2];
|
|
5128
5274
|
}
|
|
5129
5275
|
}
|
|
5130
5276
|
this.$$c = createClassComponent({
|
|
@@ -5139,15 +5285,15 @@ if (typeof HTMLElement === "function") {
|
|
|
5139
5285
|
this.$$me = effect_root(() => {
|
|
5140
5286
|
render_effect(() => {
|
|
5141
5287
|
this.$$r = true;
|
|
5142
|
-
for (const
|
|
5143
|
-
if (!this.$$p_d[
|
|
5288
|
+
for (const key2 of object_keys(this.$$c)) {
|
|
5289
|
+
if (!this.$$p_d[key2]?.reflect)
|
|
5144
5290
|
continue;
|
|
5145
|
-
this.$$d[
|
|
5146
|
-
const attribute_value = get_custom_element_value(
|
|
5291
|
+
this.$$d[key2] = this.$$c[key2];
|
|
5292
|
+
const attribute_value = get_custom_element_value(key2, this.$$d[key2], this.$$p_d, "toAttribute");
|
|
5147
5293
|
if (attribute_value == null) {
|
|
5148
|
-
this.removeAttribute(this.$$p_d[
|
|
5294
|
+
this.removeAttribute(this.$$p_d[key2].attribute || key2);
|
|
5149
5295
|
} else {
|
|
5150
|
-
this.setAttribute(this.$$p_d[
|
|
5296
|
+
this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value);
|
|
5151
5297
|
}
|
|
5152
5298
|
}
|
|
5153
5299
|
this.$$r = false;
|
|
@@ -5180,7 +5326,7 @@ if (typeof HTMLElement === "function") {
|
|
|
5180
5326
|
});
|
|
5181
5327
|
}
|
|
5182
5328
|
$$g_p(attribute_name) {
|
|
5183
|
-
return object_keys(this.$$p_d).find((
|
|
5329
|
+
return object_keys(this.$$p_d).find((key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name) || attribute_name;
|
|
5184
5330
|
}
|
|
5185
5331
|
};
|
|
5186
5332
|
}
|
|
@@ -5229,7 +5375,7 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
5229
5375
|
this.$$p_d = props_definition;
|
|
5230
5376
|
}
|
|
5231
5377
|
static get observedAttributes() {
|
|
5232
|
-
return object_keys(props_definition).map((
|
|
5378
|
+
return object_keys(props_definition).map((key2) => (props_definition[key2].attribute || key2).toLowerCase());
|
|
5233
5379
|
}
|
|
5234
5380
|
};
|
|
5235
5381
|
object_keys(props_definition).forEach((prop2) => {
|
|
@@ -5355,6 +5501,11 @@ function isExternalIconUrl(icon) {
|
|
|
5355
5501
|
|
|
5356
5502
|
// dist/components/.ItemToolBar.custom-element.unbundled.js
|
|
5357
5503
|
import { sanitizeSvgIcon } from "@pie-players/pie-players-shared/security";
|
|
5504
|
+
import {
|
|
5505
|
+
approximateZoomFromWidths,
|
|
5506
|
+
computeZoomCompensation,
|
|
5507
|
+
ICON_BUTTON_ZOOM_OPTIONS
|
|
5508
|
+
} from "@pie-players/pie-players-shared/ui/zoom-compensation";
|
|
5358
5509
|
import {
|
|
5359
5510
|
createFocusTrap,
|
|
5360
5511
|
FOCUSABLE_SELECTOR,
|
|
@@ -7843,7 +7994,7 @@ var __pieDefineSafely = (tagName, ctor) => {
|
|
|
7843
7994
|
}
|
|
7844
7995
|
};
|
|
7845
7996
|
var root_1 = from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
7846
|
-
var root_2 = from_html(`<nds-icon-button></nds-icon-button>`, 2);
|
|
7997
|
+
var root_2 = from_html(`<span class="item-toolbar__nds-button-zoom svelte-rnx3ie"><nds-icon-button></nds-icon-button></span>`, 2);
|
|
7847
7998
|
var root_3 = from_html(`<span aria-hidden="true"></span>`);
|
|
7848
7999
|
var root_4 = from_html(`<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>`);
|
|
7849
8000
|
var root_5 = from_html(`<i aria-hidden="true"></i>`);
|
|
@@ -7854,7 +8005,10 @@ var root_9 = from_html(`<div></div>`);
|
|
|
7854
8005
|
var root_10 = from_html(`<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>`);
|
|
7855
8006
|
var $$css = {
|
|
7856
8007
|
hash: "svelte-rnx3ie",
|
|
7857
|
-
code: `.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;
|
|
8008
|
+
code: `.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;
|
|
8009
|
+
/* Cap the gap between toolbar items (e.g. TTS play ↔ calculator) at its
|
|
8010
|
+
200%-zoom size with the same factor the buttons use, so the spacing
|
|
8011
|
+
doesn't keep growing past 200% while the buttons themselves freeze. */gap:calc(0.5rem * var(--pie-toolbar-zoom-comp, 1));min-height:var(--pie-toolbar-tools-row-height);}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,
|
|
7858
8012
|
.item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,
|
|
7859
8013
|
.item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),
|
|
7860
8014
|
.item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),
|
|
@@ -7864,7 +8018,9 @@ var $$css = {
|
|
|
7864
8018
|
custom property so its light-DOM inner button matches the toolbar's
|
|
7865
8019
|
md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph
|
|
7866
8020
|
keeps the NDS-native icon size (we render size="small"), so it isn't
|
|
7867
|
-
oversized.
|
|
8021
|
+
oversized. */
|
|
8022
|
+
/* Freeze the calculator's header open/close button at its 200%-zoom size
|
|
8023
|
+
(factor is 1 at zoom <= 200%). Zoom on this wrapper, not the host. */.item-toolbar__nds-button-zoom.svelte-rnx3ie {display:inline-flex;zoom:var(--pie-toolbar-zoom-comp, 1);}.item-toolbar.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {
|
|
7868
8024
|
/* Host-settable button size per toolbar size (drives the NDS outer button
|
|
7869
8025
|
via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);
|
|
7870
8026
|
/* Host-settable accent for the calculator button: the NDS tertiary glyph
|
|
@@ -7962,7 +8118,24 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
7962
8118
|
let activeToolState = state(proxy({}));
|
|
7963
8119
|
let level = prop($$props, "level", 7, "item"), scopeId = prop($$props, "scopeId", 7, ""), itemId = prop($$props, "itemId", 7, ""), sectionId = prop($$props, "sectionId", 7, ""), catalogId = prop($$props, "catalogId", 7, ""), tools = prop($$props, "tools", 7, "calculator,textToSpeech,answerEliminator"), contentKind = prop($$props, "contentKind", 7, "assessment-item"), position = prop($$props, "position", 7, "bottom"), scopeElement = prop($$props, "scopeElement", 7, null), toolRegistry = prop($$props, "toolRegistry", 7, null), item = prop($$props, "item", 7, null), hostButtons = prop($$props, "hostButtons", 23, () => []), className = prop($$props, "class", 7, ""), size = prop($$props, "size", 7, "md"), language = prop($$props, "language", 7, "en-US");
|
|
7964
8120
|
let toolbarRootElement = state(null);
|
|
8121
|
+
function currentCalculatorZoomCompensation() {
|
|
8122
|
+
if (typeof window === "undefined")
|
|
8123
|
+
return 1;
|
|
8124
|
+
return computeZoomCompensation(approximateZoomFromWidths(window.outerWidth, window.innerWidth), ICON_BUTTON_ZOOM_OPTIONS.maxZoom, ICON_BUTTON_ZOOM_OPTIONS.minCompensation);
|
|
8125
|
+
}
|
|
8126
|
+
let calculatorButtonZoomComp = state(1);
|
|
8127
|
+
user_effect(() => {
|
|
8128
|
+
if (typeof window === "undefined")
|
|
8129
|
+
return;
|
|
8130
|
+
const update2 = () => {
|
|
8131
|
+
set(calculatorButtonZoomComp, currentCalculatorZoomCompensation(), true);
|
|
8132
|
+
};
|
|
8133
|
+
update2();
|
|
8134
|
+
window.addEventListener("resize", update2);
|
|
8135
|
+
return () => window.removeEventListener("resize", update2);
|
|
8136
|
+
});
|
|
7965
8137
|
let runtimeContext = state(null);
|
|
8138
|
+
const useNdsIcons = user_derived(() => get2(runtimeContext)?.ndsIcons === true);
|
|
7966
8139
|
let shellContext = state(null);
|
|
7967
8140
|
let moduleLoadVersion = state(0);
|
|
7968
8141
|
let policyChangeVersion = state(0);
|
|
@@ -8778,6 +8951,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8778
8951
|
shellEl.style.width = `${width}px`;
|
|
8779
8952
|
shellEl.style.height = `${height}px`;
|
|
8780
8953
|
shellEl.style.display = currentArgs.active ? "flex" : "none";
|
|
8954
|
+
shellEl.style.setProperty("--pie-tool-shell-zoom-comp", String(currentCalculatorZoomCompensation()));
|
|
8781
8955
|
};
|
|
8782
8956
|
const mountContent = () => {
|
|
8783
8957
|
if (!contentEl)
|
|
@@ -9094,7 +9268,8 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9094
9268
|
};
|
|
9095
9269
|
if (isBrowser && currentArgs.mounted.entry.shell) {
|
|
9096
9270
|
const isCalculatorShell = currentArgs.mounted.toolId === "calculator";
|
|
9097
|
-
|
|
9271
|
+
const useNdsShellIcons = isCalculatorShell && get2(useNdsIcons);
|
|
9272
|
+
if (useNdsShellIcons)
|
|
9098
9273
|
ensureNdsAssets();
|
|
9099
9274
|
shellEl = document.createElement("div");
|
|
9100
9275
|
shellEl.className = "pie-tool-shell";
|
|
@@ -9153,7 +9328,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9153
9328
|
const appendControl = (label, glyph, iconName, onActivate, faVariant = "fa-regular") => {
|
|
9154
9329
|
if (!controlsEl)
|
|
9155
9330
|
return;
|
|
9156
|
-
controlsEl.appendChild(
|
|
9331
|
+
controlsEl.appendChild(useNdsShellIcons ? createShellIconButton(label, iconName, onActivate, faVariant) : createShellControlButton(label, glyph, onActivate));
|
|
9157
9332
|
};
|
|
9158
9333
|
if (shellConfig?.draggable !== false) {
|
|
9159
9334
|
appendControl("Move tool left", "←", "chevron-left", () => moveBy(-24, 0));
|
|
@@ -9175,12 +9350,13 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9175
9350
|
rightClusterEl.style.display = "inline-flex";
|
|
9176
9351
|
rightClusterEl.style.alignItems = "center";
|
|
9177
9352
|
rightClusterEl.style.gap = "6px";
|
|
9353
|
+
rightClusterEl.style.setProperty("zoom", "var(--pie-tool-shell-zoom-comp, 1)");
|
|
9178
9354
|
rightClusterEl.appendChild(controlsEl);
|
|
9179
9355
|
headerEl.appendChild(rightClusterEl);
|
|
9180
9356
|
} else {
|
|
9181
9357
|
headerEl.appendChild(controlsEl);
|
|
9182
9358
|
}
|
|
9183
|
-
if (
|
|
9359
|
+
if (useNdsShellIcons) {
|
|
9184
9360
|
closeButtonEl = createShellIconButton("Close tool", "xmark", closeShell, "fa-regular");
|
|
9185
9361
|
closeButtonEl.style.display = currentArgs.mounted.entry.shell.closeable === false ? "none" : "inline-block";
|
|
9186
9362
|
} else {
|
|
@@ -9214,7 +9390,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9214
9390
|
closeButton.style.cursor = "pointer";
|
|
9215
9391
|
closeButton.style.display = "inline-flex";
|
|
9216
9392
|
closeButton.style.alignItems = "center";
|
|
9217
|
-
closeButton.style.
|
|
9393
|
+
closeButton.style.justifyItems = "center";
|
|
9218
9394
|
closeButton.style.width = "28px";
|
|
9219
9395
|
closeButton.style.height = "28px";
|
|
9220
9396
|
closeButton.style.padding = "0";
|
|
@@ -9571,12 +9747,17 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9571
9747
|
var node_3 = first_child(fragment_1);
|
|
9572
9748
|
{
|
|
9573
9749
|
var consequent = ($$anchor4) => {
|
|
9574
|
-
var
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9750
|
+
var fragment_2 = comment();
|
|
9751
|
+
var node_4 = first_child(fragment_2);
|
|
9752
|
+
key(node_4, () => get2(useNdsIcons), ($$anchor5) => {
|
|
9753
|
+
var span = root_1();
|
|
9754
|
+
action(span, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
9755
|
+
mounted: get2(mounted),
|
|
9756
|
+
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
9757
|
+
}));
|
|
9758
|
+
append($$anchor5, span);
|
|
9759
|
+
});
|
|
9760
|
+
append($$anchor4, fragment_2);
|
|
9580
9761
|
};
|
|
9581
9762
|
var alternate = ($$anchor4) => {
|
|
9582
9763
|
var span_1 = root_1();
|
|
@@ -9592,14 +9773,15 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9592
9773
|
}
|
|
9593
9774
|
append($$anchor3, fragment_1);
|
|
9594
9775
|
});
|
|
9595
|
-
var
|
|
9596
|
-
each(
|
|
9597
|
-
const faIconName = user_derived(() => isToolbarLinkItem(get2(item2)) ?
|
|
9598
|
-
var
|
|
9599
|
-
var
|
|
9776
|
+
var node_5 = sibling(node_2, 2);
|
|
9777
|
+
each(node_5, 17, () => get2(toolbarItems), (item2) => item2.id, ($$anchor3, item2, $$index_1, $$array) => {
|
|
9778
|
+
const faIconName = user_derived(() => get2(useNdsIcons) && !isToolbarLinkItem(get2(item2)) ? resolveFaIconName(get2(item2)) : null);
|
|
9779
|
+
var fragment_3 = comment();
|
|
9780
|
+
var node_6 = first_child(fragment_3);
|
|
9600
9781
|
{
|
|
9601
9782
|
var consequent_1 = ($$anchor4) => {
|
|
9602
|
-
var
|
|
9783
|
+
var span_2 = root_2();
|
|
9784
|
+
var nds_icon_button = child(span_2);
|
|
9603
9785
|
set_class(nds_icon_button, 1, "item-toolbar__nds-button svelte-rnx3ie");
|
|
9604
9786
|
set_custom_element_data(nds_icon_button, "type", "circle");
|
|
9605
9787
|
set_custom_element_data(nds_icon_button, "size", "small");
|
|
@@ -9610,25 +9792,26 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9610
9792
|
template_effect(() => set_custom_element_data(nds_icon_button, "disabled", get2(item2).disabled));
|
|
9611
9793
|
action(nds_icon_button, ($$node) => ndsIconButtonAction?.($$node));
|
|
9612
9794
|
action(nds_icon_button, ($$node, $$action_arg) => reflectToggleState?.($$node, $$action_arg), () => isToolbarItemActive(get2(item2)));
|
|
9795
|
+
reset(span_2);
|
|
9613
9796
|
delegated("click", nds_icon_button, function(...$$args) {
|
|
9614
9797
|
get2(item2).onClick?.apply(this, $$args);
|
|
9615
9798
|
});
|
|
9616
|
-
append($$anchor4,
|
|
9799
|
+
append($$anchor4, span_2);
|
|
9617
9800
|
};
|
|
9618
9801
|
var consequent_6 = ($$anchor4) => {
|
|
9619
9802
|
var a = root_6();
|
|
9620
9803
|
let classes_1;
|
|
9621
|
-
var
|
|
9804
|
+
var node_7 = child(a);
|
|
9622
9805
|
{
|
|
9623
9806
|
var consequent_5 = ($$anchor5) => {
|
|
9624
|
-
var
|
|
9625
|
-
var
|
|
9807
|
+
var fragment_4 = comment();
|
|
9808
|
+
var node_8 = first_child(fragment_4);
|
|
9626
9809
|
{
|
|
9627
9810
|
var consequent_2 = ($$anchor6) => {
|
|
9628
|
-
var
|
|
9629
|
-
html(
|
|
9630
|
-
reset(
|
|
9631
|
-
append($$anchor6,
|
|
9811
|
+
var span_3 = root_3();
|
|
9812
|
+
html(span_3, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9813
|
+
reset(span_3);
|
|
9814
|
+
append($$anchor6, span_3);
|
|
9632
9815
|
};
|
|
9633
9816
|
var d = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9634
9817
|
var consequent_3 = ($$anchor6) => {
|
|
@@ -9639,30 +9822,30 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9639
9822
|
var d_1 = user_derived(() => isExternalIconUrl(get2(item2).icon));
|
|
9640
9823
|
var alternate_2 = ($$anchor6) => {
|
|
9641
9824
|
const fallbackIcon = user_derived(() => getFallbackIconSvg(get2(item2).icon));
|
|
9642
|
-
var
|
|
9643
|
-
var
|
|
9825
|
+
var fragment_5 = comment();
|
|
9826
|
+
var node_9 = first_child(fragment_5);
|
|
9644
9827
|
{
|
|
9645
9828
|
var consequent_4 = ($$anchor7) => {
|
|
9646
|
-
var
|
|
9647
|
-
html(
|
|
9648
|
-
reset(
|
|
9649
|
-
append($$anchor7,
|
|
9829
|
+
var span_4 = root_3();
|
|
9830
|
+
html(span_4, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9831
|
+
reset(span_4);
|
|
9832
|
+
append($$anchor7, span_4);
|
|
9650
9833
|
};
|
|
9651
9834
|
var alternate_1 = ($$anchor7) => {
|
|
9652
9835
|
var i_1 = root_5();
|
|
9653
9836
|
template_effect(() => set_class(i_1, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
9654
9837
|
append($$anchor7, i_1);
|
|
9655
9838
|
};
|
|
9656
|
-
if_block(
|
|
9839
|
+
if_block(node_9, ($$render) => {
|
|
9657
9840
|
if (get2(fallbackIcon))
|
|
9658
9841
|
$$render(consequent_4);
|
|
9659
9842
|
else
|
|
9660
9843
|
$$render(alternate_1, -1);
|
|
9661
9844
|
});
|
|
9662
9845
|
}
|
|
9663
|
-
append($$anchor6,
|
|
9846
|
+
append($$anchor6, fragment_5);
|
|
9664
9847
|
};
|
|
9665
|
-
if_block(
|
|
9848
|
+
if_block(node_8, ($$render) => {
|
|
9666
9849
|
if (get2(d))
|
|
9667
9850
|
$$render(consequent_2);
|
|
9668
9851
|
else if (get2(d_1))
|
|
@@ -9671,9 +9854,9 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9671
9854
|
$$render(alternate_2, -1);
|
|
9672
9855
|
});
|
|
9673
9856
|
}
|
|
9674
|
-
append($$anchor5,
|
|
9857
|
+
append($$anchor5, fragment_4);
|
|
9675
9858
|
};
|
|
9676
|
-
if_block(
|
|
9859
|
+
if_block(node_7, ($$render) => {
|
|
9677
9860
|
if (get2(item2).icon)
|
|
9678
9861
|
$$render(consequent_5);
|
|
9679
9862
|
});
|
|
@@ -9703,17 +9886,17 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9703
9886
|
var alternate_5 = ($$anchor4) => {
|
|
9704
9887
|
var button_1 = root_7();
|
|
9705
9888
|
let classes_2;
|
|
9706
|
-
var
|
|
9889
|
+
var node_10 = child(button_1);
|
|
9707
9890
|
{
|
|
9708
9891
|
var consequent_10 = ($$anchor5) => {
|
|
9709
|
-
var
|
|
9710
|
-
var
|
|
9892
|
+
var fragment_6 = comment();
|
|
9893
|
+
var node_11 = first_child(fragment_6);
|
|
9711
9894
|
{
|
|
9712
9895
|
var consequent_7 = ($$anchor6) => {
|
|
9713
|
-
var
|
|
9714
|
-
html(
|
|
9715
|
-
reset(
|
|
9716
|
-
append($$anchor6,
|
|
9896
|
+
var span_5 = root_3();
|
|
9897
|
+
html(span_5, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9898
|
+
reset(span_5);
|
|
9899
|
+
append($$anchor6, span_5);
|
|
9717
9900
|
};
|
|
9718
9901
|
var d_3 = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9719
9902
|
var consequent_8 = ($$anchor6) => {
|
|
@@ -9724,30 +9907,30 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9724
9907
|
var d_4 = user_derived(() => isExternalIconUrl(get2(item2).icon));
|
|
9725
9908
|
var alternate_4 = ($$anchor6) => {
|
|
9726
9909
|
const fallbackIcon = user_derived(() => getFallbackIconSvg(get2(item2).icon));
|
|
9727
|
-
var
|
|
9728
|
-
var
|
|
9910
|
+
var fragment_7 = comment();
|
|
9911
|
+
var node_12 = first_child(fragment_7);
|
|
9729
9912
|
{
|
|
9730
9913
|
var consequent_9 = ($$anchor7) => {
|
|
9731
|
-
var
|
|
9732
|
-
html(
|
|
9733
|
-
reset(
|
|
9734
|
-
append($$anchor7,
|
|
9914
|
+
var span_6 = root_3();
|
|
9915
|
+
html(span_6, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9916
|
+
reset(span_6);
|
|
9917
|
+
append($$anchor7, span_6);
|
|
9735
9918
|
};
|
|
9736
9919
|
var alternate_3 = ($$anchor7) => {
|
|
9737
9920
|
var i_2 = root_5();
|
|
9738
9921
|
template_effect(() => set_class(i_2, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
9739
9922
|
append($$anchor7, i_2);
|
|
9740
9923
|
};
|
|
9741
|
-
if_block(
|
|
9924
|
+
if_block(node_12, ($$render) => {
|
|
9742
9925
|
if (get2(fallbackIcon))
|
|
9743
9926
|
$$render(consequent_9);
|
|
9744
9927
|
else
|
|
9745
9928
|
$$render(alternate_3, -1);
|
|
9746
9929
|
});
|
|
9747
9930
|
}
|
|
9748
|
-
append($$anchor6,
|
|
9931
|
+
append($$anchor6, fragment_7);
|
|
9749
9932
|
};
|
|
9750
|
-
if_block(
|
|
9933
|
+
if_block(node_11, ($$render) => {
|
|
9751
9934
|
if (get2(d_3))
|
|
9752
9935
|
$$render(consequent_7);
|
|
9753
9936
|
else if (get2(d_4))
|
|
@@ -9756,9 +9939,9 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9756
9939
|
$$render(alternate_4, -1);
|
|
9757
9940
|
});
|
|
9758
9941
|
}
|
|
9759
|
-
append($$anchor5,
|
|
9942
|
+
append($$anchor5, fragment_6);
|
|
9760
9943
|
};
|
|
9761
|
-
if_block(
|
|
9944
|
+
if_block(node_10, ($$render) => {
|
|
9762
9945
|
if (get2(item2).icon)
|
|
9763
9946
|
$$render(consequent_10);
|
|
9764
9947
|
});
|
|
@@ -9781,7 +9964,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9781
9964
|
});
|
|
9782
9965
|
append($$anchor4, button_1);
|
|
9783
9966
|
};
|
|
9784
|
-
if_block(
|
|
9967
|
+
if_block(node_6, ($$render) => {
|
|
9785
9968
|
if (get2(faIconName))
|
|
9786
9969
|
$$render(consequent_1);
|
|
9787
9970
|
else if (get2(d_2))
|
|
@@ -9790,66 +9973,76 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9790
9973
|
$$render(alternate_5, -1);
|
|
9791
9974
|
});
|
|
9792
9975
|
}
|
|
9793
|
-
append($$anchor3,
|
|
9976
|
+
append($$anchor3, fragment_3);
|
|
9794
9977
|
});
|
|
9795
|
-
var
|
|
9796
|
-
each(
|
|
9797
|
-
var
|
|
9798
|
-
var
|
|
9978
|
+
var node_13 = sibling(node_5, 2);
|
|
9979
|
+
each(node_13, 17, () => get2(mountedElementsAfterButtons), (mounted) => mounted.key, ($$anchor3, mounted) => {
|
|
9980
|
+
var fragment_8 = comment();
|
|
9981
|
+
var node_14 = first_child(fragment_8);
|
|
9799
9982
|
{
|
|
9800
9983
|
var consequent_11 = ($$anchor4) => {
|
|
9801
|
-
var
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9984
|
+
var fragment_9 = comment();
|
|
9985
|
+
var node_15 = first_child(fragment_9);
|
|
9986
|
+
key(node_15, () => get2(useNdsIcons), ($$anchor5) => {
|
|
9987
|
+
var span_7 = root_1();
|
|
9988
|
+
action(span_7, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
9989
|
+
mounted: get2(mounted),
|
|
9990
|
+
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
9991
|
+
}));
|
|
9992
|
+
append($$anchor5, span_7);
|
|
9993
|
+
});
|
|
9994
|
+
append($$anchor4, fragment_9);
|
|
9807
9995
|
};
|
|
9808
9996
|
var alternate_6 = ($$anchor4) => {
|
|
9809
|
-
var
|
|
9810
|
-
action(
|
|
9811
|
-
append($$anchor4,
|
|
9997
|
+
var span_8 = root_1();
|
|
9998
|
+
action(span_8, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
9999
|
+
append($$anchor4, span_8);
|
|
9812
10000
|
};
|
|
9813
|
-
if_block(
|
|
10001
|
+
if_block(node_14, ($$render) => {
|
|
9814
10002
|
if (get2(mounted).entry.shell)
|
|
9815
10003
|
$$render(consequent_11);
|
|
9816
10004
|
else
|
|
9817
10005
|
$$render(alternate_6, -1);
|
|
9818
10006
|
});
|
|
9819
10007
|
}
|
|
9820
|
-
append($$anchor3,
|
|
10008
|
+
append($$anchor3, fragment_8);
|
|
9821
10009
|
});
|
|
9822
10010
|
reset(div_1);
|
|
9823
|
-
var
|
|
10011
|
+
var node_16 = sibling(div_1, 2);
|
|
9824
10012
|
{
|
|
9825
10013
|
var consequent_13 = ($$anchor3) => {
|
|
9826
10014
|
var div_2 = root_9();
|
|
9827
10015
|
let classes_3;
|
|
9828
10016
|
each(div_2, 21, () => get2(mountedElementsControlsRow), (mounted) => mounted.key, ($$anchor4, mounted) => {
|
|
9829
|
-
var
|
|
9830
|
-
var
|
|
10017
|
+
var fragment_10 = comment();
|
|
10018
|
+
var node_17 = first_child(fragment_10);
|
|
9831
10019
|
{
|
|
9832
10020
|
var consequent_12 = ($$anchor5) => {
|
|
9833
|
-
var
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
10021
|
+
var fragment_11 = comment();
|
|
10022
|
+
var node_18 = first_child(fragment_11);
|
|
10023
|
+
key(node_18, () => get2(useNdsIcons), ($$anchor6) => {
|
|
10024
|
+
var span_9 = root_8();
|
|
10025
|
+
action(span_9, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
10026
|
+
mounted: get2(mounted),
|
|
10027
|
+
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
10028
|
+
}));
|
|
10029
|
+
append($$anchor6, span_9);
|
|
10030
|
+
});
|
|
10031
|
+
append($$anchor5, fragment_11);
|
|
9839
10032
|
};
|
|
9840
10033
|
var alternate_7 = ($$anchor5) => {
|
|
9841
|
-
var
|
|
9842
|
-
action(
|
|
9843
|
-
append($$anchor5,
|
|
10034
|
+
var span_10 = root_8();
|
|
10035
|
+
action(span_10, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
10036
|
+
append($$anchor5, span_10);
|
|
9844
10037
|
};
|
|
9845
|
-
if_block(
|
|
10038
|
+
if_block(node_17, ($$render) => {
|
|
9846
10039
|
if (get2(mounted).entry.shell)
|
|
9847
10040
|
$$render(consequent_12);
|
|
9848
10041
|
else
|
|
9849
10042
|
$$render(alternate_7, -1);
|
|
9850
10043
|
});
|
|
9851
10044
|
}
|
|
9852
|
-
append($$anchor4,
|
|
10045
|
+
append($$anchor4, fragment_10);
|
|
9853
10046
|
});
|
|
9854
10047
|
reset(div_2);
|
|
9855
10048
|
template_effect(() => classes_3 = set_class(div_2, 1, "item-toolbar__controls-row svelte-rnx3ie", null, classes_3, {
|
|
@@ -9859,7 +10052,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9859
10052
|
}));
|
|
9860
10053
|
append($$anchor3, div_2);
|
|
9861
10054
|
};
|
|
9862
|
-
if_block(
|
|
10055
|
+
if_block(node_16, ($$render) => {
|
|
9863
10056
|
if (get2(shouldRenderControlsRow))
|
|
9864
10057
|
$$render(consequent_13);
|
|
9865
10058
|
});
|
|
@@ -9876,6 +10069,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9876
10069
|
});
|
|
9877
10070
|
set_attribute2(div, "data-content-kind", get2(effectiveContentKind));
|
|
9878
10071
|
set_attribute2(div, "data-level", get2(effectiveLevel));
|
|
10072
|
+
set_style(div, `--pie-toolbar-zoom-comp: ${get2(calculatorButtonZoomComp)};`);
|
|
9879
10073
|
});
|
|
9880
10074
|
append($$anchor2, div);
|
|
9881
10075
|
};
|