rails_event_store-browser 0.31.1 → 0.32.0

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: 9b3bf3f0e29f9632c40b3c7e93ec9949724c3c6e039b4bdb00cd948f621b4638
4
- data.tar.gz: 75bccbf8b24d4d87b9167aef567e8b5c4b777e8d3449da8cfe4deeefa92edf96
3
+ metadata.gz: 95df3e75dce14691b31ec2cfbb59d43dada62399a0c55d821cb71436f7b2df0f
4
+ data.tar.gz: 0ce50361f7ca6d2cd3182b7fe06e8424e07a47e2f1fd663c3865e2c5ef80ca27
5
5
  SHA512:
6
- metadata.gz: e59a246cfeec0cd8b80593d0fe4e92981d485883507ac46783d8033f23ef23e36b2537a4b9e8bac02c71f689ad388eaa9c3ffc9dd38cab9680c4c63348c08b98
7
- data.tar.gz: 59a67e8e97643f558abd0cc291f309ceb9ae03d0cbba2fcffdcd58418880a83f03335a20e95a0987507d55ee0847c23550ae4841c8791344f023454dd413bca9
6
+ metadata.gz: 41d0782cfbc2b71a4785800ee7841b81db73059e9ae0abd3563c4d245eb8d33ae01a2bcfa45df91827325836a155492b1fdf83b1639dfe9e715265204d5a7d88
7
+ data.tar.gz: 12c84be00ec14a756f7a45a8e0527430d4af2f281dd63ee2b1b2fcfd31e497dc4fc32b90ef15b9b583953eaded09f0a66915cd3a35d57205835ef665c34cd60f
@@ -1,7 +1,5 @@
1
1
  module RailsEventStore
2
2
  module Browser
3
- PAGE_SIZE = 20
4
- SERIALIZED_GLOBAL_STREAM_NAME = 'all'.freeze
5
3
  end
6
4
  end
7
5
 
@@ -1,13 +1,36 @@
1
- require 'rails'
2
- require 'active_support/core_ext/string/filters'
1
+ require 'ruby_event_store/browser/app'
3
2
 
4
3
  module RailsEventStore
5
4
  module Browser
6
- class Engine < ::Rails::Engine
7
- isolate_namespace RailsEventStore::Browser
5
+ class Engine
6
+ def self.call(env)
7
+ warn <<~EOW
8
+ RailsEventStore::Browser::Engine has been deprecated.
8
9
 
9
- initializer "static assets" do |app|
10
- app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public")
10
+ This gem will be discontinued on next RailsEventStore release.
11
+ Please use 'ruby_event_store-browser' gem from now on.
12
+
13
+ In Gemfile:
14
+
15
+ gem 'ruby_event_store-browser', require: 'ruby_event_store/sbrowser/app'
16
+
17
+
18
+ In routes.rb:
19
+
20
+ mount RubyEventStore::Browser::App.for(
21
+ event_store_locator: -> { Rails.configuration.event_store },
22
+ host: 'http://localhost:3000',
23
+ path: '/res'
24
+ ) => '/res' if Rails.env.development?
25
+ EOW
26
+
27
+ request = Rack::Request.new(env)
28
+ app = RubyEventStore::Browser::App.for(
29
+ event_store_locator: -> { Rails.configuration.event_store },
30
+ host: request.base_url,
31
+ path: request.script_name
32
+ )
33
+ app.call(env)
11
34
  end
12
35
  end
13
36
  end
@@ -1,5 +1,5 @@
1
1
  module RailsEventStore
2
2
  module Browser
3
- VERSION = "0.31.1"
3
+ VERSION = "0.32.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_event_store-browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.1
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.31.1
33
+ version: 0.32.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.31.1
40
+ version: 0.32.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: ruby_event_store-browser
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.32.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.32.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rails
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,14 @@ dependencies:
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: 0.8.14
103
+ version: 0.8.17
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 0.8.14
110
+ version: 0.8.17
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: capybara
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -145,17 +159,9 @@ extra_rdoc_files: []
145
159
  files:
146
160
  - MIT-LICENSE
147
161
  - README.md
148
- - app/controllers/rails_event_store/browser/application_controller.rb
149
- - app/controllers/rails_event_store/browser/events_controller.rb
150
- - app/controllers/rails_event_store/browser/root_controller.rb
151
- - app/controllers/rails_event_store/browser/streams_controller.rb
152
- - app/models/rails_event_store/browser/json_api_event.rb
153
- - app/views/rails_event_store/browser/root/welcome.html.erb
154
- - config/routes.rb
155
162
  - lib/rails_event_store/browser.rb
156
163
  - lib/rails_event_store/browser/engine.rb
157
164
  - lib/rails_event_store/browser/version.rb
158
- - public/rails_event_store_browser.js
159
165
  homepage: https://railseventstore.org
160
166
  licenses:
161
167
  - MIT
@@ -1,13 +0,0 @@
1
- module RailsEventStore
2
- module Browser
3
- class ApplicationController < ActionController::Base
4
- protect_from_forgery with: :exception
5
-
6
- private
7
-
8
- def event_store
9
- Rails.configuration.event_store
10
- end
11
- end
12
- end
13
- end
@@ -1,16 +0,0 @@
1
- module RailsEventStore
2
- module Browser
3
- class EventsController < ApplicationController
4
- def show
5
- event = event_store.read_event(event_id)
6
- render json: { data: JsonApiEvent.new(event).to_h }, content_type: 'application/vnd.api+json'
7
- end
8
-
9
- private
10
-
11
- def event_id
12
- params.fetch(:id)
13
- end
14
- end
15
- end
16
- end
@@ -1,8 +0,0 @@
1
- module RailsEventStore
2
- module Browser
3
- class RootController < ApplicationController
4
- def welcome
5
- end
6
- end
7
- end
8
- end
@@ -1,101 +0,0 @@
1
- module RailsEventStore
2
- module Browser
3
- class StreamsController < ApplicationController
4
- def show
5
- links = {}
6
- events =
7
- case direction
8
- when :forward
9
- events_forward(position).reverse
10
- when :backward
11
- events_backward(position)
12
- end
13
-
14
- if prev_event?(events)
15
- links[:prev] = prev_page_link(events.first.event_id)
16
- links[:first] = first_page_link
17
- end
18
-
19
- if next_event?(events)
20
- links[:next] = next_page_link(events.last.event_id)
21
- links[:last] = last_page_link
22
- end
23
-
24
- render json: {
25
- data: events.map { |e| JsonApiEvent.new(e).to_h },
26
- links: links
27
- }, content_type: 'application/vnd.api+json'
28
- end
29
-
30
- private
31
-
32
- def events_forward(start)
33
- if stream_name.eql?(SERIALIZED_GLOBAL_STREAM_NAME)
34
- event_store.read.limit(count).from(start).each.to_a
35
- else
36
- event_store.read.limit(count).from(start).stream(stream_name).each.to_a
37
- end
38
- end
39
-
40
- def events_backward(start)
41
- if stream_name.eql?(SERIALIZED_GLOBAL_STREAM_NAME)
42
- event_store.read.limit(count).from(start).backward.each.to_a
43
- else
44
- event_store.read.limit(count).from(start).stream(stream_name).backward.each.to_a
45
- end
46
- end
47
-
48
- def next_event?(events)
49
- return if events.empty?
50
- events_backward(events.last.event_id).present?
51
- end
52
-
53
- def prev_event?(events)
54
- return if events.empty?
55
- events_forward(events.first.event_id).present?
56
- end
57
-
58
- def prev_page_link(event_id)
59
- stream_url(position: event_id, direction: :forward, count: count)
60
- end
61
-
62
- def next_page_link(event_id)
63
- stream_url(position: event_id, direction: :backward, count: count)
64
- end
65
-
66
- def first_page_link
67
- stream_url(position: :head, direction: :backward, count: count)
68
- end
69
-
70
- def last_page_link
71
- stream_url(position: :head, direction: :forward, count: count)
72
- end
73
-
74
- def count
75
- Integer(params.fetch(:count, PAGE_SIZE))
76
- end
77
-
78
- def direction
79
- case params[:direction]
80
- when 'forward'
81
- :forward
82
- else
83
- :backward
84
- end
85
- end
86
-
87
- def position
88
- case params[:position]
89
- when nil, 'head'
90
- :head
91
- else
92
- params.fetch(:position)
93
- end
94
- end
95
-
96
- def stream_name
97
- params.fetch(:id)
98
- end
99
- end
100
- end
101
- end
@@ -1,24 +0,0 @@
1
- module RailsEventStore
2
- module Browser
3
- class JsonApiEvent
4
- def initialize(event)
5
- @event = event
6
- end
7
-
8
- def to_h
9
- {
10
- id: event.event_id,
11
- type: "events",
12
- attributes: {
13
- event_type: event.class.to_s,
14
- data: event.data,
15
- metadata: event.metadata.to_h
16
- }
17
- }
18
- end
19
-
20
- private
21
- attr_reader :event
22
- end
23
- end
24
- end
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>RailsEventStore::Browser</title>
5
- <%= csrf_meta_tags %>
6
- </head>
7
- <body>
8
- <%= javascript_include_tag "/rails_event_store_browser.js" %>
9
- <script type="text/javascript">
10
- RailsEventStore.Browser.Main.fullscreen({
11
- rootUrl: "<%= root_path %>",
12
- eventsUrl: "<%= events_path %>",
13
- streamsUrl: "<%= streams_path %>",
14
- resVersion: "<%= RailsEventStore::VERSION %>"
15
- });
16
- </script>
17
- </body>
18
- </html>
@@ -1,13 +0,0 @@
1
- RailsEventStore::Browser::Engine.routes.draw do
2
- root to: 'root#welcome'
3
-
4
- resources :events, only: [:index, :show]
5
-
6
- get '/streams/:id(/:position/:direction/:count)',
7
- to: "streams#show",
8
- as: :stream,
9
- format: false,
10
- constraints: { id: %r{[^\/]+} }
11
-
12
- resources :streams, only: [:index]
13
- end
@@ -1 +0,0 @@
1
- !function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){r(2),window.RailsEventStore={},window.RailsEventStore.Browser=r(7)},function(t,e,r){var n=r(3);"string"==typeof n&&(n=[[t.i,n,""]]);var o={};o.transform=void 0;r(5)(n,o);n.locals&&(t.exports=n.locals)},function(t,e,r){e=t.exports=r(4)(!1),e.push([t.i,'/*! normalize.css v6.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body,html{height:100%}body{margin:0}fieldset{background-color:transparent;border:0;margin:0;padding:0}legend{padding:0}label,legend{font-weight:600;margin-bottom:.375em}label{display:block}input,select,textarea{display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px}input:not([type]),input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{appearance:none;background-color:#fff;border:1px solid #ced4da;border-radius:3px;box-shadow:inset 0 1px 3px rgba(0,0,0,.06);box-sizing:border-box;margin-bottom:.75em;padding:.5em;transition:border-color .15s ease;width:100%}input:not([type]):hover,input[type=color]:hover,input[type=date]:hover,input[type=datetime-local]:hover,input[type=datetime]:hover,input[type=email]:hover,input[type=month]:hover,input[type=number]:hover,input[type=password]:hover,input[type=search]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=time]:hover,input[type=url]:hover,input[type=week]:hover,textarea:hover{border-color:shade(#ced4da,20%)}input:not([type]):focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:#cf423b;box-shadow:inset 0 1px 3px rgba(0,0,0,.06),0 0 5px rgba(207,66,59,.7);outline:none}input:not([type]):disabled,input[type=color]:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=datetime]:disabled,input[type=email]:disabled,input[type=month]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=time]:disabled,input[type=url]:disabled,input[type=week]:disabled,textarea:disabled{background-color:shade(#fff,5%);cursor:not-allowed}input:not([type]):disabled:hover,input[type=color]:disabled:hover,input[type=date]:disabled:hover,input[type=datetime-local]:disabled:hover,input[type=datetime]:disabled:hover,input[type=email]:disabled:hover,input[type=month]:disabled:hover,input[type=number]:disabled:hover,input[type=password]:disabled:hover,input[type=search]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=time]:disabled:hover,input[type=url]:disabled:hover,input[type=week]:disabled:hover,textarea:disabled:hover{border:1px solid #ced4da}input:not([type])::placeholder,input[type=color]::placeholder,input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=datetime]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,textarea::placeholder{color:tint(#343a40,40%)}textarea{resize:vertical}[type=checkbox],[type=radio]{display:inline;margin-right:.375em}[type=file],select{margin-bottom:.75em;width:100%}[type=checkbox]:focus,[type=file]:focus,[type=radio]:focus,select:focus{outline:3px solid rgba(207,66,59,.6);outline-offset:2px}button,input[type=button],input[type=reset],input[type=submit]{appearance:none;background-color:#cf423b;border:0;border-radius:3px;color:contrast-switch(#cf423b);cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;-webkit-font-smoothing:antialiased;font-weight:600;line-height:1;padding:.75em 1.5em;text-align:center;text-decoration:none;transition:background-color .15s ease;user-select:none;vertical-align:middle;white-space:nowrap}button:hover,input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover{background-color:shade(#cf423b,20%);color:contrast-switch(shade(#cf423b,20%))}button:focus,input[type=button]:focus,input[type=reset]:focus,input[type=submit]:focus{outline:3px solid rgba(207,66,59,.6);outline-offset:2px}button:disabled,input[type=button]:disabled,input[type=reset]:disabled,input[type=submit]:disabled{cursor:not-allowed;opacity:.5}button:disabled:hover,input[type=button]:disabled:hover,input[type=reset]:disabled:hover,input[type=submit]:disabled:hover{background-color:#cf423b}ol,ul{list-style-type:none;padding:0}dl,dt,ol,ul{margin:0}dt{font-weight:600}dd,figure{margin:0}img,picture{margin:0;max-width:100%}table{border-collapse:collapse;margin:1.5em 0;table-layout:fixed;text-align:left;width:100%}thead{line-height:1.2;vertical-align:bottom}tbody{vertical-align:top}th{border-bottom:1px solid #ced4da;padding:0 0 .75rem;text-transform:uppercase;font-size:1.2rem;color:#adb5bd}td{padding:.75rem 0 0}html{color:#343a40;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:62.5%;line-height:1.6;-webkit-font-smoothing:antialiased}body{font-size:1.6rem}h1,h2,h3,h4,h5,h6{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:2em;line-height:1.2;margin:0 0 .75em}p{margin:0 0 .75em}a{color:#cf423b;text-decoration-skip:ink;transition:color .15s ease}a:hover{color:shade(#cf423b,25%)}a:focus{outline:3px solid rgba(207,66,59,.6);outline-offset:2px}hr{border-bottom:1px solid #ced4da;border-left:0;border-right:0;border-top:0;margin:1.5em 0}.frame{min-height:100vh;width:100%;background-color:#f8f9fa}.frame__body{background-color:#fff}.navigation{height:6rem;background-color:#cf423b}.navigation:after{clear:both;content:"";display:block}.navigation__brand{width:calc(33.33333% - 26.66667px);justify-content:flex-start}.navigation__brand,.navigation__links{float:left;margin-left:20px;display:flex;height:100%;align-items:center}.navigation__links{width:calc(66.66667% - 33.33333px);justify-content:flex-end}.navigation__link{margin-left:1rem;padding:.5rem;text-decoration:none;font-weight:700;font-size:1.4rem;color:#f1f3f5}.navigation__link--active,.navigation__link:hover{border-radius:4px;background-color:#ad302a;color:#f8f9fa}.navigation__logo{text-decoration:none;font-weight:600;color:#f8f9fa}.footer{border-top:1px solid #ced4da;padding:1rem 0}.footer:after{clear:both;content:"";display:block}.footer__links{width:calc(100% - 40px);float:left;margin-left:20px;display:flex;justify-content:center;font-size:1.4rem;color:#adb5bd}.footer__link{margin:0 0 0 1rem;color:#adb5bd}.footer__link:before{content:"\\2022";font-weight:700;margin:0 1rem 0 0;color:#dee2e6;display:inline-block}.browser{padding:2rem 0}.browser:after{clear:both;content:"";display:block}.browser__title{font-size:2.2rem}.browser__pagination,.browser__results,.browser__title{width:calc(100% - 40px);float:left;margin-left:20px}.event{padding:2rem 0}.event:after{clear:both;content:"";display:block}.event__title{font-size:2.2rem}.event__body,.event__title{width:calc(100% - 40px);float:left;margin-left:20px}.pagination{display:flex;margin-bottom:.75em}.pagination__page{height:3.6rem;background:none;border:1px solid #ced4da;text-align:center;padding:1rem;margin-right:.5rem;color:#cf423b;border-color:#cf423b;font-weight:400;font-size:90%}.pagination__page:focus{outline:none}.results__link{text-decoration:none}.results__empty{display:flex;align-items:center;justify-content:center;min-height:20rem}.u-align-right{text-align:right}',""])},function(t,e){function r(t,e){var r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var i=n(o);return[r].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([i]).join("\n")}return[r].join("\n")}function n(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=r(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(n[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){function n(t,e){for(var r=0;r<t.length;r++){var n=t[r],o=p[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(s(n.parts[i],e))}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(s(n.parts[i],e));p[n.id]={id:n.id,refs:1,parts:a}}}}function o(t,e){for(var r=[],n={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],c=i[1],u=i[2],l=i[3],s={css:c,media:u,sourceMap:l};n[a]?n[a].parts.push(s):r.push(n[a]={id:a,parts:[s]})}return r}function i(t,e){var r=v(t.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=b[b.length-1];if("top"===t.insertAt)n?n.nextSibling?r.insertBefore(e,n.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),b.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(e)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=b.indexOf(t);e>=0&&b.splice(e,1)}function c(t){var e=document.createElement("style");return t.attrs.type="text/css",l(e,t.attrs),i(t,e),e}function u(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",l(e,t.attrs),i(t,e),e}function l(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}function s(t,e){var r,n,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var l=m++;r=g||(g=c(e)),n=f.bind(null,r,l,!1),o=f.bind(null,r,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=u(e),n=d.bind(null,r,e),o=function(){a(r),r.href&&URL.revokeObjectURL(r.href)}):(r=c(e),n=_.bind(null,r),o=function(){a(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function f(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=k(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function _(t,e){var r=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function d(t,e,r){var n=r.css,o=r.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(n=y(n)),o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([n],{type:"text/css"}),c=t.href;t.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}var p={},h=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var e={};return function(r){return void 0===e[r]&&(e[r]=t.call(this,r)),e[r]}}(function(t){return document.querySelector(t)}),g=null,m=0,b=[],y=r(6);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=h()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=o(t,e);return n(r,e),function(t){for(var i=[],a=0;a<r.length;a++){var c=r[a],u=p[c.id];u.refs--,i.push(u)}if(t){n(o(t,e),e)}for(var a=0;a<i.length;a++){var u=i[a];if(0===u.refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete p[u.id]}}}};var k=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,n=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return t;var i;return i=0===o.indexOf("//")?o:0===o.indexOf("/")?r+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")"})}},function(t,e,r){var n,o;(function(){"use strict";function r(t){function e(e){return function(r){return t(e,r)}}return e.arity=2,e.func=t,e}function i(t){function e(e){return function(r){return function(n){return t(e,r,n)}}}return e.arity=3,e.func=t,e}function a(t){function e(e){return function(r){return function(n){return function(o){return t(e,r,n,o)}}}}return e.arity=4,e.func=t,e}function c(t){function e(e){return function(r){return function(n){return function(o){return function(i){return t(e,r,n,o,i)}}}}}return e.arity=5,e.func=t,e}function u(t){function e(e){return function(r){return function(n){return function(o){return function(i){return function(a){return t(e,r,n,o,i,a)}}}}}}return e.arity=6,e.func=t,e}function l(t){function e(e){return function(r){return function(n){return function(o){return function(i){return function(a){return function(c){return t(e,r,n,o,i,a,c)}}}}}}}return e.arity=7,e.func=t,e}function s(t){function e(e){return function(r){return function(n){return function(o){return function(i){return function(a){return function(c){return function(u){return t(e,r,n,o,i,a,c,u)}}}}}}}}return e.arity=8,e.func=t,e}function f(t){function e(e){return function(r){return function(n){return function(o){return function(i){return function(a){return function(c){return function(u){return function(l){return t(e,r,n,o,i,a,c,u,l)}}}}}}}}}return e.arity=9,e.func=t,e}function _(t,e,r){return 2===t.arity?t.func(e,r):t(e)(r)}function d(t,e,r,n){return 3===t.arity?t.func(e,r,n):t(e)(r)(n)}function p(t,e,r,n,o){return 4===t.arity?t.func(e,r,n,o):t(e)(r)(n)(o)}function h(t,e,r,n,o,i){return 5===t.arity?t.func(e,r,n,o,i):t(e)(r)(n)(o)(i)}function v(t,e,r,n,o,i,a){return 6===t.arity?t.func(e,r,n,o,i,a):t(e)(r)(n)(o)(i)(a)}var g=function(){function t(t,r){if(t<0||t>=z(r))throw new Error("Index "+t+" is out of range. Check the length of your array first or use getMaybe or getWithDefault.");return e(t,r)}function e(t,e){for(var r=e.height;r>0;r--){for(var n=t>>5*r;e.lengths[n]<=t;)n++;n>0&&(t-=e.lengths[n-1]),e=e.table[n]}return e.table[t]}function n(t,e,r){return t<0||z(r)<=t?r:o(t,e,r)}function o(t,e,r){if(r=I(r),0===r.height)r.table[t]=e;else{var n=P(t,r);n>0&&(t-=r.lengths[n-1]),r.table[n]=o(t,e,r.table[n])}return r}function a(t,e){return t<=0?Q:c(e,Math.floor(Math.log(t)/Math.log(H)),0,t)}function c(t,e,r,n){if(0===e){for(var o=new Array((n-r)%(H+1)),i=0;i<o.length;i++)o[i]=t(r+i);return{ctor:"_Array",height:0,table:o}}for(var a=Math.pow(H,e),o=new Array(Math.ceil((n-r)/a)),u=new Array(o.length),i=0;i<o.length;i++)o[i]=c(t,e-1,r+i*a,Math.min(r+(i+1)*a,n)),u[i]=z(o[i])+(i>0?u[i-1]:0);return{ctor:"_Array",height:e,table:o,lengths:u}}function u(t){if("[]"===t.ctor)return Q;for(var e=new Array(H),r=[],n=0;"[]"!==t.ctor;)if(e[n]=t._0,t=t._1,++n===H){var o={ctor:"_Array",height:0,table:e};l(o,r),e=new Array(H),n=0}if(n>0){var o={ctor:"_Array",height:0,table:e.splice(0,n)};l(o,r)}for(var i=0;i<r.length-1;i++)r[i].table.length>0&&l(r[i],r);var a=r[r.length-1];return a.height>0&&1===a.table.length?a.table[0]:a}function l(t,e){var r=t.height;if(e.length===r){var n={ctor:"_Array",height:r+1,table:[],lengths:[]};e.push(n)}e[r].table.push(t);var o=z(t);e[r].lengths.length>0&&(o+=e[r].lengths[e[r].lengths.length-1]),e[r].lengths.push(o),e[r].table.length===H&&(l(e[r],e),e[r]={ctor:"_Array",height:r+1,table:[],lengths:[]})}function s(t,e){var r=f(t,e);return null!==r?r:D(e,j(t,e.height))}function f(t,e){if(0===e.height){if(e.table.length<H){var r={ctor:"_Array",height:0,table:e.table.slice()};return r.table.push(t),r}return null}var n=f(t,O(e));if(null!==n){var r=I(e);return r.table[r.table.length-1]=n,r.lengths[r.lengths.length-1]++,r}if(e.table.length<H){var o=j(t,e.height-1),r=I(e);return r.table.push(o),r.lengths.push(r.lengths[r.lengths.length-1]+z(o)),r}return null}function d(t){return p(E.Nil,t)}function p(t,e){for(var r=e.table.length-1;r>=0;r--)t=0===e.height?E.Cons(e.table[r],t):p(t,e.table[r]);return t}function h(t,e){var r={ctor:"_Array",height:e.height,table:new Array(e.table.length)};e.height>0&&(r.lengths=e.lengths);for(var n=0;n<e.table.length;n++)r.table[n]=0===e.height?t(e.table[n]):h(t,e.table[n]);return r}function v(t,e){return g(t,e,0)}function g(t,e,r){var n={ctor:"_Array",height:e.height,table:new Array(e.table.length)};e.height>0&&(n.lengths=e.lengths);for(var o=0;o<e.table.length;o++)n.table[o]=0===e.height?_(t,r+o,e.table[o]):g(t,e.table[o],0==o?r:r+e.lengths[o-1]);return n}function m(t,e,r){if(0===r.height)for(var n=0;n<r.table.length;n++)e=_(t,r.table[n],e);else for(var n=0;n<r.table.length;n++)e=m(t,e,r.table[n]);return e}function b(t,e,r){if(0===r.height)for(var n=r.table.length;n--;)e=_(t,r.table[n],e);else for(var n=r.table.length;n--;)e=b(t,e,r.table[n]);return e}function y(t,e,r){return t<0&&(t+=z(r)),e<0&&(e+=z(r)),w(t,k(e,r))}function k(t,e){if(t===z(e))return e;if(0===e.height){var r={ctor:"_Array",height:0};return r.table=e.table.slice(0,t),r}var n=P(t,e),o=k(t-(n>0?e.lengths[n-1]:0),e.table[n]);if(0===n)return o;var r={ctor:"_Array",height:e.height,table:e.table.slice(0,n),lengths:e.lengths.slice(0,n)};return o.table.length>0&&(r.table[n]=o,r.lengths[n]=z(o)+(n>0?r.lengths[n-1]:0)),r}function w(t,e){if(0===t)return e;if(0===e.height){var r={ctor:"_Array",height:0};return r.table=e.table.slice(t,e.table.length+1),r}var n=P(t,e),o=w(t-(n>0?e.lengths[n-1]:0),e.table[n]);if(n===e.table.length-1)return o;var r={ctor:"_Array",height:e.height,table:e.table.slice(n,e.table.length+1),lengths:new Array(e.table.length-n)};r.table[0]=o;for(var i=0,a=0;a<r.table.length;a++)i+=z(r.table[a]),r.lengths[a]=i;return r}function x(t,e){if(0===t.table.length)return e;if(0===e.table.length)return t;var r=T(t,e);if(r[0].table.length+r[1].table.length<=H){if(0===r[0].table.length)return r[1];if(0===r[1].table.length)return r[0];if(r[0].table=r[0].table.concat(r[1].table),r[0].height>0){for(var n=z(r[0]),o=0;o<r[1].lengths.length;o++)r[1].lengths[o]+=n;r[0].lengths=r[0].lengths.concat(r[1].lengths)}return r[0]}if(r[0].height>0){var i=R(t,e);i>G&&(r=M(r[0],r[1],i))}return D(r[0],r[1])}function T(t,e){if(0===t.height&&0===e.height)return[t,e];if(1!==t.height||1!==e.height)if(t.height===e.height){t=I(t),e=I(e);var r=T(O(t),U(e));B(t,r[1]),N(e,r[0])}else if(t.height>e.height){t=I(t);var r=T(O(t),e);B(t,r[0]),e=J(r[1],r[1].height+1)}else{e=I(e);var r=T(t,U(e)),n=0===r[0].table.length?0:1,o=0===n?1:0;N(e,r[n]),t=J(r[o],r[o].height+1)}if(0===t.table.length||0===e.table.length)return[t,e];var i=R(t,e);return i<=G?[t,e]:M(t,e,i)}function B(t,e){var r=t.table.length-1;t.table[r]=e,t.lengths[r]=z(e),t.lengths[r]+=r>0?t.lengths[r-1]:0}function N(t,e){if(e.table.length>0){t.table[0]=e,t.lengths[0]=z(e);for(var r=z(t.table[0]),n=1;n<t.lengths.length;n++)r+=z(t.table[n]),t.lengths[n]=r}else{t.table.shift();for(var n=1;n<t.lengths.length;n++)t.lengths[n]=t.lengths[n]-t.lengths[0];t.lengths.shift()}}function R(t,e){for(var r=0,n=0;n<t.table.length;n++)r+=t.table[n].table.length;for(var n=0;n<e.table.length;n++)r+=e.table[n].table.length;return t.table.length+e.table.length-(Math.floor((r-1)/H)+1)}function S(t,e,r){return r<t.length?t[r]:e[r-t.length]}function C(t,e,r,n){r<t.length?t[r]=n:e[r-t.length]=n}function A(t,e,r,n){C(t.table,e.table,r,n);var o=0===r||r===t.lengths.length?0:S(t.lengths,t.lengths,r-1);C(t.lengths,e.lengths,r,o+z(n))}function L(t,e){e<0&&(e=0);var r={ctor:"_Array",height:t,table:new Array(e)};return t>0&&(r.lengths=new Array(e)),r}function M(t,e,r){for(var n=L(t.height,Math.min(H,t.table.length+e.table.length-r)),o=L(t.height,n.table.length-(t.table.length+e.table.length-r)),i=0;S(t.table,e.table,i).table.length%H==0;)C(n.table,o.table,i,S(t.table,e.table,i)),C(n.lengths,o.lengths,i,S(t.lengths,e.lengths,i)),i++;for(var a=i,c=new L(t.height-1,0),u=0;i-a-(c.table.length>0?1:0)<r;){var l=S(t.table,e.table,i),s=Math.min(H-c.table.length,l.table.length);if(c.table=c.table.concat(l.table.slice(u,s)),c.height>0)for(var f=c.lengths.length,_=f;_<f+s-u;_++)c.lengths[_]=z(c.table[_]),c.lengths[_]+=_>0?c.lengths[_-1]:0;u+=s,l.table.length<=s&&(i++,u=0),c.table.length===H&&(A(n,o,a,c),c=L(t.height-1,0),a++)}for(c.table.length>0&&(A(n,o,a,c),a++);i<t.table.length+e.table.length;)A(n,o,a,S(t.table,e.table,i)),i++,a++;return[n,o]}function O(t){return t.table[t.table.length-1]}function U(t){return t.table[0]}function I(t){var e={ctor:"_Array",height:t.height,table:t.table.slice()};return t.height>0&&(e.lengths=t.lengths.slice()),e}function z(t){return 0===t.height?t.table.length:t.lengths[t.lengths.length-1]}function P(t,e){for(var r=t>>5*e.height;e.lengths[r]<=t;)r++;return r}function j(t,e){return 0===e?{ctor:"_Array",height:0,table:[t]}:{ctor:"_Array",height:e,table:[j(t,e-1)],lengths:[1]}}function J(t,e){return e===t.height?t:{ctor:"_Array",height:e,table:[J(t,e-1)],lengths:[z(t)]}}function D(t,e){return{ctor:"_Array",height:t.height+1,table:[t,e],lengths:[z(t),z(t)+z(e)]}}function F(t){var e=new Array(z(t));return W(e,0,t),e}function W(t,e,r){for(var n=0;n<r.table.length;n++)if(0===r.height)t[e+n]=r.table[n];else{var o=0===n?0:r.lengths[n-1];W(t,e+o,r.table[n])}}function q(t){return 0===t.length?Q:V(t,Math.floor(Math.log(t.length)/Math.log(H)),0,t.length)}function V(t,e,r,n){if(0===e)return{ctor:"_Array",height:0,table:t.slice(r,n)};for(var o=Math.pow(H,e),i=new Array(Math.ceil((n-r)/o)),a=new Array(i.length),c=0;c<i.length;c++)i[c]=V(t,e-1,r+c*o,Math.min(r+(c+1)*o,n)),a[c]=z(i[c])+(c>0?a[c-1]:0);return{ctor:"_Array",height:e,table:i,lengths:a}}var H=32,G=2,Q={ctor:"_Array",height:0,table:[]};return{empty:Q,fromList:u,toList:d,initialize:r(a),append:r(x),push:r(s),slice:i(y),get:r(t),set:i(n),map:r(h),indexedMap:r(v),foldl:i(m),foldr:i(b),length:z,toJSArray:F,fromJSArray:q}}(),m=function(){function t(t,e){return t/e|0}function e(t,e){return t%e}function n(t,e){if(0===e)throw new Error("Cannot perform mod 0. Division by zero error.");var r=t%e,o=0===t?0:e>0?t>=0?r:r+e:-n(-t,-e);return o===e?0:o}function o(t,e){return Math.log(e)/Math.log(t)}function a(t){return-t}function c(t){return t<0?-t:t}function u(t,e){return b.cmp(t,e)<0?t:e}function l(t,e){return b.cmp(t,e)>0?t:e}function s(t,e,r){return b.cmp(r,t)<0?t:b.cmp(r,e)>0?e:r}function f(t,e){return{ctor:k[b.cmp(t,e)+1]}}function _(t,e){return t!==e}function d(t){return!t}function p(t){return t===1/0||t===-1/0}function h(t){return 0|t}function v(t){return t*Math.PI/180}function g(t){return 2*Math.PI*t}function m(t){var e=t._0,r=t._1;return b.Tuple2(e*Math.cos(r),e*Math.sin(r))}function y(t){var e=t._0,r=t._1;return b.Tuple2(Math.sqrt(e*e+r*r),Math.atan2(r,e))}var k=["LT","EQ","GT"];return{div:r(t),rem:r(e),mod:r(n),pi:Math.PI,e:Math.E,cos:Math.cos,sin:Math.sin,tan:Math.tan,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:r(Math.atan2),degrees:v,turns:g,fromPolar:m,toPolar:y,sqrt:Math.sqrt,logBase:r(o),negate:a,abs:c,min:r(u),max:r(l),clamp:i(s),compare:r(f),xor:r(_),not:d,truncate:h,ceiling:Math.ceil,floor:Math.floor,round:Math.round,toFloat:function(t){return t},isNaN:isNaN,isInfinite:p}}(),b=function(){function t(t,r){for(var n,o=[],i=e(t,r,0,o);i&&(n=o.pop());)i=e(n.x,n.y,0,o);return i}function e(t,r,n,o){if(n>100)return o.push({x:t,y:r}),!0;if(t===r)return!0;if("object"!=typeof t){if("function"==typeof t)throw new Error('Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense. Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#== which describes why it is this way and what the better version will look like.');return!1}if(null===t||null===r)return!1;if(t instanceof Date)return t.getTime()===r.getTime();if(!("ctor"in t)){for(var i in t)if(!e(t[i],r[i],n+1,o))return!1;return!0}if("RBNode_elm_builtin"!==t.ctor&&"RBEmpty_elm_builtin"!==t.ctor||(t=lt(t),r=lt(r)),"Set_elm_builtin"===t.ctor&&(t=_elm_lang$core$Set$toList(t),r=_elm_lang$core$Set$toList(r)),"::"===t.ctor){for(var a=t,c=r;"::"===a.ctor&&"::"===c.ctor;){if(!e(a._0,c._0,n+1,o))return!1;a=a._1,c=c._1}return a.ctor===c.ctor}if("_Array"===t.ctor){var u=g.toJSArray(t),l=g.toJSArray(r);if(u.length!==l.length)return!1;for(var s=0;s<u.length;s++)if(!e(u[s],l[s],n+1,o))return!1;return!0}if(!e(t.ctor,r.ctor,n+1,o))return!1;for(var i in t)if(!e(t[i],r[i],n+1,o))return!1;return!0}function n(t,e){if("object"!=typeof t)return t===e?v:t<e?h:m;if(t instanceof String){var r=t.valueOf(),o=e.valueOf();return r===o?v:r<o?h:m}if("::"===t.ctor||"[]"===t.ctor){for(;"::"===t.ctor&&"::"===e.ctor;){var i=n(t._0,e._0);if(i!==v)return i;t=t._1,e=e._1}return t.ctor===e.ctor?v:"[]"===t.ctor?h:m}if("_Tuple"===t.ctor.slice(0,6)){var i,a=t.ctor.slice(6)-0;if(0===a)return v;if(a>=1){if((i=n(t._0,e._0))!==v)return i;if(a>=2){if((i=n(t._1,e._1))!==v)return i;if(a>=3){if((i=n(t._2,e._2))!==v)return i;if(a>=4){if((i=n(t._3,e._3))!==v)return i;if(a>=5){if((i=n(t._4,e._4))!==v)return i;if(a>=6){if((i=n(t._5,e._5))!==v)return i;if(a>=7)throw new Error("Comparison error: cannot compare tuples with more than 6 elements.")}}}}}}return v}throw new Error("Comparison error: comparison is only defined on ints, floats, times, chars, strings, lists of comparable values, and tuples of comparable values.")}function o(t,e){return{ctor:"_Tuple2",_0:t,_1:e}}function i(t){return new String(t)}function a(t){return y++}function c(t,e){var r={};for(var n in t)r[n]=t[n];for(var n in e)r[n]=e[n];return r}function u(t,e){return{ctor:"::",_0:t,_1:e}}function l(t,e){if("string"==typeof t)return t+e;if("[]"===t.ctor)return e;var r=u(t._0,k),n=r;for(t=t._1;"[]"!==t.ctor;)n._1=u(t._0,k),t=t._1,n=n._1;return n._1=e,r}function s(t,e){return function(r){throw new Error("Ran into a `Debug.crash` in module `"+t+"` "+_(e)+"\nThe message provided by the code author is:\n\n "+r)}}function f(t,e,r){return function(n){throw new Error("Ran into a `Debug.crash` in module `"+t+"`\n\nThis was caused by the `case` expression "+_(e)+".\nOne of the branches ended with a crash and the following value got through:\n\n "+d(r)+"\n\nThe message provided by the code author is:\n\n "+n)}}function _(t){return t.start.line==t.end.line?"on line "+t.start.line:"between lines "+t.start.line+" and "+t.end.line}function d(t){var e=typeof t;if("function"===e)return"<function>";if("boolean"===e)return t?"True":"False";if("number"===e)return t+"";if(t instanceof String)return"'"+p(t,!0)+"'";if("string"===e)return'"'+p(t,!1)+'"';if(null===t)return"null";if("object"===e&&"ctor"in t){var r=t.ctor.substring(0,5);if("_Tupl"===r){var n=[];for(var o in t)"ctor"!==o&&n.push(d(t[o]));return"("+n.join(",")+")"}if("_Task"===r)return"<task>";if("_Array"===t.ctor){return"Array.fromList "+d(Q(t))}if("<decoder>"===t.ctor)return"<decoder>";if("_Process"===t.ctor)return"<process:"+t.id+">";if("::"===t.ctor){var n="["+d(t._0);for(t=t._1;"::"===t.ctor;)n+=","+d(t._0),t=t._1;return n+"]"}if("[]"===t.ctor)return"[]";if("Set_elm_builtin"===t.ctor)return"Set.fromList "+d(_elm_lang$core$Set$toList(t));if("RBNode_elm_builtin"===t.ctor||"RBEmpty_elm_builtin"===t.ctor)return"Dict.fromList "+d(lt(t));var n="";for(var i in t)if("ctor"!==i){var a=d(t[i]),c=a[0],u="{"===c||"("===c||"<"===c||'"'===c||a.indexOf(" ")<0;n+=" "+(u?a:"("+a+")")}return t.ctor+n}if("object"===e){if(t instanceof Date)return"<"+t.toString()+">";if(t.elm_web_socket)return"<websocket>";var n=[];for(var o in t)n.push(o+" = "+d(t[o]));return 0===n.length?"{}":"{ "+n.join(", ")+" }"}return"<internal structure>"}function p(t,e){var r=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return e?r.replace(/\'/g,"\\'"):r.replace(/\"/g,'\\"')}var h=-1,v=0,m=1,b={ctor:"_Tuple0"},y=0,k={ctor:"[]"};return{eq:t,cmp:n,Tuple0:b,Tuple2:o,chr:i,update:c,guid:a,append:r(l),crash:s,crashCase:f,toString:d}}(),y=(r(function(t,e){var r=e;return _(t,r._0,r._1)}),i(function(t,e,r){return t({ctor:"_Tuple2",_0:e,_1:r})}),i(function(t,e,r){return _(t,r,e)}),r(function(t,e){return t})),k=function(t){return t},w=w||{};w["<|"]=r(function(t,e){return t(e)});var w=w||{};w["|>"]=r(function(t,e){return e(t)});var w=w||{};w[">>"]=i(function(t,e,r){return e(t(r))});var w=w||{};w["<<"]=i(function(t,e,r){return t(e(r))});var w=w||{};w["++"]=b.append;var x=b.toString,w=(m.isInfinite,m.isNaN,m.toFloat,m.ceiling,m.floor,m.truncate,m.round,m.not,m.xor,w||{});w["||"]=m.or;var w=w||{};w["&&"]=m.and;var T=(m.max,m.min,m.compare),w=w||{};w[">="]=m.ge;var w=w||{};w["<="]=m.le;var w=w||{};w[">"]=m.gt;var w=w||{};w["<"]=m.lt;var w=w||{};w["/="]=m.neq;var w=w||{};w["=="]=m.eq;var w=(m.e,m.pi,m.clamp,m.logBase,m.abs,m.negate,m.sqrt,m.atan2,m.atan,m.asin,m.acos,m.tan,m.sin,m.cos,w||{});w["^"]=m.exp;var w=w||{};w["%"]=m.mod;var w=(m.rem,w||{});w["//"]=m.div;var w=w||{};w["/"]=m.floatDiv;var w=w||{};w["*"]=m.mul;var w=w||{};w["-"]=m.sub;var w=w||{};w["+"]=m.add;var B=(m.toPolar,m.fromPolar,m.turns,m.degrees,r(function(t,e){var r=e;return"Just"===r.ctor?r._0:t}),{ctor:"Nothing"}),N=(r(function(t,e){var r=e;return"Just"===r.ctor?t(r._0):B}),function(t){return{ctor:"Just",_0:t}}),R=(r(function(t,e){var r=e;return"Just"===r.ctor?N(t(r._0)):B}),i(function(t,e,r){var n={ctor:"_Tuple2",_0:e,_1:r};return"_Tuple2"===n.ctor&&"Just"===n._0.ctor&&"Just"===n._1.ctor?N(_(t,n._0._0,n._1._0)):B})),E=(a(function(t,e,r,n){var o={ctor:"_Tuple3",_0:e,_1:r,_2:n};return"_Tuple3"===o.ctor&&"Just"===o._0.ctor&&"Just"===o._1.ctor&&"Just"===o._2.ctor?N(d(t,o._0._0,o._1._0,o._2._0)):B}),c(function(t,e,r,n,o){var i={ctor:"_Tuple4",_0:e,_1:r,_2:n,_3:o};return"_Tuple4"===i.ctor&&"Just"===i._0.ctor&&"Just"===i._1.ctor&&"Just"===i._2.ctor&&"Just"===i._3.ctor?N(p(t,i._0._0,i._1._0,i._2._0,i._3._0)):B}),u(function(t,e,r,n,o,i){var a={ctor:"_Tuple5",_0:e,_1:r,_2:n,_3:o,_4:i};return"_Tuple5"===a.ctor&&"Just"===a._0.ctor&&"Just"===a._1.ctor&&"Just"===a._2.ctor&&"Just"===a._3.ctor&&"Just"===a._4.ctor?N(h(t,a._0._0,a._1._0,a._2._0,a._3._0,a._4._0)):B}),function(){function t(t,e){return{ctor:"::",_0:t,_1:e}}function e(e){for(var r=y,n=e.length;n--;)r=t(e[n],r);return r}function n(t){for(var e=[];"[]"!==t.ctor;)e.push(t._0),t=t._1;return e}function o(t,e,r){for(var o=n(r),i=e,a=o.length;a--;)i=_(t,o[a],i);return i}function l(t,r,n){for(var o=[];"[]"!==r.ctor&&"[]"!==n.ctor;)o.push(_(t,r._0,n._0)),r=r._1,n=n._1;return e(o)}function s(t,r,n,o){for(var i=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor;)i.push(d(t,r._0,n._0,o._0)),r=r._1,n=n._1,o=o._1;return e(i)}function f(t,r,n,o,i){for(var a=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==i.ctor;)a.push(p(t,r._0,n._0,o._0,i._0)),r=r._1,n=n._1,o=o._1,i=i._1;return e(a)}function v(t,r,n,o,i,a){for(var c=[];"[]"!==r.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==i.ctor&&"[]"!==a.ctor;)c.push(h(t,r._0,n._0,o._0,i._0,a._0)),r=r._1,n=n._1,o=o._1,i=i._1,a=a._1;return e(c)}function g(t,r){return e(n(r).sort(function(e,r){return b.cmp(t(e),t(r))}))}function m(t,r){return e(n(r).sort(function(e,r){var n=t(e)(r).ctor;return"EQ"===n?0:"LT"===n?-1:1}))}var y={ctor:"[]"};return{Nil:y,Cons:t,cons:r(t),toArray:n,fromArray:e,foldr:i(o),map2:i(l),map3:a(s),map4:c(f),map5:u(v),sortBy:r(g),sortWith:r(m)}}()),S=(E.sortWith,E.sortBy,r(function(t,e){for(;;){if(b.cmp(t,0)<1)return e;var r=e;if("[]"===r.ctor)return e;var n=t-1,o=r._1;t=n,e=o}}),E.map5,E.map4,E.map3,E.map2),C=r(function(t,e){for(;;){var r=e;if("[]"===r.ctor)return!1;if(t(r._0))return!0;var n=t,o=r._1;t=n,e=o}}),A=(r(function(t,e){return!_(C,function(e){return!t(e)},e)}),E.foldr),L=i(function(t,e,r){for(;;){var n=r;if("[]"===n.ctor)return e;var o=t,i=_(t,n._0,e),a=n._1;t=o,e=i,r=a}}),M=function(t){return d(L,r(function(t,e){return e+1}),0,t)},O=(r(function(t,e){return _(C,function(e){return b.eq(e,t)},e)}),O||{});O["::"]=E.cons;var U=r(function(t,e){return d(A,r(function(e,r){return{ctor:"::",_0:t(e),_1:r}}),{ctor:"[]"},e)}),I=(r(function(t,e){var n=r(function(e,r){return t(e)?{ctor:"::",_0:e,_1:r}:r});return d(A,n,{ctor:"[]"},e)}),i(function(t,e,r){var n=t(e);return"Just"===n.ctor?{ctor:"::",_0:n._0,_1:r}:r})),z=r(function(t,e){return d(A,I(t),{ctor:"[]"},e)}),P=function(t){return d(L,r(function(t,e){return{ctor:"::",_0:t,_1:e}}),{ctor:"[]"},t)},j=(i(function(t,e,n){var o=r(function(e,r){var n=r;return"::"===n.ctor?{ctor:"::",_0:_(t,e,n._0),_1:r}:{ctor:"[]"}});return P(d(L,o,{ctor:"::",_0:e,_1:{ctor:"[]"}},n))}),r(function(t,e){return"[]"===e.ctor?t:d(A,r(function(t,e){return{ctor:"::",_0:t,_1:e}}),e,t)})),J=function(t){return d(A,j,{ctor:"[]"},t)},D=r(function(t,e){return J(_(U,t,e))}),F=(r(function(t,e){var n=r(function(e,r){var n=r,o=n._0,i=n._1;return t(e)?{ctor:"_Tuple2",_0:{ctor:"::",_0:e,_1:o},_1:i}:{ctor:"_Tuple2",_0:o,_1:{ctor:"::",_0:e,_1:i}}});return d(A,n,{ctor:"_Tuple2",_0:{ctor:"[]"},_1:{ctor:"[]"}},e)}),r(function(t,e){var n=e;if("[]"===n.ctor)return{ctor:"[]"};var o=r(function(e,r){return{ctor:"::",_0:t,_1:{ctor:"::",_0:e,_1:r}}}),i=d(A,o,{ctor:"[]"},n._1);return{ctor:"::",_0:n._0,_1:i}}),i(function(t,e,r){for(;;){if(b.cmp(t,0)<1)return r;var n=e;if("[]"===n.ctor)return r;var o=t-1,i=n._1,a={ctor:"::",_0:n._0,_1:r};t=o,e=i,r=a}})),W=r(function(t,e){return P(d(F,t,e,{ctor:"[]"}))}),q=i(function(t,e,r){if(b.cmp(e,0)<1)return{ctor:"[]"};var n={ctor:"_Tuple2",_0:e,_1:r};t:do{e:do{if("_Tuple2"!==n.ctor)break t;if("[]"===n._1.ctor)return r;if("::"!==n._1._1.ctor){if(1===n._0)break e;break t}switch(n._0){case 1:break e;case 2:return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"[]"}}};case 3:if("::"===n._1._1._1.ctor)return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"::",_0:n._1._1._1._0,_1:{ctor:"[]"}}}};break t;default:if("::"===n._1._1._1.ctor&&"::"===n._1._1._1._1.ctor){var o=n._1._1._1._0,i=n._1._1._0,a=n._1._0,c=n._1._1._1._1._0,u=n._1._1._1._1._1;return b.cmp(t,1e3)>0?{ctor:"::",_0:a,_1:{ctor:"::",_0:i,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:c,_1:_(W,e-4,u)}}}}:{ctor:"::",_0:a,_1:{ctor:"::",_0:i,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:c,_1:d(q,t+1,e-4,u)}}}}}break t}}while(!1);return{ctor:"::",_0:n._1._0,_1:{ctor:"[]"}}}while(!1);return r}),V=(r(function(t,e){return d(q,0,t,e)}),i(function(t,e,r){for(;;){if(b.cmp(e,0)<1)return t;var n={ctor:"::",_0:r,_1:t},o=e-1,i=r;t=n,e=o,r=i}})),H=(r(function(t,e){return d(V,{ctor:"[]"},t,e)}),i(function(t,e,r){for(;;){if(!(b.cmp(t,e)<1))return r;var n=t,o=e-1,i={ctor:"::",_0:e,_1:r};t=n,e=o,r=i}})),G=r(function(t,e){return d(H,t,e,{ctor:"[]"})}),Q=(r(function(t,e){return d(S,t,_(G,0,M(e)-1),e)}),g.append,g.length,g.slice,g.set,r(function(t,e){return b.cmp(0,t)<1&&b.cmp(t,g.length(e))<0?N(_(g.get,t,e)):B}),g.push,g.empty,r(function(t,e){var n=r(function(e,r){return t(e)?_(g.push,e,r):r});return d(g.foldl,n,g.empty,e)}),g.foldr,g.foldl,g.indexedMap,g.map,g.toList),$=(g.fromList,g.initialize),K=(r(function(t,e){return _($,t,y(e))}),function(){function t(t,e){var r=t+": "+b.toString(e),n=n||{};return n.stdout?n.stdout.write(r):console.log(r),e}function e(t){throw new Error(t)}return{crash:e,log:r(t)}}()),X=function(){function t(t){return 0===t.length}function e(t,e){return t+e}function n(t){var e=t[0];return e?N(b.Tuple2(b.chr(e),t.slice(1))):B}function o(t,e){return t+e}function a(t){return E.toArray(t).join("")}function c(t){return t.length}function u(t,e){for(var r=e.split(""),n=r.length;n--;)r[n]=t(b.chr(r[n]));return r.join("")}function l(t,e){return e.split("").map(b.chr).filter(t).join("")}function s(t){return t.split("").reverse().join("")}function f(t,e,r){for(var n=r.length,o=0;o<n;++o)e=_(t,b.chr(r[o]),e);return e}function d(t,e,r){for(var n=r.length;n--;)e=_(t,b.chr(r[n]),e);return e}function p(t,e){return E.fromArray(e.split(t))}function h(t,e){return E.toArray(e).join(t)}function v(t,e){for(var r="";t>0;)1&t&&(r+=e),t>>=1,e+=e;return r}function g(t,e,r){return r.slice(t,e)}function m(t,e){return t<1?"":e.slice(0,t)}function y(t,e){return t<1?"":e.slice(-t)}function k(t,e){return t<1?e:e.slice(t)}function w(t,e){return t<1?e:e.slice(0,-t)}function x(t,e,r){var n=(t-r.length)/2;return v(Math.ceil(n),e)+r+v(0|n,e)}function T(t,e,r){return r+v(t-r.length,e)}function R(t,e,r){return v(t-r.length,e)+r}function S(t){return t.trim()}function C(t){return t.replace(/^\s+/,"")}function A(t){return t.replace(/\s+$/,"")}function L(t){return E.fromArray(t.trim().split(/\s+/g))}function M(t){return E.fromArray(t.split(/\r\n|\r|\n/g))}function O(t){return t.toUpperCase()}function U(t){return t.toLowerCase()}function I(t,e){for(var r=e.length;r--;)if(t(b.chr(e[r])))return!0;return!1}function z(t,e){for(var r=e.length;r--;)if(!t(b.chr(e[r])))return!1;return!0}function P(t,e){return e.indexOf(t)>-1}function j(t,e){return 0===e.indexOf(t)}function J(t,e){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}function D(t,e){var r=t.length;if(r<1)return E.Nil;for(var n=0,o=[];(n=e.indexOf(t,n))>-1;)o.push(n),n+=r;return E.fromArray(o)}function F(t){var e=t.length;if(0===e)return W(t);var r=t[0];if("0"===r&&"x"===t[1]){for(var n=2;n<e;++n){var r=t[n];if(!("0"<=r&&r<="9"||"A"<=r&&r<="F"||"a"<=r&&r<="f"))return W(t)}return rt(parseInt(t,16))}if(r>"9"||r<"0"&&"-"!==r&&"+"!==r)return W(t);for(var n=1;n<e;++n){var r=t[n];if(r<"0"||"9"<r)return W(t)}return rt(parseInt(t,10))}function W(t){return et("could not convert string '"+t+"' to an Int")}function q(t){if(0===t.length||/[\sxbo]/.test(t))return V(t);var e=+t;return e===e?rt(e):V(t)}function V(t){return et("could not convert string '"+t+"' to a Float")}function H(t){return E.fromArray(t.split("").map(b.chr))}function G(t){return E.toArray(t).join("")}return{isEmpty:t,cons:r(e),uncons:n,append:r(o),concat:a,length:c,map:r(u),filter:r(l),reverse:s,foldl:i(f),foldr:i(d),split:r(p),join:r(h),repeat:r(v),slice:i(g),left:r(m),right:r(y),dropLeft:r(k),dropRight:r(w),pad:i(x),padLeft:i(R),padRight:i(T),trim:S,trimLeft:C,trimRight:A,words:L,lines:M,toUpper:O,toLower:U,any:r(I),all:r(z),contains:r(P),startsWith:r(j),endsWith:r(J),indexes:r(D),toInt:F,toFloat:q,toList:H,fromList:G}}(),Y=function(){return{fromCode:function(t){return b.chr(String.fromCharCode(t))},toCode:function(t){return t.charCodeAt(0)},toUpper:function(t){return b.chr(t.toUpperCase())},toLower:function(t){return b.chr(t.toLowerCase())},toLocaleUpper:function(t){return b.chr(t.toLocaleUpperCase())},toLocaleLower:function(t){return b.chr(t.toLocaleLowerCase())}}}(),Z=(Y.fromCode,Y.toCode),tt=(Y.toLocaleLower,Y.toLocaleUpper,Y.toLower,Y.toUpper,i(function(t,e,r){var n=Z(r);return b.cmp(n,Z(t))>-1&&b.cmp(n,Z(e))<1})),et=(_(tt,b.chr("A"),b.chr("Z")),_(tt,b.chr("a"),b.chr("z")),_(tt,b.chr("0"),b.chr("9")),_(tt,b.chr("0"),b.chr("7")),r(function(t,e){var r=e;return"Ok"===r.ctor?r._0:t}),function(t){return{ctor:"Err",_0:t}}),rt=(r(function(t,e){var r=e;return"Ok"===r.ctor?t(r._0):et(r._0)}),function(t){return{ctor:"Ok",_0:t}}),nt=r(function(t,e){var r=e;return"Ok"===r.ctor?rt(t(r._0)):et(r._0)}),ot=(i(function(t,e,r){var n={ctor:"_Tuple2",_0:e,_1:r};return"Ok"===n._0.ctor?"Ok"===n._1.ctor?rt(_(t,n._0._0,n._1._0)):et(n._1._0):et(n._0._0)}),a(function(t,e,r,n){var o={ctor:"_Tuple3",_0:e,_1:r,_2:n};return"Ok"===o._0.ctor?"Ok"===o._1.ctor?"Ok"===o._2.ctor?rt(d(t,o._0._0,o._1._0,o._2._0)):et(o._2._0):et(o._1._0):et(o._0._0)}),c(function(t,e,r,n,o){var i={ctor:"_Tuple4",_0:e,_1:r,_2:n,_3:o};return"Ok"===i._0.ctor?"Ok"===i._1.ctor?"Ok"===i._2.ctor?"Ok"===i._3.ctor?rt(p(t,i._0._0,i._1._0,i._2._0,i._3._0)):et(i._3._0):et(i._2._0):et(i._1._0):et(i._0._0)}),u(function(t,e,r,n,o,i){var a={ctor:"_Tuple5",_0:e,_1:r,_2:n,_3:o,_4:i};return"Ok"===a._0.ctor?"Ok"===a._1.ctor?"Ok"===a._2.ctor?"Ok"===a._3.ctor?"Ok"===a._4.ctor?rt(h(t,a._0._0,a._1._0,a._2._0,a._3._0,a._4._0)):et(a._4._0):et(a._3._0):et(a._2._0):et(a._1._0):et(a._0._0)}),r(function(t,e){var r=e;return"Ok"===r.ctor?rt(r._0):et(t(r._0))}),r(function(t,e){var r=e;return"Just"===r.ctor?rt(r._0):et(t)}),X.fromList,X.toList,X.toFloat,X.toInt),it=(X.indexes,X.indexes,X.endsWith,X.startsWith,X.contains,X.all,X.any,X.toLower,X.toUpper,X.lines,X.words,X.trimRight,X.trimLeft,X.trim,X.padRight,X.padLeft,X.pad,X.dropRight,X.dropLeft),at=(X.right,X.left,X.slice,X.repeat,X.join,X.split),ct=(X.foldr,X.foldl,X.reverse,X.filter,X.map,X.length,X.concat),ut=(X.append,X.uncons,X.cons,X.isEmpty,i(function(t,e,r){for(;;){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return e;var o=t,i=d(t,n._1,n._2,d(ut,t,e,n._4)),a=n._3;t=o,e=i,r=a}})),lt=function(t){return d(ut,i(function(t,e,r){return{ctor:"::",_0:{ctor:"_Tuple2",_0:t,_1:e},_1:r}}),{ctor:"[]"},t)},st=i(function(t,e,r){for(;;){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return e;var o=t,i=d(t,n._1,n._2,d(st,t,e,n._3)),a=n._4;t=o,e=i,r=a}}),ft=u(function(t,e,n,o,a,c){var u=i(function(r,o,i){for(;;){var a=i,c=a._1,u=a._0,l=u;if("[]"===l.ctor)return{ctor:"_Tuple2",_0:u,_1:d(n,r,o,c)};var s=l._1,f=l._0._1,_=l._0._0;if(!(b.cmp(_,r)<0))return b.cmp(_,r)>0?{ctor:"_Tuple2",_0:u,_1:d(n,r,o,c)}:{ctor:"_Tuple2",_0:s,_1:p(e,_,f,o,c)};var h=r,v=o,g={ctor:"_Tuple2",_0:s,_1:d(t,_,f,c)};r=h,o=v,i=g}}),l=d(st,u,{ctor:"_Tuple2",_0:lt(o),_1:c},a),s=l._0,f=l._1;return d(L,r(function(e,r){var n=e;return d(t,n._0,n._1,r)}),f,s)}),_t=a(function(t,e,r,n){return K.crash(ct({ctor:"::",_0:"Internal red-black tree invariant violated, expected ",_1:{ctor:"::",_0:t,_1:{ctor:"::",_0:" and got ",_1:{ctor:"::",_0:x(e),_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:r,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:n,_1:{ctor:"::",_0:"\nPlease report this bug to <https://github.com/elm-lang/core/issues>",_1:{ctor:"[]"}}}}}}}}}}))}),dt=function(t){var e=t;t:do{if("RBNode_elm_builtin"===e.ctor){if("BBlack"===e._0.ctor)return!0;break t}if("LBBlack"===e._0.ctor)return!0;break t}while(!1);return!1},pt=r(function(t,e){for(;;){var r=e;if("RBEmpty_elm_builtin"===r.ctor)return t;var n=_(pt,t+1,r._4),o=r._3;t=n,e=o}}),ht=r(function(t,e){t:for(;;){var r=e;if("RBEmpty_elm_builtin"===r.ctor)return B;var n=_(T,t,r._1);switch(n.ctor){case"LT":var o=t,i=r._3;t=o,e=i;continue t;case"EQ":return N(r._2);default:var a=t,c=r._4;t=a,e=c;continue t}}}),vt=r(function(t,e){return"Just"===_(ht,t,e).ctor}),gt=i(function(t,e,r){for(;;){var n=r;if("RBEmpty_elm_builtin"===n.ctor)return{ctor:"_Tuple2",_0:t,_1:e};var o=n._1,i=n._2,a=n._4;t=o,e=i,r=a}}),mt={ctor:"NBlack"},bt={ctor:"BBlack"},yt={ctor:"Black"},kt=function(t){var e=t;if("RBNode_elm_builtin"===e.ctor){var r=e._0;return b.eq(r,yt)||b.eq(r,bt)}return!0},wt={ctor:"Red"},xt=function(t){switch(t.ctor){case"Black":return bt;case"Red":return yt;case"NBlack":return wt;default:return K.crash("Can't make a double black node more black!")}},Tt=function(t){switch(t.ctor){case"BBlack":return yt;case"Black":return wt;case"Red":return mt;default:return K.crash("Can't make a negative black node less black!")}},Bt={ctor:"LBBlack"},Nt={ctor:"LBlack"},Rt=function(t){return{ctor:"RBEmpty_elm_builtin",_0:t}},Et=Rt(Nt),St=c(function(t,e,r,n,o){return{ctor:"RBNode_elm_builtin",_0:t,_1:e,_2:r,_3:n,_4:o}}),Ct=function(t){var e=t;return"RBNode_elm_builtin"===e.ctor&&"Red"===e._0.ctor?h(St,yt,e._1,e._2,e._3,e._4):t},At=function(t){var e=t;return"RBNode_elm_builtin"===e.ctor?h(St,Tt(e._0),e._1,e._2,e._3,e._4):Rt(Nt)},Lt=function(t){return function(e){return function(r){return function(n){return function(o){return function(i){return function(a){return function(c){return function(u){return function(l){return function(s){return h(St,Tt(t),n,o,h(St,yt,e,r,c,u),h(St,yt,i,a,l,s))}}}}}}}}}}},Mt=function(t){var e=t;return"RBEmpty_elm_builtin"===e.ctor?Rt(Nt):h(St,yt,e._1,e._2,e._3,e._4)},Ot=function(t){var e=t;return"RBEmpty_elm_builtin"===e.ctor?K.crash("can't make a Leaf red"):h(St,wt,e._1,e._2,e._3,e._4)},Ut=function(t){var e=t;t:do{e:do{r:do{n:do{o:do{i:do{a:do{if("RBNode_elm_builtin"!==e.ctor)break t;if("RBNode_elm_builtin"===e._3.ctor)if("RBNode_elm_builtin"===e._4.ctor)switch(e._3._0.ctor){case"Red":switch(e._4._0.ctor){case"Red":if("RBNode_elm_builtin"===e._3._3.ctor&&"Red"===e._3._3._0.ctor)break a;if("RBNode_elm_builtin"===e._3._4.ctor&&"Red"===e._3._4._0.ctor)break i;if("RBNode_elm_builtin"===e._4._3.ctor&&"Red"===e._4._3._0.ctor)break o;if("RBNode_elm_builtin"===e._4._4.ctor&&"Red"===e._4._4._0.ctor)break n;break t;case"NBlack":if("RBNode_elm_builtin"===e._3._3.ctor&&"Red"===e._3._3._0.ctor)break a;if("RBNode_elm_builtin"===e._3._4.ctor&&"Red"===e._3._4._0.ctor)break i;if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._4._3.ctor&&"Black"===e._4._3._0.ctor&&"RBNode_elm_builtin"===e._4._4.ctor&&"Black"===e._4._4._0.ctor)break r;break t;default:if("RBNode_elm_builtin"===e._3._3.ctor&&"Red"===e._3._3._0.ctor)break a;if("RBNode_elm_builtin"===e._3._4.ctor&&"Red"===e._3._4._0.ctor)break i;break t}case"NBlack":switch(e._4._0.ctor){case"Red":if("RBNode_elm_builtin"===e._4._3.ctor&&"Red"===e._4._3._0.ctor)break o;if("RBNode_elm_builtin"===e._4._4.ctor&&"Red"===e._4._4._0.ctor)break n;if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._3._3.ctor&&"Black"===e._3._3._0.ctor&&"RBNode_elm_builtin"===e._3._4.ctor&&"Black"===e._3._4._0.ctor)break e;break t;case"NBlack":if("BBlack"===e._0.ctor){if("RBNode_elm_builtin"===e._4._3.ctor&&"Black"===e._4._3._0.ctor&&"RBNode_elm_builtin"===e._4._4.ctor&&"Black"===e._4._4._0.ctor)break r;if("RBNode_elm_builtin"===e._3._3.ctor&&"Black"===e._3._3._0.ctor&&"RBNode_elm_builtin"===e._3._4.ctor&&"Black"===e._3._4._0.ctor)break e;break t}break t;default:if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._3._3.ctor&&"Black"===e._3._3._0.ctor&&"RBNode_elm_builtin"===e._3._4.ctor&&"Black"===e._3._4._0.ctor)break e;break t}default:switch(e._4._0.ctor){case"Red":if("RBNode_elm_builtin"===e._4._3.ctor&&"Red"===e._4._3._0.ctor)break o;if("RBNode_elm_builtin"===e._4._4.ctor&&"Red"===e._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._4._3.ctor&&"Black"===e._4._3._0.ctor&&"RBNode_elm_builtin"===e._4._4.ctor&&"Black"===e._4._4._0.ctor)break r;break t;default:break t}}else switch(e._3._0.ctor){case"Red":if("RBNode_elm_builtin"===e._3._3.ctor&&"Red"===e._3._3._0.ctor)break a;if("RBNode_elm_builtin"===e._3._4.ctor&&"Red"===e._3._4._0.ctor)break i;break t;case"NBlack":if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._3._3.ctor&&"Black"===e._3._3._0.ctor&&"RBNode_elm_builtin"===e._3._4.ctor&&"Black"===e._3._4._0.ctor)break e;break t;default:break t}else{if("RBNode_elm_builtin"!==e._4.ctor)break t;switch(e._4._0.ctor){case"Red":if("RBNode_elm_builtin"===e._4._3.ctor&&"Red"===e._4._3._0.ctor)break o;if("RBNode_elm_builtin"===e._4._4.ctor&&"Red"===e._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===e._0.ctor&&"RBNode_elm_builtin"===e._4._3.ctor&&"Black"===e._4._3._0.ctor&&"RBNode_elm_builtin"===e._4._4.ctor&&"Black"===e._4._4._0.ctor)break r;break t;default:break t}}}while(!1);return Lt(e._0)(e._3._3._1)(e._3._3._2)(e._3._1)(e._3._2)(e._1)(e._2)(e._3._3._3)(e._3._3._4)(e._3._4)(e._4)}while(!1);return Lt(e._0)(e._3._1)(e._3._2)(e._3._4._1)(e._3._4._2)(e._1)(e._2)(e._3._3)(e._3._4._3)(e._3._4._4)(e._4)}while(!1);return Lt(e._0)(e._1)(e._2)(e._4._3._1)(e._4._3._2)(e._4._1)(e._4._2)(e._3)(e._4._3._3)(e._4._3._4)(e._4._4)}while(!1);return Lt(e._0)(e._1)(e._2)(e._4._1)(e._4._2)(e._4._4._1)(e._4._4._2)(e._3)(e._4._3)(e._4._4._3)(e._4._4._4)}while(!1);return h(St,yt,e._4._3._1,e._4._3._2,h(St,yt,e._1,e._2,e._3,e._4._3._3),h(It,yt,e._4._1,e._4._2,e._4._3._4,Ot(e._4._4)))}while(!1);return h(St,yt,e._3._4._1,e._3._4._2,h(It,yt,e._3._1,e._3._2,Ot(e._3._3),e._3._4._3),h(St,yt,e._1,e._2,e._3._4._4,e._4))}while(!1);return t},It=c(function(t,e,r,n,o){var i=h(St,t,e,r,n,o);return kt(i)?Ut(i):i}),zt=c(function(t,e,r,n,o){return dt(n)||dt(o)?h(It,xt(t),e,r,At(n),At(o)):h(St,t,e,r,n,o)}),Pt=c(function(t,e,r,n,o){var i=o;return"RBEmpty_elm_builtin"===i.ctor?d(jt,t,n,o):h(zt,t,e,r,n,h(Pt,i._0,i._1,i._2,i._3,i._4))}),jt=i(function(t,e,r){var n={ctor:"_Tuple2",_0:e,_1:r};if("RBEmpty_elm_builtin"!==n._0.ctor){if("RBEmpty_elm_builtin"===n._1.ctor){var o=n._1._0,i=n._0._0,a={ctor:"_Tuple3",_0:t,_1:i,_2:o};return"_Tuple3"===a.ctor&&"Black"===a._0.ctor&&"Red"===a._1.ctor&&"LBlack"===a._2.ctor?h(St,yt,n._0._1,n._0._2,n._0._3,n._0._4):p(_t,"Black/Red/LBlack",t,x(i),x(o))}var c=n._0._2,u=n._0._4,l=n._0._1,s=h(Pt,n._0._0,l,c,n._0._3,u),f=d(gt,l,c,u),_=f._0,v=f._1;return h(zt,t,_,v,s,r)}if("RBEmpty_elm_builtin"!==n._1.ctor){var g=n._1._0,m=n._0._0,b={ctor:"_Tuple3",_0:t,_1:m,_2:g};return"_Tuple3"===b.ctor&&"Black"===b._0.ctor&&"LBlack"===b._1.ctor&&"Red"===b._2.ctor?h(St,yt,n._1._1,n._1._2,n._1._3,n._1._4):p(_t,"Black/LBlack/Red",t,x(m),x(g))}switch(t.ctor){case"Red":return Rt(Nt);case"Black":return Rt(Bt);default:return K.crash("cannot have bblack or nblack nodes at this point")}}),Jt=r(function(t,e){var r=e;if("RBEmpty_elm_builtin"===r.ctor)return Rt(Nt);var n=r._1;return h(St,r._0,n,_(t,n,r._2),_(Jt,t,r._3),_(Jt,t,r._4))}),Dt={ctor:"Same"},Ft={ctor:"Remove"},Wt={ctor:"Insert"},qt=i(function(t,e,r){var n=function(r){var o=r;if("RBEmpty_elm_builtin"===o.ctor){var i=e(B);return"Nothing"===i.ctor?{ctor:"_Tuple2",_0:Dt,_1:Et}:{ctor:"_Tuple2",_0:Wt,_1:h(St,wt,t,i._0,Et,Et)}}var a=o._2,c=o._4,u=o._3,l=o._1,s=o._0;switch(_(T,t,l).ctor){case"EQ":var f=e(N(a));return"Nothing"===f.ctor?{ctor:"_Tuple2",_0:Ft,_1:d(jt,s,u,c)}:{ctor:"_Tuple2",_0:Dt,_1:h(St,s,l,f._0,u,c)};case"LT":var p=n(u),v=p._0,g=p._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:Dt,_1:h(St,s,l,a,g,c)};case"Insert":return{ctor:"_Tuple2",_0:Wt,_1:h(It,s,l,a,g,c)};default:return{ctor:"_Tuple2",_0:Ft,_1:h(zt,s,l,a,g,c)}}default:var m=n(c),v=m._0,b=m._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:Dt,_1:h(St,s,l,a,u,b)};case"Insert":return{ctor:"_Tuple2",_0:Wt,_1:h(It,s,l,a,u,b)};default:return{ctor:"_Tuple2",_0:Ft,_1:h(zt,s,l,a,u,b)}}}},o=n(r),i=o._0,a=o._1;switch(i.ctor){case"Same":return a;case"Insert":return Ct(a);default:return Mt(a)}}),Vt=i(function(t,e,r){return d(qt,t,y(N(e)),r)}),Ht=(r(function(t,e){return d(Vt,t,e,Et)}),r(function(t,e){return d(st,Vt,e,t)}),r(function(t,e){var r=i(function(e,r,n){return _(t,e,r)?d(Vt,e,r,n):n});return d(st,r,Et,e)})),Gt=(r(function(t,e){return _(Ht,r(function(t,r){return _(vt,t,e)}),t)}),r(function(t,e){var r=i(function(e,r,n){var o=n,i=o._1,a=o._0;return _(t,e,r)?{ctor:"_Tuple2",_0:d(Vt,e,r,a),_1:i}:{ctor:"_Tuple2",_0:a,_1:d(Vt,e,r,i)}});return d(st,r,{ctor:"_Tuple2",_0:Et,_1:Et},e)}),function(t){return d(L,r(function(t,e){var r=t;return d(Vt,r._0,r._1,e)}),Et,t)}),Qt=r(function(t,e){return d(qt,t,y(B),e)}),$t=(r(function(t,e){return d(st,i(function(t,e,r){return _(Qt,t,r)}),t,e)}),function(){function t(t){return{ctor:"<decoder>",tag:"succeed",msg:t}}function e(t){return{ctor:"<decoder>",tag:"fail",msg:t}}function n(t){return{ctor:"<decoder>",tag:t}}function o(t,e){return{ctor:"<decoder>",tag:t,decoder:e}}function _(t){return{ctor:"<decoder>",tag:"null",value:t}}function d(t,e){return{ctor:"<decoder>",tag:"field",field:t,decoder:e}}function p(t,e){return{ctor:"<decoder>",tag:"index",index:t,decoder:e}}function h(t){return{ctor:"<decoder>",tag:"key-value",decoder:t}}function v(t,e){return{ctor:"<decoder>",tag:"map-many",func:t,decoders:e}}function m(t,e){return{ctor:"<decoder>",tag:"andThen",decoder:e,callback:t}}function y(t){return{ctor:"<decoder>",tag:"oneOf",decoders:t}}function k(t,e){return v(t,[e])}function w(t,e,r){return v(t,[e,r])}function x(t,e,r,n){return v(t,[e,r,n])}function T(t,e,r,n,o){return v(t,[e,r,n,o])}function R(t,e,r,n,o,i){return v(t,[e,r,n,o,i])}function S(t,e,r,n,o,i,a){return v(t,[e,r,n,o,i,a])}function C(t,e,r,n,o,i,a,c){return v(t,[e,r,n,o,i,a,c])}function A(t,e,r,n,o,i,a,c,u){return v(t,[e,r,n,o,i,a,c,u])}function L(t){return{tag:"ok",value:t}}function M(t,e){return{tag:"primitive",type:t,value:e}}function O(t,e){return{tag:"index",index:t,rest:e}}function U(t,e){return{tag:"field",field:t,rest:e}}function O(t,e){return{tag:"index",index:t,rest:e}}function I(t){return{tag:"oneOf",problems:t}}function z(t){return{tag:"fail",msg:t}}function P(t){for(var e="_";t;)switch(t.tag){case"primitive":return"Expecting "+t.type+("_"===e?"":" at "+e)+" but instead got: "+j(t.value);case"index":e+="["+t.index+"]",t=t.rest;break;case"field":e+="."+t.field,t=t.rest;break;case"oneOf":for(var r=t.problems,n=0;n<r.length;n++)r[n]=P(r[n]);return"I ran into the following problems"+("_"===e?"":" at "+e)+":\n\n"+r.join("\n");case"fail":return"I ran into a `fail` decoder"+("_"===e?"":" at "+e)+": "+t.msg}}function j(t){return void 0===t?"undefined":JSON.stringify(t)}function J(t,e){var r;try{r=JSON.parse(e)}catch(t){return et("Given an invalid JSON: "+t.message)}return D(t,r)}function D(t,e){var r=F(t,e);return"ok"===r.tag?rt(r.value):et(P(r))}function F(t,e){switch(t.tag){case"bool":return"boolean"==typeof e?L(e):M("a Bool",e);case"int":return"number"!=typeof e?M("an Int",e):-2147483647<e&&e<2147483647&&(0|e)===e?L(e):!isFinite(e)||e%1?M("an Int",e):L(e);case"float":return"number"==typeof e?L(e):M("a Float",e);case"string":return"string"==typeof e?L(e):e instanceof String?L(e+""):M("a String",e);case"null":return null===e?L(t.value):M("null",e);case"value":return L(e);case"list":if(!(e instanceof Array))return M("a List",e);for(var r=E.Nil,n=e.length;n--;){var o=F(t.decoder,e[n]);if("ok"!==o.tag)return O(n,o);r=E.Cons(o.value,r)}return L(r);case"array":if(!(e instanceof Array))return M("an Array",e);for(var i=e.length,a=new Array(i),n=i;n--;){var o=F(t.decoder,e[n]);if("ok"!==o.tag)return O(n,o);a[n]=o.value}return L(g.fromJSArray(a));case"maybe":var o=F(t.decoder,e);return L("ok"===o.tag?N(o.value):B);case"field":var c=t.field;if("object"!=typeof e||null===e||!(c in e))return M("an object with a field named `"+c+"`",e);var o=F(t.decoder,e[c]);return"ok"===o.tag?o:U(c,o);case"index":var u=t.index;if(!(e instanceof Array))return M("an array",e);if(u>=e.length)return M("a longer array. Need index "+u+" but there are only "+e.length+" entries",e);var o=F(t.decoder,e[u]);return"ok"===o.tag?o:O(u,o);case"key-value":if("object"!=typeof e||null===e||e instanceof Array)return M("an object",e);var l=E.Nil;for(var s in e){var o=F(t.decoder,e[s]);if("ok"!==o.tag)return U(s,o);var f=b.Tuple2(s,o.value);l=E.Cons(f,l)}return L(l);case"map-many":for(var _=t.func,d=t.decoders,n=0;n<d.length;n++){var o=F(d[n],e);if("ok"!==o.tag)return o;_=_(o.value)}return L(_);case"andThen":var o=F(t.decoder,e);return"ok"!==o.tag?o:F(t.callback(o.value),e);case"oneOf":for(var p=[],h=t.decoders;"[]"!==h.ctor;){var o=F(h._0,e);if("ok"===o.tag)return o;p.push(o),h=h._1}return I(p);case"fail":return z(t.msg);case"succeed":return L(t.msg)}}function W(t,e){if(t===e)return!0;if(t.tag!==e.tag)return!1;switch(t.tag){case"succeed":case"fail":return t.msg===e.msg;case"bool":case"int":case"float":case"string":case"value":return!0;case"null":return t.value===e.value;case"list":case"array":case"maybe":case"key-value":return W(t.decoder,e.decoder);case"field":return t.field===e.field&&W(t.decoder,e.decoder);case"index":return t.index===e.index&&W(t.decoder,e.decoder);case"map-many":return t.func===e.func&&q(t.decoders,e.decoders);case"andThen":return t.callback===e.callback&&W(t.decoder,e.decoder);case"oneOf":return q(t.decoders,e.decoders)}}function q(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(!W(t[n],e[n]))return!1;return!0}function V(t,e){return JSON.stringify(e,null,t)}function H(t){return t}function G(t){for(var e={};"[]"!==t.ctor;){var r=t._0;e[r._0]=r._1,t=t._1}return e}return{encode:r(V),runOnString:r(J),run:r(D),decodeNull:_,decodePrimitive:n,decodeContainer:r(o),decodeField:r(d),decodeIndex:r(p),map1:r(k),map2:i(w),map3:a(x),map4:c(T),map5:u(R),map6:l(S),map7:s(C),map8:f(A),decodeKeyValuePairs:h,andThen:r(m),fail:e,succeed:t,oneOf:y,identity:H,encodeNull:null,encodeArray:g.toJSArray,encodeList:E.toArray,encodeObject:G,equality:W}}()),Kt=($t.encodeList,$t.encodeArray,$t.encodeObject,$t.encodeNull,$t.identity),Xt=($t.identity,$t.identity,$t.identity),Yt=$t.encode,Zt=$t.decodeNull,te=$t.decodePrimitive("value"),ee=$t.andThen,re=$t.fail,ne=$t.succeed,oe=$t.run,ie=$t.runOnString,ae=($t.map8,$t.map7,$t.map6,$t.map5,$t.map4,$t.map3,$t.map2),ce=$t.map1,ue=$t.oneOf,le=function(t){return _($t.decodeContainer,"maybe",t)},se=($t.decodeIndex,$t.decodeField),fe=r(function(t,e){return d(A,se,e,t)}),_e=($t.decodeKeyValuePairs,$t.decodePrimitive("float"),$t.decodePrimitive("int")),de=$t.decodePrimitive("bool"),pe=$t.decodePrimitive("string"),he=(K.crash,K.log,r(function(t,e){var r=e;return{ctor:"_Tuple2",_0:r._0,_1:t(r._1)}}),r(function(t,e){var r=e;return{ctor:"_Tuple2",_0:t(r._0),_1:r._1}}),function(){function t(t){return function(e){return function(e,r){e.worker=function(e){if(void 0!==e)throw new Error("The `"+r+"` module does not need flags.\nCall "+r+".worker() with no arguments and you should be all set!");return a(t.init,t.update,t.subscriptions,n)}}}}function e(t){return function(e){return function(r,o){r.worker=function(r){if(void 0===e)throw new Error("Are you trying to sneak a Never value into Elm? Trickster!\nIt looks like "+o+".main is defined with `programWithFlags` but has type `Program Never`.\nUse `program` instead if you do not want flags.");var i=_($t.run,e,r);if("Err"===i.ctor)throw new Error(o+".worker(...) was called with an unexpected argument.\nI tried to convert it to an Elm value, but ran into this problem:\n\n"+i._0);return a(t.init(i._0),t.update,t.subscriptions,n)}}}}function n(t,e){return function(t){}}function o(t){var e=v(E.Nil),n=b.Tuple2(b.Tuple0,e);return sr({init:n,view:function(t){return main},update:r(function(t,e){return n}),subscriptions:function(t){return e}})}function a(t,e,r,n){function o(t,n){return ve.nativeBinding(function(o){var i=_(e,t,n);n=i._0,a(n);var c=i._1,l=r(n);m(u,c,l),o(ve.succeed(n))})}function i(t){ve.rawSend(s,t)}var a,u={},l=ve.nativeBinding(function(e){var o=t._0;a=n(i,o);var c=t._1,l=r(o);m(u,c,l),e(ve.succeed(o))}),s=f(l,o),d=c(u,i);return d?{ports:d}:{}}function c(t,e){var r;for(var n in S){var o=S[n];o.isForeign&&(r=r||{},r[n]="cmd"===o.tag?B(n):R(n,e)),t[n]=u(o,e)}return r}function u(t,e){function r(t,e){if("self"===t.ctor)return d(a,n,t._0,e);var r=t._0;switch(o){case"cmd":return d(i,n,r.cmds,e);case"sub":return d(i,n,r.subs,e);case"fx":return p(i,n,r.cmds,r.subs,e)}}var n={main:e,self:void 0},o=t.tag,i=t.onEffects,a=t.onSelfMsg,c=f(t.init,r);return n.self=c,c}function l(t,e){return ve.nativeBinding(function(r){t.main(e),r(ve.succeed(b.Tuple0))})}function s(t,e){return _(ve.send,t.self,{ctor:"self",_0:e})}function f(t,e){function r(t){var o=ve.receive(function(r){return e(r,t)});return _(n,r,o)}var n=ve.andThen,o=_(n,r,t);return ve.rawSpawn(o)}function h(t){return function(e){return{type:"leaf",home:t,value:e}}}function v(t){return{type:"node",branches:t}}function g(t,e){return{type:"map",tagger:t,tree:e}}function m(t,e,r){var n={};y(!0,e,n,null),y(!1,r,n,null);for(var o in t){var i=o in n?n[o]:{cmds:E.Nil,subs:E.Nil};ve.rawSend(t[o],{ctor:"fx",_0:i})}}function y(t,e,r,n){switch(e.type){case"leaf":var o=e.home,i=k(t,o,n,e.value);return void(r[o]=w(t,i,r[o]));case"node":for(var a=e.branches;"[]"!==a.ctor;)y(t,a._0,r,n),a=a._1;return;case"map":return void y(t,e.tree,r,{tagger:e.tagger,rest:n})}}function k(t,e,r,n){function o(t){for(var e=r;e;)t=e.tagger(t),e=e.rest;return t}return _(t?S[e].cmdMap:S[e].subMap,o,n)}function w(t,e,r){return r=r||{cmds:E.Nil,subs:E.Nil},t?(r.cmds=E.Cons(e,r.cmds),r):(r.subs=E.Cons(e,r.subs),r)}function x(t){if(t in S)throw new Error("There can only be one port named `"+t+"`, but your program has multiple.")}function T(t,e){return x(t),S[t]={tag:"cmd",cmdMap:C,converter:e,isForeign:!0},h(t)}function B(t){function e(t,e,r){for(;"[]"!==e.ctor;){for(var n=o,i=a(e._0),u=0;u<n.length;u++)n[u](i);e=e._1}return c}function r(t){o.push(t)}function n(t){o=o.slice();var e=o.indexOf(t);e>=0&&o.splice(e,1)}var o=[],a=S[t].converter,c=ve.succeed(null);return S[t].init=c,S[t].onEffects=i(e),{subscribe:r,unsubscribe:n}}function N(t,e){return x(t),S[t]={tag:"sub",subMap:A,converter:e,isForeign:!0},h(t)}function R(t,e){function r(t,e,r){for(var o=n(t,e,r),i=0;i<l.length;i++)c(l[i]);return l=null,p=c,d=n,o}function n(t,e,r){return s=e,h}function o(t,e,r){return d(t,e,r)}function a(t){l.push(t)}function c(t){for(var r=s;"[]"!==r.ctor;)e(r._0(t)),r=r._1}function u(e){var r=_(oe,f,e);if("Err"===r.ctor)throw new Error("Trying to send an unexpected type of value through port `"+t+"`:\n"+r._0);p(r._0)}var l=[],s=E.Nil,f=S[t].converter,d=r,p=a,h=ve.succeed(null);return S[t].init=h,S[t].onEffects=i(o),{send:u}}var S={},C=r(function(t,e){return e}),A=r(function(t,e){return function(r){return t(e(r))}});return{sendToApp:r(l),sendToSelf:r(s),effectManagers:S,outgoingPort:T,incomingPort:N,htmlToProgram:o,program:t,programWithFlags:e,initialize:a,leaf:h,batch:v,map:r(g)}}()),ve=function(){function t(t){return{ctor:"_Task_succeed",value:t}}function e(t){return{ctor:"_Task_fail",value:t}}function n(t){return{ctor:"_Task_nativeBinding",callback:t,cancel:null}}function o(t,e){return{ctor:"_Task_andThen",callback:t,task:e}}function i(t,e){return{ctor:"_Task_onError",callback:t,task:e}}function a(t){return{ctor:"_Task_receive",callback:t}}function c(t){var e={ctor:"_Process",id:b.guid(),root:t,stack:null,mailbox:[]};return p(e),e}function u(e){return n(function(r){r(t(c(e)))})}function l(t,e){t.mailbox.push(e),p(t)}function s(e,r){return n(function(n){l(e,r),n(t(b.Tuple0))})}function f(e){return n(function(r){var n=e.root;"_Task_nativeBinding"===n.ctor&&n.cancel&&n.cancel(),e.root=null,r(t(b.Tuple0))})}function _(e){return n(function(r){var n=setTimeout(function(){r(t(b.Tuple0))},e);return function(){clearTimeout(n)}})}function d(t,e){for(;t<v;){var r=e.root.ctor;if("_Task_succeed"!==r)if("_Task_fail"!==r)if("_Task_andThen"!==r)if("_Task_onError"!==r){if("_Task_nativeBinding"===r){e.root.cancel=e.root.callback(function(t){e.root=t,p(e)});break}if("_Task_receive"!==r)throw new Error(r);var n=e.mailbox;if(0===n.length)break;e.root=e.root.callback(n.shift()),++t}else e.stack={ctor:"_Task_onError",callback:e.root.callback,rest:e.stack},e.root=e.root.task,++t;else e.stack={ctor:"_Task_andThen",callback:e.root.callback,rest:e.stack},e.root=e.root.task,++t;else{for(;e.stack&&"_Task_andThen"===e.stack.ctor;)e.stack=e.stack.rest;if(null===e.stack)break;e.root=e.stack.callback(e.root.value),e.stack=e.stack.rest,++t}else{for(;e.stack&&"_Task_onError"===e.stack.ctor;)e.stack=e.stack.rest;if(null===e.stack)break;e.root=e.stack.callback(e.root.value),e.stack=e.stack.rest,++t}}return t<v?t+1:(p(e),t)}function p(t){m.push(t),g||(setTimeout(h,0),g=!0)}function h(){for(var t,e=0;e<v&&(t=m.shift());)t.root&&(e=d(e,t));if(!t)return void(g=!1);setTimeout(h,0)}var v=1e4,g=!1,m=[];return{succeed:t,fail:e,nativeBinding:n,andThen:r(o),onError:r(i),receive:a,spawn:u,kill:f,sleep:_,send:r(s),rawSpawn:c,rawSend:l}}(),ge=he.batch,me=ge({ctor:"[]"}),be=be||{};be["!"]=r(function(t,e){return{ctor:"_Tuple2",_0:t,_1:ge(e)}});var ye=(he.map,he.batch),ke=ye({ctor:"[]"}),we=(he.map,ve.succeed,he.sendToSelf),xe=he.sendToApp,Te=(he.programWithFlags,he.program,ne),Be=(ee(k),ae(r(function(t,e){return e(t)}))),Ne=i(function(t,e,r){var n=function(t){return ue({ctor:"::",_0:t,_1:{ctor:"::",_0:Zt(r),_1:{ctor:"[]"}}})};return _(ee,function(o){var i=_(oe,t,o);if("Ok"===i.ctor){var a=_(oe,n(e),i._0);return"Ok"===a.ctor?ne(a._0):re(a._0)}return ne(r)},te)}),Re=(a(function(t,e,r,n){return _(Be,d(Ne,_(fe,t,te),e,r),n)}),a(function(t,e,r,n){return _(Be,d(Ne,_(se,t,te),e,r),n)})),Ee=i(function(t,e,r){return _(Be,_(fe,t,e),r)}),Se=i(function(t,e,r){return _(Be,_(se,t,e),r)}),Ce=ve.onError,Ae=ve.andThen,Le=r(function(t,e){var r=e;return ve.spawn(_(Ae,xe(t),r._0))}),Me=ve.fail,Oe=(r(function(t,e){return _(Ce,function(e){return Me(t(e))},e)}),ve.succeed),Ue=r(function(t,e){return _(Ae,function(e){return Oe(t(e))},e)}),Ie=i(function(t,e,r){return _(Ae,function(e){return _(Ae,function(r){return Oe(_(t,e,r))},r)},e)}),ze=(a(function(t,e,r,n){return _(Ae,function(e){return _(Ae,function(r){return _(Ae,function(n){return Oe(d(t,e,r,n))},n)},r)},e)}),c(function(t,e,r,n,o){return _(Ae,function(e){return _(Ae,function(r){return _(Ae,function(n){return _(Ae,function(o){return Oe(p(t,e,r,n,o))},o)},n)},r)},e)}),u(function(t,e,r,n,o,i){return _(Ae,function(e){return _(Ae,function(r){return _(Ae,function(n){return _(Ae,function(o){return _(Ae,function(i){return Oe(h(t,e,r,n,o,i))},i)},o)},n)},r)},e)}),function(t){var e=t;return"[]"===e.ctor?Oe({ctor:"[]"}):d(Ie,r(function(t,e){return{ctor:"::",_0:t,_1:e}}),e._0,ze(e._1))}),Pe=i(function(t,e,r){return _(Ue,function(t){return{ctor:"_Tuple0"}},ze(_(U,Le(t),e)))}),je=Oe({ctor:"_Tuple0"}),Je=i(function(t,e,r){return Oe({ctor:"_Tuple0"})}),De=he.leaf("Task"),Fe=function(t){return{ctor:"Perform",_0:t}},We=(r(function(t,e){return De(Fe(_(Ue,t,e)))}),r(function(t,e){return De(Fe(_(Ce,function(e){return Oe(t(et(e)))},_(Ae,function(e){return Oe(t(rt(e)))},e))))})),qe=r(function(t,e){return Fe(_(Ue,t,e._0))});he.effectManagers.Task={pkg:"elm-lang/core",init:je,onEffects:Pe,onSelfMsg:Je,tag:"cmd",cmdMap:qe};var Ve=function(){function t(t,e){return ve.nativeBinding(function(r){var n=setInterval(function(){ve.rawSpawn(e)},t);return function(){clearInterval(n)}})}return{now:ve.nativeBinding(function(t){t(ve.succeed(Date.now()))}),setInterval_:r(t)}}(),He=Ve.setInterval_,Ge=i(function(t,e,r){var n=e;if("[]"===n.ctor)return Oe(r);var o=n._0,i=function(e){return d(Ge,t,n._1,d(Vt,o,e,r))},a=ve.spawn(_(He,o,_(we,t,o)));return _(Ae,i,a)}),Qe=r(function(t,e){var r=t,n=r._1,o=r._0,i=_(ht,o,e);return"Nothing"===i.ctor?d(Vt,o,{ctor:"::",_0:n,_1:{ctor:"[]"}},e):d(Vt,o,{ctor:"::",_0:n,_1:i._0},e)}),$e=Ve.now,Ke=i(function(t,e,r){var n=_(ht,e,r.taggers);if("Nothing"===n.ctor)return Oe(r);var o=function(e){return ze(_(U,function(r){return _(xe,t,r(e))},n._0))};return _(Ae,function(t){return Oe(r)},_(Ae,o,$e))}),Xe=he.leaf("Time"),Ye=r(function(t,e){return{taggers:t,processes:e}}),Ze=Oe(_(Ye,Et,Et)),tr=i(function(t,e,r){var n=r,o=i(function(t,e,r){var n=r;return{ctor:"_Tuple3",_0:n._0,_1:n._1,_2:_(Ae,function(t){return n._2},ve.kill(e))}}),c=a(function(t,e,r,n){var o=n;return{ctor:"_Tuple3",_0:o._0,_1:d(Vt,t,r,o._1),_2:o._2}}),u=i(function(t,e,r){var n=r;return{ctor:"_Tuple3",_0:{ctor:"::",_0:t,_1:n._0},_1:n._1,_2:n._2}}),l=d(L,Qe,Et,e),s=v(ft,u,c,o,l,n.processes,{ctor:"_Tuple3",_0:{ctor:"[]"},_1:Et,_2:Oe({ctor:"_Tuple0"})}),f=s._0,p=s._1,h=s._2;return _(Ae,function(t){return Oe(_(Ye,l,t))},_(Ae,function(e){return d(Ge,t,f,p)},h))}),er=r(function(t,e){return{ctor:"Every",_0:t,_1:e}}),rr=(r(function(t,e){return Xe(_(er,t,e))}),r(function(t,e){var r=e;return _(er,r._0,function(e){return t(r._1(e))})}));he.effectManagers.Time={pkg:"elm-lang/core",init:Ze,onEffects:tr,onSelfMsg:Ke,tag:"sub",subMap:rr};var nr,or=ve.kill,ir=(ve.sleep,ve.spawn),ar=function(){function t(t){return function(e,r,n){return ve.nativeBinding(function(o){function i(t){var e=_(oe,r,t);"Ok"===e.ctor&&ve.rawSpawn(n(e._0))}return t.addEventListener(e,i),function(){t.removeEventListener(e,i)}})}}function e(t,e){return ve.nativeBinding(function(r){m(function(){var n=document.getElementById(t);if(null===n)return void r(ve.fail({ctor:"NotFound",_0:t}));r(ve.succeed(e(n)))})})}function n(t){return e(t,function(t){return t.focus(),b.Tuple0})}function o(t){return e(t,function(t){return t.blur(),b.Tuple0})}function a(t){return e(t,function(t){return t.scrollTop})}function c(t,r){return e(t,function(t){return t.scrollTop=r,b.Tuple0})}function u(t){return e(t,function(t){return t.scrollTop=t.scrollHeight,b.Tuple0})}function l(t){return e(t,function(t){return t.scrollLeft})}function s(t,r){return e(t,function(t){return t.scrollLeft=r,b.Tuple0})}function f(t){return e(t,function(t){return t.scrollLeft=t.scrollWidth,b.Tuple0})}function d(t,r){return e(r,function(e){switch(t.ctor){case"Content":return e.scrollWidth;case"VisibleContent":return e.clientWidth;case"VisibleContentWithBorders":return e.offsetWidth;case"VisibleContentWithBordersAndMargins":var r=e.getBoundingClientRect();return r.right-r.left}})}function p(t,r){return e(r,function(e){switch(t.ctor){case"Content":return e.scrollHeight;case"VisibleContent":return e.clientHeight;case"VisibleContentWithBorders":return e.offsetHeight;case"VisibleContentWithBordersAndMargins":var r=e.getBoundingClientRect();return r.bottom-r.top}})}var h={addEventListener:function(){},removeEventListener:function(){}},v=t("undefined"!=typeof document?document:h),g=t("undefined"!=typeof window?window:h),m="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:function(t){t()};return{onDocument:i(v),onWindow:i(g),focus:n,blur:o,getScrollTop:a,setScrollTop:r(c),getScrollLeft:l,setScrollLeft:r(s),toBottom:u,toRight:f,height:r(p),width:r(d)}}(),cr=ar.onWindow,ur=(ar.onDocument,function(){function t(t){return{type:"text",text:t}}function e(t){return r(function(e,r){return n(t,e,r)})}function n(t,e,r){for(var n=h(e),o=n.namespace,i=n.facts,a=[],c=0;"[]"!==r.ctor;){var u=r._0;c+=u.descendantsCount||0,a.push(u),r=r._1}return c+=a.length,{type:"node",tag:t,facts:i,children:a,namespace:o,descendantsCount:c}}function o(t,e,r){for(var n=h(e),o=n.namespace,i=n.facts,a=[],c=0;"[]"!==r.ctor;){var u=r._0;c+=u._1.descendantsCount||0,a.push(u),r=r._1}return c+=a.length,{type:"keyed-node",tag:t,facts:i,children:a,namespace:o,descendantsCount:c}}function c(t,e,r){return{type:"custom",facts:h(t).facts,model:e,impl:r}}function u(t,e){return{type:"tagger",tagger:t,node:e,descendantsCount:1+(e.descendantsCount||0)}}function l(t,e,r){return{type:"thunk",func:t,args:e,thunk:r,node:void 0}}function s(t,e){return l(t,[e],function(){return t(e)})}function f(t,e,r){return l(t,[e,r],function(){return _(t,e,r)})}function p(t,e,r,n){return l(t,[e,r,n],function(){return d(t,e,r,n)})}function h(t){for(var e,r={};"[]"!==t.ctor;){var n=t._0,o=n.key;if(o===dt||o===pt||o===_t){var i=r[o]||{};i[n.realKey]=n.value,r[o]=i}else if(o===ft){for(var a=r[o]||{},c=n.value;"[]"!==c.ctor;){var u=c._0;a[u._0]=u._1,c=c._1}r[o]=a}else if("namespace"===o)e=n.value;else if("className"===o){var l=r[o];r[o]=void 0===l?n.value:l+" "+n.value}else r[o]=n.value;t=t._1}return{facts:r,namespace:e}}function v(t){return{key:ft,value:t}}function g(t,e){return{key:t,value:e}}function m(t,e){return{key:dt,realKey:t,value:e}}function y(t,e,r){return{key:pt,realKey:e,value:{value:r,namespace:t}}}function k(t,e,r){return{key:_t,realKey:t,value:{options:e,decoder:r}}}function w(t,e){return(t.options===e.options||t.options.stopPropagation===e.options.stopPropagation&&t.options.preventDefault===e.options.preventDefault)&&$t.equality(t.decoder,e.decoder)}function x(t,e){return e.key!==_t?e:k(e.realKey,e.value.options,_(ce,t,e.value.decoder))}function T(t,e){switch(t.type){case"thunk":return t.node||(t.node=t.thunk()),T(t.node,e);case"tagger":for(var r=t.node,n=t.tagger;"tagger"===r.type;)"object"!=typeof n?n=[n,r.tagger]:n.push(r.tagger),r=r.node;var o={tagger:n,parent:e},i=T(r,o);return i.elm_event_node_ref=o,i;case"text":return ht.createTextNode(t.text);case"node":var i=t.namespace?ht.createElementNS(t.namespace,t.tag):ht.createElement(t.tag);B(i,e,t.facts);for(var a=t.children,c=0;c<a.length;c++)i.appendChild(T(a[c],e));return i;case"keyed-node":var i=t.namespace?ht.createElementNS(t.namespace,t.tag):ht.createElement(t.tag);B(i,e,t.facts);for(var a=t.children,c=0;c<a.length;c++)i.appendChild(T(a[c]._1,e));return i;case"custom":var i=t.impl.render(t.model);return B(i,e,t.facts),i}}function B(t,e,r){for(var n in r){var o=r[n];switch(n){case ft:N(t,o);break;case _t:R(t,e,o);break;case dt:S(t,o);break;case pt:C(t,o);break;case"value":t[n]!==o&&(t[n]=o);break;default:t[n]=o}}}function N(t,e){var r=t.style;for(var n in e)r[n]=e[n]}function R(t,e,r){var n=t.elm_handlers||{};for(var o in r){var i=n[o],a=r[o];if(void 0===a)t.removeEventListener(o,i),n[o]=void 0;else if(void 0===i){var i=E(e,a);t.addEventListener(o,i),n[o]=i}else i.info=a}t.elm_handlers=n}function E(t,e){function r(e){var n=r.info,o=_($t.run,n.decoder,e);if("Ok"===o.ctor){var i=n.options;i.stopPropagation&&e.stopPropagation(),i.preventDefault&&e.preventDefault();for(var a=o._0,c=t;c;){var u=c.tagger;if("function"==typeof u)a=u(a);else for(var l=u.length;l--;)a=u[l](a);c=c.parent}}}return r.info=e,r}function S(t,e){for(var r in e){var n=e[r];void 0===n?t.removeAttribute(r):t.setAttribute(r,n)}}function C(t,e){for(var r in e){var n=e[r],o=n.namespace,i=n.value;void 0===i?t.removeAttributeNS(o,r):t.setAttributeNS(o,r,i)}}function A(t,e){var r=[];return M(t,e,r,0),r}function L(t,e,r){return{index:e,type:t,data:r,domNode:void 0,eventNode:void 0}}function M(t,e,r,n){if(t!==e){var o=t.type,i=e.type;if(o!==i)return void r.push(L("p-redraw",n,e));switch(i){case"thunk":for(var a=t.args,c=e.args,u=a.length,l=t.func===e.func&&u===c.length;l&&u--;)l=a[u]===c[u];if(l)return void(e.node=t.node);e.node=e.thunk();var s=[];return M(t.node,e.node,s,0),void(s.length>0&&r.push(L("p-thunk",n,s)));case"tagger":for(var f=t.tagger,_=e.tagger,d=!1,p=t.node;"tagger"===p.type;)d=!0,"object"!=typeof f?f=[f,p.tagger]:f.push(p.tagger),p=p.node;for(var h=e.node;"tagger"===h.type;)d=!0,"object"!=typeof _?_=[_,h.tagger]:_.push(h.tagger),h=h.node;return d&&f.length!==_.length?void r.push(L("p-redraw",n,e)):((d?O(f,_):f===_)||r.push(L("p-tagger",n,_)),void M(p,h,r,n+1));case"text":if(t.text!==e.text)return void r.push(L("p-text",n,e.text));return;case"node":if(t.tag!==e.tag||t.namespace!==e.namespace)return void r.push(L("p-redraw",n,e));var v=U(t.facts,e.facts);return void 0!==v&&r.push(L("p-facts",n,v)),void I(t,e,r,n);case"keyed-node":if(t.tag!==e.tag||t.namespace!==e.namespace)return void r.push(L("p-redraw",n,e));var v=U(t.facts,e.facts);return void 0!==v&&r.push(L("p-facts",n,v)),void z(t,e,r,n);case"custom":if(t.impl!==e.impl)return void r.push(L("p-redraw",n,e));var v=U(t.facts,e.facts);void 0!==v&&r.push(L("p-facts",n,v));var g=e.impl.diff(t,e);if(g)return void r.push(L("p-custom",n,g));return}}}function O(t,e){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function U(t,e,r){var n;for(var o in t)if(o!==ft&&o!==_t&&o!==dt&&o!==pt)if(o in e){var i=t[o],a=e[o];i===a&&"value"!==o||r===_t&&w(i,a)||(n=n||{},n[o]=a)}else n=n||{},n[o]=void 0===r?"string"==typeof t[o]?"":null:r===ft?"":r===_t||r===dt?void 0:{namespace:t[o].namespace,value:void 0};else{var c=U(t[o],e[o]||{},o);c&&(n=n||{},n[o]=c)}for(var u in e)u in t||(n=n||{},n[u]=e[u]);return n}function I(t,e,r,n){var o=t.children,i=e.children,a=o.length,c=i.length;a>c?r.push(L("p-remove-last",n,a-c)):a<c&&r.push(L("p-append",n,i.slice(a)));for(var u=n,l=a<c?a:c,s=0;s<l;s++){u++;var f=o[s];M(f,i[s],r,u),u+=f.descendantsCount||0}}function z(t,e,r,n){for(var o=[],i={},a=[],c=t.children,u=e.children,l=c.length,s=u.length,f=0,_=0,d=n;f<l&&_<s;){var p=c[f],h=u[_],v=p._0,g=h._0,m=p._1,b=h._1;if(v!==g){var y=f+1<l,k=_+1<s;if(y)var w=c[f+1],x=w._0,T=w._1,B=g===x;if(k)var N=u[_+1],R=N._0,E=N._1,S=v===R;if(y&&k&&S&&B)d++,M(m,E,o,d),P(i,o,v,b,_,a),d+=m.descendantsCount||0,d++,j(i,o,v,T,d),d+=T.descendantsCount||0,f+=2,_+=2;else if(k&&S)d++,P(i,o,g,b,_,a),M(m,E,o,d),d+=m.descendantsCount||0,f+=1,_+=2;else if(y&&B)d++,j(i,o,v,m,d),d+=m.descendantsCount||0,d++,M(T,b,o,d),d+=T.descendantsCount||0,f+=2,_+=1;else{if(!y||!k||x!==R)break;d++,j(i,o,v,m,d),P(i,o,g,b,_,a),d+=m.descendantsCount||0,d++,M(T,E,o,d),d+=T.descendantsCount||0,f+=2,_+=2}}else d++,M(m,b,o,d),d+=m.descendantsCount||0,f++,_++}for(;f<l;){d++;var p=c[f],m=p._1;j(i,o,p._0,m,d),d+=m.descendantsCount||0,f++}for(var C;_<s;){C=C||[];var h=u[_];P(i,o,h._0,h._1,void 0,C),_++}(o.length>0||a.length>0||void 0!==C)&&r.push(L("p-reorder",n,{patches:o,inserts:a,endInserts:C}))}function P(t,e,r,n,o,i){var a=t[r];if(void 0===a)return a={tag:"insert",vnode:n,index:o,data:void 0},i.push({index:o,entry:a}),void(t[r]=a);if("remove"===a.tag){i.push({index:o,entry:a}),a.tag="move";var c=[];return M(a.vnode,n,c,a.index),a.index=o,void(a.data.data={patches:c,entry:a})}P(t,e,r+vt,n,o,i)}function j(t,e,r,n,o){var i=t[r];if(void 0===i){var a=L("p-remove",o,void 0);return e.push(a),void(t[r]={tag:"remove",vnode:n,index:o,data:a})}if("insert"===i.tag){i.tag="move";var c=[];M(n,i.vnode,c,o);var a=L("p-remove",o,{patches:c,entry:i});return void e.push(a)}j(t,e,r+vt,n,o)}function J(t,e,r,n){D(t,e,r,0,0,e.descendantsCount,n)}function D(t,e,r,n,o,i,a){for(var c=r[n],u=c.index;u===o;){var l=c.type;if("p-thunk"===l)J(t,e.node,c.data,a);else if("p-reorder"===l){c.domNode=t,c.eventNode=a;var s=c.data.patches;s.length>0&&D(t,e,s,0,o,i,a)}else if("p-remove"===l){c.domNode=t,c.eventNode=a;var f=c.data;if(void 0!==f){f.entry.data=t;var s=f.patches;s.length>0&&D(t,e,s,0,o,i,a)}}else c.domNode=t,c.eventNode=a;if(n++,!(c=r[n])||(u=c.index)>i)return n}switch(e.type){case"tagger":for(var _=e.node;"tagger"===_.type;)_=_.node;return D(t,_,r,n,o+1,i,t.elm_event_node_ref);case"node":for(var d=e.children,p=t.childNodes,h=0;h<d.length;h++){o++;var v=d[h],g=o+(v.descendantsCount||0);if(o<=u&&u<=g&&(n=D(p[h],v,r,n,o,g,a),!(c=r[n])||(u=c.index)>i))return n;o=g}return n;case"keyed-node":for(var d=e.children,p=t.childNodes,h=0;h<d.length;h++){o++;var v=d[h]._1,g=o+(v.descendantsCount||0);if(o<=u&&u<=g&&(n=D(p[h],v,r,n,o,g,a),!(c=r[n])||(u=c.index)>i))return n;o=g}return n;case"text":case"thunk":throw new Error("should never traverse `text` or `thunk` nodes like this")}}function F(t,e,r,n){return 0===r.length?t:(J(t,e,r,n),W(t,r))}function W(t,e){for(var r=0;r<e.length;r++){var n=e[r],o=n.domNode,i=q(o,n);o===t&&(t=i)}return t}function q(t,e){switch(e.type){case"p-redraw":return V(t,e.data,e.eventNode);case"p-facts":return B(t,e.eventNode,e.data),t;case"p-text":return t.replaceData(0,t.length,e.data),t;case"p-thunk":return W(t,e.data);case"p-tagger":return void 0!==t.elm_event_node_ref?t.elm_event_node_ref.tagger=e.data:t.elm_event_node_ref={tagger:e.data,parent:e.eventNode},t;case"p-remove-last":for(var r=e.data;r--;)t.removeChild(t.lastChild);return t;case"p-append":for(var n=e.data,r=0;r<n.length;r++)t.appendChild(T(n[r],e.eventNode));return t;case"p-remove":var o=e.data;if(void 0===o)return t.parentNode.removeChild(t),t;var i=o.entry;return void 0!==i.index&&t.parentNode.removeChild(t),i.data=W(t,o.patches),t;case"p-reorder":return H(t,e);case"p-custom":var a=e.data;return a.applyPatch(t,a.data);default:throw new Error("Ran into an unknown patch!")}}function V(t,e,r){var n=t.parentNode,o=T(e,r);return void 0===o.elm_event_node_ref&&(o.elm_event_node_ref=t.elm_event_node_ref),n&&o!==t&&n.replaceChild(o,t),o}function H(t,e){var r=e.data,n=G(r.endInserts,e);t=W(t,r.patches);for(var o=r.inserts,i=0;i<o.length;i++){var a=o[i],c=a.entry,u="move"===c.tag?c.data:T(c.vnode,e.eventNode);t.insertBefore(u,t.childNodes[a.index])}return void 0!==n&&t.appendChild(n),t}function G(t,e){if(void 0!==t){for(var r=ht.createDocumentFragment(),n=0;n<t.length;n++){var o=t[n],i=o.entry;r.appendChild("move"===i.tag?i.data:T(i.vnode,e.eventNode))}return r}}function Q(t){return r(function(e,r){return function(n){return function(o,i,a){var c=t(n,i);void 0===a?Z(r,o,i,c):rt(_(e,a,r),o,i,c)}}})}function $(t){var e=b.Tuple2(b.Tuple0,me);return _(gt,nr,{init:e,view:function(){return t},update:r(function(){return e}),subscriptions:function(){return ke}})()}function K(t,e){return function(t,r,n){if(void 0===r)return t;Y("The `"+e+"` module does not need flags.\nInitialize it with no arguments and you should be all set!",n)}}function X(t,e){return function(r,n,o){if(void 0===t){var i="Are you trying to sneak a Never value into Elm? Trickster!\nIt looks like "+e+".main is defined with `programWithFlags` but has type `Program Never`.\nUse `program` instead if you do not want flags.";Y(i,o)}var a=_($t.run,t,n);if("Ok"===a.ctor)return r(a._0);var i="Trying to initialize the `"+e+"` module with an unexpected flag.\nI tried to convert it to an Elm value, but ran into this problem:\n\n"+a._0;Y(i,o)}}function Y(t,e){throw e&&(e.innerHTML='<div style="padding-left:1em;"><h2 style="font-weight:normal;"><b>Oops!</b> Something went wrong when starting your Elm program.</h2><pre style="padding-left:1em;">'+t+"</pre></div>"),new Error(t)}function Z(t,e,r,n){e.embed=function(e,r){for(;e.lastChild;)e.removeChild(e.lastChild);return he.initialize(n(t.init,r,e),t.update,t.subscriptions,tt(e,t.view))},e.fullscreen=function(e){return he.initialize(n(t.init,e,document.body),t.update,t.subscriptions,tt(document.body,t.view))}}function tt(t,e){return function(r,n){var o={tagger:r,parent:void 0},i=e(n),a=T(i,o);return t.appendChild(a),et(a,e,i,o)}}function et(t,e,r,n){function o(){switch(a){case"NO_REQUEST":throw new Error("Unexpected draw callback.\nPlease report this to <https://github.com/elm-lang/virtual-dom/issues>.");case"PENDING_REQUEST":bt(o),a="EXTRA_REQUEST";var r=e(i),u=A(c,r);return t=F(t,c,u,n),void(c=r);case"EXTRA_REQUEST":return void(a="NO_REQUEST")}}var i,a="NO_REQUEST",c=r;return function(t){"NO_REQUEST"===a&&bt(o),a="PENDING_REQUEST",i=t}}function rt(t,e,r,n){e.fullscreen=function(e){var o={doc:void 0};return he.initialize(n(t.init,e,document.body),t.update(nt(o)),t.subscriptions,ot(r,document.body,o,t.view,t.viewIn,t.viewOut))},e.embed=function(e,o){var i={doc:void 0};return he.initialize(n(t.init,o,e),t.update(nt(i)),t.subscriptions,ot(r,e,i,t.view,t.viewIn,t.viewOut))}}function nt(t){return ve.nativeBinding(function(e){var r=t.doc;if(r){var n=r.getElementsByClassName("debugger-sidebar-messages")[0];n&&(n.scrollTop=n.scrollHeight)}e(ve.succeed(b.Tuple0))})}function ot(t,e,r,n,o,i){return function(a,c){var u={tagger:a,parent:void 0},l={tagger:a,parent:void 0},s=n(c),f=T(s,u);e.appendChild(f);var _=et(f,n,s,u),d=o(c)._1,p=T(d,l);e.appendChild(p);var h=ct(u,p,o),v=et(p,h,d,l),g=it(c,i,l,e,t,r);return function(t){_(t),v(t),g(t)}}}function it(t,e,r,n,o,i){var a,c;return function(t){if(t.isDebuggerOpen){if(!i.doc)return a=e(t),void(c=at(o,i,a,r));ht=i.doc;var n=e(t),u=A(a,n);c=F(c,a,u,r),a=n,ht=document}}}function at(t,e,r,n){function o(){e.doc=void 0,c.close()}var i=screen.width-900,a=screen.height-360,c=window.open("","","width=900,height=360,left="+i+",top="+a);ht=c.document,e.doc=ht,ht.title="Debugger - "+t,ht.body.style.margin="0",ht.body.style.padding="0";var u=T(r,n);return ht.body.appendChild(u),ht.addEventListener("keydown",function(t){t.metaKey&&82===t.which&&window.location.reload(),38===t.which&&(n.tagger({ctor:"Up"}),t.preventDefault()),40===t.which&&(n.tagger({ctor:"Down"}),t.preventDefault())}),window.addEventListener("unload",o),c.addEventListener("unload",function(){e.doc=void 0,window.removeEventListener("unload",o),n.tagger({ctor:"Close"})}),ht=document,u}function ct(t,e,r){var n,o=st(e),i="Normal",a=t.tagger,c=function(){};return function(e){var u=r(e),l=u._0.ctor;return t.tagger="Normal"===l?a:c,i!==l&&(ut("removeEventListener",o,i),ut("addEventListener",o,l),"Normal"===i&&(n=document.body.style.overflow,document.body.style.overflow="hidden"),"Normal"===l&&(document.body.style.overflow=n),i=l),u._1}}function ut(t,e,r){switch(r){case"Normal":return;case"Pause":return lt(t,e,yt);case"Message":return lt(t,e,kt)}}function lt(t,e,r){for(var n=0;n<r.length;n++)document.body[t](r[n],e,!0)}function st(t){return function(e){if("keydown"!==e.type||!e.metaKey||82!==e.which){for(var r="scroll"===e.type||"wheel"===e.type,n=e.target;null!==n;){if("elm-overlay-message-details"===n.className&&r)return;if(n===t&&!r)return;n=n.parentNode}e.stopPropagation(),e.preventDefault()}}}var ft="STYLE",_t="EVENT",dt="ATTR",pt="ATTR_NS",ht="undefined"!=typeof document?document:{},vt="_elmW6BL",gt=Q(K),mt=Q(X),bt="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,1e3/60)},yt=["click","dblclick","mousemove","mouseup","mousedown","mouseenter","mouseleave","touchstart","touchend","touchcancel","touchmove","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointercancel","dragstart","drag","dragend","dragenter","dragover","dragleave","drop","keyup","keydown","keypress","input","change","focus","blur"],kt=yt.concat("wheel","scroll");return{node:e,text:t,custom:c,map:r(u),on:i(k),style:v,property:r(g),attribute:r(m),attributeNS:i(y),mapProperty:r(x),lazy:r(s),lazy2:i(f),lazy3:a(p),keyedNode:i(o),program:gt,programWithFlags:mt,staticProgram:$}}()),lr=function(t){return _(ur.programWithFlags,void 0,t)},sr=function(t){return _(ur.program,nr,t)},fr=(ur.keyedNode,ur.lazy3,ur.lazy2,ur.lazy,{stopPropagation:!1,preventDefault:!1}),_r=ur.on,dr=r(function(t,e){return d(_r,t,fr,e)}),pr=(ur.style,ur.mapProperty,ur.attributeNS,ur.attribute,ur.property),hr=(ur.map,ur.text),vr=ur.node,gr=(r(function(t,e){return{stopPropagation:t,preventDefault:e}}),lr),mr=sr,br=hr,yr=vr,kr=(yr("body"),yr("section"),yr("nav")),wr=(yr("article"),yr("aside"),yr("h1")),xr=(yr("h2"),yr("h3"),yr("h4"),yr("h5"),yr("h6"),yr("header")),Tr=yr("footer"),Br=(yr("address"),yr("main")),Nr=yr("p"),Rr=(yr("hr"),yr("pre")),Er=(yr("blockquote"),yr("ol"),yr("ul")),Sr=yr("li"),Cr=(yr("dl"),yr("dt"),yr("dd"),yr("figure"),yr("figcaption"),yr("div")),Ar=yr("a"),Lr=(yr("em"),yr("strong"),yr("small"),yr("s"),yr("cite"),yr("q"),yr("dfn"),yr("abbr"),yr("time"),yr("code"),yr("var"),yr("samp"),yr("kbd"),yr("sub"),yr("sup"),yr("i"),yr("b"),yr("u"),yr("mark"),yr("ruby"),yr("rt"),yr("rp"),yr("bdi"),yr("bdo"),yr("span"),yr("br"),yr("wbr"),yr("ins"),yr("del"),yr("img"),yr("iframe"),yr("embed"),yr("object"),yr("param"),yr("video"),yr("audio"),yr("source"),yr("track"),yr("canvas"),yr("math"),yr("table")),Mr=(yr("caption"),yr("colgroup"),yr("col"),yr("tbody")),Or=yr("thead"),Ur=(yr("tfoot"),yr("tr")),Ir=yr("td"),zr=yr("th"),Pr=(yr("form"),yr("fieldset"),yr("legend"),yr("label"),yr("input"),yr("button")),jr=(yr("select"),yr("datalist"),yr("optgroup"),yr("option"),yr("textarea"),yr("keygen"),yr("output"),yr("progress"),yr("meter"),yr("details"),yr("summary"),yr("menuitem"),yr("menu"),pr),Jr=r(function(t,e){return _(jr,t,Xt(e))}),Dr=function(t){return _(Jr,"className",t)},Fr=function(t){return _(Jr,"href",t)},Wr=(r(function(t,e){return _(jr,t,Kt(e))}),_(se,"keyCode",_e),_(fe,{ctor:"::",_0:"target",_1:{ctor:"::",_0:"checked",_1:{ctor:"[]"}}},de),_(fe,{ctor:"::",_0:"target",_1:{ctor:"::",_0:"value",_1:{ctor:"[]"}}},pe),fr),qr=dr,Vr=(b.update(Wr,{preventDefault:!0}),function(t){return _(qr,"click",ne(t))}),Hr=(r(function(t,e){return{stopPropagation:t,preventDefault:e}}),function(){function t(t){return encodeURIComponent(t)}function e(t){try{return N(decodeURIComponent(t))}catch(t){return B}}function n(t,e){return ve.nativeBinding(function(r){var n=new XMLHttpRequest;o(n,e),n.addEventListener("error",function(){r(ve.fail({ctor:"NetworkError"}))}),n.addEventListener("timeout",function(){r(ve.fail({ctor:"Timeout"}))}),n.addEventListener("load",function(){r(c(n,t.expect.responseToResult))});try{n.open(t.method,t.url,!0)}catch(e){return r(ve.fail({ctor:"BadUrl",_0:t.url}))}return i(n,t),a(n,t.body),function(){n.abort()}})}function o(t,e){"Nothing"!==e.ctor&&t.addEventListener("progress",function(t){t.lengthComputable&&ve.rawSpawn(e._0({bytes:t.loaded,bytesExpected:t.total}))})}function i(t,e){function r(e){t.setRequestHeader(e._0,e._1)}_(U,r,e.headers),t.responseType=e.expect.responseType,t.withCredentials=e.withCredentials,"Just"===e.timeout.ctor&&(t.timeout=e.timeout._0)}function a(t,e){switch(e.ctor){case"EmptyBody":return void t.send();case"StringBody":return t.setRequestHeader("Content-Type",e._0),void t.send(e._1);case"FormDataBody":return void t.send(e._0)}}function c(t,e){var r=u(t);if(t.status<200||300<=t.status)return r.body=t.responseText,ve.fail({ctor:"BadStatus",_0:r});var n=e(r);return"Ok"===n.ctor?ve.succeed(n._0):(r.body=t.responseText,ve.fail({ctor:"BadPayload",_0:n._0,_1:r}))}function u(t){return{status:{code:t.status,message:t.statusText},headers:l(t.getAllResponseHeaders()),url:t.responseURL,body:t.response}}function l(t){var e=Et;if(!t)return e;for(var r=t.split("\r\n"),n=r.length;n--;){var o=r[n],i=o.indexOf(": ");if(i>0){var a=o.substring(0,i),c=o.substring(i+2);e=d(qt,a,function(t){return N("Just"===t.ctor?c+", "+t._0:c)},e)}}return e}function s(t){return{responseType:"text",responseToResult:t}}function f(t,e){return{responseType:e.responseType,responseToResult:function(r){var n=e.responseToResult(r);return _(nt,t,n)}}}function p(t){for(var e=new FormData;"[]"!==t.ctor;){var r=t._0;e.append(r._0,r._1),t=t._1}return{ctor:"FormDataBody",_0:e}}return{toTask:r(n),expectStringResponse:s,mapExpect:r(f),multipart:p,encodeUri:t,decodeUri:e}}()),Gr=(r(function(t,e){return b.update(e,{expect:_(Hr.mapExpect,t,e.expect)})}),l(function(t,e,r,n,o,i,a){return{method:t,headers:e,url:r,body:n,expect:o,timeout:i,withCredentials:a}}),function(t){return{ctor:"Request",_0:t}}),Qr=(r(function(t,e){return{ctor:"StringBody",_0:t,_1:e}}),{ctor:"EmptyBody"}),$r=(r(function(t,e){return{ctor:"Header",_0:t,_1:e}}),Hr.decodeUri),Kr=Hr.encodeUri,Xr=Hr.expectStringResponse,Yr=function(t){return Xr(function(e){return _(ie,t,e.body)})},Zr=(Xr(function(t){return rt(t.body)}),Hr.multipart,Qr),tn=Gr,en=(i(function(t,e,r){return tn({method:"POST",headers:{ctor:"[]"},url:t,body:e,expect:Yr(r),timeout:B,withCredentials:!1})}),r(function(t,e){return tn({method:"GET",headers:{ctor:"[]"},url:t,body:Zr,expect:Yr(e),timeout:B,withCredentials:!1})})),rn=function(t){var e=t;return _(Hr.toTask,e._0,B)},nn=r(function(t,e){return _(We,t,rn(e))}),on=(a(function(t,e,r,n){return{url:t,status:e,headers:r,body:n}}),r(function(t,e){return{ctor:"BadPayload",_0:t,_1:e}}),r(function(t,e){return{ctor:"StringPart",_0:t,_1:e}}),function(){function t(t){return ve.nativeBinding(function(e){0!==t&&history.go(t),e(ve.succeed(b.Tuple0))})}function e(t){return ve.nativeBinding(function(e){history.pushState({},"",t),e(ve.succeed(i()))})}function r(t){return ve.nativeBinding(function(e){history.replaceState({},"",t),e(ve.succeed(i()))})}function n(t){return ve.nativeBinding(function(e){document.location.reload(t),e(ve.succeed(b.Tuple0))})}function o(t){return ve.nativeBinding(function(e){try{window.location=t}catch(t){document.location.reload(!1)}e(ve.succeed(b.Tuple0))})}function i(){var t=document.location;return{href:t.href,host:t.host,hostname:t.hostname,protocol:t.protocol,origin:t.origin,port_:t.port,pathname:t.pathname,search:t.search,hash:t.hash,username:t.username,password:t.password}}function a(){return-1!==window.navigator.userAgent.indexOf("Trident")}return{go:t,setLocation:o,reloadPage:n,pushState:e,replaceState:r,getLocation:i,isInternetExplorer11:a}}()),an=on.replaceState,cn=on.pushState,un=on.go,ln=on.reloadPage,sn=on.setLocation,fn=fn||{};fn["&>"]=r(function(t,e){return _(Ae,function(t){return e},t)});var _n=i(function(t,e,r){var n=function(e){return _(xe,t,e._0(r))};return _(fn["&>"],ze(_(U,n,e)),Oe({ctor:"_Tuple0"}))}),dn=i(function(t,e,r){var n=r;switch(n.ctor){case"Jump":return un(n._0);case"New":return _(Ae,_(_n,t,e),cn(n._0));case"Modify":return _(Ae,_(_n,t,e),an(n._0));case"Visit":return sn(n._0);default:return ln(n._0)}}),pn=function(t){var e=t;return"Normal"===e.ctor?or(e._0):_(fn["&>"],or(e._0),or(e._1))},hn=i(function(t,e,r){return _(fn["&>"],d(_n,t,r.subs,e),Oe(r))}),vn=he.leaf("Navigation"),gn=he.leaf("Navigation"),mn=r(function(t,e){return{subs:t,popWatcher:e}}),bn=Oe(_(mn,{ctor:"[]"},B)),yn=function(t){return{ctor:"Reload",_0:t}},kn=(gn(yn(!1)),gn(yn(!0)),function(t){return{ctor:"Visit",_0:t}}),wn=function(t){return{ctor:"Modify",_0:t}},xn=function(t){return{ctor:"New",_0:t}},Tn=function(t){return{ctor:"Jump",_0:t}},Bn=r(function(t,e){var r=e;switch(r.ctor){case"Jump":return Tn(r._0);case"New":return xn(r._0);case"Modify":return wn(r._0);case"Visit":return kn(r._0);default:return yn(r._0)}}),Nn=function(t){return{ctor:"Monitor",_0:t}},Rn=(r(function(t,e){var r=e.init(on.getLocation({ctor:"_Tuple0"})),n=function(r){return ye({ctor:"::",_0:vn(Nn(t)),_1:{ctor:"::",_0:e.subscriptions(r),_1:{ctor:"[]"}}})};return mr({init:r,view:e.view,update:e.update,subscriptions:n})}),r(function(t,e){var r=function(t){return _(e.init,t,on.getLocation({ctor:"_Tuple0"}))},n=function(r){return ye({ctor:"::",_0:vn(Nn(t)),_1:{ctor:"::",_0:e.subscriptions(r),_1:{ctor:"[]"}}})};return gr({init:r,view:e.view,update:e.update,subscriptions:n})})),En=r(function(t,e){var r=e;return Nn(function(e){return t(r._0(e))})}),Sn=r(function(t,e){return{ctor:"InternetExplorer",_0:t,_1:e}}),Cn=function(t){return{ctor:"Normal",_0:t}},An=function(t){var e=function(e){return _(we,t,on.getLocation({ctor:"_Tuple0"}))};return on.isInternetExplorer11({ctor:"_Tuple0"})?d(Ie,Sn,ir(d(cr,"popstate",te,e)),ir(d(cr,"hashchange",te,e))):_(Ue,Cn,ir(d(cr,"popstate",te,e)))},Ln=a(function(t,e,r,n){var o=n,i=o.popWatcher,a=function(){var e={ctor:"_Tuple2",_0:r,_1:i};t:do{if("[]"===e._0.ctor){if("Just"===e._1.ctor)return _(fn["&>"],pn(e._1._0),Oe(_(mn,r,B)));break t}if("Nothing"===e._1.ctor)return _(Ue,function(t){return _(mn,r,N(t))},An(t));break t}while(!1);return Oe(_(mn,r,i))}();return _(fn["&>"],ze(_(U,_(dn,t,r),e)),a)});he.effectManagers.Navigation={pkg:"elm-lang/navigation",init:bn,onEffects:Ln,onSelfMsg:hn,tag:"fx",cmdMap:Bn,subMap:En};var Mn=function(t){var e=_(at,"=",t);return"::"===e.ctor&&"::"===e._1.ctor&&"[]"===e._1._1.ctor?d(R,r(function(t,e){return{ctor:"_Tuple2",_0:t,_1:e}}),$r(e._0),$r(e._1._0)):B},On=function(t){return Gt(_(z,Mn,_(at,"&",_(it,1,t))))},Un=function(t){var e=_(at,"/",t);return"::"===e.ctor&&""===e._0?e._1:e},In=function(t){for(;;){var e=t;if("[]"===e.ctor)return B;var r=e._0,n=r.unvisited;if("[]"===n.ctor)return N(r.value);if(""===n._0&&"[]"===n._1.ctor)return N(r.value);t=e._1}},zn=i(function(t,e,r){return In(t._0({visited:{ctor:"[]"},unvisited:Un(e),params:r,value:k}))}),Pn=r(function(t,e){return d(zn,t,_(it,1,e.hash),On(e.search))}),jn=(r(function(t,e){return d(zn,t,e.pathname,On(e.search))}),r(function(t,e){var r=e;return{visited:r.visited,unvisited:r.unvisited,params:r.params,value:t(r.value)}})),Jn=a(function(t,e,r,n){return{visited:t,unvisited:e,params:r,value:n}}),Dn=function(t){return{ctor:"Parser",_0:t}},Fn=function(t){return Dn(function(e){var r=e,n=r.unvisited;if("[]"===n.ctor)return{ctor:"[]"};var o=n._0;return b.eq(o,t)?{ctor:"::",_0:p(Jn,{ctor:"::",_0:o,_1:r.visited},n._1,r.params,r.value),_1:{ctor:"[]"}}:{ctor:"[]"}})},Wn=r(function(t,e){return Dn(function(t){var r=t,n=r.unvisited;if("[]"===n.ctor)return{ctor:"[]"};var o=n._0,i=e(o);return"Ok"===i.ctor?{ctor:"::",_0:p(Jn,{ctor:"::",_0:o,_1:r.visited},n._1,r.params,r.value(i._0)),_1:{ctor:"[]"}}:{ctor:"[]"}})}),qn=_(Wn,"STRING",rt),Vn=(_(Wn,"NUMBER",ot),Vn||{});Vn["</>"]=r(function(t,e){var r=t,n=e;return Dn(function(t){return _(D,n._0,r._0(t))})});var Hn=r(function(t,e){var r=e;return Dn(function(e){var n=e;return _(U,jn(n.value),r._0({visited:n.visited,unvisited:n.unvisited,params:n.params,value:t}))})}),Gn=Dn(function(t){return{ctor:"::",_0:t,_1:{ctor:"[]"}}}),Vn=Vn||{};Vn["<?>"]=r(function(t,e){var r=t,n=e;return Dn(function(t){return _(D,n._0,r._0(t))})});var Qn=function(t){return{ctor:"QueryParser",_0:t}},$n=(r(function(t,e){return Qn(function(r){var n=r,o=n.params;return{ctor:"::",_0:p(Jn,n.visited,n.unvisited,o,n.value(e(_(ht,t,o)))),_1:{ctor:"[]"}}})}),r(function(t,e){var r=e;return"Just"===r.ctor?_(Sr,{ctor:"[]"},{ctor:"::",_0:t(r._0),_1:{ctor:"[]"}}):_(Sr,{ctor:"[]"},{ctor:"[]"})})),Kn=function(t){var e=t;if("Just"===e.ctor){var r=e._0;return _(Cr,{ctor:"::",_0:Dr("event"),_1:{ctor:"[]"}},{ctor:"::",_0:_(wr,{ctor:"::",_0:Dr("event__title"),_1:{ctor:"[]"}},{ctor:"::",_0:br(r.eventType),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("event__body"),_1:{ctor:"[]"}},{ctor:"::",_0:_(Lr,{ctor:"[]"},{ctor:"::",_0:_(Or,{ctor:"[]"},{ctor:"::",_0:_(Ur,{ctor:"[]"},{ctor:"::",_0:_(zr,{ctor:"[]"},{ctor:"::",_0:br("Event id"),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(zr,{ctor:"[]"},{ctor:"::",_0:br("Raw Data"),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(zr,{ctor:"[]"},{ctor:"::",_0:br("Raw Metadata"),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Mr,{ctor:"[]"},{ctor:"::",_0:_(Ur,{ctor:"[]"},{ctor:"::",_0:_(Ir,{ctor:"[]"},{ctor:"::",_0:br(r.eventId),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Ir,{ctor:"[]"},{ctor:"::",_0:_(Rr,{ctor:"[]"},{ctor:"::",_0:br(r.rawData),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Ir,{ctor:"[]"},{ctor:"::",_0:_(Rr,{ctor:"[]"},{ctor:"::",_0:br(r.rawMetadata),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}})}return _(Cr,{ctor:"::",_0:Dr("event"),_1:{ctor:"[]"}},{ctor:"[]"})},Xn=function(t){return _(Tr,{ctor:"::",_0:Dr("footer"),_1:{ctor:"[]"}},{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("footer__links"),_1:{ctor:"[]"}},{ctor:"::",_0:br(_(w["++"],"RailsEventStore v",t.flags.resVersion)),_1:{ctor:"::",_0:_(Ar,{ctor:"::",_0:Fr("https://railseventstore.org/docs/install/"),_1:{ctor:"::",_0:Dr("footer__link"),_1:{ctor:"[]"}}},{ctor:"::",_0:br("Documentation"),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Ar,{ctor:"::",_0:Fr("https://railseventstore.org/support/"),_1:{ctor:"::",_0:Dr("footer__link"),_1:{ctor:"[]"}}},{ctor:"::",_0:br("Support"),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}),_1:{ctor:"[]"}})},Yn=function(t){return _(kr,{ctor:"::",_0:Dr("navigation"),_1:{ctor:"[]"}},{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("navigation__brand"),_1:{ctor:"[]"}},{ctor:"::",_0:_(Ar,{ctor:"::",_0:Fr(t.flags.rootUrl),_1:{ctor:"::",_0:Dr("navigation__logo"),_1:{ctor:"[]"}}},{ctor:"::",_0:br("Rails Event Store"),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("navigation__links"),_1:{ctor:"[]"}},{ctor:"::",_0:_(Ar,{ctor:"::",_0:Fr(t.flags.rootUrl),_1:{ctor:"::",_0:Dr("navigation__link"),_1:{ctor:"[]"}}},{ctor:"::",_0:br("Stream Browser"),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}})},Zn=r(function(t,e){return _(w["++"],t,_(w["++"],"/",Kr(e)))}),to=function(t){var e=t,r=e.eventId;return _(Ur,{ctor:"[]"},{ctor:"::",_0:_(Ir,{ctor:"[]"},{ctor:"::",_0:_(Ar,{ctor:"::",_0:Dr("results__link"),_1:{ctor:"::",_0:Fr(_(Zn,"#events",r)),_1:{ctor:"[]"}}},{ctor:"::",_0:br(e.eventType),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Ir,{ctor:"[]"},{ctor:"::",_0:br(r),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Ir,{ctor:"::",_0:Dr("u-align-right"),_1:{ctor:"[]"}},{ctor:"::",_0:br(e.createdAt),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}})},eo=function(t){return"[]"===t.ctor?_(Nr,{ctor:"::",_0:Dr("results__empty"),_1:{ctor:"[]"}},{ctor:"::",_0:br("No items"),_1:{ctor:"[]"}}):_(Lr,{ctor:"[]"},{ctor:"::",_0:_(Or,{ctor:"[]"},{ctor:"::",_0:_(Ur,{ctor:"[]"},{ctor:"::",_0:_(zr,{ctor:"[]"},{ctor:"::",_0:br("Event name"),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(zr,{ctor:"[]"},{ctor:"::",_0:br("Event id"),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(zr,{ctor:"::",_0:Dr("u-align-right"),_1:{ctor:"[]"}},{ctor:"::",_0:br("Created at"),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Mr,{ctor:"[]"},_(U,to,t)),_1:{ctor:"[]"}}})},ro=function(t){return ke},no=(a(function(t,e,r,n){return{events:t,event:e,page:r,flags:n}}),c(function(t,e,r,n,o){return{eventType:t,eventId:e,createdAt:r,rawData:n,rawMetadata:o}})),oo=d(Ee,{ctor:"::",_0:"attributes",_1:{ctor:"::",_0:"metadata",_1:{ctor:"[]"}}},_(ce,Yt(2),te),d(Ee,{ctor:"::",_0:"attributes",_1:{ctor:"::",_0:"data",_1:{ctor:"[]"}}},_(ce,Yt(2),te),d(Ee,{ctor:"::",_0:"attributes",_1:{ctor:"::",_0:"metadata",_1:{ctor:"::",_0:"timestamp",_1:{ctor:"[]"}}}},pe,d(Ee,{ctor:"::",_0:"id",_1:{ctor:"[]"}},pe,d(Ee,{ctor:"::",_0:"attributes",_1:{ctor:"::",_0:"event_type",_1:{ctor:"[]"}}},pe,Te(no)))))),io=_(se,"data",oo),ao=a(function(t,e,r,n){return{next:t,prev:e,first:r,last:n}}),co=p(Re,"last",le(pe),B,p(Re,"first",le(pe),B,p(Re,"prev",le(pe),B,p(Re,"next",le(pe),B,Te(ao))))),uo=r(function(t,e){return{events:t,links:e}}),lo=d(Se,"links",co,d(Se,"data",function(t){return _($t.decodeContainer,"list",t)}(oo),Te(uo))),so=(a(function(t,e,r,n){return{rootUrl:t,streamsUrl:e,eventsUrl:r,resVersion:n}}),function(t){return{ctor:"GoToPage",_0:t}}),fo=function(t){return _(Pr,{ctor:"::",_0:Fr(t),_1:{ctor:"::",_0:Vr(so(t)),_1:{ctor:"::",_0:Dr("pagination__page pagination__page--next"),_1:{ctor:"[]"}}}},{ctor:"::",_0:br("next"),_1:{ctor:"[]"}})},_o=function(t){return _(Pr,{ctor:"::",_0:Fr(t),_1:{ctor:"::",_0:Vr(so(t)),_1:{ctor:"::",_0:Dr("pagination__page pagination__page--prev"),_1:{ctor:"[]"}}}},{ctor:"::",_0:br("previous"),_1:{ctor:"[]"}})},po=function(t){return _(Pr,{ctor:"::",_0:Fr(t),_1:{ctor:"::",_0:Vr(so(t)),_1:{ctor:"::",_0:Dr("pagination__page pagination__page--last"),_1:{ctor:"[]"}}}},{ctor:"::",_0:br("last"),_1:{ctor:"[]"}})},ho=function(t){return _(Pr,{ctor:"::",_0:Fr(t),_1:{ctor:"::",_0:Vr(so(t)),_1:{ctor:"::",_0:Dr("pagination__page pagination__page--first"),_1:{ctor:"[]"}}}},{ctor:"::",_0:br("first"),_1:{ctor:"[]"}})},vo=function(t){var e=t;return _(Er,{ctor:"::",_0:Dr("pagination"),_1:{ctor:"[]"}},{ctor:"::",_0:_($n,ho,e.first),_1:{ctor:"::",_0:_($n,po,e.last),_1:{ctor:"::",_0:_($n,fo,e.next),_1:{ctor:"::",_0:_($n,_o,e.prev),_1:{ctor:"[]"}}}}})},go=r(function(t,e){var r=e;return _(Cr,{ctor:"::",_0:Dr("browser"),_1:{ctor:"[]"}},{ctor:"::",_0:_(wr,{ctor:"::",_0:Dr("browser__title"),_1:{ctor:"[]"}},{ctor:"::",_0:br(t),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("browser__pagination"),_1:{ctor:"[]"}},{ctor:"::",_0:vo(r.links),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Cr,{ctor:"::",_0:Dr("browser__results"),_1:{ctor:"[]"}},{ctor:"::",_0:eo(r.events),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}})}),mo=function(t){var e=t.page;switch(e.ctor){case"BrowseEvents":return _(go,_(w["++"],"Events in ",e._0),t.events);case"ShowEvent":return Kn(t.event);default:return _(wr,{ctor:"[]"},{ctor:"::",_0:br("404"),_1:{ctor:"[]"}})}},bo=function(t){return _(Cr,{ctor:"::",_0:Dr("frame"),_1:{ctor:"[]"}},{ctor:"::",_0:_(xr,{ctor:"::",_0:Dr("frame__header"),_1:{ctor:"[]"}},{ctor:"::",_0:Yn(t),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Br,{ctor:"::",_0:Dr("frame__body"),_1:{ctor:"[]"}},{ctor:"::",_0:mo(t),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(Tr,{ctor:"::",_0:Dr("frame__footer"),_1:{ctor:"[]"}},{ctor:"::",_0:Xn(t),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}})},yo=function(t){return{ctor:"ChangeUrl",_0:t}},ko=function(t){return{ctor:"GetEvent",_0:t}},wo=function(t){return _(nn,ko,_(en,t,io))},xo=function(t){return{ctor:"GetEvents",_0:t}},To=function(t){return _(nn,xo,_(en,t,lo))},Bo={ctor:"NotFound"},No=function(t){return{ctor:"ShowEvent",_0:t}},Ro=function(t){return{ctor:"BrowseEvents",_0:t}},Eo=function(t){return Dn(function(e){return _(D,function(t){return t._0(e)},t)})}({ctor:"::",_0:_(Hn,Ro("all"),Gn),_1:{ctor:"::",_0:_(Hn,Ro,_(Vn["</>"],Fn("streams"),qn)),_1:{ctor:"::",_0:_(Hn,No,_(Vn["</>"],Fn("events"),qn)),_1:{ctor:"[]"}}}}),So=r(function(t,e){var r=function(t){return _(Pn,Eo,t)}(e);if("Just"!==r.ctor)return{ctor:"_Tuple2",_0:b.update(t,{page:Bo}),_1:me};switch(r._0.ctor){case"BrowseEvents":var n=$r(r._0._0);if("Just"===n.ctor){var o=n._0;return{ctor:"_Tuple2",_0:b.update(t,{page:Ro(o)}),_1:To(_(Zn,t.flags.streamsUrl,o))}}return{ctor:"_Tuple2",_0:b.update(t,{page:Bo}),_1:me};case"ShowEvent":var i=$r(r._0._0);if("Just"===i.ctor){var a=i._0;return{ctor:"_Tuple2",_0:b.update(t,{page:No(a)}),_1:wo(_(Zn,t.flags.eventsUrl,a))}}return{ctor:"_Tuple2",_0:b.update(t,{page:Bo}),_1:me};default:return{ctor:"_Tuple2",_0:b.update(t,{page:r._0}),_1:me}}}),Co=r(function(t,e){var r={prev:B,next:B,first:B,last:B},n={events:_(uo,{ctor:"[]"},r),page:Bo,event:B,flags:t};return _(So,n,e)}),Ao=r(function(t,e){var r=t;switch(r.ctor){case"GetEvents":return"Ok"===r._0.ctor?{ctor:"_Tuple2",_0:b.update(e,{events:r._0._0}),_1:me}:{ctor:"_Tuple2",_0:e,_1:me};case"GetEvent":return"Ok"===r._0.ctor?{ctor:"_Tuple2",_0:b.update(e,{event:N(r._0._0)}),_1:me}:{ctor:"_Tuple2",_0:e,_1:me};case"ChangeUrl":return _(So,e,r._0);default:return{ctor:"_Tuple2",_0:e,_1:To(r._0)}}}),Lo=_(Rn,yo,{init:Co,view:bo,update:Ao,subscriptions:ro})(_(ee,function(t){return _(ee,function(e){return _(ee,function(r){return _(ee,function(n){return ne({eventsUrl:t,resVersion:e,rootUrl:r,streamsUrl:n})},_(se,"streamsUrl",pe))},_(se,"rootUrl",pe))},_(se,"resVersion",pe))},_(se,"eventsUrl",pe))),Mo={};return Mo.Main=Mo.Main||{},void 0!==Lo&&Lo(Mo.Main,"Main",void 0),n=[],void(void 0!==(o=function(){return Mo}.apply(e,n))&&(t.exports=o))}).call(this)}]);