reflekt 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 862841ab79ef50d5b096398525e0f75014b0204184329f8a6b5e010a70927f4f
4
- data.tar.gz: 37797b16ae059518507a1e0ec7a0f1e0678cf78da58f3cbd8fafd27bb349d78b
3
+ metadata.gz: 457006f1c0a4fbe9a1ce47684aeeec980852cd966f29d07ac57751161f314d52
4
+ data.tar.gz: ca01fd9306ece9e1698aab0dcb4945a848a5a910625f8b9394b4f26aa7819514
5
5
  SHA512:
6
- metadata.gz: ae2247c88853aaba496bba94ab7edfa91dfce613ab42f5e33abe4ab43409c2fddb9eb0888ed71668cc49b860dc323e2a4875ee01b82119ba2576aeb925342b09
7
- data.tar.gz: 5f30074666b11dbfc6af40a466e15142c4fd2489d3aa445c6d534c78cf620889768d7934be2077ccdb2690a1ebc860c5770ad9c28a6f31c583b815b9f5a4e8f7
6
+ metadata.gz: 1de336f083b2e90230453d3ce07cfb36981998587de2e126c88948da75a618ee57a68b32b9869865fb9353b45e85fadc293d98afc2c4669afe8fadc9761fda93
7
+ data.tar.gz: 0b00aa43ef7763bc11e93697446ca0e86114818f3e6238d28711d1038eef0c4bc58dc43b1f1f901ec58a4cdf6c9138493e63572a7d33a0363a591e908b38e751
@@ -1,13 +1,13 @@
1
1
  ################################################################################
2
- # A shadow execution.
2
+ # A shadow action.
3
3
  #
4
4
  # @hierachy
5
- # 1. Execution <- YOU ARE HERE
5
+ # 1. Action <- YOU ARE HERE
6
6
  # 2. Reflection
7
7
  # 3. Meta
8
8
  ################################################################################
9
9
 
10
- class Execution
10
+ class Action
11
11
 
12
12
  attr_accessor :unique_id
13
13
  attr_accessor :caller_object
@@ -24,12 +24,12 @@ class Execution
24
24
  attr_accessor :is_base
25
25
 
26
26
  ##
27
- # Create Execution.
27
+ # Create Action.
28
28
  #
29
29
  # @param object [Object] The calling object.
30
30
  # @param method [Symbol] The calling method.
31
- # @param reflect_amount [Integer] The number of reflections to create per execution.
32
- # @param stack [ShadowStack] The shadow execution call stack.
31
+ # @param reflect_amount [Integer] The number of reflections to create per action.
32
+ # @param stack [ActionStack] The shadow action call stack.
33
33
  ##
34
34
  def initialize(caller_object, method, reflect_amount, stack)
35
35
 
@@ -69,7 +69,7 @@ class Execution
69
69
  end
70
70
 
71
71
  ##
72
- # Is the Execution currently reflecting methods?
72
+ # Is the Action currently reflecting methods?
73
73
  ##
74
74
  def is_reflecting?
75
75
  @is_reflecting
@@ -0,0 +1,44 @@
1
+ ################################################################################
2
+ # Track the actions in a shadow call stack.
3
+ #
4
+ # @pattern Stack
5
+ ################################################################################
6
+
7
+ class ActionStack
8
+
9
+ def initialize()
10
+ @bottom = nil
11
+ @top = nil
12
+ end
13
+
14
+ def peek()
15
+ @top
16
+ end
17
+
18
+ def base()
19
+ @bottom
20
+ end
21
+
22
+ ##
23
+ # Place Action at the top of stack.
24
+ #
25
+ # @param action [Action] The action to place.
26
+ # @return [Action] The placed action.
27
+ ##
28
+ def push(action)
29
+
30
+ # Place first action at bottom of stack.
31
+ if @bottom.nil?
32
+ @bottom = action
33
+ # Connect subsequent actions to each other.
34
+ else
35
+ @top.parent = action
36
+ action.child = @top
37
+ end
38
+
39
+ # Place action at top of stack.
40
+ @top = action
41
+
42
+ end
43
+
44
+ end
@@ -46,21 +46,13 @@ class Aggregator
46
46
  # INPUT
47
47
  ##
48
48
 
49
- unless control["inputs"].nil?
49
+ # Singular null input.
50
+ if control["inputs"].nil?
51
+ train_input(klass, method, nil, 0)
52
+ # Multiple inputs.
53
+ else
50
54
  control["inputs"].each_with_index do |meta, arg_num|
51
-
52
- meta = Meta.deserialize(meta)
53
-
54
- # Get rule set.
55
- rule_set = get_input_rule_set(klass, method, arg_num)
56
- if rule_set.nil?
57
- rule_set = RuleSet.new(@meta_map)
58
- set_input_rule_set(klass, method, arg_num, rule_set)
59
- end
60
-
61
- # Train on metadata.
62
- rule_set.train(meta)
63
-
55
+ train_input(klass, method, meta, arg_num)
64
56
  end
65
57
  end
66
58
 
@@ -82,10 +74,27 @@ class Aggregator
82
74
 
83
75
  end
84
76
 
77
+ def train_input(klass, method, meta, arg_num)
78
+
79
+ # Get deserialized meta.
80
+ meta = Meta.deserialize(meta)
81
+
82
+ # Get rule set.
83
+ rule_set = get_input_rule_set(klass, method, arg_num)
84
+ if rule_set.nil?
85
+ rule_set = RuleSet.new(@meta_map)
86
+ set_input_rule_set(klass, method, arg_num, rule_set)
87
+ end
88
+
89
+ # Train on metadata.
90
+ rule_set.train(meta)
91
+
92
+ end
93
+
85
94
  ##
86
95
  # Validate inputs.
87
96
  #
88
- # @stage Called when validating a reflection.
97
+ # @stage Called when validating a control reflection.
89
98
  # @param inputs [Array] The method's arguments.
90
99
  # @param input_rule_sets [Array] The RuleSets to validate each input with.
91
100
  ##
@@ -7,17 +7,17 @@
7
7
  # on object, not indirectly through clone which results in "undefined method".
8
8
  #
9
9
  # @hierachy
10
- # 1. Execution
10
+ # 1. Action
11
11
  # 2. Reflection
12
12
  # 3. Clone <- YOU ARE HERE
13
13
  ################################################################################
14
14
 
15
15
  class Clone
16
16
 
17
- def initialize(execution)
17
+ def initialize(action)
18
18
 
19
- # Clone the execution's calling object.
20
- @caller_object_clone = execution.caller_object.clone
19
+ # Clone the action's calling object.
20
+ @caller_object_clone = action.caller_object.clone
21
21
 
22
22
  # TODO: Clone any other instances that this clone references.
23
23
  # TODO: Replace clone's references to these new instances.
@@ -31,7 +31,7 @@ class Config
31
31
  }
32
32
 
33
33
  # An absolute path to the directory that contains the output directory.
34
- # Defaults to current execution path.
34
+ # Defaults to current action path.
35
35
  @output_path = nil
36
36
 
37
37
  # Name of output directory.
@@ -2,13 +2,13 @@
2
2
  # A shapshot of real data.
3
3
  #
4
4
  # @note
5
- # A control's @number property will always be zero.
5
+ # A control's @number will always be 0.
6
6
  #
7
7
  # @nomenclature
8
8
  # args, inputs/output and meta represent different stages of a value.
9
9
  #
10
10
  # @hierachy
11
- # 1. Execution
11
+ # 1. Action
12
12
  # 2. Control <- YOU ARE HERE
13
13
  # 3. Meta
14
14
  #
@@ -26,35 +26,37 @@ class Control < Reflection
26
26
  ##
27
27
  # Reflect on a method.
28
28
  #
29
- # Creates a shadow execution.
29
+ # Creates a shadow action.
30
30
  # @param *args [Dynamic] The method's arguments.
31
31
  ##
32
32
  def reflect(*args)
33
33
 
34
- # Get aggregated rule sets.
34
+ # Get trained rule sets.
35
35
  input_rule_sets = @aggregator.get_input_rule_sets(@klass, @method)
36
36
  output_rule_set = @aggregator.get_output_rule_set(@klass, @method)
37
37
 
38
+ # Fail when no trained rule sets.
39
+ if input_rule_sets.nil?
40
+ @status = :fail
41
+ end
42
+
38
43
  # When arguments exist.
39
44
  unless args.size == 0
40
45
 
41
- # When aggregated rule sets exist.
46
+ # Validate arguments against trained rule sets.
42
47
  unless input_rule_sets.nil?
43
-
44
- # Validate arguments against aggregated rule sets.
45
48
  unless @aggregator.test_inputs(args, input_rule_sets)
46
49
  @status = :fail
47
50
  end
48
-
49
51
  end
50
52
 
51
53
  # Create metadata for each argument.
52
- # TODO: Create metadata for other inputs such as properties on the instance.
54
+ # TODO: Create metadata for other inputs such as instance variables.
53
55
  @inputs = MetaBuilder.create_many(args)
54
56
 
55
57
  end
56
58
 
57
- # Action method with new/old arguments.
59
+ # Action method with real arguments.
58
60
  begin
59
61
 
60
62
  # Run reflection.
@@ -5,7 +5,7 @@
5
5
  # @see lib/meta for each meta.
6
6
  #
7
7
  # @hierachy
8
- # 1. Execution
8
+ # 1. Action
9
9
  # 2. Reflection
10
10
  # 3. Meta <- YOU ARE HERE
11
11
  ################################################################################
@@ -16,7 +16,7 @@ class Meta
16
16
  # Each meta defines its type.
17
17
  ##
18
18
  def initialize()
19
- @type = nil
19
+ @type = :null
20
20
  end
21
21
 
22
22
  ##
@@ -28,12 +28,12 @@ class Meta
28
28
  end
29
29
 
30
30
  ##
31
- # Each meta serializes metadata.
32
- #
33
31
  # @return [Hash]
34
32
  ##
35
33
  def serialize()
36
- {}
34
+ {
35
+ :type => @type
36
+ }
37
37
  end
38
38
 
39
39
  ##############################################################################
@@ -9,7 +9,7 @@
9
9
  # args, inputs/output and meta represent different stages of a value.
10
10
  #
11
11
  # @hierachy
12
- # 1. Execution
12
+ # 1. Action
13
13
  # 2. Reflection <- YOU ARE HERE
14
14
  # 3. Meta
15
15
  #
@@ -29,30 +29,30 @@ class Reflection
29
29
  ##
30
30
  # Create a Reflection.
31
31
  #
32
- # @param execution [Execution] The Execution that created this Reflection.
33
- # @param number [Integer] Multiple Reflections can be created per Execution.
32
+ # @param action [Action] The Action that created this Reflection.
33
+ # @param number [Integer] Multiple Reflections can be created per Action.
34
34
  # @param aggregator [Aggregator] The aggregated RuleSet for this class/method.
35
35
  ##
36
- def initialize(execution, number, aggregator)
36
+ def initialize(action, number, aggregator)
37
37
 
38
- @execution = execution
39
- @unique_id = execution.unique_id + number
38
+ @action = action
39
+ @unique_id = action.unique_id + number
40
40
  @number = number
41
41
 
42
42
  # Dependency.
43
43
  @aggregator = aggregator
44
44
 
45
45
  # Caller.
46
- @klass = execution.klass
47
- @method = execution.method
46
+ @klass = action.klass
47
+ @method = action.method
48
48
 
49
49
  # Metadata.
50
50
  @inputs = nil
51
51
  @output = nil
52
52
 
53
- # Clone the execution's calling object.
53
+ # Clone the action's calling object.
54
54
  # TODO: Abstract away into Clone class.
55
- @clone = execution.caller_object.clone
55
+ @clone = action.caller_object.clone
56
56
 
57
57
  # Result.
58
58
  @status = :pass
@@ -64,7 +64,7 @@ class Reflection
64
64
  ##
65
65
  # Reflect on a method.
66
66
  #
67
- # Creates a shadow execution.
67
+ # Creates a shadow action.
68
68
  # @param *args [Dynamic] The method's arguments.
69
69
  ##
70
70
  def reflect(*args)
@@ -73,6 +73,11 @@ class Reflection
73
73
  input_rule_sets = @aggregator.get_input_rule_sets(@klass, @method)
74
74
  output_rule_set = @aggregator.get_output_rule_set(@klass, @method)
75
75
 
76
+ # Fail when no trained rule sets.
77
+ if input_rule_sets.nil?
78
+ @status = :fail
79
+ end
80
+
76
81
  # When arguments exist.
77
82
  unless args.size == 0
78
83
 
@@ -82,12 +87,12 @@ class Reflection
82
87
  end
83
88
 
84
89
  # Create metadata for each argument.
85
- # TODO: Create metadata for other inputs such as properties on the instance.
90
+ # TODO: Create metadata for other inputs such as instance variables.
86
91
  @inputs = MetaBuilder.create_many(args)
87
92
 
88
93
  end
89
94
 
90
- # Action method with new/old arguments.
95
+ # Action method with random arguments.
91
96
  begin
92
97
 
93
98
  # Run reflection.
@@ -141,22 +146,28 @@ class Reflection
141
146
  ##
142
147
  # Get the results of the reflection.
143
148
  #
149
+ # @keys
150
+ # - eid [Integer] Execution ID
151
+ # - aid [Integer] Action ID
152
+ # - rid [Integer] Reflection ID
153
+ # - num [Integer] Reflection number
154
+ #
144
155
  # @return [Hash] Reflection metadata.
145
156
  ##
146
157
  def serialize()
147
158
 
148
- # The ID of the first execution in the ShadowStack.
149
- base_id = nil
150
- unless @execution.base == nil
151
- base_id = @execution.base.unique_id
159
+ # Create execution ID from the ID of the first action in the ActionStack.
160
+ execution_id = @action.unique_id
161
+ unless @action.base.nil?
162
+ execution_id = @action.base.unique_id
152
163
  end
153
164
 
154
165
  # Build reflection.
155
166
  reflection = {
156
- :base_id => base_id,
157
- :exe_id => @execution.unique_id,
158
- :ref_id => @unique_id,
159
- :ref_num => @number,
167
+ :eid => execution_id,
168
+ :aid => @action.unique_id,
169
+ :rid => @unique_id,
170
+ :num => @number,
160
171
  :time => @time,
161
172
  :class => @klass,
162
173
  :method => @method,
@@ -6,8 +6,8 @@
6
6
  # @flow
7
7
  # 1. Reflekt is prepended to a class and setup.
8
8
  # 2. When a class insantiates so does Reflekt.
9
- # 3. An Execution is created on method call.
10
- # 4. Many Refections are created per Execution.
9
+ # 3. An Action is created on method call.
10
+ # 4. Many Refections are created per Action.
11
11
  # 5. Each Reflection executes on cloned data.
12
12
  # 6. Flow is returned to the original method.
13
13
  #
@@ -20,13 +20,13 @@ require 'set'
20
20
  require 'erb'
21
21
  require 'rowdb'
22
22
  require 'Accessor'
23
+ require 'Action'
24
+ require 'ActionStack'
23
25
  require 'Aggregator'
24
26
  require 'Config'
25
27
  require 'Control'
26
- require 'Execution'
27
28
  require 'Reflection'
28
29
  require 'Renderer'
29
- require 'ShadowStack'
30
30
  # Require all rules.
31
31
  Dir[File.join(__dir__, 'rules', '*.rb')].each { |file| require file }
32
32
 
@@ -53,34 +53,34 @@ module Reflekt
53
53
  # When Reflekt enabled and control reflection has executed without error.
54
54
  if @@reflekt.config.enabled && !@@reflekt.error
55
55
 
56
- # Get current execution.
57
- execution = @@reflekt.stack.peek()
56
+ # Get current action.
57
+ action = @@reflekt.stack.peek()
58
58
 
59
59
  # Don't reflect when reflect limit reached or method skipped.
60
60
  unless (@reflekt_counts[method] >= @@reflekt.config.reflect_limit) || self.class.reflekt_skipped?(method)
61
61
 
62
- # When stack empty or past execution done reflecting.
63
- if execution.nil? || execution.has_finished_reflecting?
62
+ # When stack empty or past action done reflecting.
63
+ if action.nil? || action.has_finished_reflecting?
64
64
 
65
- # Create execution.
66
- execution = Execution.new(self, method, @@reflekt.config.reflect_amount, @@reflekt.stack)
65
+ # Create action.
66
+ action = Action.new(self, method, @@reflekt.config.reflect_amount, @@reflekt.stack)
67
67
 
68
- @@reflekt.stack.push(execution)
68
+ @@reflekt.stack.push(action)
69
69
 
70
70
  end
71
71
 
72
72
  ##
73
- # Reflect the execution.
73
+ # Reflect the action.
74
74
  #
75
- # The first method call in the execution creates a reflection.
76
- # Then method calls are shadow executions which return to the reflection.
75
+ # The first method call in the action creates a reflection.
76
+ # Then method calls are shadow actions which return to the reflection.
77
77
  ##
78
- if execution.has_empty_reflections? && !execution.is_reflecting?
79
- execution.is_reflecting = true
78
+ if action.has_empty_reflections? && !action.is_reflecting?
79
+ action.is_reflecting = true
80
80
 
81
81
  # Create control.
82
- control = Control.new(execution, 0, @@reflekt.aggregator)
83
- execution.control = control
82
+ control = Control.new(action, 0, @@reflekt.aggregator)
83
+ action.control = control
84
84
 
85
85
  # Execute control.
86
86
  control.reflect(*args)
@@ -91,15 +91,15 @@ module Reflekt
91
91
  # Continue reflecting when control executes succesfully.
92
92
  else
93
93
 
94
- # Save control as reflection.
94
+ # Save control as a reflection.
95
95
  @@reflekt.db.get("reflections").push(control.serialize())
96
96
 
97
- # Multiple reflections per execution.
98
- execution.reflections.each_with_index do |value, index|
97
+ # Multiple reflections per action.
98
+ action.reflections.each_with_index do |value, index|
99
99
 
100
100
  # Create reflection.
101
- reflection = Reflection.new(execution, index + 1, @@reflekt.aggregator)
102
- execution.reflections[index] = reflection
101
+ reflection = Reflection.new(action, index + 1, @@reflekt.aggregator)
102
+ action.reflections[index] = reflection
103
103
 
104
104
  # Execute reflection.
105
105
  reflection.reflect(*args)
@@ -121,15 +121,15 @@ module Reflekt
121
121
 
122
122
  end
123
123
 
124
- execution.is_reflecting = false
124
+ action.is_reflecting = false
125
125
  end
126
126
 
127
127
  end
128
128
 
129
129
  # Don't execute skipped methods when reflecting.
130
- unless execution.is_reflecting? && self.class.reflekt_skipped?(method)
130
+ unless action.is_reflecting? && self.class.reflekt_skipped?(method)
131
131
 
132
- # Continue execution / shadow execution.
132
+ # Continue action / shadow action.
133
133
  super *args
134
134
 
135
135
  end
@@ -137,7 +137,7 @@ module Reflekt
137
137
  # When Reflekt disabled or control reflection failed.
138
138
  else
139
139
 
140
- # Continue execution.
140
+ # Continue action.
141
141
  super *args
142
142
 
143
143
  end
@@ -180,7 +180,7 @@ module Reflekt
180
180
  # Set configuration.
181
181
  @@reflekt.path = File.dirname(File.realpath(__FILE__))
182
182
 
183
- # Get reflections directory path from config or current execution path.
183
+ # Get reflections directory path from config or current action path.
184
184
  if @@reflekt.config.output_path
185
185
  @@reflekt.output_path = File.join(@@reflekt.config.output_path, @@reflekt.config.output_directory)
186
186
  else
@@ -199,7 +199,7 @@ module Reflekt
199
199
  db = @@reflekt.db.value()
200
200
 
201
201
  # Create shadow stack.
202
- @@reflekt.stack = ShadowStack.new()
202
+ @@reflekt.stack = ActionStack.new()
203
203
 
204
204
  # Create aggregated rule sets.
205
205
  @@reflekt.aggregator = Aggregator.new(@@reflekt.config.meta_map)
@@ -5,7 +5,7 @@
5
5
  # A "null" value on serialized "inputs" and "output" also becomes a NullMeta.
6
6
  #
7
7
  # @hierachy
8
- # 1. Execution
8
+ # 1. Action
9
9
  # 2. Reflection
10
10
  # 3. Meta <- YOU ARE HERE
11
11
  ################################################################################
@@ -10,17 +10,14 @@ class NullRule < Rule
10
10
  # @param meta [NullMeta]
11
11
  ##
12
12
  def train(meta)
13
- # No need to train. NullMeta is always null.
13
+ # No need to train as NullMeta is always nil.
14
14
  end
15
15
 
16
16
  ##
17
17
  # @param value [NilClass]
18
18
  ##
19
19
  def test(value)
20
-
21
- return false unless value.nil?
22
- return true
23
-
20
+ value.nil?
24
21
  end
25
22
 
26
23
  def result()
@@ -1,9 +1,9 @@
1
- !function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!x[e]||!w[e])return;for(var n in w[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(m[n]=t[n]);0==--v&&0===b&&T()}(e,n),t&&t(e,n)};var n,r=!0,o="a44db2da1c3f8da133a5",i={},a=[],l=[];function u(e){var t=O[e];if(!t)return N;var r=function(r){return t.hot.active?(O[r]?-1===O[r].parents.indexOf(e)&&O[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),N(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return N[e]},set:function(t){N[e]=t}}};for(var i in N)Object.prototype.hasOwnProperty.call(N,i)&&"e"!==i&&"t"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===f&&d("prepare"),b++,N.e(e).then(t,(function(e){throw t(),e}));function t(){b--,"prepare"===f&&(g[e]||S(e),0===b&&0===v&&T())}},r.t=function(e,t){return 1&t&&(e=r(e)),N.t(e,-2&t)},r}function c(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[t]=e[t],d("ready");break;case"ready":C(t);break;case"prepare":case"check":case"dispose":case"apply":(y=y||[]).push(t)}},check:E,apply:_,status:function(e){if(!e)return f;s.push(e)},addStatusHandler:function(e){s.push(e)},removeStatusHandler:function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},data:i[t]};return n=void 0,r}var s=[],f="idle";function d(e){f=e;for(var t=0;t<s.length;t++)s[t].call(null,e)}var p,m,h,y,v=0,b=0,g={},w={},x={};function k(e){return+e+""===e?+e:e}function E(e){if("idle"!==f)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=N.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(P()?"ready":"idle"),null;w={},g={},x=e.c,h=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));m={};return S(0),"prepare"===f&&0===b&&0===v&&T(),t}));var t}function S(e){x[e]?(w[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=N.p+""+e+"."+o+".hot-update.js",document.head.appendChild(t)}(e)):g[e]=!0}function T(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return _(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&t.push(k(n));e.resolve(t)}}function _(t){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function t(r){var l,u,c,s,f;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((s=O[i])&&(!s.hot._selfAccepted||s.hot._selfInvalidated)){if(s.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(s.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var l=0;l<s.parents.length;l++){var u=s.parents[l],c=O[u];if(c){if(c.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([u]),moduleId:i,parentId:u};-1===t.indexOf(u)&&(c.hot._acceptedDependencies[i]?(n[u]||(n[u]=[]),v(n[u],[i])):(delete n[u],t.push(u),r.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}P();var b={},g=[],w={},E=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;f=k(S),T=m[S]?p(f):{type:"disposed",moduleId:S};var _=!1,C=!1,j=!1,R="";switch(T.chain&&(R="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of self decline: "+T.moduleId+R));break;case"declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+R));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(T),r.ignoreUnaccepted||(_=new Error("Aborted because "+f+" is not accepted"+R));break;case"accepted":r.onAccepted&&r.onAccepted(T),C=!0;break;case"disposed":r.onDisposed&&r.onDisposed(T),j=!0;break;default:throw new Error("Unexception type "+T.type)}if(_)return d("abort"),Promise.reject(_);if(C)for(f in w[f]=m[f],v(g,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,f)&&(b[f]||(b[f]=[]),v(b[f],T.outdatedDependencies[f]));j&&(v(g,[T.moduleId]),w[f]=E)}var D,z=[];for(u=0;u<g.length;u++)f=g[u],O[f]&&O[f].hot._selfAccepted&&w[f]!==E&&!O[f].hot._selfInvalidated&&z.push({module:f,parents:O[f].parents.slice(),errorHandler:O[f].hot._selfAccepted});d("dispose"),Object.keys(x).forEach((function(e){!1===x[e]&&function(e){delete installedChunks[e]}(e)}));var I,M,F=g.slice();for(;F.length>0;)if(f=F.pop(),s=O[f]){var A={},L=s.hot._disposeHandlers;for(c=0;c<L.length;c++)(l=L[c])(A);for(i[f]=A,s.hot.active=!1,delete O[f],delete b[f],c=0;c<s.children.length;c++){var U=O[s.children[c]];U&&((D=U.parents.indexOf(f))>=0&&U.parents.splice(D,1))}}for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f]))for(M=b[f],c=0;c<M.length;c++)I=M[c],(D=s.children.indexOf(I))>=0&&s.children.splice(D,1);d("apply"),void 0!==h&&(o=h,h=void 0);for(f in m=void 0,w)Object.prototype.hasOwnProperty.call(w,f)&&(e[f]=w[f]);var H=null;for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f])){M=b[f];var V=[];for(u=0;u<M.length;u++)if(I=M[u],l=s.hot._acceptedDependencies[I]){if(-1!==V.indexOf(l))continue;V.push(l)}for(u=0;u<V.length;u++){l=V[u];try{l(M)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:f,dependencyId:M[u],error:e}),r.ignoreErrored||H||(H=e)}}}for(u=0;u<z.length;u++){var W=z[u];f=W.module,a=W.parents,n=f;try{N(f)}catch(e){if("function"==typeof W.errorHandler)try{W.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:f,error:t,originalError:e}),r.ignoreErrored||H||(H=t),H||(H=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:f,error:e}),r.ignoreErrored||H||(H=e)}}if(H)return d("fail"),Promise.reject(H);if(y)return t(r).then((function(e){return g.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(g)}))}(t=t||{})}function P(){if(y)return m||(m={}),y.forEach(C),y=void 0,!0}function C(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var O={};function N(t){if(O[t])return O[t].exports;var n=O[t]={i:t,l:!1,exports:{},hot:c(t),parents:(l=a,a=[],l),children:[]};return e[t].call(n.exports,n,n.exports,u(t)),n.l=!0,n.exports}N.m=e,N.c=O,N.d=function(e,t,n){N.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},N.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},N.t=function(e,t){if(1&t&&(e=N(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(N.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)N.d(n,r,function(t){return e[t]}.bind(null,r));return n},N.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return N.d(t,"a",t),t},N.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},N.p="/dist/",N.h=function(){return o},u(33)(N.s=33)}([function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],u=t.base?i[0]+t.base:i[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:y(d,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function y(e,t){var n,r,o;if(t.singleton){var i=h++;n=m||(m=c(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=c(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);a[o].references--}for(var i=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=i}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=n.n(r).a.createContext(!1)},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".alert{padding:1rem;background:#bdd7ec;border:1px solid #339aec}.alert.error{background:#ffc6c1;border:1px solid #d04800}.alert.success{background:#c3ffbd;border:1px solid #3eb641}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"@media(min-width: 600px){.type-switch{position:absolute;left:0;right:0;text-align:center}}.type-switch button{font-size:.95rem;font-weight:bold;background:#fff;text-shadow:1px 1px 1px #f8f8f8;padding:1rem 1.5rem;border:none;border-radius:0}.type-switch button:hover{cursor:pointer}.type-switch button.active{color:#fff;background:#333;text-shadow:1px 1px 1px #000}.type-switch button:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.type-switch button:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"#header{background:#eee;border-bottom:1px solid #c9c9c9}#header .container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem;position:relative}#header #logo{width:50px}#header #title{display:none}#header #write-mode{display:flex;align-items:center;padding:.9rem 1rem;border:1px solid #ccc;border-radius:5px;background:linear-gradient(180deg, #fff 0%, #ddd 100%)}#header #write-mode:hover{cursor:pointer;background:linear-gradient(0deg, #fff 0%, #ddd 100%)}#header #write-mode label{font-weight:bold;text-shadow:1px 1px 1px #fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".meta:not(:last-child){margin-right:.5rem}.meta__attributes{display:flex;flex-direction:row;list-style:none;padding-left:0;margin:0}.meta-attribute{padding-left:1rem;padding-right:1rem;border-right:1px solid #ccc}.meta-attribute:first-child{padding-left:0 !important}.meta-attribute:last-child{padding-right:0;border-right:0}.meta-attribute label{display:block;font-weight:bold;text-transform:capitalize;padding-bottom:.1rem}.meta-attribute pre{margin:0}.meta-none{color:#555;font-style:italic}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".reflection{border-left:5px solid #ccc;background:#efefef;margin-bottom:1px;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear;max-height:999px}.reflection.hidden{opacity:0;max-height:0}.reflection:last-child{margin-bottom:1rem}.reflection.pass{border-left-color:#3eb641;background-color:#c3ffbd}.reflection.fail{border-left-color:#d04800;background-color:#ffc6c1}.reflection.neutral{border-left-color:#339aec;background-color:#bdd7ec}.reflection .reflection__summary{display:flex;align-items:center;flex-direction:row;padding:1rem}.reflection .reflection__summary .title{color:#777;font-weight:bold;margin-right:1rem}.reflection .reflection__summary .method{font-weight:bold;margin-right:1rem}.reflection .reflection__summary .actions{margin-left:auto}.reflection .reflection__details{padding:1rem;background:#fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".io{display:flex;flex-direction:row;align-items:center;padding:.75rem 1rem;border:1px solid #aaa;border-radius:5px}.io:not(:last-child){margin-bottom:.5rem}.io h4{margin:0;color:#777;font-size:1.2rem;font-weight:normal;margin-right:1.25rem}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".execution{background:#333;margin-bottom:1px;border-left:10px solid #ccc;padding-left:2px;padding-right:12px;opacity:1;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear}.execution:hover{background:#444545}.execution.hidden{opacity:0;max-height:0}.execution.pass{border-left-color:#3eb641}.execution.pass .status{color:#3eb641}.execution.fail{border-left-color:#d04800}.execution.fail .status{color:#d04800}.execution.neutral{border-left-color:#339aec}.execution.neutral .status{color:#339aec}.execution.open{background:#333;border-left-color:#333}.execution--summary{display:flex;align-items:center;flex-direction:row;justify-content:space-between;padding:1rem 0;padding-left:10px;position:relative}.execution--summary:hover{cursor:pointer}.execution--summary .timestamp{color:#fff}.execution--summary .control-label{font-weight:bold;color:#339aec;text-transform:uppercase}@media(min-width: 600px){.execution--summary .control-label{position:absolute;left:0;right:0;text-align:center}}.execution--summary .status{text-align:right;font-weight:bold;text-transform:uppercase}.execution--details{overflow:auto}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".actions button{border:none;color:#fff;background:#000;padding:.5rem 1rem;margin-left:.5rem;border-radius:.25rem}.actions button:hover{cursor:pointer;background:#222}.actions button.keep{background:#45487e}.actions button.delete{background:#7e3837}.actions button.disabled{background:#555}.actions button.disabled:hover{background:#555;cursor:not-allowed}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"body{padding:0;margin:0;font-family:Arial;background:#fefefe}.container{max-width:1200px;margin:0 auto;padding:1rem}",""]),t.default=o},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(42);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"meta"},o.a.createElement("ul",{className:"meta__attributes"},Object.entries(this.props.meta).map((function(t){var n=l(t,2),r=n[0];return n[1],o.a.createElement("li",{className:"meta-attribute",key:"meta-attribute-".concat(r)},o.a.createElement("label",null,r,":"),o.a.createElement("span",{className:"value"},e.props.meta[r]))}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(m)}).call(this,n(5)(e))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(35)},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(28);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.reflections),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){if(null==e.base_id){var n="".concat(e.exe_id,"-").concat(e.ref_num);t[n]={id:e.exe_id,number:e.ref_num,status:"pass",timestamp:e.time,reflections:[e]},t[n].is_control=!1,0===e.ref_num&&(t[n].is_control=!0)}else n="".concat(e.base_id,"-").concat(e.ref_num),t[n].reflections.push(e);"fail"==e.status&&(t[n].status="fail")}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id+"-"+e.number})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";
1
+ !function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!x[e]||!w[e])return;for(var n in w[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(m[n]=t[n]);0==--v&&0===b&&T()}(e,n),t&&t(e,n)};var n,r=!0,o="5caa4f52f5a14d0a0bb2",i={},a=[],l=[];function u(e){var t=O[e];if(!t)return N;var r=function(r){return t.hot.active?(O[r]?-1===O[r].parents.indexOf(e)&&O[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),N(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return N[e]},set:function(t){N[e]=t}}};for(var i in N)Object.prototype.hasOwnProperty.call(N,i)&&"e"!==i&&"t"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===f&&d("prepare"),b++,N.e(e).then(t,(function(e){throw t(),e}));function t(){b--,"prepare"===f&&(g[e]||S(e),0===b&&0===v&&T())}},r.t=function(e,t){return 1&t&&(e=r(e)),N.t(e,-2&t)},r}function c(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[t]=e[t],d("ready");break;case"ready":C(t);break;case"prepare":case"check":case"dispose":case"apply":(y=y||[]).push(t)}},check:E,apply:_,status:function(e){if(!e)return f;s.push(e)},addStatusHandler:function(e){s.push(e)},removeStatusHandler:function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},data:i[t]};return n=void 0,r}var s=[],f="idle";function d(e){f=e;for(var t=0;t<s.length;t++)s[t].call(null,e)}var p,m,h,y,v=0,b=0,g={},w={},x={};function k(e){return+e+""===e?+e:e}function E(e){if("idle"!==f)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=N.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(P()?"ready":"idle"),null;w={},g={},x=e.c,h=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));m={};return S(0),"prepare"===f&&0===b&&0===v&&T(),t}));var t}function S(e){x[e]?(w[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=N.p+""+e+"."+o+".hot-update.js",document.head.appendChild(t)}(e)):g[e]=!0}function T(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return _(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&t.push(k(n));e.resolve(t)}}function _(t){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function t(r){var l,u,c,s,f;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((s=O[i])&&(!s.hot._selfAccepted||s.hot._selfInvalidated)){if(s.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(s.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var l=0;l<s.parents.length;l++){var u=s.parents[l],c=O[u];if(c){if(c.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([u]),moduleId:i,parentId:u};-1===t.indexOf(u)&&(c.hot._acceptedDependencies[i]?(n[u]||(n[u]=[]),v(n[u],[i])):(delete n[u],t.push(u),r.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}P();var b={},g=[],w={},E=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;f=k(S),T=m[S]?p(f):{type:"disposed",moduleId:S};var _=!1,C=!1,j=!1,R="";switch(T.chain&&(R="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of self decline: "+T.moduleId+R));break;case"declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+R));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(T),r.ignoreUnaccepted||(_=new Error("Aborted because "+f+" is not accepted"+R));break;case"accepted":r.onAccepted&&r.onAccepted(T),C=!0;break;case"disposed":r.onDisposed&&r.onDisposed(T),j=!0;break;default:throw new Error("Unexception type "+T.type)}if(_)return d("abort"),Promise.reject(_);if(C)for(f in w[f]=m[f],v(g,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,f)&&(b[f]||(b[f]=[]),v(b[f],T.outdatedDependencies[f]));j&&(v(g,[T.moduleId]),w[f]=E)}var D,z=[];for(u=0;u<g.length;u++)f=g[u],O[f]&&O[f].hot._selfAccepted&&w[f]!==E&&!O[f].hot._selfInvalidated&&z.push({module:f,parents:O[f].parents.slice(),errorHandler:O[f].hot._selfAccepted});d("dispose"),Object.keys(x).forEach((function(e){!1===x[e]&&function(e){delete installedChunks[e]}(e)}));var I,M,F=g.slice();for(;F.length>0;)if(f=F.pop(),s=O[f]){var A={},L=s.hot._disposeHandlers;for(c=0;c<L.length;c++)(l=L[c])(A);for(i[f]=A,s.hot.active=!1,delete O[f],delete b[f],c=0;c<s.children.length;c++){var U=O[s.children[c]];U&&((D=U.parents.indexOf(f))>=0&&U.parents.splice(D,1))}}for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f]))for(M=b[f],c=0;c<M.length;c++)I=M[c],(D=s.children.indexOf(I))>=0&&s.children.splice(D,1);d("apply"),void 0!==h&&(o=h,h=void 0);for(f in m=void 0,w)Object.prototype.hasOwnProperty.call(w,f)&&(e[f]=w[f]);var H=null;for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f])){M=b[f];var V=[];for(u=0;u<M.length;u++)if(I=M[u],l=s.hot._acceptedDependencies[I]){if(-1!==V.indexOf(l))continue;V.push(l)}for(u=0;u<V.length;u++){l=V[u];try{l(M)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:f,dependencyId:M[u],error:e}),r.ignoreErrored||H||(H=e)}}}for(u=0;u<z.length;u++){var W=z[u];f=W.module,a=W.parents,n=f;try{N(f)}catch(e){if("function"==typeof W.errorHandler)try{W.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:f,error:t,originalError:e}),r.ignoreErrored||H||(H=t),H||(H=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:f,error:e}),r.ignoreErrored||H||(H=e)}}if(H)return d("fail"),Promise.reject(H);if(y)return t(r).then((function(e){return g.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(g)}))}(t=t||{})}function P(){if(y)return m||(m={}),y.forEach(C),y=void 0,!0}function C(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var O={};function N(t){if(O[t])return O[t].exports;var n=O[t]={i:t,l:!1,exports:{},hot:c(t),parents:(l=a,a=[],l),children:[]};return e[t].call(n.exports,n,n.exports,u(t)),n.l=!0,n.exports}N.m=e,N.c=O,N.d=function(e,t,n){N.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},N.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},N.t=function(e,t){if(1&t&&(e=N(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(N.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)N.d(n,r,function(t){return e[t]}.bind(null,r));return n},N.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return N.d(t,"a",t),t},N.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},N.p="/dist/",N.h=function(){return o},u(33)(N.s=33)}([function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],u=t.base?i[0]+t.base:i[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:y(d,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function y(e,t){var n,r,o;if(t.singleton){var i=h++;n=m||(m=c(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=c(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);a[o].references--}for(var i=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=i}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=n.n(r).a.createContext(!1)},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".alert{padding:1rem;background:#bdd7ec;border:1px solid #339aec}.alert.error{background:#ffc6c1;border:1px solid #d04800}.alert.success{background:#c3ffbd;border:1px solid #3eb641}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"@media(min-width: 600px){.type-switch{position:absolute;left:0;right:0;text-align:center}}.type-switch button{font-size:.95rem;font-weight:bold;background:#fff;text-shadow:1px 1px 1px #f8f8f8;padding:1rem 1.5rem;border:none;border-radius:0}.type-switch button:hover{cursor:pointer}.type-switch button.active{color:#fff;background:#333;text-shadow:1px 1px 1px #000}.type-switch button:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.type-switch button:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"#header{background:#eee;border-bottom:1px solid #c9c9c9}#header .container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem;position:relative}#header #logo{width:50px}#header #title{display:none}#header #write-mode{display:flex;align-items:center;padding:.9rem 1rem;border:1px solid #ccc;border-radius:5px;background:linear-gradient(180deg, #fff 0%, #ddd 100%)}#header #write-mode:hover{cursor:pointer;background:linear-gradient(0deg, #fff 0%, #ddd 100%)}#header #write-mode label{font-weight:bold;text-shadow:1px 1px 1px #fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".meta:not(:last-child){margin-right:.5rem}.meta__attributes{display:flex;flex-direction:row;list-style:none;padding-left:0;margin:0}.meta-attribute{padding-left:1rem;padding-right:1rem;border-right:1px solid #ccc}.meta-attribute:first-child{padding-left:0 !important}.meta-attribute:last-child{padding-right:0;border-right:0}.meta-attribute label{display:block;font-weight:bold;text-transform:capitalize;padding-bottom:.1rem}.meta-attribute pre{margin:0}.meta-none{color:#555;font-style:italic}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".reflection{border-left:5px solid #ccc;background:#efefef;margin-bottom:1px;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear;max-height:999px}.reflection.hidden{opacity:0;max-height:0}.reflection:last-child{margin-bottom:1rem}.reflection.pass{border-left-color:#3eb641;background-color:#c3ffbd}.reflection.fail{border-left-color:#d04800;background-color:#ffc6c1}.reflection.neutral{border-left-color:#339aec;background-color:#bdd7ec}.reflection .reflection__summary{display:flex;align-items:center;flex-direction:row;padding:1rem}.reflection .reflection__summary .title{color:#777;font-weight:bold;margin-right:1rem}.reflection .reflection__summary .method{font-weight:bold;margin-right:1rem}.reflection .reflection__summary .actions{margin-left:auto}.reflection .reflection__details{padding:1rem;background:#fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".io{display:flex;flex-direction:row;align-items:center;padding:.75rem 1rem;border:1px solid #aaa;border-radius:5px}.io:not(:last-child){margin-bottom:.5rem}.io h4{margin:0;color:#777;font-size:1.2rem;font-weight:normal;margin-right:1.25rem}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".execution{background:#333;margin-bottom:1px;border-left:10px solid #ccc;padding-left:2px;padding-right:12px;opacity:1;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear}.execution:hover{background:#444545}.execution.hidden{opacity:0;max-height:0}.execution.pass{border-left-color:#3eb641}.execution.pass .status{color:#3eb641}.execution.fail{border-left-color:#d04800}.execution.fail .status{color:#d04800}.execution.neutral{border-left-color:#339aec}.execution.neutral .status{color:#339aec}.execution.open{background:#333;border-left-color:#333}.execution--summary{display:flex;align-items:center;flex-direction:row;justify-content:space-between;padding:1rem 0;padding-left:10px;position:relative}.execution--summary:hover{cursor:pointer}.execution--summary .timestamp{color:#fff}.execution--summary .control-label{font-weight:bold;color:#339aec;text-transform:uppercase;pointer-events:none}@media(min-width: 600px){.execution--summary .control-label{position:absolute;left:0;right:0;text-align:center}}.execution--summary .status{text-align:right;font-weight:bold;text-transform:uppercase}.execution--details{overflow:auto}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".actions button{border:none;color:#fff;background:#000;padding:.5rem 1rem;margin-left:.5rem;border-radius:.25rem}.actions button:hover{cursor:pointer;background:#222}.actions button.keep{background:#45487e}.actions button.delete{background:#7e3837}.actions button.disabled{background:#555}.actions button.disabled:hover{background:#555;cursor:not-allowed}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"body{padding:0;margin:0;font-family:Arial;background:#fefefe}.container{max-width:1200px;margin:0 auto;padding:1rem}",""]),t.default=o},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(42);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"meta"},o.a.createElement("ul",{className:"meta__attributes"},Object.entries(this.props.meta).map((function(t){var n=l(t,2),r=n[0];return n[1],o.a.createElement("li",{className:"meta-attribute",key:"meta-attribute-".concat(r)},o.a.createElement("label",null,r,":"),o.a.createElement("span",{className:"value"},e.props.meta[r]))}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(m)}).call(this,n(5)(e))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(35)},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(28);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.reflections),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){var n="".concat(e.eid,"-").concat(e.num);t.hasOwnProperty(n)?t[n].reflections.push(e):(t[n]={id:e.eid,number:e.num,status:"pass",timestamp:e.time,reflections:[e]},t[n].is_control=!1,0===e.num&&(t[n].is_control=!0)),"fail"==e.status&&(t[n].status="fail")}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id+"-"+e.number})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
- */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(u[s]=n[s]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(10),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(10,function(t){i=n(10),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(11),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(11,function(t){i=n(11),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(12),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(12,function(t){i=n(12),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(13),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(13,function(t){i=n(13),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=(n(17),n(1)),a=n(4),l=n(25),u=n(26),c=n(18),s=n(30);n(43),n(44);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(f,e);var t,n,r,i=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),w(b(t=i.call(this,e)),"addAlert",(function(e,n){var r={type:e,message:n},o=t.state.alerts;o.push(r),t.setState({alerts:o})})),w(b(t),"switchType",(function(e){var n={};Object.entries(t.state.types).forEach((function(t,r){var o=d(t,2),i=o[0],a=o[1];a.active=i===e,n[i]=a})),t.setState({types:n}),"reflection"==e?t.setState({results:o.a.createElement(c.a,{reflections:t.state.db.reflections})}):"control"==e&&t.setState({results:o.a.createElement(s.a,{controls:t.state.db.controls})})})),t.state={},t.state.db={},t.state.alerts=[],t.state.results=[],t.state.writeMode=!1,t.state.types={reflection:{title:"Reflections",active:!0},control:{title:"Controls",active:!1}},"file:"!=window.location.protocol&&(t.state.writeMode=!0),t}return t=f,(n=[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("load",(function(t){try{e.setState({db:JSON.parse(db)}),console.log("DATA:"),console.log(e.state.db)}catch(t){e.addAlert("error","Couldn't load database.")}null!=db&&e.setState({results:o.a.createElement(c.a,{reflections:e.state.db.reflections})})}))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(a.a.Provider,{value:this.state.writeMode},o.a.createElement(u.a,{types:this.state.types,switchType:this.switchType}),o.a.createElement("div",{className:"container"},0!=this.state.alerts.length?o.a.createElement(l.a,{alerts:this.state.alerts}):null,o.a.createElement("main",{id:"content"},this.state.results))))}}])&&m(t.prototype,n),r&&m(t,r),f}(r.Component);t.a=Object(i.hot)(e)(x)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,r,i=c(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{id:"alerts"},this.props.alerts.map((function(e,t){return o.a.createElement("div",{className:"alert ".concat(e.type),key:"alert-".concat(t)},e.message)})))}}])&&l(t.prototype,n),r&&l(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(d)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(27);n(41);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m,h,y,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e="Read-Only";return 1==this.context&&(e="Read/Write"),o.a.createElement("header",{id:"header"},o.a.createElement("div",{className:"container"},o.a.createElement("svg",{id:"logo",enableBackground:"new 0 0 500 500",viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"m307.5 80.5h-115l-57.5 205h230z",fill:"#0047d0"}),o.a.createElement("path",{d:"m178 76.5-53.1-44-117.9 139 116 112z",fill:"#d04800"}),o.a.createElement("path",{d:"m190.4 467.5h115l57.5-168h-229z",fill:"#0047d0",opacity:".7"}),o.a.createElement("path",{d:"m177 467.5-81-85-92-197 115 113z",fill:"#d04800",opacity:".7"}),o.a.createElement("g",{fill:"#008c33"},o.a.createElement("path",{d:"m322 76.5 53.1-44 118 139-116 112z"}),o.a.createElement("path",{d:"m320 467.5 84-85 92-197-117 113z",opacity:".7"}))),o.a.createElement("h1",{id:"title"},"Reflekt"),o.a.createElement(l.a,{types:this.props.types,switchType:this.props.switchType}),o.a.createElement("div",{id:"write-mode",className:this.context?"read-write":"read-only"},o.a.createElement("label",null,e),o.a.createElement("div",{className:"icon"}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);m=v,h="contextType",y=a.a,h in m?Object.defineProperty(m,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[h]=y,t.a=Object(i.hot)(e)(v)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(40);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=p(t),o=function(e,n){t.props.switchType(e)},(r="activate")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"type-switch"},Object.entries(this.props.types).map((function(t){var n=l(t,2),r=n[0],i=n[1];return o.a.createElement("button",{key:"switch-type-".concat(r),onClick:function(t){return e.activate(r,t)},className:i.active?"active":null},i.title)})))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(h)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(29);n(22);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,status:e.execution.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"execution ".concat(this.state.status," ").concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),this.props.execution.is_control?o.a.createElement("div",{className:"control-label"},"Control"):null,o.a.createElement("div",{className:"status"},this.props.execution.status)),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.reflections.map((function(e,t){return o.a.createElement(l.a,{reflection:e,key:"reflection-".concat(e.ref_id)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),t.state={status:e.reflection.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"reflection "+this.state.status+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.reflection.class),o.a.createElement("span",{className:"method"},this.props.reflection.method,"()")),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.reflection.inputs?this.props.reflection.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.reflection.output?o.a.createElement(l.a,{meta:this.props.reflection.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(31);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.controls),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){null==e.base_id?t[e.exe_id]={id:e.exe_id,status:"pass",timestamp:e.time,controls:[e]}:t[e.base_id].controls.push(e)}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(32);n(22),n(23);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"delete_controls",(function(e,n){n.stopPropagation();var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({exe_id:e})};fetch("/controls/delete",r).then((function(n){return t.hide(e)}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"execution neutral ".concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),o.a.createElement("div",{className:"control-label"},"Control"),o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete_controls(e.props.execution.id,t)}},"Delete"))),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.controls.map((function(e,t){return o.a.createElement(l.a,{control:e,key:"control-".concat(e.ref_id)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(23),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),h(p(t),"delete",(function(e,n){var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref_id:e})};fetch("/control/delete",r).then((function(n){return t.hide(e)}))})),t.state={hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"reflection neutral"+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.control.class),o.a.createElement("span",{className:"method"},this.props.control.method,"()"),null!=this.props.control.base_id?o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete(e.props.control.ref_id,t)}},"Delete")):null),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.control.inputs?this.props.control.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.control.output?o.a.createElement(l.a,{meta:this.props.control.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(17),a=n.n(i),l=n(24);a.a.render(o.a.createElement(l.a,null),document.getElementById("root"))},function(e,t,n){"use strict";
6
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(u[s]=n[s]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(10),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(10,function(t){i=n(10),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(11),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(11,function(t){i=n(11),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(12),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(12,function(t){i=n(12),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(13),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(13,function(t){i=n(13),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=(n(17),n(1)),a=n(4),l=n(25),u=n(26),c=n(18),s=n(30);n(43),n(44);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(f,e);var t,n,r,i=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),w(b(t=i.call(this,e)),"addAlert",(function(e,n){var r={type:e,message:n},o=t.state.alerts;o.push(r),t.setState({alerts:o})})),w(b(t),"switchType",(function(e){var n={};Object.entries(t.state.types).forEach((function(t,r){var o=d(t,2),i=o[0],a=o[1];a.active=i===e,n[i]=a})),t.setState({types:n}),"reflection"==e?t.setState({results:o.a.createElement(c.a,{reflections:t.state.db.reflections})}):"control"==e&&t.setState({results:o.a.createElement(s.a,{controls:t.state.db.controls})})})),t.state={},t.state.db={},t.state.alerts=[],t.state.results=[],t.state.writeMode=!1,t.state.types={reflection:{title:"Reflections",active:!0},control:{title:"Controls",active:!1}},"file:"!=window.location.protocol&&(t.state.writeMode=!0),t}return t=f,(n=[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("load",(function(t){try{e.setState({db:JSON.parse(db)}),console.log("DATA:"),console.log(e.state.db)}catch(t){e.addAlert("error","Couldn't load database.")}null!=db&&e.setState({results:o.a.createElement(c.a,{reflections:e.state.db.reflections})})}))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(a.a.Provider,{value:this.state.writeMode},o.a.createElement(u.a,{types:this.state.types,switchType:this.switchType}),o.a.createElement("div",{className:"container"},0!=this.state.alerts.length?o.a.createElement(l.a,{alerts:this.state.alerts}):null,o.a.createElement("main",{id:"content"},this.state.results))))}}])&&m(t.prototype,n),r&&m(t,r),f}(r.Component);t.a=Object(i.hot)(e)(x)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,r,i=c(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{id:"alerts"},this.props.alerts.map((function(e,t){return o.a.createElement("div",{className:"alert ".concat(e.type),key:"alert-".concat(t)},e.message)})))}}])&&l(t.prototype,n),r&&l(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(d)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(27);n(41);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m,h,y,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e="Read-Only";return 1==this.context&&(e="Read/Write"),o.a.createElement("header",{id:"header"},o.a.createElement("div",{className:"container"},o.a.createElement("svg",{id:"logo",enableBackground:"new 0 0 500 500",viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"m307.5 80.5h-115l-57.5 205h230z",fill:"#0047d0"}),o.a.createElement("path",{d:"m178 76.5-53.1-44-117.9 139 116 112z",fill:"#d04800"}),o.a.createElement("path",{d:"m190.4 467.5h115l57.5-168h-229z",fill:"#0047d0",opacity:".7"}),o.a.createElement("path",{d:"m177 467.5-81-85-92-197 115 113z",fill:"#d04800",opacity:".7"}),o.a.createElement("g",{fill:"#008c33"},o.a.createElement("path",{d:"m322 76.5 53.1-44 118 139-116 112z"}),o.a.createElement("path",{d:"m320 467.5 84-85 92-197-117 113z",opacity:".7"}))),o.a.createElement("h1",{id:"title"},"Reflekt"),o.a.createElement(l.a,{types:this.props.types,switchType:this.props.switchType}),o.a.createElement("div",{id:"write-mode",className:this.context?"read-write":"read-only"},o.a.createElement("label",null,e),o.a.createElement("div",{className:"icon"}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);m=v,h="contextType",y=a.a,h in m?Object.defineProperty(m,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[h]=y,t.a=Object(i.hot)(e)(v)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(40);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=p(t),o=function(e,n){t.props.switchType(e)},(r="activate")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"type-switch"},Object.entries(this.props.types).map((function(t){var n=l(t,2),r=n[0],i=n[1];return o.a.createElement("button",{key:"switch-type-".concat(r),onClick:function(t){return e.activate(r,t)},className:i.active?"active":null},i.title)})))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(h)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(29);n(22);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,status:e.execution.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"execution ".concat(this.state.status," ").concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),this.props.execution.is_control?o.a.createElement("div",{className:"control-label"},"New Control"):null,o.a.createElement("div",{className:"status"},this.props.execution.status)),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.reflections.map((function(e,t){return o.a.createElement(l.a,{reflection:e,key:"reflection-".concat(e.rid)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),t.state={status:e.reflection.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"reflection "+this.state.status+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.reflection.class),o.a.createElement("span",{className:"method"},this.props.reflection.method,"()")),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.reflection.inputs?this.props.reflection.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.reflection.output?o.a.createElement(l.a,{meta:this.props.reflection.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(31);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.controls),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){t.hasOwnProperty(e.eid)?t[e.eid].controls.push(e):t[e.eid]={id:e.eid,status:"pass",timestamp:e.time,controls:[e]}}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(32);n(22),n(23);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"delete_controls",(function(e,n){n.stopPropagation();var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({aid:e})};fetch("/controls/delete",r).then((function(n){return t.hide(e)}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"execution neutral ".concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),o.a.createElement("div",{className:"control-label"},"Control"),o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete_controls(e.props.execution.id,t)}},"Delete"))),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.controls.map((function(e,t){return o.a.createElement(l.a,{control:e,key:"control-".concat(e.rid)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(23),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),h(p(t),"delete",(function(e,n){var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rid:e})};fetch("/control/delete",r).then((function(n){return t.hide(e)}))})),t.state={hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"reflection neutral"+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.control.class),o.a.createElement("span",{className:"method"},this.props.control.method,"()"),null!=this.props.control.eid?o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete(e.props.control.rid,t)}},"Delete")):null),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.control.inputs?this.props.control.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.control.output?o.a.createElement(l.a,{meta:this.props.control.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(17),a=n.n(i),l=n(24);a.a.render(o.a.createElement(l.a,null),document.getElementById("root"))},function(e,t,n){"use strict";
7
7
  /** @license React v16.13.1
8
8
  * react.production.min.js
9
9
  *
@@ -607,9 +607,9 @@
607
607
  "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
608
608
  },
609
609
  "ini": {
610
- "version": "1.3.5",
611
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
612
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
610
+ "version": "1.3.8",
611
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
612
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
613
613
  "dev": true
614
614
  },
615
615
  "ipaddr.js": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reflekt-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Serves the UI and writes to the DB.",
5
5
  "main": "server.js",
6
6
  "scripts": {
@@ -56,19 +56,19 @@ var save_db = (db) => {
56
56
  app.post('/controls/delete', (req, res) => {
57
57
 
58
58
  // Get execution ID that controls share.
59
- var exe_id = req.body.exe_id;
59
+ var aid = req.body.aid;
60
60
 
61
61
  // Get database.
62
62
  db = load_db();
63
63
 
64
64
  // Delete controls.
65
65
  for (let [index, control] of db.controls.entries()) {
66
- if (control.exe_id == exe_id) {
66
+ if (control.aid == aid) {
67
67
  console.log("DELETE CONTROL:");
68
68
  console.log(db.controls[index]);
69
69
  db.controls.splice(index, 1);
70
70
  }
71
- if (control.base_id != null && control.base_id == exe_id) {
71
+ if (control.base_id != null && control.base_id == aid) {
72
72
  console.log("DELETE:");
73
73
  console.log(db.controls[index]);
74
74
  db.controls.splice(index, 1);
@@ -86,14 +86,14 @@ app.post('/controls/delete', (req, res) => {
86
86
  app.post('/control/delete', (req, res) => {
87
87
 
88
88
  // Get control ID.
89
- ref_id = req.body.ref_id;
89
+ rid = req.body.rid;
90
90
 
91
91
  // Get database.
92
92
  db = load_db();
93
93
 
94
94
  // Delete control.
95
95
  for (let [index, control] of db.controls.entries()) {
96
- if (control.r == ref_id) {
96
+ if (control.r == rid) {
97
97
  console.log("DELETE CONTROL:")
98
98
  console.log(db.controls[index]);
99
99
  db.controls.splice(index, 1);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reflekt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maedi Prichard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-12 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rowdb
@@ -31,11 +31,12 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/Accessor.rb
34
+ - lib/Action.rb
35
+ - lib/ActionStack.rb
34
36
  - lib/Aggregator.rb
35
37
  - lib/Clone.rb
36
38
  - lib/Config.rb
37
39
  - lib/Control.rb
38
- - lib/Execution.rb
39
40
  - lib/Meta.rb
40
41
  - lib/MetaBuilder.rb
41
42
  - lib/Reflection.rb
@@ -43,7 +44,6 @@ files:
43
44
  - lib/Renderer.rb
44
45
  - lib/Rule.rb
45
46
  - lib/RuleSet.rb
46
- - lib/ShadowStack.rb
47
47
  - lib/meta/ArrayMeta.rb
48
48
  - lib/meta/BooleanMeta.rb
49
49
  - lib/meta/FloatMeta.rb
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.1.4
85
+ rubygems_version: 3.0.3
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Reflective testing.
@@ -1,44 +0,0 @@
1
- ################################################################################
2
- # Track the executions in a shadow call stack.
3
- #
4
- # @pattern Stack
5
- ################################################################################
6
-
7
- class ShadowStack
8
-
9
- def initialize()
10
- @bottom = nil
11
- @top = nil
12
- end
13
-
14
- def peek()
15
- @top
16
- end
17
-
18
- def base()
19
- @bottom
20
- end
21
-
22
- ##
23
- # Place Execution at the top of stack.
24
- #
25
- # @param execution [Execution] The execution to place.
26
- # @return [Execution] The placed execution.
27
- ##
28
- def push(execution)
29
-
30
- # Place first execution at bottom of stack.
31
- if @bottom.nil?
32
- @bottom = execution
33
- # Connect subsequent executions to each other.
34
- else
35
- @top.parent = execution
36
- execution.child = @top
37
- end
38
-
39
- # Place execution at top of stack.
40
- @top = execution
41
-
42
- end
43
-
44
- end