node-red-contrib-knx-ultimate 2.2.9 → 2.2.11

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/CHANGELOG.md CHANGED
@@ -6,22 +6,29 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ <b>Version 2.2.11</b> - November 2023<br/>
10
+ <p>
11
+ - NEW: Hue Light: you can now enable the input/output PINs and send/receive commands to/from the light, via the msg flow, like msg.on={"on":true}. The option is "Node Input/Output PINs".<br/>
12
+ - NEW: Hue Scene: you can now enable the input/output PINs and send/receive commands to/from the light, via the msg flow. The option is "Node Input/Output PINs".<br/>
13
+ </p>
9
14
  <b>Version 2.2.9</b> - November 2023<br/>
15
+ <p>
10
16
  - Fixed errors in Iobroker.<br/>
11
- </p>
12
- <b>Version 2.2.8</b> - November 2023<br/>
13
17
  - HUE Light: NEW: color selection show now the temperature in kelvin.<br/>
14
18
  - HUE Light: NEW: Tunable White: added control and status in kelvin (DPT 7.600). This is in BETA testing.<br/>
15
19
  - Removed some options in button and scene nodes, because they are unnecessary.<br/>
16
20
  </p>
17
21
  <b>Version 2.2.6</b> - October 2023<br/>
22
+ <p>
18
23
  - Fix: fixed HUE button sending a KNX telegram at startup. Fixed also other nodes.<br/>
19
24
  - HUE Nodes: added the option to inizialize at startup or not.<br/>
20
25
  </p>
26
+ <p>
21
27
  <b>Version 2.2.5</b> - October 2023<br/>
22
28
  - Fix: fixed some HUE nodes not able to register to the event notification service.<br/>
23
29
  - Restyle GUI of KNX Device node.<br/>
24
30
  </p>
31
+ <p>
25
32
  <b>Version 2.2.4</b> - October 2023<br/>
26
33
  - HUE Light: fixed some status hiccups and better handling of async hue bridge functions.<br/>
27
34
  </p>
@@ -99,7 +99,7 @@ module.exports = (RED) => {
99
99
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("hue-Config node.hueManager.on('connected' " + error.message);
100
100
  }
101
101
  })();
102
- }, 5000);
102
+ }, 10000);
103
103
  });
104
104
  };
105
105
 
@@ -114,24 +114,24 @@ module.exports = (RED) => {
114
114
  if (node.nodeClientsAwaitingInit !== undefined) {
115
115
  // Because the whole process is async, if the function await node.hueManager.hueApiV2.get("/resource") has not jet been called or is late,
116
116
  // the node/nodes belonging to this server, has been previously added to the nodeClientsAwaitingInit list.
117
- node.nodeClientsAwaitingInit.forEach((nodeClient) => {
118
- node.nodeClients.push(nodeClient);
117
+ node.nodeClientsAwaitingInit.forEach((_node) => {
118
+ node.nodeClients.push(_node);
119
119
  });
120
120
  node.nodeClientsAwaitingInit = [];
121
121
  }
122
- node.nodeClients.forEach((nodeClient) => {
123
- if (nodeClient.hueDevice !== undefined && node.hueAllResources !== undefined) {
124
- const oHUEDevice = node.hueAllResources.filter((a) => a.id === nodeClient.hueDevice)[0];
122
+ node.nodeClients.forEach((_node) => {
123
+ if (_node.hueDevice !== undefined && node.hueAllResources !== undefined) {
124
+ const oHUEDevice = node.hueAllResources.filter((a) => a.id === _node.hueDevice)[0];
125
125
  if (oHUEDevice !== undefined) {
126
126
  // Add _Node to the clients array
127
- nodeClient.setNodeStatusHue({
127
+ _node.setNodeStatusHue({
128
128
  fill: "green",
129
129
  shape: "ring",
130
- text: "Ready :-)",
130
+ text: "Ready from awaiting list :-)",
131
131
  });
132
- nodeClient.currentHUEDevice = oHUEDevice;
133
132
  oHUEDevice.initializingAtStart = true; // Signalling first connection after restart.
134
- nodeClient.handleSendHUE(oHUEDevice);
133
+ _node.currentHUEDevice = oHUEDevice;
134
+ _node.handleSendHUE(oHUEDevice);
135
135
  }
136
136
  }
137
137
  });
@@ -278,8 +278,8 @@ module.exports = (RED) => {
278
278
  if (node.hueAllResources !== undefined && node.hueAllResources !== null) {
279
279
  if (node.nodeClients.filter((x) => x.id === _Node.id).length === 0) { // At first start, due to the async method for retrieving hueAllResources, hueAllResources is still null. The first start is handled in node.hueManager.on("connected")
280
280
  const oHUEDevice = node.hueAllResources.filter((a) => a.id === _Node.hueDevice)[0];
281
- _Node.currentHUEDevice = oHUEDevice;
282
281
  oHUEDevice.initializingAtStart = true; // Signalling first connection after restart.
282
+ _Node.currentHUEDevice = oHUEDevice;
283
283
  _Node.handleSendHUE(oHUEDevice);
284
284
  node.nodeClients.push(_Node);
285
285
  // Add _Node to the clients array
@@ -296,7 +296,7 @@ module.exports = (RED) => {
296
296
  _Node.setNodeStatusHue({
297
297
  fill: "grey",
298
298
  shape: "dot",
299
- text: "Awaiting HUE Resources",
299
+ text: "I'm gointo to init awaiting list.",
300
300
  });
301
301
  }
302
302
  }
@@ -346,14 +346,18 @@ module.exports = (RED) => {
346
346
  // °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
347
347
  const serverNode = RED.nodes.getNode(req.query.nodeID); // Retrieve node.id of the config node.
348
348
  const jRet = serverNode.getResources(req.query.rtype);
349
- res.json(jRet);
349
+ if (jRet !== undefined) {
350
+ res.json(jRet);
351
+ } else {
352
+ res.json({ devices: [{ name: "I'm still connecting...Try in some seconds" }] });
353
+ }
350
354
  // °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
351
355
  } catch (error) {
352
356
  RED.log.error(`Errore KNXUltimateGetResourcesHUE non gestito ${error.message}`);
353
357
  res.json({ devices: error.message });
354
- (async () => {
355
- await node.ConnectToHueBridge();
356
- })();
358
+ // (async () => {
359
+ // await node.ConnectToHueBridge();
360
+ // })();
357
361
  }
358
362
  });
359
363
 
@@ -111,7 +111,7 @@
111
111
 
112
112
 
113
113
  // 14/08/2021 Elimino il file delle persistenze di questo nodo
114
- $.getJSON("deletePersistGAFile?nodeID=" + node.id, (data) => {});
114
+ $.getJSON("deletePersistGAFile?nodeID=" + node.id, (data) => { });
115
115
 
116
116
  // 06/07/2023 Tabs
117
117
  // *****************************
@@ -178,7 +178,7 @@
178
178
  }
179
179
 
180
180
  .ui-tabs .ui-tabs-nav .ui-state-active {
181
- background: transparent url(../img/frecciaperUIKnxSecure.png) no-repeat bottom center;
181
+ background: transparent no-repeat bottom center;
182
182
  border: none;
183
183
  }
184
184
 
@@ -201,7 +201,7 @@
201
201
  <i class="fa fa-tag"></i>
202
202
  <span data-i18n="knxUltimate-config.properties.node-config-input-name"></span>
203
203
  </label>
204
- <input type="text" id="node-config-input-name" ><data-i18n="[Title]knxUltimate-config.properties.node-config-input-name" style="margin-left:5px;">
204
+ <input type="text" id="node-config-input-name" >Name
205
205
  </div>
206
206
 
207
207
  <div class="form-row">
@@ -227,7 +227,7 @@
227
227
 
228
228
 
229
229
  </script>
230
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
230
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
231
231
 
232
232
  <script type="text/markdown" data-help-name="knxUltimateHueBattery">
233
233
  This node lets you get the battery level from your HUE device. Here you can get the HUE battery level events, that represents a percentage 0-100% value, evetytime the
@@ -404,7 +404,7 @@
404
404
 
405
405
 
406
406
  </script>
407
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
407
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
408
408
 
409
409
  <script type="text/markdown" data-help-name="knxUltimateHueButton">
410
410
  This node lets you get the events from your HUE button.
@@ -1,24 +1,5 @@
1
1
  <script type="text/javascript">
2
- RED.events.on('nodes:add', function (node) {
3
- if (node.type === 'uibuilder') {
4
- // Keep a list of uib nodes in the editor
5
- // may be different to the deployed list
6
- editorInstances[node.id] = node.url
7
- // -- IF uibuilderInstances <> editorInstances THEN there are undeployed instances. --
8
- }
9
- })
10
- RED.events.on('nodes:change', function (node) {
11
- if (node.type === 'uibuilder') {
12
- mylog('nodes:change:', node)
13
- editorInstances[node.id] = node.url
14
- }
15
- })
16
- RED.events.on('nodes:remove', function (node) {
17
- if (node.type === 'uibuilder') {
18
- mylog('>> nodes:remove >>', node)
19
- delete editorInstances[node.id]
20
- }
21
- })
2
+
22
3
  RED.nodes.registerType("knxUltimateHueLight", {
23
4
  category: "KNX Ultimate",
24
5
  color: "#C0C7E9",
@@ -99,6 +80,10 @@
99
80
  minDimLevelLight: { value: 10, required: false },
100
81
  maxDimLevelLight: { value: 100, required: false },
101
82
  readStatusAtStartup: { value: "yes" },
83
+ enableNodePINS: { value: "no" },
84
+
85
+ outputs: { value: 0 },
86
+ inputs: { value: 0 },
102
87
 
103
88
  hueDevice: { value: "" },
104
89
  },
@@ -109,20 +94,6 @@
109
94
  return this.name;
110
95
  },
111
96
  paletteLabel: "Hue Light",
112
- // button: {
113
- // enabled: function() {
114
- // // return whether or not the button is enabled, based on the current
115
- // // configuration of the node
116
- // return !this.changed
117
- // },
118
- // visible: function() {
119
- // // return whether or not the button is visible, based on the current
120
- // // configuration of the node
121
- // return this.hasButton
122
- // },
123
- // //toggle: "buttonState",
124
- // onclick: function() {}
125
- // },
126
97
  oneditprepare: function () {
127
98
  var node = this;
128
99
  var oNodeServer = RED.nodes.node($("#node-input-server").val()); // Store the config-node
@@ -176,7 +147,7 @@
176
147
  });
177
148
 
178
149
  // Temperature
179
- node.kelvinPicker = new iro.ColorPicker("#kelvinPicker", {
150
+ this.kelvinPicker = new iro.ColorPicker("#kelvinPicker", {
180
151
  width: 250,
181
152
  color: "rgb(255, 0, 0)",
182
153
  borderWidth: 1,
@@ -193,7 +164,7 @@
193
164
  ],
194
165
  });
195
166
  // color:change callbacks receive the current color
196
- node.kelvinPicker.on("color:change", function (color) {
167
+ this.kelvinPicker.on("color:change", function (color) {
197
168
  const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
198
169
  $("#resultRGB").val(resultRGBForNode);
199
170
  $("#resultKelvin").val(Math.round(color.kelvin, 0));
@@ -205,12 +176,12 @@
205
176
  function setIroColorKelvin() {
206
177
  try {
207
178
  const color = JSON.parse($("#resultKelvin").val());
208
- node.kelvinPicker.color.setChannel("kelvin", color);
179
+ this.kelvinPicker.color.setChannel("kelvin", color);
209
180
  } catch (error) { }
210
181
  }
211
182
 
212
183
  // Color
213
- node.colorPicker = new iro.ColorPicker("#colorPicker", {
184
+ this.colorPicker = new iro.ColorPicker("#colorPicker", {
214
185
  width: 250,
215
186
  color: "rgb(255, 0, 0)",
216
187
  borderWidth: 1,
@@ -229,7 +200,7 @@
229
200
  ],
230
201
  });
231
202
  // color:change callbacks receive the current color
232
- node.colorPicker.on("color:change", function (color) {
203
+ this.colorPicker.on("color:change", function (color) {
233
204
  // Transform to compatible value for the node { "red": 255, "green": 255, "blue": 255 }
234
205
  const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
235
206
  $("#resultRGB").val(resultRGBForNode);
@@ -241,9 +212,9 @@
241
212
  function setIroColor() {
242
213
  try {
243
214
  const color = JSON.parse($("#resultRGB").val());
244
- node.colorPicker.color.setChannel("rgb", "r", color.red);
245
- node.colorPicker.color.setChannel("rgb", "g", color.green);
246
- node.colorPicker.color.setChannel("rgb", "b", color.blue);
215
+ this.colorPicker.color.setChannel("rgb", "r", color.red);
216
+ this.colorPicker.color.setChannel("rgb", "g", color.green);
217
+ this.colorPicker.color.setChannel("rgb", "b", color.blue);
247
218
  } catch (error) { }
248
219
  }
249
220
  // Copy to clipboard button
@@ -460,13 +431,20 @@
460
431
  $.map(data.devices, function (value, key) {
461
432
  //alert(JSON.stringify(value) + " "+ key)
462
433
  var sSearch = value.name;
463
- if (fullSearch(sSearch, request.term)) {
434
+ if (!value.name.includes("I'm still connecting")) {
435
+ if (fullSearch(sSearch, request.term)) {
436
+ return {
437
+ hueDevice: value.id,
438
+ value: value.name,
439
+ };
440
+ } else {
441
+ return null;
442
+ }
443
+ } else {
464
444
  return {
465
445
  hueDevice: value.id,
466
446
  value: value.name,
467
447
  };
468
- } else {
469
- return null;
470
448
  }
471
449
  })
472
450
  );
@@ -549,7 +527,7 @@
549
527
  }
550
528
 
551
529
  }
552
- $("#node-input-minDimLevelLight").val(node.minDimLevelLight);
530
+ $("#node-input-minDimLevelLight").val(this.minDimLevelLight);
553
531
  for (let index = 100; index >= 10; index--) {
554
532
  $("#node-input-maxDimLevelLight").append(
555
533
  $("<option>")
@@ -557,7 +535,7 @@
557
535
  .text(index.toString() + "%")
558
536
  );
559
537
  }
560
- $("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
538
+ $("#node-input-maxDimLevelLight").val(this.maxDimLevelLight);
561
539
 
562
540
  if (this.hueDevice !== "") $("#tabs").show();
563
541
 
@@ -566,15 +544,26 @@
566
544
  oneditsave: function () {
567
545
  RED.sidebar.removeTab("tabNRColor");
568
546
  RED.sidebar.show("help");
547
+ if ($("#node-input-enableNodePINS").val() === "yes") {
548
+ this.outputs = 1;
549
+ this.inputs = 1;
550
+ } else {
551
+ this.outputs = 0;
552
+ this.inputs = 0;
553
+ }
569
554
  },
570
555
  oneditcancel: function () {
571
556
  RED.sidebar.removeTab("tabNRColor");
572
557
  RED.sidebar.show("help");
573
- },
558
+ }
574
559
  });
560
+
561
+
562
+
563
+
575
564
  </script>
576
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
577
- <script src="https://cdn.jsdelivr.net/npm/@jaames/iro@5"></script>
565
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
566
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/iro@5"></script>
578
567
 
579
568
  <script type="text/html" data-template-name="knxUltimateHueLight">
580
569
 
@@ -922,7 +911,16 @@
922
911
  <i class="fa fa-clone"></i> Max Dim Brightness
923
912
  </label>
924
913
  <select id="node-input-maxDimLevelLight"></select>
925
- </div>
914
+ </div>
915
+ <div class="form-row">
916
+ <label for="node-input-enableNodePINS" style="width:260px;">
917
+ <i class="fa fa-square-o"></i> Node Input/Output PINs
918
+ </label>
919
+ <select id="node-input-enableNodePINS">
920
+ <option value="no">Hide</option>
921
+ <option value="yes">Show node input/output PINs</option>
922
+ </select>
923
+ </div>
926
924
  </p>
927
925
  </div>
928
926
 
@@ -930,89 +928,89 @@
930
928
  </script>
931
929
 
932
930
  <script type="text/markdown" data-help-name="knxUltimateHueLight">
933
- <p>This node lets you control your Philips HUE light and grouped lights and also gets the states of this lights, to be sent to the KNX bus.</p>
934
-
935
- **General**
936
- |Property|Description|
937
- |--|--|
938
- | KNX GW | Select the KNX gateway to be used |
939
- | HUE Bridge | Select the HUE Bridge to be used |
940
- | Name | HUE light or HUE grouped light to be used. The avaiable lights and groups start showing up while you're typing.|
941
-
942
- <br/>
943
-
944
- **OPTIONS**
945
-
946
- Here you can choose the KNX addresses to be linked to the avaiable HUE light commands/states.<br/>
947
- Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
948
-
949
- **Switching**
950
- |Property|Description|
951
- |--|--|
952
- | Control | This GA is used to turn on/off the HUE light via a boolean KNX value true/false|
953
- | Status | Link this to the light's switch status group address|
954
-
955
- <br/>
956
-
957
- **Dim/Brightness**
958
- |Property|Description|
959
- |--|--|
960
- | Control | Relative DIM the HUE light. You can set the dimming speed in the **_Behaviour_** tab. |
961
- | Control % | Changes the absolute HUE light's brightness (0-100%)|
962
- | Status| Link this to the light's brightness status group address |
963
-
964
- <br/>
965
-
966
- **Tunable white**
967
- |Property|Description|
968
- |--|--|
969
- | Control dim | Changes the HUE light's white temperature, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
970
- | Control % | Changes the HUE light's white temperature, using the DPT 5.001. A value of 0 is full warm, a value of 100 is full cold.|
971
- | Control kelvin | Changes the HUE light's temperature in Kelvin degrees, using the DPT 7.600. |
972
- | Status %| Link this to the light temperature status group address. Datapoint is 5.001 absolute value. 0 is full warm, 100 is full cold.|
973
- | Status kelvin | Link this to the light temperature status group address. Datapoint 7.600. |
974
-
975
- <br/>
976
-
977
- **Colors**
978
- |Property|Description|
979
- |--|--|
980
- | Control | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
981
- | Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
982
-
983
- <br/>
984
-
985
- **Effects**
986
- |Property|Description|
987
- |--|--|
988
- | Blink | _true_ Blink the light, _false_ Stop blinking. Blinks the light on and off. Useful for signalling. Works with all HUE lights. |
989
- | Color Cycle | _true_ start cycle, _false_ Stop cycle. Randomly changes the HUE light's color at regular interval. Works with all HUE lights having color capabilities. The color effect will start 10 seconds after set. |
990
-
991
- <br/>
992
-
993
- **Behaviour**
994
-
995
- | Property | Description |
996
- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
997
- | KNX Brightness Status | Updates the KNX brightness group address whenever the HUE lamp is switched ON/OFF. The options are `When HUE light is Off, send 0% (Default KNX behaviour)` and `Leave as is (default HUE behaviour)` |
998
- | Specify switch on brightness | It enables the brightness value to follow the on/off status of the light. If you change the HUE brightness value to 0% (from the HUE App), an "off" telegram is also sent to the KNX bus; if you set it other than 0%, an "on" telegram is also sent to the KNX bus. This is valid also vice-versa: if you change the brightness via KNX bus, the HUE on/off value is also sent to the lamp. If you set it to **No**, the previous HUE light brightness value is retained. Default value is **Yes**. |
999
- | Switch On - color/brightness | You can choose the color/brightness of your light, at switch on. Set it as JSON object, for example **{ "red": 255, "green": 255, "blue": 255 }** |
1000
- | Night Lighting | It allows to set a particular light color/brightness at nighttime. If **checked**, a further set of option shows up and the light changes the behaviour based on these options, everytime you switch the light _on_. |
1001
- | Switch On - color/brightness at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object. Default value if you leave blank is **{ "red": 100, "green": 0, "blue": 0 }** |
1002
- | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
1003
- | Invert day/night values | Invert the values of _Day/Night_ group address. Default value is **unchecked**. |
1004
- | Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
1005
- | Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
1006
- | Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
1007
- | Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
1008
-
1009
- ### Note
1010
-
1011
- The Dimming function works in **KNX mode `start` and `stop`**. To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please **remember that**, when you set your wall swiches properties.
1012
-
1013
- <br/>
1014
-
1015
- [Find it useful?](https://www.paypal.me/techtoday)
1016
-
1017
- <br/>
931
+ <p>This node lets you control your Philips HUE light and grouped lights and also gets the states of this lights, to be sent to the KNX bus.</p>
932
+
933
+ **General**
934
+ |Property|Description|
935
+ |--|--|
936
+ | KNX GW | Select the KNX gateway to be used |
937
+ | HUE Bridge | Select the HUE Bridge to be used |
938
+ | Name | HUE light or HUE grouped light to be used. The avaiable lights and groups start showing up while you're typing.|
939
+
940
+ <br/>
941
+
942
+ **OPTIONS**
943
+
944
+ Here you can choose the KNX addresses to be linked to the avaiable HUE light commands/states.<br/>
945
+ Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
946
+
947
+ **Switching**
948
+ |Property|Description|
949
+ |--|--|
950
+ | Control | This GA is used to turn on/off the HUE light via a boolean KNX value true/false|
951
+ | Status | Link this to the light's switch status group address|
952
+
953
+ <br/>
954
+
955
+ **Dim/Brightness**
956
+ |Property|Description|
957
+ |--|--|
958
+ | Control | Relative DIM the HUE light. You can set the dimming speed in the **_Behaviour_** tab. |
959
+ | Control % | Changes the absolute HUE light's brightness (0-100%)|
960
+ | Status| Link this to the light's brightness status group address |
961
+
962
+ <br/>
963
+
964
+ **Tunable white**
965
+ |Property|Description|
966
+ |--|--|
967
+ | Control dim | Changes the HUE light's white temperature, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
968
+ | Control % | Changes the HUE light's white temperature, using the DPT 5.001. A value of 0 is full warm, a value of 100 is full cold.|
969
+ | Control kelvin | Changes the HUE light's temperature in Kelvin degrees, using the DPT 7.600. |
970
+ | Status %| Link this to the light temperature status group address. Datapoint is 5.001 absolute value. 0 is full warm, 100 is full cold.|
971
+ | Status kelvin | Link this to the light temperature status group address. Datapoint 7.600. |
972
+
973
+ <br/>
974
+
975
+ **Colors**
976
+ |Property|Description|
977
+ |--|--|
978
+ | Control | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
979
+ | Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
980
+
981
+ <br/>
982
+
983
+ **Effects**
984
+ |Property|Description|
985
+ |--|--|
986
+ | Blink | _true_ Blink the light, _false_ Stop blinking. Blinks the light on and off. Useful for signalling. Works with all HUE lights. |
987
+ | Color Cycle | _true_ start cycle, _false_ Stop cycle. Randomly changes the HUE light's color at regular interval. Works with all HUE lights having color capabilities. The color effect will start 10 seconds after set. |
988
+
989
+ <br/>
990
+
991
+ **Behaviour**
992
+
993
+ | Property | Description |
994
+ | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
995
+ | KNX Brightness Status | Updates the KNX brightness group address whenever the HUE lamp is switched ON/OFF. The options are `When HUE light is Off, send 0% (Default KNX behaviour)` and `Leave as is (default HUE behaviour)` |
996
+ | Specify switch on brightness | It enables the brightness value to follow the on/off status of the light. If you change the HUE brightness value to 0% (from the HUE App), an "off" telegram is also sent to the KNX bus; if you set it other than 0%, an "on" telegram is also sent to the KNX bus. This is valid also vice-versa: if you change the brightness via KNX bus, the HUE on/off value is also sent to the lamp. If you set it to **No**, the previous HUE light brightness value is retained. Default value is **Yes**. |
997
+ | Switch On - color/brightness | You can choose the color/brightness of your light, at switch on. Set it as JSON object, for example **{ "red": 255, "green": 255, "blue": 255 }** |
998
+ | Night Lighting | It allows to set a particular light color/brightness at nighttime. If **checked**, a further set of option shows up and the light changes the behaviour based on these options, everytime you switch the light _on_. |
999
+ | Switch On - color/brightness at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object. Default value if you leave blank is **{ "red": 100, "green": 0, "blue": 0 }** |
1000
+ | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
1001
+ | Invert day/night values | Invert the values of _Day/Night_ group address. Default value is **unchecked**. |
1002
+ | Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
1003
+ | Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
1004
+ | Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
1005
+ | Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
1006
+ | Node Input/Output PINs | Hide or show the input/output PINs. Input/output PINS allow the node to accept msg input from the flow and send msg output to the flow. Input msg must follow the HUE API v.2 Standards. This is an example msg, that turns on the light: <code>msg.on = {"on":true}</code>. Please refer to the [official HUE Api page](https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put) |
1007
+ ### Note
1008
+
1009
+ The Dimming function works in **KNX mode `start` and `stop`**. To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please **remember that**, when you set your wall swiches properties.
1010
+
1011
+ <br/>
1012
+
1013
+ [Find it useful?](https://www.paypal.me/techtoday)
1014
+
1015
+ <br/>
1018
1016
  </script>
@@ -430,6 +430,9 @@ module.exports = function (RED) {
430
430
  // IMPORTANT: exit if no button last_event present.
431
431
  if (_event.initializingAtStart === true && node.readStatusAtStartup === "no") return;
432
432
 
433
+ // Output the msg to the flow
434
+ node.send(_event);
435
+
433
436
  if (_event.hasOwnProperty("on")) {
434
437
  node.updateKNXLightState(_event.on.on);
435
438
  // In case of switch off, set the dim to zero
@@ -621,7 +624,7 @@ module.exports = function (RED) {
621
624
  node.setNodeStatusHue({
622
625
  fill: "blue",
623
626
  shape: "ring",
624
- text: "HUE->KNX HSV",
627
+ text: "HUE->KNX Kelvin",
625
628
  payload: knxMsgPayload.payload,
626
629
  });
627
630
  }
@@ -642,7 +645,31 @@ module.exports = function (RED) {
642
645
  }
643
646
  }
644
647
 
645
- node.on("input", (msg) => { });
648
+ node.on('input', (msg, send, done) => {
649
+ try {
650
+ const state = RED.util.cloneMessage(msg);
651
+ node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
652
+ node.setNodeStatusHue({
653
+ fill: "green",
654
+ shape: "dot",
655
+ text: "->HUE",
656
+ payload: "Flow msg.",
657
+ });
658
+ } catch (error) {
659
+ node.setNodeStatusHue({
660
+ fill: "red",
661
+ shape: "dot",
662
+ text: "->HUE",
663
+ payload: error.message,
664
+ });
665
+ }
666
+ // Once finished, call 'done'.
667
+ // This call is wrapped in a check that 'done' exists
668
+ // so the node will work in earlier versions of Node-RED (<1.0)
669
+ if (done) {
670
+ done();
671
+ }
672
+ });
646
673
 
647
674
  node.on("close", (done) => {
648
675
  if (node.server) {
@@ -227,7 +227,7 @@
227
227
 
228
228
 
229
229
  </script>
230
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
230
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
231
231
 
232
232
  <script type="text/markdown" data-help-name="knxUltimateHueLightSensor">
233
233
  This node lets you get the events from your HUE motion device.
@@ -217,7 +217,7 @@
217
217
 
218
218
 
219
219
  </script>
220
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
220
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
221
221
 
222
222
  <script type="text/markdown" data-help-name="knxUltimateHueMotion">
223
223
  This node lets you get the events from your HUE motion device.
@@ -13,6 +13,10 @@
13
13
  dptscene: { value: "" },
14
14
  valscene: { value: 0 }, // the scene number or true/false
15
15
 
16
+ enableNodePINS: { value: "no" },
17
+ outputs: { value: 0 },
18
+ inputs: { value: 0 },
19
+
16
20
  hueDevice: { value: "" },
17
21
  hueSceneRecallType: { value: "active" }
18
22
  },
@@ -167,7 +171,13 @@
167
171
 
168
172
  },
169
173
  oneditsave: function () {
170
-
174
+ if ($("#node-input-enableNodePINS").val() === "yes") {
175
+ this.outputs = 1;
176
+ this.inputs = 1;
177
+ } else {
178
+ this.outputs = 0;
179
+ this.inputs = 0;
180
+ }
171
181
 
172
182
  },
173
183
  oneditcancel: function () {
@@ -251,6 +261,21 @@
251
261
  <select id="node-input-valscene" style="width:180px;margin-left: 5px; text-align: left;"></select>
252
262
  </div>
253
263
 
264
+ <br/>
265
+ <br/>
266
+
267
+ <p>
268
+ <b>BEHAVIOUR</b>
269
+ </p>
270
+
271
+ <div class="form-row">
272
+ <label for="node-input-enableNodePINS" style="width:240px;">
273
+ <i class="fa fa-square-o"></i> Node Input/Output PINs
274
+ </label>
275
+ <select id="node-input-enableNodePINS">
276
+ <option value="no">Hide</option>
277
+ <option value="yes">Show node input/output PINs</option>
278
+ </select>
254
279
 
255
280
  <br/>
256
281
  <br/>
@@ -258,7 +283,7 @@
258
283
 
259
284
 
260
285
  </script>
261
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
286
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
262
287
 
263
288
  <script type="text/markdown" data-help-name="knxUltimateHueScene">
264
289
  This node lets you recall a HUE scene, via KNX.
@@ -272,12 +297,19 @@ Start typing in the GA field, the name or group address of your KNX device, the
272
297
  | HUE Bridge | Select the HUE Bridge to be used |
273
298
  | Hue Scene | HUE scene to control. The avaiable scenes start showing up while you're typing.|
274
299
 
300
+ **KNX**
275
301
 
276
302
  |Property|Description|
277
303
  |--|--|
278
304
  | Recall | Choose your group address to be used for recalling the HUE scene. In case of Datapoint 1.x, send *true* to that group address to recall the scene, *false* to switch off all lights belonging to the scene. |
279
305
  | # | Select the KNX scene number. Visible only with datapoint 18.001. |
280
306
 
307
+ **BEHAVIOUR**
308
+
309
+ |Property|Description|
310
+ |--|--|
311
+ | Node Input/Output PINs | Hide or show the input/output PINs. Input/output PINS allow the node to accept msg input from the flow and send msg output to the flow. Input msg must follow the HUE API v.2 Standards. Please refer to the [official HUE Api page](https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put) |
312
+
281
313
  <br/>
282
314
 
283
315
  [Find it useful?](https://www.paypal.me/techtoday)
@@ -75,31 +75,16 @@ module.exports = function (RED) {
75
75
  }
76
76
  };
77
77
 
78
- node.handleSendHUE = _event => {
78
+ node.handleSendHUE = (_event) => {
79
79
  try {
80
80
  if (_event.id === config.hueDevice) {
81
81
 
82
82
  // IMPORTANT: exit if no event presen.
83
83
  if (_event.initializingAtStart === true) return;
84
84
 
85
- // const knxMsgPayload = {}
86
- // knxMsgPayload.topic = config.GAmotion
87
- // knxMsgPayload.dpt = config.dptmotion
85
+ // Output the msg to the flow
86
+ node.send(_event);
88
87
 
89
- // if (_event.hasOwnProperty('motion') && _event.motion.hasOwnProperty('motion')) {
90
- // knxMsgPayload.payload = _event.motion.motion_report.motion
91
- // // Send to KNX bus
92
- // if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
93
- // node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
94
-
95
- // // Setup the output msg
96
- // knxMsgPayload.name = node.name
97
- // knxMsgPayload.event = 'motion'
98
-
99
- // // Send payload
100
- // knxMsgPayload.rawEvent = _event
101
- // node.send(knxMsgPayload)
102
- // }
103
88
  }
104
89
  } catch (error) {
105
90
  node.status({ fill: 'red', shape: 'dot', text: 'HUE->KNX error ' + error.message + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' });
@@ -116,10 +101,31 @@ module.exports = function (RED) {
116
101
  node.serverHue.addClient(node);
117
102
  }
118
103
 
119
- node.on('input', function (msg) {
120
-
104
+ node.on('input', (msg, send, done) => {
105
+ try {
106
+ const state = RED.util.cloneMessage(msg);
107
+ node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, state, 'setScene');
108
+ node.setNodeStatusHue({
109
+ fill: "green",
110
+ shape: "dot",
111
+ text: "->HUE",
112
+ payload: "Flow msg.",
113
+ });
114
+ } catch (error) {
115
+ node.setNodeStatusHue({
116
+ fill: "red",
117
+ shape: "dot",
118
+ text: "->HUE",
119
+ payload: error.message,
120
+ });
121
+ }
122
+ // Once finished, call 'done'.
123
+ // This call is wrapped in a check that 'done' exists
124
+ // so the node will work in earlier versions of Node-RED (<1.0)
125
+ if (done) {
126
+ done();
127
+ }
121
128
  });
122
-
123
129
  node.on('close', function (done) {
124
130
  if (node.server) {
125
131
  node.server.removeClient(node);
@@ -219,7 +219,7 @@
219
219
 
220
220
 
221
221
  </script>
222
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
222
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
223
223
 
224
224
  <script type="text/markdown" data-help-name="knxUltimateHueTapDial">
225
225
  This node lets you get the events from your HUE rotary device, for example the Tap Dial.
@@ -218,13 +218,13 @@
218
218
 
219
219
 
220
220
  </script>
221
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
221
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
222
222
 
223
- <script type="text/markdown" data-help-name="knxUltimateHueTemperatureSensor"
224
- This node lets you get the events from your HUE temperature device.
225
-
226
- Here you can get the HUE temperature events, that represents a celsius value, evetytime the ambient temp changes.<br/>
227
- Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
223
+ <script type="text/markdown" data-help-name="knxUltimateHueTemperatureSensor" This node lets you get the events from
224
+ your HUE temperature device. Here you can get the HUE temperature events, that represents a celsius value, evetytime
225
+ the ambient temp changes.<br />
226
+ Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while
227
+ you're typing.
228
228
 
229
229
  **General**
230
230
  |Property|Description|
@@ -245,13 +245,13 @@ Start typing in the GA field, the name or group address of your KNX device, the
245
245
 
246
246
  ### Details
247
247
 
248
- `msg.payload` is used as the payload of the published message.
249
- It contains the detailed event sent by your Hue devicem so you can use it for whatever you want.
248
+ `msg.payload` is used as the payload of the published message.
249
+ It contains the detailed event sent by your Hue devicem so you can use it for whatever you want.
250
250
 
251
- <br/>
251
+ <br />
252
252
 
253
253
  [Find it useful?](https://www.paypal.me/techtoday)
254
254
 
255
- <br/>
255
+ <br />
256
256
 
257
- </script>
257
+ </script>
@@ -1,6 +1,5 @@
1
-
2
1
  module.exports = function (RED) {
3
- function knxUltimateSceneController (config) {
2
+ function knxUltimateSceneController(config) {
4
3
  const fs = require('fs')
5
4
  const path = require('path')
6
5
  const mkdirp = require('mkdirp')
@@ -43,7 +42,7 @@ module.exports = function (RED) {
43
42
  })
44
43
 
45
44
  // 03/09/2021
46
- async function delay (ms) {
45
+ async function delay(ms) {
47
46
  return new Promise(function (resolve, reject) {
48
47
  try {
49
48
  node.timerWait = setTimeout(resolve, ms)
@@ -53,7 +52,7 @@ module.exports = function (RED) {
53
52
  })
54
53
  }
55
54
 
56
- function setupDirectory (aPath) {
55
+ function setupDirectory(aPath) {
57
56
  try {
58
57
  return fs.statSync(aPath).isDirectory()
59
58
  } catch (e) {
@@ -115,7 +114,7 @@ module.exports = function (RED) {
115
114
  }
116
115
 
117
116
  // 03/09/2021 Async function to allow await delay(x)
118
- async function RecallSceneAsync (_Payload, _ForceEvenControllerIsDisabled) {
117
+ async function RecallSceneAsync(_Payload, _ForceEvenControllerIsDisabled) {
119
118
  let curVal
120
119
  var newVal
121
120
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=16.0.0"
5
5
  },
6
- "version": "2.2.9",
6
+ "version": "2.2.11",
7
7
  "description": "Control your KNX intallation via Node-Red! Single Node KNX IN/OUT with optional ETS group address importer. Easy to use and highly configurable. With integrated Philips HUE devices control.",
8
8
  "dependencies": {
9
9
  "binary-parser": "2.2.1",
@@ -0,0 +1,2 @@
1
+ window.FontAwesomeKitConfig = { "asyncLoading": { "enabled": false }, "autoA11y": { "enabled": true }, "baseUrl": "https://ka-f.fontawesome.com", "baseUrlKit": "https://kit.fontawesome.com", "detectConflictsUntil": null, "iconUploads": {}, "id": 2836081, "license": "free", "method": "css", "minify": { "enabled": true }, "token": "11f26b4500", "v4FontFaceShim": { "enabled": true }, "v4shim": { "enabled": true }, "v5FontFaceShim": { "enabled": true }, "version": "6.4.2" };
2
+ !function (t) { "function" == typeof define && define.amd ? define("kit-loader", t) : t() }((function () { "use strict"; function t(t, e) { var n = Object.keys(t); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(t); e && (r = r.filter((function (e) { return Object.getOwnPropertyDescriptor(t, e).enumerable }))), n.push.apply(n, r) } return n } function e(e) { for (var n = 1; n < arguments.length; n++) { var o = null != arguments[n] ? arguments[n] : {}; n % 2 ? t(Object(o), !0).forEach((function (t) { r(e, t, o[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : t(Object(o)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t)) })) } return e } function n(t) { return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(t) } function r(t, e, n) { return (e = function (t) { var e = function (t, e) { if ("object" != typeof t || null === t) return t; var n = t[Symbol.toPrimitive]; if (void 0 !== n) { var r = n.call(t, e || "default"); if ("object" != typeof r) return r; throw new TypeError("@@toPrimitive must return a primitive value.") } return ("string" === e ? String : Number)(t) }(t, "string"); return "symbol" == typeof e ? e : String(e) }(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t } function o(t, e) { return function (t) { if (Array.isArray(t)) return t }(t) || function (t, e) { var n = null == t ? null : "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; if (null != n) { var r, o, i, c, a = [], u = !0, f = !1; try { if (i = (n = n.call(t)).next, 0 === e) { if (Object(n) !== n) return; u = !1 } else for (; !(u = (r = i.call(n)).done) && (a.push(r.value), a.length !== e); u = !0); } catch (t) { f = !0, o = t } finally { try { if (!u && null != n.return && (c = n.return(), Object(c) !== c)) return } finally { if (f) throw o } } return a } }(t, e) || function (t, e) { if (!t) return; if ("string" == typeof t) return i(t, e); var n = Object.prototype.toString.call(t).slice(8, -1); "Object" === n && t.constructor && (n = t.constructor.name); if ("Map" === n || "Set" === n) return Array.from(t); if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return i(t, e) }(t, e) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function i(t, e) { (null == e || e > t.length) && (e = t.length); for (var n = 0, r = new Array(e); n < e; n++)r[n] = t[n]; return r } function c(t, e) { var n = e && e.addOn || "", r = e && e.baseFilename || t.license + n, o = e && e.minify ? ".min" : "", i = e && e.fileSuffix || t.method, c = e && e.subdir || t.method; return t.baseUrl + "/releases/" + ("latest" === t.version ? "latest" : "v".concat(t.version)) + "/" + c + "/" + r + o + "." + i } function a(t, e) { var n = e || ["fa"], r = "." + Array.prototype.join.call(n, ",."), o = t.querySelectorAll(r); Array.prototype.forEach.call(o, (function (e) { var n = e.getAttribute("title"); e.setAttribute("aria-hidden", "true"); var r = !e.nextElementSibling || !e.nextElementSibling.classList.contains("sr-only"); if (n && r) { var o = t.createElement("span"); o.innerHTML = n, o.classList.add("sr-only"), e.parentNode.insertBefore(o, e.nextSibling) } })) } var u, f = function () { }, s = "undefined" != typeof global && void 0 !== global.process && "function" == typeof global.process.emit, l = "undefined" == typeof setImmediate ? setTimeout : setImmediate, d = []; function h() { for (var t = 0; t < d.length; t++)d[t][0](d[t][1]); d = [], u = !1 } function m(t, e) { d.push([t, e]), u || (u = !0, l(h, 0)) } function p(t) { var e = t.owner, n = e._state, r = e._data, o = t[n], i = t.then; if ("function" == typeof o) { n = "fulfilled"; try { r = o(r) } catch (t) { g(i, t) } } v(i, r) || ("fulfilled" === n && b(i, r), "rejected" === n && g(i, r)) } function v(t, e) { var r; try { if (t === e) throw new TypeError("A promises callback cannot return that same promise."); if (e && ("function" == typeof e || "object" === n(e))) { var o = e.then; if ("function" == typeof o) return o.call(e, (function (n) { r || (r = !0, e === n ? y(t, n) : b(t, n)) }), (function (e) { r || (r = !0, g(t, e)) })), !0 } } catch (e) { return r || g(t, e), !0 } return !1 } function b(t, e) { t !== e && v(t, e) || y(t, e) } function y(t, e) { "pending" === t._state && (t._state = "settled", t._data = e, m(A, t)) } function g(t, e) { "pending" === t._state && (t._state = "settled", t._data = e, m(S, t)) } function w(t) { t._then = t._then.forEach(p) } function A(t) { t._state = "fulfilled", w(t) } function S(t) { t._state = "rejected", w(t), !t._handled && s && global.process.emit("unhandledRejection", t._data, t) } function O(t) { global.process.emit("rejectionHandled", t) } function j(t) { if ("function" != typeof t) throw new TypeError("Promise resolver " + t + " is not a function"); if (this instanceof j == !1) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); this._then = [], function (t, e) { function n(t) { g(e, t) } try { t((function (t) { b(e, t) }), n) } catch (t) { n(t) } }(t, this) } j.prototype = { constructor: j, _state: "pending", _then: null, _data: void 0, _handled: !1, then: function (t, e) { var n = { owner: this, then: new this.constructor(f), fulfilled: t, rejected: e }; return !e && !t || this._handled || (this._handled = !0, "rejected" === this._state && s && m(O, this)), "fulfilled" === this._state || "rejected" === this._state ? m(p, n) : this._then.push(n), n.then }, catch: function (t) { return this.then(null, t) } }, j.all = function (t) { if (!Array.isArray(t)) throw new TypeError("You must pass an array to Promise.all()."); return new j((function (e, n) { var r = [], o = 0; function i(t) { return o++, function (n) { r[t] = n, --o || e(r) } } for (var c, a = 0; a < t.length; a++)(c = t[a]) && "function" == typeof c.then ? c.then(i(a), n) : r[a] = c; o || e(r) })) }, j.race = function (t) { if (!Array.isArray(t)) throw new TypeError("You must pass an array to Promise.race()."); return new j((function (e, n) { for (var r, o = 0; o < t.length; o++)(r = t[o]) && "function" == typeof r.then ? r.then(e, n) : e(r) })) }, j.resolve = function (t) { return t && "object" === n(t) && t.constructor === j ? t : new j((function (e) { e(t) })) }, j.reject = function (t) { return new j((function (e, n) { n(t) })) }; var E = "function" == typeof Promise ? Promise : j; function P(t, e) { var n = e.fetch, r = e.XMLHttpRequest, o = e.token, i = t; return o && !function (t) { return t.indexOf("kit-upload.css") > -1 }(t) && ("URLSearchParams" in window ? (i = new URL(t)).searchParams.set("token", o) : i = i + "?token=" + encodeURIComponent(o)), i = i.toString(), new E((function (t, e) { if ("function" == typeof n) n(i, { mode: "cors", cache: "default" }).then((function (t) { if (t.ok) return t.text(); throw new Error("") })).then((function (e) { t(e) })).catch(e); else if ("function" == typeof r) { var o = new r; o.addEventListener("loadend", (function () { this.responseText ? t(this.responseText) : e(new Error("")) }));["abort", "error", "timeout"].map((function (t) { o.addEventListener(t, (function () { e(new Error("")) })) })), o.open("GET", i), o.send() } else { e(new Error("")) } })) } function _(t, e, n) { var r = t; return [[/(url\("?)\.\.\/\.\.\/\.\./g, function (t, n) { return "".concat(n).concat(e) }], [/(url\("?)\.\.\/webfonts/g, function (t, r) { return "".concat(r).concat(e, "/releases/v").concat(n, "/webfonts") }], [/(url\("?)https:\/\/kit-free([^.])*\.fontawesome\.com/g, function (t, n) { return "".concat(n).concat(e) }]].forEach((function (t) { var e = o(t, 2), n = e[0], i = e[1]; r = r.replace(n, i) })), r } function F(t, n) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () { }, o = n.document || o, i = a.bind(a, o, ["fa", "fab", "fas", "far", "fal", "fad", "fak"]); t.autoA11y.enabled && r(i); var u = t.subsetPath && t.baseUrl + "/" + t.subsetPath, f = [{ id: "fa-main", addOn: void 0, url: u }]; if (t.v4shim && t.v4shim.enabled && f.push({ id: "fa-v4-shims", addOn: "-v4-shims" }), t.v5FontFaceShim && t.v5FontFaceShim.enabled && f.push({ id: "fa-v5-font-face", addOn: "-v5-font-face" }), t.v4FontFaceShim && t.v4FontFaceShim.enabled && f.push({ id: "fa-v4-font-face", addOn: "-v4-font-face" }), !u && t.customIconsCssPath) { var s = t.customIconsCssPath.indexOf("kit-upload.css") > -1 ? t.baseUrlKit : t.baseUrl, l = s + "/" + t.customIconsCssPath; f.push({ id: "fa-kit-upload", url: l }) } var d = f.map((function (r) { return new E((function (o, i) { var a = r.url || c(t, { addOn: r.addOn, minify: t.minify.enabled }), u = { id: r.id }, f = t.subset ? u : e(e(e({}, n), u), {}, { baseUrl: t.baseUrl, version: t.version, id: r.id, contentFilter: function (t, e) { return _(t, e.baseUrl, e.version) } }); P(a, n).then((function (t) { o(C(t, f)) })).catch(i) })) })); return E.all(d) } function C(t, e) { var n = e.contentFilter || function (t, e) { return t }, r = document.createElement("style"), o = document.createTextNode(n(t, e)); return r.appendChild(o), r.media = "all", e.id && r.setAttribute("id", e.id), e && e.detectingConflicts && e.detectionIgnoreAttr && r.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)), r } function I(t, n) { n.autoA11y = t.autoA11y.enabled, "pro" === t.license && (n.autoFetchSvg = !0, n.fetchSvgFrom = t.baseUrl + "/releases/" + ("latest" === t.version ? "latest" : "v".concat(t.version)) + "/svgs", n.fetchUploadedSvgFrom = t.uploadsUrl); var r = []; return t.v4shim.enabled && r.push(new E((function (r, o) { P(c(t, { addOn: "-v4-shims", minify: t.minify.enabled }), n).then((function (t) { r(U(t, e(e({}, n), {}, { id: "fa-v4-shims" }))) })).catch(o) }))), r.push(new E((function (r, o) { P(t.subsetPath && t.baseUrl + "/" + t.subsetPath || c(t, { minify: t.minify.enabled }), n).then((function (t) { var o = U(t, e(e({}, n), {}, { id: "fa-main" })); r(function (t, e) { var n = e && void 0 !== e.autoFetchSvg ? e.autoFetchSvg : void 0, r = e && void 0 !== e.autoA11y ? e.autoA11y : void 0; void 0 !== r && t.setAttribute("data-auto-a11y", r ? "true" : "false"); n && (t.setAttributeNode(document.createAttribute("data-auto-fetch-svg")), t.setAttribute("data-fetch-svg-from", e.fetchSvgFrom), t.setAttribute("data-fetch-uploaded-svg-from", e.fetchUploadedSvgFrom)); return t }(o, n)) })).catch(o) }))), E.all(r) } function U(t, e) { var n = document.createElement("SCRIPT"), r = document.createTextNode(t); return n.appendChild(r), n.referrerPolicy = "strict-origin", e.id && n.setAttribute("id", e.id), e && e.detectingConflicts && e.detectionIgnoreAttr && n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)), n } function T(t) { var e, n = [], r = document, o = r.documentElement.doScroll, i = (o ? /^loaded|^c/ : /^loaded|^i|^c/).test(r.readyState); i || r.addEventListener("DOMContentLoaded", e = function () { for (r.removeEventListener("DOMContentLoaded", e), i = 1; e = n.shift();)e() }), i ? setTimeout(t, 0) : n.push(t) } function L(t) { "undefined" != typeof MutationObserver && new MutationObserver(t).observe(document, { childList: !0, subtree: !0 }) } try { if (window.FontAwesomeKitConfig) { var k = window.FontAwesomeKitConfig, x = { detectingConflicts: k.detectConflictsUntil && new Date <= new Date(k.detectConflictsUntil), detectionIgnoreAttr: "data-fa-detection-ignore", fetch: window.fetch, token: k.token, XMLHttpRequest: window.XMLHttpRequest, document: document }, M = document.currentScript, N = M ? M.parentElement : document.head; (function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return "js" === t.method ? I(t, e) : "css" === t.method ? F(t, e, (function (t) { T(t), L(t) })) : void 0 })(k, x).then((function (t) { t.map((function (t) { try { N.insertBefore(t, M ? M.nextSibling : null) } catch (e) { N.appendChild(t) } })), x.detectingConflicts && M && T((function () { M.setAttributeNode(document.createAttribute(x.detectionIgnoreAttr)); var t = function (t, e) { var n = document.createElement("script"); return e && e.detectionIgnoreAttr && n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)), n.src = c(t, { baseFilename: "conflict-detection", fileSuffix: "js", subdir: "js", minify: t.minify.enabled }), n }(k, x); document.body.appendChild(t) })) })).catch((function (t) { console.error("".concat("Font Awesome Kit:", " ").concat(t)) })) } } catch (t) { console.error("".concat("Font Awesome Kit:", " ").concat(t)) } }));
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * iro.js v5.5.2
3
+ * 2016-2021 James Daniel
4
+ * Licensed under MPL 2.0
5
+ * github.com/jaames/iro.js
6
+ */
7
+ !function (t, n) { "object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define(n) : (t = t || self).iro = n() }(this, function () { "use strict"; var m, s, n, i, o, x = {}, j = [], r = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i; function M(t, n) { for (var i in n) t[i] = n[i]; return t } function y(t) { var n = t.parentNode; n && n.removeChild(t) } function h(t, n, i) { var r, e, u, o, l = arguments; if (n = M({}, n), 3 < arguments.length) for (i = [i], r = 3; r < arguments.length; r++)i.push(l[r]); if (null != i && (n.children = i), null != t && null != t.defaultProps) for (e in t.defaultProps) void 0 === n[e] && (n[e] = t.defaultProps[e]); return o = n.key, null != (u = n.ref) && delete n.ref, null != o && delete n.key, c(t, n, o, u) } function c(t, n, i, r) { var e = { type: t, props: n, key: i, ref: r, n: null, i: null, e: 0, o: null, l: null, c: null, constructor: void 0 }; return m.vnode && m.vnode(e), e } function O(t) { return t.children } function I(t, n) { this.props = t, this.context = n } function w(t, n) { if (null == n) return t.i ? w(t.i, t.i.n.indexOf(t) + 1) : null; for (var i; n < t.n.length; n++)if (null != (i = t.n[n]) && null != i.o) return i.o; return "function" == typeof t.type ? w(t) : null } function a(t) { var n, i; if (null != (t = t.i) && null != t.c) { for (t.o = t.c.base = null, n = 0; n < t.n.length; n++)if (null != (i = t.n[n]) && null != i.o) { t.o = t.c.base = i.o; break } return a(t) } } function e(t) { (!t.f && (t.f = !0) && 1 === s.push(t) || i !== m.debounceRendering) && (i = m.debounceRendering, (m.debounceRendering || n)(u)) } function u() { var t, n, i, r, e, u, o, l; for (s.sort(function (t, n) { return n.d.e - t.d.e }); t = s.pop();)t.f && (r = i = void 0, u = (e = (n = t).d).o, o = n.p, l = n.u, n.u = !1, o && (i = [], r = k(o, e, M({}, e), n.w, void 0 !== o.ownerSVGElement, null, i, l, null == u ? w(e) : u), d(i, e), r != u && a(e))) } function S(n, i, t, r, e, u, o, l, s) { var c, a, f, h, v, d, g, b = t && t.n || j, p = b.length; if (l == x && (l = null != u ? u[0] : p ? w(t, 0) : null), c = 0, i.n = A(i.n, function (t) { if (null != t) { if (t.i = i, t.e = i.e + 1, null === (f = b[c]) || f && t.key == f.key && t.type === f.type) b[c] = void 0; else for (a = 0; a < p; a++) { if ((f = b[a]) && t.key == f.key && t.type === f.type) { b[a] = void 0; break } f = null } if (h = k(n, t, f = f || x, r, e, u, o, null, l, s), (a = t.ref) && f.ref != a && (g = g || []).push(a, t.c || h, t), null != h) { if (null == d && (d = h), null != t.l) h = t.l, t.l = null; else if (u == f || h != l || null == h.parentNode) { t: if (null == l || l.parentNode !== n) n.appendChild(h); else { for (v = l, a = 0; (v = v.nextSibling) && a < p; a += 2)if (v == h) break t; n.insertBefore(h, l) } "option" == i.type && (n.value = "") } l = h.nextSibling, "function" == typeof i.type && (i.l = h) } } return c++, t }), i.o = d, null != u && "function" != typeof i.type) for (c = u.length; c--;)null != u[c] && y(u[c]); for (c = p; c--;)null != b[c] && N(b[c], b[c]); if (g) for (c = 0; c < g.length; c++)E(g[c], g[++c], g[++c]) } function A(t, n, i) { if (null == i && (i = []), null == t || "boolean" == typeof t) n && i.push(n(null)); else if (Array.isArray(t)) for (var r = 0; r < t.length; r++)A(t[r], n, i); else i.push(n ? n(function (t) { if (null == t || "boolean" == typeof t) return null; if ("string" == typeof t || "number" == typeof t) return c(null, t, null, null); if (null == t.o && null == t.c) return t; var n = c(t.type, t.props, t.key, null); return n.o = t.o, n }(t)) : t); return i } function f(t, n, i) { "-" === n[0] ? t.setProperty(n, i) : t[n] = "number" == typeof i && !1 === r.test(n) ? i + "px" : null == i ? "" : i } function R(t, n, i, r, e) { var u, o, l, s, c; if ("key" === (n = e ? "className" === n ? "class" : n : "class" === n ? "className" : n) || "children" === n); else if ("style" === n) if (u = t.style, "string" == typeof i) u.cssText = i; else { if ("string" == typeof r && (u.cssText = "", r = null), r) for (o in r) i && o in i || f(u, o, ""); if (i) for (l in i) r && i[l] === r[l] || f(u, l, i[l]) } else "o" === n[0] && "n" === n[1] ? (s = n !== (n = n.replace(/Capture$/, "")), n = ((c = n.toLowerCase()) in t ? c : n).slice(2), i ? (r || t.addEventListener(n, v, s), (t.t || (t.t = {}))[n] = i) : t.removeEventListener(n, v, s)) : "list" !== n && "tagName" !== n && "form" !== n && !e && n in t ? t[n] = null == i ? "" : i : "function" != typeof i && "dangerouslySetInnerHTML" !== n && (n !== (n = n.replace(/^xlink:?/, "")) ? null == i || !1 === i ? t.removeAttributeNS("http://www.w3.org/1999/xlink", n.toLowerCase()) : t.setAttributeNS("http://www.w3.org/1999/xlink", n.toLowerCase(), i) : null == i || !1 === i ? t.removeAttribute(n) : t.setAttribute(n, i)) } function v(t) { return this.t[t.type](m.event ? m.event(t) : t) } function k(t, n, i, r, e, u, o, l, s, c) { var a, f, h, v, d, g, b, p, y, w, k = n.type; if (void 0 !== n.constructor) return null; (a = m.e) && a(n); try { t: if ("function" == typeof k) { if (p = n.props, y = (a = k.contextType) && r[a.c], w = a ? y ? y.props.value : a.i : r, i.c ? b = (f = n.c = i.c).i = f.k : ("prototype" in k && k.prototype.render ? n.c = f = new k(p, w) : (n.c = f = new I(p, w), f.constructor = k, f.render = z), y && y.sub(f), f.props = p, f.state || (f.state = {}), f.context = w, f.w = r, h = f.f = !0, f.m = []), null == f.j && (f.j = f.state), null != k.getDerivedStateFromProps && M(f.j == f.state ? f.j = M({}, f.j) : f.j, k.getDerivedStateFromProps(p, f.j)), h) null == k.getDerivedStateFromProps && null != f.componentWillMount && f.componentWillMount(), null != f.componentDidMount && o.push(f); else { if (null == k.getDerivedStateFromProps && null == l && null != f.componentWillReceiveProps && f.componentWillReceiveProps(p, w), !l && null != f.shouldComponentUpdate && !1 === f.shouldComponentUpdate(p, f.j, w)) { for (f.props = p, f.state = f.j, f.f = !1, (f.d = n).o = null != s ? s !== i.o ? s : i.o : null, n.n = i.n, a = 0; a < n.n.length; a++)n.n[a] && (n.n[a].i = n); break t } null != f.componentWillUpdate && f.componentWillUpdate(p, f.j, w) } for (v = f.props, d = f.state, f.context = w, f.props = p, f.state = f.j, (a = m.M) && a(n), f.f = !1, f.d = n, f.p = t, a = f.render(f.props, f.state, f.context), n.n = A(null != a && a.type == O && null == a.key ? a.props.children : a), null != f.getChildContext && (r = M(M({}, r), f.getChildContext())), h || null == f.getSnapshotBeforeUpdate || (g = f.getSnapshotBeforeUpdate(v, d)), S(t, n, i, r, e, u, o, s, c), f.base = n.o; a = f.m.pop();)f.j && (f.state = f.j), a.call(f); h || null == v || null == f.componentDidUpdate || f.componentDidUpdate(v, d, g), b && (f.k = f.i = null) } else n.o = function (t, n, i, r, e, u, o, l) { var s, c, a, f, h = i.props, v = n.props; if (e = "svg" === n.type || e, null == t && null != u) for (s = 0; s < u.length; s++)if (null != (c = u[s]) && (null === n.type ? 3 === c.nodeType : c.localName === n.type)) { t = c, u[s] = null; break } if (null == t) { if (null === n.type) return document.createTextNode(v); t = e ? document.createElementNS("http://www.w3.org/2000/svg", n.type) : document.createElement(n.type), u = null } return null === n.type ? h !== v && (null != u && (u[u.indexOf(t)] = null), t.data = v) : n !== i && (null != u && (u = j.slice.call(t.childNodes)), a = (h = i.props || x).dangerouslySetInnerHTML, f = v.dangerouslySetInnerHTML, l || (f || a) && (f && a && f.O == a.O || (t.innerHTML = f && f.O || "")), function (t, n, i, r, e) { var u; for (u in i) u in n || R(t, u, null, i[u], r); for (u in n) e && "function" != typeof n[u] || "value" === u || "checked" === u || i[u] === n[u] || R(t, u, n[u], i[u], r) }(t, v, h, e, l), n.n = n.props.children, f || S(t, n, i, r, "foreignObject" !== n.type && e, u, o, x, l), l || ("value" in v && void 0 !== v.value && v.value !== t.value && (t.value = null == v.value ? "" : v.value), "checked" in v && void 0 !== v.checked && v.checked !== t.checked && (t.checked = v.checked))), t }(i.o, n, i, r, e, u, o, c); (a = m.diffed) && a(n) } catch (t) { m.o(t, n, i) } return n.o } function d(t, n) { for (var i; i = t.pop();)try { i.componentDidMount() } catch (t) { m.o(t, i.d) } m.c && m.c(n) } function E(t, n, i) { try { "function" == typeof t ? t(n) : t.current = n } catch (t) { m.o(t, i) } } function N(t, n, i) { var r, e, u; if (m.unmount && m.unmount(t), (r = t.ref) && E(r, null, n), i || "function" == typeof t.type || (i = null != (e = t.o)), t.o = t.l = null, null != (r = t.c)) { if (r.componentWillUnmount) try { r.componentWillUnmount() } catch (t) { m.o(t, n) } r.base = r.p = null } if (r = t.n) for (u = 0; u < r.length; u++)r[u] && N(r[u], n, i); null != e && y(e) } function z(t, n, i) { return this.constructor(t, i) } function g(t, n) { for (var i = 0; i < n.length; i++) { var r = n[i]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r) } } function b() { return (b = Object.assign || function (t) { for (var n = arguments, i = 1; i < arguments.length; i++) { var r = n[i]; for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (t[e] = r[e]) } return t }).apply(this, arguments) } m = {}, I.prototype.setState = function (t, n) { var i = this.j !== this.state && this.j || (this.j = M({}, this.state)); "function" == typeof t && !(t = t(i, this.props)) || M(i, t), null != t && this.d && (this.u = !1, n && this.m.push(n), e(this)) }, I.prototype.forceUpdate = function (t) { this.d && (t && this.m.push(t), this.u = !0, e(this)) }, I.prototype.render = O, s = [], n = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, i = m.debounceRendering, m.o = function (t, n, i) { for (var r; n = n.i;)if ((r = n.c) && !r.i) try { if (r.constructor && null != r.constructor.getDerivedStateFromError) r.setState(r.constructor.getDerivedStateFromError(t)); else { if (null == r.componentDidCatch) continue; r.componentDidCatch(t) } return e(r.k = r) } catch (n) { t = n } throw t }, o = x; var t = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)", l = "[\\s|\\(]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")\\s*\\)?", p = "[\\s|\\(]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")[,|\\s]+(" + t + ")\\s*\\)?", _ = new RegExp("rgb" + l), H = new RegExp("rgba" + p), P = new RegExp("hsl" + l), $ = new RegExp("hsla" + p), T = "^(?:#?|0x?)", W = "([0-9a-fA-F]{1})", C = "([0-9a-fA-F]{2})", D = new RegExp(T + W + W + W + "$"), F = new RegExp(T + W + W + W + W + "$"), L = new RegExp(T + C + C + C + "$"), B = new RegExp(T + C + C + C + C + "$"), q = Math.log, G = Math.round, Z = Math.floor; function J(t, n, i) { return Math.min(Math.max(t, n), i) } function K(t, n) { var i = -1 < t.indexOf("%"), r = parseFloat(t); return i ? n / 100 * r : r } function Q(t) { return parseInt(t, 16) } function U(t) { return t.toString(16).padStart(2, "0") } var V = function () { function l(t, n) { this.$ = { h: 0, s: 0, v: 0, a: 1 }, t && this.set(t), this.onChange = n, this.initialValue = b({}, this.$) } var t = l.prototype; return t.set = function (t) { if ("string" == typeof t) /^(?:#?|0x?)[0-9a-fA-F]{3,8}$/.test(t) ? this.hexString = t : /^rgba?/.test(t) ? this.rgbString = t : /^hsla?/.test(t) && (this.hslString = t); else { if ("object" != typeof t) throw new Error("Invalid color value"); t instanceof l ? this.hsva = t.hsva : "r" in t && "g" in t && "b" in t ? this.rgb = t : "h" in t && "s" in t && "v" in t ? this.hsv = t : "h" in t && "s" in t && "l" in t ? this.hsl = t : "kelvin" in t && (this.kelvin = t.kelvin) } }, t.setChannel = function (t, n, i) { var r; this[t] = b({}, this[t], ((r = {})[n] = i, r)) }, t.reset = function () { this.hsva = this.initialValue }, t.clone = function () { return new l(this) }, t.unbind = function () { this.onChange = void 0 }, l.hsvToRgb = function (t) { var n = t.h / 60, i = t.s / 100, r = t.v / 100, e = Z(n), u = n - e, o = r * (1 - i), l = r * (1 - u * i), s = r * (1 - (1 - u) * i), c = e % 6, a = [s, r, r, l, o, o][c], f = [o, o, s, r, r, l][c]; return { r: J(255 * [r, l, o, o, s, r][c], 0, 255), g: J(255 * a, 0, 255), b: J(255 * f, 0, 255) } }, l.rgbToHsv = function (t) { var n = t.r / 255, i = t.g / 255, r = t.b / 255, e = Math.max(n, i, r), u = Math.min(n, i, r), o = e - u, l = 0, s = e, c = 0 === e ? 0 : o / e; switch (e) { case u: l = 0; break; case n: l = (i - r) / o + (i < r ? 6 : 0); break; case i: l = (r - n) / o + 2; break; case r: l = (n - i) / o + 4 }return { h: 60 * l % 360, s: J(100 * c, 0, 100), v: J(100 * s, 0, 100) } }, l.hsvToHsl = function (t) { var n = t.s / 100, i = t.v / 100, r = (2 - n) * i, e = r <= 1 ? r : 2 - r, u = e < 1e-9 ? 0 : n * i / e; return { h: t.h, s: J(100 * u, 0, 100), l: J(50 * r, 0, 100) } }, l.hslToHsv = function (t) { var n = 2 * t.l, i = t.s * (n <= 100 ? n : 200 - n) / 100, r = n + i < 1e-9 ? 0 : 2 * i / (n + i); return { h: t.h, s: J(100 * r, 0, 100), v: J((n + i) / 2, 0, 100) } }, l.kelvinToRgb = function (t) { var n, i, r, e = t / 100; return r = e < 66 ? (n = 255, i = -155.25485562709179 - .44596950469579133 * (i = e - 2) + 104.49216199393888 * q(i), e < 20 ? 0 : .8274096064007395 * (r = e - 10) - 254.76935184120902 + 115.67994401066147 * q(r)) : (n = 351.97690566805693 + .114206453784165 * (n = e - 55) - 40.25366309332127 * q(n), i = 325.4494125711974 + .07943456536662342 * (i = e - 50) - 28.0852963507957 * q(i), 255), { r: J(Z(n), 0, 255), g: J(Z(i), 0, 255), b: J(Z(r), 0, 255) } }, l.rgbToKelvin = function (t) { for (var n, i = t.r, r = t.b, e = 2e3, u = 4e4; .4 < u - e;) { var o = l.kelvinToRgb(n = .5 * (u + e)); o.b / o.r >= r / i ? u = n : e = n } return n }, function (t, n, i) { n && g(t.prototype, n), i && g(t, i) }(l, [{ key: "hsv", get: function () { var t = this.$; return { h: t.h, s: t.s, v: t.v } }, set: function (t) { var n = this.$; if (t = b({}, n, t), this.onChange) { var i = { h: !1, v: !1, s: !1, a: !1 }; for (var r in n) i[r] = t[r] != n[r]; this.$ = t, (i.h || i.s || i.v || i.a) && this.onChange(this, i) } else this.$ = t } }, { key: "hsva", get: function () { return b({}, this.$) }, set: function (t) { this.hsv = t } }, { key: "hue", get: function () { return this.$.h }, set: function (t) { this.hsv = { h: t } } }, { key: "saturation", get: function () { return this.$.s }, set: function (t) { this.hsv = { s: t } } }, { key: "value", get: function () { return this.$.v }, set: function (t) { this.hsv = { v: t } } }, { key: "alpha", get: function () { return this.$.a }, set: function (t) { this.hsv = b({}, this.hsv, { a: t }) } }, { key: "kelvin", get: function () { return l.rgbToKelvin(this.rgb) }, set: function (t) { this.rgb = l.kelvinToRgb(t) } }, { key: "red", get: function () { return this.rgb.r }, set: function (t) { this.rgb = b({}, this.rgb, { r: t }) } }, { key: "green", get: function () { return this.rgb.g }, set: function (t) { this.rgb = b({}, this.rgb, { g: t }) } }, { key: "blue", get: function () { return this.rgb.b }, set: function (t) { this.rgb = b({}, this.rgb, { b: t }) } }, { key: "rgb", get: function () { var t = l.hsvToRgb(this.$), n = t.r, i = t.g, r = t.b; return { r: G(n), g: G(i), b: G(r) } }, set: function (t) { this.hsv = b({}, l.rgbToHsv(t), { a: void 0 === t.a ? 1 : t.a }) } }, { key: "rgba", get: function () { return b({}, this.rgb, { a: this.alpha }) }, set: function (t) { this.rgb = t } }, { key: "hsl", get: function () { var t = l.hsvToHsl(this.$), n = t.h, i = t.s, r = t.l; return { h: G(n), s: G(i), l: G(r) } }, set: function (t) { this.hsv = b({}, l.hslToHsv(t), { a: void 0 === t.a ? 1 : t.a }) } }, { key: "hsla", get: function () { return b({}, this.hsl, { a: this.alpha }) }, set: function (t) { this.hsl = t } }, { key: "rgbString", get: function () { var t = this.rgb; return "rgb(" + t.r + ", " + t.g + ", " + t.b + ")" }, set: function (t) { var n, i, r, e, u = 1; if ((n = _.exec(t)) ? (i = K(n[1], 255), r = K(n[2], 255), e = K(n[3], 255)) : (n = H.exec(t)) && (i = K(n[1], 255), r = K(n[2], 255), e = K(n[3], 255), u = K(n[4], 1)), !n) throw new Error("Invalid rgb string"); this.rgb = { r: i, g: r, b: e, a: u } } }, { key: "rgbaString", get: function () { var t = this.rgba; return "rgba(" + t.r + ", " + t.g + ", " + t.b + ", " + t.a + ")" }, set: function (t) { this.rgbString = t } }, { key: "hexString", get: function () { var t = this.rgb; return "#" + U(t.r) + U(t.g) + U(t.b) }, set: function (t) { var n, i, r, e, u = 255; if ((n = D.exec(t)) ? (i = 17 * Q(n[1]), r = 17 * Q(n[2]), e = 17 * Q(n[3])) : (n = F.exec(t)) ? (i = 17 * Q(n[1]), r = 17 * Q(n[2]), e = 17 * Q(n[3]), u = 17 * Q(n[4])) : (n = L.exec(t)) ? (i = Q(n[1]), r = Q(n[2]), e = Q(n[3])) : (n = B.exec(t)) && (i = Q(n[1]), r = Q(n[2]), e = Q(n[3]), u = Q(n[4])), !n) throw new Error("Invalid hex string"); this.rgb = { r: i, g: r, b: e, a: u / 255 } } }, { key: "hex8String", get: function () { var t = this.rgba; return "#" + U(t.r) + U(t.g) + U(t.b) + U(Z(255 * t.a)) }, set: function (t) { this.hexString = t } }, { key: "hslString", get: function () { var t = this.hsl; return "hsl(" + t.h + ", " + t.s + "%, " + t.l + "%)" }, set: function (t) { var n, i, r, e, u = 1; if ((n = P.exec(t)) ? (i = K(n[1], 360), r = K(n[2], 100), e = K(n[3], 100)) : (n = $.exec(t)) && (i = K(n[1], 360), r = K(n[2], 100), e = K(n[3], 100), u = K(n[4], 1)), !n) throw new Error("Invalid hsl string"); this.hsl = { h: i, s: r, l: e, a: u } } }, { key: "hslaString", get: function () { var t = this.hsla; return "hsla(" + t.h + ", " + t.s + "%, " + t.l + "%, " + t.a + ")" }, set: function (t) { this.hslString = t } }]), l }(); function X(t) { var n, i = t.width, r = t.sliderSize, e = t.borderWidth, u = t.handleRadius, o = t.padding, l = t.sliderShape, s = "horizontal" === t.layoutDirection; return r = null != (n = r) ? n : 2 * o + 2 * u, "circle" === l ? { handleStart: t.padding + t.handleRadius, handleRange: i - 2 * o - 2 * u, width: i, height: i, cx: i / 2, cy: i / 2, radius: i / 2 - e / 2 } : { handleStart: r / 2, handleRange: i - r, radius: r / 2, x: 0, y: 0, width: s ? r : i, height: s ? i : r } } function Y(t, n) { var i = X(t), r = i.width, e = i.height, u = i.handleRange, o = i.handleStart, l = "horizontal" === t.layoutDirection, s = l ? r / 2 : e / 2, c = o + function (t, n) { var i = n.hsva, r = n.rgb; switch (t.sliderType) { case "red": return r.r / 2.55; case "green": return r.g / 2.55; case "blue": return r.b / 2.55; case "alpha": return 100 * i.a; case "kelvin": var e = t.minTemperature, u = t.maxTemperature - e, o = (n.kelvin - e) / u * 100; return Math.max(0, Math.min(o, 100)); case "hue": return i.h /= 3.6; case "saturation": return i.s; case "value": default: return i.v } }(t, n) / 100 * u; return l && (c = -1 * c + u + 2 * o), { x: l ? s : c, y: l ? c : s } } var tt, nt = 2 * Math.PI, it = function (t, n) { return (t % n + n) % n }, rt = function (t, n) { return Math.sqrt(t * t + n * n) }; function et(t) { return t.width / 2 - t.padding - t.handleRadius - t.borderWidth } function ut(t) { var n = t.width / 2; return { width: t.width, radius: n - t.borderWidth, cx: n, cy: n } } function ot(t, n, i) { var r = t.wheelAngle, e = t.wheelDirection; return i && "clockwise" === e ? n = r + n : "clockwise" === e ? n = 360 - r + n : i && "anticlockwise" === e ? n = r + 180 - n : "anticlockwise" === e && (n = r - n), it(n, 360) } function lt(t, n, i) { var r = ut(t), e = r.cx, u = r.cy, o = et(t); n = e - n, i = u - i; var l = ot(t, Math.atan2(-i, -n) * (360 / nt)), s = Math.min(rt(n, i), o); return { h: Math.round(l), s: Math.round(100 / o * s) } } function st(t) { var n = t.width, i = t.boxHeight; return { width: n, height: null != i ? i : n, radius: t.padding + t.handleRadius } } function ct(t, n, i) { var r = st(t), e = r.width, u = r.height, o = r.radius, l = (n - o) / (e - 2 * o) * 100, s = (i - o) / (u - 2 * o) * 100; return { s: Math.max(0, Math.min(l, 100)), v: Math.max(0, Math.min(100 - s, 100)) } } function at(t, n, i, r) { for (var e = 0; e < r.length; e++) { var u = r[e].x - n, o = r[e].y - i; if (Math.sqrt(u * u + o * o) < t.handleRadius) return e } return null } function ft(t) { return { boxSizing: "border-box", border: t.borderWidth + "px solid " + t.borderColor } } function ht(t, n, i) { return t + "-gradient(" + n + ", " + i.map(function (t) { var n = t[0]; return t[1] + " " + n + "%" }).join(",") + ")" } function vt(t) { return "string" == typeof t ? t : t + "px" } var dt = ["mousemove", "touchmove", "mouseup", "touchend"], gt = function (n) { function t(t) { n.call(this, t), this.uid = (Math.random() + 1).toString(36).substring(5) } return n && (t.__proto__ = n), ((t.prototype = Object.create(n && n.prototype)).constructor = t).prototype.render = function (t) { var n = this.handleEvent.bind(this), i = { onMouseDown: n, ontouchstart: n }, r = "horizontal" === t.layoutDirection, e = null === t.margin ? t.sliderMargin : t.margin, u = { overflow: "visible", display: r ? "inline-block" : "block" }; return 0 < t.index && (u[r ? "marginLeft" : "marginTop"] = e), h(O, null, t.children(this.uid, i, u)) }, t.prototype.handleEvent = function (t) { var n = this, i = this.props.onInput, r = this.base.getBoundingClientRect(); t.preventDefault(); var e = t.touches ? t.changedTouches[0] : t, u = e.clientX - r.left, o = e.clientY - r.top; switch (t.type) { case "mousedown": case "touchstart": !1 !== i(u, o, 0) && dt.forEach(function (t) { document.addEventListener(t, n, { passive: !1 }) }); break; case "mousemove": case "touchmove": i(u, o, 1); break; case "mouseup": case "touchend": i(u, o, 2), dt.forEach(function (t) { document.removeEventListener(t, n, { passive: !1 }) }) } }, t }(I); function bt(t) { var n = t.r, i = t.url, r = n, e = n; return h("svg", { className: "IroHandle IroHandle--" + t.index + " " + (t.isActive ? "IroHandle--isActive" : ""), style: { "-webkit-tap-highlight-color": "rgba(0, 0, 0, 0);", transform: "translate(" + vt(t.x) + ", " + vt(t.y) + ")", willChange: "transform", top: vt(-n), left: vt(-n), width: vt(2 * n), height: vt(2 * n), position: "absolute", overflow: "visible" } }, i && h("use", Object.assign({ xlinkHref: function (t) { tt = tt || document.getElementsByTagName("base"); var n = window.navigator.userAgent, i = /^((?!chrome|android).)*safari/i.test(n), r = /iPhone|iPod|iPad/i.test(n), e = window.location; return (i || r) && 0 < tt.length ? e.protocol + "//" + e.host + e.pathname + e.search + t : t }(i) }, t.props)), !i && h("circle", { cx: r, cy: e, r: n, fill: "none", "stroke-width": 2, stroke: "#000" }), !i && h("circle", { cx: r, cy: e, r: n - 2, fill: t.fill, "stroke-width": 2, stroke: "#fff" })) } function pt(e) { var t = e.activeIndex, u = void 0 !== t && t < e.colors.length ? e.colors[t] : e.color, n = X(e), r = n.width, o = n.height, l = n.radius, s = Y(e, u), c = function (t, n) { var i = n.hsv, r = n.rgb; switch (t.sliderType) { case "red": return [[0, "rgb(0," + r.g + "," + r.b + ")"], [100, "rgb(255," + r.g + "," + r.b + ")"]]; case "green": return [[0, "rgb(" + r.r + ",0," + r.b + ")"], [100, "rgb(" + r.r + ",255," + r.b + ")"]]; case "blue": return [[0, "rgb(" + r.r + "," + r.g + ",0)"], [100, "rgb(" + r.r + "," + r.g + ",255)"]]; case "alpha": return [[0, "rgba(" + r.r + "," + r.g + "," + r.b + ",0)"], [100, "rgb(" + r.r + "," + r.g + "," + r.b + ")"]]; case "kelvin": for (var e = [], u = t.minTemperature, o = t.maxTemperature, l = o - u, s = u, c = 0; s < o; s += l / 8, c += 1) { var a = V.kelvinToRgb(s), f = a.r, h = a.g, v = a.b; e.push([12.5 * c, "rgb(" + f + "," + h + "," + v + ")"]) } return e; case "hue": return [[0, "#f00"], [16.666, "#ff0"], [33.333, "#0f0"], [50, "#0ff"], [66.666, "#00f"], [83.333, "#f0f"], [100, "#f00"]]; case "saturation": var d = V.hsvToHsl({ h: i.h, s: 0, v: i.v }), g = V.hsvToHsl({ h: i.h, s: 100, v: i.v }); return [[0, "hsl(" + d.h + "," + d.s + "%," + d.l + "%)"], [100, "hsl(" + g.h + "," + g.s + "%," + g.l + "%)"]]; case "value": default: var b = V.hsvToHsl({ h: i.h, s: i.s, v: 100 }); return [[0, "#000"], [100, "hsl(" + b.h + "," + b.s + "%," + b.l + "%)"]] } }(e, u); return h(gt, Object.assign({}, e, { onInput: function (t, n, i) { var r = function (t, n, i) { var r, e = X(t), u = e.handleRange, o = e.handleStart; r = "horizontal" === t.layoutDirection ? -1 * i + u + o : n - o, r = Math.max(Math.min(r, u), 0); var l = Math.round(100 / u * r); switch (t.sliderType) { case "kelvin": var s = t.minTemperature; return s + l / 100 * (t.maxTemperature - s); case "alpha": return l / 100; case "hue": return 3.6 * l; case "red": case "blue": case "green": return 2.55 * l; default: return l } }(e, t, n); e.parent.inputActive = !0, u[e.sliderType] = r, e.onInput(i, e.id) } }), function (t, n, i) { return h("div", Object.assign({}, n, { className: "IroSlider", style: Object.assign({}, { position: "relative", width: vt(r), height: vt(o), borderRadius: vt(l), background: "conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0)", backgroundSize: "8px 8px" }, i) }), h("div", { className: "IroSliderGradient", style: Object.assign({}, { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", borderRadius: vt(l), background: ht("linear", "horizontal" === e.layoutDirection ? "to top" : "to right", c) }, ft(e)) }), h(bt, { isActive: !0, index: u.index, r: e.handleRadius, url: e.handleSvg, props: e.handleProps, x: s.x, y: s.y })) }) } function yt(e) { var t = st(e), r = t.width, u = t.height, o = t.radius, l = e.colors, s = e.parent, n = e.activeIndex, c = void 0 !== n && n < e.colors.length ? e.colors[n] : e.color, a = function (t, n) { return [[[0, "#fff"], [100, "hsl(" + n.hue + ",100%,50%)"]], [[0, "rgba(0,0,0,0)"], [100, "#000"]]] }(0, c), f = l.map(function (t) { return function (t, n) { var i = st(t), r = i.width, e = i.height, u = i.radius, o = n.hsv, l = u, s = r - 2 * u, c = e - 2 * u; return { x: l + o.s / 100 * s, y: l + (c - o.v / 100 * c) } }(e, t) }); return h(gt, Object.assign({}, e, { onInput: function (t, n, i) { if (0 === i) { var r = at(e, t, n, f); null !== r ? s.setActiveColor(r) : (s.inputActive = !0, c.hsv = ct(e, t, n), e.onInput(i, e.id)) } else 1 === i && (s.inputActive = !0, c.hsv = ct(e, t, n)); e.onInput(i, e.id) } }), function (t, n, i) { return h("div", Object.assign({}, n, { className: "IroBox", style: Object.assign({}, { width: vt(r), height: vt(u), position: "relative" }, i) }), h("div", { className: "IroBox", style: Object.assign({}, { width: "100%", height: "100%", borderRadius: vt(o) }, ft(e), { background: ht("linear", "to bottom", a[1]) + "," + ht("linear", "to right", a[0]) }) }), l.filter(function (t) { return t !== c }).map(function (t) { return h(bt, { isActive: !1, index: t.index, fill: t.hslString, r: e.handleRadius, url: e.handleSvg, props: e.handleProps, x: f[t.index].x, y: f[t.index].y }) }), h(bt, { isActive: !0, index: c.index, fill: c.hslString, r: e.activeHandleRadius || e.handleRadius, url: e.handleSvg, props: e.handleProps, x: f[c.index].x, y: f[c.index].y })) }) } bt.defaultProps = { fill: "none", x: 0, y: 0, r: 8, url: null, props: { x: 0, y: 0 } }, pt.defaultProps = Object.assign({}, { sliderShape: "bar", sliderType: "value", minTemperature: 2200, maxTemperature: 11e3 }); function wt(e) { var r = ut(e).width, u = e.colors, o = (e.borderWidth, e.parent), l = e.color, s = l.hsv, c = u.map(function (t) { return function (t, n) { var i = n.hsv, r = ut(t), e = r.cx, u = r.cy, o = et(t), l = (180 + ot(t, i.h, !0)) * (nt / 360), s = i.s / 100 * o, c = "clockwise" === t.wheelDirection ? -1 : 1; return { x: e + s * Math.cos(l) * c, y: u + s * Math.sin(l) * c } }(e, t) }), a = { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", borderRadius: "50%", boxSizing: "border-box" }; return h(gt, Object.assign({}, e, { onInput: function (t, n, i) { if (0 === i) { if (!function (t, n, i) { var r = ut(t), e = r.cx, u = r.cy, o = t.width / 2; return rt(e - n, u - i) < o }(e, t, n)) return !1; var r = at(e, t, n, c); null !== r ? o.setActiveColor(r) : (o.inputActive = !0, l.hsv = lt(e, t, n), e.onInput(i, e.id)) } else 1 === i && (o.inputActive = !0, l.hsv = lt(e, t, n)); e.onInput(i, e.id) } }), function (t, n, i) { return h("div", Object.assign({}, n, { className: "IroWheel", style: Object.assign({}, { width: vt(r), height: vt(r), position: "relative" }, i) }), h("div", { className: "IroWheelHue", style: Object.assign({}, a, { transform: "rotateZ(" + (e.wheelAngle + 90) + "deg)", background: "clockwise" === e.wheelDirection ? "conic-gradient(red, yellow, lime, aqua, blue, magenta, red)" : "conic-gradient(red, magenta, blue, aqua, lime, yellow, red)" }) }), h("div", { className: "IroWheelSaturation", style: Object.assign({}, a, { background: "radial-gradient(circle closest-side, #fff, transparent)" }) }), e.wheelLightness && h("div", { className: "IroWheelLightness", style: Object.assign({}, a, { background: "#000", opacity: 1 - s.v / 100 }) }), h("div", { className: "IroWheelBorder", style: Object.assign({}, a, ft(e)) }), u.filter(function (t) { return t !== l }).map(function (t) { return h(bt, { isActive: !1, index: t.index, fill: t.hslString, r: e.handleRadius, url: e.handleSvg, props: e.handleProps, x: c[t.index].x, y: c[t.index].y }) }), h(bt, { isActive: !0, index: l.index, fill: l.hslString, r: e.activeHandleRadius || e.handleRadius, url: e.handleSvg, props: e.handleProps, x: c[l.index].x, y: c[l.index].y })) }) } var kt = function (i) { function t(t) { var n = this; i.call(this, t), this.colors = [], this.inputActive = !1, this.events = {}, this.activeEvents = {}, this.deferredEvents = {}, this.id = t.id, (0 < t.colors.length ? t.colors : [t.color]).forEach(function (t) { return n.addColor(t) }), this.setActiveColor(0), this.state = Object.assign({}, t, { color: this.color, colors: this.colors, layout: t.layout }) } return i && (t.__proto__ = i), ((t.prototype = Object.create(i && i.prototype)).constructor = t).prototype.addColor = function (t, n) { void 0 === n && (n = this.colors.length); var i = new V(t, this.onColorChange.bind(this)); this.colors.splice(n, 0, i), this.colors.forEach(function (t, n) { return t.index = n }), this.state && this.setState({ colors: this.colors }), this.deferredEmit("color:init", i) }, t.prototype.removeColor = function (t) { var n = this.colors.splice(t, 1)[0]; n.unbind(), this.colors.forEach(function (t, n) { return t.index = n }), this.state && this.setState({ colors: this.colors }), n.index === this.color.index && this.setActiveColor(0), this.emit("color:remove", n) }, t.prototype.setActiveColor = function (t) { this.color = this.colors[t], this.state && this.setState({ color: this.color }), this.emit("color:setActive", this.color) }, t.prototype.setColors = function (t, n) { var i = this; void 0 === n && (n = 0), this.colors.forEach(function (t) { return t.unbind() }), this.colors = [], t.forEach(function (t) { return i.addColor(t) }), this.setActiveColor(n), this.emit("color:setAll", this.colors) }, t.prototype.on = function (t, n) { var i = this, r = this.events; (Array.isArray(t) ? t : [t]).forEach(function (t) { (r[t] || (r[t] = [])).push(n), i.deferredEvents[t] && (i.deferredEvents[t].forEach(function (t) { n.apply(null, t) }), i.deferredEvents[t] = []) }) }, t.prototype.off = function (t, i) { var r = this; (Array.isArray(t) ? t : [t]).forEach(function (t) { var n = r.events[t]; n && n.splice(n.indexOf(i), 1) }) }, t.prototype.emit = function (t) { for (var n = this, i = [], r = arguments.length - 1; 0 < r--;)i[r] = arguments[r + 1]; var e = this.activeEvents; !!e.hasOwnProperty(t) && e[t] || (e[t] = !0, (this.events[t] || []).forEach(function (t) { return t.apply(n, i) }), e[t] = !1) }, t.prototype.deferredEmit = function (t) { for (var n, i = [], r = arguments.length - 1; 0 < r--;)i[r] = arguments[r + 1]; var e = this.deferredEvents; (n = this).emit.apply(n, [t].concat(i)), (e[t] || (e[t] = [])).push(i) }, t.prototype.setOptions = function (t) { this.setState(t) }, t.prototype.resize = function (t) { this.setOptions({ width: t }) }, t.prototype.reset = function () { this.colors.forEach(function (t) { return t.reset() }), this.setState({ colors: this.colors }) }, t.prototype.onMount = function (t) { this.el = t, this.deferredEmit("mount", this) }, t.prototype.onColorChange = function (t, n) { this.setState({ color: this.color }), this.inputActive && (this.inputActive = !1, this.emit("input:change", t, n)), this.emit("color:change", t, n) }, t.prototype.emitInputEvent = function (t, n) { 0 === t ? this.emit("input:start", this.color, n) : 1 === t ? this.emit("input:move", this.color, n) : 2 === t && this.emit("input:end", this.color, n) }, t.prototype.render = function (t, e) { var u = this, n = e.layout; return Array.isArray(n) || (n = [{ component: wt }, { component: pt }], e.transparency && n.push({ component: pt, options: { sliderType: "alpha" } })), h("div", { class: "IroColorPicker", id: e.id, style: { display: e.display } }, n.map(function (t, n) { var i = t.component, r = t.options; return h(i, Object.assign({}, e, r, { ref: void 0, onInput: u.emitInputEvent.bind(u), parent: u, index: n })) })) }, t }(I); kt.defaultProps = Object.assign({}, { width: 300, height: 300, color: "#fff", colors: [], padding: 6, layoutDirection: "vertical", borderColor: "#fff", borderWidth: 0, handleRadius: 8, activeHandleRadius: null, handleSvg: null, handleProps: { x: 0, y: 0 }, wheelLightness: !0, wheelAngle: 0, wheelDirection: "anticlockwise", sliderSize: null, sliderMargin: 12, boxHeight: null }, { colors: [], display: "block", id: null, layout: "default", margin: null }); var mt, xt, jt, Mt, Ot = (It.prototype = (mt = kt).prototype, Object.assign(It, mt), It.I = mt, It); function It(n, t) { var i, r = document.createElement("div"); function e() { var t = n instanceof Element ? n : document.querySelector(n); t.appendChild(i.base), i.onMount(t) } return function (t, n, i) { var r, e, u; m.i && m.i(t, n), e = (r = i === o) ? null : i && i.n || n.n, t = h(O, null, [t]), u = [], k(n, r ? n.n = t : (i || n).n = t, e || x, x, void 0 !== n.ownerSVGElement, i && !r ? [i] : e ? null : j.slice.call(n.childNodes), u, !1, i || x, r), d(u, t) }(h(mt, Object.assign({}, { ref: function (t) { return i = t } }, t)), r), "loading" !== document.readyState ? e() : document.addEventListener("DOMContentLoaded", e), i } return (jt = xt = xt || {}).version = "5.5.2", jt.Color = V, jt.ColorPicker = Ot, (Mt = jt.ui || (jt.ui = {})).h = h, Mt.ComponentBase = gt, Mt.Handle = bt, Mt.Slider = pt, Mt.Wheel = wt, Mt.Box = yt, xt });