@netless/fastboard-ui 1.0.0-canary.6 → 1.0.0-canary.8

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import Tippy from 'tippy.js';
2
2
 
3
- // ../../node_modules/.pnpm/svelte@3.49.0/node_modules/svelte/internal/index.mjs
3
+ // ../../node_modules/.pnpm/svelte@3.53.0/node_modules/svelte/internal/index.mjs
4
4
  function noop() {
5
5
  }
6
6
  function assign(tar, src) {
@@ -106,7 +106,9 @@ function insert(target, node, anchor) {
106
106
  target.insertBefore(node, anchor || null);
107
107
  }
108
108
  function detach(node) {
109
- node.parentNode.removeChild(node);
109
+ if (node.parentNode) {
110
+ node.parentNode.removeChild(node);
111
+ }
110
112
  }
111
113
  function destroy_each(iterations, detaching) {
112
114
  for (let i = 0; i < iterations.length; i += 1) {
@@ -168,6 +170,9 @@ function custom_event(type, detail, { bubbles = false, cancelable = false } = {}
168
170
  e.initCustomEvent(type, bubbles, cancelable, detail);
169
171
  return e;
170
172
  }
173
+ function construct_svelte_component(component, props) {
174
+ return new component(props);
175
+ }
171
176
  var current_component;
172
177
  function set_current_component(component) {
173
178
  current_component = component;
@@ -411,13 +416,13 @@ function create_component(block) {
411
416
  block && block.c();
412
417
  }
413
418
  function mount_component(component, target, anchor, customElement) {
414
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
419
+ const { fragment, after_update } = component.$$;
415
420
  fragment && fragment.m(target, anchor);
416
421
  if (!customElement) {
417
422
  add_render_callback(() => {
418
- const new_on_destroy = on_mount.map(run).filter(is_function);
419
- if (on_destroy) {
420
- on_destroy.push(...new_on_destroy);
423
+ const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
424
+ if (component.$$.on_destroy) {
425
+ component.$$.on_destroy.push(...new_on_destroy);
421
426
  } else {
422
427
  run_all(new_on_destroy);
423
428
  }
@@ -448,7 +453,7 @@ function init(component, options, instance62, create_fragment62, not_equal2, pro
448
453
  set_current_component(component);
449
454
  const $$ = component.$$ = {
450
455
  fragment: null,
451
- ctx: null,
456
+ ctx: [],
452
457
  props,
453
458
  update: noop,
454
459
  not_equal: not_equal2,
@@ -501,6 +506,9 @@ var SvelteComponent = class {
501
506
  this.$destroy = noop;
502
507
  }
503
508
  $on(type, callback) {
509
+ if (!is_function(callback)) {
510
+ return noop;
511
+ }
504
512
  const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
505
513
  callbacks.push(callback);
506
514
  return () => {
@@ -3595,15 +3603,16 @@ function create_else_block_1(ctx) {
3595
3603
  let current;
3596
3604
  let mounted;
3597
3605
  let dispose;
3598
- const default_slot_template = ctx[9].default;
3599
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3606
+ const default_slot_template = ctx[10].default;
3607
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3600
3608
  return {
3601
3609
  c() {
3602
3610
  button = element("button");
3603
3611
  if (default_slot)
3604
3612
  default_slot.c();
3605
3613
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3606
- button.disabled = ctx[3];
3614
+ button.disabled = ctx[4];
3615
+ toggle_class(button, "is-active", ctx[3]);
3607
3616
  },
3608
3617
  m(target, anchor) {
3609
3618
  insert(target, button, anchor);
@@ -3612,19 +3621,19 @@ function create_else_block_1(ctx) {
3612
3621
  }
3613
3622
  current = true;
3614
3623
  if (!mounted) {
3615
- dispose = listen(button, "click", ctx[12]);
3624
+ dispose = listen(button, "click", ctx[13]);
3616
3625
  mounted = true;
3617
3626
  }
3618
3627
  },
3619
3628
  p(ctx2, dirty) {
3620
3629
  if (default_slot) {
3621
- if (default_slot.p && (!current || dirty & 256)) {
3630
+ if (default_slot.p && (!current || dirty & 512)) {
3622
3631
  update_slot_base(
3623
3632
  default_slot,
3624
3633
  default_slot_template,
3625
3634
  ctx2,
3626
- ctx2[8],
3627
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3635
+ ctx2[9],
3636
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3628
3637
  null
3629
3638
  );
3630
3639
  }
@@ -3632,8 +3641,11 @@ function create_else_block_1(ctx) {
3632
3641
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3633
3642
  attr(button, "class", button_class_value);
3634
3643
  }
3635
- if (!current || dirty & 8) {
3636
- button.disabled = ctx2[3];
3644
+ if (!current || dirty & 16) {
3645
+ button.disabled = ctx2[4];
3646
+ }
3647
+ if (!current || dirty & 15) {
3648
+ toggle_class(button, "is-active", ctx2[3]);
3637
3649
  }
3638
3650
  },
3639
3651
  i(local) {
@@ -3664,7 +3676,7 @@ function create_if_block2(ctx) {
3664
3676
  const if_block_creators = [create_if_block_1, create_else_block2];
3665
3677
  const if_blocks = [];
3666
3678
  function select_block_type_1(ctx2, dirty) {
3667
- if (ctx2[6])
3679
+ if (ctx2[7])
3668
3680
  return 0;
3669
3681
  return 1;
3670
3682
  }
@@ -3726,15 +3738,16 @@ function create_else_block2(ctx) {
3726
3738
  let current;
3727
3739
  let mounted;
3728
3740
  let dispose;
3729
- const default_slot_template = ctx[9].default;
3730
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3741
+ const default_slot_template = ctx[10].default;
3742
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3731
3743
  return {
3732
3744
  c() {
3733
3745
  button = element("button");
3734
3746
  if (default_slot)
3735
3747
  default_slot.c();
3736
3748
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3737
- button.disabled = ctx[3];
3749
+ button.disabled = ctx[4];
3750
+ toggle_class(button, "is-active", ctx[3]);
3738
3751
  },
3739
3752
  m(target, anchor) {
3740
3753
  insert(target, button, anchor);
@@ -3744,10 +3757,10 @@ function create_else_block2(ctx) {
3744
3757
  current = true;
3745
3758
  if (!mounted) {
3746
3759
  dispose = [
3747
- listen(button, "click", ctx[11]),
3760
+ listen(button, "click", ctx[12]),
3748
3761
  action_destroyer(tippy_action = tippy.call(null, button, {
3749
- content: ctx[4],
3750
- placement: ctx[5],
3762
+ content: ctx[5],
3763
+ placement: ctx[6],
3751
3764
  className: ctx[0]
3752
3765
  }))
3753
3766
  ];
@@ -3756,13 +3769,13 @@ function create_else_block2(ctx) {
3756
3769
  },
3757
3770
  p(ctx2, dirty) {
3758
3771
  if (default_slot) {
3759
- if (default_slot.p && (!current || dirty & 256)) {
3772
+ if (default_slot.p && (!current || dirty & 512)) {
3760
3773
  update_slot_base(
3761
3774
  default_slot,
3762
3775
  default_slot_template,
3763
3776
  ctx2,
3764
- ctx2[8],
3765
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3777
+ ctx2[9],
3778
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3766
3779
  null
3767
3780
  );
3768
3781
  }
@@ -3770,15 +3783,18 @@ function create_else_block2(ctx) {
3770
3783
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3771
3784
  attr(button, "class", button_class_value);
3772
3785
  }
3773
- if (!current || dirty & 8) {
3774
- button.disabled = ctx2[3];
3786
+ if (!current || dirty & 16) {
3787
+ button.disabled = ctx2[4];
3775
3788
  }
3776
- if (tippy_action && is_function(tippy_action.update) && dirty & 49)
3789
+ if (tippy_action && is_function(tippy_action.update) && dirty & 97)
3777
3790
  tippy_action.update.call(null, {
3778
- content: ctx2[4],
3779
- placement: ctx2[5],
3791
+ content: ctx2[5],
3792
+ placement: ctx2[6],
3780
3793
  className: ctx2[0]
3781
3794
  });
3795
+ if (!current || dirty & 15) {
3796
+ toggle_class(button, "is-active", ctx2[3]);
3797
+ }
3782
3798
  },
3783
3799
  i(local) {
3784
3800
  if (current)
@@ -3813,8 +3829,8 @@ function create_if_block_1(ctx) {
3813
3829
  let current;
3814
3830
  let mounted;
3815
3831
  let dispose;
3816
- const default_slot_template = ctx[9].default;
3817
- const default_slot = create_slot(default_slot_template, ctx, ctx[8], null);
3832
+ const default_slot_template = ctx[10].default;
3833
+ const default_slot = create_slot(default_slot_template, ctx, ctx[9], null);
3818
3834
  return {
3819
3835
  c() {
3820
3836
  span1 = element("span");
@@ -3824,7 +3840,8 @@ function create_if_block_1(ctx) {
3824
3840
  t = space();
3825
3841
  span0 = element("span");
3826
3842
  attr(button, "class", button_class_value = ctx[1] + "-btn " + ctx[0] + " " + ctx[2]);
3827
- button.disabled = ctx[3];
3843
+ button.disabled = ctx[4];
3844
+ toggle_class(button, "is-active", ctx[3]);
3828
3845
  attr(span0, "class", span0_class_value = ctx[1] + "-triangle");
3829
3846
  attr(span1, "class", span1_class_value = ctx[1] + "-btn-interactive " + ctx[2]);
3830
3847
  },
@@ -3839,18 +3856,18 @@ function create_if_block_1(ctx) {
3839
3856
  current = true;
3840
3857
  if (!mounted) {
3841
3858
  dispose = [
3842
- listen(button, "click", ctx[10]),
3859
+ listen(button, "click", ctx[11]),
3843
3860
  action_destroyer(tippy_action = tippy.call(null, button, {
3844
- content: ctx[6],
3861
+ content: ctx[7],
3845
3862
  ...tippy_menu,
3846
- placement: ctx[7],
3863
+ placement: ctx[8],
3847
3864
  appendTo: document.body,
3848
3865
  theme: ctx[2],
3849
3866
  className: "fastboard-panel"
3850
3867
  })),
3851
3868
  action_destroyer(tippy_action_1 = tippy.call(null, span1, {
3852
- content: ctx[4],
3853
- placement: ctx[5],
3869
+ content: ctx[5],
3870
+ placement: ctx[6],
3854
3871
  className: ctx[0]
3855
3872
  }))
3856
3873
  ];
@@ -3859,13 +3876,13 @@ function create_if_block_1(ctx) {
3859
3876
  },
3860
3877
  p(ctx2, dirty) {
3861
3878
  if (default_slot) {
3862
- if (default_slot.p && (!current || dirty & 256)) {
3879
+ if (default_slot.p && (!current || dirty & 512)) {
3863
3880
  update_slot_base(
3864
3881
  default_slot,
3865
3882
  default_slot_template,
3866
3883
  ctx2,
3867
- ctx2[8],
3868
- !current ? get_all_dirty_from_scope(ctx2[8]) : get_slot_changes(default_slot_template, ctx2[8], dirty, null),
3884
+ ctx2[9],
3885
+ !current ? get_all_dirty_from_scope(ctx2[9]) : get_slot_changes(default_slot_template, ctx2[9], dirty, null),
3869
3886
  null
3870
3887
  );
3871
3888
  }
@@ -3873,28 +3890,31 @@ function create_if_block_1(ctx) {
3873
3890
  if (!current || dirty & 7 && button_class_value !== (button_class_value = ctx2[1] + "-btn " + ctx2[0] + " " + ctx2[2])) {
3874
3891
  attr(button, "class", button_class_value);
3875
3892
  }
3876
- if (!current || dirty & 8) {
3877
- button.disabled = ctx2[3];
3893
+ if (!current || dirty & 16) {
3894
+ button.disabled = ctx2[4];
3878
3895
  }
3879
- if (tippy_action && is_function(tippy_action.update) && dirty & 196)
3896
+ if (tippy_action && is_function(tippy_action.update) && dirty & 388)
3880
3897
  tippy_action.update.call(null, {
3881
- content: ctx2[6],
3898
+ content: ctx2[7],
3882
3899
  ...tippy_menu,
3883
- placement: ctx2[7],
3900
+ placement: ctx2[8],
3884
3901
  appendTo: document.body,
3885
3902
  theme: ctx2[2],
3886
3903
  className: "fastboard-panel"
3887
3904
  });
3905
+ if (!current || dirty & 15) {
3906
+ toggle_class(button, "is-active", ctx2[3]);
3907
+ }
3888
3908
  if (!current || dirty & 2 && span0_class_value !== (span0_class_value = ctx2[1] + "-triangle")) {
3889
3909
  attr(span0, "class", span0_class_value);
3890
3910
  }
3891
3911
  if (!current || dirty & 6 && span1_class_value !== (span1_class_value = ctx2[1] + "-btn-interactive " + ctx2[2])) {
3892
3912
  attr(span1, "class", span1_class_value);
3893
3913
  }
3894
- if (tippy_action_1 && is_function(tippy_action_1.update) && dirty & 49)
3914
+ if (tippy_action_1 && is_function(tippy_action_1.update) && dirty & 97)
3895
3915
  tippy_action_1.update.call(null, {
3896
- content: ctx2[4],
3897
- placement: ctx2[5],
3916
+ content: ctx2[5],
3917
+ placement: ctx2[6],
3898
3918
  className: ctx2[0]
3899
3919
  });
3900
3920
  },
@@ -3926,7 +3946,7 @@ function create_fragment47(ctx) {
3926
3946
  const if_block_creators = [create_if_block2, create_else_block_1];
3927
3947
  const if_blocks = [];
3928
3948
  function select_block_type(ctx2, dirty) {
3929
- if (ctx2[4])
3949
+ if (ctx2[5])
3930
3950
  return 0;
3931
3951
  return 1;
3932
3952
  }
@@ -3986,6 +4006,7 @@ function instance47($$self, $$props, $$invalidate) {
3986
4006
  let { class: className = "" } = $$props;
3987
4007
  let { name: name10 = "fastboard-ui" } = $$props;
3988
4008
  let { theme = "light" } = $$props;
4009
+ let { active = false } = $$props;
3989
4010
  let { disabled = false } = $$props;
3990
4011
  let { content = "" } = $$props;
3991
4012
  let { placement = "top" } = $$props;
@@ -4007,23 +4028,26 @@ function instance47($$self, $$props, $$invalidate) {
4007
4028
  $$invalidate(1, name10 = $$props2.name);
4008
4029
  if ("theme" in $$props2)
4009
4030
  $$invalidate(2, theme = $$props2.theme);
4031
+ if ("active" in $$props2)
4032
+ $$invalidate(3, active = $$props2.active);
4010
4033
  if ("disabled" in $$props2)
4011
- $$invalidate(3, disabled = $$props2.disabled);
4034
+ $$invalidate(4, disabled = $$props2.disabled);
4012
4035
  if ("content" in $$props2)
4013
- $$invalidate(4, content = $$props2.content);
4036
+ $$invalidate(5, content = $$props2.content);
4014
4037
  if ("placement" in $$props2)
4015
- $$invalidate(5, placement = $$props2.placement);
4038
+ $$invalidate(6, placement = $$props2.placement);
4016
4039
  if ("menu" in $$props2)
4017
- $$invalidate(6, menu = $$props2.menu);
4040
+ $$invalidate(7, menu = $$props2.menu);
4018
4041
  if ("menu_placement" in $$props2)
4019
- $$invalidate(7, menu_placement = $$props2.menu_placement);
4042
+ $$invalidate(8, menu_placement = $$props2.menu_placement);
4020
4043
  if ("$$scope" in $$props2)
4021
- $$invalidate(8, $$scope = $$props2.$$scope);
4044
+ $$invalidate(9, $$scope = $$props2.$$scope);
4022
4045
  };
4023
4046
  return [
4024
4047
  className,
4025
4048
  name10,
4026
4049
  theme,
4050
+ active,
4027
4051
  disabled,
4028
4052
  content,
4029
4053
  placement,
@@ -4043,11 +4067,12 @@ var Button = class extends SvelteComponent {
4043
4067
  class: 0,
4044
4068
  name: 1,
4045
4069
  theme: 2,
4046
- disabled: 3,
4047
- content: 4,
4048
- placement: 5,
4049
- menu: 6,
4050
- menu_placement: 7
4070
+ active: 3,
4071
+ disabled: 4,
4072
+ content: 5,
4073
+ placement: 6,
4074
+ menu: 7,
4075
+ menu_placement: 8
4051
4076
  });
4052
4077
  }
4053
4078
  };
@@ -5477,7 +5502,7 @@ function instance50($$self, $$props, $$invalidate) {
5477
5502
  $$invalidate(4, type = disabled ? "disable" : "normal");
5478
5503
  }
5479
5504
  if ($$self.$$.dirty & 16384) {
5480
- $$subscribe_camera($$invalidate(8, camera = app?.baseCamera));
5505
+ $$subscribe_camera($$invalidate(8, camera = app?.camera));
5481
5506
  }
5482
5507
  if ($$self.$$.dirty & 8) {
5483
5508
  $$invalidate(16, scale = $camera?.scale ?? 1);
@@ -5526,7 +5551,7 @@ var ZoomControl = class extends SvelteComponent {
5526
5551
  };
5527
5552
  var ZoomControl_default = ZoomControl;
5528
5553
 
5529
- // ../../node_modules/.pnpm/svelte@3.49.0/node_modules/svelte/store/index.mjs
5554
+ // ../../node_modules/.pnpm/svelte@3.53.0/node_modules/svelte/store/index.mjs
5530
5555
  var subscriber_queue = [];
5531
5556
  function writable(value, start = noop) {
5532
5557
  let stop;
@@ -6045,7 +6070,7 @@ function create_each_block(key_1, ctx) {
6045
6070
  span = element("span");
6046
6071
  t = space();
6047
6072
  attr(span, "class", "fastboard-toolbar-color-item");
6048
- set_style(span, "background-color", ctx[7], false);
6073
+ set_style(span, "background-color", ctx[7]);
6049
6074
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + ctx[0]);
6050
6075
  attr(button, "data-color-key", ctx[7]);
6051
6076
  button.disabled = ctx[1];
@@ -6296,7 +6321,7 @@ function create_each_block2(key_1, ctx) {
6296
6321
  span = element("span");
6297
6322
  t = space();
6298
6323
  attr(span, "class", "fastboard-toolbar-color-item");
6299
- set_style(span, "background-color", ctx[7], false);
6324
+ set_style(span, "background-color", ctx[7]);
6300
6325
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + ctx[0]);
6301
6326
  attr(button, "data-color-key", ctx[7]);
6302
6327
  button.disabled = ctx[1];
@@ -6443,7 +6468,7 @@ function create_else_block5(ctx) {
6443
6468
  return { props: { theme: ctx2[0] } };
6444
6469
  }
6445
6470
  if (switch_value) {
6446
- switch_instance = new switch_value(switch_props(ctx));
6471
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
6447
6472
  }
6448
6473
  return {
6449
6474
  c() {
@@ -6452,9 +6477,8 @@ function create_else_block5(ctx) {
6452
6477
  switch_instance_anchor = empty();
6453
6478
  },
6454
6479
  m(target, anchor) {
6455
- if (switch_instance) {
6480
+ if (switch_instance)
6456
6481
  mount_component(switch_instance, target, anchor);
6457
- }
6458
6482
  insert(target, switch_instance_anchor, anchor);
6459
6483
  current = true;
6460
6484
  },
@@ -6472,7 +6496,7 @@ function create_else_block5(ctx) {
6472
6496
  check_outros();
6473
6497
  }
6474
6498
  if (switch_value) {
6475
- switch_instance = new switch_value(switch_props(ctx2));
6499
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
6476
6500
  create_component(switch_instance.$$.fragment);
6477
6501
  transition_in(switch_instance.$$.fragment, 1);
6478
6502
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -6514,7 +6538,7 @@ function create_if_block5(ctx) {
6514
6538
  };
6515
6539
  }
6516
6540
  if (switch_value) {
6517
- switch_instance = new switch_value(switch_props(ctx));
6541
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
6518
6542
  }
6519
6543
  return {
6520
6544
  c() {
@@ -6523,9 +6547,8 @@ function create_if_block5(ctx) {
6523
6547
  switch_instance_anchor = empty();
6524
6548
  },
6525
6549
  m(target, anchor) {
6526
- if (switch_instance) {
6550
+ if (switch_instance)
6527
6551
  mount_component(switch_instance, target, anchor);
6528
- }
6529
6552
  insert(target, switch_instance_anchor, anchor);
6530
6553
  current = true;
6531
6554
  },
@@ -6543,7 +6566,7 @@ function create_if_block5(ctx) {
6543
6566
  check_outros();
6544
6567
  }
6545
6568
  if (switch_value) {
6546
- switch_instance = new switch_value(switch_props(ctx2));
6569
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
6547
6570
  create_component(switch_instance.$$.fragment);
6548
6571
  transition_in(switch_instance.$$.fragment, 1);
6549
6572
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -6652,7 +6675,7 @@ function create_each_block3(key_1, ctx) {
6652
6675
  content: tooltip(ctx[6][ctx[12]], ctx[2][ctx[12]]),
6653
6676
  placement: "top"
6654
6677
  });
6655
- if (dirty & 25) {
6678
+ if (!current || dirty & 25) {
6656
6679
  toggle_class(button, "is-active", ctx[13]);
6657
6680
  }
6658
6681
  },
@@ -7483,7 +7506,7 @@ function create_else_block_6(ctx) {
7483
7506
  return { props: { theme: ctx2[1] } };
7484
7507
  }
7485
7508
  if (switch_value) {
7486
- switch_instance = new switch_value(switch_props(ctx));
7509
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7487
7510
  }
7488
7511
  return {
7489
7512
  c() {
@@ -7492,9 +7515,8 @@ function create_else_block_6(ctx) {
7492
7515
  switch_instance_anchor = empty();
7493
7516
  },
7494
7517
  m(target, anchor) {
7495
- if (switch_instance) {
7518
+ if (switch_instance)
7496
7519
  mount_component(switch_instance, target, anchor);
7497
- }
7498
7520
  insert(target, switch_instance_anchor, anchor);
7499
7521
  current = true;
7500
7522
  },
@@ -7512,7 +7534,7 @@ function create_else_block_6(ctx) {
7512
7534
  check_outros();
7513
7535
  }
7514
7536
  if (switch_value) {
7515
- switch_instance = new switch_value(switch_props(ctx2));
7537
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7516
7538
  create_component(switch_instance.$$.fragment);
7517
7539
  transition_in(switch_instance.$$.fragment, 1);
7518
7540
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7554,7 +7576,7 @@ function create_if_block_12(ctx) {
7554
7576
  };
7555
7577
  }
7556
7578
  if (switch_value) {
7557
- switch_instance = new switch_value(switch_props(ctx));
7579
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7558
7580
  }
7559
7581
  return {
7560
7582
  c() {
@@ -7563,9 +7585,8 @@ function create_if_block_12(ctx) {
7563
7585
  switch_instance_anchor = empty();
7564
7586
  },
7565
7587
  m(target, anchor) {
7566
- if (switch_instance) {
7588
+ if (switch_instance)
7567
7589
  mount_component(switch_instance, target, anchor);
7568
- }
7569
7590
  insert(target, switch_instance_anchor, anchor);
7570
7591
  current = true;
7571
7592
  },
@@ -7583,7 +7604,7 @@ function create_if_block_12(ctx) {
7583
7604
  check_outros();
7584
7605
  }
7585
7606
  if (switch_value) {
7586
- switch_instance = new switch_value(switch_props(ctx2));
7607
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7587
7608
  create_component(switch_instance.$$.fragment);
7588
7609
  transition_in(switch_instance.$$.fragment, 1);
7589
7610
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7682,6 +7703,9 @@ function create_else_block_4(ctx) {
7682
7703
  let current;
7683
7704
  const button_spread_levels = [
7684
7705
  { class: "eraser" },
7706
+ {
7707
+ active: ctx[8] === ctx[12]
7708
+ },
7685
7709
  ctx[18],
7686
7710
  {
7687
7711
  content: ctx[10][ctx[12]]
@@ -7706,8 +7730,11 @@ function create_else_block_4(ctx) {
7706
7730
  current = true;
7707
7731
  },
7708
7732
  p(ctx2, dirty) {
7709
- const button_changes = dirty[0] & 332800 ? get_spread_update(button_spread_levels, [
7733
+ const button_changes = dirty[0] & 333056 ? get_spread_update(button_spread_levels, [
7710
7734
  button_spread_levels[0],
7735
+ dirty[0] & 4352 && {
7736
+ active: ctx2[8] === ctx2[12]
7737
+ },
7711
7738
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7712
7739
  dirty[0] & 5120 && {
7713
7740
  content: ctx2[10][ctx2[12]]
@@ -7739,6 +7766,9 @@ function create_if_block_9(ctx) {
7739
7766
  let current;
7740
7767
  const button_spread_levels = [
7741
7768
  { class: "eraser" },
7769
+ {
7770
+ active: ctx[8] === "pencilEraser"
7771
+ },
7742
7772
  ctx[18],
7743
7773
  { content: ctx[21].pencilEraser },
7744
7774
  { menu: ctx[16] }
@@ -7761,8 +7791,11 @@ function create_if_block_9(ctx) {
7761
7791
  current = true;
7762
7792
  },
7763
7793
  p(ctx2, dirty) {
7764
- const button_changes = dirty[0] & 2424832 ? get_spread_update(button_spread_levels, [
7794
+ const button_changes = dirty[0] & 2425088 ? get_spread_update(button_spread_levels, [
7765
7795
  button_spread_levels[0],
7796
+ dirty[0] & 256 && {
7797
+ active: ctx2[8] === "pencilEraser"
7798
+ },
7766
7799
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7767
7800
  dirty[0] & 2097152 && { content: ctx2[21].pencilEraser },
7768
7801
  dirty[0] & 65536 && { menu: ctx2[16] }
@@ -7790,7 +7823,14 @@ function create_if_block_9(ctx) {
7790
7823
  function create_if_block_7(ctx) {
7791
7824
  let button;
7792
7825
  let current;
7793
- const button_spread_levels = [{ class: "eraser" }, ctx[18], { content: ctx[21].eraser }];
7826
+ const button_spread_levels = [
7827
+ { class: "eraser" },
7828
+ {
7829
+ active: ctx[8] === "eraser"
7830
+ },
7831
+ ctx[18],
7832
+ { content: ctx[21].eraser }
7833
+ ];
7794
7834
  let button_props = {
7795
7835
  $$slots: { default: [create_default_slot_53] },
7796
7836
  $$scope: { ctx }
@@ -7809,8 +7849,11 @@ function create_if_block_7(ctx) {
7809
7849
  current = true;
7810
7850
  },
7811
7851
  p(ctx2, dirty) {
7812
- const button_changes = dirty[0] & 2359296 ? get_spread_update(button_spread_levels, [
7852
+ const button_changes = dirty[0] & 2359552 ? get_spread_update(button_spread_levels, [
7813
7853
  button_spread_levels[0],
7854
+ dirty[0] & 256 && {
7855
+ active: ctx2[8] === "eraser"
7856
+ },
7814
7857
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
7815
7858
  dirty[0] & 2097152 && { content: ctx2[21].eraser }
7816
7859
  ]) : {};
@@ -7843,7 +7886,7 @@ function create_else_block_5(ctx) {
7843
7886
  return { props: { theme: ctx2[1] } };
7844
7887
  }
7845
7888
  if (switch_value) {
7846
- switch_instance = new switch_value(switch_props(ctx));
7889
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7847
7890
  }
7848
7891
  return {
7849
7892
  c() {
@@ -7852,9 +7895,8 @@ function create_else_block_5(ctx) {
7852
7895
  switch_instance_anchor = empty();
7853
7896
  },
7854
7897
  m(target, anchor) {
7855
- if (switch_instance) {
7898
+ if (switch_instance)
7856
7899
  mount_component(switch_instance, target, anchor);
7857
- }
7858
7900
  insert(target, switch_instance_anchor, anchor);
7859
7901
  current = true;
7860
7902
  },
@@ -7872,7 +7914,7 @@ function create_else_block_5(ctx) {
7872
7914
  check_outros();
7873
7915
  }
7874
7916
  if (switch_value) {
7875
- switch_instance = new switch_value(switch_props(ctx2));
7917
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7876
7918
  create_component(switch_instance.$$.fragment);
7877
7919
  transition_in(switch_instance.$$.fragment, 1);
7878
7920
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -7914,7 +7956,7 @@ function create_if_block_11(ctx) {
7914
7956
  };
7915
7957
  }
7916
7958
  if (switch_value) {
7917
- switch_instance = new switch_value(switch_props(ctx));
7959
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
7918
7960
  }
7919
7961
  return {
7920
7962
  c() {
@@ -7923,9 +7965,8 @@ function create_if_block_11(ctx) {
7923
7965
  switch_instance_anchor = empty();
7924
7966
  },
7925
7967
  m(target, anchor) {
7926
- if (switch_instance) {
7968
+ if (switch_instance)
7927
7969
  mount_component(switch_instance, target, anchor);
7928
- }
7929
7970
  insert(target, switch_instance_anchor, anchor);
7930
7971
  current = true;
7931
7972
  },
@@ -7943,7 +7984,7 @@ function create_if_block_11(ctx) {
7943
7984
  check_outros();
7944
7985
  }
7945
7986
  if (switch_value) {
7946
- switch_instance = new switch_value(switch_props(ctx2));
7987
+ switch_instance = construct_svelte_component(switch_value, switch_props(ctx2));
7947
7988
  create_component(switch_instance.$$.fragment);
7948
7989
  transition_in(switch_instance.$$.fragment, 1);
7949
7990
  mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
@@ -8553,6 +8594,9 @@ function create_if_block6(ctx) {
8553
8594
  let current;
8554
8595
  const button0_spread_levels = [
8555
8596
  { class: "eraser" },
8597
+ {
8598
+ active: ctx[8] === "pencilEraser"
8599
+ },
8556
8600
  ctx[18],
8557
8601
  { placement: "top" },
8558
8602
  {
@@ -8570,6 +8614,9 @@ function create_if_block6(ctx) {
8570
8614
  button0.$on("click", ctx[34]);
8571
8615
  const button1_spread_levels = [
8572
8616
  { class: "eraser" },
8617
+ {
8618
+ active: ctx[8] === "eraser"
8619
+ },
8573
8620
  ctx[18],
8574
8621
  { placement: "top" },
8575
8622
  { content: ctx[21].eraserForPanel }
@@ -8608,10 +8655,13 @@ function create_if_block6(ctx) {
8608
8655
  current = true;
8609
8656
  },
8610
8657
  p(ctx2, dirty) {
8611
- const button0_changes = dirty[0] & 2359296 ? get_spread_update(button0_spread_levels, [
8658
+ const button0_changes = dirty[0] & 2359552 ? get_spread_update(button0_spread_levels, [
8612
8659
  button0_spread_levels[0],
8660
+ dirty[0] & 256 && {
8661
+ active: ctx2[8] === "pencilEraser"
8662
+ },
8613
8663
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
8614
- button0_spread_levels[2],
8664
+ button0_spread_levels[3],
8615
8665
  dirty[0] & 2097152 && {
8616
8666
  content: ctx2[21].pencilEraserForPanel
8617
8667
  }
@@ -8620,10 +8670,13 @@ function create_if_block6(ctx) {
8620
8670
  button0_changes.$$scope = { dirty, ctx: ctx2 };
8621
8671
  }
8622
8672
  button0.$set(button0_changes);
8623
- const button1_changes = dirty[0] & 2359296 ? get_spread_update(button1_spread_levels, [
8673
+ const button1_changes = dirty[0] & 2359552 ? get_spread_update(button1_spread_levels, [
8624
8674
  button1_spread_levels[0],
8675
+ dirty[0] & 256 && {
8676
+ active: ctx2[8] === "eraser"
8677
+ },
8625
8678
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
8626
- button1_spread_levels[2],
8679
+ button1_spread_levels[3],
8627
8680
  dirty[0] & 2097152 && { content: ctx2[21].eraserForPanel }
8628
8681
  ]) : {};
8629
8682
  if (dirty[0] & 258 | dirty[1] & 33554432) {
@@ -9149,6 +9202,9 @@ function create_fragment57(ctx) {
9149
9202
  let if_block0 = ctx[5] && create_if_block_17(ctx);
9150
9203
  const button0_spread_levels = [
9151
9204
  { class: "clicker" },
9205
+ {
9206
+ active: ctx[8] === "clicker"
9207
+ },
9152
9208
  ctx[18],
9153
9209
  { content: ctx[21].clicker }
9154
9210
  ];
@@ -9163,6 +9219,9 @@ function create_fragment57(ctx) {
9163
9219
  button0.$on("click", ctx[27]);
9164
9220
  const button1_spread_levels = [
9165
9221
  { class: "selector" },
9222
+ {
9223
+ active: ctx[8] === "selector"
9224
+ },
9166
9225
  ctx[18],
9167
9226
  { content: ctx[21].selector }
9168
9227
  ];
@@ -9177,6 +9236,9 @@ function create_fragment57(ctx) {
9177
9236
  button1.$on("click", ctx[28]);
9178
9237
  const button2_spread_levels = [
9179
9238
  { class: "pencil" },
9239
+ {
9240
+ active: ctx[8] === "pencil"
9241
+ },
9180
9242
  ctx[18],
9181
9243
  { content: ctx[21].pencil },
9182
9244
  { menu: ctx[13] }
@@ -9192,6 +9254,7 @@ function create_fragment57(ctx) {
9192
9254
  button2.$on("click", ctx[29]);
9193
9255
  const button3_spread_levels = [
9194
9256
  { class: "text" },
9257
+ { active: ctx[8] === "text" },
9195
9258
  ctx[18],
9196
9259
  { content: ctx[21].text },
9197
9260
  { menu: ctx[14] }
@@ -9207,6 +9270,9 @@ function create_fragment57(ctx) {
9207
9270
  button3.$on("click", ctx[30]);
9208
9271
  const button4_spread_levels = [
9209
9272
  { class: "shapes" },
9273
+ {
9274
+ active: ctx[8] === ctx[11] || ctx[8] === "shape" && ctx[9] === ctx[11]
9275
+ },
9210
9276
  ctx[18],
9211
9277
  { content: ctx[10].shapes },
9212
9278
  { menu: ctx[15] }
@@ -9463,8 +9529,11 @@ function create_fragment57(ctx) {
9463
9529
  });
9464
9530
  check_outros();
9465
9531
  }
9466
- const button0_changes = dirty[0] & 2359296 ? get_spread_update(button0_spread_levels, [
9532
+ const button0_changes = dirty[0] & 2359552 ? get_spread_update(button0_spread_levels, [
9467
9533
  button0_spread_levels[0],
9534
+ dirty[0] & 256 && {
9535
+ active: ctx2[8] === "clicker"
9536
+ },
9468
9537
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9469
9538
  dirty[0] & 2097152 && { content: ctx2[21].clicker }
9470
9539
  ]) : {};
@@ -9472,8 +9541,11 @@ function create_fragment57(ctx) {
9472
9541
  button0_changes.$$scope = { dirty, ctx: ctx2 };
9473
9542
  }
9474
9543
  button0.$set(button0_changes);
9475
- const button1_changes = dirty[0] & 2359296 ? get_spread_update(button1_spread_levels, [
9544
+ const button1_changes = dirty[0] & 2359552 ? get_spread_update(button1_spread_levels, [
9476
9545
  button1_spread_levels[0],
9546
+ dirty[0] & 256 && {
9547
+ active: ctx2[8] === "selector"
9548
+ },
9477
9549
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9478
9550
  dirty[0] & 2097152 && { content: ctx2[21].selector }
9479
9551
  ]) : {};
@@ -9481,8 +9553,11 @@ function create_fragment57(ctx) {
9481
9553
  button1_changes.$$scope = { dirty, ctx: ctx2 };
9482
9554
  }
9483
9555
  button1.$set(button1_changes);
9484
- const button2_changes = dirty[0] & 2367488 ? get_spread_update(button2_spread_levels, [
9556
+ const button2_changes = dirty[0] & 2367744 ? get_spread_update(button2_spread_levels, [
9485
9557
  button2_spread_levels[0],
9558
+ dirty[0] & 256 && {
9559
+ active: ctx2[8] === "pencil"
9560
+ },
9486
9561
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9487
9562
  dirty[0] & 2097152 && { content: ctx2[21].pencil },
9488
9563
  dirty[0] & 8192 && { menu: ctx2[13] }
@@ -9491,8 +9566,9 @@ function create_fragment57(ctx) {
9491
9566
  button2_changes.$$scope = { dirty, ctx: ctx2 };
9492
9567
  }
9493
9568
  button2.$set(button2_changes);
9494
- const button3_changes = dirty[0] & 2375680 ? get_spread_update(button3_spread_levels, [
9569
+ const button3_changes = dirty[0] & 2375936 ? get_spread_update(button3_spread_levels, [
9495
9570
  button3_spread_levels[0],
9571
+ dirty[0] & 256 && { active: ctx2[8] === "text" },
9496
9572
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9497
9573
  dirty[0] & 2097152 && { content: ctx2[21].text },
9498
9574
  dirty[0] & 16384 && { menu: ctx2[14] }
@@ -9501,8 +9577,11 @@ function create_fragment57(ctx) {
9501
9577
  button3_changes.$$scope = { dirty, ctx: ctx2 };
9502
9578
  }
9503
9579
  button3.$set(button3_changes);
9504
- const button4_changes = dirty[0] & 295936 ? get_spread_update(button4_spread_levels, [
9580
+ const button4_changes = dirty[0] & 298752 ? get_spread_update(button4_spread_levels, [
9505
9581
  button4_spread_levels[0],
9582
+ dirty[0] & 2816 && {
9583
+ active: ctx2[8] === ctx2[11] || ctx2[8] === "shape" && ctx2[9] === ctx2[11]
9584
+ },
9506
9585
  dirty[0] & 262144 && get_spread_object(ctx2[18]),
9507
9586
  dirty[0] & 1024 && { content: ctx2[10].shapes },
9508
9587
  dirty[0] & 32768 && { menu: ctx2[15] }
@@ -9561,7 +9640,7 @@ function create_fragment57(ctx) {
9561
9640
  }
9562
9641
  if (scrollHeight_action && is_function(scrollHeight_action.update) && dirty[0] & 16)
9563
9642
  scrollHeight_action.update.call(null, ctx2[4]);
9564
- if (dirty[0] & 32) {
9643
+ if (!current || dirty[0] & 32) {
9565
9644
  toggle_class(div0, "scrollable", ctx2[5]);
9566
9645
  }
9567
9646
  if (ctx2[5]) {
@@ -10027,58 +10106,44 @@ var Contents_default = Contents;
10027
10106
 
10028
10107
  // src/components/Toolbar/Toolbar.svelte
10029
10108
  function create_else_block7(ctx) {
10030
- let path0;
10031
- let path1;
10109
+ let path;
10032
10110
  return {
10033
10111
  c() {
10034
- path0 = svg_element("path");
10035
- path1 = svg_element("path");
10036
- attr(path0, "stroke", "#000");
10037
- attr(path0, "d", "M20 52v16");
10038
- attr(path0, "class", name6 + "-handler-image-stroke-color");
10039
- attr(path1, "fill", "#000");
10040
- attr(path1, "stroke", "none");
10041
- attr(path1, "d", "M16 52v16l-8-8z");
10042
- attr(path1, "class", name6 + "-handler-image-fill-color");
10112
+ path = svg_element("path");
10113
+ attr(path, "fill-rule", "evenodd");
10114
+ attr(path, "clip-rule", "evenodd");
10115
+ attr(path, "d", "M6 19L8 17V25L6 23L4 21L6 19ZM10 17H9V25H10V17Z");
10116
+ attr(path, "fill", "#fff");
10117
+ attr(path, "class", name6 + "-handler-image-fill-color");
10043
10118
  },
10044
10119
  m(target, anchor) {
10045
- insert(target, path0, anchor);
10046
- insert(target, path1, anchor);
10120
+ insert(target, path, anchor);
10047
10121
  },
10048
10122
  p: noop,
10049
10123
  d(detaching) {
10050
10124
  if (detaching)
10051
- detach(path0);
10052
- if (detaching)
10053
- detach(path1);
10125
+ detach(path);
10054
10126
  }
10055
10127
  };
10056
10128
  }
10057
10129
  function create_if_block7(ctx) {
10058
- let path0;
10059
- let path1;
10130
+ let path;
10060
10131
  return {
10061
10132
  c() {
10062
- path0 = svg_element("path");
10063
- path1 = svg_element("path");
10064
- attr(path0, "stroke", "#000");
10065
- attr(path0, "d", "M10 52v16");
10066
- attr(path0, "class", name6 + "-handler-image-stroke-color");
10067
- attr(path1, "fill", "#000");
10068
- attr(path1, "stroke", "none");
10069
- attr(path1, "d", "M14 52v16l8-8z");
10070
- attr(path1, "class", name6 + "-handler-image-fill-color");
10133
+ path = svg_element("path");
10134
+ attr(path, "fill-rule", "evenodd");
10135
+ attr(path, "clip-rule", "evenodd");
10136
+ attr(path, "d", "M8 19L6 17V25L8 23L10 21L8 19ZM4 17H5V25H4V17Z");
10137
+ attr(path, "fill", "#fff");
10138
+ attr(path, "class", name6 + "-handler-image-fill-color");
10071
10139
  },
10072
10140
  m(target, anchor) {
10073
- insert(target, path0, anchor);
10074
- insert(target, path1, anchor);
10141
+ insert(target, path, anchor);
10075
10142
  },
10076
10143
  p: noop,
10077
10144
  d(detaching) {
10078
10145
  if (detaching)
10079
- detach(path0);
10080
- if (detaching)
10081
- detach(path1);
10146
+ detach(path);
10082
10147
  }
10083
10148
  };
10084
10149
  }
@@ -10092,8 +10157,7 @@ function create_fragment58(ctx) {
10092
10157
  let input;
10093
10158
  let t1;
10094
10159
  let svg;
10095
- let path0;
10096
- let path1;
10160
+ let path;
10097
10161
  let label_class_value;
10098
10162
  let div1_class_value;
10099
10163
  let current;
@@ -10129,27 +10193,19 @@ function create_fragment58(ctx) {
10129
10193
  input = element("input");
10130
10194
  t1 = space();
10131
10195
  svg = svg_element("svg");
10132
- path0 = svg_element("path");
10133
- path1 = svg_element("path");
10196
+ path = svg_element("path");
10134
10197
  if_block.c();
10135
10198
  attr(div0, "class", div0_class_value = name6 + "-contents " + ctx[1]);
10136
- set_style(
10137
- div0,
10138
- "height",
10139
- ctx[6] ? ctx[7] + "px" : "auto",
10140
- false
10141
- );
10199
+ set_style(div0, "height", ctx[6] ? ctx[7] + "px" : "auto");
10142
10200
  attr(input, "type", "checkbox");
10143
- attr(path0, "fill", "#fff");
10144
- attr(path0, "stroke", "none");
10145
- attr(path0, "d", "m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120");
10146
- attr(path0, "class", name6 + "-handler-bg-color");
10147
- attr(path1, "stroke", "#000");
10148
- attr(path1, "d", "m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120");
10149
- attr(path1, "class", name6 + "-handler-border-color");
10201
+ attr(path, "d", "M0 41H12C14.2091 41 16 39.2091 16 37V5C16 2.79086 14.2091 1 12 1H0");
10202
+ attr(path, "stroke", "#000");
10203
+ attr(path, "fill", "#fff");
10204
+ attr(path, "class", name6 + "-handler-border-color " + name6 + "-handler-bg-color");
10205
+ attr(svg, "width", "17");
10206
+ attr(svg, "height", "42");
10207
+ attr(svg, "viewBox", "0 0 17 42");
10150
10208
  attr(svg, "fill", "none");
10151
- attr(svg, "stroke-width", "2");
10152
- attr(svg, "viewBox", "0 0 32 120");
10153
10209
  attr(label, "class", label_class_value = name6 + "-handler " + ctx[1]);
10154
10210
  attr(div1, "class", div1_class_value = name6 + " " + ctx[1]);
10155
10211
  toggle_class(div1, "collapsed", ctx[3]);
@@ -10164,8 +10220,7 @@ function create_fragment58(ctx) {
10164
10220
  input.checked = ctx[3];
10165
10221
  append(label, t1);
10166
10222
  append(label, svg);
10167
- append(svg, path0);
10168
- append(svg, path1);
10223
+ append(svg, path);
10169
10224
  if_block.m(svg, null);
10170
10225
  current = true;
10171
10226
  if (!mounted) {
@@ -10199,12 +10254,7 @@ function create_fragment58(ctx) {
10199
10254
  attr(div0, "class", div0_class_value);
10200
10255
  }
10201
10256
  if (dirty & 192) {
10202
- set_style(
10203
- div0,
10204
- "height",
10205
- ctx2[6] ? ctx2[7] + "px" : "auto",
10206
- false
10207
- );
10257
+ set_style(div0, "height", ctx2[6] ? ctx2[7] + "px" : "auto");
10208
10258
  }
10209
10259
  if (dirty & 8) {
10210
10260
  input.checked = ctx2[3];
@@ -10225,7 +10275,7 @@ function create_fragment58(ctx) {
10225
10275
  if (!current || dirty & 2 && div1_class_value !== (div1_class_value = name6 + " " + ctx2[1])) {
10226
10276
  attr(div1, "class", div1_class_value);
10227
10277
  }
10228
- if (dirty & 10) {
10278
+ if (!current || dirty & 10) {
10229
10279
  toggle_class(div1, "collapsed", ctx2[3]);
10230
10280
  }
10231
10281
  },
@@ -11335,7 +11385,7 @@ function create_fragment60(ctx) {
11335
11385
  });
11336
11386
  check_outros();
11337
11387
  }
11338
- if (dirty & 1) {
11388
+ if (!current || dirty & 1) {
11339
11389
  toggle_class(div2, "loading", !ctx2[0]);
11340
11390
  }
11341
11391
  },
@@ -11721,7 +11771,7 @@ function create_fragment61(ctx) {
11721
11771
  });
11722
11772
  check_outros();
11723
11773
  }
11724
- if (dirty & 32) {
11774
+ if (!current || dirty & 32) {
11725
11775
  toggle_class(div1, "hidden", !(ctx2[5] === "visible" || ctx2[5] === "toolbar-only"));
11726
11776
  }
11727
11777
  if (ctx2[3].redo_undo?.enable !== false) {
@@ -11762,7 +11812,7 @@ function create_fragment61(ctx) {
11762
11812
  });
11763
11813
  check_outros();
11764
11814
  }
11765
- if (dirty & 32) {
11815
+ if (!current || dirty & 32) {
11766
11816
  toggle_class(div2, "hidden", ctx2[5] !== "visible");
11767
11817
  }
11768
11818
  if (ctx2[3].page_control?.enable !== false) {
@@ -11784,10 +11834,10 @@ function create_fragment61(ctx) {
11784
11834
  });
11785
11835
  check_outros();
11786
11836
  }
11787
- if (dirty & 32) {
11837
+ if (!current || dirty & 32) {
11788
11838
  toggle_class(div3, "hidden", ctx2[5] !== "visible");
11789
11839
  }
11790
- if (dirty & 1) {
11840
+ if (!current || dirty & 1) {
11791
11841
  toggle_class(div4, "loading", !ctx2[0]);
11792
11842
  }
11793
11843
  },
@@ -12018,4 +12068,3 @@ function createReplayUI(player, div) {
12018
12068
  }
12019
12069
 
12020
12070
  export { Fastboard_default as Fastboard, PageControl_default as PageControl, PlayerControl_default as PlayerControl, RedoUndo_default as RedoUndo, ReplayFastboard_default as ReplayFastboard, Toolbar_default as Toolbar, ZoomControl_default as ZoomControl, createReplayUI, createUI, stockedApps };
12021
- //# sourceMappingURL=index.mjs.map