@netless/fastboard-ui 0.3.21 → 0.3.22-beta.1

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.js CHANGED
@@ -364,10 +364,6 @@ function transition_out(block, local, detach2, callback) {
364
364
  callback();
365
365
  }
366
366
  }
367
- function destroy_block(block, lookup) {
368
- block.d(1);
369
- lookup.delete(block.key);
370
- }
371
367
  function outro_and_destroy_block(block, lookup) {
372
368
  transition_out(block, 1, 1, () => {
373
369
  lookup.delete(block.key);
@@ -7080,6 +7076,7 @@ var colors = {
7080
7076
  "#B620E0": [182, 32, 224],
7081
7077
  "#6D7278": [109, 114, 120]
7082
7078
  };
7079
+ var default_colors = Object.values(colors);
7083
7080
  var shapes = [
7084
7081
  "rectangle",
7085
7082
  "ellipse",
@@ -7137,7 +7134,6 @@ var i18n4 = {
7137
7134
  laserPointer: "\u6FC0\u5149\u7B14"
7138
7135
  }
7139
7136
  };
7140
- var colorKeys = Object.keys(colors);
7141
7137
 
7142
7138
  // src/actions/scroll.ts
7143
7139
  var scrollTop = function(node, value) {
@@ -7260,6 +7256,20 @@ function tooltip(text2, hotkey) {
7260
7256
  append(outer, hotkey_span);
7261
7257
  return outer;
7262
7258
  }
7259
+ function rgbToHex(r, g, b) {
7260
+ const hex = ((r << 16) + (g << 8) + b).toString(16).padStart(6, "0");
7261
+ return "#" + hex;
7262
+ }
7263
+ function hexToRgb(hex) {
7264
+ hex = hex.replace(/^#/, "");
7265
+ if (hex.length !== 6) {
7266
+ throw new Error("Invalid hex color");
7267
+ }
7268
+ const r = parseInt(hex.slice(0, 2), 16);
7269
+ const g = parseInt(hex.slice(2, 4), 16);
7270
+ const b = parseInt(hex.slice(4, 6), 16);
7271
+ return [r, g, b];
7272
+ }
7263
7273
 
7264
7274
  // src/components/Toolbar/components/Slider.svelte
7265
7275
  function create_fragment53(ctx) {
@@ -7675,70 +7685,93 @@ var StrokeWidth_default = StrokeWidth;
7675
7685
  // src/components/Toolbar/components/StrokeColor.svelte
7676
7686
  function get_each_context(ctx, list, i) {
7677
7687
  const child_ctx = ctx.slice();
7678
- child_ctx[7] = list[i];
7688
+ child_ctx[8] = list[i];
7679
7689
  return child_ctx;
7680
7690
  }
7681
- function create_each_block(key_1, ctx) {
7691
+ function create_each_block(ctx) {
7682
7692
  let button;
7683
7693
  let span;
7684
7694
  let t;
7685
7695
  let button_class_value;
7696
+ let button_data_color_key_value;
7686
7697
  return {
7687
- key: key_1,
7688
- first: null,
7689
7698
  c() {
7690
7699
  button = element("button");
7691
7700
  span = element("span");
7692
7701
  t = space();
7693
7702
  attr(span, "class", "fastboard-toolbar-color-item");
7694
- set_style(
7695
- span,
7696
- "background-color",
7697
- /*key*/
7698
- ctx[7]
7699
- );
7703
+ set_style(span, "background-color", rgbToHex(
7704
+ /*color*/
7705
+ ctx[8][0],
7706
+ /*color*/
7707
+ ctx[8][1],
7708
+ /*color*/
7709
+ ctx[8][2]
7710
+ ));
7700
7711
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
7701
7712
  ctx[0]);
7702
- attr(button, "data-color-key", /*key*/
7703
- ctx[7]);
7713
+ attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
7714
+ /*color*/
7715
+ ctx[8][0],
7716
+ /*color*/
7717
+ ctx[8][1],
7718
+ /*color*/
7719
+ ctx[8][2]
7720
+ ));
7704
7721
  button.disabled = /*disabled*/
7705
7722
  ctx[1];
7706
7723
  toggle_class(button, "is-active", is_equal_color(
7707
7724
  /*strokeColor*/
7708
- ctx[2],
7709
- colors[
7710
- /*key*/
7711
- ctx[7]
7712
- ]
7725
+ ctx[3],
7726
+ /*color*/
7727
+ ctx[8]
7713
7728
  ));
7714
- this.first = button;
7715
7729
  },
7716
7730
  m(target, anchor) {
7717
7731
  insert(target, button, anchor);
7718
7732
  append(button, span);
7719
7733
  append(button, t);
7720
7734
  },
7721
- p(new_ctx, dirty) {
7722
- ctx = new_ctx;
7735
+ p(ctx2, dirty) {
7736
+ if (dirty & /*colors*/
7737
+ 4) {
7738
+ set_style(span, "background-color", rgbToHex(
7739
+ /*color*/
7740
+ ctx2[8][0],
7741
+ /*color*/
7742
+ ctx2[8][1],
7743
+ /*color*/
7744
+ ctx2[8][2]
7745
+ ));
7746
+ }
7723
7747
  if (dirty & /*theme*/
7724
7748
  1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
7725
- ctx[0])) {
7749
+ ctx2[0])) {
7726
7750
  attr(button, "class", button_class_value);
7727
7751
  }
7752
+ if (dirty & /*colors*/
7753
+ 4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
7754
+ /*color*/
7755
+ ctx2[8][0],
7756
+ /*color*/
7757
+ ctx2[8][1],
7758
+ /*color*/
7759
+ ctx2[8][2]
7760
+ ))) {
7761
+ attr(button, "data-color-key", button_data_color_key_value);
7762
+ }
7728
7763
  if (dirty & /*disabled*/
7729
7764
  2) {
7730
7765
  button.disabled = /*disabled*/
7731
- ctx[1];
7766
+ ctx2[1];
7732
7767
  }
7733
- if (dirty & /*theme, is_equal_color, strokeColor, colors, colorKeys*/
7734
- 5) {
7768
+ if (dirty & /*theme, is_equal_color, strokeColor, colors*/
7769
+ 13) {
7735
7770
  toggle_class(button, "is-active", is_equal_color(
7736
7771
  /*strokeColor*/
7737
- ctx[2],
7738
- colors[
7739
- /*key*/
7740
- ctx[7]
7741
- ]
7772
+ ctx2[3],
7773
+ /*color*/
7774
+ ctx2[8]
7742
7775
  ));
7743
7776
  }
7744
7777
  },
@@ -7750,20 +7783,16 @@ function create_each_block(key_1, ctx) {
7750
7783
  }
7751
7784
  function create_fragment55(ctx) {
7752
7785
  let div;
7753
- let each_blocks = [];
7754
- let each_1_lookup = /* @__PURE__ */ new Map();
7755
7786
  let div_class_value;
7756
7787
  let mounted;
7757
7788
  let dispose;
7758
- let each_value = colorKeys;
7759
- const get_key = (ctx2) => (
7760
- /*key*/
7761
- ctx2[7]
7789
+ let each_value = (
7790
+ /*colors*/
7791
+ ctx[2]
7762
7792
  );
7793
+ let each_blocks = [];
7763
7794
  for (let i = 0; i < each_value.length; i += 1) {
7764
- let child_ctx = get_each_context(ctx, each_value, i);
7765
- let key = get_key(child_ctx);
7766
- each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
7795
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
7767
7796
  }
7768
7797
  return {
7769
7798
  c() {
@@ -7786,16 +7815,31 @@ function create_fragment55(ctx) {
7786
7815
  div,
7787
7816
  "click",
7788
7817
  /*set_stroke_color*/
7789
- ctx[4]
7818
+ ctx[5]
7790
7819
  );
7791
7820
  mounted = true;
7792
7821
  }
7793
7822
  },
7794
7823
  p(ctx2, [dirty]) {
7795
- if (dirty & /*theme, colorKeys, disabled, is_equal_color, strokeColor, colors*/
7796
- 7) {
7797
- each_value = colorKeys;
7798
- each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block, null, get_each_context);
7824
+ if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, strokeColor*/
7825
+ 15) {
7826
+ each_value = /*colors*/
7827
+ ctx2[2];
7828
+ let i;
7829
+ for (i = 0; i < each_value.length; i += 1) {
7830
+ const child_ctx = get_each_context(ctx2, each_value, i);
7831
+ if (each_blocks[i]) {
7832
+ each_blocks[i].p(child_ctx, dirty);
7833
+ } else {
7834
+ each_blocks[i] = create_each_block(child_ctx);
7835
+ each_blocks[i].c();
7836
+ each_blocks[i].m(div, null);
7837
+ }
7838
+ }
7839
+ for (; i < each_blocks.length; i += 1) {
7840
+ each_blocks[i].d(1);
7841
+ }
7842
+ each_blocks.length = each_value.length;
7799
7843
  }
7800
7844
  if (dirty & /*theme*/
7801
7845
  1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
@@ -7808,9 +7852,7 @@ function create_fragment55(ctx) {
7808
7852
  d(detaching) {
7809
7853
  if (detaching)
7810
7854
  detach(div);
7811
- for (let i = 0; i < each_blocks.length; i += 1) {
7812
- each_blocks[i].d();
7813
- }
7855
+ destroy_each(each_blocks, detaching);
7814
7856
  mounted = false;
7815
7857
  dispose();
7816
7858
  }
@@ -7822,44 +7864,56 @@ function is_equal_color(a, b) {
7822
7864
  function instance55($$self, $$props, $$invalidate) {
7823
7865
  let memberState;
7824
7866
  let strokeColor;
7825
- let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(6, $memberState = $$value)), memberState);
7867
+ let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
7826
7868
  $$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
7827
7869
  let { app = null } = $$props;
7828
7870
  let { theme = "light" } = $$props;
7829
7871
  let { disabled = false } = $$props;
7872
+ let { colors: colors2 = default_colors } = $$props;
7830
7873
  function set_stroke_color(ev) {
7831
7874
  let button = ev.target;
7832
7875
  if (button && button.dataset.colorKey) {
7833
- let color = colors[button.dataset.colorKey];
7876
+ let color = button.dataset.colorKey;
7834
7877
  if (color && app) {
7835
- app.setStrokeColor(color);
7878
+ app.setStrokeColor(hexToRgb(color));
7836
7879
  }
7837
7880
  }
7838
7881
  }
7839
7882
  $$self.$$set = ($$props2) => {
7840
7883
  if ("app" in $$props2)
7841
- $$invalidate(5, app = $$props2.app);
7884
+ $$invalidate(6, app = $$props2.app);
7842
7885
  if ("theme" in $$props2)
7843
7886
  $$invalidate(0, theme = $$props2.theme);
7844
7887
  if ("disabled" in $$props2)
7845
7888
  $$invalidate(1, disabled = $$props2.disabled);
7889
+ if ("colors" in $$props2)
7890
+ $$invalidate(2, colors2 = $$props2.colors);
7846
7891
  };
7847
7892
  $$self.$$.update = () => {
7848
7893
  if ($$self.$$.dirty & /*app*/
7849
- 32) {
7850
- $$subscribe_memberState($$invalidate(3, memberState = app == null ? void 0 : app.memberState));
7894
+ 64) {
7895
+ $$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
7851
7896
  }
7852
7897
  if ($$self.$$.dirty & /*$memberState*/
7853
- 64) {
7854
- $$invalidate(2, strokeColor = $memberState == null ? void 0 : $memberState.strokeColor);
7898
+ 128) {
7899
+ $$invalidate(3, strokeColor = $memberState == null ? void 0 : $memberState.strokeColor);
7855
7900
  }
7856
7901
  };
7857
- return [theme, disabled, strokeColor, memberState, set_stroke_color, app, $memberState];
7902
+ return [
7903
+ theme,
7904
+ disabled,
7905
+ colors2,
7906
+ strokeColor,
7907
+ memberState,
7908
+ set_stroke_color,
7909
+ app,
7910
+ $memberState
7911
+ ];
7858
7912
  }
7859
7913
  var StrokeColor = class extends SvelteComponent {
7860
7914
  constructor(options) {
7861
7915
  super();
7862
- init(this, options, instance55, create_fragment55, safe_not_equal, { app: 5, theme: 0, disabled: 1 });
7916
+ init(this, options, instance55, create_fragment55, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
7863
7917
  }
7864
7918
  };
7865
7919
  var StrokeColor_default = StrokeColor;
@@ -7867,70 +7921,93 @@ var StrokeColor_default = StrokeColor;
7867
7921
  // src/components/Toolbar/components/TextColor.svelte
7868
7922
  function get_each_context2(ctx, list, i) {
7869
7923
  const child_ctx = ctx.slice();
7870
- child_ctx[7] = list[i];
7924
+ child_ctx[8] = list[i];
7871
7925
  return child_ctx;
7872
7926
  }
7873
- function create_each_block2(key_1, ctx) {
7927
+ function create_each_block2(ctx) {
7874
7928
  let button;
7875
7929
  let span;
7876
7930
  let t;
7877
7931
  let button_class_value;
7932
+ let button_data_color_key_value;
7878
7933
  return {
7879
- key: key_1,
7880
- first: null,
7881
7934
  c() {
7882
7935
  button = element("button");
7883
7936
  span = element("span");
7884
7937
  t = space();
7885
7938
  attr(span, "class", "fastboard-toolbar-color-item");
7886
- set_style(
7887
- span,
7888
- "background-color",
7889
- /*key*/
7890
- ctx[7]
7891
- );
7939
+ set_style(span, "background-color", rgbToHex(
7940
+ /*color*/
7941
+ ctx[8][0],
7942
+ /*color*/
7943
+ ctx[8][1],
7944
+ /*color*/
7945
+ ctx[8][2]
7946
+ ));
7892
7947
  attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
7893
7948
  ctx[0]);
7894
- attr(button, "data-color-key", /*key*/
7895
- ctx[7]);
7949
+ attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
7950
+ /*color*/
7951
+ ctx[8][0],
7952
+ /*color*/
7953
+ ctx[8][1],
7954
+ /*color*/
7955
+ ctx[8][2]
7956
+ ));
7896
7957
  button.disabled = /*disabled*/
7897
7958
  ctx[1];
7898
7959
  toggle_class(button, "is-active", is_equal_color2(
7899
7960
  /*textColor*/
7900
- ctx[2],
7901
- colors[
7902
- /*key*/
7903
- ctx[7]
7904
- ]
7961
+ ctx[3],
7962
+ /*color*/
7963
+ ctx[8]
7905
7964
  ));
7906
- this.first = button;
7907
7965
  },
7908
7966
  m(target, anchor) {
7909
7967
  insert(target, button, anchor);
7910
7968
  append(button, span);
7911
7969
  append(button, t);
7912
7970
  },
7913
- p(new_ctx, dirty) {
7914
- ctx = new_ctx;
7971
+ p(ctx2, dirty) {
7972
+ if (dirty & /*colors*/
7973
+ 4) {
7974
+ set_style(span, "background-color", rgbToHex(
7975
+ /*color*/
7976
+ ctx2[8][0],
7977
+ /*color*/
7978
+ ctx2[8][1],
7979
+ /*color*/
7980
+ ctx2[8][2]
7981
+ ));
7982
+ }
7915
7983
  if (dirty & /*theme*/
7916
7984
  1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
7917
- ctx[0])) {
7985
+ ctx2[0])) {
7918
7986
  attr(button, "class", button_class_value);
7919
7987
  }
7988
+ if (dirty & /*colors*/
7989
+ 4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
7990
+ /*color*/
7991
+ ctx2[8][0],
7992
+ /*color*/
7993
+ ctx2[8][1],
7994
+ /*color*/
7995
+ ctx2[8][2]
7996
+ ))) {
7997
+ attr(button, "data-color-key", button_data_color_key_value);
7998
+ }
7920
7999
  if (dirty & /*disabled*/
7921
8000
  2) {
7922
8001
  button.disabled = /*disabled*/
7923
- ctx[1];
8002
+ ctx2[1];
7924
8003
  }
7925
- if (dirty & /*theme, is_equal_color, textColor, colors, colorKeys*/
7926
- 5) {
8004
+ if (dirty & /*theme, is_equal_color, textColor, colors*/
8005
+ 13) {
7927
8006
  toggle_class(button, "is-active", is_equal_color2(
7928
8007
  /*textColor*/
7929
- ctx[2],
7930
- colors[
7931
- /*key*/
7932
- ctx[7]
7933
- ]
8008
+ ctx2[3],
8009
+ /*color*/
8010
+ ctx2[8]
7934
8011
  ));
7935
8012
  }
7936
8013
  },
@@ -7942,20 +8019,16 @@ function create_each_block2(key_1, ctx) {
7942
8019
  }
7943
8020
  function create_fragment56(ctx) {
7944
8021
  let div;
7945
- let each_blocks = [];
7946
- let each_1_lookup = /* @__PURE__ */ new Map();
7947
8022
  let div_class_value;
7948
8023
  let mounted;
7949
8024
  let dispose;
7950
- let each_value = colorKeys;
7951
- const get_key = (ctx2) => (
7952
- /*key*/
7953
- ctx2[7]
8025
+ let each_value = (
8026
+ /*colors*/
8027
+ ctx[2]
7954
8028
  );
8029
+ let each_blocks = [];
7955
8030
  for (let i = 0; i < each_value.length; i += 1) {
7956
- let child_ctx = get_each_context2(ctx, each_value, i);
7957
- let key = get_key(child_ctx);
7958
- each_1_lookup.set(key, each_blocks[i] = create_each_block2(key, child_ctx));
8031
+ each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i));
7959
8032
  }
7960
8033
  return {
7961
8034
  c() {
@@ -7978,16 +8051,31 @@ function create_fragment56(ctx) {
7978
8051
  div,
7979
8052
  "click",
7980
8053
  /*set_stroke_color*/
7981
- ctx[4]
8054
+ ctx[5]
7982
8055
  );
7983
8056
  mounted = true;
7984
8057
  }
7985
8058
  },
7986
8059
  p(ctx2, [dirty]) {
7987
- if (dirty & /*theme, colorKeys, disabled, is_equal_color, textColor, colors*/
7988
- 7) {
7989
- each_value = colorKeys;
7990
- each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block2, null, get_each_context2);
8060
+ if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, textColor*/
8061
+ 15) {
8062
+ each_value = /*colors*/
8063
+ ctx2[2];
8064
+ let i;
8065
+ for (i = 0; i < each_value.length; i += 1) {
8066
+ const child_ctx = get_each_context2(ctx2, each_value, i);
8067
+ if (each_blocks[i]) {
8068
+ each_blocks[i].p(child_ctx, dirty);
8069
+ } else {
8070
+ each_blocks[i] = create_each_block2(child_ctx);
8071
+ each_blocks[i].c();
8072
+ each_blocks[i].m(div, null);
8073
+ }
8074
+ }
8075
+ for (; i < each_blocks.length; i += 1) {
8076
+ each_blocks[i].d(1);
8077
+ }
8078
+ each_blocks.length = each_value.length;
7991
8079
  }
7992
8080
  if (dirty & /*theme*/
7993
8081
  1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
@@ -8000,9 +8088,7 @@ function create_fragment56(ctx) {
8000
8088
  d(detaching) {
8001
8089
  if (detaching)
8002
8090
  detach(div);
8003
- for (let i = 0; i < each_blocks.length; i += 1) {
8004
- each_blocks[i].d();
8005
- }
8091
+ destroy_each(each_blocks, detaching);
8006
8092
  mounted = false;
8007
8093
  dispose();
8008
8094
  }
@@ -8014,44 +8100,56 @@ function is_equal_color2(a, b) {
8014
8100
  function instance56($$self, $$props, $$invalidate) {
8015
8101
  let memberState;
8016
8102
  let textColor;
8017
- let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(6, $memberState = $$value)), memberState);
8103
+ let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
8018
8104
  $$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
8019
8105
  let { app = null } = $$props;
8020
8106
  let { theme = "light" } = $$props;
8021
8107
  let { disabled = false } = $$props;
8108
+ let { colors: colors2 = default_colors } = $$props;
8022
8109
  function set_stroke_color(ev) {
8023
8110
  let button = ev.target;
8024
8111
  if (button && button.dataset.colorKey) {
8025
- let color = colors[button.dataset.colorKey];
8112
+ let color = button.dataset.colorKey;
8026
8113
  if (color && app) {
8027
- app.setTextColor(color);
8114
+ app.setTextColor(hexToRgb(color));
8028
8115
  }
8029
8116
  }
8030
8117
  }
8031
8118
  $$self.$$set = ($$props2) => {
8032
8119
  if ("app" in $$props2)
8033
- $$invalidate(5, app = $$props2.app);
8120
+ $$invalidate(6, app = $$props2.app);
8034
8121
  if ("theme" in $$props2)
8035
8122
  $$invalidate(0, theme = $$props2.theme);
8036
8123
  if ("disabled" in $$props2)
8037
8124
  $$invalidate(1, disabled = $$props2.disabled);
8125
+ if ("colors" in $$props2)
8126
+ $$invalidate(2, colors2 = $$props2.colors);
8038
8127
  };
8039
8128
  $$self.$$.update = () => {
8040
8129
  if ($$self.$$.dirty & /*app*/
8041
- 32) {
8042
- $$subscribe_memberState($$invalidate(3, memberState = app == null ? void 0 : app.memberState));
8130
+ 64) {
8131
+ $$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
8043
8132
  }
8044
8133
  if ($$self.$$.dirty & /*$memberState*/
8045
- 64) {
8046
- $$invalidate(2, textColor = $memberState == null ? void 0 : $memberState.textColor);
8134
+ 128) {
8135
+ $$invalidate(3, textColor = $memberState == null ? void 0 : $memberState.textColor);
8047
8136
  }
8048
8137
  };
8049
- return [theme, disabled, textColor, memberState, set_stroke_color, app, $memberState];
8138
+ return [
8139
+ theme,
8140
+ disabled,
8141
+ colors2,
8142
+ textColor,
8143
+ memberState,
8144
+ set_stroke_color,
8145
+ app,
8146
+ $memberState
8147
+ ];
8050
8148
  }
8051
8149
  var TextColor = class extends SvelteComponent {
8052
8150
  constructor(options) {
8053
8151
  super();
8054
- init(this, options, instance56, create_fragment56, safe_not_equal, { app: 5, theme: 0, disabled: 1 });
8152
+ init(this, options, instance56, create_fragment56, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
8055
8153
  }
8056
8154
  };
8057
8155
  var TextColor_default = TextColor;
@@ -10869,39 +10967,39 @@ var Laser_default2 = Laser2;
10869
10967
  // src/components/Toolbar/components/Contents.svelte
10870
10968
  function get_each_context4(ctx, list, i) {
10871
10969
  const child_ctx = ctx.slice();
10872
- child_ctx[43] = list[i];
10970
+ child_ctx[44] = list[i];
10873
10971
  const constants_0 = (
10874
10972
  /*netless_app*/
10875
- child_ctx[43]
10973
+ child_ctx[44]
10876
10974
  );
10877
- child_ctx[44] = constants_0.icon;
10878
- child_ctx[45] = constants_0.label;
10879
- child_ctx[46] = constants_0.kind;
10880
- child_ctx[47] = constants_0.onClick;
10975
+ child_ctx[45] = constants_0.icon;
10976
+ child_ctx[46] = constants_0.label;
10977
+ child_ctx[47] = constants_0.kind;
10978
+ child_ctx[48] = constants_0.onClick;
10881
10979
  const constants_1 = (
10882
10980
  /*$status*/
10883
- child_ctx[20] && /*$status*/
10884
- child_ctx[20][
10981
+ child_ctx[21] && /*$status*/
10982
+ child_ctx[21][
10885
10983
  /*kind*/
10886
- child_ctx[46]
10984
+ child_ctx[47]
10887
10985
  ]
10888
10986
  );
10889
- child_ctx[48] = constants_1;
10987
+ child_ctx[49] = constants_1;
10890
10988
  const constants_2 = function func() {
10891
10989
  return (
10892
10990
  /*func*/
10893
- ctx[39](
10991
+ ctx[40](
10894
10992
  /*onClick*/
10895
- child_ctx[47]
10993
+ child_ctx[48]
10896
10994
  )
10897
10995
  );
10898
10996
  };
10899
- child_ctx[49] = constants_2;
10997
+ child_ctx[50] = constants_2;
10900
10998
  return child_ctx;
10901
10999
  }
10902
11000
  function get_each_context_1(ctx, list, i) {
10903
11001
  const child_ctx = ctx.slice();
10904
- child_ctx[52] = list[i];
11002
+ child_ctx[53] = list[i];
10905
11003
  return child_ctx;
10906
11004
  }
10907
11005
  function create_if_block_11(ctx) {
@@ -10910,7 +11008,7 @@ function create_if_block_11(ctx) {
10910
11008
  const button_spread_levels = [
10911
11009
  { class: "scroll-up" },
10912
11010
  /*btn_props*/
10913
- ctx[14]
11011
+ ctx[15]
10914
11012
  ];
10915
11013
  let button_props = {
10916
11014
  $$slots: { default: [create_default_slot_24] },
@@ -10923,7 +11021,7 @@ function create_if_block_11(ctx) {
10923
11021
  button.$on(
10924
11022
  "click",
10925
11023
  /*scroll_up*/
10926
- ctx[22]
11024
+ ctx[23]
10927
11025
  );
10928
11026
  return {
10929
11027
  c() {
@@ -10935,13 +11033,13 @@ function create_if_block_11(ctx) {
10935
11033
  },
10936
11034
  p(ctx2, dirty) {
10937
11035
  const button_changes = dirty[0] & /*btn_props*/
10938
- 16384 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(
11036
+ 32768 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(
10939
11037
  /*btn_props*/
10940
- ctx2[14]
11038
+ ctx2[15]
10941
11039
  )]) : {};
10942
11040
  if (dirty[0] & /*theme*/
10943
11041
  2 | dirty[1] & /*$$scope*/
10944
- 16777216) {
11042
+ 33554432) {
10945
11043
  button_changes.$$scope = { dirty, ctx: ctx2 };
10946
11044
  }
10947
11045
  button.$set(button_changes);
@@ -11006,7 +11104,7 @@ function create_if_block_10(ctx) {
11006
11104
  props: {
11007
11105
  appliance: (
11008
11106
  /*appliance*/
11009
- ctx[16]
11107
+ ctx[17]
11010
11108
  ),
11011
11109
  theme: (
11012
11110
  /*theme*/
@@ -11014,18 +11112,18 @@ function create_if_block_10(ctx) {
11014
11112
  ),
11015
11113
  btn_props: (
11016
11114
  /*btn_props*/
11017
- ctx[14]
11115
+ ctx[15]
11018
11116
  ),
11019
11117
  content: (
11020
11118
  /*c*/
11021
- ctx[18].laserPointer
11119
+ ctx[19].laserPointer
11022
11120
  )
11023
11121
  }
11024
11122
  });
11025
11123
  laser.$on(
11026
11124
  "click",
11027
11125
  /*laserPointer*/
11028
- ctx[30]
11126
+ ctx[31]
11029
11127
  );
11030
11128
  return {
11031
11129
  c() {
@@ -11038,21 +11136,21 @@ function create_if_block_10(ctx) {
11038
11136
  p(ctx2, dirty) {
11039
11137
  const laser_changes = {};
11040
11138
  if (dirty[0] & /*appliance*/
11041
- 65536)
11139
+ 131072)
11042
11140
  laser_changes.appliance = /*appliance*/
11043
- ctx2[16];
11141
+ ctx2[17];
11044
11142
  if (dirty[0] & /*theme*/
11045
11143
  2)
11046
11144
  laser_changes.theme = /*theme*/
11047
11145
  ctx2[1];
11048
11146
  if (dirty[0] & /*btn_props*/
11049
- 16384)
11147
+ 32768)
11050
11148
  laser_changes.btn_props = /*btn_props*/
11051
- ctx2[14];
11149
+ ctx2[15];
11052
11150
  if (dirty[0] & /*c*/
11053
- 262144)
11151
+ 524288)
11054
11152
  laser_changes.content = /*c*/
11055
- ctx2[18].laserPointer;
11153
+ ctx2[19].laserPointer;
11056
11154
  laser.$set(laser_changes);
11057
11155
  },
11058
11156
  i(local) {
@@ -11077,7 +11175,7 @@ function create_if_block_9(ctx) {
11077
11175
  props: {
11078
11176
  appliance: (
11079
11177
  /*appliance*/
11080
- ctx[16]
11178
+ ctx[17]
11081
11179
  ),
11082
11180
  theme: (
11083
11181
  /*theme*/
@@ -11085,18 +11183,18 @@ function create_if_block_9(ctx) {
11085
11183
  ),
11086
11184
  btn_props: (
11087
11185
  /*btn_props*/
11088
- ctx[14]
11186
+ ctx[15]
11089
11187
  ),
11090
11188
  content: (
11091
11189
  /*c*/
11092
- ctx[18].hand
11190
+ ctx[19].hand
11093
11191
  )
11094
11192
  }
11095
11193
  });
11096
11194
  hand_1.$on(
11097
11195
  "click",
11098
11196
  /*hand*/
11099
- ctx[29]
11197
+ ctx[30]
11100
11198
  );
11101
11199
  return {
11102
11200
  c() {
@@ -11109,21 +11207,21 @@ function create_if_block_9(ctx) {
11109
11207
  p(ctx2, dirty) {
11110
11208
  const hand_1_changes = {};
11111
11209
  if (dirty[0] & /*appliance*/
11112
- 65536)
11210
+ 131072)
11113
11211
  hand_1_changes.appliance = /*appliance*/
11114
- ctx2[16];
11212
+ ctx2[17];
11115
11213
  if (dirty[0] & /*theme*/
11116
11214
  2)
11117
11215
  hand_1_changes.theme = /*theme*/
11118
11216
  ctx2[1];
11119
11217
  if (dirty[0] & /*btn_props*/
11120
- 16384)
11218
+ 32768)
11121
11219
  hand_1_changes.btn_props = /*btn_props*/
11122
- ctx2[14];
11220
+ ctx2[15];
11123
11221
  if (dirty[0] & /*c*/
11124
- 262144)
11222
+ 524288)
11125
11223
  hand_1_changes.content = /*c*/
11126
- ctx2[18].hand;
11224
+ ctx2[19].hand;
11127
11225
  hand_1.$set(hand_1_changes);
11128
11226
  },
11129
11227
  i(local) {
@@ -11152,18 +11250,18 @@ function create_if_block_8(ctx) {
11152
11250
  ),
11153
11251
  btn_props: (
11154
11252
  /*btn_props*/
11155
- ctx[14]
11253
+ ctx[15]
11156
11254
  ),
11157
11255
  content: (
11158
11256
  /*t*/
11159
- ctx[9].clear
11257
+ ctx[10].clear
11160
11258
  )
11161
11259
  }
11162
11260
  });
11163
11261
  clear_1.$on(
11164
11262
  "click",
11165
11263
  /*clear*/
11166
- ctx[31]
11264
+ ctx[32]
11167
11265
  );
11168
11266
  return {
11169
11267
  c() {
@@ -11180,13 +11278,13 @@ function create_if_block_8(ctx) {
11180
11278
  clear_1_changes.theme = /*theme*/
11181
11279
  ctx2[1];
11182
11280
  if (dirty[0] & /*btn_props*/
11183
- 16384)
11281
+ 32768)
11184
11282
  clear_1_changes.btn_props = /*btn_props*/
11185
- ctx2[14];
11283
+ ctx2[15];
11186
11284
  if (dirty[0] & /*t*/
11187
- 512)
11285
+ 1024)
11188
11286
  clear_1_changes.content = /*t*/
11189
- ctx2[9].clear;
11287
+ ctx2[10].clear;
11190
11288
  clear_1.$set(clear_1_changes);
11191
11289
  },
11192
11290
  i(local) {
@@ -11211,7 +11309,7 @@ function create_if_block_7(ctx) {
11211
11309
  props: {
11212
11310
  appliance: (
11213
11311
  /*appliance*/
11214
- ctx[16]
11312
+ ctx[17]
11215
11313
  ),
11216
11314
  theme: (
11217
11315
  /*theme*/
@@ -11219,18 +11317,18 @@ function create_if_block_7(ctx) {
11219
11317
  ),
11220
11318
  btn_props: (
11221
11319
  /*btn_props*/
11222
- ctx[14]
11320
+ ctx[15]
11223
11321
  ),
11224
11322
  content: (
11225
11323
  /*c*/
11226
- ctx[18].eraser
11324
+ ctx[19].eraser
11227
11325
  )
11228
11326
  }
11229
11327
  });
11230
11328
  eraser_1.$on(
11231
11329
  "click",
11232
11330
  /*eraser*/
11233
- ctx[28]
11331
+ ctx[29]
11234
11332
  );
11235
11333
  return {
11236
11334
  c() {
@@ -11243,21 +11341,21 @@ function create_if_block_7(ctx) {
11243
11341
  p(ctx2, dirty) {
11244
11342
  const eraser_1_changes = {};
11245
11343
  if (dirty[0] & /*appliance*/
11246
- 65536)
11344
+ 131072)
11247
11345
  eraser_1_changes.appliance = /*appliance*/
11248
- ctx2[16];
11346
+ ctx2[17];
11249
11347
  if (dirty[0] & /*theme*/
11250
11348
  2)
11251
11349
  eraser_1_changes.theme = /*theme*/
11252
11350
  ctx2[1];
11253
11351
  if (dirty[0] & /*btn_props*/
11254
- 16384)
11352
+ 32768)
11255
11353
  eraser_1_changes.btn_props = /*btn_props*/
11256
- ctx2[14];
11354
+ ctx2[15];
11257
11355
  if (dirty[0] & /*c*/
11258
- 262144)
11356
+ 524288)
11259
11357
  eraser_1_changes.content = /*c*/
11260
- ctx2[18].eraser;
11358
+ ctx2[19].eraser;
11261
11359
  eraser_1.$set(eraser_1_changes);
11262
11360
  },
11263
11361
  i(local) {
@@ -11286,7 +11384,7 @@ function create_if_block_6(ctx) {
11286
11384
  ),
11287
11385
  appliance: (
11288
11386
  /*appliance*/
11289
- ctx[16]
11387
+ ctx[17]
11290
11388
  ),
11291
11389
  theme: (
11292
11390
  /*theme*/
@@ -11294,15 +11392,15 @@ function create_if_block_6(ctx) {
11294
11392
  ),
11295
11393
  btn_props: (
11296
11394
  /*btn_props*/
11297
- ctx[14]
11395
+ ctx[15]
11298
11396
  ),
11299
11397
  content: (
11300
11398
  /*t*/
11301
- ctx[9].shapes
11399
+ ctx[10].shapes
11302
11400
  ),
11303
11401
  menu: (
11304
11402
  /*shapes_panel*/
11305
- ctx[12]
11403
+ ctx[13]
11306
11404
  )
11307
11405
  }
11308
11406
  });
@@ -11321,25 +11419,25 @@ function create_if_block_6(ctx) {
11321
11419
  shapes_changes.app = /*app*/
11322
11420
  ctx2[0];
11323
11421
  if (dirty[0] & /*appliance*/
11324
- 65536)
11422
+ 131072)
11325
11423
  shapes_changes.appliance = /*appliance*/
11326
- ctx2[16];
11424
+ ctx2[17];
11327
11425
  if (dirty[0] & /*theme*/
11328
11426
  2)
11329
11427
  shapes_changes.theme = /*theme*/
11330
11428
  ctx2[1];
11331
11429
  if (dirty[0] & /*btn_props*/
11332
- 16384)
11430
+ 32768)
11333
11431
  shapes_changes.btn_props = /*btn_props*/
11334
- ctx2[14];
11432
+ ctx2[15];
11335
11433
  if (dirty[0] & /*t*/
11336
- 512)
11434
+ 1024)
11337
11435
  shapes_changes.content = /*t*/
11338
- ctx2[9].shapes;
11436
+ ctx2[10].shapes;
11339
11437
  if (dirty[0] & /*shapes_panel*/
11340
- 4096)
11438
+ 8192)
11341
11439
  shapes_changes.menu = /*shapes_panel*/
11342
- ctx2[12];
11440
+ ctx2[13];
11343
11441
  shapes2.$set(shapes_changes);
11344
11442
  },
11345
11443
  i(local) {
@@ -11364,7 +11462,7 @@ function create_if_block_5(ctx) {
11364
11462
  props: {
11365
11463
  appliance: (
11366
11464
  /*appliance*/
11367
- ctx[16]
11465
+ ctx[17]
11368
11466
  ),
11369
11467
  theme: (
11370
11468
  /*theme*/
@@ -11372,22 +11470,22 @@ function create_if_block_5(ctx) {
11372
11470
  ),
11373
11471
  btn_props: (
11374
11472
  /*btn_props*/
11375
- ctx[14]
11473
+ ctx[15]
11376
11474
  ),
11377
11475
  content: (
11378
11476
  /*c*/
11379
- ctx[18].text
11477
+ ctx[19].text
11380
11478
  ),
11381
11479
  menu: (
11382
11480
  /*text_panel*/
11383
- ctx[11]
11481
+ ctx[12]
11384
11482
  )
11385
11483
  }
11386
11484
  });
11387
11485
  text_1.$on(
11388
11486
  "click",
11389
11487
  /*text*/
11390
- ctx[27]
11488
+ ctx[28]
11391
11489
  );
11392
11490
  return {
11393
11491
  c() {
@@ -11400,25 +11498,25 @@ function create_if_block_5(ctx) {
11400
11498
  p(ctx2, dirty) {
11401
11499
  const text_1_changes = {};
11402
11500
  if (dirty[0] & /*appliance*/
11403
- 65536)
11501
+ 131072)
11404
11502
  text_1_changes.appliance = /*appliance*/
11405
- ctx2[16];
11503
+ ctx2[17];
11406
11504
  if (dirty[0] & /*theme*/
11407
11505
  2)
11408
11506
  text_1_changes.theme = /*theme*/
11409
11507
  ctx2[1];
11410
11508
  if (dirty[0] & /*btn_props*/
11411
- 16384)
11509
+ 32768)
11412
11510
  text_1_changes.btn_props = /*btn_props*/
11413
- ctx2[14];
11511
+ ctx2[15];
11414
11512
  if (dirty[0] & /*c*/
11415
- 262144)
11513
+ 524288)
11416
11514
  text_1_changes.content = /*c*/
11417
- ctx2[18].text;
11515
+ ctx2[19].text;
11418
11516
  if (dirty[0] & /*text_panel*/
11419
- 2048)
11517
+ 4096)
11420
11518
  text_1_changes.menu = /*text_panel*/
11421
- ctx2[11];
11519
+ ctx2[12];
11422
11520
  text_1.$set(text_1_changes);
11423
11521
  },
11424
11522
  i(local) {
@@ -11443,7 +11541,7 @@ function create_if_block_4(ctx) {
11443
11541
  props: {
11444
11542
  appliance: (
11445
11543
  /*appliance*/
11446
- ctx[16]
11544
+ ctx[17]
11447
11545
  ),
11448
11546
  theme: (
11449
11547
  /*theme*/
@@ -11451,22 +11549,22 @@ function create_if_block_4(ctx) {
11451
11549
  ),
11452
11550
  btn_props: (
11453
11551
  /*btn_props*/
11454
- ctx[14]
11552
+ ctx[15]
11455
11553
  ),
11456
11554
  content: (
11457
11555
  /*c*/
11458
- ctx[18].pencil
11556
+ ctx[19].pencil
11459
11557
  ),
11460
11558
  menu: (
11461
11559
  /*pencil_panel*/
11462
- ctx[10]
11560
+ ctx[11]
11463
11561
  )
11464
11562
  }
11465
11563
  });
11466
11564
  pencil_1.$on(
11467
11565
  "click",
11468
11566
  /*pencil*/
11469
- ctx[26]
11567
+ ctx[27]
11470
11568
  );
11471
11569
  return {
11472
11570
  c() {
@@ -11479,25 +11577,25 @@ function create_if_block_4(ctx) {
11479
11577
  p(ctx2, dirty) {
11480
11578
  const pencil_1_changes = {};
11481
11579
  if (dirty[0] & /*appliance*/
11482
- 65536)
11580
+ 131072)
11483
11581
  pencil_1_changes.appliance = /*appliance*/
11484
- ctx2[16];
11582
+ ctx2[17];
11485
11583
  if (dirty[0] & /*theme*/
11486
11584
  2)
11487
11585
  pencil_1_changes.theme = /*theme*/
11488
11586
  ctx2[1];
11489
11587
  if (dirty[0] & /*btn_props*/
11490
- 16384)
11588
+ 32768)
11491
11589
  pencil_1_changes.btn_props = /*btn_props*/
11492
- ctx2[14];
11590
+ ctx2[15];
11493
11591
  if (dirty[0] & /*c*/
11494
- 262144)
11592
+ 524288)
11495
11593
  pencil_1_changes.content = /*c*/
11496
- ctx2[18].pencil;
11594
+ ctx2[19].pencil;
11497
11595
  if (dirty[0] & /*pencil_panel*/
11498
- 1024)
11596
+ 2048)
11499
11597
  pencil_1_changes.menu = /*pencil_panel*/
11500
- ctx2[10];
11598
+ ctx2[11];
11501
11599
  pencil_1.$set(pencil_1_changes);
11502
11600
  },
11503
11601
  i(local) {
@@ -11522,7 +11620,7 @@ function create_if_block_3(ctx) {
11522
11620
  props: {
11523
11621
  appliance: (
11524
11622
  /*appliance*/
11525
- ctx[16]
11623
+ ctx[17]
11526
11624
  ),
11527
11625
  theme: (
11528
11626
  /*theme*/
@@ -11530,18 +11628,18 @@ function create_if_block_3(ctx) {
11530
11628
  ),
11531
11629
  btn_props: (
11532
11630
  /*btn_props*/
11533
- ctx[14]
11631
+ ctx[15]
11534
11632
  ),
11535
11633
  content: (
11536
11634
  /*c*/
11537
- ctx[18].selector
11635
+ ctx[19].selector
11538
11636
  )
11539
11637
  }
11540
11638
  });
11541
11639
  selector_1.$on(
11542
11640
  "click",
11543
11641
  /*selector*/
11544
- ctx[25]
11642
+ ctx[26]
11545
11643
  );
11546
11644
  return {
11547
11645
  c() {
@@ -11554,21 +11652,21 @@ function create_if_block_3(ctx) {
11554
11652
  p(ctx2, dirty) {
11555
11653
  const selector_1_changes = {};
11556
11654
  if (dirty[0] & /*appliance*/
11557
- 65536)
11655
+ 131072)
11558
11656
  selector_1_changes.appliance = /*appliance*/
11559
- ctx2[16];
11657
+ ctx2[17];
11560
11658
  if (dirty[0] & /*theme*/
11561
11659
  2)
11562
11660
  selector_1_changes.theme = /*theme*/
11563
11661
  ctx2[1];
11564
11662
  if (dirty[0] & /*btn_props*/
11565
- 16384)
11663
+ 32768)
11566
11664
  selector_1_changes.btn_props = /*btn_props*/
11567
- ctx2[14];
11665
+ ctx2[15];
11568
11666
  if (dirty[0] & /*c*/
11569
- 262144)
11667
+ 524288)
11570
11668
  selector_1_changes.content = /*c*/
11571
- ctx2[18].selector;
11669
+ ctx2[19].selector;
11572
11670
  selector_1.$set(selector_1_changes);
11573
11671
  },
11574
11672
  i(local) {
@@ -11593,7 +11691,7 @@ function create_if_block_2(ctx) {
11593
11691
  props: {
11594
11692
  appliance: (
11595
11693
  /*appliance*/
11596
- ctx[16]
11694
+ ctx[17]
11597
11695
  ),
11598
11696
  theme: (
11599
11697
  /*theme*/
@@ -11601,18 +11699,18 @@ function create_if_block_2(ctx) {
11601
11699
  ),
11602
11700
  btn_props: (
11603
11701
  /*btn_props*/
11604
- ctx[14]
11702
+ ctx[15]
11605
11703
  ),
11606
11704
  content: (
11607
11705
  /*c*/
11608
- ctx[18].clicker
11706
+ ctx[19].clicker
11609
11707
  )
11610
11708
  }
11611
11709
  });
11612
11710
  clicker_1.$on(
11613
11711
  "click",
11614
11712
  /*clicker*/
11615
- ctx[24]
11713
+ ctx[25]
11616
11714
  );
11617
11715
  return {
11618
11716
  c() {
@@ -11625,21 +11723,21 @@ function create_if_block_2(ctx) {
11625
11723
  p(ctx2, dirty) {
11626
11724
  const clicker_1_changes = {};
11627
11725
  if (dirty[0] & /*appliance*/
11628
- 65536)
11726
+ 131072)
11629
11727
  clicker_1_changes.appliance = /*appliance*/
11630
- ctx2[16];
11728
+ ctx2[17];
11631
11729
  if (dirty[0] & /*theme*/
11632
11730
  2)
11633
11731
  clicker_1_changes.theme = /*theme*/
11634
11732
  ctx2[1];
11635
11733
  if (dirty[0] & /*btn_props*/
11636
- 16384)
11734
+ 32768)
11637
11735
  clicker_1_changes.btn_props = /*btn_props*/
11638
- ctx2[14];
11736
+ ctx2[15];
11639
11737
  if (dirty[0] & /*c*/
11640
- 262144)
11738
+ 524288)
11641
11739
  clicker_1_changes.content = /*c*/
11642
- ctx2[18].clicker;
11740
+ ctx2[19].clicker;
11643
11741
  clicker_1.$set(clicker_1_changes);
11644
11742
  },
11645
11743
  i(local) {
@@ -11677,47 +11775,47 @@ function create_each_block_1(ctx) {
11677
11775
  function select_block_type(ctx2, dirty) {
11678
11776
  if (
11679
11777
  /*item*/
11680
- ctx2[52] === "clicker"
11778
+ ctx2[53] === "clicker"
11681
11779
  )
11682
11780
  return 0;
11683
11781
  if (
11684
11782
  /*item*/
11685
- ctx2[52] === "selector"
11783
+ ctx2[53] === "selector"
11686
11784
  )
11687
11785
  return 1;
11688
11786
  if (
11689
11787
  /*item*/
11690
- ctx2[52] === "pencil"
11788
+ ctx2[53] === "pencil"
11691
11789
  )
11692
11790
  return 2;
11693
11791
  if (
11694
11792
  /*item*/
11695
- ctx2[52] === "text"
11793
+ ctx2[53] === "text"
11696
11794
  )
11697
11795
  return 3;
11698
11796
  if (
11699
11797
  /*item*/
11700
- ctx2[52] === "shapes"
11798
+ ctx2[53] === "shapes"
11701
11799
  )
11702
11800
  return 4;
11703
11801
  if (
11704
11802
  /*item*/
11705
- ctx2[52] === "eraser"
11803
+ ctx2[53] === "eraser"
11706
11804
  )
11707
11805
  return 5;
11708
11806
  if (
11709
11807
  /*item*/
11710
- ctx2[52] === "clear"
11808
+ ctx2[53] === "clear"
11711
11809
  )
11712
11810
  return 6;
11713
11811
  if (
11714
11812
  /*item*/
11715
- ctx2[52] === "hand"
11813
+ ctx2[53] === "hand"
11716
11814
  )
11717
11815
  return 7;
11718
11816
  if (
11719
11817
  /*item*/
11720
- ctx2[52] === "laserPointer"
11818
+ ctx2[53] === "laserPointer"
11721
11819
  )
11722
11820
  return 8;
11723
11821
  return -1;
@@ -11793,14 +11891,14 @@ function create_if_block_12(ctx) {
11793
11891
  const button_spread_levels = [
11794
11892
  { class: "apps" },
11795
11893
  /*btn_props*/
11796
- ctx[14],
11894
+ ctx[15],
11797
11895
  { content: (
11798
11896
  /*t*/
11799
- ctx[9].apps
11897
+ ctx[10].apps
11800
11898
  ) },
11801
11899
  { menu: (
11802
11900
  /*apps_panel*/
11803
- ctx[13]
11901
+ ctx[14]
11804
11902
  ) },
11805
11903
  {
11806
11904
  menu_placement: (
@@ -11827,22 +11925,22 @@ function create_if_block_12(ctx) {
11827
11925
  },
11828
11926
  p(ctx2, dirty) {
11829
11927
  const button_changes = dirty[0] & /*btn_props, t, apps_panel, placement*/
11830
- 25152 ? get_spread_update(button_spread_levels, [
11928
+ 50240 ? get_spread_update(button_spread_levels, [
11831
11929
  button_spread_levels[0],
11832
11930
  dirty[0] & /*btn_props*/
11833
- 16384 && get_spread_object(
11931
+ 32768 && get_spread_object(
11834
11932
  /*btn_props*/
11835
- ctx2[14]
11933
+ ctx2[15]
11836
11934
  ),
11837
11935
  dirty[0] & /*t*/
11838
- 512 && { content: (
11936
+ 1024 && { content: (
11839
11937
  /*t*/
11840
- ctx2[9].apps
11938
+ ctx2[10].apps
11841
11939
  ) },
11842
11940
  dirty[0] & /*apps_panel*/
11843
- 8192 && { menu: (
11941
+ 16384 && { menu: (
11844
11942
  /*apps_panel*/
11845
- ctx2[13]
11943
+ ctx2[14]
11846
11944
  ) },
11847
11945
  dirty[0] & /*placement*/
11848
11946
  64 && {
@@ -11854,7 +11952,7 @@ function create_if_block_12(ctx) {
11854
11952
  ]) : {};
11855
11953
  if (dirty[0] & /*theme*/
11856
11954
  2 | dirty[1] & /*$$scope*/
11857
- 16777216) {
11955
+ 33554432) {
11858
11956
  button_changes.$$scope = { dirty, ctx: ctx2 };
11859
11957
  }
11860
11958
  button.$set(button_changes);
@@ -11934,7 +12032,7 @@ function create_if_block14(ctx) {
11934
12032
  button.$on(
11935
12033
  "click",
11936
12034
  /*scroll_down*/
11937
- ctx[23]
12035
+ ctx[24]
11938
12036
  );
11939
12037
  return {
11940
12038
  c() {
@@ -11956,7 +12054,7 @@ function create_if_block14(ctx) {
11956
12054
  ctx2[3];
11957
12055
  if (dirty[0] & /*theme*/
11958
12056
  2 | dirty[1] & /*$$scope*/
11959
- 16777216) {
12057
+ 33554432) {
11960
12058
  button_changes.$$scope = { dirty, ctx: ctx2 };
11961
12059
  }
11962
12060
  button.$set(button_changes);
@@ -12025,7 +12123,7 @@ function create_each_block4(ctx) {
12025
12123
  let span;
12026
12124
  let t1_value = (
12027
12125
  /*label*/
12028
- ctx[45] + ""
12126
+ ctx[46] + ""
12029
12127
  );
12030
12128
  let t1;
12031
12129
  let span_class_value;
@@ -12047,40 +12145,40 @@ function create_each_block4(ctx) {
12047
12145
  attr(img, "class", img_class_value = name5 + "-app-btn-icon " + /*theme*/
12048
12146
  ctx[1]);
12049
12147
  if (!src_url_equal(img.src, img_src_value = /*icon*/
12050
- ctx[44]))
12148
+ ctx[45]))
12051
12149
  attr(img, "src", img_src_value);
12052
12150
  attr(img, "alt", img_alt_value = /*kind*/
12053
- ctx[46]);
12151
+ ctx[47]);
12054
12152
  attr(img, "title", img_title_value = /*label*/
12055
- ctx[45]);
12153
+ ctx[46]);
12056
12154
  attr(span, "class", span_class_value = name5 + "-app-btn-text " + /*theme*/
12057
12155
  ctx[1]);
12058
12156
  attr(button, "class", button_class_value = name5 + "-app-btn " + /*kind*/
12059
- ctx[46] + " " + /*theme*/
12157
+ ctx[47] + " " + /*theme*/
12060
12158
  ctx[1]);
12061
12159
  attr(button, "title", button_title_value = /*label*/
12062
- ctx[45] + /*state*/
12063
- (ctx[48] && /*state*/
12064
- ctx[48].reason ? ": " + /*state*/
12065
- ctx[48].reason : ""));
12160
+ ctx[46] + /*state*/
12161
+ (ctx[49] && /*state*/
12162
+ ctx[49].reason ? ": " + /*state*/
12163
+ ctx[49].reason : ""));
12066
12164
  attr(button, "data-app-kind", button_data_app_kind_value = /*netless_app*/
12067
- ctx[43].kind);
12165
+ ctx[44].kind);
12068
12166
  button.disabled = button_disabled_value = /*state*/
12069
- ctx[48] && /*state*/
12070
- ctx[48].status !== "idle";
12167
+ ctx[49] && /*state*/
12168
+ ctx[49].status !== "idle";
12071
12169
  toggle_class(
12072
12170
  button,
12073
12171
  "is-loading",
12074
12172
  /*state*/
12075
- ctx[48] && /*state*/
12076
- ctx[48].status === "loading"
12173
+ ctx[49] && /*state*/
12174
+ ctx[49].status === "loading"
12077
12175
  );
12078
12176
  toggle_class(
12079
12177
  button,
12080
12178
  "is-failed",
12081
12179
  /*state*/
12082
- ctx[48] && /*state*/
12083
- ctx[48].status === "failed"
12180
+ ctx[49] && /*state*/
12181
+ ctx[49].status === "failed"
12084
12182
  );
12085
12183
  },
12086
12184
  m(target, anchor) {
@@ -12094,9 +12192,9 @@ function create_each_block4(ctx) {
12094
12192
  dispose = listen(button, "click", function() {
12095
12193
  if (is_function(
12096
12194
  /*on_click*/
12097
- ctx[49]
12195
+ ctx[50]
12098
12196
  ))
12099
- ctx[49].apply(this, arguments);
12197
+ ctx[50].apply(this, arguments);
12100
12198
  });
12101
12199
  mounted = true;
12102
12200
  }
@@ -12109,23 +12207,23 @@ function create_each_block4(ctx) {
12109
12207
  attr(img, "class", img_class_value);
12110
12208
  }
12111
12209
  if (dirty[0] & /*$apps*/
12112
- 524288 && !src_url_equal(img.src, img_src_value = /*icon*/
12113
- ctx[44])) {
12210
+ 1048576 && !src_url_equal(img.src, img_src_value = /*icon*/
12211
+ ctx[45])) {
12114
12212
  attr(img, "src", img_src_value);
12115
12213
  }
12116
12214
  if (dirty[0] & /*$apps*/
12117
- 524288 && img_alt_value !== (img_alt_value = /*kind*/
12118
- ctx[46])) {
12215
+ 1048576 && img_alt_value !== (img_alt_value = /*kind*/
12216
+ ctx[47])) {
12119
12217
  attr(img, "alt", img_alt_value);
12120
12218
  }
12121
12219
  if (dirty[0] & /*$apps*/
12122
- 524288 && img_title_value !== (img_title_value = /*label*/
12123
- ctx[45])) {
12220
+ 1048576 && img_title_value !== (img_title_value = /*label*/
12221
+ ctx[46])) {
12124
12222
  attr(img, "title", img_title_value);
12125
12223
  }
12126
12224
  if (dirty[0] & /*$apps*/
12127
- 524288 && t1_value !== (t1_value = /*label*/
12128
- ctx[45] + ""))
12225
+ 1048576 && t1_value !== (t1_value = /*label*/
12226
+ ctx[46] + ""))
12129
12227
  set_data(t1, t1_value);
12130
12228
  if (dirty[0] & /*theme*/
12131
12229
  2 && span_class_value !== (span_class_value = name5 + "-app-btn-text " + /*theme*/
@@ -12133,48 +12231,48 @@ function create_each_block4(ctx) {
12133
12231
  attr(span, "class", span_class_value);
12134
12232
  }
12135
12233
  if (dirty[0] & /*$apps, theme*/
12136
- 524290 && button_class_value !== (button_class_value = name5 + "-app-btn " + /*kind*/
12137
- ctx[46] + " " + /*theme*/
12234
+ 1048578 && button_class_value !== (button_class_value = name5 + "-app-btn " + /*kind*/
12235
+ ctx[47] + " " + /*theme*/
12138
12236
  ctx[1])) {
12139
12237
  attr(button, "class", button_class_value);
12140
12238
  }
12141
12239
  if (dirty[0] & /*$apps, $status*/
12142
- 1572864 && button_title_value !== (button_title_value = /*label*/
12143
- ctx[45] + /*state*/
12144
- (ctx[48] && /*state*/
12145
- ctx[48].reason ? ": " + /*state*/
12146
- ctx[48].reason : ""))) {
12240
+ 3145728 && button_title_value !== (button_title_value = /*label*/
12241
+ ctx[46] + /*state*/
12242
+ (ctx[49] && /*state*/
12243
+ ctx[49].reason ? ": " + /*state*/
12244
+ ctx[49].reason : ""))) {
12147
12245
  attr(button, "title", button_title_value);
12148
12246
  }
12149
12247
  if (dirty[0] & /*$apps*/
12150
- 524288 && button_data_app_kind_value !== (button_data_app_kind_value = /*netless_app*/
12151
- ctx[43].kind)) {
12248
+ 1048576 && button_data_app_kind_value !== (button_data_app_kind_value = /*netless_app*/
12249
+ ctx[44].kind)) {
12152
12250
  attr(button, "data-app-kind", button_data_app_kind_value);
12153
12251
  }
12154
12252
  if (dirty[0] & /*$status, $apps*/
12155
- 1572864 && button_disabled_value !== (button_disabled_value = /*state*/
12156
- ctx[48] && /*state*/
12157
- ctx[48].status !== "idle")) {
12253
+ 3145728 && button_disabled_value !== (button_disabled_value = /*state*/
12254
+ ctx[49] && /*state*/
12255
+ ctx[49].status !== "idle")) {
12158
12256
  button.disabled = button_disabled_value;
12159
12257
  }
12160
12258
  if (dirty[0] & /*$apps, theme, $status, $apps*/
12161
- 1572866) {
12259
+ 3145730) {
12162
12260
  toggle_class(
12163
12261
  button,
12164
12262
  "is-loading",
12165
12263
  /*state*/
12166
- ctx[48] && /*state*/
12167
- ctx[48].status === "loading"
12264
+ ctx[49] && /*state*/
12265
+ ctx[49].status === "loading"
12168
12266
  );
12169
12267
  }
12170
12268
  if (dirty[0] & /*$apps, theme, $status, $apps*/
12171
- 1572866) {
12269
+ 3145730) {
12172
12270
  toggle_class(
12173
12271
  button,
12174
12272
  "is-failed",
12175
12273
  /*state*/
12176
- ctx[48] && /*state*/
12177
- ctx[48].status === "failed"
12274
+ ctx[49] && /*state*/
12275
+ ctx[49].status === "failed"
12178
12276
  );
12179
12277
  }
12180
12278
  },
@@ -12269,6 +12367,10 @@ function create_fragment67(ctx) {
12269
12367
  disabled: (
12270
12368
  /*disabled*/
12271
12369
  ctx[3]
12370
+ ),
12371
+ colors: (
12372
+ /*colors*/
12373
+ ctx[9]
12272
12374
  )
12273
12375
  }
12274
12376
  });
@@ -12285,6 +12387,10 @@ function create_fragment67(ctx) {
12285
12387
  disabled: (
12286
12388
  /*disabled*/
12287
12389
  ctx[3]
12390
+ ),
12391
+ colors: (
12392
+ /*colors*/
12393
+ ctx[9]
12288
12394
  )
12289
12395
  }
12290
12396
  });
@@ -12337,12 +12443,16 @@ function create_fragment67(ctx) {
12337
12443
  disabled: (
12338
12444
  /*disabled*/
12339
12445
  ctx[3]
12446
+ ),
12447
+ colors: (
12448
+ /*colors*/
12449
+ ctx[9]
12340
12450
  )
12341
12451
  }
12342
12452
  });
12343
12453
  let each_value = (
12344
12454
  /*$apps*/
12345
- ctx[19]
12455
+ ctx[20]
12346
12456
  );
12347
12457
  let each_blocks = [];
12348
12458
  for (let i = 0; i < each_value.length; i += 1) {
@@ -12408,7 +12518,7 @@ function create_fragment67(ctx) {
12408
12518
  div7,
12409
12519
  "--n",
12410
12520
  /*$apps*/
12411
- ctx[19].length
12521
+ ctx[20].length
12412
12522
  );
12413
12523
  attr(div8, "class", name5 + "-panel-wrapper");
12414
12524
  set_style(div8, "display", "none");
@@ -12437,11 +12547,11 @@ function create_fragment67(ctx) {
12437
12547
  append(div2, div1);
12438
12548
  append(div2, t5);
12439
12549
  mount_component(strokecolor0, div2, null);
12440
- ctx[36](div2);
12550
+ ctx[37](div2);
12441
12551
  append(div8, t6);
12442
12552
  append(div8, div3);
12443
12553
  mount_component(textcolor, div3, null);
12444
- ctx[37](div3);
12554
+ ctx[38](div3);
12445
12555
  append(div8, t7);
12446
12556
  append(div8, div6);
12447
12557
  mount_component(selectshapes, div6, null);
@@ -12453,7 +12563,7 @@ function create_fragment67(ctx) {
12453
12563
  append(div6, div5);
12454
12564
  append(div6, t11);
12455
12565
  mount_component(strokecolor1, div6, null);
12456
- ctx[38](div6);
12566
+ ctx[39](div6);
12457
12567
  append(div8, t12);
12458
12568
  append(div8, div7);
12459
12569
  for (let i = 0; i < each_blocks.length; i += 1) {
@@ -12461,7 +12571,7 @@ function create_fragment67(ctx) {
12461
12571
  each_blocks[i].m(div7, null);
12462
12572
  }
12463
12573
  }
12464
- ctx[40](div7);
12574
+ ctx[41](div7);
12465
12575
  current = true;
12466
12576
  if (!mounted) {
12467
12577
  dispose = [
@@ -12475,7 +12585,7 @@ function create_fragment67(ctx) {
12475
12585
  null,
12476
12586
  div0,
12477
12587
  /*top*/
12478
- ctx[21]
12588
+ ctx[22]
12479
12589
  ))
12480
12590
  ];
12481
12591
  mounted = true;
@@ -12505,9 +12615,9 @@ function create_fragment67(ctx) {
12505
12615
  });
12506
12616
  check_outros();
12507
12617
  }
12508
- if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand, laserPointer*/
12509
- 2131058307 | dirty[1] & /*clear*/
12510
- 1) {
12618
+ if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand*/
12619
+ 2114632835 | dirty[1] & /*clear, laserPointer*/
12620
+ 3) {
12511
12621
  each_value_1 = /*items*/
12512
12622
  ctx2[7];
12513
12623
  let i;
@@ -12616,6 +12726,10 @@ function create_fragment67(ctx) {
12616
12726
  8)
12617
12727
  strokecolor0_changes.disabled = /*disabled*/
12618
12728
  ctx2[3];
12729
+ if (dirty[0] & /*colors*/
12730
+ 512)
12731
+ strokecolor0_changes.colors = /*colors*/
12732
+ ctx2[9];
12619
12733
  strokecolor0.$set(strokecolor0_changes);
12620
12734
  const textcolor_changes = {};
12621
12735
  if (dirty[0] & /*app*/
@@ -12630,6 +12744,10 @@ function create_fragment67(ctx) {
12630
12744
  8)
12631
12745
  textcolor_changes.disabled = /*disabled*/
12632
12746
  ctx2[3];
12747
+ if (dirty[0] & /*colors*/
12748
+ 512)
12749
+ textcolor_changes.colors = /*colors*/
12750
+ ctx2[9];
12633
12751
  textcolor.$set(textcolor_changes);
12634
12752
  const selectshapes_changes = {};
12635
12753
  if (dirty[0] & /*app*/
@@ -12676,11 +12794,15 @@ function create_fragment67(ctx) {
12676
12794
  8)
12677
12795
  strokecolor1_changes.disabled = /*disabled*/
12678
12796
  ctx2[3];
12797
+ if (dirty[0] & /*colors*/
12798
+ 512)
12799
+ strokecolor1_changes.colors = /*colors*/
12800
+ ctx2[9];
12679
12801
  strokecolor1.$set(strokecolor1_changes);
12680
12802
  if (dirty[0] & /*$apps, theme, $status, app*/
12681
- 1572867) {
12803
+ 3145731) {
12682
12804
  each_value = /*$apps*/
12683
- ctx2[19];
12805
+ ctx2[20];
12684
12806
  let i;
12685
12807
  for (i = 0; i < each_value.length; i += 1) {
12686
12808
  const child_ctx = get_each_context4(ctx2, each_value, i);
@@ -12698,12 +12820,12 @@ function create_fragment67(ctx) {
12698
12820
  each_blocks.length = each_value.length;
12699
12821
  }
12700
12822
  if (!current || dirty[0] & /*$apps*/
12701
- 524288) {
12823
+ 1048576) {
12702
12824
  set_style(
12703
12825
  div7,
12704
12826
  "--n",
12705
12827
  /*$apps*/
12706
- ctx2[19].length
12828
+ ctx2[20].length
12707
12829
  );
12708
12830
  }
12709
12831
  },
@@ -12760,15 +12882,15 @@ function create_fragment67(ctx) {
12760
12882
  detach(div8);
12761
12883
  destroy_component(strokewidth0);
12762
12884
  destroy_component(strokecolor0);
12763
- ctx[36](null);
12764
- destroy_component(textcolor);
12765
12885
  ctx[37](null);
12886
+ destroy_component(textcolor);
12887
+ ctx[38](null);
12766
12888
  destroy_component(selectshapes);
12767
12889
  destroy_component(strokewidth1);
12768
12890
  destroy_component(strokecolor1);
12769
- ctx[38](null);
12891
+ ctx[39](null);
12770
12892
  destroy_each(each_blocks, detaching);
12771
- ctx[40](null);
12893
+ ctx[41](null);
12772
12894
  mounted = false;
12773
12895
  run_all(dispose);
12774
12896
  }
@@ -12784,11 +12906,11 @@ function instance67($$self, $$props, $$invalidate) {
12784
12906
  let status;
12785
12907
  let max_scroll;
12786
12908
  let $top;
12787
- let $scroll_height, $$unsubscribe_scroll_height = noop, $$subscribe_scroll_height = () => ($$unsubscribe_scroll_height(), $$unsubscribe_scroll_height = subscribe(scroll_height, ($$value) => $$invalidate(34, $scroll_height = $$value)), scroll_height);
12788
- let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(35, $memberState = $$value)), memberState);
12909
+ let $scroll_height, $$unsubscribe_scroll_height = noop, $$subscribe_scroll_height = () => ($$unsubscribe_scroll_height(), $$unsubscribe_scroll_height = subscribe(scroll_height, ($$value) => $$invalidate(35, $scroll_height = $$value)), scroll_height);
12910
+ let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(36, $memberState = $$value)), memberState);
12789
12911
  let $apps;
12790
- let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(20, $status = $$value)), status);
12791
- component_subscribe($$self, apps, ($$value) => $$invalidate(19, $apps = $$value));
12912
+ let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(21, $status = $$value)), status);
12913
+ component_subscribe($$self, apps, ($$value) => $$invalidate(20, $apps = $$value));
12792
12914
  $$self.$$.on_destroy.push(() => $$unsubscribe_scroll_height());
12793
12915
  $$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
12794
12916
  $$self.$$.on_destroy.push(() => $$unsubscribe_status());
@@ -12803,13 +12925,14 @@ function instance67($$self, $$props, $$invalidate) {
12803
12925
  let { placement = "left" } = $$props;
12804
12926
  let { items = default_items } = $$props;
12805
12927
  let { hide_apps = false } = $$props;
12928
+ let { colors: colors2 = default_colors } = $$props;
12806
12929
  let pencil_panel;
12807
12930
  let text_panel;
12808
12931
  let shapes_panel;
12809
12932
  let apps_panel;
12810
12933
  let btn_props;
12811
12934
  let top = writable(0);
12812
- component_subscribe($$self, top, (value) => $$invalidate(42, $top = value));
12935
+ component_subscribe($$self, top, (value) => $$invalidate(43, $top = value));
12813
12936
  function scroll_up() {
12814
12937
  set_store_value(top, $top = clamp($top - 32 - 4, 0, max_scroll), $top);
12815
12938
  }
@@ -12843,19 +12966,19 @@ function instance67($$self, $$props, $$invalidate) {
12843
12966
  function div2_binding($$value) {
12844
12967
  binding_callbacks[$$value ? "unshift" : "push"](() => {
12845
12968
  pencil_panel = $$value;
12846
- $$invalidate(10, pencil_panel);
12969
+ $$invalidate(11, pencil_panel);
12847
12970
  });
12848
12971
  }
12849
12972
  function div3_binding($$value) {
12850
12973
  binding_callbacks[$$value ? "unshift" : "push"](() => {
12851
12974
  text_panel = $$value;
12852
- $$invalidate(11, text_panel);
12975
+ $$invalidate(12, text_panel);
12853
12976
  });
12854
12977
  }
12855
12978
  function div6_binding($$value) {
12856
12979
  binding_callbacks[$$value ? "unshift" : "push"](() => {
12857
12980
  shapes_panel = $$value;
12858
- $$invalidate(12, shapes_panel);
12981
+ $$invalidate(13, shapes_panel);
12859
12982
  });
12860
12983
  }
12861
12984
  const func = (onClick) => {
@@ -12865,7 +12988,7 @@ function instance67($$self, $$props, $$invalidate) {
12865
12988
  function div7_binding($$value) {
12866
12989
  binding_callbacks[$$value ? "unshift" : "push"](() => {
12867
12990
  apps_panel = $$value;
12868
- $$invalidate(13, apps_panel);
12991
+ $$invalidate(14, apps_panel);
12869
12992
  });
12870
12993
  }
12871
12994
  $$self.$$set = ($$props2) => {
@@ -12880,7 +13003,7 @@ function instance67($$self, $$props, $$invalidate) {
12880
13003
  if ("scroll_height" in $$props2)
12881
13004
  $$subscribe_scroll_height($$invalidate(4, scroll_height = $$props2.scroll_height));
12882
13005
  if ("computed_height" in $$props2)
12883
- $$invalidate(32, computed_height = $$props2.computed_height);
13006
+ $$invalidate(33, computed_height = $$props2.computed_height);
12884
13007
  if ("scrollable" in $$props2)
12885
13008
  $$invalidate(5, scrollable = $$props2.scrollable);
12886
13009
  if ("placement" in $$props2)
@@ -12889,11 +13012,13 @@ function instance67($$self, $$props, $$invalidate) {
12889
13012
  $$invalidate(7, items = $$props2.items);
12890
13013
  if ("hide_apps" in $$props2)
12891
13014
  $$invalidate(8, hide_apps = $$props2.hide_apps);
13015
+ if ("colors" in $$props2)
13016
+ $$invalidate(9, colors2 = $$props2.colors);
12892
13017
  };
12893
13018
  $$self.$$.update = () => {
12894
13019
  if ($$self.$$.dirty[0] & /*theme, disabled, placement*/
12895
13020
  74) {
12896
- $$invalidate(14, btn_props = {
13021
+ $$invalidate(15, btn_props = {
12897
13022
  name: name5,
12898
13023
  theme,
12899
13024
  disabled,
@@ -12903,16 +13028,16 @@ function instance67($$self, $$props, $$invalidate) {
12903
13028
  }
12904
13029
  if ($$self.$$.dirty[0] & /*language*/
12905
13030
  4) {
12906
- $$invalidate(9, t = i18n4[language]);
13031
+ $$invalidate(10, t = i18n4[language]);
12907
13032
  }
12908
13033
  if ($$self.$$.dirty[0] & /*app*/
12909
13034
  1) {
12910
- $$invalidate(33, hotkeys = app == null ? void 0 : app.hotKeys);
13035
+ $$invalidate(34, hotkeys = app == null ? void 0 : app.hotKeys);
12911
13036
  }
12912
13037
  if ($$self.$$.dirty[0] & /*t*/
12913
- 512 | $$self.$$.dirty[1] & /*hotkeys*/
12914
- 4) {
12915
- $$invalidate(18, c = {
13038
+ 1024 | $$self.$$.dirty[1] & /*hotkeys*/
13039
+ 8) {
13040
+ $$invalidate(19, c = {
12916
13041
  clicker: tooltip(t.clicker, hotkeys == null ? void 0 : hotkeys.changeToClick),
12917
13042
  selector: tooltip(t.selector, hotkeys == null ? void 0 : hotkeys.changeToSelector),
12918
13043
  pencil: tooltip(t.pencil, hotkeys == null ? void 0 : hotkeys.changeToPencil),
@@ -12924,19 +13049,19 @@ function instance67($$self, $$props, $$invalidate) {
12924
13049
  }
12925
13050
  if ($$self.$$.dirty[0] & /*app*/
12926
13051
  1) {
12927
- $$subscribe_memberState($$invalidate(17, memberState = app == null ? void 0 : app.memberState));
13052
+ $$subscribe_memberState($$invalidate(18, memberState = app == null ? void 0 : app.memberState));
12928
13053
  }
12929
13054
  if ($$self.$$.dirty[1] & /*$memberState*/
12930
- 16) {
12931
- $$invalidate(16, appliance = $memberState == null ? void 0 : $memberState.currentApplianceName);
13055
+ 32) {
13056
+ $$invalidate(17, appliance = $memberState == null ? void 0 : $memberState.currentApplianceName);
12932
13057
  }
12933
13058
  if ($$self.$$.dirty[0] & /*app*/
12934
13059
  1) {
12935
- $$subscribe_status($$invalidate(15, status = app == null ? void 0 : app.appsStatus));
13060
+ $$subscribe_status($$invalidate(16, status = app == null ? void 0 : app.appsStatus));
12936
13061
  }
12937
13062
  if ($$self.$$.dirty[0] & /*scrollable*/
12938
13063
  32 | $$self.$$.dirty[1] & /*$scroll_height, computed_height*/
12939
- 10) {
13064
+ 20) {
12940
13065
  max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
12941
13066
  }
12942
13067
  };
@@ -12950,6 +13075,7 @@ function instance67($$self, $$props, $$invalidate) {
12950
13075
  placement,
12951
13076
  items,
12952
13077
  hide_apps,
13078
+ colors2,
12953
13079
  t,
12954
13080
  pencil_panel,
12955
13081
  text_panel,
@@ -12999,11 +13125,12 @@ var Contents = class extends SvelteComponent {
12999
13125
  language: 2,
13000
13126
  disabled: 3,
13001
13127
  scroll_height: 4,
13002
- computed_height: 32,
13128
+ computed_height: 33,
13003
13129
  scrollable: 5,
13004
13130
  placement: 6,
13005
13131
  items: 7,
13006
- hide_apps: 8
13132
+ hide_apps: 8,
13133
+ colors: 9
13007
13134
  },
13008
13135
  null,
13009
13136
  [-1, -1]
@@ -13102,30 +13229,34 @@ function create_fragment68(ctx) {
13102
13229
  ),
13103
13230
  disabled: (
13104
13231
  /*disabled*/
13105
- ctx[9]
13232
+ ctx[10]
13106
13233
  ),
13107
13234
  scroll_height: (
13108
13235
  /*scroll_height*/
13109
- ctx[13]
13236
+ ctx[14]
13110
13237
  ),
13111
13238
  computed_height: (
13112
13239
  /*computed_height*/
13113
- ctx[8]
13240
+ ctx[9]
13114
13241
  ),
13115
13242
  scrollable: (
13116
13243
  /*scrollable*/
13117
- ctx[7]
13244
+ ctx[8]
13118
13245
  ),
13119
13246
  placement: (
13120
13247
  /*placement*/
13121
- ctx[6]
13248
+ ctx[7]
13122
13249
  ),
13123
13250
  items: (
13124
13251
  /*items*/
13125
- ctx[5]
13252
+ ctx[6]
13126
13253
  ),
13127
13254
  hide_apps: (
13128
13255
  /*hide_apps*/
13256
+ ctx[5]
13257
+ ),
13258
+ colors: (
13259
+ /*colors*/
13129
13260
  ctx[4]
13130
13261
  )
13131
13262
  }
@@ -13159,9 +13290,9 @@ function create_fragment68(ctx) {
13159
13290
  div0,
13160
13291
  "height",
13161
13292
  /*scrollable*/
13162
- ctx[7] ? (
13293
+ ctx[8] ? (
13163
13294
  /*computed_height*/
13164
- ctx[8] + "px"
13295
+ ctx[9] + "px"
13165
13296
  ) : "auto"
13166
13297
  );
13167
13298
  attr(input, "type", "checkbox");
@@ -13207,13 +13338,13 @@ function create_fragment68(ctx) {
13207
13338
  input,
13208
13339
  "change",
13209
13340
  /*input_change_handler*/
13210
- ctx[19]
13341
+ ctx[20]
13211
13342
  ),
13212
13343
  action_destroyer(height.call(
13213
13344
  null,
13214
13345
  div1,
13215
13346
  /*container_height*/
13216
- ctx[12]
13347
+ ctx[13]
13217
13348
  ))
13218
13349
  ];
13219
13350
  mounted = true;
@@ -13234,28 +13365,32 @@ function create_fragment68(ctx) {
13234
13365
  contents_changes.language = /*language*/
13235
13366
  ctx2[2];
13236
13367
  if (dirty & /*disabled*/
13237
- 512)
13368
+ 1024)
13238
13369
  contents_changes.disabled = /*disabled*/
13239
- ctx2[9];
13370
+ ctx2[10];
13240
13371
  if (dirty & /*computed_height*/
13241
- 256)
13372
+ 512)
13242
13373
  contents_changes.computed_height = /*computed_height*/
13243
- ctx2[8];
13374
+ ctx2[9];
13244
13375
  if (dirty & /*scrollable*/
13245
- 128)
13376
+ 256)
13246
13377
  contents_changes.scrollable = /*scrollable*/
13247
- ctx2[7];
13378
+ ctx2[8];
13248
13379
  if (dirty & /*placement*/
13249
- 64)
13380
+ 128)
13250
13381
  contents_changes.placement = /*placement*/
13251
- ctx2[6];
13382
+ ctx2[7];
13252
13383
  if (dirty & /*items*/
13253
- 32)
13384
+ 64)
13254
13385
  contents_changes.items = /*items*/
13255
- ctx2[5];
13386
+ ctx2[6];
13256
13387
  if (dirty & /*hide_apps*/
13257
- 16)
13388
+ 32)
13258
13389
  contents_changes.hide_apps = /*hide_apps*/
13390
+ ctx2[5];
13391
+ if (dirty & /*colors*/
13392
+ 16)
13393
+ contents_changes.colors = /*colors*/
13259
13394
  ctx2[4];
13260
13395
  contents.$set(contents_changes);
13261
13396
  if (!current || dirty & /*theme*/
@@ -13264,14 +13399,14 @@ function create_fragment68(ctx) {
13264
13399
  attr(div0, "class", div0_class_value);
13265
13400
  }
13266
13401
  if (dirty & /*scrollable, computed_height*/
13267
- 384) {
13402
+ 768) {
13268
13403
  set_style(
13269
13404
  div0,
13270
13405
  "height",
13271
13406
  /*scrollable*/
13272
- ctx2[7] ? (
13407
+ ctx2[8] ? (
13273
13408
  /*computed_height*/
13274
- ctx2[8] + "px"
13409
+ ctx2[9] + "px"
13275
13410
  ) : "auto"
13276
13411
  );
13277
13412
  }
@@ -13340,10 +13475,11 @@ function instance68($$self, $$props, $$invalidate) {
13340
13475
  let placement;
13341
13476
  let items;
13342
13477
  let hide_apps;
13478
+ let colors2;
13343
13479
  let $container_height;
13344
13480
  let $scroll_height;
13345
- let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(17, $phase = $$value)), phase);
13346
- let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(18, $writable = $$value)), writable2);
13481
+ let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
13482
+ let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(19, $writable = $$value)), writable2);
13347
13483
  $$self.$$.on_destroy.push(() => $$unsubscribe_phase());
13348
13484
  $$self.$$.on_destroy.push(() => $$unsubscribe_writable());
13349
13485
  let { app = null } = $$props;
@@ -13353,9 +13489,9 @@ function instance68($$self, $$props, $$invalidate) {
13353
13489
  const extra_height = (32 + 4 + 4) * 2;
13354
13490
  let collapsed = config.collapsed;
13355
13491
  let container_height = writable(0);
13356
- component_subscribe($$self, container_height, (value) => $$invalidate(15, $container_height = value));
13492
+ component_subscribe($$self, container_height, (value) => $$invalidate(16, $container_height = value));
13357
13493
  let scroll_height = writable(0);
13358
- component_subscribe($$self, scroll_height, (value) => $$invalidate(16, $scroll_height = value));
13494
+ component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
13359
13495
  function input_change_handler() {
13360
13496
  collapsed = this.checked;
13361
13497
  $$invalidate(3, collapsed);
@@ -13368,41 +13504,45 @@ function instance68($$self, $$props, $$invalidate) {
13368
13504
  if ("language" in $$props2)
13369
13505
  $$invalidate(2, language = $$props2.language);
13370
13506
  if ("config" in $$props2)
13371
- $$invalidate(14, config = $$props2.config);
13507
+ $$invalidate(15, config = $$props2.config);
13372
13508
  };
13373
13509
  $$self.$$.update = () => {
13374
13510
  var _a;
13375
13511
  if ($$self.$$.dirty & /*app*/
13376
13512
  1) {
13377
- $$subscribe_writable($$invalidate(11, writable2 = app == null ? void 0 : app.writable));
13513
+ $$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
13378
13514
  }
13379
13515
  if ($$self.$$.dirty & /*app*/
13380
13516
  1) {
13381
- $$subscribe_phase($$invalidate(10, phase = app == null ? void 0 : app.phase));
13517
+ $$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
13382
13518
  }
13383
13519
  if ($$self.$$.dirty & /*$writable, $phase*/
13384
- 393216) {
13385
- $$invalidate(9, disabled = !($writable && $phase === "connected"));
13520
+ 786432) {
13521
+ $$invalidate(10, disabled = !($writable && $phase === "connected"));
13386
13522
  }
13387
13523
  if ($$self.$$.dirty & /*$container_height, $scroll_height*/
13388
- 98304) {
13389
- $$invalidate(8, computed_height = clamp($container_height, extra_height, $scroll_height + extra_height));
13524
+ 196608) {
13525
+ $$invalidate(9, computed_height = clamp($container_height, extra_height, $scroll_height + extra_height));
13390
13526
  }
13391
13527
  if ($$self.$$.dirty & /*$scroll_height, $container_height*/
13392
- 98304) {
13393
- $$invalidate(7, scrollable = $scroll_height + extra_height > $container_height);
13528
+ 196608) {
13529
+ $$invalidate(8, scrollable = $scroll_height + extra_height > $container_height);
13394
13530
  }
13395
13531
  if ($$self.$$.dirty & /*config*/
13396
- 16384) {
13397
- $$invalidate(6, placement = config.placement || "left");
13532
+ 32768) {
13533
+ $$invalidate(7, placement = config.placement || "left");
13398
13534
  }
13399
13535
  if ($$self.$$.dirty & /*config*/
13400
- 16384) {
13401
- $$invalidate(5, items = config.items || default_items);
13536
+ 32768) {
13537
+ $$invalidate(6, items = config.items || default_items);
13402
13538
  }
13403
13539
  if ($$self.$$.dirty & /*config*/
13404
- 16384) {
13405
- $$invalidate(4, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
13540
+ 32768) {
13541
+ $$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
13542
+ }
13543
+ if ($$self.$$.dirty & /*config*/
13544
+ 32768) {
13545
+ $$invalidate(4, colors2 = (config == null ? void 0 : config.colors) && config.colors.length && config.colors || default_colors);
13406
13546
  }
13407
13547
  };
13408
13548
  return [
@@ -13410,6 +13550,7 @@ function instance68($$self, $$props, $$invalidate) {
13410
13550
  theme,
13411
13551
  language,
13412
13552
  collapsed,
13553
+ colors2,
13413
13554
  hide_apps,
13414
13555
  items,
13415
13556
  placement,
@@ -13435,7 +13576,7 @@ var Toolbar = class extends SvelteComponent {
13435
13576
  app: 0,
13436
13577
  theme: 1,
13437
13578
  language: 2,
13438
- config: 14
13579
+ config: 15
13439
13580
  });
13440
13581
  }
13441
13582
  };
@@ -14803,19 +14944,19 @@ function create_if_block_32(ctx) {
14803
14944
  props: {
14804
14945
  app: (
14805
14946
  /*app*/
14806
- ctx[0]
14947
+ ctx[1]
14807
14948
  ),
14808
14949
  theme: (
14809
14950
  /*theme*/
14810
- ctx[1]
14951
+ ctx[2]
14811
14952
  ),
14812
14953
  language: (
14813
14954
  /*language*/
14814
- ctx[2]
14955
+ ctx[3]
14815
14956
  ),
14816
14957
  config: (
14817
14958
  /*config*/
14818
- ctx[3].toolbar || {}
14959
+ ctx[0].toolbar || {}
14819
14960
  )
14820
14961
  }
14821
14962
  });
@@ -14830,21 +14971,21 @@ function create_if_block_32(ctx) {
14830
14971
  p(ctx2, dirty) {
14831
14972
  const toolbar_changes = {};
14832
14973
  if (dirty & /*app*/
14833
- 1)
14974
+ 2)
14834
14975
  toolbar_changes.app = /*app*/
14835
- ctx2[0];
14976
+ ctx2[1];
14836
14977
  if (dirty & /*theme*/
14837
- 2)
14978
+ 4)
14838
14979
  toolbar_changes.theme = /*theme*/
14839
- ctx2[1];
14980
+ ctx2[2];
14840
14981
  if (dirty & /*language*/
14841
- 4)
14982
+ 8)
14842
14983
  toolbar_changes.language = /*language*/
14843
- ctx2[2];
14984
+ ctx2[3];
14844
14985
  if (dirty & /*config*/
14845
- 8)
14986
+ 1)
14846
14987
  toolbar_changes.config = /*config*/
14847
- ctx2[3].toolbar || {};
14988
+ ctx2[0].toolbar || {};
14848
14989
  toolbar.$set(toolbar_changes);
14849
14990
  },
14850
14991
  i(local) {
@@ -14869,15 +15010,15 @@ function create_if_block_23(ctx) {
14869
15010
  props: {
14870
15011
  app: (
14871
15012
  /*app*/
14872
- ctx[0]
15013
+ ctx[1]
14873
15014
  ),
14874
15015
  theme: (
14875
15016
  /*theme*/
14876
- ctx[1]
15017
+ ctx[2]
14877
15018
  ),
14878
15019
  language: (
14879
15020
  /*language*/
14880
- ctx[2]
15021
+ ctx[3]
14881
15022
  )
14882
15023
  }
14883
15024
  });
@@ -14892,17 +15033,17 @@ function create_if_block_23(ctx) {
14892
15033
  p(ctx2, dirty) {
14893
15034
  const redoundo_changes = {};
14894
15035
  if (dirty & /*app*/
14895
- 1)
15036
+ 2)
14896
15037
  redoundo_changes.app = /*app*/
14897
- ctx2[0];
15038
+ ctx2[1];
14898
15039
  if (dirty & /*theme*/
14899
- 2)
15040
+ 4)
14900
15041
  redoundo_changes.theme = /*theme*/
14901
- ctx2[1];
15042
+ ctx2[2];
14902
15043
  if (dirty & /*language*/
14903
- 4)
15044
+ 8)
14904
15045
  redoundo_changes.language = /*language*/
14905
- ctx2[2];
15046
+ ctx2[3];
14906
15047
  redoundo.$set(redoundo_changes);
14907
15048
  },
14908
15049
  i(local) {
@@ -14927,15 +15068,15 @@ function create_if_block_14(ctx) {
14927
15068
  props: {
14928
15069
  app: (
14929
15070
  /*app*/
14930
- ctx[0]
15071
+ ctx[1]
14931
15072
  ),
14932
15073
  theme: (
14933
15074
  /*theme*/
14934
- ctx[1]
15075
+ ctx[2]
14935
15076
  ),
14936
15077
  language: (
14937
15078
  /*language*/
14938
- ctx[2]
15079
+ ctx[3]
14939
15080
  )
14940
15081
  }
14941
15082
  });
@@ -14950,17 +15091,17 @@ function create_if_block_14(ctx) {
14950
15091
  p(ctx2, dirty) {
14951
15092
  const zoomcontrol_changes = {};
14952
15093
  if (dirty & /*app*/
14953
- 1)
15094
+ 2)
14954
15095
  zoomcontrol_changes.app = /*app*/
14955
- ctx2[0];
15096
+ ctx2[1];
14956
15097
  if (dirty & /*theme*/
14957
- 2)
15098
+ 4)
14958
15099
  zoomcontrol_changes.theme = /*theme*/
14959
- ctx2[1];
15100
+ ctx2[2];
14960
15101
  if (dirty & /*language*/
14961
- 4)
15102
+ 8)
14962
15103
  zoomcontrol_changes.language = /*language*/
14963
- ctx2[2];
15104
+ ctx2[3];
14964
15105
  zoomcontrol.$set(zoomcontrol_changes);
14965
15106
  },
14966
15107
  i(local) {
@@ -14985,15 +15126,15 @@ function create_if_block18(ctx) {
14985
15126
  props: {
14986
15127
  app: (
14987
15128
  /*app*/
14988
- ctx[0]
15129
+ ctx[1]
14989
15130
  ),
14990
15131
  theme: (
14991
15132
  /*theme*/
14992
- ctx[1]
15133
+ ctx[2]
14993
15134
  ),
14994
15135
  language: (
14995
15136
  /*language*/
14996
- ctx[2]
15137
+ ctx[3]
14997
15138
  )
14998
15139
  }
14999
15140
  });
@@ -15008,17 +15149,17 @@ function create_if_block18(ctx) {
15008
15149
  p(ctx2, dirty) {
15009
15150
  const pagecontrol_changes = {};
15010
15151
  if (dirty & /*app*/
15011
- 1)
15152
+ 2)
15012
15153
  pagecontrol_changes.app = /*app*/
15013
- ctx2[0];
15154
+ ctx2[1];
15014
15155
  if (dirty & /*theme*/
15015
- 2)
15156
+ 4)
15016
15157
  pagecontrol_changes.theme = /*theme*/
15017
- ctx2[1];
15158
+ ctx2[2];
15018
15159
  if (dirty & /*language*/
15019
- 4)
15160
+ 8)
15020
15161
  pagecontrol_changes.language = /*language*/
15021
- ctx2[2];
15162
+ ctx2[3];
15022
15163
  pagecontrol.$set(pagecontrol_changes);
15023
15164
  },
15024
15165
  i(local) {
@@ -15053,19 +15194,19 @@ function create_fragment71(ctx) {
15053
15194
  let dispose;
15054
15195
  let if_block0 = (
15055
15196
  /*config*/
15056
- ((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
15197
+ ((_a = ctx[0].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
15057
15198
  );
15058
15199
  let if_block1 = (
15059
15200
  /*config*/
15060
- ((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
15201
+ ((_b = ctx[0].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
15061
15202
  );
15062
15203
  let if_block2 = (
15063
15204
  /*config*/
15064
- ((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
15205
+ ((_c = ctx[0].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
15065
15206
  );
15066
15207
  let if_block3 = (
15067
15208
  /*config*/
15068
- ((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
15209
+ ((_d = ctx[0].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
15069
15210
  );
15070
15211
  return {
15071
15212
  c() {
@@ -15089,7 +15230,7 @@ function create_fragment71(ctx) {
15089
15230
  if_block3.c();
15090
15231
  attr(div0, "class", name9 + "-view");
15091
15232
  attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
15092
- (((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
15233
+ (((_a2 = ctx[0].toolbar) == null ? void 0 : _a2.placement) || "left"));
15093
15234
  toggle_class(div1, "hidden", !/*toolbar_has_items*/
15094
15235
  ctx[6] || !/*layout*/
15095
15236
  (ctx[5] === "visible" || /*layout*/
@@ -15110,12 +15251,12 @@ function create_fragment71(ctx) {
15110
15251
  );
15111
15252
  attr(div4, "class", name9 + "-root");
15112
15253
  toggle_class(div4, "loading", !/*app*/
15113
- ctx[0]);
15254
+ ctx[1]);
15114
15255
  },
15115
15256
  m(target, anchor) {
15116
15257
  insert(target, div4, anchor);
15117
15258
  append(div4, div0);
15118
- ctx[16](div0);
15259
+ ctx[19](div0);
15119
15260
  append(div4, t0);
15120
15261
  append(div4, div1);
15121
15262
  if (if_block0)
@@ -15147,12 +15288,12 @@ function create_fragment71(ctx) {
15147
15288
  var _a2, _b2, _c2, _d2, _e;
15148
15289
  if (
15149
15290
  /*config*/
15150
- ((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
15291
+ ((_a2 = ctx2[0].toolbar) == null ? void 0 : _a2.enable) !== false
15151
15292
  ) {
15152
15293
  if (if_block0) {
15153
15294
  if_block0.p(ctx2, dirty);
15154
15295
  if (dirty & /*config*/
15155
- 8) {
15296
+ 1) {
15156
15297
  transition_in(if_block0, 1);
15157
15298
  }
15158
15299
  } else {
@@ -15169,12 +15310,12 @@ function create_fragment71(ctx) {
15169
15310
  check_outros();
15170
15311
  }
15171
15312
  if (!current || dirty & /*config*/
15172
- 8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
15173
- (((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
15313
+ 1 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
15314
+ (((_b2 = ctx2[0].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
15174
15315
  attr(div1, "class", div1_class_value);
15175
15316
  }
15176
15317
  if (!current || dirty & /*config, toolbar_has_items, layout*/
15177
- 104) {
15318
+ 97) {
15178
15319
  toggle_class(div1, "hidden", !/*toolbar_has_items*/
15179
15320
  ctx2[6] || !/*layout*/
15180
15321
  (ctx2[5] === "visible" || /*layout*/
@@ -15182,12 +15323,12 @@ function create_fragment71(ctx) {
15182
15323
  }
15183
15324
  if (
15184
15325
  /*config*/
15185
- ((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
15326
+ ((_c2 = ctx2[0].redo_undo) == null ? void 0 : _c2.enable) !== false
15186
15327
  ) {
15187
15328
  if (if_block1) {
15188
15329
  if_block1.p(ctx2, dirty);
15189
15330
  if (dirty & /*config*/
15190
- 8) {
15331
+ 1) {
15191
15332
  transition_in(if_block1, 1);
15192
15333
  }
15193
15334
  } else {
@@ -15205,12 +15346,12 @@ function create_fragment71(ctx) {
15205
15346
  }
15206
15347
  if (
15207
15348
  /*config*/
15208
- ((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
15349
+ ((_d2 = ctx2[0].zoom_control) == null ? void 0 : _d2.enable) !== false
15209
15350
  ) {
15210
15351
  if (if_block2) {
15211
15352
  if_block2.p(ctx2, dirty);
15212
15353
  if (dirty & /*config*/
15213
- 8) {
15354
+ 1) {
15214
15355
  transition_in(if_block2, 1);
15215
15356
  }
15216
15357
  } else {
@@ -15237,12 +15378,12 @@ function create_fragment71(ctx) {
15237
15378
  }
15238
15379
  if (
15239
15380
  /*config*/
15240
- ((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
15381
+ ((_e = ctx2[0].page_control) == null ? void 0 : _e.enable) !== false
15241
15382
  ) {
15242
15383
  if (if_block3) {
15243
15384
  if_block3.p(ctx2, dirty);
15244
15385
  if (dirty & /*config*/
15245
- 8) {
15386
+ 1) {
15246
15387
  transition_in(if_block3, 1);
15247
15388
  }
15248
15389
  } else {
@@ -15268,9 +15409,9 @@ function create_fragment71(ctx) {
15268
15409
  );
15269
15410
  }
15270
15411
  if (!current || dirty & /*app*/
15271
- 1) {
15412
+ 2) {
15272
15413
  toggle_class(div4, "loading", !/*app*/
15273
- ctx2[0]);
15414
+ ctx2[1]);
15274
15415
  }
15275
15416
  },
15276
15417
  i(local) {
@@ -15292,7 +15433,7 @@ function create_fragment71(ctx) {
15292
15433
  d(detaching) {
15293
15434
  if (detaching)
15294
15435
  detach(div4);
15295
- ctx[16](null);
15436
+ ctx[19](null);
15296
15437
  if (if_block0)
15297
15438
  if_block0.d();
15298
15439
  if (if_block1)
@@ -15308,13 +15449,15 @@ function create_fragment71(ctx) {
15308
15449
  }
15309
15450
  var name9 = "fastboard";
15310
15451
  function instance71($$self, $$props, $$invalidate) {
15452
+ let manager;
15453
+ let room;
15311
15454
  let writable2;
15312
15455
  let boxState;
15313
15456
  let focusedApp;
15314
15457
  let toolbar_has_items;
15315
- let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
15316
- let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
15317
- let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
15458
+ let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(16, $focusedApp = $$value)), focusedApp);
15459
+ let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(17, $boxState = $$value)), boxState);
15460
+ let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(18, $writable = $$value)), writable2);
15318
15461
  $$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
15319
15462
  $$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
15320
15463
  $$self.$$.on_destroy.push(() => $$unsubscribe_writable());
@@ -15323,6 +15466,7 @@ function instance71($$self, $$props, $$invalidate) {
15323
15466
  let { language = "en" } = $$props;
15324
15467
  let { containerRef = void 0 } = $$props;
15325
15468
  let { config = {} } = $$props;
15469
+ let { colors: colors2 = void 0 } = $$props;
15326
15470
  const AppsShowToolbar = ["DocsViewer", "Slide"];
15327
15471
  let container;
15328
15472
  let layout = "hidden";
@@ -15349,31 +15493,58 @@ function instance71($$self, $$props, $$invalidate) {
15349
15493
  }
15350
15494
  $$self.$$set = ($$props2) => {
15351
15495
  if ("app" in $$props2)
15352
- $$invalidate(0, app = $$props2.app);
15496
+ $$invalidate(1, app = $$props2.app);
15353
15497
  if ("theme" in $$props2)
15354
- $$invalidate(1, theme = $$props2.theme);
15498
+ $$invalidate(2, theme = $$props2.theme);
15355
15499
  if ("language" in $$props2)
15356
- $$invalidate(2, language = $$props2.language);
15500
+ $$invalidate(3, language = $$props2.language);
15357
15501
  if ("containerRef" in $$props2)
15358
- $$invalidate(11, containerRef = $$props2.containerRef);
15502
+ $$invalidate(12, containerRef = $$props2.containerRef);
15359
15503
  if ("config" in $$props2)
15360
- $$invalidate(3, config = $$props2.config);
15504
+ $$invalidate(0, config = $$props2.config);
15505
+ if ("colors" in $$props2)
15506
+ $$invalidate(11, colors2 = $$props2.colors);
15361
15507
  };
15362
15508
  $$self.$$.update = () => {
15363
15509
  if ($$self.$$.dirty & /*app*/
15364
- 1) {
15510
+ 2) {
15511
+ $$invalidate(15, manager = app == null ? void 0 : app.manager);
15512
+ }
15513
+ if ($$self.$$.dirty & /*app*/
15514
+ 2) {
15515
+ $$invalidate(14, room = app == null ? void 0 : app.manager.room);
15516
+ }
15517
+ if ($$self.$$.dirty & /*manager, room, config, colors*/
15518
+ 51201) {
15519
+ if (manager && room) {
15520
+ const floatBarOptions = room.floatBarOptions;
15521
+ if (floatBarOptions.colors) {
15522
+ $$invalidate(11, colors2 = floatBarOptions.colors);
15523
+ }
15524
+ if (config == null ? void 0 : config.toolbar) {
15525
+ const _colors = config.toolbar.colors;
15526
+ if (!_colors && colors2) {
15527
+ $$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
15528
+ toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
15529
+ }));
15530
+ }
15531
+ }
15532
+ }
15533
+ }
15534
+ if ($$self.$$.dirty & /*app*/
15535
+ 2) {
15365
15536
  $$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
15366
15537
  }
15367
15538
  if ($$self.$$.dirty & /*app*/
15368
- 1) {
15539
+ 2) {
15369
15540
  $$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
15370
15541
  }
15371
15542
  if ($$self.$$.dirty & /*app*/
15372
- 1) {
15543
+ 2) {
15373
15544
  $$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
15374
15545
  }
15375
15546
  if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
15376
- 57344) {
15547
+ 458752) {
15377
15548
  if (!$writable) {
15378
15549
  $$invalidate(5, layout = "hidden");
15379
15550
  } else if ($boxState === "maximized") {
@@ -15387,15 +15558,15 @@ function instance71($$self, $$props, $$invalidate) {
15387
15558
  }
15388
15559
  }
15389
15560
  if ($$self.$$.dirty & /*config*/
15390
- 8) {
15561
+ 1) {
15391
15562
  $$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
15392
15563
  }
15393
15564
  if ($$self.$$.dirty & /*app, container*/
15394
- 17) {
15565
+ 18) {
15395
15566
  try {
15396
15567
  if (app && container) {
15397
15568
  app.bindContainer(container);
15398
- $$invalidate(12, mounted = true);
15569
+ $$invalidate(13, mounted = true);
15399
15570
  }
15400
15571
  } catch (err) {
15401
15572
  console.error("[fastboard] An error occurred while binding container");
@@ -15403,17 +15574,17 @@ function instance71($$self, $$props, $$invalidate) {
15403
15574
  }
15404
15575
  }
15405
15576
  if ($$self.$$.dirty & /*app, theme, mounted*/
15406
- 4099) {
15577
+ 8198) {
15407
15578
  if (app && theme && mounted) {
15408
15579
  app.manager.setPrefersColorScheme(theme);
15409
15580
  }
15410
15581
  }
15411
15582
  };
15412
15583
  return [
15584
+ config,
15413
15585
  app,
15414
15586
  theme,
15415
15587
  language,
15416
- config,
15417
15588
  container,
15418
15589
  layout,
15419
15590
  toolbar_has_items,
@@ -15421,8 +15592,11 @@ function instance71($$self, $$props, $$invalidate) {
15421
15592
  boxState,
15422
15593
  writable2,
15423
15594
  focus_me,
15595
+ colors2,
15424
15596
  containerRef,
15425
15597
  mounted,
15598
+ room,
15599
+ manager,
15426
15600
  $focusedApp,
15427
15601
  $boxState,
15428
15602
  $writable,
@@ -15433,11 +15607,12 @@ var Fastboard = class extends SvelteComponent {
15433
15607
  constructor(options) {
15434
15608
  super();
15435
15609
  init(this, options, instance71, create_fragment71, not_equal, {
15436
- app: 0,
15437
- theme: 1,
15438
- language: 2,
15439
- containerRef: 11,
15440
- config: 3
15610
+ app: 1,
15611
+ theme: 2,
15612
+ language: 3,
15613
+ containerRef: 12,
15614
+ config: 0,
15615
+ colors: 11
15441
15616
  });
15442
15617
  }
15443
15618
  };
@@ -15446,16 +15621,45 @@ var Fastboard_default = Fastboard;
15446
15621
  // src/helpers/index.ts
15447
15622
  function createUI(app, div) {
15448
15623
  let fastboard;
15624
+ let colors2;
15625
+ if ((app == null ? void 0 : app.manager) && app.manager.room) {
15626
+ const floatBarOptions = app.manager.room.floatBarOptions;
15627
+ if (floatBarOptions.colors) {
15628
+ colors2 = floatBarOptions.colors;
15629
+ }
15630
+ }
15449
15631
  const ui = {
15450
15632
  mount(div2, props) {
15633
+ var _a;
15451
15634
  if (fastboard) {
15452
15635
  fastboard.$destroy();
15453
15636
  }
15637
+ if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
15638
+ const _colors = props.config.toolbar.colors;
15639
+ if (!_colors && colors2) {
15640
+ props.config = __spreadProps(__spreadValues({}, props.config), {
15641
+ toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
15642
+ colors: colors2
15643
+ })
15644
+ });
15645
+ }
15646
+ }
15454
15647
  fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
15455
15648
  return ui;
15456
15649
  },
15457
15650
  update(props) {
15651
+ var _a;
15458
15652
  if (fastboard && props) {
15653
+ if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
15654
+ const _colors = props.config.toolbar.colors;
15655
+ if (!_colors && colors2) {
15656
+ props.config = __spreadProps(__spreadValues({}, props.config), {
15657
+ toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
15658
+ colors: colors2
15659
+ })
15660
+ });
15661
+ }
15662
+ }
15459
15663
  fastboard.$set(props);
15460
15664
  }
15461
15665
  },