This file is indexed.

/usr/lib/python2.7/dist-packages/notebook/static/notebook/js/main.min.js.map is in python-notebook 5.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
  "version": 3,
  "sources": [
    "components/jquery/jquery.min.js",
    "base/js/namespace.js",
    "components/underscore/underscore-min.js",
    "components/codemirror/lib/codemirror.js",
    "components/moment/min/moment-with-locales.js",
    "components/codemirror/mode/meta.js",
    "base/js/utils.js",
    "components/jed/jed.js",
    "components/requirejs-text/text.js",
    "components/requirejs-plugins/src/json.js",
    "../i18n/nbjs.json!json",
    "base/js/i18nload.js",
    "base/js/i18n.js",
    "components/bootstrap/js/bootstrap.min.js",
    "base/js/dialog.js",
    "components/codemirror/addon/edit/matchbrackets.js",
    "components/codemirror/addon/edit/closebrackets.js",
    "components/codemirror/addon/comment/comment.js",
    "services/config.js",
    "notebook/js/cell.js",
    "components/google-caja/html-css-sanitizer-minified.js",
    "base/js/security.js",
    "notebook/js/mathjaxutils.js",
    "base/js/events.js",
    "notebook/js/celltoolbar.js",
    "components/marked/lib/marked.js",
    "components/codemirror/mode/xml/xml.js",
    "components/codemirror/mode/markdown/markdown.js",
    "components/codemirror/addon/mode/overlay.js",
    "components/codemirror/mode/gfm/gfm.js",
    "components/codemirror/addon/mode/multiplex.js",
    "components/codemirror/mode/python/python.js",
    "components/codemirror/mode/stex/stex.js",
    "notebook/js/codemirror-ipythongfm.js",
    "notebook/js/textcell.js",
    "base/js/keyboard.js",
    "notebook/js/outputarea.js",
    "notebook/js/contexthint.js",
    "notebook/js/completer.js",
    "notebook/js/codemirror-ipython.js",
    "notebook/js/codecell.js",
    "services/kernels/comm.js",
    "services/kernels/serialize.js",
    "services/kernels/kernel.js",
    "services/sessions/session.js",
    "components/codemirror/addon/runmode/runmode.js",
    "notebook/js/tooltip.js",
    "notebook/js/celltoolbarpresets/default.js",
    "notebook/js/celltoolbarpresets/rawcell.js",
    "notebook/js/celltoolbarpresets/slideshow.js",
    "notebook/js/celltoolbarpresets/attachments.js",
    "notebook/js/celltoolbarpresets/tags.js",
    "notebook/js/scrollmanager.js",
    "components/jquery-typeahead/dist/jquery.typeahead.js",
    "notebook/js/quickhelp.js",
    "notebook/js/commandpalette.js",
    "notebook/js/shortcuteditor.js",
    "notebook/js/notebook.js",
    "base/js/page.js",
    "base/js/promises.js",
    "auth/js/loginwidget.js",
    "notebook/js/toolbar.js",
    "notebook/js/maintoolbar.js",
    "components/jquery-ui/ui/minified/jquery-ui.min.js",
    "notebook/js/pager.js",
    "notebook/js/promises.js",
    "components/bootstrap-tour/build/js/bootstrap-tour.min.js",
    "notebook/js/tour.js",
    "notebook/js/menubar.js",
    "base/js/notificationwidget.js",
    "base/js/notificationarea.js",
    "notebook/js/notificationarea.js",
    "bidi/numericshaping.js",
    "bidi/bidi.js",
    "notebook/js/savewidget.js",
    "notebook/js/actions.js",
    "notebook/js/keyboardmanager.js",
    "notebook/js/kernelselector.js",
    "notebook/js/about.js",
    "notebook/js/searchandreplace.js",
    "notebook/js/clipboard.js",
    "notebook/js/main.js"
  ],
  "names": [],
  "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnFA;AACA;AACA,ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChiRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3pCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3xBA;AACA;AACA;AACA;AACA;AACA,ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9wBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC/jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACl0HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3xGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvBA;AACA,ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACleA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACx9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
  "file": "main.min.js",
  "sourcesContent": [
    "(function(global,factory){\"use strict\";if(typeof module===\"object\"&&typeof module.exports===\"object\"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error(\"jQuery requires a window with a document\")}return factory(w)}}else{factory(global)}})(typeof window!==\"undefined\"?window:this,function(window,noGlobal){var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};function DOMEval(code,doc){doc=doc||document;var script=doc.createElement(\"script\");script.text=code;doc.head.appendChild(script).parentNode.removeChild(script)}var version=\"3.2.1\",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this)},get:function(num){if(num==null){return slice.call(this)}return num<0?this[num+this.length]:this[num]},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret},each:function(callback){return jQuery.each(this,callback)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target===\"boolean\"){deep=target;target=arguments[i]||{};i++}if(typeof target!==\"object\"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};jQuery.extend({expando:\"jQuery\"+(version+Math.random()).replace(/\\D/g,\"\"),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return jQuery.type(obj)===\"function\"},isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){var type=jQuery.type(obj);return(type===\"number\"||type===\"string\")&&!isNaN(obj-parseFloat(obj))},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!==\"[object Object]\"){return false}proto=getProto(obj);if(!proto){return true}Ctor=hasOwn.call(proto,\"constructor\")&&proto.constructor;return typeof Ctor===\"function\"&&fnToString.call(Ctor)===ObjectFunctionString},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+\"\"}return typeof obj===\"object\"||typeof obj===\"function\"?class2type[toString.call(obj)]||\"object\":typeof obj},globalEval:function(code){DOMEval(code)},camelCase:function(string){return string.replace(rmsPrefix,\"ms-\").replace(rdashAlpha,fcamelCase)},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break}}}return obj},trim:function(text){return text==null?\"\":(text+\"\").replace(rtrim,\"\")},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr===\"string\"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;if(typeof context===\"string\"){tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn)){return undefined}args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});if(typeof Symbol===\"function\"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]}jQuery.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(i,name){class2type[\"[object \"+name+\"]\"]=name.toLowerCase()});function isArrayLike(obj){var length=!!obj&&\"length\"in obj&&obj.length,type=jQuery.type(obj);if(type===\"function\"||jQuery.isWindow(obj)){return false}return type===\"array\"||length===0||typeof length===\"number\"&&length>0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando=\"sizzle\"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return-1},booleans=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",whitespace=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",identifier=\"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",attributes=\"\\\\[\"+whitespace+\"*(\"+identifier+\")(?:\"+whitespace+\"*([*^$|!~]?=)\"+whitespace+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+identifier+\"))|)\"+whitespace+\"*\\\\]\",pseudos=\":(\"+identifier+\")(?:\\\\((\"+\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\"+\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+attributes+\")*)|\"+\".*\"+\")\\\\)|)\",rwhitespace=new RegExp(whitespace+\"+\",\"g\"),rtrim=new RegExp(\"^\"+whitespace+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+whitespace+\"+$\",\"g\"),rcomma=new RegExp(\"^\"+whitespace+\"*,\"+whitespace+\"*\"),rcombinators=new RegExp(\"^\"+whitespace+\"*([>+~]|\"+whitespace+\")\"+whitespace+\"*\"),rattributeQuotes=new RegExp(\"=\"+whitespace+\"*([^\\\\]'\\\"]*?)\"+whitespace+\"*\\\\]\",\"g\"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp(\"^\"+identifier+\"$\"),matchExpr={ID:new RegExp(\"^#(\"+identifier+\")\"),CLASS:new RegExp(\"^\\\\.(\"+identifier+\")\"),TAG:new RegExp(\"^(\"+identifier+\"|[*])\"),ATTR:new RegExp(\"^\"+attributes),PSEUDO:new RegExp(\"^\"+pseudos),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+whitespace+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+whitespace+\"*(?:([+-]|)\"+whitespace+\"*(\\\\d+)|))\"+whitespace+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+booleans+\")$\",\"i\"),needsContext:new RegExp(\"^\"+whitespace+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+whitespace+\"*((?:-\\\\d)?\\\\d*)\"+whitespace+\"*\\\\)|)(?=[^-]|$)\",\"i\")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\\d$/i,rnative=/^[^{]+\\{\\s*\\[native \\w/,rquickExpr=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+whitespace+\"?|(\"+whitespace+\")|.)\",\"ig\"),funescape=function(_,escaped,escapedWhitespace){var high=\"0x\"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},rcssescape=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch===\"\\0\"){return\"�\"}return ch.slice(0,-1)+\"\\\\\"+ch.charCodeAt(ch.length-1).toString(16)+\" \"}return\"\\\\\"+ch},unloadHandler=function(){setDocument()},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&(\"form\"in elem||\"label\"in elem)},{dir:\"parentNode\",next:\"legend\"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!==\"string\"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&!compilerCache[selector+\" \"]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector}else if(context.nodeName.toLowerCase()!==\"object\"){if(nid=context.getAttribute(\"id\")){nid=nid.replace(rcssescape,fcssescape)}else{context.setAttribute(\"id\",nid=expando)}groups=tokenize(selector);i=groups.length;while(i--){groups[i]=\"#\"+nid+\" \"+toSelector(groups[i])}newSelector=groups.join(\",\");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(nid===expando){context.removeAttribute(\"id\")}}}}}}return select(selector.replace(rtrim,\"$1\"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+\" \")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+\" \"]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var el=document.createElement(\"fieldset\");try{return!!fn(el)}catch(e){return false}finally{if(el.parentNode){el.parentNode.removeChild(el)}el=null}}function addHandle(attrs,handler){var arr=attrs.split(\"|\"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name===\"input\"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name===\"input\"||name===\"button\")&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){if(\"form\"in elem){if(elem.parentNode&&elem.disabled===false){if(\"label\"in elem){if(\"label\"in elem.parentNode){return elem.parentNode.disabled===disabled}else{return elem.disabled===disabled}}return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled}return elem.disabled===disabled}else if(\"label\"in elem){return elem.disabled===disabled}return false}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!==\"undefined\"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!==\"HTML\":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener(\"unload\",unloadHandler,false)}else if(subWindow.attachEvent){subWindow.attachEvent(\"onunload\",unloadHandler)}}support.attributes=assert(function(el){el.className=\"i\";return!el.getAttribute(\"className\")});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(\"\"));return!el.getElementsByTagName(\"*\").length});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length});if(support.getById){Expr.filter[\"ID\"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute(\"id\")===attrId}};Expr.find[\"ID\"]=function(id,context){if(typeof context.getElementById!==\"undefined\"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}}else{Expr.filter[\"ID\"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==\"undefined\"&&elem.getAttributeNode(\"id\");return node&&node.value===attrId}};Expr.find[\"ID\"]=function(id,context){if(typeof context.getElementById!==\"undefined\"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode(\"id\");if(node&&node.value===id){return[elem]}elems=context.getElementsByName(id);i=0;while(elem=elems[i++]){node=elem.getAttributeNode(\"id\");if(node&&node.value===id){return[elem]}}}return[]}}}Expr.find[\"TAG\"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!==\"undefined\"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag===\"*\"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find[\"CLASS\"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==\"undefined\"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(document.querySelectorAll)){assert(function(el){docElem.appendChild(el).innerHTML=\"<a id='\"+expando+\"'></a>\"+\"<select id='\"+expando+\"-\\r\\\\' msallowcapture=''>\"+\"<option selected=''></option></select>\";if(el.querySelectorAll(\"[msallowcapture^='']\").length){rbuggyQSA.push(\"[*^$]=\"+whitespace+\"*(?:''|\\\"\\\")\")}if(!el.querySelectorAll(\"[selected]\").length){rbuggyQSA.push(\"\\\\[\"+whitespace+\"*(?:value|\"+booleans+\")\")}if(!el.querySelectorAll(\"[id~=\"+expando+\"-]\").length){rbuggyQSA.push(\"~=\")}if(!el.querySelectorAll(\":checked\").length){rbuggyQSA.push(\":checked\")}if(!el.querySelectorAll(\"a#\"+expando+\"+*\").length){rbuggyQSA.push(\".#.+[+~]\")}});assert(function(el){el.innerHTML=\"<a href='' disabled='disabled'></a>\"+\"<select disabled='disabled'><option/></select>\";var input=document.createElement(\"input\");input.setAttribute(\"type\",\"hidden\");el.appendChild(input).setAttribute(\"name\",\"D\");if(el.querySelectorAll(\"[name=d]\").length){rbuggyQSA.push(\"name\"+whitespace+\"*[*^$|!~]?=\")}if(el.querySelectorAll(\":enabled\").length!==2){rbuggyQSA.push(\":enabled\",\":disabled\")}docElem.appendChild(el).disabled=true;if(el.querySelectorAll(\":disabled\").length!==2){rbuggyQSA.push(\":enabled\",\":disabled\")}el.querySelectorAll(\"*,:x\");rbuggyQSA.push(\",.*:\")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(el){support.disconnectedMatch=matches.call(el,\"*\");matches.call(el,\"[s!='']:x\");rbuggyMatches.push(\"!=\",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join(\"|\"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join(\"|\"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,\"='$1']\");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+\" \"]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.escape=function(sel){return(sel+\"\").replace(rcssescape,fcssescape)};Sizzle.error=function(msg){throw new Error(\"Syntax error, unrecognized expression: \"+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret=\"\",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent===\"string\"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:true},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:true},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||\"\").replace(runescape,funescape);if(match[2]===\"~=\"){match[3]=\" \"+match[3]+\" \"}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)===\"nth\"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]===\"even\"||match[3]===\"odd\"));match[5]=+(match[7]+match[8]||match[3]===\"odd\")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr[\"CHILD\"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||\"\"}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(\")\",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector===\"*\"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+\" \"];return pattern||(pattern=new RegExp(\"(^|\"+whitespace+\")\"+className+\"(\"+whitespace+\"|$)\"))&&classCache(className,function(elem){return pattern.test(typeof elem.className===\"string\"&&elem.className||typeof elem.getAttribute!==\"undefined\"&&elem.getAttribute(\"class\")||\"\")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator===\"!=\"}if(!operator){return true}result+=\"\";return operator===\"=\"?result===check:operator===\"!=\"?result!==check:operator===\"^=\"?check&&result.indexOf(check)===0:operator===\"*=\"?check&&result.indexOf(check)>-1:operator===\"$=\"?check&&result.slice(-check.length)===check:operator===\"~=\"?(\" \"+result.replace(rwhitespace,\" \")+\" \").indexOf(check)>-1:operator===\"|=\"?result===check||result.slice(0,check.length+1)===check+\"-\":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!==\"nth\",forward=type.slice(-4)!==\"last\",ofType=what===\"of-type\";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?\"nextSibling\":\"previousSibling\",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type===\"only\"&&!start&&\"nextSibling\"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error(\"unsupported pseudo: \"+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,\"\",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,\"$1\"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||\"\")){Sizzle.error(\"unsupported lang: \"+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute(\"xml:lang\")||elem.getAttribute(\"lang\")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+\"-\")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName===\"input\"&&!!elem.checked||nodeName===\"option\"&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos[\"empty\"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name===\"input\"&&elem.type===\"button\"||name===\"button\"},text:function(elem){var attr;return elem.nodeName.toLowerCase()===\"input\"&&elem.type===\"text\"&&((attr=elem.getAttribute(\"type\"))==null||attr.toLowerCase()===\"text\")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos[\"nth\"]=Expr.pseudos[\"eq\"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+\" \"];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim,\" \")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};function toSelector(tokens){var i=0,len=tokens.length,selector=\"\";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key===\"parentNode\",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}return false}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{uniqueCache[key]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}return false}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){\nvar temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||\"*\",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml)}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){temp.push(matcherIn[i]=elem)}}postFinder(null,matcherOut=[],temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[\" \"],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===\" \"?\"*\":\"\"})).replace(rtrim,\"$1\"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i=\"0\",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find[\"TAG\"](\"*\",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context===document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+\" \"];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector===\"function\"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type===\"ID\"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find[\"ID\"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr[\"needsContext\"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split(\"\").sort(sortOrder).join(\"\")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement(\"fieldset\"))&1});if(!assert(function(el){el.innerHTML=\"<a href='#'></a>\";return el.firstChild.getAttribute(\"href\")===\"#\"})){addHandle(\"type|href|height|width\",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()===\"type\"?1:2)}})}if(!support.attributes||!assert(function(el){el.innerHTML=\"<input/>\";el.firstChild.setAttribute(\"value\",\"\");return el.firstChild.getAttribute(\"value\")===\"\"})){addHandle(\"value\",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()===\"input\"){return elem.defaultValue}})}if(!assert(function(el){return el.getAttribute(\"disabled\")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[\":\"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var rsingleTag=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;var risSimple=/^.[^:#\\[\\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier!==\"string\"){return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not})}if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements);return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not&&elem.nodeType===1})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=\":not(\"+expr+\")\"}if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[]}return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!==\"string\"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}return len>1?jQuery.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector===\"string\"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector===\"string\"){if(selector[0]===\"<\"&&selector[selector.length-1]===\">\"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1}return this}}else if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery)}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!==\"string\"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem===\"string\"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return dir(elem,\"parentNode\")},parentsUntil:function(elem,i,until){return dir(elem,\"parentNode\",until)},next:function(elem){return sibling(elem,\"nextSibling\")},prev:function(elem){return sibling(elem,\"previousSibling\")},nextAll:function(elem){return dir(elem,\"nextSibling\")},prevAll:function(elem){return dir(elem,\"previousSibling\")},nextUntil:function(elem,i,until){return dir(elem,\"nextSibling\",until)},prevUntil:function(elem,i,until){return dir(elem,\"previousSibling\",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){if(nodeName(elem,\"iframe\")){return elem.contentDocument}if(nodeName(elem,\"template\")){elem=elem.content||elem}return jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!==\"Until\"){selector=until}if(selector&&typeof selector===\"string\"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnothtmlwhite=/[^\\x20\\t\\r\\n\\f]+/g;function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options===\"string\"?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false}}}if(!options.memory){memory=false}firing=false;if(locked){if(memory){list=[]}else{list=\"\"}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory)}(function add(args){jQuery.each(args,function(_,arg){if(jQuery.isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg)}}else if(arg&&arg.length&&jQuery.type(arg)!==\"string\"){add(arg)}})})(arguments);if(memory&&!firing){fire()}}return this},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){if(list){list=[]}return this},disable:function(){locked=queue=[];list=memory=\"\";return this},disabled:function(){return!list},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory=\"\"}return this},locked:function(){return!!locked},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&jQuery.isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject)}else if(value&&jQuery.isFunction(method=value.then)){method.call(value,resolve,reject)}else{resolve.apply(undefined,[value].slice(noValue))}}catch(value){reject.apply(undefined,[value])}}jQuery.extend({Deferred:function(func){var tuples=[[\"notify\",\"progress\",jQuery.Callbacks(\"memory\"),jQuery.Callbacks(\"memory\"),2],[\"resolve\",\"done\",jQuery.Callbacks(\"once memory\"),jQuery.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",jQuery.Callbacks(\"once memory\"),jQuery.Callbacks(\"once memory\"),1,\"rejected\"]],state=\"pending\",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},catch:function(fn){return promise.then(null,fn)},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+\"With\"](this,fn?[returned]:arguments)}})});fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return}returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError(\"Thenable self-resolution\")}then=returned&&(typeof returned===\"object\"||typeof returned===\"function\")&&returned.then;if(jQuery.isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special))}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith))}}else{if(handler!==Identity){that=undefined;args=[returned]}(special||deferred.resolveWith)(that,args)}},process=special?mightThrow:function(){try{mightThrow()}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace)}if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e]}deferred.rejectWith(that,args)}}};if(depth){process()}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook()}window.setTimeout(process)}}}return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,jQuery.isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,jQuery.isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,jQuery.isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[3-i][2].disable,tuples[0][2].lock)}list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+\"With\"](this===deferred?undefined:this,arguments);return this};deferred[tuple[0]+\"With\"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!--remaining){master.resolveWith(resolveContexts,resolveValues)}}};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()===\"pending\"||jQuery.isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then()}}while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject)}return master.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn(\"jQuery.Deferred exception: \"+error.message,error.stack,stack)}};jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error)});return this};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery])}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready()}if(document.readyState===\"complete\"||document.readyState!==\"loading\"&&!document.documentElement.doScroll){window.setTimeout(jQuery.ready)}else{document.addEventListener(\"DOMContentLoaded\",completed);window.addEventListener(\"load\",completed)}var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)===\"object\"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}if(chainable){return elems}if(bulk){return fn.call(elems)}return len?fn(elems[0],key):emptyGet};var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true})}}}return value},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data===\"string\"){cache[jQuery.camelCase(data)]=value}else{for(prop in data){cache[jQuery.camelCase(prop)]=data[prop]}}return cache},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][jQuery.camelCase(key)]},access:function(owner,key,value){if(key===undefined||key&&typeof key===\"string\"&&value===undefined){return this.get(owner,key)}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return}if(key!==undefined){if(Array.isArray(key)){key=key.map(jQuery.camelCase)}else{key=jQuery.camelCase(key);key=key in cache?[key]:key.match(rnothtmlwhite)||[]}i=key.length;while(i--){delete cache[key[i]]}}if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined}else{delete owner[this.expando]}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data;var dataUser=new Data;var rbrace=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data===\"true\"){return true}if(data===\"false\"){return false}if(data===\"null\"){return null}if(data===+data+\"\"){return+data}if(rbrace.test(data)){return JSON.parse(data)}return data}function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name=\"data-\"+key.replace(rmultiDash,\"-$&\").toLowerCase();data=elem.getAttribute(name);if(typeof data===\"string\"){try{data=getData(data)}catch(e){}dataUser.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data){return dataUser.access(elem,name,data)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function(elem,name){dataPriv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,\"hasDataAttrs\")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf(\"data-\")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}dataPriv.set(elem,\"hasDataAttrs\",true)}}return data}if(typeof key===\"object\"){return this.each(function(){dataUser.set(this,key)})}return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);if(data!==undefined){return data}data=dataAttr(elem,key);if(data!==undefined){return data}return}this.each(function(){dataUser.set(this,key,value)})},null,value,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||\"fx\")+\"queue\";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||\"fx\";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn===\"inprogress\"){fn=queue.shift();startLength--}if(fn){if(type===\"fx\"){queue.unshift(\"inprogress\")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+\"queueHooks\";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks(\"once memory\").add(function(){dataPriv.remove(elem,[type+\"queue\",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!==\"string\"){data=type;type=\"fx\";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type===\"fx\"&&queue[0]!==\"inprogress\"){jQuery.dequeue(this,type)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||\"fx\",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!--count){defer.resolveWith(elements,[elements])}};if(typeof type!==\"string\"){obj=type;type=undefined}type=type||\"fx\";while(i--){tmp=dataPriv.get(elements[i],type+\"queueHooks\");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;var rcssNum=new RegExp(\"^(?:([+-])=|)(\"+pnum+\")([a-z%]*)$\",\"i\");var cssExpand=[\"Top\",\"Right\",\"Bottom\",\"Left\"];var isHiddenWithinTree=function(elem,el){elem=el||elem;return elem.style.display===\"none\"||elem.style.display===\"\"&&jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,\"display\")===\"none\"};var swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale=1,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,\"\")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?\"\":\"px\"),initialInUnit=(jQuery.cssNumber[prop]||unit!==\"px\"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){unit=unit||initialInUnit[3];valueParts=valueParts||[];initialInUnit=+initial||1;do{scale=scale||\".5\";initialInUnit=initialInUnit/scale;jQuery.style(elem,prop,initialInUnit+unit)}while(scale!==(scale=currentValue()/initial)&&scale!==1&&--maxIterations)}if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted}}return adjusted}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display}temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,\"display\");temp.parentNode.removeChild(temp);if(display===\"none\"){display=\"block\"}defaultDisplayMap[nodeName]=display;return display}function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}display=elem.style.display;if(show){if(display===\"none\"){values[index]=dataPriv.get(elem,\"display\")||null;if(!values[index]){elem.style.display=\"\"}}if(elem.style.display===\"\"&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem)}}else{if(display!==\"none\"){values[index]=\"none\";dataPriv.set(elem,\"display\",display)}}}for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index]}}return elements}jQuery.fn.extend({show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state===\"boolean\"){return state?this.show():this.hide()}return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i;var rscriptType=/^$|\\/(?:java|ecma)script/i;var wrapMap={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!==\"undefined\"){ret=context.getElementsByTagName(tag||\"*\")}else if(typeof context.querySelectorAll!==\"undefined\"){ret=context.querySelectorAll(tag||\"*\")}else{ret=[]}if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret)}return ret}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],\"globalEval\",!refElements||dataPriv.get(refElements[i],\"globalEval\"))}}var rhtml=/<|&#?\\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)===\"object\"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement(\"div\"));tag=(rtagName.exec(elem)||[\"\",\"\"])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=\"\"}}}fragment.textContent=\"\";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),\"script\");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||\"\")){scripts.push(elem)}}}}return fragment}(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement(\"div\")),input=document.createElement(\"input\");input.setAttribute(\"type\",\"radio\");input.setAttribute(\"checked\",\"checked\");input.setAttribute(\"name\",\"t\");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML=\"<textarea>x</textarea>\";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var documentElement=document.documentElement;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types===\"object\"){if(typeof selector!==\"string\"){data=data||selector;selector=undefined}for(type in types){on(elem,type,selector,data,types[type],one)}return elem}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector===\"string\"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return elem}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}jQuery.event={global:{},add:function(elem,types,handler,data,selector){\nvar handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(selector){jQuery.find.matchesSelector(documentElement,selector)}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==\"undefined\"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||\"\").match(rnothtmlwhite)||[\"\"];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||\"\").split(\".\").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(\".\")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||\"\").match(rnothtmlwhite)||[\"\"];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||\"\").split(\".\").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp(\"(^|\\\\.)\"+namespaces.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector===\"**\"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,\"handle events\")}},dispatch:function(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,\"events\")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i]}event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type===\"click\"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type===\"click\"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+\" \";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length}if(matchedSelectors[sel]){matchedHandlers.push(handleObj)}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers})}}}}cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)})}return handlerQueue},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:jQuery.isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent)}}:function(){if(this.originalEvent){return this.originalEvent[name]}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value})}})},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent)},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:\"focusin\"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:\"focusout\"},click:{trigger:function(){if(this.type===\"checkbox\"&&this.click&&nodeName(this,\"input\")){this.click();return false}},_default:function(event){return nodeName(event.target,\"a\")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault()}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation()}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation()}this.stopPropagation()}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,char:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function(event){var button=event.button;if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode}if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1}if(button&2){return 3}if(button&4){return 2}return 0}return event.which}},jQuery.event.addProp);jQuery.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+\".\"+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types===\"object\"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector===\"function\"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\\s*(?:[^=]|=\\s*.checked.)/i,rscriptTypeMasked=/^true\\/(.*)/,rcleanScript=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,\"table\")&&nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")){return jQuery(\">tbody\",elem)[0]||elem}return elem}function disableScript(elem){elem.type=(elem.getAttribute(\"type\")!==null)+\"/\"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute(\"type\")}return elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur)}}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName===\"input\"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName===\"input\"||nodeName===\"textarea\"){dest.defaultValue=src.defaultValue}}function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value===\"string\"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index){var self=collection.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}domManip(self,args,callback,ignored)})}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first||ignored){scripts=jQuery.map(getAll(fragment,\"script\"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,\"script\"))}}callback.call(collection[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||\"\")&&!dataPriv.access(node,\"globalEval\")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src)}}else{DOMEval(node.textContent.replace(rcleanScript,\"\"),doc)}}}}}}return collection}function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node))}if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,\"script\"))}node.parentNode.removeChild(node)}}return elem}jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,\"<$1></$2>\")},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,\"script\");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,\"script\"))}return clone},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}elem[dataPriv.expando]=undefined}if(elem[dataUser.expando]){elem[dataUser.expando]=undefined}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=\"\"}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value===\"string\"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||[\"\",\"\"])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this)}}},ignored)}});jQuery.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var rmargin=/^margin/;var rnumnonpx=new RegExp(\"^(\"+pnum+\")(?!px)[a-z%]+$\",\"i\");var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window}return view.getComputedStyle(elem)};(function(){function computeStyleTests(){if(!div){return}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\";div.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);div=null}var pixelPositionVal,boxSizingReliableVal,pixelMarginRightVal,reliableMarginLeftVal,container=document.createElement(\"div\"),div=document.createElement(\"div\");if(!div.style){return}div.style.backgroundClip=\"content-box\";div.cloneNode(true).style.backgroundClip=\"\";support.clearCloneStyle=div.style.backgroundClip===\"content-box\";container.style.cssText=\"border:0;width:8px;height:0;top:0;left:-9999px;\"+\"padding:0;margin-top:1px;position:absolute\";container.appendChild(div);jQuery.extend(support,{pixelPosition:function(){computeStyleTests();return pixelPositionVal},boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal},pixelMarginRight:function(){computeStyleTests();return pixelMarginRightVal},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal}})})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===\"\"&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(!support.pixelMarginRight()&&rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+\"\":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:\"absolute\",visibility:\"hidden\",display:\"block\"},cssNormalTransform={letterSpacing:\"0\",fontWeight:\"400\"},cssPrefixes=[\"Webkit\",\"Moz\",\"ms\"],emptyStyle=document.createElement(\"div\").style;function vendorPropName(name){if(name in emptyStyle){return name}var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name}}}function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name}return ret}function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||\"px\"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i,val=0;if(extra===(isBorderBox?\"border\":\"content\")){i=4}else{i=name===\"width\"?1:0}for(;i<4;i+=2){if(extra===\"margin\"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra===\"content\"){val-=jQuery.css(elem,\"padding\"+cssExpand[i],true,styles)}if(extra!==\"margin\"){val-=jQuery.css(elem,\"border\"+cssExpand[i]+\"Width\",true,styles)}}else{val+=jQuery.css(elem,\"padding\"+cssExpand[i],true,styles);if(extra!==\"padding\"){val+=jQuery.css(elem,\"border\"+cssExpand[i]+\"Width\",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox,styles=getStyles(elem),val=curCSS(elem,name,styles),isBorderBox=jQuery.css(elem,\"boxSizing\",false,styles)===\"border-box\";if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);if(val===\"auto\"){val=elem[\"offset\"+name[0].toUpperCase()+name.slice(1)]}val=parseFloat(val)||0;return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?\"border\":\"content\"),valueIsBorderBox,styles)+\"px\"}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,\"opacity\");return ret===\"\"?\"1\":ret}}}},cssNumber:{animationIterationCount:true,columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{float:\"cssFloat\"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type===\"string\"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type=\"number\"}if(value==null||value!==value){return}if(type===\"number\"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?\"\":\"px\")}if(!support.clearCloneStyle&&value===\"\"&&name.indexOf(\"background\")===0){style[name]=\"inherit\"}if(!hooks||!(\"set\"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value)}else{style[name]=value}}}else{if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&\"get\"in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val===\"normal\"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===\"\"||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val}return val}});jQuery.each([\"height\",\"width\"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,\"display\"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)}},set:function(elem,value,extra){var matches,styles=extra&&getStyles(elem),subtract=extra&&augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,\"boxSizing\",false,styles)===\"border-box\",styles);if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||\"px\")!==\"px\"){elem.style[name]=value;value=jQuery.css(elem,name)}return setPositiveNumber(elem,value,subtract)}}});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,\"marginLeft\"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+\"px\"}});jQuery.each({margin:\"\",padding:\"\",border:\"Width\"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value===\"string\"?value.split(\" \"):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?\"\":\"px\")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,\"\");return!result||result===\"auto\"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:\"swing\"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule)}else{window.setTimeout(schedule,jQuery.fx.interval)}jQuery.fx.tick()}}function createFxNow(){window.setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs[\"margin\"+which]=attrs[\"padding\"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners[\"*\"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox=\"width\"in props||\"height\"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,\"fxshow\");if(!opts.queue){hooks=jQuery._queueHooks(elem,\"fx\");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,\"fx\").length){hooks.empty.fire()}})})}for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value===\"toggle\";if(value===(hidden?\"hide\":\"show\")){if(value===\"show\"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}}propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return}if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,\"display\")}display=jQuery.css(elem,\"display\");if(display===\"none\"){if(restoreDisplay){display=restoreDisplay}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,\"display\");showHide([elem])}}if(display===\"inline\"||display===\"inline-block\"&&restoreDisplay!=null){if(jQuery.css(elem,\"float\")===\"none\"){if(!propTween){anim.done(function(){style.display=restoreDisplay});if(restoreDisplay==null){display=style.display;restoreDisplay=display===\"none\"?\"\":display}}style.display=\"inline-block\"}}}if(opts.overflow){style.overflow=\"hidden\";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}propTween=false;for(prop in orig){if(!propTween){if(dataShow){if(\"hidden\"in dataShow){hidden=dataShow.hidden}}else{dataShow=dataPriv.access(elem,\"fxshow\",{display:restoreDisplay})}if(toggle){dataShow.hidden=!hidden}if(hidden){showHide([elem],true)}anim.done(function(){if(!hidden){showHide([elem])}dataPriv.remove(elem,\"fxshow\");for(prop in orig){jQuery.style(elem,prop,orig[prop])}})}propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&\"expand\"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}if(!length){deferred.notifyWith(elem,[animation,1,0])}deferred.resolveWith(elem,[animation]);return false},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(jQuery.isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=jQuery.proxy(result.stop,result)}return result}}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation}jQuery.Animation=jQuery.extend(Animation,{tweeners:{\"*\":[function(prop,value){\nvar tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween}]},tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=[\"*\"]}else{props=props.match(rnothtmlwhite)}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback)}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback)}else{Animation.prefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed===\"object\"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0}else{if(typeof opt.duration!==\"number\"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration]}else{opt.duration=jQuery.fx.speeds._default}}}if(opt.queue==null||opt.queue===true){opt.queue=\"fx\"}opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css(\"opacity\",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,\"finish\")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!==\"string\"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false){this.queue(type||\"fx\",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+\"queueHooks\",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function(type){if(type!==false){type=type||\"fx\"}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+\"queue\"],hooks=data[type+\"queueHooks\"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each([\"toggle\",\"show\",\"hide\"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed===\"boolean\"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx(\"show\"),slideUp:genFx(\"hide\"),slideToggle:genFx(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start()};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return}inProgress=true;schedule()};jQuery.fx.stop=function(){inProgress=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||\"fx\";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})};(function(){var input=document.createElement(\"input\"),select=document.createElement(\"select\"),opt=select.appendChild(document.createElement(\"option\"));input.type=\"checkbox\";support.checkOn=input.value!==\"\";support.optSelected=opt.selected;input=document.createElement(\"input\");input.value=\"t\";input.type=\"radio\";support.radioValue=input.value===\"t\"})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===\"undefined\"){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return}if(hooks&&\"set\"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}elem.setAttribute(name,value+\"\");return value}if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value===\"radio\"&&nodeName(elem,\"input\")){var val=elem.value;elem.setAttribute(\"type\",value);if(val){elem.value=val}return value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){elem.removeAttribute(name)}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){if(hooks&&\"set\"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}return elem[name]=value}if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}return elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,\"tabindex\");if(tabindex){return parseInt(tabindex,10)}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0}return-1}}},propFix:{for:\"htmlFor\",class:\"className\"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex}}}}}jQuery.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){jQuery.propFix[this.toLowerCase()]=this});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \")}function getClass(elem){return elem.getAttribute&&elem.getAttribute(\"class\")||\"\"}jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))})}if(typeof value===\"string\"&&value){classes=value.match(rnothtmlwhite)||[];while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&\" \"+stripAndCollapse(curValue)+\" \";if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(\" \"+clazz+\" \")<0){cur+=clazz+\" \"}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute(\"class\",finalValue)}}}}return this},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))})}if(!arguments.length){return this.attr(\"class\",\"\")}if(typeof value===\"string\"&&value){classes=value.match(rnothtmlwhite)||[];while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&\" \"+stripAndCollapse(curValue)+\" \";if(cur){j=0;while(clazz=classes[j++]){while(cur.indexOf(\" \"+clazz+\" \")>-1){cur=cur.replace(\" \"+clazz+\" \",\" \")}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute(\"class\",finalValue)}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal===\"boolean\"&&type===\"string\"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)})}return this.each(function(){var className,i,self,classNames;if(type===\"string\"){i=0;self=jQuery(this);classNames=value.match(rnothtmlwhite)||[];while(className=classNames[i++]){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(value===undefined||type===\"boolean\"){className=getClass(this);if(className){dataPriv.set(this,\"__className__\",className)}if(this.setAttribute){this.setAttribute(\"class\",className||value===false?\"\":dataPriv.get(this,\"__className__\")||\"\")}}})},hasClass:function(selector){var className,elem,i=0;className=\" \"+selector+\" \";while(elem=this[i++]){if(elem.nodeType===1&&(\" \"+stripAndCollapse(getClass(elem))+\" \").indexOf(className)>-1){return true}}return false}});var rreturn=/\\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&\"get\"in hooks&&(ret=hooks.get(elem,\"value\"))!==undefined){return ret}ret=elem.value;if(typeof ret===\"string\"){return ret.replace(rreturn,\"\")}return ret==null?\"\":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=\"\"}else if(typeof val===\"number\"){val+=\"\"}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?\"\":value+\"\"})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!(\"set\"in hooks)||hooks.set(this,val,\"value\")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,\"value\");return val!=null?val:stripAndCollapse(jQuery.text(elem))}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type===\"select-one\",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max}else{i=one?index:0}for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,\"optgroup\"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each([\"radio\",\"checkbox\"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute(\"value\")===null?\"on\":elem.value}}});var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,\"type\")?event.type:event,namespaces=hasOwn.call(event,\"namespace\")?event.namespace.split(\".\"):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(\".\")>-1){namespaces=type.split(\".\");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(\":\")<0&&\"on\"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event===\"object\"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(\".\");event.rnamespace=event.namespace?new RegExp(\"(^|\\\\.)\"+namespaces.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,\"events\")||{})[event.type]&&dataPriv.get(cur,\"handle\");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem)}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});jQuery.each((\"blur focus focusin focusout resize scroll click dblclick \"+\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \"+\"change select submit keydown keypress keyup contextmenu\").split(\" \"),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}});support.focusin=\"onfocusin\"in window;if(!support.focusin){jQuery.each({focus:\"focusin\",blur:\"focusout\"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event))};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true)}dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix)}else{dataPriv.access(doc,fix,attaches)}}}})}var location=window.location;var nonce=jQuery.now();var rquery=/\\?/;jQuery.parseXML=function(data){var xml;if(!data||typeof data!==\"string\"){return null}try{xml=(new window.DOMParser).parseFromString(data,\"text/xml\")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName(\"parsererror\").length){jQuery.error(\"Invalid XML: \"+data)}return xml};var rbracket=/\\[\\]$/,rCRLF=/\\r?\\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+\"[\"+(typeof v===\"object\"&&v!=null?i:\"\")+\"]\",v,traditional,add)}})}else if(!traditional&&jQuery.type(obj)===\"object\"){for(name in obj){buildParams(prefix+\"[\"+name+\"]\",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=jQuery.isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+\"=\"+encodeURIComponent(value==null?\"\":value)};if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join(\"&\")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,\"elements\");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(\":disabled\")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null}if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,\"\\r\\n\")}})}return{name:elem.name,value:val.replace(rCRLF,\"\\r\\n\")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\\/\\//,prefilters={},transports={},allTypes=\"*/\".concat(\"*\"),originAnchor=document.createElement(\"a\");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!==\"string\"){func=dataTypeExpression;dataTypeExpression=\"*\"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(jQuery.isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]===\"+\"){dataType=dataType.slice(1)||\"*\";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport===\"string\"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected[\"*\"]&&inspect(\"*\")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current===\"*\"){current=prev}else if(prev!==\"*\"&&prev!==current){conv=converters[prev+\" \"+current]||converters[\"* \"+current];if(!conv){for(conv2 in converters){tmp=conv2.split(\" \");if(tmp[1]===current){conv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s.throws){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current}}}}}}}return{state:\"success\",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:\"GET\",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":allTypes,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":true,\"text json\":JSON.parse,\"text xml\":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url===\"object\"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks(\"once memory\"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort=\"canceled\",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(completed==null){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status])}else{for(code in map){statusCode[code]=[statusCode[code],map[code]]}}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+\"\").replace(rprotocol,location.protocol+\"//\");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||\"*\").toLowerCase().match(rnothtmlwhite)||[\"\"];if(s.crossDomain==null){urlAnchor=document.createElement(\"a\");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+\"//\"+originAnchor.host!==urlAnchor.protocol+\"//\"+urlAnchor.host}catch(e){s.crossDomain=true}}if(s.data&&s.processData&&typeof s.data!==\"string\"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger(\"ajaxStart\")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,\"\");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data){cacheURL+=(rquery.test(cacheURL)?\"&\":\"?\")+s.data;delete s.data}if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,\"$1\");uncached=(rquery.test(cacheURL)?\"&\":\"?\")+\"_=\"+nonce+++uncached}s.url=cacheURL+uncached}else if(s.data&&s.processData&&(s.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")===0){s.data=s.data.replace(r20,\"+\")}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader(\"If-Modified-Since\",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader(\"If-None-Match\",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader(\"Content-Type\",s.contentType)}jqXHR.setRequestHeader(\"Accept\",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!==\"*\"?\", \"+allTypes+\"; q=0.01\":\"\"):s.accepts[\"*\"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort()}strAbort=\"abort\";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,\"No Transport\")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger(\"ajaxSend\",[jqXHR,s])}if(completed){return jqXHR}if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort(\"timeout\")},s.timeout)}try{completed=false;transport.send(requestHeaders,done)}catch(e){if(completed){throw e}done(-1,e)}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return}completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||\"\";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader(\"Last-Modified\");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader(\"etag\");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type===\"HEAD\"){statusText=\"nocontent\"}else if(status===304){statusText=\"notmodified\"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText=\"error\";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+\"\";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?\"ajaxSuccess\":\"ajaxError\",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger(\"ajaxComplete\",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger(\"ajaxStop\")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,\"json\")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,\"script\")}});jQuery.each([\"get\",\"post\"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:\"GET\",dataType:\"script\",cache:true,async:false,global:false,throws:true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(jQuery.isFunction(html)){html=html.call(this[0])}wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(selector){this.parent(selector).not(\"body\").each(function(){jQuery(this).replaceWith(this.childNodes)});return this}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&\"withCredentials\"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers[\"X-Requested-With\"]){headers[\"X-Requested-With\"]=\"XMLHttpRequest\"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.onreadystatechange=null;if(type===\"abort\"){xhr.abort()}else if(type===\"error\"){if(typeof xhr.status!==\"number\"){complete(0,\"error\")}else{complete(xhr.status,xhr.statusText)}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||\"text\")!==\"text\"||typeof xhr.responseText!==\"string\"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders())}}}};xhr.onload=callback();errorCallback=xhr.onerror=callback(\"error\");if(xhr.onabort!==undefined){xhr.onabort=errorCallback}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback()}})}}}callback=callback(\"abort\");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false}});jQuery.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, \"+\"application/ecmascript, application/x-ecmascript\"},contents:{\nscript:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter(\"script\",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type=\"GET\"}});jQuery.ajaxTransport(\"script\",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery(\"<script>\").prop({charset:s.scriptCharset,src:s.url}).on(\"load error\",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type===\"error\"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\\?(?=&|$)|\\?\\?/;jQuery.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+\"_\"+nonce++;this[callback]=true;return callback}});jQuery.ajaxPrefilter(\"json jsonp\",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?\"url\":typeof s.data===\"string\"&&(s.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")===0&&rjsonp.test(s.data)&&\"data\");if(jsonProp||s.dataTypes[0]===\"jsonp\"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,\"$1\"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?\"&\":\"?\")+s.jsonp+\"=\"+callbackName}s.converters[\"script json\"]=function(){if(!responseContainer){jQuery.error(callbackName+\" was not called\")}return responseContainer[0]};s.dataTypes[0]=\"json\";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName)}else{window[callbackName]=overwritten}if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return\"script\"}});support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument(\"\").body;body.innerHTML=\"<form></form><form></form>\";return body.childNodes.length===2}();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!==\"string\"){return[]}if(typeof context===\"boolean\"){keepScripts=context;context=false}var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument(\"\");base=context.createElement(\"base\");base.href=document.location.href;context.head.appendChild(base)}else{context=document}}parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(\" \");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else if(params&&typeof params===\"object\"){type=\"POST\"}if(self.length>0){jQuery.ajax({url:url,type:type||\"GET\",dataType:\"html\",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery(\"<div>\").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})})}return this};jQuery.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,\"position\"),curElem=jQuery(elem),props={};if(position===\"static\"){elem.style.position=\"relative\"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,\"top\");curCSSLeft=jQuery.css(elem,\"left\");calculatePosition=(position===\"absolute\"||position===\"fixed\")&&(curCSSTop+curCSSLeft).indexOf(\"auto\")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset))}if(options.top!=null){props.top=options.top-curOffset.top+curTop}if(options.left!=null){props.left=options.left-curOffset.left+curLeft}if(\"using\"in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var doc,docElem,rect,win,elem=this[0];if(!elem){return}if(!elem.getClientRects().length){return{top:0,left:0}}rect=elem.getBoundingClientRect();doc=elem.ownerDocument;docElem=doc.documentElement;win=doc.defaultView;return{top:rect.top+win.pageYOffset-docElem.clientTop,left:rect.left+win.pageXOffset-docElem.clientLeft}},position:function(){if(!this[0]){return}var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,\"position\")===\"fixed\"){offset=elem.getBoundingClientRect()}else{offsetParent=this.offsetParent();offset=this.offset();if(!nodeName(offsetParent[0],\"html\")){parentOffset=offsetParent.offset()}parentOffset={top:parentOffset.top+jQuery.css(offsetParent[0],\"borderTopWidth\",true),left:parentOffset.left+jQuery.css(offsetParent[0],\"borderLeftWidth\",true)}}return{top:offset.top-parentOffset.top-jQuery.css(elem,\"marginTop\",true),left:offset.left-parentOffset.left-jQuery.css(elem,\"marginLeft\",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,\"position\")===\"static\"){offsetParent=offsetParent.offsetParent}return offsetParent||documentElement})}});jQuery.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(method,prop){var top=\"pageYOffset\"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(jQuery.isWindow(elem)){win=elem}else if(elem.nodeType===9){win=elem.defaultView}if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset)}else{elem[method]=val}},method,val,arguments.length)}});jQuery.each([\"top\",\"left\"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+\"px\":computed}})});jQuery.each({Height:\"height\",Width:\"width\"},function(name,type){jQuery.each({padding:\"inner\"+name,content:type,\"\":\"outer\"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!==\"boolean\"),extra=defaultExtra||(margin===true||value===true?\"margin\":\"border\");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return funcName.indexOf(\"outer\")===0?elem[\"inner\"+name]:elem.document.documentElement[\"client\"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body[\"scroll\"+name],doc[\"scroll\"+name],elem.body[\"offset\"+name],doc[\"offset\"+name],doc[\"client\"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable)}})});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,\"**\"):this.off(types,selector||\"**\",fn)}});jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;if(typeof define===\"function\"&&define.amd){define(\"jquery\",[],function(){return jQuery})}var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(!noGlobal){window.jQuery=window.$=jQuery}return jQuery});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\nvar Jupyter = Jupyter || {};\n\nvar jprop = function(name, module_path){\n    Object.defineProperty(Jupyter, name, {\n      get: function() { \n          console.warn('accessing `'+name+'` is deprecated. Use `require(\"'+module_path+'\")`');\n          return require(module_path); \n      },\n      enumerable: true,\n      configurable: false\n    });\n}\n\nvar jglobal = function(name, module_path){\n    Object.defineProperty(Jupyter, name, {\n      get: function() { \n          console.warn('accessing `'+name+'` is deprecated. Use `require(\"'+module_path+'\").'+name+'`');\n          return require(module_path)[name]; \n      },\n      enumerable: true,\n      configurable: false\n    });\n}\n\ndefine('base/js/namespace',[],function(){\n    \"use strict\";\n\n    // expose modules\n    \n    jprop('utils','base/js/utils')\n    \n    //Jupyter.load_extensions = Jupyter.utils.load_extensions;\n    // \n    jprop('security','base/js/security');\n    jprop('keyboard','base/js/keyboard');\n    jprop('dialog','base/js/dialog');\n    jprop('mathjaxutils','notebook/js/mathjaxutils');\n\n\n    //// exposed constructors\n    jglobal('CommManager','services/kernels/comm')\n    jglobal('Comm','services/kernels/comm')\n\n    jglobal('NotificationWidget','base/js/notificationwidget');\n    jglobal('Kernel','services/kernels/kernel');\n    jglobal('Session','services/sessions/session');\n    jglobal('LoginWidget','auth/js/loginwidget');\n    jglobal('Page','base/js/page');\n\n    // notebook\n    jglobal('TextCell','notebook/js/textcell');\n    jglobal('OutputArea','notebook/js/outputarea');\n    jglobal('KeyboardManager','notebook/js/keyboardmanager');\n    jglobal('Completer','notebook/js/completer');\n    jglobal('Notebook','notebook/js/notebook');\n    jglobal('Tooltip','notebook/js/tooltip');\n    jglobal('Toolbar','notebook/js/toolbar');\n    jglobal('SaveWidget','notebook/js/savewidget');\n    jglobal('Pager','notebook/js/pager');\n    jglobal('QuickHelp','notebook/js/quickhelp');\n    jglobal('MarkdownCell','notebook/js/textcell');\n    jglobal('RawCell','notebook/js/textcell');\n    jglobal('Cell','notebook/js/cell');\n    jglobal('MainToolBar','notebook/js/maintoolbar');\n    jglobal('NotebookNotificationArea','notebook/js/notificationarea');\n    jglobal('NotebookTour', 'notebook/js/tour');\n    jglobal('MenuBar', 'notebook/js/menubar');\n\n    // tree\n    jglobal('SessionList','tree/js/sessionlist');\n\n    Jupyter.version = \"5.2.2\";\n    Jupyter._target = '_blank';\n    return Jupyter;\n});\n\n// deprecated since 4.0, remove in 5+\nvar IPython = Jupyter;\n\n",
    "(function(){var root=this;var previousUnderscore=root._;var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,nativeCreate=Object.create;var Ctor=function(){};var _=function(obj){if(obj instanceof _)return obj;if(!(this instanceof _))return new _(obj);this._wrapped=obj};if(typeof exports!==\"undefined\"){if(typeof module!==\"undefined\"&&module.exports){exports=module.exports=_}exports._=_}else{root._=_}_.VERSION=\"1.8.3\";var optimizeCb=function(func,context,argCount){if(context===void 0)return func;switch(argCount==null?3:argCount){case 1:return function(value){return func.call(context,value)};case 2:return function(value,other){return func.call(context,value,other)};case 3:return function(value,index,collection){return func.call(context,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(context,accumulator,value,index,collection)}}return function(){return func.apply(context,arguments)}};var cb=function(value,context,argCount){if(value==null)return _.identity;if(_.isFunction(value))return optimizeCb(value,context,argCount);if(_.isObject(value))return _.matcher(value);return _.property(value)};_.iteratee=function(value,context){return cb(value,context,Infinity)};var createAssigner=function(keysFunc,undefinedOnly){return function(obj){var length=arguments.length;if(length<2||obj==null)return obj;for(var index=1;index<length;index++){var source=arguments[index],keys=keysFunc(source),l=keys.length;for(var i=0;i<l;i++){var key=keys[i];if(!undefinedOnly||obj[key]===void 0)obj[key]=source[key]}}return obj}};var baseCreate=function(prototype){if(!_.isObject(prototype))return{};if(nativeCreate)return nativeCreate(prototype);Ctor.prototype=prototype;var result=new Ctor;Ctor.prototype=null;return result};var property=function(key){return function(obj){return obj==null?void 0:obj[key]}};var MAX_ARRAY_INDEX=Math.pow(2,53)-1;var getLength=property(\"length\");var isArrayLike=function(collection){var length=getLength(collection);return typeof length==\"number\"&&length>=0&&length<=MAX_ARRAY_INDEX};_.each=_.forEach=function(obj,iteratee,context){iteratee=optimizeCb(iteratee,context);var i,length;if(isArrayLike(obj)){for(i=0,length=obj.length;i<length;i++){iteratee(obj[i],i,obj)}}else{var keys=_.keys(obj);for(i=0,length=keys.length;i<length;i++){iteratee(obj[keys[i]],keys[i],obj)}}return obj};_.map=_.collect=function(obj,iteratee,context){iteratee=cb(iteratee,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,results=Array(length);for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;results[index]=iteratee(obj[currentKey],currentKey,obj)}return results};function createReduce(dir){function iterator(obj,iteratee,memo,keys,index,length){for(;index>=0&&index<length;index+=dir){var currentKey=keys?keys[index]:index;memo=iteratee(memo,obj[currentKey],currentKey,obj)}return memo}return function(obj,iteratee,memo,context){iteratee=optimizeCb(iteratee,context,4);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,index=dir>0?0:length-1;if(arguments.length<3){memo=obj[keys?keys[index]:index];index+=dir}return iterator(obj,iteratee,memo,keys,index,length)}}_.reduce=_.foldl=_.inject=createReduce(1);_.reduceRight=_.foldr=createReduce(-1);_.find=_.detect=function(obj,predicate,context){var key;if(isArrayLike(obj)){key=_.findIndex(obj,predicate,context)}else{key=_.findKey(obj,predicate,context)}if(key!==void 0&&key!==-1)return obj[key]};_.filter=_.select=function(obj,predicate,context){var results=[];predicate=cb(predicate,context);_.each(obj,function(value,index,list){if(predicate(value,index,list))results.push(value)});return results};_.reject=function(obj,predicate,context){return _.filter(obj,_.negate(cb(predicate)),context)};_.every=_.all=function(obj,predicate,context){predicate=cb(predicate,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length;for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;if(!predicate(obj[currentKey],currentKey,obj))return false}return true};_.some=_.any=function(obj,predicate,context){predicate=cb(predicate,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length;for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;if(predicate(obj[currentKey],currentKey,obj))return true}return false};_.contains=_.includes=_.include=function(obj,item,fromIndex,guard){if(!isArrayLike(obj))obj=_.values(obj);if(typeof fromIndex!=\"number\"||guard)fromIndex=0;return _.indexOf(obj,item,fromIndex)>=0};_.invoke=function(obj,method){var args=slice.call(arguments,2);var isFunc=_.isFunction(method);return _.map(obj,function(value){var func=isFunc?method:value[method];return func==null?func:func.apply(value,args)})};_.pluck=function(obj,key){return _.map(obj,_.property(key))};_.where=function(obj,attrs){return _.filter(obj,_.matcher(attrs))};_.findWhere=function(obj,attrs){return _.find(obj,_.matcher(attrs))};_.max=function(obj,iteratee,context){var result=-Infinity,lastComputed=-Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;i<length;i++){value=obj[i];if(value>result){result=value}}}else{iteratee=cb(iteratee,context);_.each(obj,function(value,index,list){computed=iteratee(value,index,list);if(computed>lastComputed||computed===-Infinity&&result===-Infinity){result=value;lastComputed=computed}})}return result};_.min=function(obj,iteratee,context){var result=Infinity,lastComputed=Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;i<length;i++){value=obj[i];if(value<result){result=value}}}else{iteratee=cb(iteratee,context);_.each(obj,function(value,index,list){computed=iteratee(value,index,list);if(computed<lastComputed||computed===Infinity&&result===Infinity){result=value;lastComputed=computed}})}return result};_.shuffle=function(obj){var set=isArrayLike(obj)?obj:_.values(obj);var length=set.length;var shuffled=Array(length);for(var index=0,rand;index<length;index++){rand=_.random(0,index);if(rand!==index)shuffled[index]=shuffled[rand];shuffled[rand]=set[index]}return shuffled};_.sample=function(obj,n,guard){if(n==null||guard){if(!isArrayLike(obj))obj=_.values(obj);return obj[_.random(obj.length-1)]}return _.shuffle(obj).slice(0,Math.max(0,n))};_.sortBy=function(obj,iteratee,context){iteratee=cb(iteratee,context);return _.pluck(_.map(obj,function(value,index,list){return{value:value,index:index,criteria:iteratee(value,index,list)}}).sort(function(left,right){var a=left.criteria;var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)return-1}return left.index-right.index}),\"value\")};var group=function(behavior){return function(obj,iteratee,context){var result={};iteratee=cb(iteratee,context);_.each(obj,function(value,index){var key=iteratee(value,index,obj);behavior(result,value,key)});return result}};_.groupBy=group(function(result,value,key){if(_.has(result,key))result[key].push(value);else result[key]=[value]});_.indexBy=group(function(result,value,key){result[key]=value});_.countBy=group(function(result,value,key){if(_.has(result,key))result[key]++;else result[key]=1});_.toArray=function(obj){if(!obj)return[];if(_.isArray(obj))return slice.call(obj);if(isArrayLike(obj))return _.map(obj,_.identity);return _.values(obj)};_.size=function(obj){if(obj==null)return 0;return isArrayLike(obj)?obj.length:_.keys(obj).length};_.partition=function(obj,predicate,context){predicate=cb(predicate,context);var pass=[],fail=[];_.each(obj,function(value,key,obj){(predicate(value,key,obj)?pass:fail).push(value)});return[pass,fail]};_.first=_.head=_.take=function(array,n,guard){if(array==null)return void 0;if(n==null||guard)return array[0];return _.initial(array,array.length-n)};_.initial=function(array,n,guard){return slice.call(array,0,Math.max(0,array.length-(n==null||guard?1:n)))};_.last=function(array,n,guard){if(array==null)return void 0;if(n==null||guard)return array[array.length-1];return _.rest(array,Math.max(0,array.length-n))};_.rest=_.tail=_.drop=function(array,n,guard){return slice.call(array,n==null||guard?1:n)};_.compact=function(array){return _.filter(array,_.identity)};var flatten=function(input,shallow,strict,startIndex){var output=[],idx=0;for(var i=startIndex||0,length=getLength(input);i<length;i++){var value=input[i];if(isArrayLike(value)&&(_.isArray(value)||_.isArguments(value))){if(!shallow)value=flatten(value,shallow,strict);var j=0,len=value.length;output.length+=len;while(j<len){output[idx++]=value[j++]}}else if(!strict){output[idx++]=value}}return output};_.flatten=function(array,shallow){return flatten(array,shallow,false)};_.without=function(array){return _.difference(array,slice.call(arguments,1))};_.uniq=_.unique=function(array,isSorted,iteratee,context){if(!_.isBoolean(isSorted)){context=iteratee;iteratee=isSorted;isSorted=false}if(iteratee!=null)iteratee=cb(iteratee,context);var result=[];var seen=[];for(var i=0,length=getLength(array);i<length;i++){var value=array[i],computed=iteratee?iteratee(value,i,array):value;if(isSorted){if(!i||seen!==computed)result.push(value);seen=computed}else if(iteratee){if(!_.contains(seen,computed)){seen.push(computed);result.push(value)}}else if(!_.contains(result,value)){result.push(value)}}return result};_.union=function(){return _.uniq(flatten(arguments,true,true))};_.intersection=function(array){var result=[];var argsLength=arguments.length;for(var i=0,length=getLength(array);i<length;i++){var item=array[i];if(_.contains(result,item))continue;for(var j=1;j<argsLength;j++){if(!_.contains(arguments[j],item))break}if(j===argsLength)result.push(item)}return result};_.difference=function(array){var rest=flatten(arguments,true,true,1);return _.filter(array,function(value){return!_.contains(rest,value)})};_.zip=function(){return _.unzip(arguments)};_.unzip=function(array){var length=array&&_.max(array,getLength).length||0;var result=Array(length);for(var index=0;index<length;index++){result[index]=_.pluck(array,index)}return result};_.object=function(list,values){var result={};for(var i=0,length=getLength(list);i<length;i++){if(values){result[list[i]]=values[i]}else{result[list[i][0]]=list[i][1]}}return result};function createPredicateIndexFinder(dir){return function(array,predicate,context){predicate=cb(predicate,context);var length=getLength(array);var index=dir>0?0:length-1;for(;index>=0&&index<length;index+=dir){if(predicate(array[index],index,array))return index}return-1}}_.findIndex=createPredicateIndexFinder(1);_.findLastIndex=createPredicateIndexFinder(-1);_.sortedIndex=function(array,obj,iteratee,context){iteratee=cb(iteratee,context,1);var value=iteratee(obj);var low=0,high=getLength(array);while(low<high){var mid=Math.floor((low+high)/2);if(iteratee(array[mid])<value)low=mid+1;else high=mid}return low};function createIndexFinder(dir,predicateFind,sortedIndex){return function(array,item,idx){var i=0,length=getLength(array);if(typeof idx==\"number\"){if(dir>0){i=idx>=0?idx:Math.max(idx+length,i)}else{length=idx>=0?Math.min(idx+1,length):idx+length+1}}else if(sortedIndex&&idx&&length){idx=sortedIndex(array,item);return array[idx]===item?idx:-1}if(item!==item){idx=predicateFind(slice.call(array,i,length),_.isNaN);return idx>=0?idx+i:-1}for(idx=dir>0?i:length-1;idx>=0&&idx<length;idx+=dir){if(array[idx]===item)return idx}return-1}}_.indexOf=createIndexFinder(1,_.findIndex,_.sortedIndex);_.lastIndexOf=createIndexFinder(-1,_.findLastIndex);_.range=function(start,stop,step){if(stop==null){stop=start||0;start=0}step=step||1;var length=Math.max(Math.ceil((stop-start)/step),0);var range=Array(length);for(var idx=0;idx<length;idx++,start+=step){range[idx]=start}return range};var executeBound=function(sourceFunc,boundFunc,context,callingContext,args){if(!(callingContext instanceof boundFunc))return sourceFunc.apply(context,args);var self=baseCreate(sourceFunc.prototype);var result=sourceFunc.apply(self,args);if(_.isObject(result))return result;return self};_.bind=function(func,context){if(nativeBind&&func.bind===nativeBind)return nativeBind.apply(func,slice.call(arguments,1));if(!_.isFunction(func))throw new TypeError(\"Bind must be called on a function\");var args=slice.call(arguments,2);var bound=function(){return executeBound(func,bound,context,this,args.concat(slice.call(arguments)))};return bound};_.partial=function(func){var boundArgs=slice.call(arguments,1);var bound=function(){var position=0,length=boundArgs.length;var args=Array(length);for(var i=0;i<length;i++){args[i]=boundArgs[i]===_?arguments[position++]:boundArgs[i]}while(position<arguments.length)args.push(arguments[position++]);return executeBound(func,bound,this,this,args)};return bound};_.bindAll=function(obj){var i,length=arguments.length,key;if(length<=1)throw new Error(\"bindAll must be passed function names\");for(i=1;i<length;i++){key=arguments[i];obj[key]=_.bind(obj[key],obj)}return obj};_.memoize=function(func,hasher){var memoize=function(key){var cache=memoize.cache;var address=\"\"+(hasher?hasher.apply(this,arguments):key);if(!_.has(cache,address))cache[address]=func.apply(this,arguments);return cache[address]};memoize.cache={};return memoize};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args)},wait)};_.defer=_.partial(_.delay,_,1);_.throttle=function(func,wait,options){var context,args,result;var timeout=null;var previous=0;if(!options)options={};var later=function(){previous=options.leading===false?0:_.now();timeout=null;result=func.apply(context,args);if(!timeout)context=args=null};return function(){var now=_.now();if(!previous&&options.leading===false)previous=now;var remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0||remaining>wait){if(timeout){clearTimeout(timeout);timeout=null}previous=now;result=func.apply(context,args);if(!timeout)context=args=null}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining)}return result}};_.debounce=function(func,wait,immediate){var timeout,args,context,timestamp,result;var later=function(){var last=_.now()-timestamp;if(last<wait&&last>=0){timeout=setTimeout(later,wait-last)}else{timeout=null;if(!immediate){result=func.apply(context,args);if(!timeout)context=args=null}}};return function(){context=this;args=arguments;timestamp=_.now();var callNow=immediate&&!timeout;if(!timeout)timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);context=args=null}return result}};_.wrap=function(func,wrapper){return _.partial(wrapper,func)};_.negate=function(predicate){return function(){return!predicate.apply(this,arguments)}};_.compose=function(){var args=arguments;var start=args.length-1;return function(){var i=start;var result=args[start].apply(this,arguments);while(i--)result=args[i].call(this,result);return result}};_.after=function(times,func){return function(){if(--times<1){return func.apply(this,arguments)}}};_.before=function(times,func){var memo;return function(){if(--times>0){memo=func.apply(this,arguments)}if(times<=1)func=null;return memo}};_.once=_.partial(_.before,2);var hasEnumBug=!{toString:null}.propertyIsEnumerable(\"toString\");var nonEnumerableProps=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"];function collectNonEnumProps(obj,keys){var nonEnumIdx=nonEnumerableProps.length;var constructor=obj.constructor;var proto=_.isFunction(constructor)&&constructor.prototype||ObjProto;var prop=\"constructor\";if(_.has(obj,prop)&&!_.contains(keys,prop))keys.push(prop);while(nonEnumIdx--){prop=nonEnumerableProps[nonEnumIdx];if(prop in obj&&obj[prop]!==proto[prop]&&!_.contains(keys,prop)){keys.push(prop)}}}_.keys=function(obj){if(!_.isObject(obj))return[];if(nativeKeys)return nativeKeys(obj);var keys=[];for(var key in obj)if(_.has(obj,key))keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys};_.allKeys=function(obj){if(!_.isObject(obj))return[];var keys=[];for(var key in obj)keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys};_.values=function(obj){var keys=_.keys(obj);var length=keys.length;var values=Array(length);for(var i=0;i<length;i++){values[i]=obj[keys[i]]}return values};_.mapObject=function(obj,iteratee,context){iteratee=cb(iteratee,context);var keys=_.keys(obj),length=keys.length,results={},currentKey;for(var index=0;index<length;index++){currentKey=keys[index];results[currentKey]=iteratee(obj[currentKey],currentKey,obj)}return results};_.pairs=function(obj){var keys=_.keys(obj);var length=keys.length;var pairs=Array(length);for(var i=0;i<length;i++){pairs[i]=[keys[i],obj[keys[i]]]}return pairs};_.invert=function(obj){var result={};var keys=_.keys(obj);for(var i=0,length=keys.length;i<length;i++){result[obj[keys[i]]]=keys[i]}return result};_.functions=_.methods=function(obj){var names=[];for(var key in obj){if(_.isFunction(obj[key]))names.push(key)}return names.sort()};_.extend=createAssigner(_.allKeys);_.extendOwn=_.assign=createAssigner(_.keys);_.findKey=function(obj,predicate,context){predicate=cb(predicate,context);var keys=_.keys(obj),key;for(var i=0,length=keys.length;i<length;i++){key=keys[i];if(predicate(obj[key],key,obj))return key}};_.pick=function(object,oiteratee,context){var result={},obj=object,iteratee,keys;if(obj==null)return result;if(_.isFunction(oiteratee)){keys=_.allKeys(obj);iteratee=optimizeCb(oiteratee,context)}else{keys=flatten(arguments,false,false,1);iteratee=function(value,key,obj){return key in obj};obj=Object(obj)}for(var i=0,length=keys.length;i<length;i++){var key=keys[i];var value=obj[key];if(iteratee(value,key,obj))result[key]=value}return result};_.omit=function(obj,iteratee,context){if(_.isFunction(iteratee)){iteratee=_.negate(iteratee)}else{var keys=_.map(flatten(arguments,false,false,1),String);iteratee=function(value,key){return!_.contains(keys,key)}}return _.pick(obj,iteratee,context)};_.defaults=createAssigner(_.allKeys,true);_.create=function(prototype,props){var result=baseCreate(prototype);if(props)_.extendOwn(result,props);return result};_.clone=function(obj){if(!_.isObject(obj))return obj;return _.isArray(obj)?obj.slice():_.extend({},obj)};_.tap=function(obj,interceptor){interceptor(obj);return obj};_.isMatch=function(object,attrs){var keys=_.keys(attrs),length=keys.length;if(object==null)return!length;var obj=Object(object);for(var i=0;i<length;i++){var key=keys[i];if(attrs[key]!==obj[key]||!(key in obj))return false}return true};var eq=function(a,b,aStack,bStack){if(a===b)return a!==0||1/a===1/b;if(a==null||b==null)return a===b;if(a instanceof _)a=a._wrapped;if(b instanceof _)b=b._wrapped;var className=toString.call(a);if(className!==toString.call(b))return false;switch(className){case\"[object RegExp]\":case\"[object String]\":return\"\"+a===\"\"+b;case\"[object Number]\":if(+a!==+a)return+b!==+b;return+a===0?1/+a===1/b:+a===+b;case\"[object Date]\":case\"[object Boolean]\":return+a===+b}var areArrays=className===\"[object Array]\";if(!areArrays){if(typeof a!=\"object\"||typeof b!=\"object\")return false;var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(_.isFunction(aCtor)&&aCtor instanceof aCtor&&_.isFunction(bCtor)&&bCtor instanceof bCtor)&&(\"constructor\"in a&&\"constructor\"in b)){return false}}aStack=aStack||[];bStack=bStack||[];var length=aStack.length;while(length--){if(aStack[length]===a)return bStack[length]===b}aStack.push(a);bStack.push(b);if(areArrays){length=a.length;if(length!==b.length)return false;while(length--){if(!eq(a[length],b[length],aStack,bStack))return false}}else{var keys=_.keys(a),key;length=keys.length;if(_.keys(b).length!==length)return false;while(length--){key=keys[length];if(!(_.has(b,key)&&eq(a[key],b[key],aStack,bStack)))return false}}aStack.pop();bStack.pop();return true};_.isEqual=function(a,b){return eq(a,b)};_.isEmpty=function(obj){if(obj==null)return true;if(isArrayLike(obj)&&(_.isArray(obj)||_.isString(obj)||_.isArguments(obj)))return obj.length===0;return _.keys(obj).length===0};_.isElement=function(obj){return!!(obj&&obj.nodeType===1)};_.isArray=nativeIsArray||function(obj){return toString.call(obj)===\"[object Array]\"};_.isObject=function(obj){var type=typeof obj;return type===\"function\"||type===\"object\"&&!!obj};_.each([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\",\"Error\"],function(name){_[\"is\"+name]=function(obj){return toString.call(obj)===\"[object \"+name+\"]\"}});if(!_.isArguments(arguments)){_.isArguments=function(obj){return _.has(obj,\"callee\")}}if(typeof/./!=\"function\"&&typeof Int8Array!=\"object\"){_.isFunction=function(obj){return typeof obj==\"function\"||false}}_.isFinite=function(obj){return isFinite(obj)&&!isNaN(parseFloat(obj))};_.isNaN=function(obj){return _.isNumber(obj)&&obj!==+obj};_.isBoolean=function(obj){return obj===true||obj===false||toString.call(obj)===\"[object Boolean]\"};_.isNull=function(obj){return obj===null};_.isUndefined=function(obj){return obj===void 0};_.has=function(obj,key){return obj!=null&&hasOwnProperty.call(obj,key)};_.noConflict=function(){root._=previousUnderscore;return this};_.identity=function(value){return value};_.constant=function(value){return function(){return value}};_.noop=function(){};_.property=property;_.propertyOf=function(obj){return obj==null?function(){}:function(key){return obj[key]}};_.matcher=_.matches=function(attrs){attrs=_.extendOwn({},attrs);return function(obj){return _.isMatch(obj,attrs)}};_.times=function(n,iteratee,context){var accum=Array(Math.max(0,n));iteratee=optimizeCb(iteratee,context,1);for(var i=0;i<n;i++)accum[i]=iteratee(i);return accum};_.random=function(min,max){if(max==null){max=min;min=0}return min+Math.floor(Math.random()*(max-min+1))};_.now=Date.now||function(){return(new Date).getTime()};var escapeMap={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\"};var unescapeMap=_.invert(escapeMap);var createEscaper=function(map){var escaper=function(match){return map[match]};var source=\"(?:\"+_.keys(map).join(\"|\")+\")\";var testRegexp=RegExp(source);var replaceRegexp=RegExp(source,\"g\");return function(string){string=string==null?\"\":\"\"+string;return testRegexp.test(string)?string.replace(replaceRegexp,escaper):string}};_.escape=createEscaper(escapeMap);_.unescape=createEscaper(unescapeMap);_.result=function(object,property,fallback){var value=object==null?void 0:object[property];if(value===void 0){value=fallback}return _.isFunction(value)?value.call(object):value};var idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+\"\";return prefix?prefix+id:id};_.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var noMatch=/(.)^/;var escapes={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"};var escaper=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g;var escapeChar=function(match){return\"\\\\\"+escapes[match]};_.template=function(text,settings,oldSettings){if(!settings&&oldSettings)settings=oldSettings;settings=_.defaults({},settings,_.templateSettings);var matcher=RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join(\"|\")+\"|$\",\"g\");var index=0;var source=\"__p+='\";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){source+=text.slice(index,offset).replace(escaper,escapeChar);index=offset+match.length;if(escape){source+=\"'+\\n((__t=(\"+escape+\"))==null?'':_.escape(__t))+\\n'\"}else if(interpolate){source+=\"'+\\n((__t=(\"+interpolate+\"))==null?'':__t)+\\n'\"}else if(evaluate){source+=\"';\\n\"+evaluate+\"\\n__p+='\"}return match});source+=\"';\\n\";if(!settings.variable)source=\"with(obj||{}){\\n\"+source+\"}\\n\";source=\"var __t,__p='',__j=Array.prototype.join,\"+\"print=function(){__p+=__j.call(arguments,'');};\\n\"+source+\"return __p;\\n\";try{var render=new Function(settings.variable||\"obj\",\"_\",source)}catch(e){e.source=source;throw e}var template=function(data){return render.call(this,data,_)};var argument=settings.variable||\"obj\";template.source=\"function(\"+argument+\"){\\n\"+source+\"}\";return template};_.chain=function(obj){var instance=_(obj);instance._chain=true;return instance};var result=function(instance,obj){return instance._chain?_(obj).chain():obj};_.mixin=function(obj){_.each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];push.apply(args,arguments);return result(this,func.apply(_,args))}})};_.mixin(_);_.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;method.apply(obj,arguments);if((name===\"shift\"||name===\"splice\")&&obj.length===0)delete obj[0];return result(this,obj)}});_.each([\"concat\",\"join\",\"slice\"],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result(this,method.apply(this._wrapped,arguments))}});_.prototype.value=function(){return this._wrapped};_.prototype.valueOf=_.prototype.toJSON=_.prototype.value;_.prototype.toString=function(){return\"\"+this._wrapped};if(typeof define===\"function\"&&define.amd){define(\"underscore\",[],function(){return _})}}).call(this);\n//# sourceMappingURL=underscore.min.map;\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    module.exports = mod();\n  else if (typeof define == \"function\" && define.amd) // AMD\n    return define('codemirror/lib/codemirror',[], mod);\n  else // Plain browser env\n    this.CodeMirror = mod();\n})(function() {\n  \"use strict\";\n\n  // BROWSER SNIFFING\n\n  // Kludges for bugs and behavior differences that can't be feature\n  // detected are enabled based on userAgent etc sniffing.\n\n  var gecko = /gecko\\/\\d/i.test(navigator.userAgent);\n  var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n  var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n  var ie = ie_upto10 || ie_11up;\n  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);\n  var webkit = /WebKit\\//.test(navigator.userAgent);\n  var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(navigator.userAgent);\n  var chrome = /Chrome\\//.test(navigator.userAgent);\n  var presto = /Opera\\//.test(navigator.userAgent);\n  var safari = /Apple Computer/.test(navigator.vendor);\n  var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(navigator.userAgent);\n  var phantom = /PhantomJS/.test(navigator.userAgent);\n\n  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n  // This is woefully incomplete. Suggestions for alternative methods welcome.\n  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);\n  var mac = ios || /Mac/.test(navigator.platform);\n  var windows = /win/i.test(navigator.platform);\n\n  var presto_version = presto && navigator.userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n  if (presto_version) presto_version = Number(presto_version[1]);\n  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n  var captureRightClick = gecko || (ie && ie_version >= 9);\n\n  // Optimize some code when these features are not used.\n  var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n  // EDITOR CONSTRUCTOR\n\n  // A CodeMirror instance represents an editor. This is the object\n  // that user code is usually dealing with.\n\n  function CodeMirror(place, options) {\n    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);\n\n    this.options = options = options ? copyObj(options) : {};\n    // Determine effective options based on given values and defaults.\n    copyObj(defaults, options, false);\n    setGuttersForLineNumbers(options);\n\n    var doc = options.value;\n    if (typeof doc == \"string\") doc = new Doc(doc, options.mode);\n    this.doc = doc;\n\n    var input = new CodeMirror.inputStyles[options.inputStyle](this);\n    var display = this.display = new Display(place, doc, input);\n    display.wrapper.CodeMirror = this;\n    updateGutters(this);\n    themeChanged(this);\n    if (options.lineWrapping)\n      this.display.wrapper.className += \" CodeMirror-wrap\";\n    if (options.autofocus && !mobile) display.input.focus();\n    initScrollbars(this);\n\n    this.state = {\n      keyMaps: [],  // stores maps added by addKeyMap\n      overlays: [], // highlighting overlays, as added by addOverlay\n      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info\n      overwrite: false,\n      delayingBlurEvent: false,\n      focused: false,\n      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n      draggingText: false,\n      highlight: new Delayed(), // stores highlight worker timeout\n      keySeq: null,  // Unfinished key sequence\n      specialChars: null\n    };\n\n    var cm = this;\n\n    // Override magic textarea content restore that IE sometimes does\n    // on our hidden textarea on reload\n    if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);\n\n    registerEventHandlers(this);\n    ensureGlobalHandlers();\n\n    startOperation(this);\n    this.curOp.forceUpdate = true;\n    attachDoc(this, doc);\n\n    if ((options.autofocus && !mobile) || cm.hasFocus())\n      setTimeout(bind(onFocus, this), 20);\n    else\n      onBlur(this);\n\n    for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))\n      optionHandlers[opt](this, options[opt], Init);\n    maybeUpdateLineNumberWidth(this);\n    if (options.finishInit) options.finishInit(this);\n    for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);\n    endOperation(this);\n    // Suppress optimizelegibility in Webkit, since it breaks text\n    // measuring on line wrapping boundaries.\n    if (webkit && options.lineWrapping &&\n        getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n      display.lineDiv.style.textRendering = \"auto\";\n  }\n\n  // DISPLAY CONSTRUCTOR\n\n  // The display handles the DOM integration, both for input reading\n  // and content drawing. It holds references to DOM nodes and\n  // display-related state.\n\n  function Display(place, doc, input) {\n    var d = this;\n    this.input = input;\n\n    // Covers bottom-right square when both scrollbars are present.\n    d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n    d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Covers bottom of gutter when coverGutterNextToScrollbar is on\n    // and h scrollbar is present.\n    d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n    d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Will contain the actual code, positioned to cover the viewport.\n    d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n    // Elements are added to these to represent selection and cursors.\n    d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n    d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n    // A visibility: hidden element used to find the size of things.\n    d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n    // When lines outside of the viewport are measured, they are drawn in this.\n    d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n    // Wraps everything that needs to exist inside the vertically-padded coordinate system\n    d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n                      null, \"position: relative; outline: none\");\n    // Moved around its parent to cover visible view.\n    d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n    // Set to the height of the document, allowing scrolling.\n    d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n    d.sizerWidth = null;\n    // Behavior of elts with overflow: auto and padding is\n    // inconsistent across browsers. This is used to ensure the\n    // scrollable area is big enough.\n    d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n    // Will contain the gutters, if any.\n    d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n    d.lineGutter = null;\n    // Actual scrollable element.\n    d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n    d.scroller.setAttribute(\"tabIndex\", \"-1\");\n    // The element in which the editor lives.\n    d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n    if (!webkit && !(gecko && mobile)) d.scroller.draggable = true;\n\n    if (place) {\n      if (place.appendChild) place.appendChild(d.wrapper);\n      else place(d.wrapper);\n    }\n\n    // Current rendered range (may be bigger than the view window).\n    d.viewFrom = d.viewTo = doc.first;\n    d.reportedViewFrom = d.reportedViewTo = doc.first;\n    // Information about the rendered lines.\n    d.view = [];\n    d.renderedView = null;\n    // Holds info about a single rendered line when it was rendered\n    // for measurement, while not in view.\n    d.externalMeasured = null;\n    // Empty space (in pixels) above the view\n    d.viewOffset = 0;\n    d.lastWrapHeight = d.lastWrapWidth = 0;\n    d.updateLineNumbers = null;\n\n    d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n    d.scrollbarsClipped = false;\n\n    // Used to only resize the line number gutter when necessary (when\n    // the amount of lines crosses a boundary that makes its width change)\n    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n    // Set to true when a non-horizontal-scrolling line widget is\n    // added. As an optimization, line widget aligning is skipped when\n    // this is false.\n    d.alignWidgets = false;\n\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n    // Tracks the maximum line length so that the horizontal scrollbar\n    // can be kept static when scrolling.\n    d.maxLine = null;\n    d.maxLineLength = 0;\n    d.maxLineChanged = false;\n\n    // Used for measuring wheel scrolling granularity\n    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n    // True when shift is held down.\n    d.shift = false;\n\n    // Used to track whether anything happened since the context menu\n    // was opened.\n    d.selForContextMenu = null;\n\n    d.activeTouch = null;\n\n    input.init(d);\n  }\n\n  // STATE UPDATES\n\n  // Used to get the editor into a consistent state again when options change.\n\n  function loadMode(cm) {\n    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n    resetModeState(cm);\n  }\n\n  function resetModeState(cm) {\n    cm.doc.iter(function(line) {\n      if (line.stateAfter) line.stateAfter = null;\n      if (line.styles) line.styles = null;\n    });\n    cm.doc.frontier = cm.doc.first;\n    startWorker(cm, 100);\n    cm.state.modeGen++;\n    if (cm.curOp) regChange(cm);\n  }\n\n  function wrappingChanged(cm) {\n    if (cm.options.lineWrapping) {\n      addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      cm.display.sizer.style.minWidth = \"\";\n      cm.display.sizerWidth = null;\n    } else {\n      rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      findMaxLine(cm);\n    }\n    estimateLineHeights(cm);\n    regChange(cm);\n    clearCaches(cm);\n    setTimeout(function(){updateScrollbars(cm);}, 100);\n  }\n\n  // Returns a function that estimates the height of a line, to use as\n  // first approximation until the line becomes visible (and is thus\n  // properly measurable).\n  function estimateHeight(cm) {\n    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n    return function(line) {\n      if (lineIsHidden(cm.doc, line)) return 0;\n\n      var widgetsHeight = 0;\n      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n      }\n\n      if (wrapping)\n        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n      else\n        return widgetsHeight + th;\n    };\n  }\n\n  function estimateLineHeights(cm) {\n    var doc = cm.doc, est = estimateHeight(cm);\n    doc.iter(function(line) {\n      var estHeight = est(line);\n      if (estHeight != line.height) updateLineHeight(line, estHeight);\n    });\n  }\n\n  function themeChanged(cm) {\n    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n      cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n    clearCaches(cm);\n  }\n\n  function guttersChanged(cm) {\n    updateGutters(cm);\n    regChange(cm);\n    setTimeout(function(){alignHorizontally(cm);}, 20);\n  }\n\n  // Rebuild the gutter elements, ensure the margin to the left of the\n  // code matches their width.\n  function updateGutters(cm) {\n    var gutters = cm.display.gutters, specs = cm.options.gutters;\n    removeChildren(gutters);\n    for (var i = 0; i < specs.length; ++i) {\n      var gutterClass = specs[i];\n      var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n      if (gutterClass == \"CodeMirror-linenumbers\") {\n        cm.display.lineGutter = gElt;\n        gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n      }\n    }\n    gutters.style.display = i ? \"\" : \"none\";\n    updateGutterSpace(cm);\n  }\n\n  function updateGutterSpace(cm) {\n    var width = cm.display.gutters.offsetWidth;\n    cm.display.sizer.style.marginLeft = width + \"px\";\n  }\n\n  // Compute the character length of a line, taking into account\n  // collapsed ranges (see markText) that might hide parts, and join\n  // other lines onto it.\n  function lineLength(line) {\n    if (line.height == 0) return 0;\n    var len = line.text.length, merged, cur = line;\n    while (merged = collapsedSpanAtStart(cur)) {\n      var found = merged.find(0, true);\n      cur = found.from.line;\n      len += found.from.ch - found.to.ch;\n    }\n    cur = line;\n    while (merged = collapsedSpanAtEnd(cur)) {\n      var found = merged.find(0, true);\n      len -= cur.text.length - found.from.ch;\n      cur = found.to.line;\n      len += cur.text.length - found.to.ch;\n    }\n    return len;\n  }\n\n  // Find the longest line in the document.\n  function findMaxLine(cm) {\n    var d = cm.display, doc = cm.doc;\n    d.maxLine = getLine(doc, doc.first);\n    d.maxLineLength = lineLength(d.maxLine);\n    d.maxLineChanged = true;\n    doc.iter(function(line) {\n      var len = lineLength(line);\n      if (len > d.maxLineLength) {\n        d.maxLineLength = len;\n        d.maxLine = line;\n      }\n    });\n  }\n\n  // Make sure the gutters options contains the element\n  // \"CodeMirror-linenumbers\" when the lineNumbers option is true.\n  function setGuttersForLineNumbers(options) {\n    var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n    if (found == -1 && options.lineNumbers) {\n      options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n    } else if (found > -1 && !options.lineNumbers) {\n      options.gutters = options.gutters.slice(0);\n      options.gutters.splice(found, 1);\n    }\n  }\n\n  // SCROLLBARS\n\n  // Prepare DOM reads needed to update the scrollbars. Done in one\n  // shot to minimize update/measure roundtrips.\n  function measureForScrollbars(cm) {\n    var d = cm.display, gutterW = d.gutters.offsetWidth;\n    var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n    return {\n      clientHeight: d.scroller.clientHeight,\n      viewHeight: d.wrapper.clientHeight,\n      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n      viewWidth: d.wrapper.clientWidth,\n      barLeft: cm.options.fixedGutter ? gutterW : 0,\n      docHeight: docH,\n      scrollHeight: docH + scrollGap(cm) + d.barHeight,\n      nativeBarWidth: d.nativeBarWidth,\n      gutterWidth: gutterW\n    };\n  }\n\n  function NativeScrollbars(place, scroll, cm) {\n    this.cm = cm;\n    var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n    var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n    place(vert); place(horiz);\n\n    on(vert, \"scroll\", function() {\n      if (vert.clientHeight) scroll(vert.scrollTop, \"vertical\");\n    });\n    on(horiz, \"scroll\", function() {\n      if (horiz.clientWidth) scroll(horiz.scrollLeft, \"horizontal\");\n    });\n\n    this.checkedOverlay = false;\n    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n    if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\";\n  }\n\n  NativeScrollbars.prototype = copyObj({\n    update: function(measure) {\n      var needsH = measure.scrollWidth > measure.clientWidth + 1;\n      var needsV = measure.scrollHeight > measure.clientHeight + 1;\n      var sWidth = measure.nativeBarWidth;\n\n      if (needsV) {\n        this.vert.style.display = \"block\";\n        this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n        var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n        // A bug in IE8 can cause this value to be negative, so guard it.\n        this.vert.firstChild.style.height =\n          Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n      } else {\n        this.vert.style.display = \"\";\n        this.vert.firstChild.style.height = \"0\";\n      }\n\n      if (needsH) {\n        this.horiz.style.display = \"block\";\n        this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n        this.horiz.style.left = measure.barLeft + \"px\";\n        var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n        this.horiz.firstChild.style.width =\n          (measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n      } else {\n        this.horiz.style.display = \"\";\n        this.horiz.firstChild.style.width = \"0\";\n      }\n\n      if (!this.checkedOverlay && measure.clientHeight > 0) {\n        if (sWidth == 0) this.overlayHack();\n        this.checkedOverlay = true;\n      }\n\n      return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0};\n    },\n    setScrollLeft: function(pos) {\n      if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos;\n    },\n    setScrollTop: function(pos) {\n      if (this.vert.scrollTop != pos) this.vert.scrollTop = pos;\n    },\n    overlayHack: function() {\n      var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n      this.horiz.style.minHeight = this.vert.style.minWidth = w;\n      var self = this;\n      var barMouseDown = function(e) {\n        if (e_target(e) != self.vert && e_target(e) != self.horiz)\n          operation(self.cm, onMouseDown)(e);\n      };\n      on(this.vert, \"mousedown\", barMouseDown);\n      on(this.horiz, \"mousedown\", barMouseDown);\n    },\n    clear: function() {\n      var parent = this.horiz.parentNode;\n      parent.removeChild(this.horiz);\n      parent.removeChild(this.vert);\n    }\n  }, NativeScrollbars.prototype);\n\n  function NullScrollbars() {}\n\n  NullScrollbars.prototype = copyObj({\n    update: function() { return {bottom: 0, right: 0}; },\n    setScrollLeft: function() {},\n    setScrollTop: function() {},\n    clear: function() {}\n  }, NullScrollbars.prototype);\n\n  CodeMirror.scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n  function initScrollbars(cm) {\n    if (cm.display.scrollbars) {\n      cm.display.scrollbars.clear();\n      if (cm.display.scrollbars.addClass)\n        rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n    }\n\n    cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {\n      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n      // Prevent clicks in the scrollbars from killing focus\n      on(node, \"mousedown\", function() {\n        if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0);\n      });\n      node.setAttribute(\"cm-not-content\", \"true\");\n    }, function(pos, axis) {\n      if (axis == \"horizontal\") setScrollLeft(cm, pos);\n      else setScrollTop(cm, pos);\n    }, cm);\n    if (cm.display.scrollbars.addClass)\n      addClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n  }\n\n  function updateScrollbars(cm, measure) {\n    if (!measure) measure = measureForScrollbars(cm);\n    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n    updateScrollbarsInner(cm, measure);\n    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n        updateHeightsInViewport(cm);\n      updateScrollbarsInner(cm, measureForScrollbars(cm));\n      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n    }\n  }\n\n  // Re-synchronize the fake scrollbars with the actual size of the\n  // content.\n  function updateScrollbarsInner(cm, measure) {\n    var d = cm.display;\n    var sizes = d.scrollbars.update(measure);\n\n    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n\n    if (sizes.right && sizes.bottom) {\n      d.scrollbarFiller.style.display = \"block\";\n      d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n      d.scrollbarFiller.style.width = sizes.right + \"px\";\n    } else d.scrollbarFiller.style.display = \"\";\n    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n      d.gutterFiller.style.display = \"block\";\n      d.gutterFiller.style.height = sizes.bottom + \"px\";\n      d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n    } else d.gutterFiller.style.display = \"\";\n  }\n\n  // Compute the lines that are visible in a given viewport (defaults\n  // the the current scroll position). viewport may contain top,\n  // height, and ensure (see op.scrollToPos) properties.\n  function visibleLines(display, doc, viewport) {\n    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n    top = Math.floor(top - paddingTop(display));\n    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n    // forces those lines into the viewport (if possible).\n    if (viewport && viewport.ensure) {\n      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n      if (ensureFrom < from) {\n        from = ensureFrom;\n        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n        to = ensureTo;\n      }\n    }\n    return {from: from, to: Math.max(to, from + 1)};\n  }\n\n  // LINE NUMBERS\n\n  // Re-align line numbers and gutter marks to compensate for\n  // horizontal scrolling.\n  function alignHorizontally(cm) {\n    var display = cm.display, view = display.view;\n    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;\n    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n    var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n    for (var i = 0; i < view.length; i++) if (!view[i].hidden) {\n      if (cm.options.fixedGutter && view[i].gutter)\n        view[i].gutter.style.left = left;\n      var align = view[i].alignable;\n      if (align) for (var j = 0; j < align.length; j++)\n        align[j].style.left = left;\n    }\n    if (cm.options.fixedGutter)\n      display.gutters.style.left = (comp + gutterW) + \"px\";\n  }\n\n  // Used to ensure that the line number gutter is still the right\n  // size for the current document size. Returns true when an update\n  // is needed.\n  function maybeUpdateLineNumberWidth(cm) {\n    if (!cm.options.lineNumbers) return false;\n    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n    if (last.length != display.lineNumChars) {\n      var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n                                                 \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n      display.lineGutter.style.width = \"\";\n      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n      display.lineNumWidth = display.lineNumInnerWidth + padding;\n      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n      display.lineGutter.style.width = display.lineNumWidth + \"px\";\n      updateGutterSpace(cm);\n      return true;\n    }\n    return false;\n  }\n\n  function lineNumberFor(options, i) {\n    return String(options.lineNumberFormatter(i + options.firstLineNumber));\n  }\n\n  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n  // but using getBoundingClientRect to get a sub-pixel-accurate\n  // result.\n  function compensateForHScroll(display) {\n    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;\n  }\n\n  // DISPLAY DRAWING\n\n  function DisplayUpdate(cm, viewport, force) {\n    var display = cm.display;\n\n    this.viewport = viewport;\n    // Store some values that we'll need later (but don't want to force a relayout for)\n    this.visible = visibleLines(display, cm.doc, viewport);\n    this.editorIsHidden = !display.wrapper.offsetWidth;\n    this.wrapperHeight = display.wrapper.clientHeight;\n    this.wrapperWidth = display.wrapper.clientWidth;\n    this.oldDisplayWidth = displayWidth(cm);\n    this.force = force;\n    this.dims = getDimensions(cm);\n    this.events = [];\n  }\n\n  DisplayUpdate.prototype.signal = function(emitter, type) {\n    if (hasHandler(emitter, type))\n      this.events.push(arguments);\n  };\n  DisplayUpdate.prototype.finish = function() {\n    for (var i = 0; i < this.events.length; i++)\n      signal.apply(null, this.events[i]);\n  };\n\n  function maybeClipScrollbars(cm) {\n    var display = cm.display;\n    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n      display.heightForcer.style.height = scrollGap(cm) + \"px\";\n      display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n      display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n      display.scrollbarsClipped = true;\n    }\n  }\n\n  // Does the actual updating of the line display. Bails out\n  // (returning false) when there is nothing to be done and forced is\n  // false.\n  function updateDisplayIfNeeded(cm, update) {\n    var display = cm.display, doc = cm.doc;\n\n    if (update.editorIsHidden) {\n      resetView(cm);\n      return false;\n    }\n\n    // Bail out if the visible area is already rendered and nothing changed.\n    if (!update.force &&\n        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n        display.renderedView == display.view && countDirtyView(cm) == 0)\n      return false;\n\n    if (maybeUpdateLineNumberWidth(cm)) {\n      resetView(cm);\n      update.dims = getDimensions(cm);\n    }\n\n    // Compute a suitable new viewport (from & to)\n    var end = doc.first + doc.size;\n    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n    if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);\n    if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);\n    if (sawCollapsedSpans) {\n      from = visualLineNo(cm.doc, from);\n      to = visualLineEndNo(cm.doc, to);\n    }\n\n    var different = from != display.viewFrom || to != display.viewTo ||\n      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n    adjustView(cm, from, to);\n\n    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n    // Position the mover div to align with the current scroll position\n    cm.display.mover.style.top = display.viewOffset + \"px\";\n\n    var toUpdate = countDirtyView(cm);\n    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n      return false;\n\n    // For big changes, we hide the enclosing element during the\n    // update, since that speeds up the operations on most browsers.\n    var focused = activeElt();\n    if (toUpdate > 4) display.lineDiv.style.display = \"none\";\n    patchDisplay(cm, display.updateLineNumbers, update.dims);\n    if (toUpdate > 4) display.lineDiv.style.display = \"\";\n    display.renderedView = display.view;\n    // There might have been a widget with a focused element that got\n    // hidden or updated, if so re-focus it.\n    if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();\n\n    // Prevent selection and cursors from interfering with the scroll\n    // width and height.\n    removeChildren(display.cursorDiv);\n    removeChildren(display.selectionDiv);\n    display.gutters.style.height = 0;\n\n    if (different) {\n      display.lastWrapHeight = update.wrapperHeight;\n      display.lastWrapWidth = update.wrapperWidth;\n      startWorker(cm, 400);\n    }\n\n    display.updateLineNumbers = null;\n\n    return true;\n  }\n\n  function postUpdateDisplay(cm, update) {\n    var viewport = update.viewport;\n    for (var first = true;; first = false) {\n      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n        // Clip forced viewport to actual scrollable area.\n        if (viewport && viewport.top != null)\n          viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)};\n        // Updated line heights might result in the drawn area not\n        // actually covering the viewport. Keep looping until it does.\n        update.visible = visibleLines(cm.display, cm.doc, viewport);\n        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n          break;\n      }\n      if (!updateDisplayIfNeeded(cm, update)) break;\n      updateHeightsInViewport(cm);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n    }\n\n    update.signal(cm, \"update\", cm);\n    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n      update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n    }\n  }\n\n  function updateDisplaySimple(cm, viewport) {\n    var update = new DisplayUpdate(cm, viewport);\n    if (updateDisplayIfNeeded(cm, update)) {\n      updateHeightsInViewport(cm);\n      postUpdateDisplay(cm, update);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      setDocumentHeight(cm, barMeasure);\n      updateScrollbars(cm, barMeasure);\n      update.finish();\n    }\n  }\n\n  function setDocumentHeight(cm, measure) {\n    cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n    var total = measure.docHeight + cm.display.barHeight;\n    cm.display.heightForcer.style.top = total + \"px\";\n    cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + \"px\";\n  }\n\n  // Read the actual heights of the rendered lines, and update their\n  // stored heights to match.\n  function updateHeightsInViewport(cm) {\n    var display = cm.display;\n    var prevBottom = display.lineDiv.offsetTop;\n    for (var i = 0; i < display.view.length; i++) {\n      var cur = display.view[i], height;\n      if (cur.hidden) continue;\n      if (ie && ie_version < 8) {\n        var bot = cur.node.offsetTop + cur.node.offsetHeight;\n        height = bot - prevBottom;\n        prevBottom = bot;\n      } else {\n        var box = cur.node.getBoundingClientRect();\n        height = box.bottom - box.top;\n      }\n      var diff = cur.line.height - height;\n      if (height < 2) height = textHeight(display);\n      if (diff > .001 || diff < -.001) {\n        updateLineHeight(cur.line, height);\n        updateWidgetHeight(cur.line);\n        if (cur.rest) for (var j = 0; j < cur.rest.length; j++)\n          updateWidgetHeight(cur.rest[j]);\n      }\n    }\n  }\n\n  // Read and store the height of line widgets associated with the\n  // given line.\n  function updateWidgetHeight(line) {\n    if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n      line.widgets[i].height = line.widgets[i].node.offsetHeight;\n  }\n\n  // Do a bulk-read of the DOM positions and sizes needed to draw the\n  // view, so that we don't interleave reading and writing to the DOM.\n  function getDimensions(cm) {\n    var d = cm.display, left = {}, width = {};\n    var gutterLeft = d.gutters.clientLeft;\n    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n      left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n      width[cm.options.gutters[i]] = n.clientWidth;\n    }\n    return {fixedPos: compensateForHScroll(d),\n            gutterTotalWidth: d.gutters.offsetWidth,\n            gutterLeft: left,\n            gutterWidth: width,\n            wrapperWidth: d.wrapper.clientWidth};\n  }\n\n  // Sync the actual display DOM structure with display.view, removing\n  // nodes for lines that are no longer in view, and creating the ones\n  // that are not there yet, and updating the ones that are out of\n  // date.\n  function patchDisplay(cm, updateNumbersFrom, dims) {\n    var display = cm.display, lineNumbers = cm.options.lineNumbers;\n    var container = display.lineDiv, cur = container.firstChild;\n\n    function rm(node) {\n      var next = node.nextSibling;\n      // Works around a throw-scroll bug in OS X Webkit\n      if (webkit && mac && cm.display.currentWheelTarget == node)\n        node.style.display = \"none\";\n      else\n        node.parentNode.removeChild(node);\n      return next;\n    }\n\n    var view = display.view, lineN = display.viewFrom;\n    // Loop over the elements in the view, syncing cur (the DOM nodes\n    // in display.lineDiv) with the view as we go.\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (lineView.hidden) {\n      } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n        var node = buildLineElement(cm, lineView, lineN, dims);\n        container.insertBefore(node, cur);\n      } else { // Already drawn\n        while (cur != lineView.node) cur = rm(cur);\n        var updateNumber = lineNumbers && updateNumbersFrom != null &&\n          updateNumbersFrom <= lineN && lineView.lineNumber;\n        if (lineView.changes) {\n          if (indexOf(lineView.changes, \"gutter\") > -1) updateNumber = false;\n          updateLineForChanges(cm, lineView, lineN, dims);\n        }\n        if (updateNumber) {\n          removeChildren(lineView.lineNumber);\n          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n        }\n        cur = lineView.node.nextSibling;\n      }\n      lineN += lineView.size;\n    }\n    while (cur) cur = rm(cur);\n  }\n\n  // When an aspect of a line changes, a string is added to\n  // lineView.changes. This updates the relevant part of the line's\n  // DOM structure.\n  function updateLineForChanges(cm, lineView, lineN, dims) {\n    for (var j = 0; j < lineView.changes.length; j++) {\n      var type = lineView.changes[j];\n      if (type == \"text\") updateLineText(cm, lineView);\n      else if (type == \"gutter\") updateLineGutter(cm, lineView, lineN, dims);\n      else if (type == \"class\") updateLineClasses(lineView);\n      else if (type == \"widget\") updateLineWidgets(cm, lineView, dims);\n    }\n    lineView.changes = null;\n  }\n\n  // Lines with gutter elements, widgets or a background class need to\n  // be wrapped, and have the extra elements added to the wrapper div\n  function ensureLineWrapped(lineView) {\n    if (lineView.node == lineView.text) {\n      lineView.node = elt(\"div\", null, null, \"position: relative\");\n      if (lineView.text.parentNode)\n        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);\n      lineView.node.appendChild(lineView.text);\n      if (ie && ie_version < 8) lineView.node.style.zIndex = 2;\n    }\n    return lineView.node;\n  }\n\n  function updateLineBackground(lineView) {\n    var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n    if (cls) cls += \" CodeMirror-linebackground\";\n    if (lineView.background) {\n      if (cls) lineView.background.className = cls;\n      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n    } else if (cls) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n    }\n  }\n\n  // Wrapper around buildLineContent which will reuse the structure\n  // in display.externalMeasured when possible.\n  function getLineContent(cm, lineView) {\n    var ext = cm.display.externalMeasured;\n    if (ext && ext.line == lineView.line) {\n      cm.display.externalMeasured = null;\n      lineView.measure = ext.measure;\n      return ext.built;\n    }\n    return buildLineContent(cm, lineView);\n  }\n\n  // Redraw the line's text. Interacts with the background and text\n  // classes because the mode may output tokens that influence these\n  // classes.\n  function updateLineText(cm, lineView) {\n    var cls = lineView.text.className;\n    var built = getLineContent(cm, lineView);\n    if (lineView.text == lineView.node) lineView.node = built.pre;\n    lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n    lineView.text = built.pre;\n    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n      lineView.bgClass = built.bgClass;\n      lineView.textClass = built.textClass;\n      updateLineClasses(lineView);\n    } else if (cls) {\n      lineView.text.className = cls;\n    }\n  }\n\n  function updateLineClasses(lineView) {\n    updateLineBackground(lineView);\n    if (lineView.line.wrapClass)\n      ensureLineWrapped(lineView).className = lineView.line.wrapClass;\n    else if (lineView.node != lineView.text)\n      lineView.node.className = \"\";\n    var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n    lineView.text.className = textClass || \"\";\n  }\n\n  function updateLineGutter(cm, lineView, lineN, dims) {\n    if (lineView.gutter) {\n      lineView.node.removeChild(lineView.gutter);\n      lineView.gutter = null;\n    }\n    var markers = lineView.line.gutterMarkers;\n    if (cm.options.lineNumbers || markers) {\n      var wrap = ensureLineWrapped(lineView);\n      var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", \"left: \" +\n                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +\n                                             \"px; width: \" + dims.gutterTotalWidth + \"px\");\n      cm.display.input.setUneditable(gutterWrap);\n      wrap.insertBefore(gutterWrap, lineView.text);\n      if (lineView.line.gutterClass)\n        gutterWrap.className += \" \" + lineView.line.gutterClass;\n      if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n        lineView.lineNumber = gutterWrap.appendChild(\n          elt(\"div\", lineNumberFor(cm.options, lineN),\n              \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n              \"left: \" + dims.gutterLeft[\"CodeMirror-linenumbers\"] + \"px; width: \"\n              + cm.display.lineNumInnerWidth + \"px\"));\n      if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {\n        var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n        if (found)\n          gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\", \"left: \" +\n                                     dims.gutterLeft[id] + \"px; width: \" + dims.gutterWidth[id] + \"px\"));\n      }\n    }\n  }\n\n  function updateLineWidgets(cm, lineView, dims) {\n    if (lineView.alignable) lineView.alignable = null;\n    for (var node = lineView.node.firstChild, next; node; node = next) {\n      var next = node.nextSibling;\n      if (node.className == \"CodeMirror-linewidget\")\n        lineView.node.removeChild(node);\n    }\n    insertLineWidgets(cm, lineView, dims);\n  }\n\n  // Build a line's DOM representation from scratch\n  function buildLineElement(cm, lineView, lineN, dims) {\n    var built = getLineContent(cm, lineView);\n    lineView.text = lineView.node = built.pre;\n    if (built.bgClass) lineView.bgClass = built.bgClass;\n    if (built.textClass) lineView.textClass = built.textClass;\n\n    updateLineClasses(lineView);\n    updateLineGutter(cm, lineView, lineN, dims);\n    insertLineWidgets(cm, lineView, dims);\n    return lineView.node;\n  }\n\n  // A lineView may contain multiple logical lines (when merged by\n  // collapsed spans). The widgets for all of them need to be drawn.\n  function insertLineWidgets(cm, lineView, dims) {\n    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n    if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n      insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);\n  }\n\n  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n    if (!line.widgets) return;\n    var wrap = ensureLineWrapped(lineView);\n    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n      var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n      if (!widget.handleMouseEvents) node.setAttribute(\"cm-ignore-events\", \"true\");\n      positionLineWidget(widget, node, lineView, dims);\n      cm.display.input.setUneditable(node);\n      if (allowAbove && widget.above)\n        wrap.insertBefore(node, lineView.gutter || lineView.text);\n      else\n        wrap.appendChild(node);\n      signalLater(widget, \"redraw\");\n    }\n  }\n\n  function positionLineWidget(widget, node, lineView, dims) {\n    if (widget.noHScroll) {\n      (lineView.alignable || (lineView.alignable = [])).push(node);\n      var width = dims.wrapperWidth;\n      node.style.left = dims.fixedPos + \"px\";\n      if (!widget.coverGutter) {\n        width -= dims.gutterTotalWidth;\n        node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n      }\n      node.style.width = width + \"px\";\n    }\n    if (widget.coverGutter) {\n      node.style.zIndex = 5;\n      node.style.position = \"relative\";\n      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + \"px\";\n    }\n  }\n\n  // POSITION OBJECT\n\n  // A Pos instance represents a position within the text.\n  var Pos = CodeMirror.Pos = function(line, ch) {\n    if (!(this instanceof Pos)) return new Pos(line, ch);\n    this.line = line; this.ch = ch;\n  };\n\n  // Compare two positions, return 0 if they are the same, a negative\n  // number when a is less, and a positive number otherwise.\n  var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };\n\n  function copyPos(x) {return Pos(x.line, x.ch);}\n  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }\n  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }\n\n  // INPUT HANDLING\n\n  function ensureFocus(cm) {\n    if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n  }\n\n  function isReadOnly(cm) {\n    return cm.options.readOnly || cm.doc.cantEdit;\n  }\n\n  // This will be set to an array of strings when copying, so that,\n  // when pasting, we know what kind of selections the copied text\n  // was made out of.\n  var lastCopied = null;\n\n  function applyTextInput(cm, inserted, deleted, sel, origin) {\n    var doc = cm.doc;\n    cm.display.shift = false;\n    if (!sel) sel = doc.sel;\n\n    var paste = cm.state.pasteIncoming || origin == \"paste\";\n    var textLines = splitLines(inserted), multiPaste = null;\n    // When pasing N lines into N selections, insert one line per selection\n    if (paste && sel.ranges.length > 1) {\n      if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n        multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n      else if (textLines.length == sel.ranges.length)\n        multiPaste = map(textLines, function(l) { return [l]; });\n    }\n\n    // Normal behavior is to insert the new text into every selection\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      var from = range.from(), to = range.to();\n      if (range.empty()) {\n        if (deleted && deleted > 0) // Handle deletion\n          from = Pos(from.line, from.ch - deleted);\n        else if (cm.state.overwrite && !paste) // Handle overwrite\n          to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n      }\n      var updateInput = cm.curOp.updateInput;\n      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n                         origin: origin || (paste ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\")};\n      makeChange(cm.doc, changeEvent);\n      signalLater(cm, \"inputRead\", cm, changeEvent);\n    }\n    if (inserted && !paste)\n      triggerElectric(cm, inserted);\n\n    ensureCursorVisible(cm);\n    cm.curOp.updateInput = updateInput;\n    cm.curOp.typing = true;\n    cm.state.pasteIncoming = cm.state.cutIncoming = false;\n  }\n\n  function handlePaste(e, cm) {\n    var pasted = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n    if (pasted) {\n      e.preventDefault();\n      runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, \"paste\"); });\n      return true;\n    }\n  }\n\n  function triggerElectric(cm, inserted) {\n    // When an 'electric' character is inserted, immediately trigger a reindent\n    if (!cm.options.electricChars || !cm.options.smartIndent) return;\n    var sel = cm.doc.sel;\n\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue;\n      var mode = cm.getModeAt(range.head);\n      var indented = false;\n      if (mode.electricChars) {\n        for (var j = 0; j < mode.electricChars.length; j++)\n          if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n            indented = indentLine(cm, range.head.line, \"smart\");\n            break;\n          }\n      } else if (mode.electricInput) {\n        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n          indented = indentLine(cm, range.head.line, \"smart\");\n      }\n      if (indented) signalLater(cm, \"electricInput\", cm, range.head.line);\n    }\n  }\n\n  function copyableRanges(cm) {\n    var text = [], ranges = [];\n    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n      var line = cm.doc.sel.ranges[i].head.line;\n      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n      ranges.push(lineRange);\n      text.push(cm.getRange(lineRange.anchor, lineRange.head));\n    }\n    return {text: text, ranges: ranges};\n  }\n\n  function disableBrowserMagic(field) {\n    field.setAttribute(\"autocorrect\", \"off\");\n    field.setAttribute(\"autocapitalize\", \"off\");\n    field.setAttribute(\"spellcheck\", \"false\");\n  }\n\n  // TEXTAREA INPUT STYLE\n\n  function TextareaInput(cm) {\n    this.cm = cm;\n    // See input.poll and input.reset\n    this.prevInput = \"\";\n\n    // Flag that indicates whether we expect input to appear real soon\n    // now (after some event like 'keypress' or 'input') and are\n    // polling intensively.\n    this.pollingFast = false;\n    // Self-resetting timeout for the poller\n    this.polling = new Delayed();\n    // Tracks when input.reset has punted to just putting a short\n    // string into the textarea instead of the full selection.\n    this.inaccurateSelection = false;\n    // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n    this.hasSelection = false;\n    this.composing = null;\n  };\n\n  function hiddenTextarea() {\n    var te = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n    var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n    // The textarea is kept positioned near the cursor to prevent the\n    // fact that it'll be scrolled into view on input from scrolling\n    // our fake cursor out of view. On webkit, when wrap=off, paste is\n    // very slow. So make the area wide instead.\n    if (webkit) te.style.width = \"1000px\";\n    else te.setAttribute(\"wrap\", \"off\");\n    // If border: 0; -- iOS fails to open keyboard (issue #1287)\n    if (ios) te.style.border = \"1px solid black\";\n    disableBrowserMagic(te);\n    return div;\n  }\n\n  TextareaInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = this.cm;\n\n      // Wraps and hides input textarea\n      var div = this.wrapper = hiddenTextarea();\n      // The semihidden textarea that is focused when the editor is\n      // focused, and receives input.\n      var te = this.textarea = div.firstChild;\n      display.wrapper.insertBefore(div, display.wrapper.firstChild);\n\n      // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n      if (ios) te.style.width = \"0px\";\n\n      on(te, \"input\", function() {\n        if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null;\n        input.poll();\n      });\n\n      on(te, \"paste\", function(e) {\n        if (handlePaste(e, cm)) return true;\n\n        cm.state.pasteIncoming = true;\n        input.fastPoll();\n      });\n\n      function prepareCopyCut(e) {\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (input.inaccurateSelection) {\n            input.prevInput = \"\";\n            input.inaccurateSelection = false;\n            te.value = lastCopied.join(\"\\n\");\n            selectInput(te);\n          }\n        } else if (!cm.options.lineWiseCopyCut) {\n          return;\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.setSelections(ranges.ranges, null, sel_dontScroll);\n          } else {\n            input.prevInput = \"\";\n            te.value = ranges.text.join(\"\\n\");\n            selectInput(te);\n          }\n        }\n        if (e.type == \"cut\") cm.state.cutIncoming = true;\n      }\n      on(te, \"cut\", prepareCopyCut);\n      on(te, \"copy\", prepareCopyCut);\n\n      on(display.scroller, \"paste\", function(e) {\n        if (eventInWidget(display, e)) return;\n        cm.state.pasteIncoming = true;\n        input.focus();\n      });\n\n      // Prevent normal selection in the editor (we handle our own)\n      on(display.lineSpace, \"selectstart\", function(e) {\n        if (!eventInWidget(display, e)) e_preventDefault(e);\n      });\n\n      on(te, \"compositionstart\", function() {\n        var start = cm.getCursor(\"from\");\n        input.composing = {\n          start: start,\n          range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n        };\n      });\n      on(te, \"compositionend\", function() {\n        if (input.composing) {\n          input.poll();\n          input.composing.range.clear();\n          input.composing = null;\n        }\n      });\n    },\n\n    prepareSelection: function() {\n      // Redraw the selection and/or cursor\n      var cm = this.cm, display = cm.display, doc = cm.doc;\n      var result = prepareSelection(cm);\n\n      // Move the hidden textarea near the cursor to prevent scrolling artifacts\n      if (cm.options.moveInputWithCursor) {\n        var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n        var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n        result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n                                            headPos.top + lineOff.top - wrapOff.top));\n        result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n                                             headPos.left + lineOff.left - wrapOff.left));\n      }\n\n      return result;\n    },\n\n    showSelection: function(drawn) {\n      var cm = this.cm, display = cm.display;\n      removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n      removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n      if (drawn.teTop != null) {\n        this.wrapper.style.top = drawn.teTop + \"px\";\n        this.wrapper.style.left = drawn.teLeft + \"px\";\n      }\n    },\n\n    // Reset the input to correspond to the selection (or to be empty,\n    // when not typing and nothing is selected)\n    reset: function(typing) {\n      if (this.contextMenuPending) return;\n      var minimal, selected, cm = this.cm, doc = cm.doc;\n      if (cm.somethingSelected()) {\n        this.prevInput = \"\";\n        var range = doc.sel.primary();\n        minimal = hasCopyEvent &&\n          (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n        var content = minimal ? \"-\" : selected || cm.getSelection();\n        this.textarea.value = content;\n        if (cm.state.focused) selectInput(this.textarea);\n        if (ie && ie_version >= 9) this.hasSelection = content;\n      } else if (!typing) {\n        this.prevInput = this.textarea.value = \"\";\n        if (ie && ie_version >= 9) this.hasSelection = null;\n      }\n      this.inaccurateSelection = minimal;\n    },\n\n    getField: function() { return this.textarea; },\n\n    supportsTouch: function() { return false; },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n        try { this.textarea.focus(); }\n        catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n      }\n    },\n\n    blur: function() { this.textarea.blur(); },\n\n    resetPosition: function() {\n      this.wrapper.style.top = this.wrapper.style.left = 0;\n    },\n\n    receivedFocus: function() { this.slowPoll(); },\n\n    // Poll for input changes, using the normal rate of polling. This\n    // runs as long as the editor is focused.\n    slowPoll: function() {\n      var input = this;\n      if (input.pollingFast) return;\n      input.polling.set(this.cm.options.pollInterval, function() {\n        input.poll();\n        if (input.cm.state.focused) input.slowPoll();\n      });\n    },\n\n    // When an event has just come in that is likely to add or change\n    // something in the input textarea, we poll faster, to ensure that\n    // the change appears on the screen quickly.\n    fastPoll: function() {\n      var missed = false, input = this;\n      input.pollingFast = true;\n      function p() {\n        var changed = input.poll();\n        if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n        else {input.pollingFast = false; input.slowPoll();}\n      }\n      input.polling.set(20, p);\n    },\n\n    // Read input from the textarea, and update the document to match.\n    // When something is selected, it is present in the textarea, and\n    // selected (unless it is huge, in which case a placeholder is\n    // used). When nothing is selected, the cursor sits after previously\n    // seen text (can be empty), which is stored in prevInput (we must\n    // not reset the textarea when typing, because that breaks IME).\n    poll: function() {\n      var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n      // Since this is called a *lot*, try to bail out as cheaply as\n      // possible when it is clear that nothing happened. hasSelection\n      // will be the case when there is a lot of text in the textarea,\n      // in which case reading its value would be expensive.\n      if (this.contextMenuPending || !cm.state.focused ||\n          (hasSelection(input) && !prevInput) ||\n          isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)\n        return false;\n\n      var text = input.value;\n      // If nothing changed, bail.\n      if (text == prevInput && !cm.somethingSelected()) return false;\n      // Work around nonsensical selection resetting in IE9/10, and\n      // inexplicable appearance of private area unicode characters on\n      // some key combos in Mac (#2689).\n      if (ie && ie_version >= 9 && this.hasSelection === text ||\n          mac && /[\\uf700-\\uf7ff]/.test(text)) {\n        cm.display.input.reset();\n        return false;\n      }\n\n      if (cm.doc.sel == cm.display.selForContextMenu) {\n        var first = text.charCodeAt(0);\n        if (first == 0x200b && !prevInput) prevInput = \"\\u200b\";\n        if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\"); }\n      }\n      // Find the part of the input that is actually new\n      var same = 0, l = Math.min(prevInput.length, text.length);\n      while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n\n      var self = this;\n      runInOp(cm, function() {\n        applyTextInput(cm, text.slice(same), prevInput.length - same,\n                       null, self.composing ? \"*compose\" : null);\n\n        // Don't leave long text in the textarea, since it makes further polling slow\n        if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = self.prevInput = \"\";\n        else self.prevInput = text;\n\n        if (self.composing) {\n          self.composing.range.clear();\n          self.composing.range = cm.markText(self.composing.start, cm.getCursor(\"to\"),\n                                             {className: \"CodeMirror-composing\"});\n        }\n      });\n      return true;\n    },\n\n    ensurePolled: function() {\n      if (this.pollingFast && this.poll()) this.pollingFast = false;\n    },\n\n    onKeyPress: function() {\n      if (ie && ie_version >= 9) this.hasSelection = null;\n      this.fastPoll();\n    },\n\n    onContextMenu: function(e) {\n      var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n      var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n      if (!pos || presto) return; // Opera is difficult.\n\n      // Reset the current text selection only if the click is done outside of the selection\n      // and 'resetSelectionOnContextMenu' option is true.\n      var reset = cm.options.resetSelectionOnContextMenu;\n      if (reset && cm.doc.sel.contains(pos) == -1)\n        operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);\n\n      var oldCSS = te.style.cssText;\n      input.wrapper.style.position = \"absolute\";\n      te.style.cssText = \"position: fixed; width: 30px; height: 30px; top: \" + (e.clientY - 5) +\n        \"px; left: \" + (e.clientX - 5) + \"px; z-index: 1000; background: \" +\n        (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") +\n        \"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n      if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)\n      display.input.focus();\n      if (webkit) window.scrollTo(null, oldScrollY);\n      display.input.reset();\n      // Adds \"Select all\" to context menu in FF\n      if (!cm.somethingSelected()) te.value = input.prevInput = \" \";\n      input.contextMenuPending = true;\n      display.selForContextMenu = cm.doc.sel;\n      clearTimeout(display.detectingSelectAll);\n\n      // Select-all will be greyed out if there's nothing to select, so\n      // this adds a zero-width space so that we can later check whether\n      // it got selected.\n      function prepareSelectAllHack() {\n        if (te.selectionStart != null) {\n          var selected = cm.somethingSelected();\n          var extval = \"\\u200b\" + (selected ? te.value : \"\");\n          te.value = \"\\u21da\"; // Used to catch context-menu undo\n          te.value = extval;\n          input.prevInput = selected ? \"\" : \"\\u200b\";\n          te.selectionStart = 1; te.selectionEnd = extval.length;\n          // Re-set this, in case some other handler touched the\n          // selection in the meantime.\n          display.selForContextMenu = cm.doc.sel;\n        }\n      }\n      function rehide() {\n        input.contextMenuPending = false;\n        input.wrapper.style.position = \"relative\";\n        te.style.cssText = oldCSS;\n        if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);\n\n        // Try to detect the user choosing select-all\n        if (te.selectionStart != null) {\n          if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();\n          var i = 0, poll = function() {\n            if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n                te.selectionEnd > 0 && input.prevInput == \"\\u200b\")\n              operation(cm, commands.selectAll)(cm);\n            else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);\n            else display.input.reset();\n          };\n          display.detectingSelectAll = setTimeout(poll, 200);\n        }\n      }\n\n      if (ie && ie_version >= 9) prepareSelectAllHack();\n      if (captureRightClick) {\n        e_stop(e);\n        var mouseup = function() {\n          off(window, \"mouseup\", mouseup);\n          setTimeout(rehide, 20);\n        };\n        on(window, \"mouseup\", mouseup);\n      } else {\n        setTimeout(rehide, 50);\n      }\n    },\n\n    setUneditable: nothing,\n\n    needsContentAttribute: false\n  }, TextareaInput.prototype);\n\n  // CONTENTEDITABLE INPUT STYLE\n\n  function ContentEditableInput(cm) {\n    this.cm = cm;\n    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n    this.polling = new Delayed();\n    this.gracePeriod = false;\n  }\n\n  ContentEditableInput.prototype = copyObj({\n    init: function(display) {\n      var input = this, cm = input.cm;\n      var div = input.div = display.lineDiv;\n      div.contentEditable = \"true\";\n      disableBrowserMagic(div);\n\n      on(div, \"paste\", function(e) { handlePaste(e, cm); })\n\n      on(div, \"compositionstart\", function(e) {\n        var data = e.data;\n        input.composing = {sel: cm.doc.sel, data: data, startData: data};\n        if (!data) return;\n        var prim = cm.doc.sel.primary();\n        var line = cm.getLine(prim.head.line);\n        var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length));\n        if (found > -1 && found <= prim.head.ch)\n          input.composing.sel = simpleSelection(Pos(prim.head.line, found),\n                                                Pos(prim.head.line, found + data.length));\n      });\n      on(div, \"compositionupdate\", function(e) {\n        input.composing.data = e.data;\n      });\n      on(div, \"compositionend\", function(e) {\n        var ours = input.composing;\n        if (!ours) return;\n        if (e.data != ours.startData && !/\\u200b/.test(e.data))\n          ours.data = e.data;\n        // Need a small delay to prevent other code (input event,\n        // selection polling) from doing damage when fired right after\n        // compositionend.\n        setTimeout(function() {\n          if (!ours.handled)\n            input.applyComposition(ours);\n          if (input.composing == ours)\n            input.composing = null;\n        }, 50);\n      });\n\n      on(div, \"touchstart\", function() {\n        input.forceCompositionEnd();\n      });\n\n      on(div, \"input\", function() {\n        if (input.composing) return;\n        if (!input.pollContent())\n          runInOp(input.cm, function() {regChange(cm);});\n      });\n\n      function onCopyCut(e) {\n        if (cm.somethingSelected()) {\n          lastCopied = cm.getSelections();\n          if (e.type == \"cut\") cm.replaceSelection(\"\", null, \"cut\");\n        } else if (!cm.options.lineWiseCopyCut) {\n          return;\n        } else {\n          var ranges = copyableRanges(cm);\n          lastCopied = ranges.text;\n          if (e.type == \"cut\") {\n            cm.operation(function() {\n              cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n              cm.replaceSelection(\"\", null, \"cut\");\n            });\n          }\n        }\n        // iOS exposes the clipboard API, but seems to discard content inserted into it\n        if (e.clipboardData && !ios) {\n          e.preventDefault();\n          e.clipboardData.clearData();\n          e.clipboardData.setData(\"text/plain\", lastCopied.join(\"\\n\"));\n        } else {\n          // Old-fashioned briefly-focus-a-textarea hack\n          var kludge = hiddenTextarea(), te = kludge.firstChild;\n          cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n          te.value = lastCopied.join(\"\\n\");\n          var hadFocus = document.activeElement;\n          selectInput(te);\n          setTimeout(function() {\n            cm.display.lineSpace.removeChild(kludge);\n            hadFocus.focus();\n          }, 50);\n        }\n      }\n      on(div, \"copy\", onCopyCut);\n      on(div, \"cut\", onCopyCut);\n    },\n\n    prepareSelection: function() {\n      var result = prepareSelection(this.cm, false);\n      result.focus = this.cm.state.focused;\n      return result;\n    },\n\n    showSelection: function(info) {\n      if (!info || !this.cm.display.view.length) return;\n      if (info.focus) this.showPrimarySelection();\n      this.showMultipleSelections(info);\n    },\n\n    showPrimarySelection: function() {\n      var sel = window.getSelection(), prim = this.cm.doc.sel.primary();\n      var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);\n      var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);\n      if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n          cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&\n          cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)\n        return;\n\n      var start = posToDOM(this.cm, prim.from());\n      var end = posToDOM(this.cm, prim.to());\n      if (!start && !end) return;\n\n      var view = this.cm.display.view;\n      var old = sel.rangeCount && sel.getRangeAt(0);\n      if (!start) {\n        start = {node: view[0].measure.map[2], offset: 0};\n      } else if (!end) { // FIXME dangerously hacky\n        var measure = view[view.length - 1].measure;\n        var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n        end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n      }\n\n      try { var rng = range(start.node, start.offset, end.offset, end.node); }\n      catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n      if (rng) {\n        sel.removeAllRanges();\n        sel.addRange(rng);\n        if (old && sel.anchorNode == null) sel.addRange(old);\n        else if (gecko) this.startGracePeriod();\n      }\n      this.rememberSelection();\n    },\n\n    startGracePeriod: function() {\n      var input = this;\n      clearTimeout(this.gracePeriod);\n      this.gracePeriod = setTimeout(function() {\n        input.gracePeriod = false;\n        if (input.selectionChanged())\n          input.cm.operation(function() { input.cm.curOp.selectionChanged = true; });\n      }, 20);\n    },\n\n    showMultipleSelections: function(info) {\n      removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n      removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n    },\n\n    rememberSelection: function() {\n      var sel = window.getSelection();\n      this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n      this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n    },\n\n    selectionInEditor: function() {\n      var sel = window.getSelection();\n      if (!sel.rangeCount) return false;\n      var node = sel.getRangeAt(0).commonAncestorContainer;\n      return contains(this.div, node);\n    },\n\n    focus: function() {\n      if (this.cm.options.readOnly != \"nocursor\") this.div.focus();\n    },\n    blur: function() { this.div.blur(); },\n    getField: function() { return this.div; },\n\n    supportsTouch: function() { return true; },\n\n    receivedFocus: function() {\n      var input = this;\n      if (this.selectionInEditor())\n        this.pollSelection();\n      else\n        runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; });\n\n      function poll() {\n        if (input.cm.state.focused) {\n          input.pollSelection();\n          input.polling.set(input.cm.options.pollInterval, poll);\n        }\n      }\n      this.polling.set(this.cm.options.pollInterval, poll);\n    },\n\n    selectionChanged: function() {\n      var sel = window.getSelection();\n      return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n        sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;\n    },\n\n    pollSelection: function() {\n      if (!this.composing && !this.gracePeriod && this.selectionChanged()) {\n        var sel = window.getSelection(), cm = this.cm;\n        this.rememberSelection();\n        var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n        var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n        if (anchor && head) runInOp(cm, function() {\n          setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n          if (anchor.bad || head.bad) cm.curOp.selectionChanged = true;\n        });\n      }\n    },\n\n    pollContent: function() {\n      var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n      var from = sel.from(), to = sel.to();\n      if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false;\n\n      var fromIndex;\n      if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n        var fromLine = lineNo(display.view[0].line);\n        var fromNode = display.view[0].node;\n      } else {\n        var fromLine = lineNo(display.view[fromIndex].line);\n        var fromNode = display.view[fromIndex - 1].node.nextSibling;\n      }\n      var toIndex = findViewIndex(cm, to.line);\n      if (toIndex == display.view.length - 1) {\n        var toLine = display.viewTo - 1;\n        var toNode = display.lineDiv.lastChild;\n      } else {\n        var toLine = lineNo(display.view[toIndex + 1].line) - 1;\n        var toNode = display.view[toIndex + 1].node.previousSibling;\n      }\n\n      var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n      var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n      while (newText.length > 1 && oldText.length > 1) {\n        if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n        else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n        else break;\n      }\n\n      var cutFront = 0, cutEnd = 0;\n      var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n      while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n        ++cutFront;\n      var newBot = lst(newText), oldBot = lst(oldText);\n      var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n                               oldBot.length - (oldText.length == 1 ? cutFront : 0));\n      while (cutEnd < maxCutEnd &&\n             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n        ++cutEnd;\n\n      newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd);\n      newText[0] = newText[0].slice(cutFront);\n\n      var chFrom = Pos(fromLine, cutFront);\n      var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n      if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n        replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n        return true;\n      }\n    },\n\n    ensurePolled: function() {\n      this.forceCompositionEnd();\n    },\n    reset: function() {\n      this.forceCompositionEnd();\n    },\n    forceCompositionEnd: function() {\n      if (!this.composing || this.composing.handled) return;\n      this.applyComposition(this.composing);\n      this.composing.handled = true;\n      this.div.blur();\n      this.div.focus();\n    },\n    applyComposition: function(composing) {\n      if (composing.data && composing.data != composing.startData)\n        operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel);\n    },\n\n    setUneditable: function(node) {\n      node.setAttribute(\"contenteditable\", \"false\");\n    },\n\n    onKeyPress: function(e) {\n      e.preventDefault();\n      operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);\n    },\n\n    onContextMenu: nothing,\n    resetPosition: nothing,\n\n    needsContentAttribute: true\n  }, ContentEditableInput.prototype);\n\n  function posToDOM(cm, pos) {\n    var view = findViewForLine(cm, pos.line);\n    if (!view || view.hidden) return null;\n    var line = getLine(cm.doc, pos.line);\n    var info = mapFromLineView(view, line, pos.line);\n\n    var order = getOrder(line), side = \"left\";\n    if (order) {\n      var partPos = getBidiPartAt(order, pos.ch);\n      side = partPos % 2 ? \"right\" : \"left\";\n    }\n    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n    result.offset = result.collapse == \"right\" ? result.end : result.start;\n    return result;\n  }\n\n  function badPos(pos, bad) { if (bad) pos.bad = true; return pos; }\n\n  function domToPos(cm, node, offset) {\n    var lineNode;\n    if (node == cm.display.lineDiv) {\n      lineNode = cm.display.lineDiv.childNodes[offset];\n      if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);\n      node = null; offset = 0;\n    } else {\n      for (lineNode = node;; lineNode = lineNode.parentNode) {\n        if (!lineNode || lineNode == cm.display.lineDiv) return null;\n        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break;\n      }\n    }\n    for (var i = 0; i < cm.display.view.length; i++) {\n      var lineView = cm.display.view[i];\n      if (lineView.node == lineNode)\n        return locateNodeInLineView(lineView, node, offset);\n    }\n  }\n\n  function locateNodeInLineView(lineView, node, offset) {\n    var wrapper = lineView.text.firstChild, bad = false;\n    if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true);\n    if (node == wrapper) {\n      bad = true;\n      node = wrapper.childNodes[offset];\n      offset = 0;\n      if (!node) {\n        var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n        return badPos(Pos(lineNo(line), line.text.length), bad);\n      }\n    }\n\n    var textNode = node.nodeType == 3 ? node : null, topNode = node;\n    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n      textNode = node.firstChild;\n      if (offset) offset = textNode.nodeValue.length;\n    }\n    while (topNode.parentNode != wrapper) topNode = topNode.parentNode;\n    var measure = lineView.measure, maps = measure.maps;\n\n    function find(textNode, topNode, offset) {\n      for (var i = -1; i < (maps ? maps.length : 0); i++) {\n        var map = i < 0 ? measure.map : maps[i];\n        for (var j = 0; j < map.length; j += 3) {\n          var curNode = map[j + 2];\n          if (curNode == textNode || curNode == topNode) {\n            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n            var ch = map[j] + offset;\n            if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)];\n            return Pos(line, ch);\n          }\n        }\n      }\n    }\n    var found = find(textNode, topNode, offset);\n    if (found) return badPos(found, bad);\n\n    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n      found = find(after, after.firstChild, 0);\n      if (found)\n        return badPos(Pos(found.line, found.ch - dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n    for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) {\n      found = find(before, before.firstChild, -1);\n      if (found)\n        return badPos(Pos(found.line, found.ch + dist), bad);\n      else\n        dist += after.textContent.length;\n    }\n  }\n\n  function domTextBetween(cm, from, to, fromLine, toLine) {\n    var text = \"\", closing = false;\n    function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }\n    function walk(node) {\n      if (node.nodeType == 1) {\n        var cmText = node.getAttribute(\"cm-text\");\n        if (cmText != null) {\n          if (cmText == \"\") cmText = node.textContent.replace(/\\u200b/g, \"\");\n          text += cmText;\n          return;\n        }\n        var markerID = node.getAttribute(\"cm-marker\"), range;\n        if (markerID) {\n          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n          if (found.length && (range = found[0].find()))\n            text += getBetween(cm.doc, range.from, range.to).join(\"\\n\");\n          return;\n        }\n        if (node.getAttribute(\"contenteditable\") == \"false\") return;\n        for (var i = 0; i < node.childNodes.length; i++)\n          walk(node.childNodes[i]);\n        if (/^(pre|div|p)$/i.test(node.nodeName))\n          closing = true;\n      } else if (node.nodeType == 3) {\n        var val = node.nodeValue;\n        if (!val) return;\n        if (closing) {\n          text += \"\\n\";\n          closing = false;\n        }\n        text += val;\n      }\n    }\n    for (;;) {\n      walk(from);\n      if (from == to) break;\n      from = from.nextSibling;\n    }\n    return text;\n  }\n\n  CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n  // SELECTION / CURSOR\n\n  // Selection objects are immutable. A new one is created every time\n  // the selection changes. A selection is one or more non-overlapping\n  // (and non-touching) ranges, sorted, and an integer that indicates\n  // which one is the primary selection (the one that's scrolled into\n  // view, that getCursor returns, etc).\n  function Selection(ranges, primIndex) {\n    this.ranges = ranges;\n    this.primIndex = primIndex;\n  }\n\n  Selection.prototype = {\n    primary: function() { return this.ranges[this.primIndex]; },\n    equals: function(other) {\n      if (other == this) return true;\n      if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var here = this.ranges[i], there = other.ranges[i];\n        if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;\n      }\n      return true;\n    },\n    deepCopy: function() {\n      for (var out = [], i = 0; i < this.ranges.length; i++)\n        out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));\n      return new Selection(out, this.primIndex);\n    },\n    somethingSelected: function() {\n      for (var i = 0; i < this.ranges.length; i++)\n        if (!this.ranges[i].empty()) return true;\n      return false;\n    },\n    contains: function(pos, end) {\n      if (!end) end = pos;\n      for (var i = 0; i < this.ranges.length; i++) {\n        var range = this.ranges[i];\n        if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n          return i;\n      }\n      return -1;\n    }\n  };\n\n  function Range(anchor, head) {\n    this.anchor = anchor; this.head = head;\n  }\n\n  Range.prototype = {\n    from: function() { return minPos(this.anchor, this.head); },\n    to: function() { return maxPos(this.anchor, this.head); },\n    empty: function() {\n      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;\n    }\n  };\n\n  // Take an unsorted, potentially overlapping set of ranges, and\n  // build a selection out of it. 'Consumes' ranges array (modifying\n  // it).\n  function normalizeSelection(ranges, primIndex) {\n    var prim = ranges[primIndex];\n    ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });\n    primIndex = indexOf(ranges, prim);\n    for (var i = 1; i < ranges.length; i++) {\n      var cur = ranges[i], prev = ranges[i - 1];\n      if (cmp(prev.to(), cur.from()) >= 0) {\n        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n        if (i <= primIndex) --primIndex;\n        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n      }\n    }\n    return new Selection(ranges, primIndex);\n  }\n\n  function simpleSelection(anchor, head) {\n    return new Selection([new Range(anchor, head || anchor)], 0);\n  }\n\n  // Most of the external API clips given positions to make sure they\n  // actually exist within the document.\n  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}\n  function clipPos(doc, pos) {\n    if (pos.line < doc.first) return Pos(doc.first, 0);\n    var last = doc.first + doc.size - 1;\n    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);\n    return clipToLen(pos, getLine(doc, pos.line).text.length);\n  }\n  function clipToLen(pos, linelen) {\n    var ch = pos.ch;\n    if (ch == null || ch > linelen) return Pos(pos.line, linelen);\n    else if (ch < 0) return Pos(pos.line, 0);\n    else return pos;\n  }\n  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}\n  function clipPosArray(doc, array) {\n    for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);\n    return out;\n  }\n\n  // SELECTION UPDATES\n\n  // The 'scroll' parameter given to many of these indicated whether\n  // the new cursor position should be scrolled into view after\n  // modifying the selection.\n\n  // If shift is held or the extend flag is set, extends a range to\n  // include a given position (and optionally a second position).\n  // Otherwise, simply returns the range between the given positions.\n  // Used for cursor motion and such.\n  function extendRange(doc, range, head, other) {\n    if (doc.cm && doc.cm.display.shift || doc.extend) {\n      var anchor = range.anchor;\n      if (other) {\n        var posBefore = cmp(head, anchor) < 0;\n        if (posBefore != (cmp(other, anchor) < 0)) {\n          anchor = head;\n          head = other;\n        } else if (posBefore != (cmp(head, other) < 0)) {\n          head = other;\n        }\n      }\n      return new Range(anchor, head);\n    } else {\n      return new Range(other || head, head);\n    }\n  }\n\n  // Extend the primary selection range, discard the rest.\n  function extendSelection(doc, head, other, options) {\n    setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);\n  }\n\n  // Extend all selections (pos is an array of selections with length\n  // equal the number of selections)\n  function extendSelections(doc, heads, options) {\n    for (var out = [], i = 0; i < doc.sel.ranges.length; i++)\n      out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);\n    var newSel = normalizeSelection(out, doc.sel.primIndex);\n    setSelection(doc, newSel, options);\n  }\n\n  // Updates a single range in the selection.\n  function replaceOneSelection(doc, i, range, options) {\n    var ranges = doc.sel.ranges.slice(0);\n    ranges[i] = range;\n    setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n  }\n\n  // Reset the selection to a single range.\n  function setSimpleSelection(doc, anchor, head, options) {\n    setSelection(doc, simpleSelection(anchor, head), options);\n  }\n\n  // Give beforeSelectionChange handlers a change to influence a\n  // selection update.\n  function filterSelectionChange(doc, sel) {\n    var obj = {\n      ranges: sel.ranges,\n      update: function(ranges) {\n        this.ranges = [];\n        for (var i = 0; i < ranges.length; i++)\n          this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n                                     clipPos(doc, ranges[i].head));\n      }\n    };\n    signal(doc, \"beforeSelectionChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n    if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n    else return sel;\n  }\n\n  function setSelectionReplaceHistory(doc, sel, options) {\n    var done = doc.history.done, last = lst(done);\n    if (last && last.ranges) {\n      done[done.length - 1] = sel;\n      setSelectionNoUndo(doc, sel, options);\n    } else {\n      setSelection(doc, sel, options);\n    }\n  }\n\n  // Set a new selection.\n  function setSelection(doc, sel, options) {\n    setSelectionNoUndo(doc, sel, options);\n    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n  }\n\n  function setSelectionNoUndo(doc, sel, options) {\n    if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n      sel = filterSelectionChange(doc, sel);\n\n    var bias = options && options.bias ||\n      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n    if (!(options && options.scroll === false) && doc.cm)\n      ensureCursorVisible(doc.cm);\n  }\n\n  function setSelectionInner(doc, sel) {\n    if (sel.equals(doc.sel)) return;\n\n    doc.sel = sel;\n\n    if (doc.cm) {\n      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n      signalCursorActivity(doc.cm);\n    }\n    signalLater(doc, \"cursorActivity\", doc);\n  }\n\n  // Verify that the selection does not partially select any atomic\n  // marked ranges.\n  function reCheckSelection(doc) {\n    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);\n  }\n\n  // Return a selection that does not partially select any atomic\n  // ranges.\n  function skipAtomicInSelection(doc, sel, bias, mayClear) {\n    var out;\n    for (var i = 0; i < sel.ranges.length; i++) {\n      var range = sel.ranges[i];\n      var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear);\n      var newHead = skipAtomic(doc, range.head, bias, mayClear);\n      if (out || newAnchor != range.anchor || newHead != range.head) {\n        if (!out) out = sel.ranges.slice(0, i);\n        out[i] = new Range(newAnchor, newHead);\n      }\n    }\n    return out ? normalizeSelection(out, sel.primIndex) : sel;\n  }\n\n  // Ensure a given position is not inside an atomic range.\n  function skipAtomic(doc, pos, bias, mayClear) {\n    var flipped = false, curPos = pos;\n    var dir = bias || 1;\n    doc.cantEdit = false;\n    search: for (;;) {\n      var line = getLine(doc, curPos.line);\n      if (line.markedSpans) {\n        for (var i = 0; i < line.markedSpans.length; ++i) {\n          var sp = line.markedSpans[i], m = sp.marker;\n          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&\n              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {\n            if (mayClear) {\n              signal(m, \"beforeCursorEnter\");\n              if (m.explicitlyCleared) {\n                if (!line.markedSpans) break;\n                else {--i; continue;}\n              }\n            }\n            if (!m.atomic) continue;\n            var newPos = m.find(dir < 0 ? -1 : 1);\n            if (cmp(newPos, curPos) == 0) {\n              newPos.ch += dir;\n              if (newPos.ch < 0) {\n                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));\n                else newPos = null;\n              } else if (newPos.ch > line.text.length) {\n                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);\n                else newPos = null;\n              }\n              if (!newPos) {\n                if (flipped) {\n                  // Driven in a corner -- no valid cursor position found at all\n                  // -- try again *with* clearing, if we didn't already\n                  if (!mayClear) return skipAtomic(doc, pos, bias, true);\n                  // Otherwise, turn off editing until further notice, and return the start of the doc\n                  doc.cantEdit = true;\n                  return Pos(doc.first, 0);\n                }\n                flipped = true; newPos = pos; dir = -dir;\n              }\n            }\n            curPos = newPos;\n            continue search;\n          }\n        }\n      }\n      return curPos;\n    }\n  }\n\n  // SELECTION DRAWING\n\n  function updateSelection(cm) {\n    cm.display.input.showSelection(cm.display.input.prepareSelection());\n  }\n\n  function prepareSelection(cm, primary) {\n    var doc = cm.doc, result = {};\n    var curFragment = result.cursors = document.createDocumentFragment();\n    var selFragment = result.selection = document.createDocumentFragment();\n\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      if (primary === false && i == doc.sel.primIndex) continue;\n      var range = doc.sel.ranges[i];\n      var collapsed = range.empty();\n      if (collapsed || cm.options.showCursorWhenSelecting)\n        drawSelectionCursor(cm, range, curFragment);\n      if (!collapsed)\n        drawSelectionRange(cm, range, selFragment);\n    }\n    return result;\n  }\n\n  // Draws a cursor for the given range\n  function drawSelectionCursor(cm, range, output) {\n    var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n    var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n    cursor.style.left = pos.left + \"px\";\n    cursor.style.top = pos.top + \"px\";\n    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n    if (pos.other) {\n      // Secondary cursor, shown when on a 'jump' in bi-directional text\n      var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n      otherCursor.style.display = \"\";\n      otherCursor.style.left = pos.other.left + \"px\";\n      otherCursor.style.top = pos.other.top + \"px\";\n      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n    }\n  }\n\n  // Draws the given range as a highlighted selection\n  function drawSelectionRange(cm, range, output) {\n    var display = cm.display, doc = cm.doc;\n    var fragment = document.createDocumentFragment();\n    var padding = paddingH(cm.display), leftSide = padding.left;\n    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n    function add(left, top, width, bottom) {\n      if (top < 0) top = 0;\n      top = Math.round(top);\n      bottom = Math.round(bottom);\n      fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n                               \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n                               \"px; height: \" + (bottom - top) + \"px\"));\n    }\n\n    function drawForLine(line, fromArg, toArg) {\n      var lineObj = getLine(doc, line);\n      var lineLen = lineObj.text.length;\n      var start, end;\n      function coords(ch, bias) {\n        return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n      }\n\n      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n        var leftPos = coords(from, \"left\"), rightPos, left, right;\n        if (from == to) {\n          rightPos = leftPos;\n          left = right = leftPos.left;\n        } else {\n          rightPos = coords(to - 1, \"right\");\n          if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n          left = leftPos.left;\n          right = rightPos.right;\n        }\n        if (fromArg == null && from == 0) left = leftSide;\n        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n          add(left, leftPos.top, null, leftPos.bottom);\n          left = leftSide;\n          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n        }\n        if (toArg == null && to == lineLen) right = rightSide;\n        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n          start = leftPos;\n        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n          end = rightPos;\n        if (left < leftSide + 1) left = leftSide;\n        add(left, rightPos.top, right - left, rightPos.bottom);\n      });\n      return {start: start, end: end};\n    }\n\n    var sFrom = range.from(), sTo = range.to();\n    if (sFrom.line == sTo.line) {\n      drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n    } else {\n      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n      var singleVLine = visualLine(fromLine) == visualLine(toLine);\n      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n      if (singleVLine) {\n        if (leftEnd.top < rightStart.top - 2) {\n          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n        } else {\n          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n        }\n      }\n      if (leftEnd.bottom < rightStart.top)\n        add(leftSide, leftEnd.bottom, null, rightStart.top);\n    }\n\n    output.appendChild(fragment);\n  }\n\n  // Cursor-blinking\n  function restartBlink(cm) {\n    if (!cm.state.focused) return;\n    var display = cm.display;\n    clearInterval(display.blinker);\n    var on = true;\n    display.cursorDiv.style.visibility = \"\";\n    if (cm.options.cursorBlinkRate > 0)\n      display.blinker = setInterval(function() {\n        display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n      }, cm.options.cursorBlinkRate);\n    else if (cm.options.cursorBlinkRate < 0)\n      display.cursorDiv.style.visibility = \"hidden\";\n  }\n\n  // HIGHLIGHT WORKER\n\n  function startWorker(cm, time) {\n    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)\n      cm.state.highlight.set(time, bind(highlightWorker, cm));\n  }\n\n  function highlightWorker(cm) {\n    var doc = cm.doc;\n    if (doc.frontier < doc.first) doc.frontier = doc.first;\n    if (doc.frontier >= cm.display.viewTo) return;\n    var end = +new Date + cm.options.workTime;\n    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));\n    var changedLines = [];\n\n    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {\n      if (doc.frontier >= cm.display.viewFrom) { // Visible\n        var oldStyles = line.styles;\n        var highlighted = highlightLine(cm, line, state, true);\n        line.styles = highlighted.styles;\n        var oldCls = line.styleClasses, newCls = highlighted.classes;\n        if (newCls) line.styleClasses = newCls;\n        else if (oldCls) line.styleClasses = null;\n        var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];\n        if (ischange) changedLines.push(doc.frontier);\n        line.stateAfter = copyState(doc.mode, state);\n      } else {\n        processLine(cm, line.text, state);\n        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;\n      }\n      ++doc.frontier;\n      if (+new Date > end) {\n        startWorker(cm, cm.options.workDelay);\n        return true;\n      }\n    });\n    if (changedLines.length) runInOp(cm, function() {\n      for (var i = 0; i < changedLines.length; i++)\n        regLineChange(cm, changedLines[i], \"text\");\n    });\n  }\n\n  // Finds the line to start with when starting a parse. Tries to\n  // find a line with a stateAfter, so that it can start with a\n  // valid state. If that fails, it returns the line with the\n  // smallest indentation, which tends to need the least context to\n  // parse correctly.\n  function findStartLine(cm, n, precise) {\n    var minindent, minline, doc = cm.doc;\n    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n    for (var search = n; search > lim; --search) {\n      if (search <= doc.first) return doc.first;\n      var line = getLine(doc, search - 1);\n      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n      var indented = countColumn(line.text, null, cm.options.tabSize);\n      if (minline == null || minindent > indented) {\n        minline = search - 1;\n        minindent = indented;\n      }\n    }\n    return minline;\n  }\n\n  function getStateBefore(cm, n, precise) {\n    var doc = cm.doc, display = cm.display;\n    if (!doc.mode.startState) return true;\n    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;\n    if (!state) state = startState(doc.mode);\n    else state = copyState(doc.mode, state);\n    doc.iter(pos, n, function(line) {\n      processLine(cm, line.text, state);\n      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;\n      line.stateAfter = save ? copyState(doc.mode, state) : null;\n      ++pos;\n    });\n    if (precise) doc.frontier = pos;\n    return state;\n  }\n\n  // POSITION MEASUREMENT\n\n  function paddingTop(display) {return display.lineSpace.offsetTop;}\n  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}\n  function paddingH(display) {\n    if (display.cachedPaddingH) return display.cachedPaddingH;\n    var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n    if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;\n    return data;\n  }\n\n  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }\n  function displayWidth(cm) {\n    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;\n  }\n  function displayHeight(cm) {\n    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;\n  }\n\n  // Ensure the lineView.wrapping.heights array is populated. This is\n  // an array of bottom offsets for the lines that make up a drawn\n  // line. When lineWrapping is on, there might be more than one\n  // height.\n  function ensureLineHeights(cm, lineView, rect) {\n    var wrapping = cm.options.lineWrapping;\n    var curWidth = wrapping && displayWidth(cm);\n    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n      var heights = lineView.measure.heights = [];\n      if (wrapping) {\n        lineView.measure.width = curWidth;\n        var rects = lineView.text.firstChild.getClientRects();\n        for (var i = 0; i < rects.length - 1; i++) {\n          var cur = rects[i], next = rects[i + 1];\n          if (Math.abs(cur.bottom - next.bottom) > 2)\n            heights.push((cur.bottom + next.top) / 2 - rect.top);\n        }\n      }\n      heights.push(rect.bottom - rect.top);\n    }\n  }\n\n  // Find a line map (mapping character offsets to text nodes) and a\n  // measurement cache for the given line number. (A line view might\n  // contain multiple lines when collapsed ranges are present.)\n  function mapFromLineView(lineView, line, lineN) {\n    if (lineView.line == line)\n      return {map: lineView.measure.map, cache: lineView.measure.cache};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineView.rest[i] == line)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};\n    for (var i = 0; i < lineView.rest.length; i++)\n      if (lineNo(lineView.rest[i]) > lineN)\n        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};\n  }\n\n  // Render a line into the hidden node display.externalMeasured. Used\n  // when measurement is needed for a line that's not in the viewport.\n  function updateExternalMeasurement(cm, line) {\n    line = visualLine(line);\n    var lineN = lineNo(line);\n    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n    view.lineN = lineN;\n    var built = view.built = buildLineContent(cm, view);\n    view.text = built.pre;\n    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n    return view;\n  }\n\n  // Get a {top, bottom, left, right} box (in line-local coordinates)\n  // for a given character.\n  function measureChar(cm, line, ch, bias) {\n    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);\n  }\n\n  // Find a line view that corresponds to the given line number.\n  function findViewForLine(cm, lineN) {\n    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n      return cm.display.view[findViewIndex(cm, lineN)];\n    var ext = cm.display.externalMeasured;\n    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n      return ext;\n  }\n\n  // Measurement can be split in two steps, the set-up work that\n  // applies to the whole line, and the measurement of the actual\n  // character. Functions like coordsChar, that need to do a lot of\n  // measurements in a row, can thus ensure that the set-up work is\n  // only done once.\n  function prepareMeasureForLine(cm, line) {\n    var lineN = lineNo(line);\n    var view = findViewForLine(cm, lineN);\n    if (view && !view.text)\n      view = null;\n    else if (view && view.changes)\n      updateLineForChanges(cm, view, lineN, getDimensions(cm));\n    if (!view)\n      view = updateExternalMeasurement(cm, line);\n\n    var info = mapFromLineView(view, line, lineN);\n    return {\n      line: line, view: view, rect: null,\n      map: info.map, cache: info.cache, before: info.before,\n      hasHeights: false\n    };\n  }\n\n  // Given a prepared measurement object, measures the position of an\n  // actual character (or fetches it from the cache).\n  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n    if (prepared.before) ch = -1;\n    var key = ch + (bias || \"\"), found;\n    if (prepared.cache.hasOwnProperty(key)) {\n      found = prepared.cache[key];\n    } else {\n      if (!prepared.rect)\n        prepared.rect = prepared.view.text.getBoundingClientRect();\n      if (!prepared.hasHeights) {\n        ensureLineHeights(cm, prepared.view, prepared.rect);\n        prepared.hasHeights = true;\n      }\n      found = measureCharInner(cm, prepared, ch, bias);\n      if (!found.bogus) prepared.cache[key] = found;\n    }\n    return {left: found.left, right: found.right,\n            top: varHeight ? found.rtop : found.top,\n            bottom: varHeight ? found.rbottom : found.bottom};\n  }\n\n  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n  function nodeAndOffsetInLineMap(map, ch, bias) {\n    var node, start, end, collapse;\n    // First, search the line map for the text node corresponding to,\n    // or closest to, the target character.\n    for (var i = 0; i < map.length; i += 3) {\n      var mStart = map[i], mEnd = map[i + 1];\n      if (ch < mStart) {\n        start = 0; end = 1;\n        collapse = \"left\";\n      } else if (ch < mEnd) {\n        start = ch - mStart;\n        end = start + 1;\n      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n        end = mEnd - mStart;\n        start = end - 1;\n        if (ch >= mEnd) collapse = \"right\";\n      }\n      if (start != null) {\n        node = map[i + 2];\n        if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n          collapse = bias;\n        if (bias == \"left\" && start == 0)\n          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n            node = map[(i -= 3) + 2];\n            collapse = \"left\";\n          }\n        if (bias == \"right\" && start == mEnd - mStart)\n          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n            node = map[(i += 3) + 2];\n            collapse = \"right\";\n          }\n        break;\n      }\n    }\n    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};\n  }\n\n  function measureCharInner(cm, prepared, ch, bias) {\n    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n    var rect;\n    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n      for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;\n        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;\n        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {\n          rect = node.parentNode.getBoundingClientRect();\n        } else if (ie && cm.options.lineWrapping) {\n          var rects = range(node, start, end).getClientRects();\n          if (rects.length)\n            rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n          else\n            rect = nullRect;\n        } else {\n          rect = range(node, start, end).getBoundingClientRect() || nullRect;\n        }\n        if (rect.left || rect.right || start == 0) break;\n        end = start;\n        start = start - 1;\n        collapse = \"right\";\n      }\n      if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect);\n    } else { // If it is a widget, simply get the box for the whole widget.\n      if (start > 0) collapse = bias = \"right\";\n      var rects;\n      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n        rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n      else\n        rect = node.getBoundingClientRect();\n    }\n    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n      var rSpan = node.parentNode.getClientRects()[0];\n      if (rSpan)\n        rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};\n      else\n        rect = nullRect;\n    }\n\n    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n    var mid = (rtop + rbot) / 2;\n    var heights = prepared.view.measure.heights;\n    for (var i = 0; i < heights.length - 1; i++)\n      if (mid < heights[i]) break;\n    var top = i ? heights[i - 1] : 0, bot = heights[i];\n    var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n                  right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n                  top: top, bottom: bot};\n    if (!rect.left && !rect.right) result.bogus = true;\n    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n    return result;\n  }\n\n  // Work around problem with bounding client rects on ranges being\n  // returned incorrectly when zoomed on IE10 and below.\n  function maybeUpdateRectForZooming(measure, rect) {\n    if (!window.screen || screen.logicalXDPI == null ||\n        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n      return rect;\n    var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n    var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n    return {left: rect.left * scaleX, right: rect.right * scaleX,\n            top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n  }\n\n  function clearLineMeasurementCacheFor(lineView) {\n    if (lineView.measure) {\n      lineView.measure.cache = {};\n      lineView.measure.heights = null;\n      if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n        lineView.measure.caches[i] = {};\n    }\n  }\n\n  function clearLineMeasurementCache(cm) {\n    cm.display.externalMeasure = null;\n    removeChildren(cm.display.lineMeasure);\n    for (var i = 0; i < cm.display.view.length; i++)\n      clearLineMeasurementCacheFor(cm.display.view[i]);\n  }\n\n  function clearCaches(cm) {\n    clearLineMeasurementCache(cm);\n    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;\n    cm.display.lineNumChars = null;\n  }\n\n  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }\n  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }\n\n  // Converts a {top, bottom, left, right} box from line-local\n  // coordinates into another coordinate system. Context may be one of\n  // \"line\", \"div\" (display.lineDiv), \"local\"/null (editor), \"window\",\n  // or \"page\".\n  function intoCoordSystem(cm, lineObj, rect, context) {\n    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {\n      var size = widgetHeight(lineObj.widgets[i]);\n      rect.top += size; rect.bottom += size;\n    }\n    if (context == \"line\") return rect;\n    if (!context) context = \"local\";\n    var yOff = heightAtLine(lineObj);\n    if (context == \"local\") yOff += paddingTop(cm.display);\n    else yOff -= cm.display.viewOffset;\n    if (context == \"page\" || context == \"window\") {\n      var lOff = cm.display.lineSpace.getBoundingClientRect();\n      yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n      var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n      rect.left += xOff; rect.right += xOff;\n    }\n    rect.top += yOff; rect.bottom += yOff;\n    return rect;\n  }\n\n  // Coverts a box from \"div\" coords to another coordinate system.\n  // Context may be \"window\", \"page\", \"div\", or \"local\"/null.\n  function fromCoordSystem(cm, coords, context) {\n    if (context == \"div\") return coords;\n    var left = coords.left, top = coords.top;\n    // First move into \"page\" coordinate system\n    if (context == \"page\") {\n      left -= pageScrollX();\n      top -= pageScrollY();\n    } else if (context == \"local\" || !context) {\n      var localBox = cm.display.sizer.getBoundingClientRect();\n      left += localBox.left;\n      top += localBox.top;\n    }\n\n    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n  }\n\n  function charCoords(cm, pos, context, lineObj, bias) {\n    if (!lineObj) lineObj = getLine(cm.doc, pos.line);\n    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);\n  }\n\n  // Returns a box for a given cursor position, which may have an\n  // 'other' property containing the position of the secondary cursor\n  // on a bidi boundary.\n  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n    lineObj = lineObj || getLine(cm.doc, pos.line);\n    if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);\n    function get(ch, right) {\n      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n      if (right) m.left = m.right; else m.right = m.left;\n      return intoCoordSystem(cm, lineObj, m, context);\n    }\n    function getBidi(ch, partPos) {\n      var part = order[partPos], right = part.level % 2;\n      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {\n        part = order[--partPos];\n        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);\n        right = true;\n      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {\n        part = order[++partPos];\n        ch = bidiLeft(part) - part.level % 2;\n        right = false;\n      }\n      if (right && ch == part.to && ch > part.from) return get(ch - 1);\n      return get(ch, right);\n    }\n    var order = getOrder(lineObj), ch = pos.ch;\n    if (!order) return get(ch);\n    var partPos = getBidiPartAt(order, ch);\n    var val = getBidi(ch, partPos);\n    if (bidiOther != null) val.other = getBidi(ch, bidiOther);\n    return val;\n  }\n\n  // Used to cheaply estimate the coordinates for a position. Used for\n  // intermediate scroll updates.\n  function estimateCoords(cm, pos) {\n    var left = 0, pos = clipPos(cm.doc, pos);\n    if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;\n    var lineObj = getLine(cm.doc, pos.line);\n    var top = heightAtLine(lineObj) + paddingTop(cm.display);\n    return {left: left, right: left, top: top, bottom: top + lineObj.height};\n  }\n\n  // Positions returned by coordsChar contain some extra information.\n  // xRel is the relative x position of the input coordinates compared\n  // to the found position (so xRel > 0 means the coordinates are to\n  // the right of the character position, for example). When outside\n  // is true, that means the coordinates lie outside the line's\n  // vertical range.\n  function PosWithInfo(line, ch, outside, xRel) {\n    var pos = Pos(line, ch);\n    pos.xRel = xRel;\n    if (outside) pos.outside = true;\n    return pos;\n  }\n\n  // Compute the character position closest to the given coordinates.\n  // Input must be lineSpace-local (\"div\" coordinate system).\n  function coordsChar(cm, x, y) {\n    var doc = cm.doc;\n    y += cm.display.viewOffset;\n    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);\n    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n    if (lineN > last)\n      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);\n    if (x < 0) x = 0;\n\n    var lineObj = getLine(doc, lineN);\n    for (;;) {\n      var found = coordsCharInner(cm, lineObj, lineN, x, y);\n      var merged = collapsedSpanAtEnd(lineObj);\n      var mergedPos = merged && merged.find(0, true);\n      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))\n        lineN = lineNo(lineObj = mergedPos.to.line);\n      else\n        return found;\n    }\n  }\n\n  function coordsCharInner(cm, lineObj, lineNo, x, y) {\n    var innerOff = y - heightAtLine(lineObj);\n    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;\n    var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n\n    function getX(ch) {\n      var sp = cursorCoords(cm, Pos(lineNo, ch), \"line\", lineObj, preparedMeasure);\n      wrongLine = true;\n      if (innerOff > sp.bottom) return sp.left - adjust;\n      else if (innerOff < sp.top) return sp.left + adjust;\n      else wrongLine = false;\n      return sp.left;\n    }\n\n    var bidi = getOrder(lineObj), dist = lineObj.text.length;\n    var from = lineLeft(lineObj), to = lineRight(lineObj);\n    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;\n\n    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);\n    // Do a binary search between these bounds.\n    for (;;) {\n      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {\n        var ch = x < fromX || x - fromX <= toX - x ? from : to;\n        var xDiff = x - (ch == from ? fromX : toX);\n        while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;\n        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,\n                              xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);\n        return pos;\n      }\n      var step = Math.ceil(dist / 2), middle = from + step;\n      if (bidi) {\n        middle = from;\n        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);\n      }\n      var middleX = getX(middle);\n      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}\n      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}\n    }\n  }\n\n  var measureText;\n  // Compute the default text height.\n  function textHeight(display) {\n    if (display.cachedTextHeight != null) return display.cachedTextHeight;\n    if (measureText == null) {\n      measureText = elt(\"pre\");\n      // Measure a bunch of lines, for browsers that compute\n      // fractional heights.\n      for (var i = 0; i < 49; ++i) {\n        measureText.appendChild(document.createTextNode(\"x\"));\n        measureText.appendChild(elt(\"br\"));\n      }\n      measureText.appendChild(document.createTextNode(\"x\"));\n    }\n    removeChildrenAndAdd(display.measure, measureText);\n    var height = measureText.offsetHeight / 50;\n    if (height > 3) display.cachedTextHeight = height;\n    removeChildren(display.measure);\n    return height || 1;\n  }\n\n  // Compute the default character width.\n  function charWidth(display) {\n    if (display.cachedCharWidth != null) return display.cachedCharWidth;\n    var anchor = elt(\"span\", \"xxxxxxxxxx\");\n    var pre = elt(\"pre\", [anchor]);\n    removeChildrenAndAdd(display.measure, pre);\n    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n    if (width > 2) display.cachedCharWidth = width;\n    return width || 10;\n  }\n\n  // OPERATIONS\n\n  // Operations are used to wrap a series of changes to the editor\n  // state in such a way that each change won't have to update the\n  // cursor and display (which would be awkward, slow, and\n  // error-prone). Instead, display updates are batched and then all\n  // combined and executed at once.\n\n  var operationGroup = null;\n\n  var nextOpId = 0;\n  // Start a new operation.\n  function startOperation(cm) {\n    cm.curOp = {\n      cm: cm,\n      viewChanged: false,      // Flag that indicates that lines might need to be redrawn\n      startHeight: cm.doc.height, // Used to detect need to update scrollbar\n      forceUpdate: false,      // Used to force a redraw\n      updateInput: null,       // Whether to reset the input textarea\n      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)\n      changeObjs: null,        // Accumulated changes, for firing change events\n      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n      selectionChanged: false, // Whether the selection needs to be redrawn\n      updateMaxLine: false,    // Set when the widest line needs to be determined anew\n      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n      scrollToPos: null,       // Used to scroll to a specific position\n      focus: false,\n      id: ++nextOpId           // Unique ID\n    };\n    if (operationGroup) {\n      operationGroup.ops.push(cm.curOp);\n    } else {\n      cm.curOp.ownsGroup = operationGroup = {\n        ops: [cm.curOp],\n        delayedCallbacks: []\n      };\n    }\n  }\n\n  function fireCallbacksForOps(group) {\n    // Calls delayed callbacks and cursorActivity handlers until no\n    // new ones appear\n    var callbacks = group.delayedCallbacks, i = 0;\n    do {\n      for (; i < callbacks.length; i++)\n        callbacks[i]();\n      for (var j = 0; j < group.ops.length; j++) {\n        var op = group.ops[j];\n        if (op.cursorActivityHandlers)\n          while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n            op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm);\n      }\n    } while (i < callbacks.length);\n  }\n\n  // Finish an operation, updating the display and signalling delayed events\n  function endOperation(cm) {\n    var op = cm.curOp, group = op.ownsGroup;\n    if (!group) return;\n\n    try { fireCallbacksForOps(group); }\n    finally {\n      operationGroup = null;\n      for (var i = 0; i < group.ops.length; i++)\n        group.ops[i].cm.curOp = null;\n      endOperations(group);\n    }\n  }\n\n  // The DOM updates done when an operation finishes are batched so\n  // that the minimum number of relayouts are required.\n  function endOperations(group) {\n    var ops = group.ops;\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W1(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_R2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n      endOperation_W2(ops[i]);\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      endOperation_finish(ops[i]);\n  }\n\n  function endOperation_R1(op) {\n    var cm = op.cm, display = cm.display;\n    maybeClipScrollbars(cm);\n    if (op.updateMaxLine) findMaxLine(cm);\n\n    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n                         op.scrollToPos.to.line >= display.viewTo) ||\n      display.maxLineChanged && cm.options.lineWrapping;\n    op.update = op.mustUpdate &&\n      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n  }\n\n  function endOperation_W1(op) {\n    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n  }\n\n  function endOperation_R2(op) {\n    var cm = op.cm, display = cm.display;\n    if (op.updatedDisplay) updateHeightsInViewport(cm);\n\n    op.barMeasure = measureForScrollbars(cm);\n\n    // If the max line changed since it was last measured, measure it,\n    // and ensure the document's width matches it.\n    // updateDisplay_W2 will use these properties to do the actual resizing\n    if (display.maxLineChanged && !cm.options.lineWrapping) {\n      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n      cm.display.sizerWidth = op.adjustWidthTo;\n      op.barMeasure.scrollWidth =\n        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n    }\n\n    if (op.updatedDisplay || op.selectionChanged)\n      op.preparedSelection = display.input.prepareSelection();\n  }\n\n  function endOperation_W2(op) {\n    var cm = op.cm;\n\n    if (op.adjustWidthTo != null) {\n      cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n      if (op.maxScrollLeft < cm.doc.scrollLeft)\n        setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);\n      cm.display.maxLineChanged = false;\n    }\n\n    if (op.preparedSelection)\n      cm.display.input.showSelection(op.preparedSelection);\n    if (op.updatedDisplay)\n      setDocumentHeight(cm, op.barMeasure);\n    if (op.updatedDisplay || op.startHeight != cm.doc.height)\n      updateScrollbars(cm, op.barMeasure);\n\n    if (op.selectionChanged) restartBlink(cm);\n\n    if (cm.state.focused && op.updateInput)\n      cm.display.input.reset(op.typing);\n    if (op.focus && op.focus == activeElt()) ensureFocus(op.cm);\n  }\n\n  function endOperation_finish(op) {\n    var cm = op.cm, display = cm.display, doc = cm.doc;\n\n    if (op.updatedDisplay) postUpdateDisplay(cm, op.update);\n\n    // Abort mouse wheel delta measurement, when scrolling explicitly\n    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n      display.wheelStartX = display.wheelStartY = null;\n\n    // Propagate the scroll position to the actual DOM scroller\n    if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {\n      doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));\n      display.scrollbars.setScrollTop(doc.scrollTop);\n      display.scroller.scrollTop = doc.scrollTop;\n    }\n    if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {\n      doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft));\n      display.scrollbars.setScrollLeft(doc.scrollLeft);\n      display.scroller.scrollLeft = doc.scrollLeft;\n      alignHorizontally(cm);\n    }\n    // If we need to scroll a specific position into view, do so.\n    if (op.scrollToPos) {\n      var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n                                     clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n      if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);\n    }\n\n    // Fire events for markers that are hidden/unidden by editing or\n    // undoing\n    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n    if (hidden) for (var i = 0; i < hidden.length; ++i)\n      if (!hidden[i].lines.length) signal(hidden[i], \"hide\");\n    if (unhidden) for (var i = 0; i < unhidden.length; ++i)\n      if (unhidden[i].lines.length) signal(unhidden[i], \"unhide\");\n\n    if (display.wrapper.offsetHeight)\n      doc.scrollTop = cm.display.scroller.scrollTop;\n\n    // Fire change events, and delayed event handlers\n    if (op.changeObjs)\n      signal(cm, \"changes\", cm, op.changeObjs);\n    if (op.update)\n      op.update.finish();\n  }\n\n  // Run the given function in an operation\n  function runInOp(cm, f) {\n    if (cm.curOp) return f();\n    startOperation(cm);\n    try { return f(); }\n    finally { endOperation(cm); }\n  }\n  // Wraps a function in an operation. Returns the wrapped function.\n  function operation(cm, f) {\n    return function() {\n      if (cm.curOp) return f.apply(cm, arguments);\n      startOperation(cm);\n      try { return f.apply(cm, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n  // Used to add methods to editor and doc instances, wrapping them in\n  // operations.\n  function methodOp(f) {\n    return function() {\n      if (this.curOp) return f.apply(this, arguments);\n      startOperation(this);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(this); }\n    };\n  }\n  function docMethodOp(f) {\n    return function() {\n      var cm = this.cm;\n      if (!cm || cm.curOp) return f.apply(this, arguments);\n      startOperation(cm);\n      try { return f.apply(this, arguments); }\n      finally { endOperation(cm); }\n    };\n  }\n\n  // VIEW TRACKING\n\n  // These objects are used to represent the visible (currently drawn)\n  // part of the document. A LineView may correspond to multiple\n  // logical lines, if those are connected by collapsed ranges.\n  function LineView(doc, line, lineN) {\n    // The starting line\n    this.line = line;\n    // Continuing lines, if any\n    this.rest = visualLineContinued(line);\n    // Number of logical lines in this visual line\n    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n    this.node = this.text = null;\n    this.hidden = lineIsHidden(doc, line);\n  }\n\n  // Create a range of LineView objects for the given lines.\n  function buildViewArray(cm, from, to) {\n    var array = [], nextPos;\n    for (var pos = from; pos < to; pos = nextPos) {\n      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n      nextPos = pos + view.size;\n      array.push(view);\n    }\n    return array;\n  }\n\n  // Updates the display.view data structure for a given change to the\n  // document. From and to are in pre-change coordinates. Lendiff is\n  // the amount of lines added or subtracted by the change. This is\n  // used for changes that span multiple lines, or change the way\n  // lines are divided into visual lines. regLineChange (below)\n  // registers single-line changes.\n  function regChange(cm, from, to, lendiff) {\n    if (from == null) from = cm.doc.first;\n    if (to == null) to = cm.doc.first + cm.doc.size;\n    if (!lendiff) lendiff = 0;\n\n    var display = cm.display;\n    if (lendiff && to < display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers > from))\n      display.updateLineNumbers = from;\n\n    cm.curOp.viewChanged = true;\n\n    if (from >= display.viewTo) { // Change after\n      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n        resetView(cm);\n    } else if (to <= display.viewFrom) { // Change before\n      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n        resetView(cm);\n      } else {\n        display.viewFrom += lendiff;\n        display.viewTo += lendiff;\n      }\n    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n      resetView(cm);\n    } else if (from <= display.viewFrom) { // Top overlap\n      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cut) {\n        display.view = display.view.slice(cut.index);\n        display.viewFrom = cut.lineN;\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    } else if (to >= display.viewTo) { // Bottom overlap\n      var cut = viewCuttingPoint(cm, from, from, -1);\n      if (cut) {\n        display.view = display.view.slice(0, cut.index);\n        display.viewTo = cut.lineN;\n      } else {\n        resetView(cm);\n      }\n    } else { // Gap in the middle\n      var cutTop = viewCuttingPoint(cm, from, from, -1);\n      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cutTop && cutBot) {\n        display.view = display.view.slice(0, cutTop.index)\n          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n          .concat(display.view.slice(cutBot.index));\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    }\n\n    var ext = display.externalMeasured;\n    if (ext) {\n      if (to < ext.lineN)\n        ext.lineN += lendiff;\n      else if (from < ext.lineN + ext.size)\n        display.externalMeasured = null;\n    }\n  }\n\n  // Register a change to a single line. Type must be one of \"text\",\n  // \"gutter\", \"class\", \"widget\"\n  function regLineChange(cm, line, type) {\n    cm.curOp.viewChanged = true;\n    var display = cm.display, ext = cm.display.externalMeasured;\n    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n      display.externalMeasured = null;\n\n    if (line < display.viewFrom || line >= display.viewTo) return;\n    var lineView = display.view[findViewIndex(cm, line)];\n    if (lineView.node == null) return;\n    var arr = lineView.changes || (lineView.changes = []);\n    if (indexOf(arr, type) == -1) arr.push(type);\n  }\n\n  // Clear the view.\n  function resetView(cm) {\n    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n    cm.display.view = [];\n    cm.display.viewOffset = 0;\n  }\n\n  // Find the view element corresponding to a given line. Return null\n  // when the line isn't visible.\n  function findViewIndex(cm, n) {\n    if (n >= cm.display.viewTo) return null;\n    n -= cm.display.viewFrom;\n    if (n < 0) return null;\n    var view = cm.display.view;\n    for (var i = 0; i < view.length; i++) {\n      n -= view[i].size;\n      if (n < 0) return i;\n    }\n  }\n\n  function viewCuttingPoint(cm, oldN, newN, dir) {\n    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n      return {index: index, lineN: newN};\n    for (var i = 0, n = cm.display.viewFrom; i < index; i++)\n      n += view[i].size;\n    if (n != oldN) {\n      if (dir > 0) {\n        if (index == view.length - 1) return null;\n        diff = (n + view[index].size) - oldN;\n        index++;\n      } else {\n        diff = n - oldN;\n      }\n      oldN += diff; newN += diff;\n    }\n    while (visualLineNo(cm.doc, newN) != newN) {\n      if (index == (dir < 0 ? 0 : view.length - 1)) return null;\n      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n      index += dir;\n    }\n    return {index: index, lineN: newN};\n  }\n\n  // Force the view to cover a given range, adding empty view element\n  // or clipping off existing ones as needed.\n  function adjustView(cm, from, to) {\n    var display = cm.display, view = display.view;\n    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n      display.view = buildViewArray(cm, from, to);\n      display.viewFrom = from;\n    } else {\n      if (display.viewFrom > from)\n        display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);\n      else if (display.viewFrom < from)\n        display.view = display.view.slice(findViewIndex(cm, from));\n      display.viewFrom = from;\n      if (display.viewTo < to)\n        display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));\n      else if (display.viewTo > to)\n        display.view = display.view.slice(0, findViewIndex(cm, to));\n    }\n    display.viewTo = to;\n  }\n\n  // Count the number of lines in the view whose DOM representation is\n  // out of date (or nonexistent).\n  function countDirtyView(cm) {\n    var view = cm.display.view, dirty = 0;\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty;\n    }\n    return dirty;\n  }\n\n  // EVENT HANDLERS\n\n  // Attach the necessary event handlers when initializing the editor\n  function registerEventHandlers(cm) {\n    var d = cm.display;\n    on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n    // Older IE's will not fire a second mousedown for a double click\n    if (ie && ie_version < 11)\n      on(d.scroller, \"dblclick\", operation(cm, function(e) {\n        if (signalDOMEvent(cm, e)) return;\n        var pos = posFromMouse(cm, e);\n        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n        e_preventDefault(e);\n        var word = cm.findWordAt(pos);\n        extendSelection(cm.doc, word.anchor, word.head);\n      }));\n    else\n      on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n    // Some browsers fire contextmenu *after* opening the menu, at\n    // which point we can't mess with it anymore. Context menu is\n    // handled in onMouseDown for these browsers.\n    if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n    // Used to suppress mouse event handling when a touch happens\n    var touchFinished, prevTouch = {end: 0};\n    function finishTouch() {\n      if (d.activeTouch) {\n        touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000);\n        prevTouch = d.activeTouch;\n        prevTouch.end = +new Date;\n      }\n    };\n    function isMouseLikeTouchEvent(e) {\n      if (e.touches.length != 1) return false;\n      var touch = e.touches[0];\n      return touch.radiusX <= 1 && touch.radiusY <= 1;\n    }\n    function farAway(touch, other) {\n      if (other.left == null) return true;\n      var dx = other.left - touch.left, dy = other.top - touch.top;\n      return dx * dx + dy * dy > 20 * 20;\n    }\n    on(d.scroller, \"touchstart\", function(e) {\n      if (!isMouseLikeTouchEvent(e)) {\n        clearTimeout(touchFinished);\n        var now = +new Date;\n        d.activeTouch = {start: now, moved: false,\n                         prev: now - prevTouch.end <= 300 ? prevTouch : null};\n        if (e.touches.length == 1) {\n          d.activeTouch.left = e.touches[0].pageX;\n          d.activeTouch.top = e.touches[0].pageY;\n        }\n      }\n    });\n    on(d.scroller, \"touchmove\", function() {\n      if (d.activeTouch) d.activeTouch.moved = true;\n    });\n    on(d.scroller, \"touchend\", function(e) {\n      var touch = d.activeTouch;\n      if (touch && !eventInWidget(d, e) && touch.left != null &&\n          !touch.moved && new Date - touch.start < 300) {\n        var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n        if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n          range = new Range(pos, pos);\n        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n          range = cm.findWordAt(pos);\n        else // Triple tap\n          range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));\n        cm.setSelection(range.anchor, range.head);\n        cm.focus();\n        e_preventDefault(e);\n      }\n      finishTouch();\n    });\n    on(d.scroller, \"touchcancel\", finishTouch);\n\n    // Sync scrolling between fake scrollbars and real scrollable\n    // area, ensure viewport is updated when scrolling.\n    on(d.scroller, \"scroll\", function() {\n      if (d.scroller.clientHeight) {\n        setScrollTop(cm, d.scroller.scrollTop);\n        setScrollLeft(cm, d.scroller.scrollLeft, true);\n        signal(cm, \"scroll\", cm);\n      }\n    });\n\n    // Listen to wheel events in order to try and update the viewport on time.\n    on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n    on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n    // Prevent wrapper from ever scrolling\n    on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n    d.dragFunctions = {\n      simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);},\n      start: function(e){onDragStart(cm, e);},\n      drop: operation(cm, onDrop)\n    };\n\n    var inp = d.input.getField();\n    on(inp, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n    on(inp, \"keydown\", operation(cm, onKeyDown));\n    on(inp, \"keypress\", operation(cm, onKeyPress));\n    on(inp, \"focus\", bind(onFocus, cm));\n    on(inp, \"blur\", bind(onBlur, cm));\n  }\n\n  function dragDropChanged(cm, value, old) {\n    var wasOn = old && old != CodeMirror.Init;\n    if (!value != !wasOn) {\n      var funcs = cm.display.dragFunctions;\n      var toggle = value ? on : off;\n      toggle(cm.display.scroller, \"dragstart\", funcs.start);\n      toggle(cm.display.scroller, \"dragenter\", funcs.simple);\n      toggle(cm.display.scroller, \"dragover\", funcs.simple);\n      toggle(cm.display.scroller, \"drop\", funcs.drop);\n    }\n  }\n\n  // Called when the window resizes\n  function onResize(cm) {\n    var d = cm.display;\n    if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)\n      return;\n    // Might be a text scaling operation, clear size caches.\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n    d.scrollbarsClipped = false;\n    cm.setSize();\n  }\n\n  // MOUSE EVENTS\n\n  // Return true when the given mouse event happened in a widget\n  function eventInWidget(display, e) {\n    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n      if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n          (n.parentNode == display.sizer && n != display.mover))\n        return true;\n    }\n  }\n\n  // Given a mouse event, find the corresponding position. If liberal\n  // is false, it checks whether a gutter or scrollbar was clicked,\n  // and returns null if it was. forRect is used by rectangular\n  // selections, and tries to estimate a character position even for\n  // coordinates beyond the right of the text.\n  function posFromMouse(cm, e, liberal, forRect) {\n    var display = cm.display;\n    if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") return null;\n\n    var x, y, space = display.lineSpace.getBoundingClientRect();\n    // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n    try { x = e.clientX - space.left; y = e.clientY - space.top; }\n    catch (e) { return null; }\n    var coords = coordsChar(cm, x, y), line;\n    if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n    }\n    return coords;\n  }\n\n  // A mouse down can be a single click, double click, triple click,\n  // start of selection drag, start of text drag, new cursor\n  // (ctrl-click), rectangle drag (alt-drag), or xwin\n  // middle-click-paste. Or it might be a click on something we should\n  // not interfere with, such as a scrollbar or widget.\n  function onMouseDown(e) {\n    var cm = this, display = cm.display;\n    if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return;\n    display.shift = e.shiftKey;\n\n    if (eventInWidget(display, e)) {\n      if (!webkit) {\n        // Briefly turn off draggability, to allow widgets to do\n        // normal dragging things.\n        display.scroller.draggable = false;\n        setTimeout(function(){display.scroller.draggable = true;}, 100);\n      }\n      return;\n    }\n    if (clickInGutter(cm, e)) return;\n    var start = posFromMouse(cm, e);\n    window.focus();\n\n    switch (e_button(e)) {\n    case 1:\n      if (start)\n        leftButtonDown(cm, e, start);\n      else if (e_target(e) == display.scroller)\n        e_preventDefault(e);\n      break;\n    case 2:\n      if (webkit) cm.state.lastMiddleDown = +new Date;\n      if (start) extendSelection(cm.doc, start);\n      setTimeout(function() {display.input.focus();}, 20);\n      e_preventDefault(e);\n      break;\n    case 3:\n      if (captureRightClick) onContextMenu(cm, e);\n      else delayBlurEvent(cm);\n      break;\n    }\n  }\n\n  var lastClick, lastDoubleClick;\n  function leftButtonDown(cm, e, start) {\n    if (ie) setTimeout(bind(ensureFocus, cm), 0);\n    else cm.curOp.focus = activeElt();\n\n    var now = +new Date, type;\n    if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {\n      type = \"triple\";\n    } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {\n      type = \"double\";\n      lastDoubleClick = {time: now, pos: start};\n    } else {\n      type = \"single\";\n      lastClick = {time: now, pos: start};\n    }\n\n    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;\n    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) &&\n        type == \"single\" && (contained = sel.contains(start)) > -1 &&\n        (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) &&\n        (cmp(contained.to(), start) > 0 || start.xRel < 0))\n      leftButtonStartDrag(cm, e, start, modifier);\n    else\n      leftButtonSelect(cm, e, start, type, modifier);\n  }\n\n  // Start a text drag. When it ends, see if any dragging actually\n  // happen, and treat as a click if it didn't.\n  function leftButtonStartDrag(cm, e, start, modifier) {\n    var display = cm.display, startTime = +new Date;\n    var dragEnd = operation(cm, function(e2) {\n      if (webkit) display.scroller.draggable = false;\n      cm.state.draggingText = false;\n      off(document, \"mouseup\", dragEnd);\n      off(display.scroller, \"drop\", dragEnd);\n      if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {\n        e_preventDefault(e2);\n        if (!modifier && +new Date - 200 < startTime)\n          extendSelection(cm.doc, start);\n        // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n        if (webkit || ie && ie_version == 9)\n          setTimeout(function() {document.body.focus(); display.input.focus();}, 20);\n        else\n          display.input.focus();\n      }\n    });\n    // Let the drag handler handle this.\n    if (webkit) display.scroller.draggable = true;\n    cm.state.draggingText = dragEnd;\n    // IE's approach to draggable\n    if (display.scroller.dragDrop) display.scroller.dragDrop();\n    on(document, \"mouseup\", dragEnd);\n    on(display.scroller, \"drop\", dragEnd);\n  }\n\n  // Normal selection, as opposed to text dragging.\n  function leftButtonSelect(cm, e, start, type, addNew) {\n    var display = cm.display, doc = cm.doc;\n    e_preventDefault(e);\n\n    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n    if (addNew && !e.shiftKey) {\n      ourIndex = doc.sel.contains(start);\n      if (ourIndex > -1)\n        ourRange = ranges[ourIndex];\n      else\n        ourRange = new Range(start, start);\n    } else {\n      ourRange = doc.sel.primary();\n      ourIndex = doc.sel.primIndex;\n    }\n\n    if (e.altKey) {\n      type = \"rect\";\n      if (!addNew) ourRange = new Range(start, start);\n      start = posFromMouse(cm, e, true, true);\n      ourIndex = -1;\n    } else if (type == \"double\") {\n      var word = cm.findWordAt(start);\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, word.anchor, word.head);\n      else\n        ourRange = word;\n    } else if (type == \"triple\") {\n      var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));\n      if (cm.display.shift || doc.extend)\n        ourRange = extendRange(doc, ourRange, line.anchor, line.head);\n      else\n        ourRange = line;\n    } else {\n      ourRange = extendRange(doc, ourRange, start);\n    }\n\n    if (!addNew) {\n      ourIndex = 0;\n      setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n      startSel = doc.sel;\n    } else if (ourIndex == -1) {\n      ourIndex = ranges.length;\n      setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n                   {scroll: false, origin: \"*mouse\"});\n    } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == \"single\" && !e.shiftKey) {\n      setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0));\n      startSel = doc.sel;\n    } else {\n      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n    }\n\n    var lastPos = start;\n    function extendTo(pos) {\n      if (cmp(lastPos, pos) == 0) return;\n      lastPos = pos;\n\n      if (type == \"rect\") {\n        var ranges = [], tabSize = cm.options.tabSize;\n        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n             line <= end; line++) {\n          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n          if (left == right)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));\n          else if (text.length > leftPos)\n            ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));\n        }\n        if (!ranges.length) ranges.push(new Range(start, start));\n        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n                     {origin: \"*mouse\", scroll: false});\n        cm.scrollIntoView(pos);\n      } else {\n        var oldRange = ourRange;\n        var anchor = oldRange.anchor, head = pos;\n        if (type != \"single\") {\n          if (type == \"double\")\n            var range = cm.findWordAt(pos);\n          else\n            var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));\n          if (cmp(range.anchor, anchor) > 0) {\n            head = range.head;\n            anchor = minPos(oldRange.from(), range.anchor);\n          } else {\n            head = range.anchor;\n            anchor = maxPos(oldRange.to(), range.head);\n          }\n        }\n        var ranges = startSel.ranges.slice(0);\n        ranges[ourIndex] = new Range(clipPos(doc, anchor), head);\n        setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse);\n      }\n    }\n\n    var editorSize = display.wrapper.getBoundingClientRect();\n    // Used to ensure timeout re-tries don't fire when another extend\n    // happened in the meantime (clearTimeout isn't reliable -- at\n    // least on Chrome, the timeouts still happen even when cleared,\n    // if the clear happens after their scheduled firing time).\n    var counter = 0;\n\n    function extend(e) {\n      var curCount = ++counter;\n      var cur = posFromMouse(cm, e, true, type == \"rect\");\n      if (!cur) return;\n      if (cmp(cur, lastPos) != 0) {\n        cm.curOp.focus = activeElt();\n        extendTo(cur);\n        var visible = visibleLines(display, doc);\n        if (cur.line >= visible.to || cur.line < visible.from)\n          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);\n      } else {\n        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n        if (outside) setTimeout(operation(cm, function() {\n          if (counter != curCount) return;\n          display.scroller.scrollTop += outside;\n          extend(e);\n        }), 50);\n      }\n    }\n\n    function done(e) {\n      counter = Infinity;\n      e_preventDefault(e);\n      display.input.focus();\n      off(document, \"mousemove\", move);\n      off(document, \"mouseup\", up);\n      doc.history.lastSelOrigin = null;\n    }\n\n    var move = operation(cm, function(e) {\n      if (!e_button(e)) done(e);\n      else extend(e);\n    });\n    var up = operation(cm, done);\n    on(document, \"mousemove\", move);\n    on(document, \"mouseup\", up);\n  }\n\n  // Determines whether an event happened in the gutter, and fires the\n  // handlers for the corresponding event.\n  function gutterEvent(cm, e, type, prevent, signalfn) {\n    try { var mX = e.clientX, mY = e.clientY; }\n    catch(e) { return false; }\n    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;\n    if (prevent) e_preventDefault(e);\n\n    var display = cm.display;\n    var lineBox = display.lineDiv.getBoundingClientRect();\n\n    if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e);\n    mY -= lineBox.top - display.viewOffset;\n\n    for (var i = 0; i < cm.options.gutters.length; ++i) {\n      var g = display.gutters.childNodes[i];\n      if (g && g.getBoundingClientRect().right >= mX) {\n        var line = lineAtHeight(cm.doc, mY);\n        var gutter = cm.options.gutters[i];\n        signalfn(cm, type, cm, line, gutter, e);\n        return e_defaultPrevented(e);\n      }\n    }\n  }\n\n  function clickInGutter(cm, e) {\n    return gutterEvent(cm, e, \"gutterClick\", true, signalLater);\n  }\n\n  // Kludge to work around strange IE behavior where it'll sometimes\n  // re-fire a series of drag-related events right after the drop (#1551)\n  var lastDrop = 0;\n\n  function onDrop(e) {\n    var cm = this;\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n      return;\n    e_preventDefault(e);\n    if (ie) lastDrop = +new Date;\n    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n    if (!pos || isReadOnly(cm)) return;\n    // Might be a file drop, in which case we simply extract the text\n    // and insert it.\n    if (files && files.length && window.FileReader && window.File) {\n      var n = files.length, text = Array(n), read = 0;\n      var loadFile = function(file, i) {\n        var reader = new FileReader;\n        reader.onload = operation(cm, function() {\n          text[i] = reader.result;\n          if (++read == n) {\n            pos = clipPos(cm.doc, pos);\n            var change = {from: pos, to: pos, text: splitLines(text.join(\"\\n\")), origin: \"paste\"};\n            makeChange(cm.doc, change);\n            setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n          }\n        });\n        reader.readAsText(file);\n      };\n      for (var i = 0; i < n; ++i) loadFile(files[i], i);\n    } else { // Normal drop\n      // Don't do a replace if the drop happened inside of the selected text.\n      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n        cm.state.draggingText(e);\n        // Ensure the editor is re-focused\n        setTimeout(function() {cm.display.input.focus();}, 20);\n        return;\n      }\n      try {\n        var text = e.dataTransfer.getData(\"Text\");\n        if (text) {\n          if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))\n            var selected = cm.listSelections();\n          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n          if (selected) for (var i = 0; i < selected.length; ++i)\n            replaceRange(cm.doc, \"\", selected[i].anchor, selected[i].head, \"drag\");\n          cm.replaceSelection(text, \"around\", \"paste\");\n          cm.display.input.focus();\n        }\n      }\n      catch(e){}\n    }\n  }\n\n  function onDragStart(cm, e) {\n    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;\n\n    e.dataTransfer.setData(\"Text\", cm.getSelection());\n\n    // Use dummy image instead of default browsers image.\n    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n    if (e.dataTransfer.setDragImage && !safari) {\n      var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n      img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n      if (presto) {\n        img.width = img.height = 1;\n        cm.display.wrapper.appendChild(img);\n        // Force a relayout, or Opera won't use our image for some obscure reason\n        img._top = img.offsetTop;\n      }\n      e.dataTransfer.setDragImage(img, 0, 0);\n      if (presto) img.parentNode.removeChild(img);\n    }\n  }\n\n  // SCROLL EVENTS\n\n  // Sync the scrollable area and scrollbars, ensure the viewport\n  // covers the visible area.\n  function setScrollTop(cm, val) {\n    if (Math.abs(cm.doc.scrollTop - val) < 2) return;\n    cm.doc.scrollTop = val;\n    if (!gecko) updateDisplaySimple(cm, {top: val});\n    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;\n    cm.display.scrollbars.setScrollTop(val);\n    if (gecko) updateDisplaySimple(cm);\n    startWorker(cm, 100);\n  }\n  // Sync scroller and scrollbar, ensure the gutter elements are\n  // aligned.\n  function setScrollLeft(cm, val, isScroller) {\n    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;\n    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n    cm.doc.scrollLeft = val;\n    alignHorizontally(cm);\n    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;\n    cm.display.scrollbars.setScrollLeft(val);\n  }\n\n  // Since the delta values reported on mouse wheel events are\n  // unstandardized between browsers and even browser versions, and\n  // generally horribly unpredictable, this code starts by measuring\n  // the scroll effect that the first few mouse wheel events have,\n  // and, from that, detects the way it can convert deltas to pixel\n  // offsets afterwards.\n  //\n  // The reason we want to know the amount a wheel event will scroll\n  // is that it gives us a chance to update the display before the\n  // actual scrolling happens, reducing flickering.\n\n  var wheelSamples = 0, wheelPixelsPerUnit = null;\n  // Fill in a browser-detected starting value on browsers where we\n  // know one. These don't have to be accurate -- the result of them\n  // being wrong would just be a slight flicker on the first wheel\n  // scroll (if it is large enough).\n  if (ie) wheelPixelsPerUnit = -.53;\n  else if (gecko) wheelPixelsPerUnit = 15;\n  else if (chrome) wheelPixelsPerUnit = -.7;\n  else if (safari) wheelPixelsPerUnit = -1/3;\n\n  var wheelEventDelta = function(e) {\n    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;\n    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;\n    else if (dy == null) dy = e.wheelDelta;\n    return {x: dx, y: dy};\n  };\n  CodeMirror.wheelEventPixels = function(e) {\n    var delta = wheelEventDelta(e);\n    delta.x *= wheelPixelsPerUnit;\n    delta.y *= wheelPixelsPerUnit;\n    return delta;\n  };\n\n  function onScrollWheel(cm, e) {\n    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n    var display = cm.display, scroll = display.scroller;\n    // Quit if there's nothing to scroll here\n    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||\n          dy && scroll.scrollHeight > scroll.clientHeight)) return;\n\n    // Webkit browsers on OS X abort momentum scrolls when the target\n    // of the scroll event is removed from the scrollable element.\n    // This hack (see related code in patchDisplay) makes sure the\n    // element is kept around.\n    if (dy && mac && webkit) {\n      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n        for (var i = 0; i < view.length; i++) {\n          if (view[i].node == cur) {\n            cm.display.currentWheelTarget = cur;\n            break outer;\n          }\n        }\n      }\n    }\n\n    // On some browsers, horizontal scrolling will cause redraws to\n    // happen before the gutter has been realigned, causing it to\n    // wriggle around in a most unseemly way. When we have an\n    // estimated pixels/delta value, we just handle horizontal\n    // scrolling entirely here. It'll be slightly off from native, but\n    // better than glitching out.\n    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n      if (dy)\n        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));\n      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));\n      e_preventDefault(e);\n      display.wheelStartX = null; // Abort measurement, if in progress\n      return;\n    }\n\n    // 'Project' the visible viewport to cover the area that is being\n    // scrolled into view (if we know enough to estimate it).\n    if (dy && wheelPixelsPerUnit != null) {\n      var pixels = dy * wheelPixelsPerUnit;\n      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n      if (pixels < 0) top = Math.max(0, top + pixels - 50);\n      else bot = Math.min(cm.doc.height, bot + pixels + 50);\n      updateDisplaySimple(cm, {top: top, bottom: bot});\n    }\n\n    if (wheelSamples < 20) {\n      if (display.wheelStartX == null) {\n        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n        display.wheelDX = dx; display.wheelDY = dy;\n        setTimeout(function() {\n          if (display.wheelStartX == null) return;\n          var movedX = scroll.scrollLeft - display.wheelStartX;\n          var movedY = scroll.scrollTop - display.wheelStartY;\n          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n            (movedX && display.wheelDX && movedX / display.wheelDX);\n          display.wheelStartX = display.wheelStartY = null;\n          if (!sample) return;\n          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n          ++wheelSamples;\n        }, 200);\n      } else {\n        display.wheelDX += dx; display.wheelDY += dy;\n      }\n    }\n  }\n\n  // KEY EVENTS\n\n  // Run a handler that was bound to a key.\n  function doHandleBinding(cm, bound, dropShift) {\n    if (typeof bound == \"string\") {\n      bound = commands[bound];\n      if (!bound) return false;\n    }\n    // Ensure previous input has been read, so that the handler sees a\n    // consistent view of the document\n    cm.display.input.ensurePolled();\n    var prevShift = cm.display.shift, done = false;\n    try {\n      if (isReadOnly(cm)) cm.state.suppressEdits = true;\n      if (dropShift) cm.display.shift = false;\n      done = bound(cm) != Pass;\n    } finally {\n      cm.display.shift = prevShift;\n      cm.state.suppressEdits = false;\n    }\n    return done;\n  }\n\n  function lookupKeyForEditor(cm, name, handle) {\n    for (var i = 0; i < cm.state.keyMaps.length; i++) {\n      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n      if (result) return result;\n    }\n    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n      || lookupKey(name, cm.options.keyMap, handle, cm);\n  }\n\n  var stopSeq = new Delayed;\n  function dispatchKey(cm, name, e, handle) {\n    var seq = cm.state.keySeq;\n    if (seq) {\n      if (isModifierKey(name)) return \"handled\";\n      stopSeq.set(50, function() {\n        if (cm.state.keySeq == seq) {\n          cm.state.keySeq = null;\n          cm.display.input.reset();\n        }\n      });\n      name = seq + \" \" + name;\n    }\n    var result = lookupKeyForEditor(cm, name, handle);\n\n    if (result == \"multi\")\n      cm.state.keySeq = name;\n    if (result == \"handled\")\n      signalLater(cm, \"keyHandled\", cm, name, e);\n\n    if (result == \"handled\" || result == \"multi\") {\n      e_preventDefault(e);\n      restartBlink(cm);\n    }\n\n    if (seq && !result && /\\'$/.test(name)) {\n      e_preventDefault(e);\n      return true;\n    }\n    return !!result;\n  }\n\n  // Handle a key from the keydown event.\n  function handleKeyBinding(cm, e) {\n    var name = keyName(e, true);\n    if (!name) return false;\n\n    if (e.shiftKey && !cm.state.keySeq) {\n      // First try to resolve full name (including 'Shift-'). Failing\n      // that, see if there is a cursor-motion command (starting with\n      // 'go') bound to the keyname without 'Shift-'.\n      return dispatchKey(cm, \"Shift-\" + name, e, function(b) {return doHandleBinding(cm, b, true);})\n          || dispatchKey(cm, name, e, function(b) {\n               if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n                 return doHandleBinding(cm, b);\n             });\n    } else {\n      return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); });\n    }\n  }\n\n  // Handle a key from the keypress event\n  function handleCharBinding(cm, e, ch) {\n    return dispatchKey(cm, \"'\" + ch + \"'\", e,\n                       function(b) { return doHandleBinding(cm, b, true); });\n  }\n\n  var lastStoppedKey = null;\n  function onKeyDown(e) {\n    var cm = this;\n    cm.curOp.focus = activeElt();\n    if (signalDOMEvent(cm, e)) return;\n    // IE does strange things with escape.\n    if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;\n    var code = e.keyCode;\n    cm.display.shift = code == 16 || e.shiftKey;\n    var handled = handleKeyBinding(cm, e);\n    if (presto) {\n      lastStoppedKey = handled ? code : null;\n      // Opera has no cut event... we try to at least catch the key combo\n      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n        cm.replaceSelection(\"\", null, \"cut\");\n    }\n\n    // Turn mouse into crosshair when Alt is held on Mac.\n    if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n      showCrossHair(cm);\n  }\n\n  function showCrossHair(cm) {\n    var lineDiv = cm.display.lineDiv;\n    addClass(lineDiv, \"CodeMirror-crosshair\");\n\n    function up(e) {\n      if (e.keyCode == 18 || !e.altKey) {\n        rmClass(lineDiv, \"CodeMirror-crosshair\");\n        off(document, \"keyup\", up);\n        off(document, \"mouseover\", up);\n      }\n    }\n    on(document, \"keyup\", up);\n    on(document, \"mouseover\", up);\n  }\n\n  function onKeyUp(e) {\n    if (e.keyCode == 16) this.doc.sel.shift = false;\n    signalDOMEvent(this, e);\n  }\n\n  function onKeyPress(e) {\n    var cm = this;\n    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;\n    var keyCode = e.keyCode, charCode = e.charCode;\n    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}\n    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;\n    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n    if (handleCharBinding(cm, e, ch)) return;\n    cm.display.input.onKeyPress(e);\n  }\n\n  // FOCUS/BLUR EVENTS\n\n  function delayBlurEvent(cm) {\n    cm.state.delayingBlurEvent = true;\n    setTimeout(function() {\n      if (cm.state.delayingBlurEvent) {\n        cm.state.delayingBlurEvent = false;\n        onBlur(cm);\n      }\n    }, 100);\n  }\n\n  function onFocus(cm) {\n    if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false;\n\n    if (cm.options.readOnly == \"nocursor\") return;\n    if (!cm.state.focused) {\n      signal(cm, \"focus\", cm);\n      cm.state.focused = true;\n      addClass(cm.display.wrapper, \"CodeMirror-focused\");\n      // This test prevents this from firing when a context\n      // menu is closed (since the input reset would kill the\n      // select-all detection hack)\n      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n        cm.display.input.reset();\n        if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730\n      }\n      cm.display.input.receivedFocus();\n    }\n    restartBlink(cm);\n  }\n  function onBlur(cm) {\n    if (cm.state.delayingBlurEvent) return;\n\n    if (cm.state.focused) {\n      signal(cm, \"blur\", cm);\n      cm.state.focused = false;\n      rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n    }\n    clearInterval(cm.display.blinker);\n    setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150);\n  }\n\n  // CONTEXT MENU HANDLING\n\n  // To make the context menu work, we need to briefly unhide the\n  // textarea (making it as unobtrusive as possible) to let the\n  // right-click take effect on it.\n  function onContextMenu(cm, e) {\n    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n    cm.display.input.onContextMenu(e);\n  }\n\n  function contextMenuInGutter(cm, e) {\n    if (!hasHandler(cm, \"gutterContextMenu\")) return false;\n    return gutterEvent(cm, e, \"gutterContextMenu\", false, signal);\n  }\n\n  // UPDATING\n\n  // Compute the position of the end of a change (its 'to' property\n  // refers to the pre-change end).\n  var changeEnd = CodeMirror.changeEnd = function(change) {\n    if (!change.text) return change.to;\n    return Pos(change.from.line + change.text.length - 1,\n               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));\n  };\n\n  // Adjust a position to refer to the post-change position of the\n  // same text, or the end of the change if the change covers it.\n  function adjustForChange(pos, change) {\n    if (cmp(pos, change.from) < 0) return pos;\n    if (cmp(pos, change.to) <= 0) return changeEnd(change);\n\n    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n    if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch;\n    return Pos(line, ch);\n  }\n\n  function computeSelAfterChange(doc, change) {\n    var out = [];\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      var range = doc.sel.ranges[i];\n      out.push(new Range(adjustForChange(range.anchor, change),\n                         adjustForChange(range.head, change)));\n    }\n    return normalizeSelection(out, doc.sel.primIndex);\n  }\n\n  function offsetPos(pos, old, nw) {\n    if (pos.line == old.line)\n      return Pos(nw.line, pos.ch - old.ch + nw.ch);\n    else\n      return Pos(nw.line + (pos.line - old.line), pos.ch);\n  }\n\n  // Used by replaceSelections to allow moving the selection to the\n  // start or around the replaced test. Hint may be \"start\" or \"around\".\n  function computeReplacedSel(doc, changes, hint) {\n    var out = [];\n    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n      var from = offsetPos(change.from, oldPrev, newPrev);\n      var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n      oldPrev = change.to;\n      newPrev = to;\n      if (hint == \"around\") {\n        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n        out[i] = new Range(inv ? to : from, inv ? from : to);\n      } else {\n        out[i] = new Range(from, from);\n      }\n    }\n    return new Selection(out, doc.sel.primIndex);\n  }\n\n  // Allow \"beforeChange\" event handlers to influence a change\n  function filterChange(doc, change, update) {\n    var obj = {\n      canceled: false,\n      from: change.from,\n      to: change.to,\n      text: change.text,\n      origin: change.origin,\n      cancel: function() { this.canceled = true; }\n    };\n    if (update) obj.update = function(from, to, text, origin) {\n      if (from) this.from = clipPos(doc, from);\n      if (to) this.to = clipPos(doc, to);\n      if (text) this.text = text;\n      if (origin !== undefined) this.origin = origin;\n    };\n    signal(doc, \"beforeChange\", doc, obj);\n    if (doc.cm) signal(doc.cm, \"beforeChange\", doc.cm, obj);\n\n    if (obj.canceled) return null;\n    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};\n  }\n\n  // Apply a change to a document, and add it to the document's\n  // history, and propagating it to all linked documents.\n  function makeChange(doc, change, ignoreReadOnly) {\n    if (doc.cm) {\n      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n      if (doc.cm.state.suppressEdits) return;\n    }\n\n    if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n      change = filterChange(doc, change, true);\n      if (!change) return;\n    }\n\n    // Possibly split or suppress the update based on the presence\n    // of read-only spans in its range.\n    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n    if (split) {\n      for (var i = split.length - 1; i >= 0; --i)\n        makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n    } else {\n      makeChangeInner(doc, change);\n    }\n  }\n\n  function makeChangeInner(doc, change) {\n    if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) return;\n    var selAfter = computeSelAfterChange(doc, change);\n    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n    var rebased = [];\n\n    linkedDocs(doc, function(doc, sharedHist) {\n      if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n        rebaseHist(doc.history, change);\n        rebased.push(doc.history);\n      }\n      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n    });\n  }\n\n  // Revert a change stored in a document's history.\n  function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n    if (doc.cm && doc.cm.state.suppressEdits) return;\n\n    var hist = doc.history, event, selAfter = doc.sel;\n    var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n    // Verify that there is a useable event (so that ctrl-z won't\n    // needlessly clear selection events)\n    for (var i = 0; i < source.length; i++) {\n      event = source[i];\n      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n        break;\n    }\n    if (i == source.length) return;\n    hist.lastOrigin = hist.lastSelOrigin = null;\n\n    for (;;) {\n      event = source.pop();\n      if (event.ranges) {\n        pushSelectionToHistory(event, dest);\n        if (allowSelectionOnly && !event.equals(doc.sel)) {\n          setSelection(doc, event, {clearRedo: false});\n          return;\n        }\n        selAfter = event;\n      }\n      else break;\n    }\n\n    // Build up a reverse change object to add to the opposite history\n    // stack (redo when undoing, and vice versa).\n    var antiChanges = [];\n    pushSelectionToHistory(selAfter, dest);\n    dest.push({changes: antiChanges, generation: hist.generation});\n    hist.generation = event.generation || ++hist.maxGeneration;\n\n    var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n    for (var i = event.changes.length - 1; i >= 0; --i) {\n      var change = event.changes[i];\n      change.origin = type;\n      if (filter && !filterChange(doc, change, false)) {\n        source.length = 0;\n        return;\n      }\n\n      antiChanges.push(historyChangeFromChange(doc, change));\n\n      var after = i ? computeSelAfterChange(doc, change) : lst(source);\n      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n      if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)});\n      var rebased = [];\n\n      // Propagate to the linked documents\n      linkedDocs(doc, function(doc, sharedHist) {\n        if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n          rebaseHist(doc.history, change);\n          rebased.push(doc.history);\n        }\n        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n      });\n    }\n  }\n\n  // Sub-views need their line numbers shifted when text is added\n  // above or below them in the parent document.\n  function shiftDoc(doc, distance) {\n    if (distance == 0) return;\n    doc.first += distance;\n    doc.sel = new Selection(map(doc.sel.ranges, function(range) {\n      return new Range(Pos(range.anchor.line + distance, range.anchor.ch),\n                       Pos(range.head.line + distance, range.head.ch));\n    }), doc.sel.primIndex);\n    if (doc.cm) {\n      regChange(doc.cm, doc.first, doc.first - distance, distance);\n      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n        regLineChange(doc.cm, l, \"gutter\");\n    }\n  }\n\n  // More lower-level change function, handling only a single document\n  // (not linked ones).\n  function makeChangeSingleDoc(doc, change, selAfter, spans) {\n    if (doc.cm && !doc.cm.curOp)\n      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);\n\n    if (change.to.line < doc.first) {\n      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n      return;\n    }\n    if (change.from.line > doc.lastLine()) return;\n\n    // Clip the change to the size of this doc\n    if (change.from.line < doc.first) {\n      var shift = change.text.length - 1 - (doc.first - change.from.line);\n      shiftDoc(doc, shift);\n      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n                text: [lst(change.text)], origin: change.origin};\n    }\n    var last = doc.lastLine();\n    if (change.to.line > last) {\n      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n                text: [change.text[0]], origin: change.origin};\n    }\n\n    change.removed = getBetween(doc, change.from, change.to);\n\n    if (!selAfter) selAfter = computeSelAfterChange(doc, change);\n    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans);\n    else updateDoc(doc, change, spans);\n    setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n  }\n\n  // Handle the interaction of a change to a document with the editor\n  // that this document is part of.\n  function makeChangeSingleDocInEditor(cm, change, spans) {\n    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n    var recomputeMaxLength = false, checkWidthStart = from.line;\n    if (!cm.options.lineWrapping) {\n      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n      doc.iter(checkWidthStart, to.line + 1, function(line) {\n        if (line == display.maxLine) {\n          recomputeMaxLength = true;\n          return true;\n        }\n      });\n    }\n\n    if (doc.sel.contains(change.from, change.to) > -1)\n      signalCursorActivity(cm);\n\n    updateDoc(doc, change, spans, estimateHeight(cm));\n\n    if (!cm.options.lineWrapping) {\n      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {\n        var len = lineLength(line);\n        if (len > display.maxLineLength) {\n          display.maxLine = line;\n          display.maxLineLength = len;\n          display.maxLineChanged = true;\n          recomputeMaxLength = false;\n        }\n      });\n      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;\n    }\n\n    // Adjust frontier, schedule worker\n    doc.frontier = Math.min(doc.frontier, from.line);\n    startWorker(cm, 400);\n\n    var lendiff = change.text.length - (to.line - from.line) - 1;\n    // Remember that these lines changed, for updating the display\n    if (change.full)\n      regChange(cm);\n    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n      regLineChange(cm, from.line, \"text\");\n    else\n      regChange(cm, from.line, to.line + 1, lendiff);\n\n    var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n    if (changeHandler || changesHandler) {\n      var obj = {\n        from: from, to: to,\n        text: change.text,\n        removed: change.removed,\n        origin: change.origin\n      };\n      if (changeHandler) signalLater(cm, \"change\", cm, obj);\n      if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);\n    }\n    cm.display.selForContextMenu = null;\n  }\n\n  function replaceRange(doc, code, from, to, origin) {\n    if (!to) to = from;\n    if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }\n    if (typeof code == \"string\") code = splitLines(code);\n    makeChange(doc, {from: from, to: to, text: code, origin: origin});\n  }\n\n  // SCROLLING THINGS INTO VIEW\n\n  // If an editor sits on the top or bottom of the window, partially\n  // scrolled out of view, this ensures that the cursor is visible.\n  function maybeScrollWindow(cm, coords) {\n    if (signalDOMEvent(cm, \"scrollCursorIntoView\")) return;\n\n    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n    if (coords.top + box.top < 0) doScroll = true;\n    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;\n    if (doScroll != null && !phantom) {\n      var scrollNode = elt(\"div\", \"\\u200b\", null, \"position: absolute; top: \" +\n                           (coords.top - display.viewOffset - paddingTop(cm.display)) + \"px; height: \" +\n                           (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + \"px; left: \" +\n                           coords.left + \"px; width: 2px;\");\n      cm.display.lineSpace.appendChild(scrollNode);\n      scrollNode.scrollIntoView(doScroll);\n      cm.display.lineSpace.removeChild(scrollNode);\n    }\n  }\n\n  // Scroll a given position into view (immediately), verifying that\n  // it actually became visible (as line heights are accurately\n  // measured, the position of something may 'drift' during drawing).\n  function scrollPosIntoView(cm, pos, end, margin) {\n    if (margin == null) margin = 0;\n    for (var limit = 0; limit < 5; limit++) {\n      var changed = false, coords = cursorCoords(cm, pos);\n      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n      var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),\n                                         Math.min(coords.top, endCoords.top) - margin,\n                                         Math.max(coords.left, endCoords.left),\n                                         Math.max(coords.bottom, endCoords.bottom) + margin);\n      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n      if (scrollPos.scrollTop != null) {\n        setScrollTop(cm, scrollPos.scrollTop);\n        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;\n      }\n      if (scrollPos.scrollLeft != null) {\n        setScrollLeft(cm, scrollPos.scrollLeft);\n        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;\n      }\n      if (!changed) break;\n    }\n    return coords;\n  }\n\n  // Scroll a given set of coordinates into view (immediately).\n  function scrollIntoView(cm, x1, y1, x2, y2) {\n    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n  }\n\n  // Calculate a new scroll position needed to scroll the given\n  // rectangle into view. Returns an object with scrollTop and\n  // scrollLeft properties. When these are undefined, the\n  // vertical/horizontal position does not need to be adjusted.\n  function calculateScrollPos(cm, x1, y1, x2, y2) {\n    var display = cm.display, snapMargin = textHeight(cm.display);\n    if (y1 < 0) y1 = 0;\n    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n    var screen = displayHeight(cm), result = {};\n    if (y2 - y1 > screen) y2 = y1 + screen;\n    var docBottom = cm.doc.height + paddingVert(display);\n    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;\n    if (y1 < screentop) {\n      result.scrollTop = atTop ? 0 : y1;\n    } else if (y2 > screentop + screen) {\n      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);\n      if (newTop != screentop) result.scrollTop = newTop;\n    }\n\n    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n    var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n    var tooWide = x2 - x1 > screenw;\n    if (tooWide) x2 = x1 + screenw;\n    if (x1 < 10)\n      result.scrollLeft = 0;\n    else if (x1 < screenleft)\n      result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10));\n    else if (x2 > screenw + screenleft - 3)\n      result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw;\n    return result;\n  }\n\n  // Store a relative adjustment to the scroll position in the current\n  // operation (to be applied when the operation finishes).\n  function addToScrollPos(cm, left, top) {\n    if (left != null || top != null) resolveScrollToPos(cm);\n    if (left != null)\n      cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;\n    if (top != null)\n      cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n  }\n\n  // Make sure that at the end of the operation the current cursor is\n  // shown.\n  function ensureCursorVisible(cm) {\n    resolveScrollToPos(cm);\n    var cur = cm.getCursor(), from = cur, to = cur;\n    if (!cm.options.lineWrapping) {\n      from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;\n      to = Pos(cur.line, cur.ch + 1);\n    }\n    cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};\n  }\n\n  // When an operation has its scrollToPos property set, and another\n  // scroll action is applied before the end of the operation, this\n  // 'simulates' scrolling that position into view in a cheap way, so\n  // that the effect of intermediate scroll commands is not ignored.\n  function resolveScrollToPos(cm) {\n    var range = cm.curOp.scrollToPos;\n    if (range) {\n      cm.curOp.scrollToPos = null;\n      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n      var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n                                    Math.min(from.top, to.top) - range.margin,\n                                    Math.max(from.right, to.right),\n                                    Math.max(from.bottom, to.bottom) + range.margin);\n      cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n    }\n  }\n\n  // API UTILITIES\n\n  // Indent the given line. The how parameter can be \"smart\",\n  // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n  // (typically set to true for forced single-line indents), empty\n  // lines are not indented, and places where the mode returns Pass\n  // are left alone.\n  function indentLine(cm, n, how, aggressive) {\n    var doc = cm.doc, state;\n    if (how == null) how = \"add\";\n    if (how == \"smart\") {\n      // Fall back to \"prev\" when the mode doesn't have an indentation\n      // method.\n      if (!doc.mode.indent) how = \"prev\";\n      else state = getStateBefore(cm, n);\n    }\n\n    var tabSize = cm.options.tabSize;\n    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n    if (line.stateAfter) line.stateAfter = null;\n    var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n    if (!aggressive && !/\\S/.test(line.text)) {\n      indentation = 0;\n      how = \"not\";\n    } else if (how == \"smart\") {\n      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n      if (indentation == Pass || indentation > 150) {\n        if (!aggressive) return;\n        how = \"prev\";\n      }\n    }\n    if (how == \"prev\") {\n      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);\n      else indentation = 0;\n    } else if (how == \"add\") {\n      indentation = curSpace + cm.options.indentUnit;\n    } else if (how == \"subtract\") {\n      indentation = curSpace - cm.options.indentUnit;\n    } else if (typeof how == \"number\") {\n      indentation = curSpace + how;\n    }\n    indentation = Math.max(0, indentation);\n\n    var indentString = \"\", pos = 0;\n    if (cm.options.indentWithTabs)\n      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";}\n    if (pos < indentation) indentString += spaceStr(indentation - pos);\n\n    if (indentString != curSpaceString) {\n      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n      line.stateAfter = null;\n      return true;\n    } else {\n      // Ensure that, if the cursor was in the whitespace at the start\n      // of the line, it is moved to the end of that space.\n      for (var i = 0; i < doc.sel.ranges.length; i++) {\n        var range = doc.sel.ranges[i];\n        if (range.head.line == n && range.head.ch < curSpaceString.length) {\n          var pos = Pos(n, curSpaceString.length);\n          replaceOneSelection(doc, i, new Range(pos, pos));\n          break;\n        }\n      }\n    }\n  }\n\n  // Utility for applying a change to a line by handle or number,\n  // returning the number and optionally registering the line as\n  // changed.\n  function changeLine(doc, handle, changeType, op) {\n    var no = handle, line = handle;\n    if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n    else no = lineNo(handle);\n    if (no == null) return null;\n    if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n    return line;\n  }\n\n  // Helper for deleting text near the selection(s), used to implement\n  // backspace, delete, and similar functionality.\n  function deleteNearSelection(cm, compute) {\n    var ranges = cm.doc.sel.ranges, kill = [];\n    // Build up a set of ranges to kill first, merging overlapping\n    // ranges.\n    for (var i = 0; i < ranges.length; i++) {\n      var toKill = compute(ranges[i]);\n      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n        var replaced = kill.pop();\n        if (cmp(replaced.from, toKill.from) < 0) {\n          toKill.from = replaced.from;\n          break;\n        }\n      }\n      kill.push(toKill);\n    }\n    // Next, remove those actual ranges.\n    runInOp(cm, function() {\n      for (var i = kill.length - 1; i >= 0; i--)\n        replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\");\n      ensureCursorVisible(cm);\n    });\n  }\n\n  // Used for horizontal relative motion. Dir is -1 or 1 (left or\n  // right), unit can be \"char\", \"column\" (like char, but doesn't\n  // cross line boundaries), \"word\" (across next word), or \"group\" (to\n  // the start of next group of word or non-word-non-whitespace\n  // chars). The visually param controls whether, in right-to-left\n  // text, direction 1 means to move towards the next index in the\n  // string, or towards the character to the right of the current\n  // position. The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosH(doc, pos, dir, unit, visually) {\n    var line = pos.line, ch = pos.ch, origDir = dir;\n    var lineObj = getLine(doc, line);\n    var possible = true;\n    function findNextLine() {\n      var l = line + dir;\n      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);\n      line = l;\n      return lineObj = getLine(doc, l);\n    }\n    function moveOnce(boundToLine) {\n      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);\n      if (next == null) {\n        if (!boundToLine && findNextLine()) {\n          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);\n          else ch = dir < 0 ? lineObj.text.length : 0;\n        } else return (possible = false);\n      } else ch = next;\n      return true;\n    }\n\n    if (unit == \"char\") moveOnce();\n    else if (unit == \"column\") moveOnce(true);\n    else if (unit == \"word\" || unit == \"group\") {\n      var sawType = null, group = unit == \"group\";\n      var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n      for (var first = true;; first = false) {\n        if (dir < 0 && !moveOnce(!first)) break;\n        var cur = lineObj.text.charAt(ch) || \"\\n\";\n        var type = isWordChar(cur, helper) ? \"w\"\n          : group && cur == \"\\n\" ? \"n\"\n          : !group || /\\s/.test(cur) ? null\n          : \"p\";\n        if (group && !first && !type) type = \"s\";\n        if (sawType && sawType != type) {\n          if (dir < 0) {dir = 1; moveOnce();}\n          break;\n        }\n\n        if (type) sawType = type;\n        if (dir > 0 && !moveOnce(!first)) break;\n      }\n    }\n    var result = skipAtomic(doc, Pos(line, ch), origDir, true);\n    if (!possible) result.hitSide = true;\n    return result;\n  }\n\n  // For relative vertical movement. Dir may be -1 or 1. Unit can be\n  // \"page\" or \"line\". The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosV(cm, pos, dir, unit) {\n    var doc = cm.doc, x = pos.left, y;\n    if (unit == \"page\") {\n      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));\n    } else if (unit == \"line\") {\n      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n    }\n    for (;;) {\n      var target = coordsChar(cm, x, y);\n      if (!target.outside) break;\n      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }\n      y += dir * 5;\n    }\n    return target;\n  }\n\n  // EDITOR METHODS\n\n  // The publicly visible API. Note that methodOp(f) means\n  // 'wrap f in an operation, performed on its `this` parameter'.\n\n  // This is not the complete set of editor methods. Most of the\n  // methods defined on the Doc type are also injected into\n  // CodeMirror.prototype, for backwards compatibility and\n  // convenience.\n\n  CodeMirror.prototype = {\n    constructor: CodeMirror,\n    focus: function(){window.focus(); this.display.input.focus();},\n\n    setOption: function(option, value) {\n      var options = this.options, old = options[option];\n      if (options[option] == value && option != \"mode\") return;\n      options[option] = value;\n      if (optionHandlers.hasOwnProperty(option))\n        operation(this, optionHandlers[option])(this, value, old);\n    },\n\n    getOption: function(option) {return this.options[option];},\n    getDoc: function() {return this.doc;},\n\n    addKeyMap: function(map, bottom) {\n      this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n    },\n    removeKeyMap: function(map) {\n      var maps = this.state.keyMaps;\n      for (var i = 0; i < maps.length; ++i)\n        if (maps[i] == map || maps[i].name == map) {\n          maps.splice(i, 1);\n          return true;\n        }\n    },\n\n    addOverlay: methodOp(function(spec, options) {\n      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n      if (mode.startState) throw new Error(\"Overlays may not be stateful.\");\n      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});\n      this.state.modeGen++;\n      regChange(this);\n    }),\n    removeOverlay: methodOp(function(spec) {\n      var overlays = this.state.overlays;\n      for (var i = 0; i < overlays.length; ++i) {\n        var cur = overlays[i].modeSpec;\n        if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n          overlays.splice(i, 1);\n          this.state.modeGen++;\n          regChange(this);\n          return;\n        }\n      }\n    }),\n\n    indentLine: methodOp(function(n, dir, aggressive) {\n      if (typeof dir != \"string\" && typeof dir != \"number\") {\n        if (dir == null) dir = this.options.smartIndent ? \"smart\" : \"prev\";\n        else dir = dir ? \"add\" : \"subtract\";\n      }\n      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);\n    }),\n    indentSelection: methodOp(function(how) {\n      var ranges = this.doc.sel.ranges, end = -1;\n      for (var i = 0; i < ranges.length; i++) {\n        var range = ranges[i];\n        if (!range.empty()) {\n          var from = range.from(), to = range.to();\n          var start = Math.max(end, from.line);\n          end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n          for (var j = start; j < end; ++j)\n            indentLine(this, j, how);\n          var newRanges = this.doc.sel.ranges;\n          if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n            replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);\n        } else if (range.head.line > end) {\n          indentLine(this, range.head.line, how, true);\n          end = range.head.line;\n          if (i == this.doc.sel.primIndex) ensureCursorVisible(this);\n        }\n      }\n    }),\n\n    // Fetch the parser token for a given character. Useful for hacks\n    // that want to inspect the mode state (say, for completion).\n    getTokenAt: function(pos, precise) {\n      return takeToken(this, pos, precise);\n    },\n\n    getLineTokens: function(line, precise) {\n      return takeToken(this, Pos(line), precise, true);\n    },\n\n    getTokenTypeAt: function(pos) {\n      pos = clipPos(this.doc, pos);\n      var styles = getLineStyles(this, getLine(this.doc, pos.line));\n      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n      var type;\n      if (ch == 0) type = styles[2];\n      else for (;;) {\n        var mid = (before + after) >> 1;\n        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;\n        else if (styles[mid * 2 + 1] < ch) before = mid + 1;\n        else { type = styles[mid * 2 + 2]; break; }\n      }\n      var cut = type ? type.indexOf(\"cm-overlay \") : -1;\n      return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);\n    },\n\n    getModeAt: function(pos) {\n      var mode = this.doc.mode;\n      if (!mode.innerMode) return mode;\n      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;\n    },\n\n    getHelper: function(pos, type) {\n      return this.getHelpers(pos, type)[0];\n    },\n\n    getHelpers: function(pos, type) {\n      var found = [];\n      if (!helpers.hasOwnProperty(type)) return found;\n      var help = helpers[type], mode = this.getModeAt(pos);\n      if (typeof mode[type] == \"string\") {\n        if (help[mode[type]]) found.push(help[mode[type]]);\n      } else if (mode[type]) {\n        for (var i = 0; i < mode[type].length; i++) {\n          var val = help[mode[type][i]];\n          if (val) found.push(val);\n        }\n      } else if (mode.helperType && help[mode.helperType]) {\n        found.push(help[mode.helperType]);\n      } else if (help[mode.name]) {\n        found.push(help[mode.name]);\n      }\n      for (var i = 0; i < help._global.length; i++) {\n        var cur = help._global[i];\n        if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n          found.push(cur.val);\n      }\n      return found;\n    },\n\n    getStateAfter: function(line, precise) {\n      var doc = this.doc;\n      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n      return getStateBefore(this, line + 1, precise);\n    },\n\n    cursorCoords: function(start, mode) {\n      var pos, range = this.doc.sel.primary();\n      if (start == null) pos = range.head;\n      else if (typeof start == \"object\") pos = clipPos(this.doc, start);\n      else pos = start ? range.from() : range.to();\n      return cursorCoords(this, pos, mode || \"page\");\n    },\n\n    charCoords: function(pos, mode) {\n      return charCoords(this, clipPos(this.doc, pos), mode || \"page\");\n    },\n\n    coordsChar: function(coords, mode) {\n      coords = fromCoordSystem(this, coords, mode || \"page\");\n      return coordsChar(this, coords.left, coords.top);\n    },\n\n    lineAtHeight: function(height, mode) {\n      height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n      return lineAtHeight(this.doc, height + this.display.viewOffset);\n    },\n    heightAtLine: function(line, mode) {\n      var end = false, lineObj;\n      if (typeof line == \"number\") {\n        var last = this.doc.first + this.doc.size - 1;\n        if (line < this.doc.first) line = this.doc.first;\n        else if (line > last) { line = last; end = true; }\n        lineObj = getLine(this.doc, line);\n      } else {\n        lineObj = line;\n      }\n      return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\").top +\n        (end ? this.doc.height - heightAtLine(lineObj) : 0);\n    },\n\n    defaultTextHeight: function() { return textHeight(this.display); },\n    defaultCharWidth: function() { return charWidth(this.display); },\n\n    setGutterMarker: methodOp(function(line, gutterID, value) {\n      return changeLine(this.doc, line, \"gutter\", function(line) {\n        var markers = line.gutterMarkers || (line.gutterMarkers = {});\n        markers[gutterID] = value;\n        if (!value && isEmpty(markers)) line.gutterMarkers = null;\n        return true;\n      });\n    }),\n\n    clearGutter: methodOp(function(gutterID) {\n      var cm = this, doc = cm.doc, i = doc.first;\n      doc.iter(function(line) {\n        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n          line.gutterMarkers[gutterID] = null;\n          regLineChange(cm, i, \"gutter\");\n          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;\n        }\n        ++i;\n      });\n    }),\n\n    lineInfo: function(line) {\n      if (typeof line == \"number\") {\n        if (!isLine(this.doc, line)) return null;\n        var n = line;\n        line = getLine(this.doc, line);\n        if (!line) return null;\n      } else {\n        var n = lineNo(line);\n        if (n == null) return null;\n      }\n      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n              widgets: line.widgets};\n    },\n\n    getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};},\n\n    addWidget: function(pos, node, scroll, vert, horiz) {\n      var display = this.display;\n      pos = cursorCoords(this, clipPos(this.doc, pos));\n      var top = pos.bottom, left = pos.left;\n      node.style.position = \"absolute\";\n      node.setAttribute(\"cm-ignore-events\", \"true\");\n      this.display.input.setUneditable(node);\n      display.sizer.appendChild(node);\n      if (vert == \"over\") {\n        top = pos.top;\n      } else if (vert == \"above\" || vert == \"near\") {\n        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n        // Default to positioning above (if specified and possible); otherwise default to positioning below\n        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n          top = pos.top - node.offsetHeight;\n        else if (pos.bottom + node.offsetHeight <= vspace)\n          top = pos.bottom;\n        if (left + node.offsetWidth > hspace)\n          left = hspace - node.offsetWidth;\n      }\n      node.style.top = top + \"px\";\n      node.style.left = node.style.right = \"\";\n      if (horiz == \"right\") {\n        left = display.sizer.clientWidth - node.offsetWidth;\n        node.style.right = \"0px\";\n      } else {\n        if (horiz == \"left\") left = 0;\n        else if (horiz == \"middle\") left = (display.sizer.clientWidth - node.offsetWidth) / 2;\n        node.style.left = left + \"px\";\n      }\n      if (scroll)\n        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);\n    },\n\n    triggerOnKeyDown: methodOp(onKeyDown),\n    triggerOnKeyPress: methodOp(onKeyPress),\n    triggerOnKeyUp: onKeyUp,\n\n    execCommand: function(cmd) {\n      if (commands.hasOwnProperty(cmd))\n        return commands[cmd](this);\n    },\n\n    triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n    findPosH: function(from, amount, unit, visually) {\n      var dir = 1;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        cur = findPosH(this.doc, cur, dir, unit, visually);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveH: methodOp(function(dir, unit) {\n      var cm = this;\n      cm.extendSelectionsBy(function(range) {\n        if (cm.display.shift || cm.doc.extend || range.empty())\n          return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually);\n        else\n          return dir < 0 ? range.from() : range.to();\n      }, sel_move);\n    }),\n\n    deleteH: methodOp(function(dir, unit) {\n      var sel = this.doc.sel, doc = this.doc;\n      if (sel.somethingSelected())\n        doc.replaceSelection(\"\", null, \"+delete\");\n      else\n        deleteNearSelection(this, function(range) {\n          var other = findPosH(doc, range.head, dir, unit, false);\n          return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other};\n        });\n    }),\n\n    findPosV: function(from, amount, unit, goalColumn) {\n      var dir = 1, x = goalColumn;\n      if (amount < 0) { dir = -1; amount = -amount; }\n      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n        var coords = cursorCoords(this, cur, \"div\");\n        if (x == null) x = coords.left;\n        else coords.left = x;\n        cur = findPosV(this, coords, dir, unit);\n        if (cur.hitSide) break;\n      }\n      return cur;\n    },\n\n    moveV: methodOp(function(dir, unit) {\n      var cm = this, doc = this.doc, goals = [];\n      var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected();\n      doc.extendSelectionsBy(function(range) {\n        if (collapse)\n          return dir < 0 ? range.from() : range.to();\n        var headPos = cursorCoords(cm, range.head, \"div\");\n        if (range.goalColumn != null) headPos.left = range.goalColumn;\n        goals.push(headPos.left);\n        var pos = findPosV(cm, headPos, dir, unit);\n        if (unit == \"page\" && range == doc.sel.primary())\n          addToScrollPos(cm, null, charCoords(cm, pos, \"div\").top - headPos.top);\n        return pos;\n      }, sel_move);\n      if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++)\n        doc.sel.ranges[i].goalColumn = goals[i];\n    }),\n\n    // Find the word at the given position (as returned by coordsChar).\n    findWordAt: function(pos) {\n      var doc = this.doc, line = getLine(doc, pos.line).text;\n      var start = pos.ch, end = pos.ch;\n      if (line) {\n        var helper = this.getHelper(pos, \"wordChars\");\n        if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;\n        var startChar = line.charAt(start);\n        var check = isWordChar(startChar, helper)\n          ? function(ch) { return isWordChar(ch, helper); }\n          : /\\s/.test(startChar) ? function(ch) {return /\\s/.test(ch);}\n          : function(ch) {return !/\\s/.test(ch) && !isWordChar(ch);};\n        while (start > 0 && check(line.charAt(start - 1))) --start;\n        while (end < line.length && check(line.charAt(end))) ++end;\n      }\n      return new Range(Pos(pos.line, start), Pos(pos.line, end));\n    },\n\n    toggleOverwrite: function(value) {\n      if (value != null && value == this.state.overwrite) return;\n      if (this.state.overwrite = !this.state.overwrite)\n        addClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n      else\n        rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n\n      signal(this, \"overwriteToggle\", this, this.state.overwrite);\n    },\n    hasFocus: function() { return this.display.input.getField() == activeElt(); },\n\n    scrollTo: methodOp(function(x, y) {\n      if (x != null || y != null) resolveScrollToPos(this);\n      if (x != null) this.curOp.scrollLeft = x;\n      if (y != null) this.curOp.scrollTop = y;\n    }),\n    getScrollInfo: function() {\n      var scroller = this.display.scroller;\n      return {left: scroller.scrollLeft, top: scroller.scrollTop,\n              height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n              width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n              clientHeight: displayHeight(this), clientWidth: displayWidth(this)};\n    },\n\n    scrollIntoView: methodOp(function(range, margin) {\n      if (range == null) {\n        range = {from: this.doc.sel.primary().head, to: null};\n        if (margin == null) margin = this.options.cursorScrollMargin;\n      } else if (typeof range == \"number\") {\n        range = {from: Pos(range, 0), to: null};\n      } else if (range.from == null) {\n        range = {from: range, to: null};\n      }\n      if (!range.to) range.to = range.from;\n      range.margin = margin || 0;\n\n      if (range.from.line != null) {\n        resolveScrollToPos(this);\n        this.curOp.scrollToPos = range;\n      } else {\n        var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),\n                                      Math.min(range.from.top, range.to.top) - range.margin,\n                                      Math.max(range.from.right, range.to.right),\n                                      Math.max(range.from.bottom, range.to.bottom) + range.margin);\n        this.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n      }\n    }),\n\n    setSize: methodOp(function(width, height) {\n      var cm = this;\n      function interpret(val) {\n        return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val;\n      }\n      if (width != null) cm.display.wrapper.style.width = interpret(width);\n      if (height != null) cm.display.wrapper.style.height = interpret(height);\n      if (cm.options.lineWrapping) clearLineMeasurementCache(this);\n      var lineNo = cm.display.viewFrom;\n      cm.doc.iter(lineNo, cm.display.viewTo, function(line) {\n        if (line.widgets) for (var i = 0; i < line.widgets.length; i++)\n          if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, \"widget\"); break; }\n        ++lineNo;\n      });\n      cm.curOp.forceUpdate = true;\n      signal(cm, \"refresh\", this);\n    }),\n\n    operation: function(f){return runInOp(this, f);},\n\n    refresh: methodOp(function() {\n      var oldHeight = this.display.cachedTextHeight;\n      regChange(this);\n      this.curOp.forceUpdate = true;\n      clearCaches(this);\n      this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);\n      updateGutterSpace(this);\n      if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n        estimateLineHeights(this);\n      signal(this, \"refresh\", this);\n    }),\n\n    swapDoc: methodOp(function(doc) {\n      var old = this.doc;\n      old.cm = null;\n      attachDoc(this, doc);\n      clearCaches(this);\n      this.display.input.reset();\n      this.scrollTo(doc.scrollLeft, doc.scrollTop);\n      this.curOp.forceScroll = true;\n      signalLater(this, \"swapDoc\", this, old);\n      return old;\n    }),\n\n    getInputField: function(){return this.display.input.getField();},\n    getWrapperElement: function(){return this.display.wrapper;},\n    getScrollerElement: function(){return this.display.scroller;},\n    getGutterElement: function(){return this.display.gutters;}\n  };\n  eventMixin(CodeMirror);\n\n  // OPTION DEFAULTS\n\n  // The default configuration options.\n  var defaults = CodeMirror.defaults = {};\n  // Functions to run when options are changed.\n  var optionHandlers = CodeMirror.optionHandlers = {};\n\n  function option(name, deflt, handle, notOnInit) {\n    CodeMirror.defaults[name] = deflt;\n    if (handle) optionHandlers[name] =\n      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;\n  }\n\n  // Passed to option handlers when there is no old value.\n  var Init = CodeMirror.Init = {toString: function(){return \"CodeMirror.Init\";}};\n\n  // These two are, on init, called from the constructor because they\n  // have to be initialized before the editor can start at all.\n  option(\"value\", \"\", function(cm, val) {\n    cm.setValue(val);\n  }, true);\n  option(\"mode\", null, function(cm, val) {\n    cm.doc.modeOption = val;\n    loadMode(cm);\n  }, true);\n\n  option(\"indentUnit\", 2, loadMode, true);\n  option(\"indentWithTabs\", false);\n  option(\"smartIndent\", true);\n  option(\"tabSize\", 4, function(cm) {\n    resetModeState(cm);\n    clearCaches(cm);\n    regChange(cm);\n  }, true);\n  option(\"specialChars\", /[\\t\\u0000-\\u0019\\u00ad\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function(cm, val, old) {\n    cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n    if (old != CodeMirror.Init) cm.refresh();\n  });\n  option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);\n  option(\"electricChars\", true);\n  option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function() {\n    throw new Error(\"inputStyle can not (yet) be changed in a running editor\"); // FIXME\n  }, true);\n  option(\"rtlMoveVisually\", !windows);\n  option(\"wholeLineUpdateBefore\", true);\n\n  option(\"theme\", \"default\", function(cm) {\n    themeChanged(cm);\n    guttersChanged(cm);\n  }, true);\n  option(\"keyMap\", \"default\", function(cm, val, old) {\n    var next = getKeyMap(val);\n    var prev = old != CodeMirror.Init && getKeyMap(old);\n    if (prev && prev.detach) prev.detach(cm, next);\n    if (next.attach) next.attach(cm, prev || null);\n  });\n  option(\"extraKeys\", null);\n\n  option(\"lineWrapping\", false, wrappingChanged, true);\n  option(\"gutters\", [], function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"fixedGutter\", true, function(cm, val) {\n    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n    cm.refresh();\n  }, true);\n  option(\"coverGutterNextToScrollbar\", false, function(cm) {updateScrollbars(cm);}, true);\n  option(\"scrollbarStyle\", \"native\", function(cm) {\n    initScrollbars(cm);\n    updateScrollbars(cm);\n    cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n    cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n  }, true);\n  option(\"lineNumbers\", false, function(cm) {\n    setGuttersForLineNumbers(cm.options);\n    guttersChanged(cm);\n  }, true);\n  option(\"firstLineNumber\", 1, guttersChanged, true);\n  option(\"lineNumberFormatter\", function(integer) {return integer;}, guttersChanged, true);\n  option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n  option(\"resetSelectionOnContextMenu\", true);\n  option(\"lineWiseCopyCut\", true);\n\n  option(\"readOnly\", false, function(cm, val) {\n    if (val == \"nocursor\") {\n      onBlur(cm);\n      cm.display.input.blur();\n      cm.display.disabled = true;\n    } else {\n      cm.display.disabled = false;\n      if (!val) cm.display.input.reset();\n    }\n  });\n  option(\"disableInput\", false, function(cm, val) {if (!val) cm.display.input.reset();}, true);\n  option(\"dragDrop\", true, dragDropChanged);\n\n  option(\"cursorBlinkRate\", 530);\n  option(\"cursorScrollMargin\", 0);\n  option(\"cursorHeight\", 1, updateSelection, true);\n  option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n  option(\"workTime\", 100);\n  option(\"workDelay\", 100);\n  option(\"flattenSpans\", true, resetModeState, true);\n  option(\"addModeClass\", false, resetModeState, true);\n  option(\"pollInterval\", 100);\n  option(\"undoDepth\", 200, function(cm, val){cm.doc.history.undoDepth = val;});\n  option(\"historyEventDelay\", 1250);\n  option(\"viewportMargin\", 10, function(cm){cm.refresh();}, true);\n  option(\"maxHighlightLength\", 10000, resetModeState, true);\n  option(\"moveInputWithCursor\", true, function(cm, val) {\n    if (!val) cm.display.input.resetPosition();\n  });\n\n  option(\"tabindex\", null, function(cm, val) {\n    cm.display.input.getField().tabIndex = val || \"\";\n  });\n  option(\"autofocus\", null);\n\n  // MODE DEFINITION AND QUERYING\n\n  // Known modes, by name and by MIME\n  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\n\n  // Extra arguments are stored as the mode's dependencies, which is\n  // used by (legacy) mechanisms like loadmode.js to automatically\n  // load a mode. (Preferred mechanism is the require/define calls.)\n  CodeMirror.defineMode = function(name, mode) {\n    if (!CodeMirror.defaults.mode && name != \"null\") CodeMirror.defaults.mode = name;\n    if (arguments.length > 2)\n      mode.dependencies = Array.prototype.slice.call(arguments, 2);\n    modes[name] = mode;\n  };\n\n  CodeMirror.defineMIME = function(mime, spec) {\n    mimeModes[mime] = spec;\n  };\n\n  // Given a MIME type, a {name, ...options} config object, or a name\n  // string, return a mode config object.\n  CodeMirror.resolveMode = function(spec) {\n    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n      spec = mimeModes[spec];\n    } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n      var found = mimeModes[spec.name];\n      if (typeof found == \"string\") found = {name: found};\n      spec = createObj(found, spec);\n      spec.name = found.name;\n    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n      return CodeMirror.resolveMode(\"application/xml\");\n    }\n    if (typeof spec == \"string\") return {name: spec};\n    else return spec || {name: \"null\"};\n  };\n\n  // Given a mode spec (anything that resolveMode accepts), find and\n  // initialize an actual mode object.\n  CodeMirror.getMode = function(options, spec) {\n    var spec = CodeMirror.resolveMode(spec);\n    var mfactory = modes[spec.name];\n    if (!mfactory) return CodeMirror.getMode(options, \"text/plain\");\n    var modeObj = mfactory(options, spec);\n    if (modeExtensions.hasOwnProperty(spec.name)) {\n      var exts = modeExtensions[spec.name];\n      for (var prop in exts) {\n        if (!exts.hasOwnProperty(prop)) continue;\n        if (modeObj.hasOwnProperty(prop)) modeObj[\"_\" + prop] = modeObj[prop];\n        modeObj[prop] = exts[prop];\n      }\n    }\n    modeObj.name = spec.name;\n    if (spec.helperType) modeObj.helperType = spec.helperType;\n    if (spec.modeProps) for (var prop in spec.modeProps)\n      modeObj[prop] = spec.modeProps[prop];\n\n    return modeObj;\n  };\n\n  // Minimal default mode.\n  CodeMirror.defineMode(\"null\", function() {\n    return {token: function(stream) {stream.skipToEnd();}};\n  });\n  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n  // This can be used to attach properties to mode objects from\n  // outside the actual mode definition.\n  var modeExtensions = CodeMirror.modeExtensions = {};\n  CodeMirror.extendMode = function(mode, properties) {\n    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n    copyObj(properties, exts);\n  };\n\n  // EXTENSIONS\n\n  CodeMirror.defineExtension = function(name, func) {\n    CodeMirror.prototype[name] = func;\n  };\n  CodeMirror.defineDocExtension = function(name, func) {\n    Doc.prototype[name] = func;\n  };\n  CodeMirror.defineOption = option;\n\n  var initHooks = [];\n  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};\n\n  var helpers = CodeMirror.helpers = {};\n  CodeMirror.registerHelper = function(type, name, value) {\n    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []};\n    helpers[type][name] = value;\n  };\n  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n    CodeMirror.registerHelper(type, name, value);\n    helpers[type]._global.push({pred: predicate, val: value});\n  };\n\n  // MODE STATE HANDLING\n\n  // Utility functions for working with state. Exported because nested\n  // modes need to do this for their inner modes.\n\n  var copyState = CodeMirror.copyState = function(mode, state) {\n    if (state === true) return state;\n    if (mode.copyState) return mode.copyState(state);\n    var nstate = {};\n    for (var n in state) {\n      var val = state[n];\n      if (val instanceof Array) val = val.concat([]);\n      nstate[n] = val;\n    }\n    return nstate;\n  };\n\n  var startState = CodeMirror.startState = function(mode, a1, a2) {\n    return mode.startState ? mode.startState(a1, a2) : true;\n  };\n\n  // Given a mode and a state (for that mode), find the inner mode and\n  // state at the position that the state refers to.\n  CodeMirror.innerMode = function(mode, state) {\n    while (mode.innerMode) {\n      var info = mode.innerMode(state);\n      if (!info || info.mode == mode) break;\n      state = info.state;\n      mode = info.mode;\n    }\n    return info || {mode: mode, state: state};\n  };\n\n  // STANDARD COMMANDS\n\n  // Commands are parameter-less actions that can be performed on an\n  // editor, mostly used for keybindings.\n  var commands = CodeMirror.commands = {\n    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);},\n    singleSelection: function(cm) {\n      cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll);\n    },\n    killLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        if (range.empty()) {\n          var len = getLine(cm.doc, range.head.line).text.length;\n          if (range.head.ch == len && range.head.line < cm.lastLine())\n            return {from: range.head, to: Pos(range.head.line + 1, 0)};\n          else\n            return {from: range.head, to: Pos(range.head.line, len)};\n        } else {\n          return {from: range.from(), to: range.to()};\n        }\n      });\n    },\n    deleteLine: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0),\n                to: clipPos(cm.doc, Pos(range.to().line + 1, 0))};\n      });\n    },\n    delLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        return {from: Pos(range.from().line, 0), to: range.from()};\n      });\n    },\n    delWrappedLineLeft: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n        return {from: leftPos, to: range.from()};\n      });\n    },\n    delWrappedLineRight: function(cm) {\n      deleteNearSelection(cm, function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n        return {from: range.from(), to: rightPos };\n      });\n    },\n    undo: function(cm) {cm.undo();},\n    redo: function(cm) {cm.redo();},\n    undoSelection: function(cm) {cm.undoSelection();},\n    redoSelection: function(cm) {cm.redoSelection();},\n    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},\n    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},\n    goLineStart: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); },\n                            {origin: \"+move\", bias: 1});\n    },\n    goLineStartSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        return lineStartSmart(cm, range.head);\n      }, {origin: \"+move\", bias: 1});\n    },\n    goLineEnd: function(cm) {\n      cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); },\n                            {origin: \"+move\", bias: -1});\n    },\n    goLineRight: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeft: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        return cm.coordsChar({left: 0, top: top}, \"div\");\n      }, sel_move);\n    },\n    goLineLeftSmart: function(cm) {\n      cm.extendSelectionsBy(function(range) {\n        var top = cm.charCoords(range.head, \"div\").top + 5;\n        var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n        if (pos.ch < cm.getLine(pos.line).search(/\\S/)) return lineStartSmart(cm, range.head);\n        return pos;\n      }, sel_move);\n    },\n    goLineUp: function(cm) {cm.moveV(-1, \"line\");},\n    goLineDown: function(cm) {cm.moveV(1, \"line\");},\n    goPageUp: function(cm) {cm.moveV(-1, \"page\");},\n    goPageDown: function(cm) {cm.moveV(1, \"page\");},\n    goCharLeft: function(cm) {cm.moveH(-1, \"char\");},\n    goCharRight: function(cm) {cm.moveH(1, \"char\");},\n    goColumnLeft: function(cm) {cm.moveH(-1, \"column\");},\n    goColumnRight: function(cm) {cm.moveH(1, \"column\");},\n    goWordLeft: function(cm) {cm.moveH(-1, \"word\");},\n    goGroupRight: function(cm) {cm.moveH(1, \"group\");},\n    goGroupLeft: function(cm) {cm.moveH(-1, \"group\");},\n    goWordRight: function(cm) {cm.moveH(1, \"word\");},\n    delCharBefore: function(cm) {cm.deleteH(-1, \"char\");},\n    delCharAfter: function(cm) {cm.deleteH(1, \"char\");},\n    delWordBefore: function(cm) {cm.deleteH(-1, \"word\");},\n    delWordAfter: function(cm) {cm.deleteH(1, \"word\");},\n    delGroupBefore: function(cm) {cm.deleteH(-1, \"group\");},\n    delGroupAfter: function(cm) {cm.deleteH(1, \"group\");},\n    indentAuto: function(cm) {cm.indentSelection(\"smart\");},\n    indentMore: function(cm) {cm.indentSelection(\"add\");},\n    indentLess: function(cm) {cm.indentSelection(\"subtract\");},\n    insertTab: function(cm) {cm.replaceSelection(\"\\t\");},\n    insertSoftTab: function(cm) {\n      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n      for (var i = 0; i < ranges.length; i++) {\n        var pos = ranges[i].from();\n        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n        spaces.push(new Array(tabSize - col % tabSize + 1).join(\" \"));\n      }\n      cm.replaceSelections(spaces);\n    },\n    defaultTab: function(cm) {\n      if (cm.somethingSelected()) cm.indentSelection(\"add\");\n      else cm.execCommand(\"insertTab\");\n    },\n    transposeChars: function(cm) {\n      runInOp(cm, function() {\n        var ranges = cm.listSelections(), newSel = [];\n        for (var i = 0; i < ranges.length; i++) {\n          var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n          if (line) {\n            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);\n            if (cur.ch > 0) {\n              cur = new Pos(cur.line, cur.ch + 1);\n              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n                              Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n            } else if (cur.line > cm.doc.first) {\n              var prev = getLine(cm.doc, cur.line - 1).text;\n              if (prev)\n                cm.replaceRange(line.charAt(0) + \"\\n\" + prev.charAt(prev.length - 1),\n                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), \"+transpose\");\n            }\n          }\n          newSel.push(new Range(cur, cur));\n        }\n        cm.setSelections(newSel);\n      });\n    },\n    newlineAndIndent: function(cm) {\n      runInOp(cm, function() {\n        var len = cm.listSelections().length;\n        for (var i = 0; i < len; i++) {\n          var range = cm.listSelections()[i];\n          cm.replaceRange(\"\\n\", range.anchor, range.head, \"+input\");\n          cm.indentLine(range.from().line + 1, null, true);\n          ensureCursorVisible(cm);\n        }\n      });\n    },\n    toggleOverwrite: function(cm) {cm.toggleOverwrite();}\n  };\n\n\n  // STANDARD KEYMAPS\n\n  var keyMap = CodeMirror.keyMap = {};\n\n  keyMap.basic = {\n    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n    \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n    \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n    \"Esc\": \"singleSelection\"\n  };\n  // Note that the save and find-related commands aren't defined by\n  // default. User code or addons can define them. Unknown commands\n  // are simply ignored.\n  keyMap.pcDefault = {\n    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n    \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n    \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n    fallthrough: \"basic\"\n  };\n  // Very basic readline/emacs-style bindings, which are standard on Mac.\n  keyMap.emacsy = {\n    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n    \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n    \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n    \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\"\n  };\n  keyMap.macDefault = {\n    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n    \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n    \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n    \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  };\n  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n  // KEYMAP DISPATCH\n\n  function normalizeKeyName(name) {\n    var parts = name.split(/-(?!$)/), name = parts[parts.length - 1];\n    var alt, ctrl, shift, cmd;\n    for (var i = 0; i < parts.length - 1; i++) {\n      var mod = parts[i];\n      if (/^(cmd|meta|m)$/i.test(mod)) cmd = true;\n      else if (/^a(lt)?$/i.test(mod)) alt = true;\n      else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n      else if (/^s(hift)$/i.test(mod)) shift = true;\n      else throw new Error(\"Unrecognized modifier name: \" + mod);\n    }\n    if (alt) name = \"Alt-\" + name;\n    if (ctrl) name = \"Ctrl-\" + name;\n    if (cmd) name = \"Cmd-\" + name;\n    if (shift) name = \"Shift-\" + name;\n    return name;\n  }\n\n  // This is a kludge to keep keymaps mostly working as raw objects\n  // (backwards compatibility) while at the same time support features\n  // like normalization and multi-stroke key bindings. It compiles a\n  // new normalized keymap, and then updates the old object to reflect\n  // this.\n  CodeMirror.normalizeKeyMap = function(keymap) {\n    var copy = {};\n    for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) {\n      var value = keymap[keyname];\n      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue;\n      if (value == \"...\") { delete keymap[keyname]; continue; }\n\n      var keys = map(keyname.split(\" \"), normalizeKeyName);\n      for (var i = 0; i < keys.length; i++) {\n        var val, name;\n        if (i == keys.length - 1) {\n          name = keys.join(\" \");\n          val = value;\n        } else {\n          name = keys.slice(0, i + 1).join(\" \");\n          val = \"...\";\n        }\n        var prev = copy[name];\n        if (!prev) copy[name] = val;\n        else if (prev != val) throw new Error(\"Inconsistent bindings for \" + name);\n      }\n      delete keymap[keyname];\n    }\n    for (var prop in copy) keymap[prop] = copy[prop];\n    return keymap;\n  };\n\n  var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) {\n    map = getKeyMap(map);\n    var found = map.call ? map.call(key, context) : map[key];\n    if (found === false) return \"nothing\";\n    if (found === \"...\") return \"multi\";\n    if (found != null && handle(found)) return \"handled\";\n\n    if (map.fallthrough) {\n      if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n        return lookupKey(key, map.fallthrough, handle, context);\n      for (var i = 0; i < map.fallthrough.length; i++) {\n        var result = lookupKey(key, map.fallthrough[i], handle, context);\n        if (result) return result;\n      }\n    }\n  };\n\n  // Modifier key presses don't count as 'real' key presses for the\n  // purpose of keymap fallthrough.\n  var isModifierKey = CodeMirror.isModifierKey = function(value) {\n    var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\";\n  };\n\n  // Look up the name of a key as indicated by an event object.\n  var keyName = CodeMirror.keyName = function(event, noShift) {\n    if (presto && event.keyCode == 34 && event[\"char\"]) return false;\n    var base = keyNames[event.keyCode], name = base;\n    if (name == null || event.altGraphKey) return false;\n    if (event.altKey && base != \"Alt\") name = \"Alt-\" + name;\n    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") name = \"Ctrl-\" + name;\n    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") name = \"Cmd-\" + name;\n    if (!noShift && event.shiftKey && base != \"Shift\") name = \"Shift-\" + name;\n    return name;\n  };\n\n  function getKeyMap(val) {\n    return typeof val == \"string\" ? keyMap[val] : val;\n  }\n\n  // FROMTEXTAREA\n\n  CodeMirror.fromTextArea = function(textarea, options) {\n    options = options ? copyObj(options) : {};\n    options.value = textarea.value;\n    if (!options.tabindex && textarea.tabIndex)\n      options.tabindex = textarea.tabIndex;\n    if (!options.placeholder && textarea.placeholder)\n      options.placeholder = textarea.placeholder;\n    // Set autofocus to true if this textarea is focused, or if it has\n    // autofocus and no other element is focused.\n    if (options.autofocus == null) {\n      var hasFocus = activeElt();\n      options.autofocus = hasFocus == textarea ||\n        textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n    }\n\n    function save() {textarea.value = cm.getValue();}\n    if (textarea.form) {\n      on(textarea.form, \"submit\", save);\n      // Deplorable hack to make the submit method do the right thing.\n      if (!options.leaveSubmitMethodAlone) {\n        var form = textarea.form, realSubmit = form.submit;\n        try {\n          var wrappedSubmit = form.submit = function() {\n            save();\n            form.submit = realSubmit;\n            form.submit();\n            form.submit = wrappedSubmit;\n          };\n        } catch(e) {}\n      }\n    }\n\n    options.finishInit = function(cm) {\n      cm.save = save;\n      cm.getTextArea = function() { return textarea; };\n      cm.toTextArea = function() {\n        cm.toTextArea = isNaN; // Prevent this from being ran twice\n        save();\n        textarea.parentNode.removeChild(cm.getWrapperElement());\n        textarea.style.display = \"\";\n        if (textarea.form) {\n          off(textarea.form, \"submit\", save);\n          if (typeof textarea.form.submit == \"function\")\n            textarea.form.submit = realSubmit;\n        }\n      };\n    };\n\n    textarea.style.display = \"none\";\n    var cm = CodeMirror(function(node) {\n      textarea.parentNode.insertBefore(node, textarea.nextSibling);\n    }, options);\n    return cm;\n  };\n\n  // STRING STREAM\n\n  // Fed to the mode parsers, provides helper functions to make\n  // parsers more succinct.\n\n  var StringStream = CodeMirror.StringStream = function(string, tabSize) {\n    this.pos = this.start = 0;\n    this.string = string;\n    this.tabSize = tabSize || 8;\n    this.lastColumnPos = this.lastColumnValue = 0;\n    this.lineStart = 0;\n  };\n\n  StringStream.prototype = {\n    eol: function() {return this.pos >= this.string.length;},\n    sol: function() {return this.pos == this.lineStart;},\n    peek: function() {return this.string.charAt(this.pos) || undefined;},\n    next: function() {\n      if (this.pos < this.string.length)\n        return this.string.charAt(this.pos++);\n    },\n    eat: function(match) {\n      var ch = this.string.charAt(this.pos);\n      if (typeof match == \"string\") var ok = ch == match;\n      else var ok = ch && (match.test ? match.test(ch) : match(ch));\n      if (ok) {++this.pos; return ch;}\n    },\n    eatWhile: function(match) {\n      var start = this.pos;\n      while (this.eat(match)){}\n      return this.pos > start;\n    },\n    eatSpace: function() {\n      var start = this.pos;\n      while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n      return this.pos > start;\n    },\n    skipToEnd: function() {this.pos = this.string.length;},\n    skipTo: function(ch) {\n      var found = this.string.indexOf(ch, this.pos);\n      if (found > -1) {this.pos = found; return true;}\n    },\n    backUp: function(n) {this.pos -= n;},\n    column: function() {\n      if (this.lastColumnPos < this.start) {\n        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n        this.lastColumnPos = this.start;\n      }\n      return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    indentation: function() {\n      return countColumn(this.string, null, this.tabSize) -\n        (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n    },\n    match: function(pattern, consume, caseInsensitive) {\n      if (typeof pattern == \"string\") {\n        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n        var substr = this.string.substr(this.pos, pattern.length);\n        if (cased(substr) == cased(pattern)) {\n          if (consume !== false) this.pos += pattern.length;\n          return true;\n        }\n      } else {\n        var match = this.string.slice(this.pos).match(pattern);\n        if (match && match.index > 0) return null;\n        if (match && consume !== false) this.pos += match[0].length;\n        return match;\n      }\n    },\n    current: function(){return this.string.slice(this.start, this.pos);},\n    hideFirstChars: function(n, inner) {\n      this.lineStart += n;\n      try { return inner(); }\n      finally { this.lineStart -= n; }\n    }\n  };\n\n  // TEXTMARKERS\n\n  // Created with markText and setBookmark methods. A TextMarker is a\n  // handle that can be used to clear or find a marked position in the\n  // document. Line objects hold arrays (markedSpans) containing\n  // {from, to, marker} object pointing to such marker objects, and\n  // indicating that such a marker is present on that line. Multiple\n  // lines may point to the same marker when it spans across lines.\n  // The spans will have null for their from/to properties when the\n  // marker continues beyond the start/end of the line. Markers have\n  // links back to the lines they currently touch.\n\n  var nextMarkerId = 0;\n\n  var TextMarker = CodeMirror.TextMarker = function(doc, type) {\n    this.lines = [];\n    this.type = type;\n    this.doc = doc;\n    this.id = ++nextMarkerId;\n  };\n  eventMixin(TextMarker);\n\n  // Clear the marker.\n  TextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    var cm = this.doc.cm, withOp = cm && !cm.curOp;\n    if (withOp) startOperation(cm);\n    if (hasHandler(this, \"clear\")) {\n      var found = this.find();\n      if (found) signalLater(this, \"clear\", found.from, found.to);\n    }\n    var min = null, max = null;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (cm && !this.collapsed) regLineChange(cm, lineNo(line), \"text\");\n      else if (cm) {\n        if (span.to != null) max = lineNo(line);\n        if (span.from != null) min = lineNo(line);\n      }\n      line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n        updateLineHeight(line, textHeight(cm.display));\n    }\n    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {\n      var visual = visualLine(this.lines[i]), len = lineLength(visual);\n      if (len > cm.display.maxLineLength) {\n        cm.display.maxLine = visual;\n        cm.display.maxLineLength = len;\n        cm.display.maxLineChanged = true;\n      }\n    }\n\n    if (min != null && cm && this.collapsed) regChange(cm, min, max + 1);\n    this.lines.length = 0;\n    this.explicitlyCleared = true;\n    if (this.atomic && this.doc.cantEdit) {\n      this.doc.cantEdit = false;\n      if (cm) reCheckSelection(cm.doc);\n    }\n    if (cm) signalLater(cm, \"markerCleared\", cm, this);\n    if (withOp) endOperation(cm);\n    if (this.parent) this.parent.clear();\n  };\n\n  // Find the position of the marker in the document. Returns a {from,\n  // to} object by default. Side can be passed to get a specific side\n  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n  // Pos objects returned contain a line object, rather than a line\n  // number (used to prevent looking up the same line twice).\n  TextMarker.prototype.find = function(side, lineObj) {\n    if (side == null && this.type == \"bookmark\") side = 1;\n    var from, to;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (span.from != null) {\n        from = Pos(lineObj ? line : lineNo(line), span.from);\n        if (side == -1) return from;\n      }\n      if (span.to != null) {\n        to = Pos(lineObj ? line : lineNo(line), span.to);\n        if (side == 1) return to;\n      }\n    }\n    return from && {from: from, to: to};\n  };\n\n  // Signals that the marker's widget changed, and surrounding layout\n  // should be recomputed.\n  TextMarker.prototype.changed = function() {\n    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n    if (!pos || !cm) return;\n    runInOp(cm, function() {\n      var line = pos.line, lineN = lineNo(pos.line);\n      var view = findViewForLine(cm, lineN);\n      if (view) {\n        clearLineMeasurementCacheFor(view);\n        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n      }\n      cm.curOp.updateMaxLine = true;\n      if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n        var oldHeight = widget.height;\n        widget.height = null;\n        var dHeight = widgetHeight(widget) - oldHeight;\n        if (dHeight)\n          updateLineHeight(line, line.height + dHeight);\n      }\n    });\n  };\n\n  TextMarker.prototype.attachLine = function(line) {\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);\n    }\n    this.lines.push(line);\n  };\n  TextMarker.prototype.detachLine = function(line) {\n    this.lines.splice(indexOf(this.lines, line), 1);\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n    }\n  };\n\n  // Collapsed markers have unique ids, in order to be able to order\n  // them, which is needed for uniquely determining an outer marker\n  // when they overlap (they may nest, but not partially overlap).\n  var nextMarkerId = 0;\n\n  // Create a marker, wire it up to the right lines, and\n  function markText(doc, from, to, options, type) {\n    // Shared markers (across linked documents) are handled separately\n    // (markTextShared will call out to this again, once per\n    // document).\n    if (options && options.shared) return markTextShared(doc, from, to, options, type);\n    // Ensure we are in an operation.\n    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);\n\n    var marker = new TextMarker(doc, type), diff = cmp(from, to);\n    if (options) copyObj(options, marker, false);\n    // Don't connect empty markers unless clearWhenEmpty is false\n    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n      return marker;\n    if (marker.replacedWith) {\n      // Showing up as a widget implies collapsed (widget replaces text)\n      marker.collapsed = true;\n      marker.widgetNode = elt(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n      if (!options.handleMouseEvents) marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\");\n      if (options.insertLeft) marker.widgetNode.insertLeft = true;\n    }\n    if (marker.collapsed) {\n      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n        throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");\n      sawCollapsedSpans = true;\n    }\n\n    if (marker.addToHistory)\n      addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN);\n\n    var curLine = from.line, cm = doc.cm, updateMaxLine;\n    doc.iter(curLine, to.line + 1, function(line) {\n      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n        updateMaxLine = true;\n      if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0);\n      addMarkedSpan(line, new MarkedSpan(marker,\n                                         curLine == from.line ? from.ch : null,\n                                         curLine == to.line ? to.ch : null));\n      ++curLine;\n    });\n    // lineIsHidden depends on the presence of the spans, so needs a second pass\n    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {\n      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);\n    });\n\n    if (marker.clearOnEnter) on(marker, \"beforeCursorEnter\", function() { marker.clear(); });\n\n    if (marker.readOnly) {\n      sawReadOnlySpans = true;\n      if (doc.history.done.length || doc.history.undone.length)\n        doc.clearHistory();\n    }\n    if (marker.collapsed) {\n      marker.id = ++nextMarkerId;\n      marker.atomic = true;\n    }\n    if (cm) {\n      // Sync editor state\n      if (updateMaxLine) cm.curOp.updateMaxLine = true;\n      if (marker.collapsed)\n        regChange(cm, from.line, to.line + 1);\n      else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n        for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, \"text\");\n      if (marker.atomic) reCheckSelection(cm.doc);\n      signalLater(cm, \"markerAdded\", cm, marker);\n    }\n    return marker;\n  }\n\n  // SHARED TEXTMARKERS\n\n  // A shared marker spans multiple linked documents. It is\n  // implemented as a meta-marker-object controlling multiple normal\n  // markers.\n  var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) {\n    this.markers = markers;\n    this.primary = primary;\n    for (var i = 0; i < markers.length; ++i)\n      markers[i].parent = this;\n  };\n  eventMixin(SharedTextMarker);\n\n  SharedTextMarker.prototype.clear = function() {\n    if (this.explicitlyCleared) return;\n    this.explicitlyCleared = true;\n    for (var i = 0; i < this.markers.length; ++i)\n      this.markers[i].clear();\n    signalLater(this, \"clear\");\n  };\n  SharedTextMarker.prototype.find = function(side, lineObj) {\n    return this.primary.find(side, lineObj);\n  };\n\n  function markTextShared(doc, from, to, options, type) {\n    options = copyObj(options);\n    options.shared = false;\n    var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n    var widget = options.widgetNode;\n    linkedDocs(doc, function(doc) {\n      if (widget) options.widgetNode = widget.cloneNode(true);\n      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n      for (var i = 0; i < doc.linked.length; ++i)\n        if (doc.linked[i].isParent) return;\n      primary = lst(markers);\n    });\n    return new SharedTextMarker(markers, primary);\n  }\n\n  function findSharedMarkers(doc) {\n    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())),\n                         function(m) { return m.parent; });\n  }\n\n  function copySharedMarkers(doc, markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], pos = marker.find();\n      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n      if (cmp(mFrom, mTo)) {\n        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n        marker.markers.push(subMark);\n        subMark.parent = marker;\n      }\n    }\n  }\n\n  function detachSharedMarkers(markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], linked = [marker.primary.doc];;\n      linkedDocs(marker.primary.doc, function(d) { linked.push(d); });\n      for (var j = 0; j < marker.markers.length; j++) {\n        var subMarker = marker.markers[j];\n        if (indexOf(linked, subMarker.doc) == -1) {\n          subMarker.parent = null;\n          marker.markers.splice(j--, 1);\n        }\n      }\n    }\n  }\n\n  // TEXTMARKER SPANS\n\n  function MarkedSpan(marker, from, to) {\n    this.marker = marker;\n    this.from = from; this.to = to;\n  }\n\n  // Search an array of spans for a span matching the given marker.\n  function getMarkedSpanFor(spans, marker) {\n    if (spans) for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.marker == marker) return span;\n    }\n  }\n  // Remove a span from an array, returning undefined if no spans are\n  // left (we don't store arrays for lines without spans).\n  function removeMarkedSpan(spans, span) {\n    for (var r, i = 0; i < spans.length; ++i)\n      if (spans[i] != span) (r || (r = [])).push(spans[i]);\n    return r;\n  }\n  // Add a span to a line.\n  function addMarkedSpan(line, span) {\n    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n    span.marker.attachLine(line);\n  }\n\n  // Used for the algorithm that adjusts markers for a change in the\n  // document. These functions cut an array of spans at a given\n  // character position, returning an array of remaining chunks (or\n  // undefined if nothing remains).\n  function markedSpansBefore(old, startCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n      if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n      }\n    }\n    return nw;\n  }\n  function markedSpansAfter(old, endCh, isInsert) {\n    if (old) for (var i = 0, nw; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n      if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);\n        (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n                                              span.to == null ? null : span.to - endCh));\n      }\n    }\n    return nw;\n  }\n\n  // Given a change object, compute the new set of marker spans that\n  // cover the line in which the change took place. Removes spans\n  // entirely within the change, reconnects spans belonging to the\n  // same marker that appear on both sides of the change, and cuts off\n  // spans partially within the change. Returns an array of span\n  // arrays with one element for each line in (after) the change.\n  function stretchSpansOverChange(doc, change) {\n    if (change.full) return null;\n    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n    if (!oldFirst && !oldLast) return null;\n\n    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n    // Get the spans that 'stick out' on both sides\n    var first = markedSpansBefore(oldFirst, startCh, isInsert);\n    var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n    // Next, merge those two ends\n    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n    if (first) {\n      // Fix up .to properties of first\n      for (var i = 0; i < first.length; ++i) {\n        var span = first[i];\n        if (span.to == null) {\n          var found = getMarkedSpanFor(last, span.marker);\n          if (!found) span.to = startCh;\n          else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n        }\n      }\n    }\n    if (last) {\n      // Fix up .from in last (or move them into first in case of sameLine)\n      for (var i = 0; i < last.length; ++i) {\n        var span = last[i];\n        if (span.to != null) span.to += offset;\n        if (span.from == null) {\n          var found = getMarkedSpanFor(first, span.marker);\n          if (!found) {\n            span.from = offset;\n            if (sameLine) (first || (first = [])).push(span);\n          }\n        } else {\n          span.from += offset;\n          if (sameLine) (first || (first = [])).push(span);\n        }\n      }\n    }\n    // Make sure we didn't create any zero-length spans\n    if (first) first = clearEmptySpans(first);\n    if (last && last != first) last = clearEmptySpans(last);\n\n    var newMarkers = [first];\n    if (!sameLine) {\n      // Fill gap with whole-line-spans\n      var gap = change.text.length - 2, gapMarkers;\n      if (gap > 0 && first)\n        for (var i = 0; i < first.length; ++i)\n          if (first[i].to == null)\n            (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n      for (var i = 0; i < gap; ++i)\n        newMarkers.push(gapMarkers);\n      newMarkers.push(last);\n    }\n    return newMarkers;\n  }\n\n  // Remove spans that are empty and don't have a clearWhenEmpty\n  // option of false.\n  function clearEmptySpans(spans) {\n    for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n        spans.splice(i--, 1);\n    }\n    if (!spans.length) return null;\n    return spans;\n  }\n\n  // Used for un/re-doing changes from the history. Combines the\n  // result of computing the existing spans with the set of spans that\n  // existed in the history (so that deleting around a span and then\n  // undoing brings back the span).\n  function mergeOldSpans(doc, change) {\n    var old = getOldSpans(doc, change);\n    var stretched = stretchSpansOverChange(doc, change);\n    if (!old) return stretched;\n    if (!stretched) return old;\n\n    for (var i = 0; i < old.length; ++i) {\n      var oldCur = old[i], stretchCur = stretched[i];\n      if (oldCur && stretchCur) {\n        spans: for (var j = 0; j < stretchCur.length; ++j) {\n          var span = stretchCur[j];\n          for (var k = 0; k < oldCur.length; ++k)\n            if (oldCur[k].marker == span.marker) continue spans;\n          oldCur.push(span);\n        }\n      } else if (stretchCur) {\n        old[i] = stretchCur;\n      }\n    }\n    return old;\n  }\n\n  // Used to 'clip' out readOnly ranges when making a change.\n  function removeReadOnlyRanges(doc, from, to) {\n    var markers = null;\n    doc.iter(from.line, to.line + 1, function(line) {\n      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n        var mark = line.markedSpans[i].marker;\n        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n          (markers || (markers = [])).push(mark);\n      }\n    });\n    if (!markers) return null;\n    var parts = [{from: from, to: to}];\n    for (var i = 0; i < markers.length; ++i) {\n      var mk = markers[i], m = mk.find(0);\n      for (var j = 0; j < parts.length; ++j) {\n        var p = parts[j];\n        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n          newParts.push({from: p.from, to: m.from});\n        if (dto > 0 || !mk.inclusiveRight && !dto)\n          newParts.push({from: m.to, to: p.to});\n        parts.splice.apply(parts, newParts);\n        j += newParts.length - 1;\n      }\n    }\n    return parts;\n  }\n\n  // Connect or disconnect spans from a line.\n  function detachMarkedSpans(line) {\n    var spans = line.markedSpans;\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.detachLine(line);\n    line.markedSpans = null;\n  }\n  function attachMarkedSpans(line, spans) {\n    if (!spans) return;\n    for (var i = 0; i < spans.length; ++i)\n      spans[i].marker.attachLine(line);\n    line.markedSpans = spans;\n  }\n\n  // Helpers used when computing which overlapping collapsed span\n  // counts as the larger one.\n  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; }\n  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; }\n\n  // Returns a number indicating which of two overlapping collapsed\n  // spans is larger (and thus includes the other). Falls back to\n  // comparing ids when the spans cover exactly the same range.\n  function compareCollapsedMarkers(a, b) {\n    var lenDiff = a.lines.length - b.lines.length;\n    if (lenDiff != 0) return lenDiff;\n    var aPos = a.find(), bPos = b.find();\n    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n    if (fromCmp) return -fromCmp;\n    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n    if (toCmp) return toCmp;\n    return b.id - a.id;\n  }\n\n  // Find out whether a line ends or starts in a collapsed span. If\n  // so, return the marker for that span.\n  function collapsedSpanAtSide(line, start) {\n    var sps = sawCollapsedSpans && line.markedSpans, found;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n          (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n        found = sp.marker;\n    }\n    return found;\n  }\n  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }\n  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }\n\n  // Test whether there exists a collapsed span that partially\n  // overlaps (covers the start or end, but not both) of a new span.\n  // Such overlap is not allowed.\n  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n    var line = getLine(doc, lineNo);\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var i = 0; i < sps.length; ++i) {\n      var sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      var found = sp.marker.find(0);\n      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n      if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n          fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n        return true;\n    }\n  }\n\n  // A visual line is a line as drawn on the screen. Folding, for\n  // example, can cause multiple logical lines to appear on the same\n  // visual line. This finds the start of the visual line that the\n  // given line is part of (usually that is the line itself).\n  function visualLine(line) {\n    var merged;\n    while (merged = collapsedSpanAtStart(line))\n      line = merged.find(-1, true).line;\n    return line;\n  }\n\n  // Returns an array of logical lines that continue the visual line\n  // started by the argument, or undefined if there are no such lines.\n  function visualLineContinued(line) {\n    var merged, lines;\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      (lines || (lines = [])).push(line);\n    }\n    return lines;\n  }\n\n  // Get the line number of the start of the visual line that the\n  // given line number is part of.\n  function visualLineNo(doc, lineN) {\n    var line = getLine(doc, lineN), vis = visualLine(line);\n    if (line == vis) return lineN;\n    return lineNo(vis);\n  }\n  // Get the line number of the start of the next visual line after\n  // the given line.\n  function visualLineEndNo(doc, lineN) {\n    if (lineN > doc.lastLine()) return lineN;\n    var line = getLine(doc, lineN), merged;\n    if (!lineIsHidden(doc, line)) return lineN;\n    while (merged = collapsedSpanAtEnd(line))\n      line = merged.find(1, true).line;\n    return lineNo(line) + 1;\n  }\n\n  // Compute whether a line is hidden. Lines count as hidden when they\n  // are part of a visual line that starts with another line, or when\n  // they are entirely covered by collapsed, non-widget span.\n  function lineIsHidden(doc, line) {\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (!sp.marker.collapsed) continue;\n      if (sp.from == null) return true;\n      if (sp.marker.widgetNode) continue;\n      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n        return true;\n    }\n  }\n  function lineIsHiddenInner(doc, line, span) {\n    if (span.to == null) {\n      var end = span.marker.find(1, true);\n      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));\n    }\n    if (span.marker.inclusiveRight && span.to == line.text.length)\n      return true;\n    for (var sp, i = 0; i < line.markedSpans.length; ++i) {\n      sp = line.markedSpans[i];\n      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n          (sp.to == null || sp.to != span.from) &&\n          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n          lineIsHiddenInner(doc, line, sp)) return true;\n    }\n  }\n\n  // LINE WIDGETS\n\n  // Line widgets are block elements displayed above or below a line.\n\n  var LineWidget = CodeMirror.LineWidget = function(doc, node, options) {\n    if (options) for (var opt in options) if (options.hasOwnProperty(opt))\n      this[opt] = options[opt];\n    this.doc = doc;\n    this.node = node;\n  };\n  eventMixin(LineWidget);\n\n  function adjustScrollWhenAboveVisible(cm, line, diff) {\n    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n      addToScrollPos(cm, null, diff);\n  }\n\n  LineWidget.prototype.clear = function() {\n    var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n    if (no == null || !ws) return;\n    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);\n    if (!ws.length) line.widgets = null;\n    var height = widgetHeight(this);\n    updateLineHeight(line, Math.max(0, line.height - height));\n    if (cm) runInOp(cm, function() {\n      adjustScrollWhenAboveVisible(cm, line, -height);\n      regLineChange(cm, no, \"widget\");\n    });\n  };\n  LineWidget.prototype.changed = function() {\n    var oldH = this.height, cm = this.doc.cm, line = this.line;\n    this.height = null;\n    var diff = widgetHeight(this) - oldH;\n    if (!diff) return;\n    updateLineHeight(line, line.height + diff);\n    if (cm) runInOp(cm, function() {\n      cm.curOp.forceUpdate = true;\n      adjustScrollWhenAboveVisible(cm, line, diff);\n    });\n  };\n\n  function widgetHeight(widget) {\n    if (widget.height != null) return widget.height;\n    var cm = widget.doc.cm;\n    if (!cm) return 0;\n    if (!contains(document.body, widget.node)) {\n      var parentStyle = \"position: relative;\";\n      if (widget.coverGutter)\n        parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\";\n      if (widget.noHScroll)\n        parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\";\n      removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n    }\n    return widget.height = widget.node.offsetHeight;\n  }\n\n  function addLineWidget(doc, handle, node, options) {\n    var widget = new LineWidget(doc, node, options);\n    var cm = doc.cm;\n    if (cm && widget.noHScroll) cm.display.alignWidgets = true;\n    changeLine(doc, handle, \"widget\", function(line) {\n      var widgets = line.widgets || (line.widgets = []);\n      if (widget.insertAt == null) widgets.push(widget);\n      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);\n      widget.line = line;\n      if (cm && !lineIsHidden(doc, line)) {\n        var aboveVisible = heightAtLine(line) < doc.scrollTop;\n        updateLineHeight(line, line.height + widgetHeight(widget));\n        if (aboveVisible) addToScrollPos(cm, null, widget.height);\n        cm.curOp.forceUpdate = true;\n      }\n      return true;\n    });\n    return widget;\n  }\n\n  // LINE DATA STRUCTURE\n\n  // Line objects. These hold state related to a line, including\n  // highlighting info (the styles array).\n  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {\n    this.text = text;\n    attachMarkedSpans(this, markedSpans);\n    this.height = estimateHeight ? estimateHeight(this) : 1;\n  };\n  eventMixin(Line);\n  Line.prototype.lineNo = function() { return lineNo(this); };\n\n  // Change the content (text, markers) of a line. Automatically\n  // invalidates cached information and tries to re-estimate the\n  // line's height.\n  function updateLine(line, text, markedSpans, estimateHeight) {\n    line.text = text;\n    if (line.stateAfter) line.stateAfter = null;\n    if (line.styles) line.styles = null;\n    if (line.order != null) line.order = null;\n    detachMarkedSpans(line);\n    attachMarkedSpans(line, markedSpans);\n    var estHeight = estimateHeight ? estimateHeight(line) : 1;\n    if (estHeight != line.height) updateLineHeight(line, estHeight);\n  }\n\n  // Detach a line from the document tree and its markers.\n  function cleanUpLine(line) {\n    line.parent = null;\n    detachMarkedSpans(line);\n  }\n\n  function extractLineClasses(type, output) {\n    if (type) for (;;) {\n      var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n      if (!lineClass) break;\n      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n      var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n      if (output[prop] == null)\n        output[prop] = lineClass[2];\n      else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n        output[prop] += \" \" + lineClass[2];\n    }\n    return type;\n  }\n\n  function callBlankLine(mode, state) {\n    if (mode.blankLine) return mode.blankLine(state);\n    if (!mode.innerMode) return;\n    var inner = CodeMirror.innerMode(mode, state);\n    if (inner.mode.blankLine) return inner.mode.blankLine(inner.state);\n  }\n\n  function readToken(mode, stream, state, inner) {\n    for (var i = 0; i < 10; i++) {\n      if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;\n      var style = mode.token(stream, state);\n      if (stream.pos > stream.start) return style;\n    }\n    throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\");\n  }\n\n  // Utility for getTokenAt and getLineTokens\n  function takeToken(cm, pos, precise, asArray) {\n    function getObj(copy) {\n      return {start: stream.start, end: stream.pos,\n              string: stream.current(),\n              type: style || null,\n              state: copy ? copyState(doc.mode, state) : state};\n    }\n\n    var doc = cm.doc, mode = doc.mode, style;\n    pos = clipPos(doc, pos);\n    var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n    var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n    if (asArray) tokens = [];\n    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n      stream.start = stream.pos;\n      style = readToken(mode, stream, state);\n      if (asArray) tokens.push(getObj(true));\n    }\n    return asArray ? tokens : getObj();\n  }\n\n  // Run the given mode's parser over a line, calling f for each token.\n  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n    var flattenSpans = mode.flattenSpans;\n    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n    var curStart = 0, curStyle = null;\n    var stream = new StringStream(text, cm.options.tabSize), style;\n    var inner = cm.options.addModeClass && [null];\n    if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n    while (!stream.eol()) {\n      if (stream.pos > cm.options.maxHighlightLength) {\n        flattenSpans = false;\n        if (forceToEnd) processLine(cm, text, state, stream.pos);\n        stream.pos = text.length;\n        style = null;\n      } else {\n        style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n      }\n      if (inner) {\n        var mName = inner[0].name;\n        if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n      }\n      if (!flattenSpans || curStyle != style) {\n        while (curStart < stream.start) {\n          curStart = Math.min(stream.start, curStart + 50000);\n          f(curStart, curStyle);\n        }\n        curStyle = style;\n      }\n      stream.start = stream.pos;\n    }\n    while (curStart < stream.pos) {\n      // Webkit seems to refuse to render text nodes longer than 57444 characters\n      var pos = Math.min(stream.pos, curStart + 50000);\n      f(pos, curStyle);\n      curStart = pos;\n    }\n  }\n\n  // Compute a style array (an array starting with a mode generation\n  // -- for invalidation -- followed by pairs of end positions and\n  // style strings), which is used to highlight the tokens on the\n  // line.\n  function highlightLine(cm, line, state, forceToEnd) {\n    // A styles array always starts with a number identifying the\n    // mode/overlays that it is based on (for easy invalidation).\n    var st = [cm.state.modeGen], lineClasses = {};\n    // Compute the base array of styles\n    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n      st.push(end, style);\n    }, lineClasses, forceToEnd);\n\n    // Run overlays, adjust style array.\n    for (var o = 0; o < cm.state.overlays.length; ++o) {\n      var overlay = cm.state.overlays[o], i = 1, at = 0;\n      runMode(cm, line.text, overlay.mode, true, function(end, style) {\n        var start = i;\n        // Ensure there's a token end at the current position, and that i points at it\n        while (at < end) {\n          var i_end = st[i];\n          if (i_end > end)\n            st.splice(i, 1, end, st[i+1], i_end);\n          i += 2;\n          at = Math.min(end, i_end);\n        }\n        if (!style) return;\n        if (overlay.opaque) {\n          st.splice(start, i - start, end, \"cm-overlay \" + style);\n          i = start + 2;\n        } else {\n          for (; start < i; start += 2) {\n            var cur = st[start+1];\n            st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n          }\n        }\n      }, lineClasses);\n    }\n\n    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n  }\n\n  function getLineStyles(cm, line, updateFrontier) {\n    if (!line.styles || line.styles[0] != cm.state.modeGen) {\n      var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));\n      line.styles = result.styles;\n      if (result.classes) line.styleClasses = result.classes;\n      else if (line.styleClasses) line.styleClasses = null;\n      if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;\n    }\n    return line.styles;\n  }\n\n  // Lightweight form of highlight -- proceed over this line and\n  // update state, but don't save a style array. Used for lines that\n  // aren't currently visible.\n  function processLine(cm, text, state, startAt) {\n    var mode = cm.doc.mode;\n    var stream = new StringStream(text, cm.options.tabSize);\n    stream.start = stream.pos = startAt || 0;\n    if (text == \"\") callBlankLine(mode, state);\n    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n      readToken(mode, stream, state);\n      stream.start = stream.pos;\n    }\n  }\n\n  // Convert a style as returned by a mode (either null, or a string\n  // containing one or more styles) to a CSS style. This is cached,\n  // and also looks for line-wide styles.\n  var styleToClassCache = {}, styleToClassCacheWithMode = {};\n  function interpretTokenStyle(style, options) {\n    if (!style || /^\\s*$/.test(style)) return null;\n    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n    return cache[style] ||\n      (cache[style] = style.replace(/\\S+/g, \"cm-$&\"));\n  }\n\n  // Render the DOM representation of the text of a line. Also builds\n  // up a 'line map', which points at the DOM nodes that represent\n  // specific stretches of text, and is used by the measuring code.\n  // The returned object contains the DOM node, this map, and\n  // information about line-wide styles that were set by the mode.\n  function buildLineContent(cm, lineView) {\n    // The padding-right forces the element to have a 'border', which\n    // is needed on Webkit to be able to get line-level bounding\n    // rectangles for it (in measureChar).\n    var content = elt(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n    var builder = {pre: elt(\"pre\", [content]), content: content,\n                   col: 0, pos: 0, cm: cm,\n                   splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n    lineView.measure = {};\n\n    // Iterate over the logical lines that make up this visual line.\n    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n      var line = i ? lineView.rest[i - 1] : lineView.line, order;\n      builder.pos = 0;\n      builder.addToken = buildToken;\n      // Optionally wire in some hacks into the token-rendering\n      // algorithm, to deal with browser quirks.\n      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))\n        builder.addToken = buildTokenBadBidi(builder.addToken, order);\n      builder.map = [];\n      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n      if (line.styleClasses) {\n        if (line.styleClasses.bgClass)\n          builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\");\n        if (line.styleClasses.textClass)\n          builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\");\n      }\n\n      // Ensure at least a single node is present, for measuring.\n      if (builder.map.length == 0)\n        builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));\n\n      // Store the map and a cache object for the current logical line\n      if (i == 0) {\n        lineView.measure.map = builder.map;\n        lineView.measure.cache = {};\n      } else {\n        (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);\n        (lineView.measure.caches || (lineView.measure.caches = [])).push({});\n      }\n    }\n\n    // See issue #2901\n    if (webkit && /\\bcm-tab\\b/.test(builder.content.lastChild.className))\n      builder.content.className = \"cm-tab-wrap-hack\";\n\n    signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n    if (builder.pre.className)\n      builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\");\n\n    return builder;\n  }\n\n  function defaultSpecialCharPlaceholder(ch) {\n    var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n    token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n    token.setAttribute(\"aria-label\", token.title);\n    return token;\n  }\n\n  // Build up the DOM representation for a single token, and add it to\n  // the line map. Takes care to render special characters separately.\n  function buildToken(builder, text, style, startStyle, endStyle, title, css) {\n    if (!text) return;\n    var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text;\n    var special = builder.cm.state.specialChars, mustWrap = false;\n    if (!special.test(text)) {\n      builder.col += text.length;\n      var content = document.createTextNode(displayText);\n      builder.map.push(builder.pos, builder.pos + text.length, content);\n      if (ie && ie_version < 9) mustWrap = true;\n      builder.pos += text.length;\n    } else {\n      var content = document.createDocumentFragment(), pos = 0;\n      while (true) {\n        special.lastIndex = pos;\n        var m = special.exec(text);\n        var skipped = m ? m.index - pos : text.length - pos;\n        if (skipped) {\n          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.map.push(builder.pos, builder.pos + skipped, txt);\n          builder.col += skipped;\n          builder.pos += skipped;\n        }\n        if (!m) break;\n        pos += skipped + 1;\n        if (m[0] == \"\\t\") {\n          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n          var txt = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n          txt.setAttribute(\"role\", \"presentation\");\n          txt.setAttribute(\"cm-text\", \"\\t\");\n          builder.col += tabWidth;\n        } else {\n          var txt = builder.cm.options.specialCharPlaceholder(m[0]);\n          txt.setAttribute(\"cm-text\", m[0]);\n          if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n          else content.appendChild(txt);\n          builder.col += 1;\n        }\n        builder.map.push(builder.pos, builder.pos + 1, txt);\n        builder.pos++;\n      }\n    }\n    if (style || startStyle || endStyle || mustWrap || css) {\n      var fullStyle = style || \"\";\n      if (startStyle) fullStyle += startStyle;\n      if (endStyle) fullStyle += endStyle;\n      var token = elt(\"span\", [content], fullStyle, css);\n      if (title) token.title = title;\n      return builder.content.appendChild(token);\n    }\n    builder.content.appendChild(content);\n  }\n\n  function splitSpaces(old) {\n    var out = \" \";\n    for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? \" \" : \"\\u00a0\";\n    out += \" \";\n    return out;\n  }\n\n  // Work around nonsense dimensions being reported for stretches of\n  // right-to-left text.\n  function buildTokenBadBidi(inner, order) {\n    return function(builder, text, style, startStyle, endStyle, title, css) {\n      style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n      var start = builder.pos, end = start + text.length;\n      for (;;) {\n        // Find the part that overlaps with the start of this text\n        for (var i = 0; i < order.length; i++) {\n          var part = order[i];\n          if (part.to > start && part.from <= start) break;\n        }\n        if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css);\n        inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n        startStyle = null;\n        text = text.slice(part.to - start);\n        start = part.to;\n      }\n    };\n  }\n\n  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n    var widget = !ignoreWidget && marker.widgetNode;\n    if (widget) builder.map.push(builder.pos, builder.pos + size, widget);\n    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n      if (!widget)\n        widget = builder.content.appendChild(document.createElement(\"span\"));\n      widget.setAttribute(\"cm-marker\", marker.id);\n    }\n    if (widget) {\n      builder.cm.display.input.setUneditable(widget);\n      builder.content.appendChild(widget);\n    }\n    builder.pos += size;\n  }\n\n  // Outputs a number of spans to make up a line, taking highlighting\n  // and marked text into account.\n  function insertLineContent(line, builder, styles) {\n    var spans = line.markedSpans, allText = line.text, at = 0;\n    if (!spans) {\n      for (var i = 1; i < styles.length; i+=2)\n        builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n      return;\n    }\n\n    var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n    for (;;) {\n      if (nextChange == pos) { // Update current marker set\n        spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n        collapsed = null; nextChange = Infinity;\n        var foundBookmarks = [];\n        for (var j = 0; j < spans.length; ++j) {\n          var sp = spans[j], m = sp.marker;\n          if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n            foundBookmarks.push(m);\n          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n            if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n              nextChange = sp.to;\n              spanEndStyle = \"\";\n            }\n            if (m.className) spanStyle += \" \" + m.className;\n            if (m.css) css = m.css;\n            if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n            if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n            if (m.title && !title) title = m.title;\n            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n              collapsed = sp;\n          } else if (sp.from > pos && nextChange > sp.from) {\n            nextChange = sp.from;\n          }\n        }\n        if (collapsed && (collapsed.from || 0) == pos) {\n          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n                             collapsed.marker, collapsed.from == null);\n          if (collapsed.to == null) return;\n          if (collapsed.to == pos) collapsed = false;\n        }\n        if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)\n          buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n      }\n      if (pos >= len) break;\n\n      var upto = Math.min(len, nextChange);\n      while (true) {\n        if (text) {\n          var end = pos + text.length;\n          if (!collapsed) {\n            var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n          }\n          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n          pos = end;\n          spanStartStyle = \"\";\n        }\n        text = allText.slice(at, at = styles[i++]);\n        style = interpretTokenStyle(styles[i++], builder.cm.options);\n      }\n    }\n  }\n\n  // DOCUMENT DATA STRUCTURE\n\n  // By default, updates that start and end at the beginning of a line\n  // are treated specially, in order to make the association of line\n  // widgets and marker elements with the text behave more intuitive.\n  function isWholeLineUpdate(doc, change) {\n    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n      (!doc.cm || doc.cm.options.wholeLineUpdateBefore);\n  }\n\n  // Perform a change on the document data structure.\n  function updateDoc(doc, change, markedSpans, estimateHeight) {\n    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}\n    function update(line, text, spans) {\n      updateLine(line, text, spans, estimateHeight);\n      signalLater(line, \"change\", line, change);\n    }\n    function linesFor(start, end) {\n      for (var i = start, result = []; i < end; ++i)\n        result.push(new Line(text[i], spansFor(i), estimateHeight));\n      return result;\n    }\n\n    var from = change.from, to = change.to, text = change.text;\n    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n    // Adjust the line structure\n    if (change.full) {\n      doc.insert(0, linesFor(0, text.length));\n      doc.remove(text.length, doc.size - text.length);\n    } else if (isWholeLineUpdate(doc, change)) {\n      // This is a whole-line replace. Treated specially to make\n      // sure line objects move the way they are supposed to.\n      var added = linesFor(0, text.length - 1);\n      update(lastLine, lastLine.text, lastSpans);\n      if (nlines) doc.remove(from.line, nlines);\n      if (added.length) doc.insert(from.line, added);\n    } else if (firstLine == lastLine) {\n      if (text.length == 1) {\n        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n      } else {\n        var added = linesFor(1, text.length - 1);\n        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n        doc.insert(from.line + 1, added);\n      }\n    } else if (text.length == 1) {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n      doc.remove(from.line + 1, nlines);\n    } else {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n      var added = linesFor(1, text.length - 1);\n      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);\n      doc.insert(from.line + 1, added);\n    }\n\n    signalLater(doc, \"change\", doc, change);\n  }\n\n  // The document is represented as a BTree consisting of leaves, with\n  // chunk of lines in them, and branches, with up to ten leaves or\n  // other branch nodes below them. The top node is always a branch\n  // node, and is the document object itself (meaning it has\n  // additional methods and properties).\n  //\n  // All nodes have parent links. The tree is used both to go from\n  // line numbers to line objects, and to go from objects to numbers.\n  // It also indexes by height, and is used to convert between height\n  // and line object, and to find the total height of the document.\n  //\n  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n  function LeafChunk(lines) {\n    this.lines = lines;\n    this.parent = null;\n    for (var i = 0, height = 0; i < lines.length; ++i) {\n      lines[i].parent = this;\n      height += lines[i].height;\n    }\n    this.height = height;\n  }\n\n  LeafChunk.prototype = {\n    chunkSize: function() { return this.lines.length; },\n    // Remove the n lines at offset 'at'.\n    removeInner: function(at, n) {\n      for (var i = at, e = at + n; i < e; ++i) {\n        var line = this.lines[i];\n        this.height -= line.height;\n        cleanUpLine(line);\n        signalLater(line, \"delete\");\n      }\n      this.lines.splice(at, n);\n    },\n    // Helper used to collapse a small branch into a single leaf.\n    collapse: function(lines) {\n      lines.push.apply(lines, this.lines);\n    },\n    // Insert the given array of lines at offset 'at', count them as\n    // having the given height.\n    insertInner: function(at, lines, height) {\n      this.height += height;\n      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n      for (var i = 0; i < lines.length; ++i) lines[i].parent = this;\n    },\n    // Used to iterate over a part of the tree.\n    iterN: function(at, n, op) {\n      for (var e = at + n; at < e; ++at)\n        if (op(this.lines[at])) return true;\n    }\n  };\n\n  function BranchChunk(children) {\n    this.children = children;\n    var size = 0, height = 0;\n    for (var i = 0; i < children.length; ++i) {\n      var ch = children[i];\n      size += ch.chunkSize(); height += ch.height;\n      ch.parent = this;\n    }\n    this.size = size;\n    this.height = height;\n    this.parent = null;\n  }\n\n  BranchChunk.prototype = {\n    chunkSize: function() { return this.size; },\n    removeInner: function(at, n) {\n      this.size -= n;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var rm = Math.min(n, sz - at), oldHeight = child.height;\n          child.removeInner(at, rm);\n          this.height -= oldHeight - child.height;\n          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n          if ((n -= rm) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n      // If the result is smaller than 25 lines, ensure that it is a\n      // single leaf node.\n      if (this.size - n < 25 &&\n          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n        var lines = [];\n        this.collapse(lines);\n        this.children = [new LeafChunk(lines)];\n        this.children[0].parent = this;\n      }\n    },\n    collapse: function(lines) {\n      for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines);\n    },\n    insertInner: function(at, lines, height) {\n      this.size += lines.length;\n      this.height += height;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at <= sz) {\n          child.insertInner(at, lines, height);\n          if (child.lines && child.lines.length > 50) {\n            while (child.lines.length > 50) {\n              var spilled = child.lines.splice(child.lines.length - 25, 25);\n              var newleaf = new LeafChunk(spilled);\n              child.height -= newleaf.height;\n              this.children.splice(i + 1, 0, newleaf);\n              newleaf.parent = this;\n            }\n            this.maybeSpill();\n          }\n          break;\n        }\n        at -= sz;\n      }\n    },\n    // When a node has grown, check whether it should be split.\n    maybeSpill: function() {\n      if (this.children.length <= 10) return;\n      var me = this;\n      do {\n        var spilled = me.children.splice(me.children.length - 5, 5);\n        var sibling = new BranchChunk(spilled);\n        if (!me.parent) { // Become the parent node\n          var copy = new BranchChunk(me.children);\n          copy.parent = me;\n          me.children = [copy, sibling];\n          me = copy;\n        } else {\n          me.size -= sibling.size;\n          me.height -= sibling.height;\n          var myIndex = indexOf(me.parent.children, me);\n          me.parent.children.splice(myIndex + 1, 0, sibling);\n        }\n        sibling.parent = me.parent;\n      } while (me.children.length > 10);\n      me.parent.maybeSpill();\n    },\n    iterN: function(at, n, op) {\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var used = Math.min(n, sz - at);\n          if (child.iterN(at, used, op)) return true;\n          if ((n -= used) == 0) break;\n          at = 0;\n        } else at -= sz;\n      }\n    }\n  };\n\n  var nextDocId = 0;\n  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {\n    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);\n    if (firstLine == null) firstLine = 0;\n\n    BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n    this.first = firstLine;\n    this.scrollTop = this.scrollLeft = 0;\n    this.cantEdit = false;\n    this.cleanGeneration = 1;\n    this.frontier = firstLine;\n    var start = Pos(firstLine, 0);\n    this.sel = simpleSelection(start);\n    this.history = new History(null);\n    this.id = ++nextDocId;\n    this.modeOption = mode;\n\n    if (typeof text == \"string\") text = splitLines(text);\n    updateDoc(this, {from: start, to: start, text: text});\n    setSelection(this, simpleSelection(start), sel_dontScroll);\n  };\n\n  Doc.prototype = createObj(BranchChunk.prototype, {\n    constructor: Doc,\n    // Iterate over the document. Supports two forms -- with only one\n    // argument, it calls that for each line in the document. With\n    // three, it iterates over the range given by the first two (with\n    // the second being non-inclusive).\n    iter: function(from, to, op) {\n      if (op) this.iterN(from - this.first, to - from, op);\n      else this.iterN(this.first, this.first + this.size, from);\n    },\n\n    // Non-public interface for adding and removing lines.\n    insert: function(at, lines) {\n      var height = 0;\n      for (var i = 0; i < lines.length; ++i) height += lines[i].height;\n      this.insertInner(at - this.first, lines, height);\n    },\n    remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n    // From here, the methods are part of the public interface. Most\n    // are also available from CodeMirror (editor) instances.\n\n    getValue: function(lineSep) {\n      var lines = getLines(this, this.first, this.first + this.size);\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || \"\\n\");\n    },\n    setValue: docMethodOp(function(code) {\n      var top = Pos(this.first, 0), last = this.first + this.size - 1;\n      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n                        text: splitLines(code), origin: \"setValue\", full: true}, true);\n      setSelection(this, simpleSelection(top));\n    }),\n    replaceRange: function(code, from, to, origin) {\n      from = clipPos(this, from);\n      to = to ? clipPos(this, to) : from;\n      replaceRange(this, code, from, to, origin);\n    },\n    getRange: function(from, to, lineSep) {\n      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n      if (lineSep === false) return lines;\n      return lines.join(lineSep || \"\\n\");\n    },\n\n    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},\n\n    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},\n    getLineNumber: function(line) {return lineNo(line);},\n\n    getLineHandleVisualStart: function(line) {\n      if (typeof line == \"number\") line = getLine(this, line);\n      return visualLine(line);\n    },\n\n    lineCount: function() {return this.size;},\n    firstLine: function() {return this.first;},\n    lastLine: function() {return this.first + this.size - 1;},\n\n    clipPos: function(pos) {return clipPos(this, pos);},\n\n    getCursor: function(start) {\n      var range = this.sel.primary(), pos;\n      if (start == null || start == \"head\") pos = range.head;\n      else if (start == \"anchor\") pos = range.anchor;\n      else if (start == \"end\" || start == \"to\" || start === false) pos = range.to();\n      else pos = range.from();\n      return pos;\n    },\n    listSelections: function() { return this.sel.ranges; },\n    somethingSelected: function() {return this.sel.somethingSelected();},\n\n    setCursor: docMethodOp(function(line, ch, options) {\n      setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n    }),\n    setSelection: docMethodOp(function(anchor, head, options) {\n      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n    }),\n    extendSelection: docMethodOp(function(head, other, options) {\n      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n    }),\n    extendSelections: docMethodOp(function(heads, options) {\n      extendSelections(this, clipPosArray(this, heads, options));\n    }),\n    extendSelectionsBy: docMethodOp(function(f, options) {\n      extendSelections(this, map(this.sel.ranges, f), options);\n    }),\n    setSelections: docMethodOp(function(ranges, primary, options) {\n      if (!ranges.length) return;\n      for (var i = 0, out = []; i < ranges.length; i++)\n        out[i] = new Range(clipPos(this, ranges[i].anchor),\n                           clipPos(this, ranges[i].head));\n      if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex);\n      setSelection(this, normalizeSelection(out, primary), options);\n    }),\n    addSelection: docMethodOp(function(anchor, head, options) {\n      var ranges = this.sel.ranges.slice(0);\n      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n      setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n    }),\n\n    getSelection: function(lineSep) {\n      var ranges = this.sel.ranges, lines;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        lines = lines ? lines.concat(sel) : sel;\n      }\n      if (lineSep === false) return lines;\n      else return lines.join(lineSep || \"\\n\");\n    },\n    getSelections: function(lineSep) {\n      var parts = [], ranges = this.sel.ranges;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        if (lineSep !== false) sel = sel.join(lineSep || \"\\n\");\n        parts[i] = sel;\n      }\n      return parts;\n    },\n    replaceSelection: function(code, collapse, origin) {\n      var dup = [];\n      for (var i = 0; i < this.sel.ranges.length; i++)\n        dup[i] = code;\n      this.replaceSelections(dup, collapse, origin || \"+input\");\n    },\n    replaceSelections: docMethodOp(function(code, collapse, origin) {\n      var changes = [], sel = this.sel;\n      for (var i = 0; i < sel.ranges.length; i++) {\n        var range = sel.ranges[i];\n        changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin};\n      }\n      var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n      for (var i = changes.length - 1; i >= 0; i--)\n        makeChange(this, changes[i]);\n      if (newSel) setSelectionReplaceHistory(this, newSel);\n      else if (this.cm) ensureCursorVisible(this.cm);\n    }),\n    undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n    redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n    setExtending: function(val) {this.extend = val;},\n    getExtending: function() {return this.extend;},\n\n    historySize: function() {\n      var hist = this.history, done = 0, undone = 0;\n      for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done;\n      for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone;\n      return {undo: done, redo: undone};\n    },\n    clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n    markClean: function() {\n      this.cleanGeneration = this.changeGeneration(true);\n    },\n    changeGeneration: function(forceSplit) {\n      if (forceSplit)\n        this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;\n      return this.history.generation;\n    },\n    isClean: function (gen) {\n      return this.history.generation == (gen || this.cleanGeneration);\n    },\n\n    getHistory: function() {\n      return {done: copyHistoryArray(this.history.done),\n              undone: copyHistoryArray(this.history.undone)};\n    },\n    setHistory: function(histData) {\n      var hist = this.history = new History(this.history.maxGeneration);\n      hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n    },\n\n    addLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        if (!line[prop]) line[prop] = cls;\n        else if (classTest(cls).test(line[prop])) return false;\n        else line[prop] += \" \" + cls;\n        return true;\n      });\n    }),\n    removeLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        var cur = line[prop];\n        if (!cur) return false;\n        else if (cls == null) line[prop] = null;\n        else {\n          var found = cur.match(classTest(cls));\n          if (!found) return false;\n          var end = found.index + found[0].length;\n          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n        }\n        return true;\n      });\n    }),\n\n    addLineWidget: docMethodOp(function(handle, node, options) {\n      return addLineWidget(this, handle, node, options);\n    }),\n    removeLineWidget: function(widget) { widget.clear(); },\n\n    markText: function(from, to, options) {\n      return markText(this, clipPos(this, from), clipPos(this, to), options, \"range\");\n    },\n    setBookmark: function(pos, options) {\n      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n                      insertLeft: options && options.insertLeft,\n                      clearWhenEmpty: false, shared: options && options.shared,\n                      handleMouseEvents: options && options.handleMouseEvents};\n      pos = clipPos(this, pos);\n      return markText(this, pos, pos, realOpts, \"bookmark\");\n    },\n    findMarksAt: function(pos) {\n      pos = clipPos(this, pos);\n      var markers = [], spans = getLine(this, pos.line).markedSpans;\n      if (spans) for (var i = 0; i < spans.length; ++i) {\n        var span = spans[i];\n        if ((span.from == null || span.from <= pos.ch) &&\n            (span.to == null || span.to >= pos.ch))\n          markers.push(span.marker.parent || span.marker);\n      }\n      return markers;\n    },\n    findMarks: function(from, to, filter) {\n      from = clipPos(this, from); to = clipPos(this, to);\n      var found = [], lineNo = from.line;\n      this.iter(from.line, to.line + 1, function(line) {\n        var spans = line.markedSpans;\n        if (spans) for (var i = 0; i < spans.length; i++) {\n          var span = spans[i];\n          if (!(lineNo == from.line && from.ch > span.to ||\n                span.from == null && lineNo != from.line||\n                lineNo == to.line && span.from > to.ch) &&\n              (!filter || filter(span.marker)))\n            found.push(span.marker.parent || span.marker);\n        }\n        ++lineNo;\n      });\n      return found;\n    },\n    getAllMarks: function() {\n      var markers = [];\n      this.iter(function(line) {\n        var sps = line.markedSpans;\n        if (sps) for (var i = 0; i < sps.length; ++i)\n          if (sps[i].from != null) markers.push(sps[i].marker);\n      });\n      return markers;\n    },\n\n    posFromIndex: function(off) {\n      var ch, lineNo = this.first;\n      this.iter(function(line) {\n        var sz = line.text.length + 1;\n        if (sz > off) { ch = off; return true; }\n        off -= sz;\n        ++lineNo;\n      });\n      return clipPos(this, Pos(lineNo, ch));\n    },\n    indexFromPos: function (coords) {\n      coords = clipPos(this, coords);\n      var index = coords.ch;\n      if (coords.line < this.first || coords.ch < 0) return 0;\n      this.iter(this.first, coords.line, function (line) {\n        index += line.text.length + 1;\n      });\n      return index;\n    },\n\n    copy: function(copyHistory) {\n      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);\n      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n      doc.sel = this.sel;\n      doc.extend = false;\n      if (copyHistory) {\n        doc.history.undoDepth = this.history.undoDepth;\n        doc.setHistory(this.getHistory());\n      }\n      return doc;\n    },\n\n    linkedDoc: function(options) {\n      if (!options) options = {};\n      var from = this.first, to = this.first + this.size;\n      if (options.from != null && options.from > from) from = options.from;\n      if (options.to != null && options.to < to) to = options.to;\n      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);\n      if (options.sharedHist) copy.history = this.history;\n      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n      copySharedMarkers(copy, findSharedMarkers(this));\n      return copy;\n    },\n    unlinkDoc: function(other) {\n      if (other instanceof CodeMirror) other = other.doc;\n      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {\n        var link = this.linked[i];\n        if (link.doc != other) continue;\n        this.linked.splice(i, 1);\n        other.unlinkDoc(this);\n        detachSharedMarkers(findSharedMarkers(this));\n        break;\n      }\n      // If the histories were shared, split them again\n      if (other.history == this.history) {\n        var splitIds = [other.id];\n        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);\n        other.history = new History(null);\n        other.history.done = copyHistoryArray(this.history.done, splitIds);\n        other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n      }\n    },\n    iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n    getMode: function() {return this.mode;},\n    getEditor: function() {return this.cm;}\n  });\n\n  // Public alias.\n  Doc.prototype.eachLine = Doc.prototype.iter;\n\n  // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n  var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n    CodeMirror.prototype[prop] = (function(method) {\n      return function() {return method.apply(this.doc, arguments);};\n    })(Doc.prototype[prop]);\n\n  eventMixin(Doc);\n\n  // Call f for all linked documents.\n  function linkedDocs(doc, f, sharedHistOnly) {\n    function propagate(doc, skip, sharedHist) {\n      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {\n        var rel = doc.linked[i];\n        if (rel.doc == skip) continue;\n        var shared = sharedHist && rel.sharedHist;\n        if (sharedHistOnly && !shared) continue;\n        f(rel.doc, shared);\n        propagate(rel.doc, doc, shared);\n      }\n    }\n    propagate(doc, null, true);\n  }\n\n  // Attach a document to an editor.\n  function attachDoc(cm, doc) {\n    if (doc.cm) throw new Error(\"This document is already in use.\");\n    cm.doc = doc;\n    doc.cm = cm;\n    estimateLineHeights(cm);\n    loadMode(cm);\n    if (!cm.options.lineWrapping) findMaxLine(cm);\n    cm.options.mode = doc.modeOption;\n    regChange(cm);\n  }\n\n  // LINE UTILITIES\n\n  // Find the line object corresponding to the given line number.\n  function getLine(doc, n) {\n    n -= doc.first;\n    if (n < 0 || n >= doc.size) throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n    for (var chunk = doc; !chunk.lines;) {\n      for (var i = 0;; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; break; }\n        n -= sz;\n      }\n    }\n    return chunk.lines[n];\n  }\n\n  // Get the part of a document between two positions, as an array of\n  // strings.\n  function getBetween(doc, start, end) {\n    var out = [], n = start.line;\n    doc.iter(start.line, end.line + 1, function(line) {\n      var text = line.text;\n      if (n == end.line) text = text.slice(0, end.ch);\n      if (n == start.line) text = text.slice(start.ch);\n      out.push(text);\n      ++n;\n    });\n    return out;\n  }\n  // Get the lines between from and to, as array of strings.\n  function getLines(doc, from, to) {\n    var out = [];\n    doc.iter(from, to, function(line) { out.push(line.text); });\n    return out;\n  }\n\n  // Update the height of a line, propagating the height change\n  // upwards to parent nodes.\n  function updateLineHeight(line, height) {\n    var diff = height - line.height;\n    if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n  }\n\n  // Given a line object, find its line number by walking up through\n  // its parent links.\n  function lineNo(line) {\n    if (line.parent == null) return null;\n    var cur = line.parent, no = indexOf(cur.lines, line);\n    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n      for (var i = 0;; ++i) {\n        if (chunk.children[i] == cur) break;\n        no += chunk.children[i].chunkSize();\n      }\n    }\n    return no + cur.first;\n  }\n\n  // Find the line at the given vertical position, using the height\n  // information in the document tree.\n  function lineAtHeight(chunk, h) {\n    var n = chunk.first;\n    outer: do {\n      for (var i = 0; i < chunk.children.length; ++i) {\n        var child = chunk.children[i], ch = child.height;\n        if (h < ch) { chunk = child; continue outer; }\n        h -= ch;\n        n += child.chunkSize();\n      }\n      return n;\n    } while (!chunk.lines);\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i], lh = line.height;\n      if (h < lh) break;\n      h -= lh;\n    }\n    return n + i;\n  }\n\n\n  // Find the height above the given line.\n  function heightAtLine(lineObj) {\n    lineObj = visualLine(lineObj);\n\n    var h = 0, chunk = lineObj.parent;\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i];\n      if (line == lineObj) break;\n      else h += line.height;\n    }\n    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n      for (var i = 0; i < p.children.length; ++i) {\n        var cur = p.children[i];\n        if (cur == chunk) break;\n        else h += cur.height;\n      }\n    }\n    return h;\n  }\n\n  // Get the bidi ordering for the given line (and cache it). Returns\n  // false for lines that are fully left-to-right, and an array of\n  // BidiSpan objects otherwise.\n  function getOrder(line) {\n    var order = line.order;\n    if (order == null) order = line.order = bidiOrdering(line.text);\n    return order;\n  }\n\n  // HISTORY\n\n  function History(startGen) {\n    // Arrays of change events and selections. Doing something adds an\n    // event to done and clears undo. Undoing moves events from done\n    // to undone, redoing moves them in the other direction.\n    this.done = []; this.undone = [];\n    this.undoDepth = Infinity;\n    // Used to track when changes can be merged into a single undo\n    // event\n    this.lastModTime = this.lastSelTime = 0;\n    this.lastOp = this.lastSelOp = null;\n    this.lastOrigin = this.lastSelOrigin = null;\n    // Used by the isClean() method\n    this.generation = this.maxGeneration = startGen || 1;\n  }\n\n  // Create a history change event from an updateDoc-style change\n  // object.\n  function historyChangeFromChange(doc, change) {\n    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);\n    return histChange;\n  }\n\n  // Pop all selection events off the end of a history array. Stop at\n  // a change event.\n  function clearSelectionEvents(array) {\n    while (array.length) {\n      var last = lst(array);\n      if (last.ranges) array.pop();\n      else break;\n    }\n  }\n\n  // Find the top change event in the history. Pop off selection\n  // events that are in the way.\n  function lastChangeEvent(hist, force) {\n    if (force) {\n      clearSelectionEvents(hist.done);\n      return lst(hist.done);\n    } else if (hist.done.length && !lst(hist.done).ranges) {\n      return lst(hist.done);\n    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n      hist.done.pop();\n      return lst(hist.done);\n    }\n  }\n\n  // Register a change in the history. Merges changes that are within\n  // a single operation, ore are close together with an origin that\n  // allows merging (starting with \"+\") into a single event.\n  function addChangeToHistory(doc, change, selAfter, opId) {\n    var hist = doc.history;\n    hist.undone.length = 0;\n    var time = +new Date, cur;\n\n    if ((hist.lastOp == opId ||\n         hist.lastOrigin == change.origin && change.origin &&\n         ((change.origin.charAt(0) == \"+\" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||\n          change.origin.charAt(0) == \"*\")) &&\n        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n      // Merge this change into the last event\n      var last = lst(cur.changes);\n      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n        // Optimized case for simple insertion -- don't want to add\n        // new changesets for every character typed\n        last.to = changeEnd(change);\n      } else {\n        // Add new sub-event\n        cur.changes.push(historyChangeFromChange(doc, change));\n      }\n    } else {\n      // Can not be merged, start a new event.\n      var before = lst(hist.done);\n      if (!before || !before.ranges)\n        pushSelectionToHistory(doc.sel, hist.done);\n      cur = {changes: [historyChangeFromChange(doc, change)],\n             generation: hist.generation};\n      hist.done.push(cur);\n      while (hist.done.length > hist.undoDepth) {\n        hist.done.shift();\n        if (!hist.done[0].ranges) hist.done.shift();\n      }\n    }\n    hist.done.push(selAfter);\n    hist.generation = ++hist.maxGeneration;\n    hist.lastModTime = hist.lastSelTime = time;\n    hist.lastOp = hist.lastSelOp = opId;\n    hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n    if (!last) signal(doc, \"historyAdded\");\n  }\n\n  function selectionEventCanBeMerged(doc, origin, prev, sel) {\n    var ch = origin.charAt(0);\n    return ch == \"*\" ||\n      ch == \"+\" &&\n      prev.ranges.length == sel.ranges.length &&\n      prev.somethingSelected() == sel.somethingSelected() &&\n      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);\n  }\n\n  // Called whenever the selection changes, sets the new selection as\n  // the pending selection in the history, and pushes the old pending\n  // selection into the 'done' array when it was significantly\n  // different (in number of selected ranges, emptiness, or time).\n  function addSelectionToHistory(doc, sel, opId, options) {\n    var hist = doc.history, origin = options && options.origin;\n\n    // A new event is started when the previous origin does not match\n    // the current, or the origins don't allow matching. Origins\n    // starting with * are always merged, those starting with + are\n    // merged when similar and close together in time.\n    if (opId == hist.lastSelOp ||\n        (origin && hist.lastSelOrigin == origin &&\n         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n      hist.done[hist.done.length - 1] = sel;\n    else\n      pushSelectionToHistory(sel, hist.done);\n\n    hist.lastSelTime = +new Date;\n    hist.lastSelOrigin = origin;\n    hist.lastSelOp = opId;\n    if (options && options.clearRedo !== false)\n      clearSelectionEvents(hist.undone);\n  }\n\n  function pushSelectionToHistory(sel, dest) {\n    var top = lst(dest);\n    if (!(top && top.ranges && top.equals(sel)))\n      dest.push(sel);\n  }\n\n  // Used to store marked span information in the history.\n  function attachLocalSpans(doc, change, from, to) {\n    var existing = change[\"spans_\" + doc.id], n = 0;\n    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {\n      if (line.markedSpans)\n        (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans;\n      ++n;\n    });\n  }\n\n  // When un/re-doing restores text containing marked spans, those\n  // that have been explicitly cleared should not be restored.\n  function removeClearedSpans(spans) {\n    if (!spans) return null;\n    for (var i = 0, out; i < spans.length; ++i) {\n      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n      else if (out) out.push(spans[i]);\n    }\n    return !out ? spans : out.length ? out : null;\n  }\n\n  // Retrieve and filter the old marked spans stored in a change event.\n  function getOldSpans(doc, change) {\n    var found = change[\"spans_\" + doc.id];\n    if (!found) return null;\n    for (var i = 0, nw = []; i < change.text.length; ++i)\n      nw.push(removeClearedSpans(found[i]));\n    return nw;\n  }\n\n  // Used both to provide a JSON-safe object in .getHistory, and, when\n  // detaching a document, to split the history in two\n  function copyHistoryArray(events, newGroup, instantiateSel) {\n    for (var i = 0, copy = []; i < events.length; ++i) {\n      var event = events[i];\n      if (event.ranges) {\n        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n        continue;\n      }\n      var changes = event.changes, newChanges = [];\n      copy.push({changes: newChanges});\n      for (var j = 0; j < changes.length; ++j) {\n        var change = changes[j], m;\n        newChanges.push({from: change.from, to: change.to, text: change.text});\n        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n          if (indexOf(newGroup, Number(m[1])) > -1) {\n            lst(newChanges)[prop] = change[prop];\n            delete change[prop];\n          }\n        }\n      }\n    }\n    return copy;\n  }\n\n  // Rebasing/resetting history to deal with externally-sourced changes\n\n  function rebaseHistSelSingle(pos, from, to, diff) {\n    if (to < pos.line) {\n      pos.line += diff;\n    } else if (from < pos.line) {\n      pos.line = from;\n      pos.ch = 0;\n    }\n  }\n\n  // Tries to rebase an array of history events given a change in the\n  // document. If the change touches the same lines as the event, the\n  // event, and everything 'behind' it, is discarded. If the change is\n  // before the event, the event's positions are updated. Uses a\n  // copy-on-write scheme for the positions, to avoid having to\n  // reallocate them all on every rebase, but also avoid problems with\n  // shared position objects being unsafely updated.\n  function rebaseHistArray(array, from, to, diff) {\n    for (var i = 0; i < array.length; ++i) {\n      var sub = array[i], ok = true;\n      if (sub.ranges) {\n        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n        for (var j = 0; j < sub.ranges.length; j++) {\n          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n        }\n        continue;\n      }\n      for (var j = 0; j < sub.changes.length; ++j) {\n        var cur = sub.changes[j];\n        if (to < cur.from.line) {\n          cur.from = Pos(cur.from.line + diff, cur.from.ch);\n          cur.to = Pos(cur.to.line + diff, cur.to.ch);\n        } else if (from <= cur.to.line) {\n          ok = false;\n          break;\n        }\n      }\n      if (!ok) {\n        array.splice(0, i + 1);\n        i = 0;\n      }\n    }\n  }\n\n  function rebaseHist(hist, change) {\n    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n    rebaseHistArray(hist.done, from, to, diff);\n    rebaseHistArray(hist.undone, from, to, diff);\n  }\n\n  // EVENT UTILITIES\n\n  // Due to the fact that we still support jurassic IE versions, some\n  // compatibility wrappers are needed.\n\n  var e_preventDefault = CodeMirror.e_preventDefault = function(e) {\n    if (e.preventDefault) e.preventDefault();\n    else e.returnValue = false;\n  };\n  var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) {\n    if (e.stopPropagation) e.stopPropagation();\n    else e.cancelBubble = true;\n  };\n  function e_defaultPrevented(e) {\n    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;\n  }\n  var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);};\n\n  function e_target(e) {return e.target || e.srcElement;}\n  function e_button(e) {\n    var b = e.which;\n    if (b == null) {\n      if (e.button & 1) b = 1;\n      else if (e.button & 2) b = 3;\n      else if (e.button & 4) b = 2;\n    }\n    if (mac && e.ctrlKey && b == 1) b = 3;\n    return b;\n  }\n\n  // EVENT HANDLING\n\n  // Lightweight event framework. on/off also work on DOM nodes,\n  // registering native DOM handlers.\n\n  var on = CodeMirror.on = function(emitter, type, f) {\n    if (emitter.addEventListener)\n      emitter.addEventListener(type, f, false);\n    else if (emitter.attachEvent)\n      emitter.attachEvent(\"on\" + type, f);\n    else {\n      var map = emitter._handlers || (emitter._handlers = {});\n      var arr = map[type] || (map[type] = []);\n      arr.push(f);\n    }\n  };\n\n  var off = CodeMirror.off = function(emitter, type, f) {\n    if (emitter.removeEventListener)\n      emitter.removeEventListener(type, f, false);\n    else if (emitter.detachEvent)\n      emitter.detachEvent(\"on\" + type, f);\n    else {\n      var arr = emitter._handlers && emitter._handlers[type];\n      if (!arr) return;\n      for (var i = 0; i < arr.length; ++i)\n        if (arr[i] == f) { arr.splice(i, 1); break; }\n    }\n  };\n\n  var signal = CodeMirror.signal = function(emitter, type /*, values...*/) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    if (!arr) return;\n    var args = Array.prototype.slice.call(arguments, 2);\n    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);\n  };\n\n  var orphanDelayedCallbacks = null;\n\n  // Often, we want to signal events at a point where we are in the\n  // middle of some work, but don't want the handler to start calling\n  // other methods on the editor, which might be in an inconsistent\n  // state or simply not expect any other events to happen.\n  // signalLater looks whether there are any handlers, and schedules\n  // them to be executed when the last operation ends, or, if no\n  // operation is active, when a timeout fires.\n  function signalLater(emitter, type /*, values...*/) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    if (!arr) return;\n    var args = Array.prototype.slice.call(arguments, 2), list;\n    if (operationGroup) {\n      list = operationGroup.delayedCallbacks;\n    } else if (orphanDelayedCallbacks) {\n      list = orphanDelayedCallbacks;\n    } else {\n      list = orphanDelayedCallbacks = [];\n      setTimeout(fireOrphanDelayed, 0);\n    }\n    function bnd(f) {return function(){f.apply(null, args);};};\n    for (var i = 0; i < arr.length; ++i)\n      list.push(bnd(arr[i]));\n  }\n\n  function fireOrphanDelayed() {\n    var delayed = orphanDelayedCallbacks;\n    orphanDelayedCallbacks = null;\n    for (var i = 0; i < delayed.length; ++i) delayed[i]();\n  }\n\n  // The DOM events that CodeMirror handles can be overridden by\n  // registering a (non-DOM) handler on the editor for the event name,\n  // and preventDefault-ing the event in that handler.\n  function signalDOMEvent(cm, e, override) {\n    if (typeof e == \"string\")\n      e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n    signal(cm, override || e.type, cm, e);\n    return e_defaultPrevented(e) || e.codemirrorIgnore;\n  }\n\n  function signalCursorActivity(cm) {\n    var arr = cm._handlers && cm._handlers.cursorActivity;\n    if (!arr) return;\n    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n    for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1)\n      set.push(arr[i]);\n  }\n\n  function hasHandler(emitter, type) {\n    var arr = emitter._handlers && emitter._handlers[type];\n    return arr && arr.length > 0;\n  }\n\n  // Add on and off methods to a constructor's prototype, to make\n  // registering events on such objects more convenient.\n  function eventMixin(ctor) {\n    ctor.prototype.on = function(type, f) {on(this, type, f);};\n    ctor.prototype.off = function(type, f) {off(this, type, f);};\n  }\n\n  // MISC UTILITIES\n\n  // Number of pixels added to scroller and sizer to hide scrollbar\n  var scrollerGap = 30;\n\n  // Returned or thrown by various protocols to signal 'I'm not\n  // handling this'.\n  var Pass = CodeMirror.Pass = {toString: function(){return \"CodeMirror.Pass\";}};\n\n  // Reused option objects for setSelection & friends\n  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n  function Delayed() {this.id = null;}\n  Delayed.prototype.set = function(ms, f) {\n    clearTimeout(this.id);\n    this.id = setTimeout(f, ms);\n  };\n\n  // Counts the column offset in a string, taking tabs into account.\n  // Used mostly to find indentation.\n  var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) {\n    if (end == null) {\n      end = string.search(/[^\\s\\u00a0]/);\n      if (end == -1) end = string.length;\n    }\n    for (var i = startIndex || 0, n = startValue || 0;;) {\n      var nextTab = string.indexOf(\"\\t\", i);\n      if (nextTab < 0 || nextTab >= end)\n        return n + (end - i);\n      n += nextTab - i;\n      n += tabSize - (n % tabSize);\n      i = nextTab + 1;\n    }\n  };\n\n  // The inverse of countColumn -- find the offset that corresponds to\n  // a particular column.\n  function findColumn(string, goal, tabSize) {\n    for (var pos = 0, col = 0;;) {\n      var nextTab = string.indexOf(\"\\t\", pos);\n      if (nextTab == -1) nextTab = string.length;\n      var skipped = nextTab - pos;\n      if (nextTab == string.length || col + skipped >= goal)\n        return pos + Math.min(skipped, goal - col);\n      col += nextTab - pos;\n      col += tabSize - (col % tabSize);\n      pos = nextTab + 1;\n      if (col >= goal) return pos;\n    }\n  }\n\n  var spaceStrs = [\"\"];\n  function spaceStr(n) {\n    while (spaceStrs.length <= n)\n      spaceStrs.push(lst(spaceStrs) + \" \");\n    return spaceStrs[n];\n  }\n\n  function lst(arr) { return arr[arr.length-1]; }\n\n  var selectInput = function(node) { node.select(); };\n  if (ios) // Mobile Safari apparently has a bug where select() is broken.\n    selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; };\n  else if (ie) // Suppress mysterious IE10 errors\n    selectInput = function(node) { try { node.select(); } catch(_e) {} };\n\n  function indexOf(array, elt) {\n    for (var i = 0; i < array.length; ++i)\n      if (array[i] == elt) return i;\n    return -1;\n  }\n  function map(array, f) {\n    var out = [];\n    for (var i = 0; i < array.length; i++) out[i] = f(array[i], i);\n    return out;\n  }\n\n  function nothing() {}\n\n  function createObj(base, props) {\n    var inst;\n    if (Object.create) {\n      inst = Object.create(base);\n    } else {\n      nothing.prototype = base;\n      inst = new nothing();\n    }\n    if (props) copyObj(props, inst);\n    return inst;\n  };\n\n  function copyObj(obj, target, overwrite) {\n    if (!target) target = {};\n    for (var prop in obj)\n      if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n        target[prop] = obj[prop];\n    return target;\n  }\n\n  function bind(f) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return function(){return f.apply(null, args);};\n  }\n\n  var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {\n    return /\\w/.test(ch) || ch > \"\\x80\" &&\n      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));\n  };\n  function isWordChar(ch, helper) {\n    if (!helper) return isWordCharBasic(ch);\n    if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) return true;\n    return helper.test(ch);\n  }\n\n  function isEmpty(obj) {\n    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;\n    return true;\n  }\n\n  // Extending unicode characters. A series of a non-extending char +\n  // any number of extending chars is treated as a single unit as far\n  // as editing and measuring is concerned. This is not fully correct,\n  // since some scripts/fonts/browsers also treat other configurations\n  // of code points as a group.\n  var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); }\n\n  // DOM UTILITIES\n\n  function elt(tag, content, className, style) {\n    var e = document.createElement(tag);\n    if (className) e.className = className;\n    if (style) e.style.cssText = style;\n    if (typeof content == \"string\") e.appendChild(document.createTextNode(content));\n    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);\n    return e;\n  }\n\n  var range;\n  if (document.createRange) range = function(node, start, end, endNode) {\n    var r = document.createRange();\n    r.setEnd(endNode || node, end);\n    r.setStart(node, start);\n    return r;\n  };\n  else range = function(node, start, end) {\n    var r = document.body.createTextRange();\n    try { r.moveToElementText(node.parentNode); }\n    catch(e) { return r; }\n    r.collapse(true);\n    r.moveEnd(\"character\", end);\n    r.moveStart(\"character\", start);\n    return r;\n  };\n\n  function removeChildren(e) {\n    for (var count = e.childNodes.length; count > 0; --count)\n      e.removeChild(e.firstChild);\n    return e;\n  }\n\n  function removeChildrenAndAdd(parent, e) {\n    return removeChildren(parent).appendChild(e);\n  }\n\n  var contains = CodeMirror.contains = function(parent, child) {\n    if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n      child = child.parentNode;\n    if (parent.contains)\n      return parent.contains(child);\n    do {\n      if (child.nodeType == 11) child = child.host;\n      if (child == parent) return true;\n    } while (child = child.parentNode);\n  };\n\n  function activeElt() { return document.activeElement; }\n  // Older versions of IE throws unspecified error when touching\n  // document.activeElement in some cases (during loading, in iframe)\n  if (ie && ie_version < 11) activeElt = function() {\n    try { return document.activeElement; }\n    catch(e) { return document.body; }\n  };\n\n  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\"); }\n  var rmClass = CodeMirror.rmClass = function(node, cls) {\n    var current = node.className;\n    var match = classTest(cls).exec(current);\n    if (match) {\n      var after = current.slice(match.index + match[0].length);\n      node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n    }\n  };\n  var addClass = CodeMirror.addClass = function(node, cls) {\n    var current = node.className;\n    if (!classTest(cls).test(current)) node.className += (current ? \" \" : \"\") + cls;\n  };\n  function joinClasses(a, b) {\n    var as = a.split(\" \");\n    for (var i = 0; i < as.length; i++)\n      if (as[i] && !classTest(as[i]).test(b)) b += \" \" + as[i];\n    return b;\n  }\n\n  // WINDOW-WIDE EVENTS\n\n  // These must be handled carefully, because naively registering a\n  // handler for each editor will cause the editors to never be\n  // garbage collected.\n\n  function forEachCodeMirror(f) {\n    if (!document.body.getElementsByClassName) return;\n    var byClass = document.body.getElementsByClassName(\"CodeMirror\");\n    for (var i = 0; i < byClass.length; i++) {\n      var cm = byClass[i].CodeMirror;\n      if (cm) f(cm);\n    }\n  }\n\n  var globalsRegistered = false;\n  function ensureGlobalHandlers() {\n    if (globalsRegistered) return;\n    registerGlobalHandlers();\n    globalsRegistered = true;\n  }\n  function registerGlobalHandlers() {\n    // When the window resizes, we need to refresh active editors.\n    var resizeTimer;\n    on(window, \"resize\", function() {\n      if (resizeTimer == null) resizeTimer = setTimeout(function() {\n        resizeTimer = null;\n        forEachCodeMirror(onResize);\n      }, 100);\n    });\n    // When the window loses focus, we want to show the editor as blurred\n    on(window, \"blur\", function() {\n      forEachCodeMirror(onBlur);\n    });\n  }\n\n  // FEATURE DETECTION\n\n  // Detect drag-and-drop\n  var dragAndDrop = function() {\n    // There is *some* kind of drag-and-drop support in IE6-8, but I\n    // couldn't get it to work yet.\n    if (ie && ie_version < 9) return false;\n    var div = elt('div');\n    return \"draggable\" in div || \"dragDrop\" in div;\n  }();\n\n  var zwspSupported;\n  function zeroWidthElement(measure) {\n    if (zwspSupported == null) {\n      var test = elt(\"span\", \"\\u200b\");\n      removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n      if (measure.firstChild.offsetHeight != 0)\n        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);\n    }\n    var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n      elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n    node.setAttribute(\"cm-text\", \"\");\n    return node;\n  }\n\n  // Feature-detect IE's crummy client rect reporting for bidi text\n  var badBidiRects;\n  function hasBadBidiRects(measure) {\n    if (badBidiRects != null) return badBidiRects;\n    var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n    var r0 = range(txt, 0, 1).getBoundingClientRect();\n    if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)\n    var r1 = range(txt, 1, 2).getBoundingClientRect();\n    return badBidiRects = (r1.right - r0.right < 3);\n  }\n\n  // See if \"\".split is the broken IE version, if so, provide an\n  // alternative way to split lines.\n  var splitLines = CodeMirror.splitLines = \"\\n\\nb\".split(/\\n/).length != 3 ? function(string) {\n    var pos = 0, result = [], l = string.length;\n    while (pos <= l) {\n      var nl = string.indexOf(\"\\n\", pos);\n      if (nl == -1) nl = string.length;\n      var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n      var rt = line.indexOf(\"\\r\");\n      if (rt != -1) {\n        result.push(line.slice(0, rt));\n        pos += rt + 1;\n      } else {\n        result.push(line);\n        pos = nl + 1;\n      }\n    }\n    return result;\n  } : function(string){return string.split(/\\r\\n?|\\n/);};\n\n  var hasSelection = window.getSelection ? function(te) {\n    try { return te.selectionStart != te.selectionEnd; }\n    catch(e) { return false; }\n  } : function(te) {\n    try {var range = te.ownerDocument.selection.createRange();}\n    catch(e) {}\n    if (!range || range.parentElement() != te) return false;\n    return range.compareEndPoints(\"StartToEnd\", range) != 0;\n  };\n\n  var hasCopyEvent = (function() {\n    var e = elt(\"div\");\n    if (\"oncopy\" in e) return true;\n    e.setAttribute(\"oncopy\", \"return;\");\n    return typeof e.oncopy == \"function\";\n  })();\n\n  var badZoomedRects = null;\n  function hasBadZoomedRects(measure) {\n    if (badZoomedRects != null) return badZoomedRects;\n    var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n    var normal = node.getBoundingClientRect();\n    var fromRange = range(node, 0, 1).getBoundingClientRect();\n    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;\n  }\n\n  // KEY NAMES\n\n  var keyNames = {3: \"Enter\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n                  19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n                  36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n                  46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\", 107: \"=\", 109: \"-\", 127: \"Delete\",\n                  173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n                  221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n                  63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"};\n  CodeMirror.keyNames = keyNames;\n  (function() {\n    // Number keys\n    for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i);\n    // Alphabetic keys\n    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);\n    // Function keys\n    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = \"F\" + i;\n  })();\n\n  // BIDI HELPERS\n\n  function iterateBidiSections(order, from, to, f) {\n    if (!order) return f(from, to, \"ltr\");\n    var found = false;\n    for (var i = 0; i < order.length; ++i) {\n      var part = order[i];\n      if (part.from < to && part.to > from || from == to && part.to == from) {\n        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\");\n        found = true;\n      }\n    }\n    if (!found) f(from, to, \"ltr\");\n  }\n\n  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }\n  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }\n\n  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }\n  function lineRight(line) {\n    var order = getOrder(line);\n    if (!order) return line.text.length;\n    return bidiRight(lst(order));\n  }\n\n  function lineStart(cm, lineN) {\n    var line = getLine(cm.doc, lineN);\n    var visual = visualLine(line);\n    if (visual != line) lineN = lineNo(visual);\n    var order = getOrder(visual);\n    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);\n    return Pos(lineN, ch);\n  }\n  function lineEnd(cm, lineN) {\n    var merged, line = getLine(cm.doc, lineN);\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line;\n      lineN = null;\n    }\n    var order = getOrder(line);\n    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);\n    return Pos(lineN == null ? lineNo(line) : lineN, ch);\n  }\n  function lineStartSmart(cm, pos) {\n    var start = lineStart(cm, pos.line);\n    var line = getLine(cm.doc, start.line);\n    var order = getOrder(line);\n    if (!order || order[0].level == 0) {\n      var firstNonWS = Math.max(0, line.text.search(/\\S/));\n      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n      return Pos(start.line, inWS ? 0 : firstNonWS);\n    }\n    return start;\n  }\n\n  function compareBidiLevel(order, a, b) {\n    var linedir = order[0].level;\n    if (a == linedir) return true;\n    if (b == linedir) return false;\n    return a < b;\n  }\n  var bidiOther;\n  function getBidiPartAt(order, pos) {\n    bidiOther = null;\n    for (var i = 0, found; i < order.length; ++i) {\n      var cur = order[i];\n      if (cur.from < pos && cur.to > pos) return i;\n      if ((cur.from == pos || cur.to == pos)) {\n        if (found == null) {\n          found = i;\n        } else if (compareBidiLevel(order, cur.level, order[found].level)) {\n          if (cur.from != cur.to) bidiOther = found;\n          return i;\n        } else {\n          if (cur.from != cur.to) bidiOther = i;\n          return found;\n        }\n      }\n    }\n    return found;\n  }\n\n  function moveInLine(line, pos, dir, byUnit) {\n    if (!byUnit) return pos + dir;\n    do pos += dir;\n    while (pos > 0 && isExtendingChar(line.text.charAt(pos)));\n    return pos;\n  }\n\n  // This is needed in order to move 'visually' through bi-directional\n  // text -- i.e., pressing left should make the cursor go left, even\n  // when in RTL text. The tricky part is the 'jumps', where RTL and\n  // LTR text touch each other. This often requires the cursor offset\n  // to move more than one unit, in order to visually move one unit.\n  function moveVisually(line, start, dir, byUnit) {\n    var bidi = getOrder(line);\n    if (!bidi) return moveLogically(line, start, dir, byUnit);\n    var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n    for (;;) {\n      if (target > part.from && target < part.to) return target;\n      if (target == part.from || target == part.to) {\n        if (getBidiPartAt(bidi, target) == pos) return target;\n        part = bidi[pos += dir];\n        return (dir > 0) == part.level % 2 ? part.to : part.from;\n      } else {\n        part = bidi[pos += dir];\n        if (!part) return null;\n        if ((dir > 0) == part.level % 2)\n          target = moveInLine(line, part.to, -1, byUnit);\n        else\n          target = moveInLine(line, part.from, 1, byUnit);\n      }\n    }\n  }\n\n  function moveLogically(line, start, dir, byUnit) {\n    var target = start + dir;\n    if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;\n    return target < 0 || target > line.text.length ? null : target;\n  }\n\n  // Bidirectional ordering algorithm\n  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n  // that this (partially) implements.\n\n  // One-char codes used for character types:\n  // L (L):   Left-to-Right\n  // R (R):   Right-to-Left\n  // r (AL):  Right-to-Left Arabic\n  // 1 (EN):  European Number\n  // + (ES):  European Number Separator\n  // % (ET):  European Number Terminator\n  // n (AN):  Arabic Number\n  // , (CS):  Common Number Separator\n  // m (NSM): Non-Spacing Mark\n  // b (BN):  Boundary Neutral\n  // s (B):   Paragraph Separator\n  // t (S):   Segment Separator\n  // w (WS):  Whitespace\n  // N (ON):  Other Neutrals\n\n  // Returns null if characters are ordered as they appear\n  // (left-to-right), or an array of sections ({from, to, level}\n  // objects) in the order in which they occur visually.\n  var bidiOrdering = (function() {\n    // Character types for codepoints 0 to 0xff\n    var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n    // Character types for codepoints 0x600 to 0x6ff\n    var arabicTypes = \"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm\";\n    function charType(code) {\n      if (code <= 0xf7) return lowTypes.charAt(code);\n      else if (0x590 <= code && code <= 0x5f4) return \"R\";\n      else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);\n      else if (0x6ee <= code && code <= 0x8ac) return \"r\";\n      else if (0x2000 <= code && code <= 0x200b) return \"w\";\n      else if (code == 0x200c) return \"b\";\n      else return \"L\";\n    }\n\n    var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n    // Browsers seem to always treat the boundaries of block elements as being L.\n    var outerType = \"L\";\n\n    function BidiSpan(level, from, to) {\n      this.level = level;\n      this.from = from; this.to = to;\n    }\n\n    return function(str) {\n      if (!bidiRE.test(str)) return false;\n      var len = str.length, types = [];\n      for (var i = 0, type; i < len; ++i)\n        types.push(type = charType(str.charCodeAt(i)));\n\n      // W1. Examine each non-spacing mark (NSM) in the level run, and\n      // change the type of the NSM to the type of the previous\n      // character. If the NSM is at the start of the level run, it will\n      // get the type of sor.\n      for (var i = 0, prev = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"m\") types[i] = prev;\n        else prev = type;\n      }\n\n      // W2. Search backwards from each instance of a European number\n      // until the first strong type (R, L, AL, or sor) is found. If an\n      // AL is found, change the type of the European number to Arabic\n      // number.\n      // W3. Change all ALs to R.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (type == \"1\" && cur == \"r\") types[i] = \"n\";\n        else if (isStrong.test(type)) { cur = type; if (type == \"r\") types[i] = \"R\"; }\n      }\n\n      // W4. A single European separator between two European numbers\n      // changes to a European number. A single common separator between\n      // two numbers of the same type changes to that type.\n      for (var i = 1, prev = types[0]; i < len - 1; ++i) {\n        var type = types[i];\n        if (type == \"+\" && prev == \"1\" && types[i+1] == \"1\") types[i] = \"1\";\n        else if (type == \",\" && prev == types[i+1] &&\n                 (prev == \"1\" || prev == \"n\")) types[i] = prev;\n        prev = type;\n      }\n\n      // W5. A sequence of European terminators adjacent to European\n      // numbers changes to all European numbers.\n      // W6. Otherwise, separators and terminators change to Other\n      // Neutral.\n      for (var i = 0; i < len; ++i) {\n        var type = types[i];\n        if (type == \",\") types[i] = \"N\";\n        else if (type == \"%\") {\n          for (var end = i + 1; end < len && types[end] == \"%\"; ++end) {}\n          var replace = (i && types[i-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // W7. Search backwards from each instance of a European number\n      // until the first strong type (R, L, or sor) is found. If an L is\n      // found, then change the type of the European number to L.\n      for (var i = 0, cur = outerType; i < len; ++i) {\n        var type = types[i];\n        if (cur == \"L\" && type == \"1\") types[i] = \"L\";\n        else if (isStrong.test(type)) cur = type;\n      }\n\n      // N1. A sequence of neutrals takes the direction of the\n      // surrounding strong text if the text on both sides has the same\n      // direction. European and Arabic numbers act as if they were R in\n      // terms of their influence on neutrals. Start-of-level-run (sor)\n      // and end-of-level-run (eor) are used at level run boundaries.\n      // N2. Any remaining neutrals take the embedding direction.\n      for (var i = 0; i < len; ++i) {\n        if (isNeutral.test(types[i])) {\n          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}\n          var before = (i ? types[i-1] : outerType) == \"L\";\n          var after = (end < len ? types[end] : outerType) == \"L\";\n          var replace = before || after ? \"L\" : \"R\";\n          for (var j = i; j < end; ++j) types[j] = replace;\n          i = end - 1;\n        }\n      }\n\n      // Here we depart from the documented algorithm, in order to avoid\n      // building up an actual levels array. Since there are only three\n      // levels (0, 1, 2) in an implementation that doesn't take\n      // explicit embedding into account, we can build up the order on\n      // the fly, without following the level-based algorithm.\n      var order = [], m;\n      for (var i = 0; i < len;) {\n        if (countsAsLeft.test(types[i])) {\n          var start = i;\n          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}\n          order.push(new BidiSpan(0, start, i));\n        } else {\n          var pos = i, at = order.length;\n          for (++i; i < len && types[i] != \"L\"; ++i) {}\n          for (var j = pos; j < i;) {\n            if (countsAsNum.test(types[j])) {\n              if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j));\n              var nstart = j;\n              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}\n              order.splice(at, 0, new BidiSpan(2, nstart, j));\n              pos = j;\n            } else ++j;\n          }\n          if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i));\n        }\n      }\n      if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n        order[0].from = m[0].length;\n        order.unshift(new BidiSpan(0, 0, m[0].length));\n      }\n      if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n        lst(order).to -= m[0].length;\n        order.push(new BidiSpan(0, len - m[0].length, len));\n      }\n      if (order[0].level == 2)\n        order.unshift(new BidiSpan(1, order[0].to, order[0].to));\n      if (order[0].level != lst(order).level)\n        order.push(new BidiSpan(order[0].level, len, len));\n\n      return order;\n    };\n  })();\n\n  // THE END\n\n  CodeMirror.version = \"5.4.0\";\n\n  return CodeMirror;\n});\n\n",
    "(function(global,factory){typeof exports===\"object\"&&typeof module!==\"undefined\"?module.exports=factory():typeof define===\"function\"&&define.amd?define('moment',factory):global.moment=factory()})(this,function(){\"use strict\";var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(callback){hookCallback=callback}function isArray(input){return input instanceof Array||Object.prototype.toString.call(input)===\"[object Array]\"}function isObject(input){return input!=null&&Object.prototype.toString.call(input)===\"[object Object]\"}function isObjectEmpty(obj){if(Object.getOwnPropertyNames){return Object.getOwnPropertyNames(obj).length===0}else{var k;for(k in obj){if(obj.hasOwnProperty(k)){return false}}return true}}function isUndefined(input){return input===void 0}function isNumber(input){return typeof input===\"number\"||Object.prototype.toString.call(input)===\"[object Number]\"}function isDate(input){return input instanceof Date||Object.prototype.toString.call(input)===\"[object Date]\"}function map(arr,fn){var res=[],i;for(i=0;i<arr.length;++i){res.push(fn(arr[i],i))}return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b){if(hasOwnProp(b,i)){a[i]=b[i]}}if(hasOwnProp(b,\"toString\")){a.toString=b.toString}if(hasOwnProp(b,\"valueOf\")){a.valueOf=b.valueOf}return a}function createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,true).utc()}function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],meridiem:null,rfc2822:false,weekdayMismatch:false}}function getParsingFlags(m){if(m._pf==null){m._pf=defaultParsingFlags()}return m._pf}var some;if(Array.prototype.some){some=Array.prototype.some}else{some=function(fun){var t=Object(this);var len=t.length>>>0;for(var i=0;i<len;i++){if(i in t&&fun.call(this,t[i],i,t)){return true}}return false}}function isValid(m){if(m._isValid==null){var flags=getParsingFlags(m);var parsedParts=some.call(flags.parsedDateParts,function(i){return i!=null});var isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.weekdayMismatch&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||flags.meridiem&&parsedParts);if(m._strict){isNowValid=isNowValid&&flags.charsLeftOver===0&&flags.unusedTokens.length===0&&flags.bigHour===undefined}if(Object.isFrozen==null||!Object.isFrozen(m)){m._isValid=isNowValid}else{return isNowValid}}return m._isValid}function createInvalid(flags){var m=createUTC(NaN);if(flags!=null){extend(getParsingFlags(m),flags)}else{getParsingFlags(m).userInvalidated=true}return m}var momentProperties=hooks.momentProperties=[];function copyConfig(to,from){var i,prop,val;if(!isUndefined(from._isAMomentObject)){to._isAMomentObject=from._isAMomentObject}if(!isUndefined(from._i)){to._i=from._i}if(!isUndefined(from._f)){to._f=from._f}if(!isUndefined(from._l)){to._l=from._l}if(!isUndefined(from._strict)){to._strict=from._strict}if(!isUndefined(from._tzm)){to._tzm=from._tzm}if(!isUndefined(from._isUTC)){to._isUTC=from._isUTC}if(!isUndefined(from._offset)){to._offset=from._offset}if(!isUndefined(from._pf)){to._pf=getParsingFlags(from)}if(!isUndefined(from._locale)){to._locale=from._locale}if(momentProperties.length>0){for(i=0;i<momentProperties.length;i++){prop=momentProperties[i];val=from[prop];if(!isUndefined(val)){to[prop]=val}}}return to}var updateInProgress=false;function Moment(config){copyConfig(this,config);this._d=new Date(config._d!=null?config._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(updateInProgress===false){updateInProgress=true;hooks.updateOffset(this);updateInProgress=false}}function isMoment(obj){return obj instanceof Moment||obj!=null&&obj._isAMomentObject!=null}function absFloor(number){if(number<0){return Math.ceil(number)||0}else{return Math.floor(number)}}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;if(coercedNumber!==0&&isFinite(coercedNumber)){value=absFloor(coercedNumber)}return value}function compareArrays(array1,array2,dontConvert){var len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0,i;for(i=0;i<len;i++){if(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i])){diffs++}}return diffs+lengthDiff}function warn(msg){if(hooks.suppressDeprecationWarnings===false&&typeof console!==\"undefined\"&&console.warn){console.warn(\"Deprecation warning: \"+msg)}}function deprecate(msg,fn){var firstTime=true;return extend(function(){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(null,msg)}if(firstTime){var args=[];var arg;for(var i=0;i<arguments.length;i++){arg=\"\";if(typeof arguments[i]===\"object\"){arg+=\"\\n[\"+i+\"] \";for(var key in arguments[0]){arg+=key+\": \"+arguments[0][key]+\", \"}arg=arg.slice(0,-2)}else{arg=arguments[i]}args.push(arg)}warn(msg+\"\\nArguments: \"+Array.prototype.slice.call(args).join(\"\")+\"\\n\"+(new Error).stack);firstTime=false}return fn.apply(this,arguments)},fn)}var deprecations={};function deprecateSimple(name,msg){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(name,msg)}if(!deprecations[name]){warn(msg);deprecations[name]=true}}hooks.suppressDeprecationWarnings=false;hooks.deprecationHandler=null;function isFunction(input){return input instanceof Function||Object.prototype.toString.call(input)===\"[object Function]\"}function set(config){var prop,i;for(i in config){prop=config[i];if(isFunction(prop)){this[i]=prop}else{this[\"_\"+i]=prop}}this._config=config;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)}function mergeConfigs(parentConfig,childConfig){var res=extend({},parentConfig),prop;for(prop in childConfig){if(hasOwnProp(childConfig,prop)){if(isObject(parentConfig[prop])&&isObject(childConfig[prop])){res[prop]={};extend(res[prop],parentConfig[prop]);extend(res[prop],childConfig[prop])}else if(childConfig[prop]!=null){res[prop]=childConfig[prop]}else{delete res[prop]}}}for(prop in parentConfig){if(hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])){res[prop]=extend({},res[prop])}}return res}function Locale(config){if(config!=null){this.set(config)}}var keys;if(Object.keys){keys=Object.keys}else{keys=function(obj){var i,res=[];for(i in obj){if(hasOwnProp(obj,i)){res.push(i)}}return res}}var defaultCalendar={sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"};function calendar(key,mom,now){var output=this._calendar[key]||this._calendar[\"sameElse\"];return isFunction(output)?output.call(mom,now):output}var defaultLongDateFormat={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];if(format||!formatUpper){return format}this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)});return this._longDateFormat[key]}var defaultInvalidDate=\"Invalid date\";function invalidDate(){return this._invalidDate}var defaultOrdinal=\"%d\";var defaultDayOfMonthOrdinalParse=/\\d{1,2}/;function ordinal(number){return this._ordinal.replace(\"%d\",number)}var defaultRelativeTime={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return isFunction(output)?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)}function pastFuture(diff,output){var format=this._relativeTime[diff>0?\"future\":\"past\"];return isFunction(format)?format(output):format.replace(/%s/i,output)}var aliases={};function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+\"s\"]=aliases[shorthand]=unit}function normalizeUnits(units){return typeof units===\"string\"?aliases[units]||aliases[units.toLowerCase()]:undefined}function normalizeObjectUnits(inputObject){var normalizedInput={},normalizedProp,prop;for(prop in inputObject){if(hasOwnProp(inputObject,prop)){normalizedProp=normalizeUnits(prop);if(normalizedProp){normalizedInput[normalizedProp]=inputObject[prop]}}}return normalizedInput}var priorities={};function addUnitPriority(unit,priority){priorities[unit]=priority}function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj){units.push({unit:u,priority:priorities[u]})}units.sort(function(a,b){return a.priority-b.priority});return units}function zeroFill(number,targetLength,forceSign){var absNumber=\"\"+Math.abs(number),zerosToFill=targetLength-absNumber.length,sign=number>=0;return(sign?forceSign?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}var formattingTokens=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;var localFormattingTokens=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;var formatFunctions={};var formatTokenFunctions={};function addFormatToken(token,padded,ordinal,callback){var func=callback;if(typeof callback===\"string\"){func=function(){return this[callback]()}}if(token){formatTokenFunctions[token]=func}if(padded){formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}}if(ordinal){formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token)}}}function removeFormattingTokens(input){if(input.match(/\\[[\\s\\S]/)){return input.replace(/^\\[|\\]$/g,\"\")}return input.replace(/\\\\/g,\"\")}function makeFormatFunction(format){var array=format.match(formattingTokens),i,length;for(i=0,length=array.length;i<length;i++){if(formatTokenFunctions[array[i]]){array[i]=formatTokenFunctions[array[i]]}else{array[i]=removeFormattingTokens(array[i])}}return function(mom){var output=\"\",i;for(i=0;i<length;i++){output+=isFunction(array[i])?array[i].call(mom,format):array[i]}return output}}function formatMoment(m,format){if(!m.isValid()){return m.localeData().invalidDate()}format=expandFormat(format,m.localeData());formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format);return formatFunctions[format](m)}function expandFormat(format,locale){var i=5;function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input}localFormattingTokens.lastIndex=0;while(i>=0&&localFormattingTokens.test(format)){format=format.replace(localFormattingTokens,replaceLongDateFormatTokens);localFormattingTokens.lastIndex=0;i-=1}return format}var match1=/\\d/;var match2=/\\d\\d/;var match3=/\\d{3}/;var match4=/\\d{4}/;var match6=/[+-]?\\d{6}/;var match1to2=/\\d\\d?/;var match3to4=/\\d\\d\\d\\d?/;var match5to6=/\\d\\d\\d\\d\\d\\d?/;var match1to3=/\\d{1,3}/;var match1to4=/\\d{1,4}/;var match1to6=/[+-]?\\d{1,6}/;var matchUnsigned=/\\d+/;var matchSigned=/[+-]?\\d+/;var matchOffset=/Z|[+-]\\d\\d:?\\d\\d/gi;var matchShortOffset=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi;var matchTimestamp=/[+-]?\\d+(\\.\\d{1,3})?/;var matchWord=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;var regexes={};function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token,config){if(!hasOwnProp(regexes,token)){return new RegExp(unescapeFormat(token))}return regexes[token](config._strict,config._locale)}function unescapeFormat(s){return regexEscape(s.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}))}function regexEscape(s){return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var tokens={};function addParseToken(token,callback){var i,func=callback;if(typeof token===\"string\"){token=[token]}if(isNumber(callback)){func=function(input,array){array[callback]=toInt(input)}}for(i=0;i<token.length;i++){tokens[token[i]]=func}}function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{};callback(input,config._w,config,token)})}function addTimeToArrayFromToken(token,input,config){if(input!=null&&hasOwnProp(tokens,token)){tokens[token](input,config._a,config,token)}}var YEAR=0;var MONTH=1;var DATE=2;var HOUR=3;var MINUTE=4;var SECOND=5;var MILLISECOND=6;var WEEK=7;var WEEKDAY=8;addFormatToken(\"Y\",0,0,function(){var y=this.year();return y<=9999?\"\"+y:\"+\"+y});addFormatToken(0,[\"YY\",2],0,function(){return this.year()%100});addFormatToken(0,[\"YYYY\",4],0,\"year\");addFormatToken(0,[\"YYYYY\",5],0,\"year\");addFormatToken(0,[\"YYYYYY\",6,true],0,\"year\");addUnitAlias(\"year\",\"y\");addUnitPriority(\"year\",1);addRegexToken(\"Y\",matchSigned);addRegexToken(\"YY\",match1to2,match2);addRegexToken(\"YYYY\",match1to4,match4);addRegexToken(\"YYYYY\",match1to6,match6);addRegexToken(\"YYYYYY\",match1to6,match6);addParseToken([\"YYYYY\",\"YYYYYY\"],YEAR);addParseToken(\"YYYY\",function(input,array){array[YEAR]=input.length===2?hooks.parseTwoDigitYear(input):toInt(input)});addParseToken(\"YY\",function(input,array){array[YEAR]=hooks.parseTwoDigitYear(input)});addParseToken(\"Y\",function(input,array){array[YEAR]=parseInt(input,10)});function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};var getSetYear=makeGetSet(\"FullYear\",true);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(unit,keepTime){return function(value){if(value!=null){set$1(this,unit,value);hooks.updateOffset(this,keepTime);return this}else{return get(this,unit)}}}function get(mom,unit){return mom.isValid()?mom._d[\"get\"+(mom._isUTC?\"UTC\":\"\")+unit]():NaN}function set$1(mom,unit,value){if(mom.isValid()&&!isNaN(value)){if(unit===\"FullYear\"&&isLeapYear(mom.year())&&mom.month()===1&&mom.date()===29){mom._d[\"set\"+(mom._isUTC?\"UTC\":\"\")+unit](value,mom.month(),daysInMonth(value,mom.month()))}else{mom._d[\"set\"+(mom._isUTC?\"UTC\":\"\")+unit](value)}}}function stringGet(units){units=normalizeUnits(units);if(isFunction(this[units])){return this[units]()}return this}function stringSet(units,value){if(typeof units===\"object\"){units=normalizeObjectUnits(units);var prioritized=getPrioritizedUnits(units);for(var i=0;i<prioritized.length;i++){this[prioritized[i].unit](units[prioritized[i].unit])}}else{units=normalizeUnits(units);if(isFunction(this[units])){return this[units](value)}}return this}function mod(n,x){return(n%x+x)%x}var indexOf;if(Array.prototype.indexOf){indexOf=Array.prototype.indexOf}else{indexOf=function(o){var i;for(i=0;i<this.length;++i){if(this[i]===o){return i}}return-1}}function daysInMonth(year,month){if(isNaN(year)||isNaN(month)){return NaN}var modMonth=mod(month,12);year+=(month-modMonth)/12;return modMonth===1?isLeapYear(year)?29:28:31-modMonth%7%2}addFormatToken(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1});addFormatToken(\"MMM\",0,0,function(format){return this.localeData().monthsShort(this,format)});addFormatToken(\"MMMM\",0,0,function(format){return this.localeData().months(this,format)});addUnitAlias(\"month\",\"M\");addUnitPriority(\"month\",8);addRegexToken(\"M\",match1to2);addRegexToken(\"MM\",match1to2,match2);addRegexToken(\"MMM\",function(isStrict,locale){return locale.monthsShortRegex(isStrict)});addRegexToken(\"MMMM\",function(isStrict,locale){return locale.monthsRegex(isStrict)});addParseToken([\"M\",\"MM\"],function(input,array){array[MONTH]=toInt(input)-1});addParseToken([\"MMM\",\"MMMM\"],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);if(month!=null){array[MONTH]=month}else{getParsingFlags(config).invalidMonth=input}});var MONTHS_IN_FORMAT=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;var defaultLocaleMonths=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\");function localeMonths(m,format){if(!m){return isArray(this._months)?this._months:this._months[\"standalone\"]}return isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?\"format\":\"standalone\"][m.month()]}var defaultLocaleMonthsShort=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function localeMonthsShort(m,format){if(!m){return isArray(this._monthsShort)?this._monthsShort:this._monthsShort[\"standalone\"]}return isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?\"format\":\"standalone\"][m.month()]}function handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(i=0;i<12;++i){mom=createUTC([2e3,i]);this._shortMonthsParse[i]=this.monthsShort(mom,\"\").toLocaleLowerCase();this._longMonthsParse[i]=this.months(mom,\"\").toLocaleLowerCase()}}if(strict){if(format===\"MMM\"){ii=indexOf.call(this._shortMonthsParse,llc);return ii!==-1?ii:null}else{ii=indexOf.call(this._longMonthsParse,llc);return ii!==-1?ii:null}}else{if(format===\"MMM\"){ii=indexOf.call(this._shortMonthsParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._longMonthsParse,llc);return ii!==-1?ii:null}else{ii=indexOf.call(this._longMonthsParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._shortMonthsParse,llc);return ii!==-1?ii:null}}}function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact){return handleStrictParse.call(this,monthName,format,strict)}if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[]}for(i=0;i<12;i++){mom=createUTC([2e3,i]);if(strict&&!this._longMonthsParse[i]){this._longMonthsParse[i]=new RegExp(\"^\"+this.months(mom,\"\").replace(\".\",\"\")+\"$\",\"i\");this._shortMonthsParse[i]=new RegExp(\"^\"+this.monthsShort(mom,\"\").replace(\".\",\"\")+\"$\",\"i\")}if(!strict&&!this._monthsParse[i]){regex=\"^\"+this.months(mom,\"\")+\"|^\"+this.monthsShort(mom,\"\");this._monthsParse[i]=new RegExp(regex.replace(\".\",\"\"),\"i\")}if(strict&&format===\"MMMM\"&&this._longMonthsParse[i].test(monthName)){return i}else if(strict&&format===\"MMM\"&&this._shortMonthsParse[i].test(monthName)){return i}else if(!strict&&this._monthsParse[i].test(monthName)){return i}}}function setMonth(mom,value){var dayOfMonth;if(!mom.isValid()){return mom}if(typeof value===\"string\"){if(/^\\d+$/.test(value)){value=toInt(value)}else{value=mom.localeData().monthsParse(value);if(!isNumber(value)){return mom}}}dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value));mom._d[\"set\"+(mom._isUTC?\"UTC\":\"\")+\"Month\"](value,dayOfMonth);return mom}function getSetMonth(value){if(value!=null){setMonth(this,value);hooks.updateOffset(this,true);return this}else{return get(this,\"Month\")}}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}var defaultMonthsShortRegex=matchWord;function monthsShortRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,\"_monthsRegex\")){computeMonthsParse.call(this)}if(isStrict){return this._monthsShortStrictRegex}else{return this._monthsShortRegex}}else{if(!hasOwnProp(this,\"_monthsShortRegex\")){this._monthsShortRegex=defaultMonthsShortRegex}return this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex}}var defaultMonthsRegex=matchWord;function monthsRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,\"_monthsRegex\")){computeMonthsParse.call(this)}if(isStrict){return this._monthsStrictRegex}else{return this._monthsRegex}}else{if(!hasOwnProp(this,\"_monthsRegex\")){this._monthsRegex=defaultMonthsRegex}return this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex}}function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length}var shortPieces=[],longPieces=[],mixedPieces=[],i,mom;for(i=0;i<12;i++){mom=createUTC([2e3,i]);shortPieces.push(this.monthsShort(mom,\"\"));longPieces.push(this.months(mom,\"\"));mixedPieces.push(this.months(mom,\"\"));mixedPieces.push(this.monthsShort(mom,\"\"))}shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<12;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i])}for(i=0;i<24;i++){mixedPieces[i]=regexEscape(mixedPieces[i])}this._monthsRegex=new RegExp(\"^(\"+mixedPieces.join(\"|\")+\")\",\"i\");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp(\"^(\"+longPieces.join(\"|\")+\")\",\"i\");this._monthsShortStrictRegex=new RegExp(\"^(\"+shortPieces.join(\"|\")+\")\",\"i\")}function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);if(y<100&&y>=0&&isFinite(date.getFullYear())){date.setFullYear(y)}return date}function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));if(y<100&&y>=0&&isFinite(date.getUTCFullYear())){date.setUTCFullYear(y)}return date}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw=(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7;return-fwdlw+fwd-1}function dayOfYearFromWeeks(year,week,weekday,dow,doy){var localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset,resYear,resDayOfYear;if(dayOfYear<=0){resYear=year-1;resDayOfYear=daysInYear(resYear)+dayOfYear}else if(dayOfYear>daysInYear(year)){resYear=year+1;resDayOfYear=dayOfYear-daysInYear(year)}else{resYear=year;resDayOfYear=dayOfYear}return{year:resYear,dayOfYear:resDayOfYear}}function weekOfYear(mom,dow,doy){var weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1,resWeek,resYear;if(week<1){resYear=mom.year()-1;resWeek=week+weeksInYear(resYear,dow,doy)}else if(week>weeksInYear(mom.year(),dow,doy)){resWeek=week-weeksInYear(mom.year(),dow,doy);resYear=mom.year()+1}else{resYear=mom.year();resWeek=week}return{week:resWeek,year:resYear}}function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7}addFormatToken(\"w\",[\"ww\",2],\"wo\",\"week\");addFormatToken(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\");addUnitAlias(\"week\",\"w\");addUnitAlias(\"isoWeek\",\"W\");addUnitPriority(\"week\",5);addUnitPriority(\"isoWeek\",5);addRegexToken(\"w\",match1to2);addRegexToken(\"ww\",match1to2,match2);addRegexToken(\"W\",match1to2);addRegexToken(\"WW\",match1to2,match2);addWeekParseToken([\"w\",\"ww\",\"W\",\"WW\"],function(input,week,config,token){week[token.substr(0,1)]=toInt(input)});function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(input){var week=this.localeData().week(this);return input==null?week:this.add((input-week)*7,\"d\")}function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return input==null?week:this.add((input-week)*7,\"d\")}addFormatToken(\"d\",0,\"do\",\"day\");addFormatToken(\"dd\",0,0,function(format){return this.localeData().weekdaysMin(this,format)});addFormatToken(\"ddd\",0,0,function(format){return this.localeData().weekdaysShort(this,format)});addFormatToken(\"dddd\",0,0,function(format){return this.localeData().weekdays(this,format)});addFormatToken(\"e\",0,0,\"weekday\");addFormatToken(\"E\",0,0,\"isoWeekday\");addUnitAlias(\"day\",\"d\");addUnitAlias(\"weekday\",\"e\");addUnitAlias(\"isoWeekday\",\"E\");addUnitPriority(\"day\",11);addUnitPriority(\"weekday\",11);addUnitPriority(\"isoWeekday\",11);addRegexToken(\"d\",match1to2);addRegexToken(\"e\",match1to2);addRegexToken(\"E\",match1to2);addRegexToken(\"dd\",function(isStrict,locale){return locale.weekdaysMinRegex(isStrict)});addRegexToken(\"ddd\",function(isStrict,locale){return locale.weekdaysShortRegex(isStrict)});addRegexToken(\"dddd\",function(isStrict,locale){return locale.weekdaysRegex(isStrict)});addWeekParseToken([\"dd\",\"ddd\",\"dddd\"],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);if(weekday!=null){week.d=weekday}else{getParsingFlags(config).invalidWeekday=input}});addWeekParseToken([\"d\",\"e\",\"E\"],function(input,week,config,token){week[token]=toInt(input)});function parseWeekday(input,locale){if(typeof input!==\"string\"){return input}if(!isNaN(input)){return parseInt(input,10)}input=locale.weekdaysParse(input);if(typeof input===\"number\"){return input}return null}function parseIsoWeekday(input,locale){if(typeof input===\"string\"){return locale.weekdaysParse(input)%7||7}return isNaN(input)?null:input}var defaultLocaleWeekdays=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");function localeWeekdays(m,format){if(!m){return isArray(this._weekdays)?this._weekdays:this._weekdays[\"standalone\"]}return isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?\"format\":\"standalone\"][m.day()]}var defaultLocaleWeekdaysShort=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");function localeWeekdaysShort(m){return m?this._weekdaysShort[m.day()]:this._weekdaysShort}var defaultLocaleWeekdaysMin=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");function localeWeekdaysMin(m){return m?this._weekdaysMin[m.day()]:this._weekdaysMin}function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(i=0;i<7;++i){mom=createUTC([2e3,1]).day(i);this._minWeekdaysParse[i]=this.weekdaysMin(mom,\"\").toLocaleLowerCase();this._shortWeekdaysParse[i]=this.weekdaysShort(mom,\"\").toLocaleLowerCase();this._weekdaysParse[i]=this.weekdays(mom,\"\").toLocaleLowerCase()}}if(strict){if(format===\"dddd\"){ii=indexOf.call(this._weekdaysParse,llc);return ii!==-1?ii:null}else if(format===\"ddd\"){ii=indexOf.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null}else{ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null}}else{if(format===\"dddd\"){ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null}else if(format===\"ddd\"){ii=indexOf.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null}else{ii=indexOf.call(this._minWeekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii}ii=indexOf.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null}}}function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact){return handleStrictParse$1.call(this,weekdayName,format,strict)}if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(i=0;i<7;i++){mom=createUTC([2e3,1]).day(i);if(strict&&!this._fullWeekdaysParse[i]){this._fullWeekdaysParse[i]=new RegExp(\"^\"+this.weekdays(mom,\"\").replace(\".\",\".?\")+\"$\",\"i\");this._shortWeekdaysParse[i]=new RegExp(\"^\"+this.weekdaysShort(mom,\"\").replace(\".\",\".?\")+\"$\",\"i\");this._minWeekdaysParse[i]=new RegExp(\"^\"+this.weekdaysMin(mom,\"\").replace(\".\",\".?\")+\"$\",\"i\")}if(!this._weekdaysParse[i]){regex=\"^\"+this.weekdays(mom,\"\")+\"|^\"+this.weekdaysShort(mom,\"\")+\"|^\"+this.weekdaysMin(mom,\"\");this._weekdaysParse[i]=new RegExp(regex.replace(\".\",\"\"),\"i\")}if(strict&&format===\"dddd\"&&this._fullWeekdaysParse[i].test(weekdayName)){return i}else if(strict&&format===\"ddd\"&&this._shortWeekdaysParse[i].test(weekdayName)){return i}else if(strict&&format===\"dd\"&&this._minWeekdaysParse[i].test(weekdayName)){return i}else if(!strict&&this._weekdaysParse[i].test(weekdayName)){return i}}}function getSetDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN}var day=this._isUTC?this._d.getUTCDay():this._d.getDay();if(input!=null){input=parseWeekday(input,this.localeData());return this.add(input-day,\"d\")}else{return day}}function getSetLocaleDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN}var weekday=(this.day()+7-this.localeData()._week.dow)%7;return input==null?weekday:this.add(input-weekday,\"d\")}function getSetISODayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN}if(input!=null){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7)}else{return this.day()||7}}var defaultWeekdaysRegex=matchWord;function weekdaysRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,\"_weekdaysRegex\")){computeWeekdaysParse.call(this)}if(isStrict){return this._weekdaysStrictRegex}else{return this._weekdaysRegex}}else{if(!hasOwnProp(this,\"_weekdaysRegex\")){this._weekdaysRegex=defaultWeekdaysRegex}return this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex}}var defaultWeekdaysShortRegex=matchWord;function weekdaysShortRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,\"_weekdaysRegex\")){computeWeekdaysParse.call(this)}if(isStrict){return this._weekdaysShortStrictRegex}else{return this._weekdaysShortRegex}}else{if(!hasOwnProp(this,\"_weekdaysShortRegex\")){this._weekdaysShortRegex=defaultWeekdaysShortRegex}return this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}var defaultWeekdaysMinRegex=matchWord;function weekdaysMinRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,\"_weekdaysRegex\")){computeWeekdaysParse.call(this)}if(isStrict){return this._weekdaysMinStrictRegex}else{return this._weekdaysMinRegex}}else{if(!hasOwnProp(this,\"_weekdaysMinRegex\")){this._weekdaysMinRegex=defaultWeekdaysMinRegex}return this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length}var minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[],i,mom,minp,shortp,longp;for(i=0;i<7;i++){mom=createUTC([2e3,1]).day(i);minp=this.weekdaysMin(mom,\"\");shortp=this.weekdaysShort(mom,\"\");longp=this.weekdays(mom,\"\");minPieces.push(minp);shortPieces.push(shortp);longPieces.push(longp);mixedPieces.push(minp);mixedPieces.push(shortp);mixedPieces.push(longp)}minPieces.sort(cmpLenRev);shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<7;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);mixedPieces[i]=regexEscape(mixedPieces[i])}this._weekdaysRegex=new RegExp(\"^(\"+mixedPieces.join(\"|\")+\")\",\"i\");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp(\"^(\"+longPieces.join(\"|\")+\")\",\"i\");this._weekdaysShortStrictRegex=new RegExp(\"^(\"+shortPieces.join(\"|\")+\")\",\"i\");this._weekdaysMinStrictRegex=new RegExp(\"^(\"+minPieces.join(\"|\")+\")\",\"i\")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken(\"H\",[\"HH\",2],0,\"hour\");addFormatToken(\"h\",[\"hh\",2],0,hFormat);addFormatToken(\"k\",[\"kk\",2],0,kFormat);addFormatToken(\"hmm\",0,0,function(){return\"\"+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken(\"hmmss\",0,0,function(){return\"\"+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken(\"Hmm\",0,0,function(){return\"\"+this.hours()+zeroFill(this.minutes(),2)});addFormatToken(\"Hmmss\",0,0,function(){return\"\"+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(token,lowercase){addFormatToken(token,0,0,function(){\nreturn this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}meridiem(\"a\",true);meridiem(\"A\",false);addUnitAlias(\"hour\",\"h\");addUnitPriority(\"hour\",13);function matchMeridiem(isStrict,locale){return locale._meridiemParse}addRegexToken(\"a\",matchMeridiem);addRegexToken(\"A\",matchMeridiem);addRegexToken(\"H\",match1to2);addRegexToken(\"h\",match1to2);addRegexToken(\"k\",match1to2);addRegexToken(\"HH\",match1to2,match2);addRegexToken(\"hh\",match1to2,match2);addRegexToken(\"kk\",match1to2,match2);addRegexToken(\"hmm\",match3to4);addRegexToken(\"hmmss\",match5to6);addRegexToken(\"Hmm\",match3to4);addRegexToken(\"Hmmss\",match5to6);addParseToken([\"H\",\"HH\"],HOUR);addParseToken([\"k\",\"kk\"],function(input,array,config){var kInput=toInt(input);array[HOUR]=kInput===24?0:kInput});addParseToken([\"a\",\"A\"],function(input,array,config){config._isPm=config._locale.isPM(input);config._meridiem=input});addParseToken([\"h\",\"hh\"],function(input,array,config){array[HOUR]=toInt(input);getParsingFlags(config).bigHour=true});addParseToken(\"hmm\",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));getParsingFlags(config).bigHour=true});addParseToken(\"hmmss\",function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));getParsingFlags(config).bigHour=true});addParseToken(\"Hmm\",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos))});addParseToken(\"Hmmss\",function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2))});function localeIsPM(input){return(input+\"\").toLowerCase().charAt(0)===\"p\"}var defaultLocaleMeridiemParse=/[ap]\\.?m?\\.?/i;function localeMeridiem(hours,minutes,isLower){if(hours>11){return isLower?\"pm\":\"PM\"}else{return isLower?\"am\":\"AM\"}}var getSetHour=makeGetSet(\"Hours\",true);var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse};var locales={};var localeFamilies={};var globalLocale;function normalizeLocale(key){return key?key.toLowerCase().replace(\"_\",\"-\"):key}function chooseLocale(names){var i=0,j,next,locale,split;while(i<names.length){split=normalizeLocale(names[i]).split(\"-\");j=split.length;next=normalizeLocale(names[i+1]);next=next?next.split(\"-\"):null;while(j>0){locale=loadLocale(split.slice(0,j).join(\"-\"));if(locale){return locale}if(next&&next.length>=j&&compareArrays(split,next,true)>=j-1){break}j--}i++}return null}function loadLocale(name){var oldLocale=null;if(!locales[name]&&typeof module!==\"undefined\"&&module&&module.exports){try{oldLocale=globalLocale._abbr;var aliasedRequire=require;aliasedRequire(\"./locale/\"+name);getSetGlobalLocale(oldLocale)}catch(e){}}return locales[name]}function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key)}else{data=defineLocale(key,values)}if(data){globalLocale=data}}return globalLocale._abbr}function defineLocale(name,config){if(config!==null){var parentConfig=baseConfig;config.abbr=name;if(locales[name]!=null){deprecateSimple(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change \"+\"an existing locale. moment.defineLocale(localeName, \"+\"config) should only be used for creating a new locale \"+\"See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\");parentConfig=locales[name]._config}else if(config.parentLocale!=null){if(locales[config.parentLocale]!=null){parentConfig=locales[config.parentLocale]._config}else{if(!localeFamilies[config.parentLocale]){localeFamilies[config.parentLocale]=[]}localeFamilies[config.parentLocale].push({name:name,config:config});return null}}locales[name]=new Locale(mergeConfigs(parentConfig,config));if(localeFamilies[name]){localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config)})}getSetGlobalLocale(name);return locales[name]}else{delete locales[name];return null}}function updateLocale(name,config){if(config!=null){var locale,tmpLocale,parentConfig=baseConfig;tmpLocale=loadLocale(name);if(tmpLocale!=null){parentConfig=tmpLocale._config}config=mergeConfigs(parentConfig,config);locale=new Locale(config);locale.parentLocale=locales[name];locales[name]=locale;getSetGlobalLocale(name)}else{if(locales[name]!=null){if(locales[name].parentLocale!=null){locales[name]=locales[name].parentLocale}else if(locales[name]!=null){delete locales[name]}}}return locales[name]}function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr){key=key._locale._abbr}if(!key){return globalLocale}if(!isArray(key)){locale=loadLocale(key);if(locale){return locale}key=[key]}return chooseLocale(key)}function listLocales(){return keys(locales)}function checkOverflow(m){var overflow;var a=m._a;if(a&&getParsingFlags(m).overflow===-2){overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0)?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1;if(getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)){overflow=DATE}if(getParsingFlags(m)._overflowWeeks&&overflow===-1){overflow=WEEK}if(getParsingFlags(m)._overflowWeekday&&overflow===-1){overflow=WEEKDAY}getParsingFlags(m).overflow=overflow}return m}function defaults(a,b,c){if(a!=null){return a}if(b!=null){return b}return c}function currentDateArray(config){var nowValue=new Date(hooks.now());if(config._useUTC){return[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()]}return[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()]}function configFromArray(config){var i,date,input=[],currentDate,yearToUse;if(config._d){return}currentDate=currentDateArray(config);if(config._w&&config._a[DATE]==null&&config._a[MONTH]==null){dayOfYearFromWeekInfo(config)}if(config._dayOfYear!=null){yearToUse=defaults(config._a[YEAR],currentDate[YEAR]);if(config._dayOfYear>daysInYear(yearToUse)||config._dayOfYear===0){getParsingFlags(config)._overflowDayOfYear=true}date=createUTCDate(yearToUse,0,config._dayOfYear);config._a[MONTH]=date.getUTCMonth();config._a[DATE]=date.getUTCDate()}for(i=0;i<3&&config._a[i]==null;++i){config._a[i]=input[i]=currentDate[i]}for(;i<7;i++){config._a[i]=input[i]=config._a[i]==null?i===2?1:0:config._a[i]}if(config._a[HOUR]===24&&config._a[MINUTE]===0&&config._a[SECOND]===0&&config._a[MILLISECOND]===0){config._nextDay=true;config._a[HOUR]=0}config._d=(config._useUTC?createUTCDate:createDate).apply(null,input);if(config._tzm!=null){config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm)}if(config._nextDay){config._a[HOUR]=24}if(config._w&&typeof config._w.d!==\"undefined\"&&config._w.d!==config._d.getDay()){getParsingFlags(config).weekdayMismatch=true}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;w=config._w;if(w.GG!=null||w.W!=null||w.E!=null){dow=1;doy=4;weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year);week=defaults(w.W,1);weekday=defaults(w.E,1);if(weekday<1||weekday>7){weekdayOverflow=true}}else{dow=config._locale._week.dow;doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year);week=defaults(w.w,curWeek.week);if(w.d!=null){weekday=w.d;if(weekday<0||weekday>6){weekdayOverflow=true}}else if(w.e!=null){weekday=w.e+dow;if(w.e<0||w.e>6){weekdayOverflow=true}}else{weekday=dow}}if(week<1||week>weeksInYear(weekYear,dow,doy)){getParsingFlags(config)._overflowWeeks=true}else if(weekdayOverflow!=null){getParsingFlags(config)._overflowWeekday=true}else{temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy);config._a[YEAR]=temp.year;config._dayOfYear=temp.dayOfYear}}var extendedIsoRegex=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;var basicIsoRegex=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;var tzRegex=/Z|[+-]\\d\\d(?::?\\d\\d)?/;var isoDates=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,false],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,false],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,false],[\"YYYYDDD\",/\\d{7}/]];var isoTimes=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]];var aspNetJsonRegex=/^\\/?Date\\((\\-?\\d+)/i;function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break}}if(dateFormat==null){config._isValid=false;return}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||\" \")+isoTimes[i][0];break}}if(timeFormat==null){config._isValid=false;return}}if(!allowTime&&timeFormat!=null){config._isValid=false;return}if(match[4]){if(tzRegex.exec(match[4])){tzFormat=\"Z\"}else{config._isValid=false;return}}config._f=dateFormat+(timeFormat||\"\")+(tzFormat||\"\");configFromStringAndFormat(config)}else{config._isValid=false}}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;function extractFromRFC2822Strings(yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr){var result=[untruncateYear(yearStr),defaultLocaleMonthsShort.indexOf(monthStr),parseInt(dayStr,10),parseInt(hourStr,10),parseInt(minuteStr,10)];if(secondStr){result.push(parseInt(secondStr,10))}return result}function untruncateYear(yearStr){var year=parseInt(yearStr,10);if(year<=49){return 2e3+year}else if(year<=999){return 1900+year}return year}function preprocessRFC2822(s){return s.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim()}function checkWeekday(weekdayStr,parsedInput,config){if(weekdayStr){var weekdayProvided=defaultLocaleWeekdaysShort.indexOf(weekdayStr),weekdayActual=new Date(parsedInput[0],parsedInput[1],parsedInput[2]).getDay();if(weekdayProvided!==weekdayActual){getParsingFlags(config).weekdayMismatch=true;config._isValid=false;return false}}return true}var obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function calculateOffset(obsOffset,militaryOffset,numOffset){if(obsOffset){return obsOffsets[obsOffset]}else if(militaryOffset){return 0}else{var hm=parseInt(numOffset,10);var m=hm%100,h=(hm-m)/100;return h*60+m}}function configFromRFC2822(config){var match=rfc2822.exec(preprocessRFC2822(config._i));if(match){var parsedArray=extractFromRFC2822Strings(match[4],match[3],match[2],match[5],match[6],match[7]);if(!checkWeekday(match[1],parsedArray,config)){return}config._a=parsedArray;config._tzm=calculateOffset(match[8],match[9],match[10]);config._d=createUTCDate.apply(null,config._a);config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm);getParsingFlags(config).rfc2822=true}else{config._isValid=false}}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(matched!==null){config._d=new Date(+matched[1]);return}configFromISO(config);if(config._isValid===false){delete config._isValid}else{return}configFromRFC2822(config);if(config._isValid===false){delete config._isValid}else{return}hooks.createFromInputFallback(config)}hooks.createFromInputFallback=deprecate(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), \"+\"which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are \"+\"discouraged and will be removed in an upcoming major release. Please refer to \"+\"http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(config){config._d=new Date(config._i+(config._useUTC?\" UTC\":\"\"))});hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601){configFromISO(config);return}if(config._f===hooks.RFC_2822){configFromRFC2822(config);return}config._a=[];getParsingFlags(config).empty=true;var string=\"\"+config._i,i,parsedInput,tokens,token,skipped,stringLength=string.length,totalParsedInputLength=0;tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[];for(i=0;i<tokens.length;i++){token=tokens[i];parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0];if(parsedInput){skipped=string.substr(0,string.indexOf(parsedInput));if(skipped.length>0){getParsingFlags(config).unusedInput.push(skipped)}string=string.slice(string.indexOf(parsedInput)+parsedInput.length);totalParsedInputLength+=parsedInput.length}if(formatTokenFunctions[token]){if(parsedInput){getParsingFlags(config).empty=false}else{getParsingFlags(config).unusedTokens.push(token)}addTimeToArrayFromToken(token,parsedInput,config)}else if(config._strict&&!parsedInput){getParsingFlags(config).unusedTokens.push(token)}}getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength;if(string.length>0){getParsingFlags(config).unusedInput.push(string)}if(config._a[HOUR]<=12&&getParsingFlags(config).bigHour===true&&config._a[HOUR]>0){getParsingFlags(config).bigHour=undefined}getParsingFlags(config).parsedDateParts=config._a.slice(0);getParsingFlags(config).meridiem=config._meridiem;config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem);configFromArray(config);checkOverflow(config)}function meridiemFixWrap(locale,hour,meridiem){var isPm;if(meridiem==null){return hour}if(locale.meridiemHour!=null){return locale.meridiemHour(hour,meridiem)}else if(locale.isPM!=null){isPm=locale.isPM(meridiem);if(isPm&&hour<12){hour+=12}if(!isPm&&hour===12){hour=0}return hour}else{return hour}}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(config._f.length===0){getParsingFlags(config).invalidFormat=true;config._d=new Date(NaN);return}for(i=0;i<config._f.length;i++){currentScore=0;tempConfig=copyConfig({},config);if(config._useUTC!=null){tempConfig._useUTC=config._useUTC}tempConfig._f=config._f[i];configFromStringAndFormat(tempConfig);if(!isValid(tempConfig)){continue}currentScore+=getParsingFlags(tempConfig).charsLeftOver;currentScore+=getParsingFlags(tempConfig).unusedTokens.length*10;getParsingFlags(tempConfig).score=currentScore;if(scoreToBeat==null||currentScore<scoreToBeat){scoreToBeat=currentScore;bestMoment=tempConfig}}extend(config,bestMoment||tempConfig)}function configFromObject(config){if(config._d){return}var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10)});configFromArray(config)}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));if(res._nextDay){res.add(1,\"d\");res._nextDay=undefined}return res}function prepareConfig(config){var input=config._i,format=config._f;config._locale=config._locale||getLocale(config._l);if(input===null||format===undefined&&input===\"\"){return createInvalid({nullInput:true})}if(typeof input===\"string\"){config._i=input=config._locale.preparse(input)}if(isMoment(input)){return new Moment(checkOverflow(input))}else if(isDate(input)){config._d=input}else if(isArray(format)){configFromStringAndArray(config)}else if(format){configFromStringAndFormat(config)}else{configFromInput(config)}if(!isValid(config)){config._d=null}return config}function configFromInput(config){var input=config._i;if(isUndefined(input)){config._d=new Date(hooks.now())}else if(isDate(input)){config._d=new Date(input.valueOf())}else if(typeof input===\"string\"){configFromString(config)}else if(isArray(input)){config._a=map(input.slice(0),function(obj){return parseInt(obj,10)});configFromArray(config)}else if(isObject(input)){configFromObject(config)}else if(isNumber(input)){config._d=new Date(input)}else{hooks.createFromInputFallback(config)}}function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};if(locale===true||locale===false){strict=locale;locale=undefined}if(isObject(input)&&isObjectEmpty(input)||isArray(input)&&input.length===0){input=undefined}c._isAMomentObject=true;c._useUTC=c._isUTC=isUTC;c._l=locale;c._i=input;c._f=format;c._strict=strict;return createFromConfig(c)}function createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,false)}var prototypeMin=deprecate(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var other=createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other<this?this:other}else{return createInvalid()}});var prototypeMax=deprecate(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var other=createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other>this?this:other}else{return createInvalid()}});function pickBy(fn,moments){var res,i;if(moments.length===1&&isArray(moments[0])){moments=moments[0]}if(!moments.length){return createLocal()}res=moments[0];for(i=1;i<moments.length;++i){if(!moments[i].isValid()||moments[i][fn](res)){res=moments[i]}}return res}function min(){var args=[].slice.call(arguments,0);return pickBy(\"isBefore\",args)}function max(){var args=[].slice.call(arguments,0);return pickBy(\"isAfter\",args)}var now=function(){return Date.now?Date.now():+new Date};var ordering=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function isDurationValid(m){for(var key in m){if(!(indexOf.call(ordering,key)!==-1&&(m[key]==null||!isNaN(m[key])))){return false}}var unitHasDecimal=false;for(var i=0;i<ordering.length;++i){if(m[ordering[i]]){if(unitHasDecimal){return false}if(parseFloat(m[ordering[i]])!==toInt(m[ordering[i]])){unitHasDecimal=true}}}return true}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._isValid=isDurationValid(normalizedInput);this._milliseconds=+milliseconds+seconds*1e3+minutes*6e4+hours*1e3*60*60;this._days=+days+weeks*7;this._months=+months+quarters*3+years*12;this._data={};this._locale=getLocale();this._bubble()}function isDuration(obj){return obj instanceof Duration}function absRound(number){if(number<0){return Math.round(-1*number)*-1}else{return Math.round(number)}}function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset();var sign=\"+\";if(offset<0){offset=-offset;sign=\"-\"}return sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~offset%60,2)})}offset(\"Z\",\":\");offset(\"ZZ\",\"\");addRegexToken(\"Z\",matchShortOffset);addRegexToken(\"ZZ\",matchShortOffset);addParseToken([\"Z\",\"ZZ\"],function(input,array,config){config._useUTC=true;config._tzm=offsetFromString(matchShortOffset,input)});var chunkOffset=/([\\+\\-]|\\d\\d)/gi;function offsetFromString(matcher,string){var matches=(string||\"\").match(matcher);if(matches===null){return null}var chunk=matches[matches.length-1]||[];var parts=(chunk+\"\").match(chunkOffset)||[\"-\",0,0];var minutes=+(parts[1]*60)+toInt(parts[2]);return minutes===0?0:parts[0]===\"+\"?minutes:-minutes}function cloneWithOffset(input,model){var res,diff;if(model._isUTC){res=model.clone();diff=(isMoment(input)||isDate(input)?input.valueOf():createLocal(input).valueOf())-res.valueOf();res._d.setTime(res._d.valueOf()+diff);hooks.updateOffset(res,false);return res}else{return createLocal(input).local()}}function getDateOffset(m){return-Math.round(m._d.getTimezoneOffset()/15)*15}hooks.updateOffset=function(){};function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN}if(input!=null){if(typeof input===\"string\"){input=offsetFromString(matchShortOffset,input);if(input===null){return this}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this)}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,\"m\")}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,\"m\"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null}}return this}else{return this._isUTC?offset:getDateOffset(this)}}function getSetZone(input,keepLocalTime){if(input!=null){if(typeof input!==\"string\"){input=-input}this.utcOffset(input,keepLocalTime);return this}else{return-this.utcOffset()}}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){if(this._isUTC){this.utcOffset(0,keepLocalTime);this._isUTC=false;if(keepLocalTime){this.subtract(getDateOffset(this),\"m\")}}return this}function setOffsetToParsedOffset(){if(this._tzm!=null){this.utcOffset(this._tzm,false,true)}else if(typeof this._i===\"string\"){var tZone=offsetFromString(matchOffset,this._i);if(tZone!=null){this.utcOffset(tZone)}else{this.utcOffset(0,true)}}return this}function hasAlignedHourOffset(input){if(!this.isValid()){return false}input=input?createLocal(input).utcOffset():0;return(this.utcOffset()-input)%60===0}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted}var c={};copyConfig(c,this);c=prepareConfig(c);if(c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else{this._isDSTShifted=false}return this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:false}function isUtcOffset(){return this.isValid()?this._isUTC:false}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false}var aspNetRegex=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;var isoRegex=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(input,key){var duration=input,match=null,sign,ret,diffRes;if(isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months}}else if(isNumber(input)){duration={};if(key){duration[key]=input}else{duration.milliseconds=input}}else if(!!(match=aspNetRegex.exec(input))){sign=match[1]===\"-\"?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(match[MILLISECOND]*1e3))*sign}}else if(!!(match=isoRegex.exec(input))){sign=match[1]===\"-\"?-1:match[1]===\"+\"?1:1;duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)}}else if(duration==null){duration={}}else if(typeof duration===\"object\"&&(\"from\"in duration||\"to\"in duration)){diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months}ret=new Duration(duration);if(isDuration(input)&&hasOwnProp(input,\"_locale\")){ret._locale=input._locale}return ret}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(\",\",\".\"));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};res.months=other.month()-base.month()+(other.year()-base.year())*12;if(base.clone().add(res.months,\"M\").isAfter(other)){--res.months}res.milliseconds=+other-+base.clone().add(res.months,\"M\");return res}function momentsDifference(base,other){var res;if(!(base.isValid()&&other.isValid())){return{milliseconds:0,months:0}}other=cloneWithOffset(other,base);if(base.isBefore(other)){res=positiveMomentsDifference(base,other)}else{res=positiveMomentsDifference(other,base);res.milliseconds=-res.milliseconds;res.months=-res.months}return res}function createAdder(direction,name){return function(val,period){var dur,tmp;if(period!==null&&!isNaN(+period)){deprecateSimple(name,\"moment().\"+name+\"(period, number) is deprecated. Please use moment().\"+name+\"(number, period). \"+\"See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\");tmp=val;val=period;period=tmp}val=typeof val===\"string\"?+val:val;dur=createDuration(val,period);addSubtract(this,dur,direction);return this}}function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);if(!mom.isValid()){return}updateOffset=updateOffset==null?true:updateOffset;if(months){setMonth(mom,get(mom,\"Month\")+months*isAdding)}if(days){set$1(mom,\"Date\",get(mom,\"Date\")+days*isAdding)}if(milliseconds){mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding)}if(updateOffset){hooks.updateOffset(mom,days||months)}}var add=createAdder(1,\"add\");var subtract=createAdder(-1,\"subtract\");function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,\"days\",true);return diff<-6?\"sameElse\":diff<-1?\"lastWeek\":diff<0?\"lastDay\":diff<1?\"sameDay\":diff<2?\"nextDay\":diff<7?\"nextWeek\":\"sameElse\"}function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf(\"day\"),format=hooks.calendarFormat(this,sod)||\"sameElse\";var output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)))}function clone(){return new Moment(this)}function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false}units=normalizeUnits(!isUndefined(units)?units:\"millisecond\");if(units===\"millisecond\"){return this.valueOf()>localInput.valueOf()}else{return localInput.valueOf()<this.clone().startOf(units).valueOf()}}function isBefore(input,units){var localInput=isMoment(input)?input:createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false}units=normalizeUnits(!isUndefined(units)?units:\"millisecond\");if(units===\"millisecond\"){return this.valueOf()<localInput.valueOf()}else{return this.clone().endOf(units).valueOf()<localInput.valueOf()}}function isBetween(from,to,units,inclusivity){inclusivity=inclusivity||\"()\";return(inclusivity[0]===\"(\"?this.isAfter(from,units):!this.isBefore(from,units))&&(inclusivity[1]===\")\"?this.isBefore(to,units):!this.isAfter(to,units))}function isSame(input,units){var localInput=isMoment(input)?input:createLocal(input),inputMs;if(!(this.isValid()&&localInput.isValid())){return false}units=normalizeUnits(units||\"millisecond\");if(units===\"millisecond\"){return this.valueOf()===localInput.valueOf()}else{inputMs=localInput.valueOf();return this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf()}}function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units)}function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units)}function diff(input,units,asFloat){var that,zoneDelta,delta,output;if(!this.isValid()){return NaN}that=cloneWithOffset(input,this);if(!that.isValid()){return NaN}zoneDelta=(that.utcOffset()-this.utcOffset())*6e4;units=normalizeUnits(units);switch(units){case\"year\":output=monthDiff(this,that)/12;break;case\"month\":output=monthDiff(this,that);break;case\"quarter\":output=monthDiff(this,that)/3;break;case\"second\":output=(this-that)/1e3;break;case\"minute\":output=(this-that)/6e4;break;case\"hour\":output=(this-that)/36e5;break;case\"day\":output=(this-that-zoneDelta)/864e5;break;case\"week\":output=(this-that-zoneDelta)/6048e5;break;default:output=this-that}return asFloat?output:absFloor(output)}function monthDiff(a,b){var wholeMonthDiff=(b.year()-a.year())*12+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,\"months\"),anchor2,adjust;if(b-anchor<0){anchor2=a.clone().add(wholeMonthDiff-1,\"months\");adjust=(b-anchor)/(anchor-anchor2)}else{anchor2=a.clone().add(wholeMonthDiff+1,\"months\");adjust=(b-anchor)/(anchor2-anchor)}return-(wholeMonthDiff+adjust)||0}hooks.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\";hooks.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";function toString(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")}function toISOString(){if(!this.isValid()){return null}var m=this.clone().utc();if(m.year()<0||m.year()>9999){return formatMoment(m,\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\")}if(isFunction(Date.prototype.toISOString)){return this.toDate().toISOString()}return formatMoment(m,\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\")}function inspect(){if(!this.isValid()){return\"moment.invalid(/* \"+this._i+\" */)\"}var func=\"moment\";var zone=\"\";if(!this.isLocal()){func=this.utcOffset()===0?\"moment.utc\":\"moment.parseZone\";zone=\"Z\"}var prefix=\"[\"+func+'(\"]';var year=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\";var datetime=\"-MM-DD[T]HH:mm:ss.SSS\";var suffix=zone+'[\")]';return this.format(prefix+year+datetime+suffix)}function format(inputString){if(!inputString){inputString=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat}var output=formatMoment(this,inputString);return this.localeData().postformat(output)}function from(time,withoutSuffix){if(this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())){return createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix)}else{return this.localeData().invalidDate()}}function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix)}function to(time,withoutSuffix){if(this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())){return createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix)}else{return this.localeData().invalidDate()}}function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix)}function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData}return this}}var lang=deprecate(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(key){if(key===undefined){return this.localeData()}else{return this.locale(key)}});function localeData(){return this._locale}function startOf(units){units=normalizeUnits(units);switch(units){case\"year\":\nthis.month(0);case\"quarter\":case\"month\":this.date(1);case\"week\":case\"isoWeek\":case\"day\":case\"date\":this.hours(0);case\"hour\":this.minutes(0);case\"minute\":this.seconds(0);case\"second\":this.milliseconds(0)}if(units===\"week\"){this.weekday(0)}if(units===\"isoWeek\"){this.isoWeekday(1)}if(units===\"quarter\"){this.month(Math.floor(this.month()/3)*3)}return this}function endOf(units){units=normalizeUnits(units);if(units===undefined||units===\"millisecond\"){return this}if(units===\"date\"){units=\"day\"}return this.startOf(units).add(1,units===\"isoWeek\"?\"week\":units).subtract(1,\"ms\")}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken(0,[\"gg\",2],0,function(){return this.weekYear()%100});addFormatToken(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter)}addWeekYearFormatToken(\"gggg\",\"weekYear\");addWeekYearFormatToken(\"ggggg\",\"weekYear\");addWeekYearFormatToken(\"GGGG\",\"isoWeekYear\");addWeekYearFormatToken(\"GGGGG\",\"isoWeekYear\");addUnitAlias(\"weekYear\",\"gg\");addUnitAlias(\"isoWeekYear\",\"GG\");addUnitPriority(\"weekYear\",1);addUnitPriority(\"isoWeekYear\",1);addRegexToken(\"G\",matchSigned);addRegexToken(\"g\",matchSigned);addRegexToken(\"GG\",match1to2,match2);addRegexToken(\"gg\",match1to2,match2);addRegexToken(\"GGGG\",match1to4,match4);addRegexToken(\"gggg\",match1to4,match4);addRegexToken(\"GGGGG\",match1to6,match6);addRegexToken(\"ggggg\",match1to6,match6);addWeekParseToken([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(input,week,config,token){week[token.substr(0,2)]=toInt(input)});addWeekParseToken([\"gg\",\"GG\"],function(input,week,config,token){week[token]=hooks.parseTwoDigitYear(input)});function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;if(input==null){return weekOfYear(this,dow,doy).year}else{weeksTarget=weeksInYear(input,dow,doy);if(week>weeksTarget){week=weeksTarget}return setWeekAll.call(this,input,week,weekday,dow,doy)}}function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);this.year(date.getUTCFullYear());this.month(date.getUTCMonth());this.date(date.getUTCDate());return this}addFormatToken(\"Q\",0,\"Qo\",\"quarter\");addUnitAlias(\"quarter\",\"Q\");addUnitPriority(\"quarter\",7);addRegexToken(\"Q\",match1);addParseToken(\"Q\",function(input,array){array[MONTH]=(toInt(input)-1)*3});function getSetQuarter(input){return input==null?Math.ceil((this.month()+1)/3):this.month((input-1)*3+this.month()%3)}addFormatToken(\"D\",[\"DD\",2],\"Do\",\"date\");addUnitAlias(\"date\",\"D\");addUnitPriority(\"date\",9);addRegexToken(\"D\",match1to2);addRegexToken(\"DD\",match1to2,match2);addRegexToken(\"Do\",function(isStrict,locale){return isStrict?locale._dayOfMonthOrdinalParse||locale._ordinalParse:locale._dayOfMonthOrdinalParseLenient});addParseToken([\"D\",\"DD\"],DATE);addParseToken(\"Do\",function(input,array){array[DATE]=toInt(input.match(match1to2)[0],10)});var getSetDayOfMonth=makeGetSet(\"Date\",true);addFormatToken(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\");addUnitAlias(\"dayOfYear\",\"DDD\");addUnitPriority(\"dayOfYear\",4);addRegexToken(\"DDD\",match1to3);addRegexToken(\"DDDD\",match3);addParseToken([\"DDD\",\"DDDD\"],function(input,array,config){config._dayOfYear=toInt(input)});function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return input==null?dayOfYear:this.add(input-dayOfYear,\"d\")}addFormatToken(\"m\",[\"mm\",2],0,\"minute\");addUnitAlias(\"minute\",\"m\");addUnitPriority(\"minute\",14);addRegexToken(\"m\",match1to2);addRegexToken(\"mm\",match1to2,match2);addParseToken([\"m\",\"mm\"],MINUTE);var getSetMinute=makeGetSet(\"Minutes\",false);addFormatToken(\"s\",[\"ss\",2],0,\"second\");addUnitAlias(\"second\",\"s\");addUnitPriority(\"second\",15);addRegexToken(\"s\",match1to2);addRegexToken(\"ss\",match1to2,match2);addParseToken([\"s\",\"ss\"],SECOND);var getSetSecond=makeGetSet(\"Seconds\",false);addFormatToken(\"S\",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,[\"SSS\",3],0,\"millisecond\");addFormatToken(0,[\"SSSS\",4],0,function(){return this.millisecond()*10});addFormatToken(0,[\"SSSSS\",5],0,function(){return this.millisecond()*100});addFormatToken(0,[\"SSSSSS\",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,[\"SSSSSSS\",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,[\"SSSSSSSS\",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,[\"SSSSSSSSS\",9],0,function(){return this.millisecond()*1e6});addUnitAlias(\"millisecond\",\"ms\");addUnitPriority(\"millisecond\",16);addRegexToken(\"S\",match1to3,match1);addRegexToken(\"SS\",match1to3,match2);addRegexToken(\"SSS\",match1to3,match3);var token;for(token=\"SSSS\";token.length<=9;token+=\"S\"){addRegexToken(token,matchUnsigned)}function parseMs(input,array){array[MILLISECOND]=toInt((\"0.\"+input)*1e3)}for(token=\"S\";token.length<=9;token+=\"S\"){addParseToken(token,parseMs)}var getSetMillisecond=makeGetSet(\"Milliseconds\",false);addFormatToken(\"z\",0,0,\"zoneAbbr\");addFormatToken(\"zz\",0,0,\"zoneName\");function getZoneAbbr(){return this._isUTC?\"UTC\":\"\"}function getZoneName(){return this._isUTC?\"Coordinated Universal Time\":\"\"}var proto=Moment.prototype;proto.add=add;proto.calendar=calendar$1;proto.clone=clone;proto.diff=diff;proto.endOf=endOf;proto.format=format;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$2;proto.lang=lang;proto.locale=locale;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract;proto.toArray=toArray;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;proto.toJSON=toJSON;proto.toString=toString;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate(\"dates accessor is deprecated. Use date instead.\",getSetDayOfMonth);proto.months=deprecate(\"months accessor is deprecated. Use month instead\",getSetMonth);proto.years=deprecate(\"years accessor is deprecated. Use year instead\",getSetYear);proto.zone=deprecate(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",getSetZone);proto.isDSTShifted=deprecate(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",isDaylightSavingTimeShifted);function createUnix(input){return createLocal(input*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(string){return string}var proto$1=Locale.prototype;proto$1.calendar=calendar;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1(format,index,field,setter){var locale=getLocale();var utc=createUTC().set(setter,index);return locale[field](utc,format)}function listMonthsImpl(format,index,field){if(isNumber(format)){index=format;format=undefined}format=format||\"\";if(index!=null){return get$1(format,index,field,\"month\")}var i;var out=[];for(i=0;i<12;i++){out[i]=get$1(format,i,field,\"month\")}return out}function listWeekdaysImpl(localeSorted,format,index,field){if(typeof localeSorted===\"boolean\"){if(isNumber(format)){index=format;format=undefined}format=format||\"\"}else{format=localeSorted;index=format;localeSorted=false;if(isNumber(format)){index=format;format=undefined}format=format||\"\"}var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(index!=null){return get$1(format,(index+shift)%7,field,\"day\")}var i;var out=[];for(i=0;i<7;i++){out[i]=get$1(format,(i+shift)%7,field,\"day\")}return out}function listMonths(format,index){return listMonthsImpl(format,index,\"months\")}function listMonthsShort(format,index){return listMonthsImpl(format,index,\"monthsShort\")}function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,\"weekdays\")}function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,\"weekdaysShort\")}function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,\"weekdaysMin\")}getSetGlobalLocale(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=toInt(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output}});hooks.lang=deprecate(\"moment.lang is deprecated. Use moment.locale instead.\",getSetGlobalLocale);hooks.langData=deprecate(\"moment.langData is deprecated. Use moment.localeData instead.\",getLocale);var mathAbs=Math.abs;function abs(){var data=this._data;this._milliseconds=mathAbs(this._milliseconds);this._days=mathAbs(this._days);this._months=mathAbs(this._months);data.milliseconds=mathAbs(data.milliseconds);data.seconds=mathAbs(data.seconds);data.minutes=mathAbs(data.minutes);data.hours=mathAbs(data.hours);data.months=mathAbs(data.months);data.years=mathAbs(data.years);return this}function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);duration._milliseconds+=direction*other._milliseconds;duration._days+=direction*other._days;duration._months+=direction*other._months;return duration._bubble()}function add$1(input,value){return addSubtract$1(this,input,value,1)}function subtract$1(input,value){return addSubtract$1(this,input,value,-1)}function absCeil(number){if(number<0){return Math.floor(number)}else{return Math.ceil(number)}}function bubble(){var milliseconds=this._milliseconds;var days=this._days;var months=this._months;var data=this._data;var seconds,minutes,hours,years,monthsFromDays;if(!(milliseconds>=0&&days>=0&&months>=0||milliseconds<=0&&days<=0&&months<=0)){milliseconds+=absCeil(monthsToDays(months)+days)*864e5;days=0;months=0}data.milliseconds=milliseconds%1e3;seconds=absFloor(milliseconds/1e3);data.seconds=seconds%60;minutes=absFloor(seconds/60);data.minutes=minutes%60;hours=absFloor(minutes/60);data.hours=hours%24;days+=absFloor(hours/24);monthsFromDays=absFloor(daysToMonths(days));months+=monthsFromDays;days-=absCeil(monthsToDays(monthsFromDays));years=absFloor(months/12);months%=12;data.days=days;data.months=months;data.years=years;return this}function daysToMonths(days){return days*4800/146097}function monthsToDays(months){return months*146097/4800}function as(units){if(!this.isValid()){return NaN}var days;var months;var milliseconds=this._milliseconds;units=normalizeUnits(units);if(units===\"month\"||units===\"year\"){days=this._days+milliseconds/864e5;months=this._months+daysToMonths(days);return units===\"month\"?months:months/12}else{days=this._days+Math.round(monthsToDays(this._months));switch(units){case\"week\":return days/7+milliseconds/6048e5;case\"day\":return days+milliseconds/864e5;case\"hour\":return days*24+milliseconds/36e5;case\"minute\":return days*1440+milliseconds/6e4;case\"second\":return days*86400+milliseconds/1e3;case\"millisecond\":return Math.floor(days*864e5)+milliseconds;default:throw new Error(\"Unknown unit \"+units)}}}function valueOf$1(){if(!this.isValid()){return NaN}return this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6}function makeAs(alias){return function(){return this.as(alias)}}var asMilliseconds=makeAs(\"ms\");var asSeconds=makeAs(\"s\");var asMinutes=makeAs(\"m\");var asHours=makeAs(\"h\");var asDays=makeAs(\"d\");var asWeeks=makeAs(\"w\");var asMonths=makeAs(\"M\");var asYears=makeAs(\"y\");function clone$1(){return createDuration(this)}function get$2(units){units=normalizeUnits(units);return this.isValid()?this[units+\"s\"]():NaN}function makeGetter(name){return function(){return this.isValid()?this._data[name]:NaN}}var milliseconds=makeGetter(\"milliseconds\");var seconds=makeGetter(\"seconds\");var minutes=makeGetter(\"minutes\");var hours=makeGetter(\"hours\");var days=makeGetter(\"days\");var months=makeGetter(\"months\");var years=makeGetter(\"years\");function weeks(){return absFloor(this.days()/7)}var round=Math.round;var thresholds={ss:44,s:45,m:45,h:22,d:26,M:11};function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs();var seconds=round(duration.as(\"s\"));var minutes=round(duration.as(\"m\"));var hours=round(duration.as(\"h\"));var days=round(duration.as(\"d\"));var months=round(duration.as(\"M\"));var years=round(duration.as(\"y\"));var a=seconds<=thresholds.ss&&[\"s\",seconds]||seconds<thresholds.s&&[\"ss\",seconds]||minutes<=1&&[\"m\"]||minutes<thresholds.m&&[\"mm\",minutes]||hours<=1&&[\"h\"]||hours<thresholds.h&&[\"hh\",hours]||days<=1&&[\"d\"]||days<thresholds.d&&[\"dd\",days]||months<=1&&[\"M\"]||months<thresholds.M&&[\"MM\",months]||years<=1&&[\"y\"]||[\"yy\",years];a[2]=withoutSuffix;a[3]=+posNegDuration>0;a[4]=locale;return substituteTimeAgo.apply(null,a)}function getSetRelativeTimeRounding(roundingFunction){if(roundingFunction===undefined){return round}if(typeof roundingFunction===\"function\"){round=roundingFunction;return true}return false}function getSetRelativeTimeThreshold(threshold,limit){if(thresholds[threshold]===undefined){return false}if(limit===undefined){return thresholds[threshold]}thresholds[threshold]=limit;if(threshold===\"s\"){thresholds.ss=limit-1}return true}function humanize(withSuffix){if(!this.isValid()){return this.localeData().invalidDate()}var locale=this.localeData();var output=relativeTime$1(this,!withSuffix,locale);if(withSuffix){output=locale.pastFuture(+this,output)}return locale.postformat(output)}var abs$1=Math.abs;function sign(x){return(x>0)-(x<0)||+x}function toISOString$1(){if(!this.isValid()){return this.localeData().invalidDate()}var seconds=abs$1(this._milliseconds)/1e3;var days=abs$1(this._days);var months=abs$1(this._months);var minutes,hours,years;minutes=absFloor(seconds/60);hours=absFloor(minutes/60);seconds%=60;minutes%=60;years=absFloor(months/12);months%=12;var Y=years;var M=months;var D=days;var h=hours;var m=minutes;var s=seconds?seconds.toFixed(3).replace(/\\.?0+$/,\"\"):\"\";var total=this.asSeconds();if(!total){return\"P0D\"}var totalSign=total<0?\"-\":\"\";var ymSign=sign(this._months)!==sign(total)?\"-\":\"\";var daysSign=sign(this._days)!==sign(total)?\"-\":\"\";var hmsSign=sign(this._milliseconds)!==sign(total)?\"-\":\"\";return totalSign+\"P\"+(Y?ymSign+Y+\"Y\":\"\")+(M?ymSign+M+\"M\":\"\")+(D?daysSign+D+\"D\":\"\")+(h||m||s?\"T\":\"\")+(h?hmsSign+h+\"H\":\"\")+(m?hmsSign+m+\"M\":\"\")+(s?hmsSign+s+\"S\":\"\")}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs;proto$2.add=add$1;proto$2.subtract=subtract$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1;proto$2.get=get$2;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.toIsoString=deprecate(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",toISOString$1);proto$2.lang=lang;addFormatToken(\"X\",0,0,\"unix\");addFormatToken(\"x\",0,0,\"valueOf\");addRegexToken(\"x\",matchSigned);addRegexToken(\"X\",matchTimestamp);addParseToken(\"X\",function(input,array,config){config._d=new Date(parseFloat(input,10)*1e3)});addParseToken(\"x\",function(input,array,config){config._d=new Date(toInt(input))});hooks.version=\"2.19.3\";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;hooks.defineLocale(\"af\",{months:\"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember\".split(\"_\"),monthsShort:\"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des\".split(\"_\"),weekdays:\"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag\".split(\"_\"),weekdaysShort:\"Son_Maa_Din_Woe_Don_Vry_Sat\".split(\"_\"),weekdaysMin:\"So_Ma_Di_Wo_Do_Vr_Sa\".split(\"_\"),meridiemParse:/vm|nm/i,isPM:function(input){return/^nm$/i.test(input)},meridiem:function(hours,minutes,isLower){if(hours<12){return isLower?\"vm\":\"VM\"}else{return isLower?\"nm\":\"NM\"}},longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Vandag om] LT\",nextDay:\"[Môre om] LT\",nextWeek:\"dddd [om] LT\",lastDay:\"[Gister om] LT\",lastWeek:\"[Laas] dddd [om] LT\",sameElse:\"L\"},relativeTime:{future:\"oor %s\",past:\"%s gelede\",s:\"'n paar sekondes\",m:\"'n minuut\",mm:\"%d minute\",h:\"'n uur\",hh:\"%d ure\",d:\"'n dag\",dd:\"%d dae\",M:\"'n maand\",MM:\"%d maande\",y:\"'n jaar\",yy:\"%d jaar\"},dayOfMonthOrdinalParse:/\\d{1,2}(ste|de)/,ordinal:function(number){return number+(number===1||number===8||number>=20?\"ste\":\"de\")},week:{dow:1,doy:4}});hooks.defineLocale(\"ar-dz\",{months:\"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),monthsShort:\"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),weekdays:\"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"أح_إث_ثلا_أر_خم_جم_سب\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[اليوم على الساعة] LT\",nextDay:\"[غدا على الساعة] LT\",nextWeek:\"dddd [على الساعة] LT\",lastDay:\"[أمس على الساعة] LT\",lastWeek:\"dddd [على الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"في %s\",past:\"منذ %s\",s:\"ثوان\",m:\"دقيقة\",mm:\"%d دقائق\",h:\"ساعة\",hh:\"%d ساعات\",d:\"يوم\",dd:\"%d أيام\",M:\"شهر\",MM:\"%d أشهر\",y:\"سنة\",yy:\"%d سنوات\"},week:{dow:0,doy:4}});hooks.defineLocale(\"ar-kw\",{months:\"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر\".split(\"_\"),monthsShort:\"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر\".split(\"_\"),weekdays:\"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[اليوم على الساعة] LT\",nextDay:\"[غدا على الساعة] LT\",nextWeek:\"dddd [على الساعة] LT\",lastDay:\"[أمس على الساعة] LT\",lastWeek:\"dddd [على الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"في %s\",past:\"منذ %s\",s:\"ثوان\",m:\"دقيقة\",mm:\"%d دقائق\",h:\"ساعة\",hh:\"%d ساعات\",d:\"يوم\",dd:\"%d أيام\",M:\"شهر\",MM:\"%d أشهر\",y:\"سنة\",yy:\"%d سنوات\"},week:{dow:0,doy:12}});var symbolMap={1:\"1\",2:\"2\",3:\"3\",4:\"4\",5:\"5\",6:\"6\",7:\"7\",8:\"8\",9:\"9\",0:\"0\"};var pluralForm=function(n){return n===0?0:n===1?1:n===2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5};var plurals={s:[\"أقل من ثانية\",\"ثانية واحدة\",[\"ثانيتان\",\"ثانيتين\"],\"%d ثوان\",\"%d ثانية\",\"%d ثانية\"],m:[\"أقل من دقيقة\",\"دقيقة واحدة\",[\"دقيقتان\",\"دقيقتين\"],\"%d دقائق\",\"%d دقيقة\",\"%d دقيقة\"],h:[\"أقل من ساعة\",\"ساعة واحدة\",[\"ساعتان\",\"ساعتين\"],\"%d ساعات\",\"%d ساعة\",\"%d ساعة\"],d:[\"أقل من يوم\",\"يوم واحد\",[\"يومان\",\"يومين\"],\"%d أيام\",\"%d يومًا\",\"%d يوم\"],M:[\"أقل من شهر\",\"شهر واحد\",[\"شهران\",\"شهرين\"],\"%d أشهر\",\"%d شهرا\",\"%d شهر\"],y:[\"أقل من عام\",\"عام واحد\",[\"عامان\",\"عامين\"],\"%d أعوام\",\"%d عامًا\",\"%d عام\"]};var pluralize=function(u){return function(number,withoutSuffix,string,isFuture){var f=pluralForm(number),str=plurals[u][pluralForm(number)];if(f===2){str=str[withoutSuffix?0:1]}return str.replace(/%d/i,number)}};var months$1=[\"يناير\",\"فبراير\",\"مارس\",\"أبريل\",\"مايو\",\"يونيو\",\"يوليو\",\"أغسطس\",\"سبتمبر\",\"أكتوبر\",\"نوفمبر\",\"ديسمبر\"];hooks.defineLocale(\"ar-ly\",{months:months$1,monthsShort:months$1,weekdays:\"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"D/‏M/‏YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},meridiemParse:/ص|م/,isPM:function(input){return\"م\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"ص\"}else{return\"م\"}},calendar:{sameDay:\"[اليوم عند الساعة] LT\",nextDay:\"[غدًا عند الساعة] LT\",nextWeek:\"dddd [عند الساعة] LT\",lastDay:\"[أمس عند الساعة] LT\",lastWeek:\"dddd [عند الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"بعد %s\",past:\"منذ %s\",s:pluralize(\"s\"),m:pluralize(\"m\"),mm:pluralize(\"m\"),h:pluralize(\"h\"),hh:pluralize(\"h\"),d:pluralize(\"d\"),dd:pluralize(\"d\"),M:pluralize(\"M\"),MM:pluralize(\"M\"),y:pluralize(\"y\"),yy:pluralize(\"y\")},preparse:function(string){return string.replace(/،/g,\",\")},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap[match]}).replace(/,/g,\"،\")},week:{dow:6,doy:12}});hooks.defineLocale(\"ar-ma\",{months:\"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر\".split(\"_\"),monthsShort:\"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر\".split(\"_\"),weekdays:\"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[اليوم على الساعة] LT\",nextDay:\"[غدا على الساعة] LT\",nextWeek:\"dddd [على الساعة] LT\",lastDay:\"[أمس على الساعة] LT\",lastWeek:\"dddd [على الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"في %s\",past:\"منذ %s\",s:\"ثوان\",m:\"دقيقة\",mm:\"%d دقائق\",h:\"ساعة\",hh:\"%d ساعات\",d:\"يوم\",dd:\"%d أيام\",M:\"شهر\",MM:\"%d أشهر\",y:\"سنة\",yy:\"%d سنوات\"},week:{dow:6,doy:12}});var symbolMap$1={1:\"١\",2:\"٢\",3:\"٣\",4:\"٤\",5:\"٥\",6:\"٦\",7:\"٧\",8:\"٨\",9:\"٩\",0:\"٠\"};var numberMap={\"١\":\"1\",\"٢\":\"2\",\"٣\":\"3\",\"٤\":\"4\",\"٥\":\"5\",\"٦\":\"6\",\"٧\":\"7\",\"٨\":\"8\",\"٩\":\"9\",\"٠\":\"0\"};hooks.defineLocale(\"ar-sa\",{months:\"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),monthsShort:\"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),weekdays:\"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},meridiemParse:/ص|م/,isPM:function(input){return\"م\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"ص\"}else{return\"م\"}},calendar:{sameDay:\"[اليوم على الساعة] LT\",nextDay:\"[غدا على الساعة] LT\",nextWeek:\"dddd [على الساعة] LT\",lastDay:\"[أمس على الساعة] LT\",lastWeek:\"dddd [على الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"في %s\",past:\"منذ %s\",s:\"ثوان\",m:\"دقيقة\",mm:\"%d دقائق\",h:\"ساعة\",hh:\"%d ساعات\",d:\"يوم\",dd:\"%d أيام\",M:\"شهر\",MM:\"%d أشهر\",y:\"سنة\",yy:\"%d سنوات\"},preparse:function(string){return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(match){return numberMap[match]}).replace(/،/g,\",\")},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$1[match]}).replace(/,/g,\"،\")},week:{dow:0,doy:6}});hooks.defineLocale(\"ar-tn\",{months:\"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),monthsShort:\"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر\".split(\"_\"),weekdays:\"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[اليوم على الساعة] LT\",nextDay:\"[غدا على الساعة] LT\",nextWeek:\"dddd [على الساعة] LT\",lastDay:\"[أمس على الساعة] LT\",lastWeek:\"dddd [على الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"في %s\",past:\"منذ %s\",s:\"ثوان\",m:\"دقيقة\",mm:\"%d دقائق\",h:\"ساعة\",hh:\"%d ساعات\",d:\"يوم\",dd:\"%d أيام\",M:\"شهر\",MM:\"%d أشهر\",y:\"سنة\",yy:\"%d سنوات\"},week:{dow:1,doy:4}});var symbolMap$2={1:\"١\",2:\"٢\",3:\"٣\",4:\"٤\",5:\"٥\",6:\"٦\",7:\"٧\",8:\"٨\",9:\"٩\",0:\"٠\"};var numberMap$1={\"١\":\"1\",\"٢\":\"2\",\"٣\":\"3\",\"٤\":\"4\",\"٥\":\"5\",\"٦\":\"6\",\"٧\":\"7\",\"٨\":\"8\",\"٩\":\"9\",\"٠\":\"0\"};var pluralForm$1=function(n){return n===0?0:n===1?1:n===2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5};var plurals$1={s:[\"أقل من ثانية\",\"ثانية واحدة\",[\"ثانيتان\",\"ثانيتين\"],\"%d ثوان\",\"%d ثانية\",\"%d ثانية\"],m:[\"أقل من دقيقة\",\"دقيقة واحدة\",[\"دقيقتان\",\"دقيقتين\"],\"%d دقائق\",\"%d دقيقة\",\"%d دقيقة\"],h:[\"أقل من ساعة\",\"ساعة واحدة\",[\"ساعتان\",\"ساعتين\"],\"%d ساعات\",\"%d ساعة\",\"%d ساعة\"],d:[\"أقل من يوم\",\"يوم واحد\",[\"يومان\",\"يومين\"],\"%d أيام\",\"%d يومًا\",\"%d يوم\"],M:[\"أقل من شهر\",\"شهر واحد\",[\"شهران\",\"شهرين\"],\"%d أشهر\",\"%d شهرا\",\"%d شهر\"],y:[\"أقل من عام\",\"عام واحد\",[\"عامان\",\"عامين\"],\"%d أعوام\",\"%d عامًا\",\"%d عام\"]};var pluralize$1=function(u){return function(number,withoutSuffix,string,isFuture){var f=pluralForm$1(number),str=plurals$1[u][pluralForm$1(number)];if(f===2){str=str[withoutSuffix?0:1]}return str.replace(/%d/i,number)}};var months$2=[\"كانون الثاني يناير\",\"شباط فبراير\",\"آذار مارس\",\"نيسان أبريل\",\"أيار مايو\",\"حزيران يونيو\",\"تموز يوليو\",\"آب أغسطس\",\"أيلول سبتمبر\",\"تشرين الأول أكتوبر\",\"تشرين الثاني نوفمبر\",\"كانون الأول ديسمبر\"];hooks.defineLocale(\"ar\",{months:months$2,monthsShort:months$2,weekdays:\"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت\".split(\"_\"),weekdaysShort:\"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت\".split(\"_\"),weekdaysMin:\"ح_ن_ث_ر_خ_ج_س\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"D/‏M/‏YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},meridiemParse:/ص|م/,isPM:function(input){return\"م\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"ص\"}else{return\"م\"}},calendar:{sameDay:\"[اليوم عند الساعة] LT\",nextDay:\"[غدًا عند الساعة] LT\",nextWeek:\"dddd [عند الساعة] LT\",lastDay:\"[أمس عند الساعة] LT\",lastWeek:\"dddd [عند الساعة] LT\",sameElse:\"L\"},relativeTime:{future:\"بعد %s\",past:\"منذ %s\",s:pluralize$1(\"s\"),m:pluralize$1(\"m\"),mm:pluralize$1(\"m\"),h:pluralize$1(\"h\"),hh:pluralize$1(\"h\"),d:pluralize$1(\"d\"),dd:pluralize$1(\"d\"),M:pluralize$1(\"M\"),MM:pluralize$1(\"M\"),y:pluralize$1(\"y\"),yy:pluralize$1(\"y\")},preparse:function(string){return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(match){return numberMap$1[match]}).replace(/،/g,\",\")},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$2[match]}).replace(/,/g,\"،\")},week:{dow:6,doy:12}});var suffixes={1:\"-inci\",5:\"-inci\",8:\"-inci\",70:\"-inci\",80:\"-inci\",2:\"-nci\",7:\"-nci\",20:\"-nci\",50:\"-nci\",3:\"-üncü\",4:\"-üncü\",100:\"-üncü\",6:\"-ncı\",9:\"-uncu\",10:\"-uncu\",30:\"-uncu\",60:\"-ıncı\",90:\"-ıncı\"};hooks.defineLocale(\"az\",{months:\"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr\".split(\"_\"),monthsShort:\"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek\".split(\"_\"),weekdays:\"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə\".split(\"_\"),weekdaysShort:\"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən\".split(\"_\"),weekdaysMin:\"Bz_BE_ÇA_Çə_CA_Cü_Şə\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[bugün saat] LT\",nextDay:\"[sabah saat] LT\",nextWeek:\"[gələn həftə] dddd [saat] LT\",lastDay:\"[dünən] LT\",lastWeek:\"[keçən həftə] dddd [saat] LT\",sameElse:\"L\"},relativeTime:{future:\"%s sonra\",past:\"%s əvvəl\",s:\"birneçə saniyyə\",m:\"bir dəqiqə\",mm:\"%d dəqiqə\",h:\"bir saat\",hh:\"%d saat\",d:\"bir gün\",dd:\"%d gün\",M:\"bir ay\",MM:\"%d ay\",y:\"bir il\",yy:\"%d il\"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(input){return/^(gündüz|axşam)$/.test(input)},\nmeridiem:function(hour,minute,isLower){if(hour<4){return\"gecə\"}else if(hour<12){return\"səhər\"}else if(hour<17){return\"gündüz\"}else{return\"axşam\"}},dayOfMonthOrdinalParse:/\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(number){if(number===0){return number+\"-ıncı\"}var a=number%10,b=number%100-a,c=number>=100?100:null;return number+(suffixes[a]||suffixes[b]||suffixes[c])},week:{dow:1,doy:7}});function plural(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}function relativeTimeWithPlural(number,withoutSuffix,key){var format={mm:withoutSuffix?\"хвіліна_хвіліны_хвілін\":\"хвіліну_хвіліны_хвілін\",hh:withoutSuffix?\"гадзіна_гадзіны_гадзін\":\"гадзіну_гадзіны_гадзін\",dd:\"дзень_дні_дзён\",MM:\"месяц_месяцы_месяцаў\",yy:\"год_гады_гадоў\"};if(key===\"m\"){return withoutSuffix?\"хвіліна\":\"хвіліну\"}else if(key===\"h\"){return withoutSuffix?\"гадзіна\":\"гадзіну\"}else{return number+\" \"+plural(format[key],+number)}}hooks.defineLocale(\"be\",{months:{format:\"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня\".split(\"_\"),standalone:\"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань\".split(\"_\")},monthsShort:\"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж\".split(\"_\"),weekdays:{format:\"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу\".split(\"_\"),standalone:\"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота\".split(\"_\"),isFormat:/\\[ ?[Вв] ?(?:мінулую|наступную)? ?\\] ?dddd/},weekdaysShort:\"нд_пн_ат_ср_чц_пт_сб\".split(\"_\"),weekdaysMin:\"нд_пн_ат_ср_чц_пт_сб\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY г.\",LLL:\"D MMMM YYYY г., HH:mm\",LLLL:\"dddd, D MMMM YYYY г., HH:mm\"},calendar:{sameDay:\"[Сёння ў] LT\",nextDay:\"[Заўтра ў] LT\",lastDay:\"[Учора ў] LT\",nextWeek:function(){return\"[У] dddd [ў] LT\"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return\"[У мінулую] dddd [ў] LT\";case 1:case 2:case 4:return\"[У мінулы] dddd [ў] LT\"}},sameElse:\"L\"},relativeTime:{future:\"праз %s\",past:\"%s таму\",s:\"некалькі секунд\",m:relativeTimeWithPlural,mm:relativeTimeWithPlural,h:relativeTimeWithPlural,hh:relativeTimeWithPlural,d:\"дзень\",dd:relativeTimeWithPlural,M:\"месяц\",MM:relativeTimeWithPlural,y:\"год\",yy:relativeTimeWithPlural},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(input){return/^(дня|вечара)$/.test(input)},meridiem:function(hour,minute,isLower){if(hour<4){return\"ночы\"}else if(hour<12){return\"раніцы\"}else if(hour<17){return\"дня\"}else{return\"вечара\"}},dayOfMonthOrdinalParse:/\\d{1,2}-(і|ы|га)/,ordinal:function(number,period){switch(period){case\"M\":case\"d\":case\"DDD\":case\"w\":case\"W\":return(number%10===2||number%10===3)&&(number%100!==12&&number%100!==13)?number+\"-і\":number+\"-ы\";case\"D\":return number+\"-га\";default:return number}},week:{dow:1,doy:7}});hooks.defineLocale(\"bg\",{months:\"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември\".split(\"_\"),monthsShort:\"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек\".split(\"_\"),weekdays:\"неделя_понеделник_вторник_сряда_четвъртък_петък_събота\".split(\"_\"),weekdaysShort:\"нед_пон_вто_сря_чет_пет_съб\".split(\"_\"),weekdaysMin:\"нд_пн_вт_ср_чт_пт_сб\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"D.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY H:mm\",LLLL:\"dddd, D MMMM YYYY H:mm\"},calendar:{sameDay:\"[Днес в] LT\",nextDay:\"[Утре в] LT\",nextWeek:\"dddd [в] LT\",lastDay:\"[Вчера в] LT\",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return\"[В изминалата] dddd [в] LT\";case 1:case 2:case 4:case 5:return\"[В изминалия] dddd [в] LT\"}},sameElse:\"L\"},relativeTime:{future:\"след %s\",past:\"преди %s\",s:\"няколко секунди\",m:\"минута\",mm:\"%d минути\",h:\"час\",hh:\"%d часа\",d:\"ден\",dd:\"%d дни\",M:\"месец\",MM:\"%d месеца\",y:\"година\",yy:\"%d години\"},dayOfMonthOrdinalParse:/\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(number){var lastDigit=number%10,last2Digits=number%100;if(number===0){return number+\"-ев\"}else if(last2Digits===0){return number+\"-ен\"}else if(last2Digits>10&&last2Digits<20){return number+\"-ти\"}else if(lastDigit===1){return number+\"-ви\"}else if(lastDigit===2){return number+\"-ри\"}else if(lastDigit===7||lastDigit===8){return number+\"-ми\"}else{return number+\"-ти\"}},week:{dow:1,doy:7}});hooks.defineLocale(\"bm\",{months:\"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo\".split(\"_\"),monthsShort:\"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des\".split(\"_\"),weekdays:\"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri\".split(\"_\"),weekdaysShort:\"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib\".split(\"_\"),weekdaysMin:\"Ka_Nt_Ta_Ar_Al_Ju_Si\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"MMMM [tile] D [san] YYYY\",LLL:\"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm\",LLLL:\"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm\"},calendar:{sameDay:\"[Bi lɛrɛ] LT\",nextDay:\"[Sini lɛrɛ] LT\",nextWeek:\"dddd [don lɛrɛ] LT\",lastDay:\"[Kunu lɛrɛ] LT\",lastWeek:\"dddd [tɛmɛnen lɛrɛ] LT\",sameElse:\"L\"},relativeTime:{future:\"%s kɔnɔ\",past:\"a bɛ %s bɔ\",s:\"sanga dama dama\",m:\"miniti kelen\",mm:\"miniti %d\",h:\"lɛrɛ kelen\",hh:\"lɛrɛ %d\",d:\"tile kelen\",dd:\"tile %d\",M:\"kalo kelen\",MM:\"kalo %d\",y:\"san kelen\",yy:\"san %d\"},week:{dow:1,doy:4}});var symbolMap$3={1:\"১\",2:\"২\",3:\"৩\",4:\"৪\",5:\"৫\",6:\"৬\",7:\"৭\",8:\"৮\",9:\"৯\",0:\"০\"};var numberMap$2={\"১\":\"1\",\"২\":\"2\",\"৩\":\"3\",\"৪\":\"4\",\"৫\":\"5\",\"৬\":\"6\",\"৭\":\"7\",\"৮\":\"8\",\"৯\":\"9\",\"০\":\"0\"};hooks.defineLocale(\"bn\",{months:\"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর\".split(\"_\"),monthsShort:\"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে\".split(\"_\"),weekdays:\"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার\".split(\"_\"),weekdaysShort:\"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি\".split(\"_\"),weekdaysMin:\"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি\".split(\"_\"),longDateFormat:{LT:\"A h:mm সময়\",LTS:\"A h:mm:ss সময়\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm সময়\",LLLL:\"dddd, D MMMM YYYY, A h:mm সময়\"},calendar:{sameDay:\"[আজ] LT\",nextDay:\"[আগামীকাল] LT\",nextWeek:\"dddd, LT\",lastDay:\"[গতকাল] LT\",lastWeek:\"[গত] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s পরে\",past:\"%s আগে\",s:\"কয়েক সেকেন্ড\",m:\"এক মিনিট\",mm:\"%d মিনিট\",h:\"এক ঘন্টা\",hh:\"%d ঘন্টা\",d:\"এক দিন\",dd:\"%d দিন\",M:\"এক মাস\",MM:\"%d মাস\",y:\"এক বছর\",yy:\"%d বছর\"},preparse:function(string){return string.replace(/[১২৩৪৫৬৭৮৯০]/g,function(match){return numberMap$2[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$3[match]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"রাত\"&&hour>=4||meridiem===\"দুপুর\"&&hour<5||meridiem===\"বিকাল\"){return hour+12}else{return hour}},meridiem:function(hour,minute,isLower){if(hour<4){return\"রাত\"}else if(hour<10){return\"সকাল\"}else if(hour<17){return\"দুপুর\"}else if(hour<20){return\"বিকাল\"}else{return\"রাত\"}},week:{dow:0,doy:6}});var symbolMap$4={1:\"༡\",2:\"༢\",3:\"༣\",4:\"༤\",5:\"༥\",6:\"༦\",7:\"༧\",8:\"༨\",9:\"༩\",0:\"༠\"};var numberMap$3={\"༡\":\"1\",\"༢\":\"2\",\"༣\":\"3\",\"༤\":\"4\",\"༥\":\"5\",\"༦\":\"6\",\"༧\":\"7\",\"༨\":\"8\",\"༩\":\"9\",\"༠\":\"0\"};hooks.defineLocale(\"bo\",{months:\"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ\".split(\"_\"),monthsShort:\"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ\".split(\"_\"),weekdays:\"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་\".split(\"_\"),weekdaysShort:\"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་\".split(\"_\"),weekdaysMin:\"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་\".split(\"_\"),longDateFormat:{LT:\"A h:mm\",LTS:\"A h:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm\",LLLL:\"dddd, D MMMM YYYY, A h:mm\"},calendar:{sameDay:\"[དི་རིང] LT\",nextDay:\"[སང་ཉིན] LT\",nextWeek:\"[བདུན་ཕྲག་རྗེས་མ], LT\",lastDay:\"[ཁ་སང] LT\",lastWeek:\"[བདུན་ཕྲག་མཐའ་མ] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s ལ་\",past:\"%s སྔན་ལ\",s:\"ལམ་སང\",m:\"སྐར་མ་གཅིག\",mm:\"%d སྐར་མ\",h:\"ཆུ་ཚོད་གཅིག\",hh:\"%d ཆུ་ཚོད\",d:\"ཉིན་གཅིག\",dd:\"%d ཉིན་\",M:\"ཟླ་བ་གཅིག\",MM:\"%d ཟླ་བ\",y:\"ལོ་གཅིག\",yy:\"%d ལོ\"},preparse:function(string){return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(match){return numberMap$3[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$4[match]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"མཚན་མོ\"&&hour>=4||meridiem===\"ཉིན་གུང\"&&hour<5||meridiem===\"དགོང་དག\"){return hour+12}else{return hour}},meridiem:function(hour,minute,isLower){if(hour<4){return\"མཚན་མོ\"}else if(hour<10){return\"ཞོགས་ཀས\"}else if(hour<17){return\"ཉིན་གུང\"}else if(hour<20){return\"དགོང་དག\"}else{return\"མཚན་མོ\"}},week:{dow:0,doy:6}});function relativeTimeWithMutation(number,withoutSuffix,key){var format={mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"};return number+\" \"+mutation(format[key],number)}function specialMutationForYears(number){switch(lastNumber(number)){case 1:case 3:case 4:case 5:case 9:return number+\" bloaz\";default:return number+\" vloaz\"}}function lastNumber(number){if(number>9){return lastNumber(number%10)}return number}function mutation(text,number){if(number===2){return softMutation(text)}return text}function softMutation(text){var mutationTable={m:\"v\",b:\"v\",d:\"z\"};if(mutationTable[text.charAt(0)]===undefined){return text}return mutationTable[text.charAt(0)]+text.substring(1)}hooks.defineLocale(\"br\",{months:\"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu\".split(\"_\"),monthsShort:\"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker\".split(\"_\"),weekdays:\"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn\".split(\"_\"),weekdaysShort:\"Sul_Lun_Meu_Mer_Yao_Gwe_Sad\".split(\"_\"),weekdaysMin:\"Su_Lu_Me_Mer_Ya_Gw_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"h[e]mm A\",LTS:\"h[e]mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D [a viz] MMMM YYYY\",LLL:\"D [a viz] MMMM YYYY h[e]mm A\",LLLL:\"dddd, D [a viz] MMMM YYYY h[e]mm A\"},calendar:{sameDay:\"[Hiziv da] LT\",nextDay:\"[Warc'hoazh da] LT\",nextWeek:\"dddd [da] LT\",lastDay:\"[Dec'h da] LT\",lastWeek:\"dddd [paset da] LT\",sameElse:\"L\"},relativeTime:{future:\"a-benn %s\",past:\"%s 'zo\",s:\"un nebeud segondennoù\",m:\"ur vunutenn\",mm:relativeTimeWithMutation,h:\"un eur\",hh:\"%d eur\",d:\"un devezh\",dd:relativeTimeWithMutation,M:\"ur miz\",MM:relativeTimeWithMutation,y:\"ur bloaz\",yy:specialMutationForYears},dayOfMonthOrdinalParse:/\\d{1,2}(añ|vet)/,ordinal:function(number){var output=number===1?\"añ\":\"vet\";return number+output},week:{dow:1,doy:4}});function translate(number,withoutSuffix,key){var result=number+\" \";switch(key){case\"m\":return withoutSuffix?\"jedna minuta\":\"jedne minute\";case\"mm\":if(number===1){result+=\"minuta\"}else if(number===2||number===3||number===4){result+=\"minute\"}else{result+=\"minuta\"}return result;case\"h\":return withoutSuffix?\"jedan sat\":\"jednog sata\";case\"hh\":if(number===1){result+=\"sat\"}else if(number===2||number===3||number===4){result+=\"sata\"}else{result+=\"sati\"}return result;case\"dd\":if(number===1){result+=\"dan\"}else{result+=\"dana\"}return result;case\"MM\":if(number===1){result+=\"mjesec\"}else if(number===2||number===3||number===4){result+=\"mjeseca\"}else{result+=\"mjeseci\"}return result;case\"yy\":if(number===1){result+=\"godina\"}else if(number===2||number===3||number===4){result+=\"godine\"}else{result+=\"godina\"}return result}}hooks.defineLocale(\"bs\",{months:\"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar\".split(\"_\"),monthsShort:\"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota\".split(\"_\"),weekdaysShort:\"ned._pon._uto._sri._čet._pet._sub.\".split(\"_\"),weekdaysMin:\"ne_po_ut_sr_če_pe_su\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[danas u] LT\",nextDay:\"[sutra u] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[u] [nedjelju] [u] LT\";case 3:return\"[u] [srijedu] [u] LT\";case 6:return\"[u] [subotu] [u] LT\";case 1:case 2:case 4:case 5:return\"[u] dddd [u] LT\"}},lastDay:\"[jučer u] LT\",lastWeek:function(){switch(this.day()){case 0:case 3:return\"[prošlu] dddd [u] LT\";case 6:return\"[prošle] [subote] [u] LT\";case 1:case 2:case 4:case 5:return\"[prošli] dddd [u] LT\"}},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"prije %s\",s:\"par sekundi\",m:translate,mm:translate,h:translate,hh:translate,d:\"dan\",dd:translate,M:\"mjesec\",MM:translate,y:\"godinu\",yy:translate},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});hooks.defineLocale(\"ca\",{months:{standalone:\"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre\".split(\"_\"),format:\"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\"_\"),isFormat:/D[oD]?(\\s)+MMMM/},monthsShort:\"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.\".split(\"_\"),monthsParseExact:true,weekdays:\"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte\".split(\"_\"),weekdaysShort:\"dg._dl._dt._dc._dj._dv._ds.\".split(\"_\"),weekdaysMin:\"dg_dl_dt_dc_dj_dv_ds\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM [de] YYYY\",ll:\"D MMM YYYY\",LLL:\"D MMMM [de] YYYY [a les] H:mm\",lll:\"D MMM YYYY, H:mm\",LLLL:\"dddd D MMMM [de] YYYY [a les] H:mm\",llll:\"ddd D MMM YYYY, H:mm\"},calendar:{sameDay:function(){return\"[avui a \"+(this.hours()!==1?\"les\":\"la\")+\"] LT\"},nextDay:function(){return\"[demà a \"+(this.hours()!==1?\"les\":\"la\")+\"] LT\"},nextWeek:function(){return\"dddd [a \"+(this.hours()!==1?\"les\":\"la\")+\"] LT\"},lastDay:function(){return\"[ahir a \"+(this.hours()!==1?\"les\":\"la\")+\"] LT\"},lastWeek:function(){return\"[el] dddd [passat a \"+(this.hours()!==1?\"les\":\"la\")+\"] LT\"},sameElse:\"L\"},relativeTime:{future:\"d'aquí %s\",past:\"fa %s\",s:\"uns segons\",m:\"un minut\",mm:\"%d minuts\",h:\"una hora\",hh:\"%d hores\",d:\"un dia\",dd:\"%d dies\",M:\"un mes\",MM:\"%d mesos\",y:\"un any\",yy:\"%d anys\"},dayOfMonthOrdinalParse:/\\d{1,2}(r|n|t|è|a)/,ordinal:function(number,period){var output=number===1?\"r\":number===2?\"n\":number===3?\"r\":number===4?\"t\":\"è\";if(period===\"w\"||period===\"W\"){output=\"a\"}return number+output},week:{dow:1,doy:4}});var months$3=\"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec\".split(\"_\");var monthsShort=\"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro\".split(\"_\");function plural$1(n){return n>1&&n<5&&~~(n/10)!==1}function translate$1(number,withoutSuffix,key,isFuture){var result=number+\" \";switch(key){case\"s\":return withoutSuffix||isFuture?\"pár sekund\":\"pár sekundami\";case\"m\":return withoutSuffix?\"minuta\":isFuture?\"minutu\":\"minutou\";case\"mm\":if(withoutSuffix||isFuture){return result+(plural$1(number)?\"minuty\":\"minut\")}else{return result+\"minutami\"}break;case\"h\":return withoutSuffix?\"hodina\":isFuture?\"hodinu\":\"hodinou\";case\"hh\":if(withoutSuffix||isFuture){return result+(plural$1(number)?\"hodiny\":\"hodin\")}else{return result+\"hodinami\"}break;case\"d\":return withoutSuffix||isFuture?\"den\":\"dnem\";case\"dd\":if(withoutSuffix||isFuture){return result+(plural$1(number)?\"dny\":\"dní\")}else{return result+\"dny\"}break;case\"M\":return withoutSuffix||isFuture?\"měsíc\":\"měsícem\";case\"MM\":if(withoutSuffix||isFuture){return result+(plural$1(number)?\"měsíce\":\"měsíců\")}else{return result+\"měsíci\"}break;case\"y\":return withoutSuffix||isFuture?\"rok\":\"rokem\";case\"yy\":if(withoutSuffix||isFuture){return result+(plural$1(number)?\"roky\":\"let\")}else{return result+\"lety\"}break}}hooks.defineLocale(\"cs\",{months:months$3,monthsShort:monthsShort,monthsParse:function(months,monthsShort){var i,_monthsParse=[];for(i=0;i<12;i++){_monthsParse[i]=new RegExp(\"^\"+months[i]+\"$|^\"+monthsShort[i]+\"$\",\"i\")}return _monthsParse}(months$3,monthsShort),shortMonthsParse:function(monthsShort){var i,_shortMonthsParse=[];for(i=0;i<12;i++){_shortMonthsParse[i]=new RegExp(\"^\"+monthsShort[i]+\"$\",\"i\")}return _shortMonthsParse}(monthsShort),longMonthsParse:function(months){var i,_longMonthsParse=[];for(i=0;i<12;i++){_longMonthsParse[i]=new RegExp(\"^\"+months[i]+\"$\",\"i\")}return _longMonthsParse}(months$3),weekdays:\"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota\".split(\"_\"),weekdaysShort:\"ne_po_út_st_čt_pá_so\".split(\"_\"),weekdaysMin:\"ne_po_út_st_čt_pá_so\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd D. MMMM YYYY H:mm\",l:\"D. M. YYYY\"},calendar:{sameDay:\"[dnes v] LT\",nextDay:\"[zítra v] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[v neděli v] LT\";case 1:case 2:return\"[v] dddd [v] LT\";case 3:return\"[ve středu v] LT\";case 4:return\"[ve čtvrtek v] LT\";case 5:return\"[v pátek v] LT\";case 6:return\"[v sobotu v] LT\"}},lastDay:\"[včera v] LT\",lastWeek:function(){switch(this.day()){case 0:return\"[minulou neděli v] LT\";case 1:case 2:return\"[minulé] dddd [v] LT\";case 3:return\"[minulou středu v] LT\";case 4:case 5:return\"[minulý] dddd [v] LT\";case 6:return\"[minulou sobotu v] LT\"}},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"před %s\",s:translate$1,m:translate$1,mm:translate$1,h:translate$1,hh:translate$1,d:translate$1,dd:translate$1,M:translate$1,MM:translate$1,y:translate$1,yy:translate$1},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"cv\",{months:\"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав\".split(\"_\"),monthsShort:\"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш\".split(\"_\"),weekdays:\"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун\".split(\"_\"),weekdaysShort:\"выр_тун_ытл_юн_кӗҫ_эрн_шӑм\".split(\"_\"),weekdaysMin:\"вр_тн_ыт_юн_кҫ_эр_шм\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD-MM-YYYY\",LL:\"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]\",LLL:\"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm\",LLLL:\"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm\"},calendar:{sameDay:\"[Паян] LT [сехетре]\",nextDay:\"[Ыран] LT [сехетре]\",lastDay:\"[Ӗнер] LT [сехетре]\",nextWeek:\"[Ҫитес] dddd LT [сехетре]\",lastWeek:\"[Иртнӗ] dddd LT [сехетре]\",sameElse:\"L\"},relativeTime:{future:function(output){var affix=/сехет$/i.exec(output)?\"рен\":/ҫул$/i.exec(output)?\"тан\":\"ран\";return output+affix},past:\"%s каялла\",s:\"пӗр-ик ҫеккунт\",m:\"пӗр минут\",mm:\"%d минут\",h:\"пӗр сехет\",hh:\"%d сехет\",d:\"пӗр кун\",dd:\"%d кун\",M:\"пӗр уйӑх\",MM:\"%d уйӑх\",y:\"пӗр ҫул\",yy:\"%d ҫул\"},dayOfMonthOrdinalParse:/\\d{1,2}-мӗш/,ordinal:\"%d-мӗш\",week:{dow:1,doy:7}});hooks.defineLocale(\"cy\",{months:\"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr\".split(\"_\"),monthsShort:\"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag\".split(\"_\"),weekdays:\"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn\".split(\"_\"),weekdaysShort:\"Sul_Llun_Maw_Mer_Iau_Gwe_Sad\".split(\"_\"),weekdaysMin:\"Su_Ll_Ma_Me_Ia_Gw_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Heddiw am] LT\",nextDay:\"[Yfory am] LT\",nextWeek:\"dddd [am] LT\",lastDay:\"[Ddoe am] LT\",lastWeek:\"dddd [diwethaf am] LT\",sameElse:\"L\"},relativeTime:{future:\"mewn %s\",past:\"%s yn ôl\",s:\"ychydig eiliadau\",m:\"munud\",mm:\"%d munud\",h:\"awr\",hh:\"%d awr\",d:\"diwrnod\",dd:\"%d diwrnod\",M:\"mis\",MM:\"%d mis\",y:\"blwyddyn\",yy:\"%d flynedd\"},dayOfMonthOrdinalParse:/\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(number){var b=number,output=\"\",lookup=[\"\",\"af\",\"il\",\"ydd\",\"ydd\",\"ed\",\"ed\",\"ed\",\"fed\",\"fed\",\"fed\",\"eg\",\"fed\",\"eg\",\"eg\",\"fed\",\"eg\",\"eg\",\"fed\",\"eg\",\"fed\"];if(b>20){if(b===40||b===50||b===60||b===80||b===100){output=\"fed\"}else{output=\"ain\"}}else if(b>0){output=lookup[b]}return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"da\",{months:\"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec\".split(\"_\"),weekdays:\"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag\".split(\"_\"),weekdaysShort:\"søn_man_tir_ons_tor_fre_lør\".split(\"_\"),weekdaysMin:\"sø_ma_ti_on_to_fr_lø\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY HH:mm\",LLLL:\"dddd [d.] D. MMMM YYYY [kl.] HH:mm\"},calendar:{sameDay:\"[i dag kl.] LT\",nextDay:\"[i morgen kl.] LT\",nextWeek:\"på dddd [kl.] LT\",lastDay:\"[i går kl.] LT\",lastWeek:\"[i] dddd[s kl.] LT\",sameElse:\"L\"},relativeTime:{future:\"om %s\",past:\"%s siden\",s:\"få sekunder\",m:\"et minut\",mm:\"%d minutter\",h:\"en time\",hh:\"%d timer\",d:\"en dag\",dd:\"%d dage\",M:\"en måned\",MM:\"%d måneder\",y:\"et år\",yy:\"%d år\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});function processRelativeTime(number,withoutSuffix,key,isFuture){var format={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[number+\" Tage\",number+\" Tagen\"],M:[\"ein Monat\",\"einem Monat\"],MM:[number+\" Monate\",number+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[number+\" Jahre\",number+\" Jahren\"]};return withoutSuffix?format[key][0]:format[key][1]}hooks.defineLocale(\"de-at\",{months:\"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember\".split(\"_\"),monthsShort:\"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.\".split(\"_\"),monthsParseExact:true,weekdays:\"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag\".split(\"_\"),weekdaysShort:\"So._Mo._Di._Mi._Do._Fr._Sa.\".split(\"_\"),weekdaysMin:\"So_Mo_Di_Mi_Do_Fr_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY HH:mm\",LLLL:\"dddd, D. MMMM YYYY HH:mm\"},calendar:{sameDay:\"[heute um] LT [Uhr]\",sameElse:\"L\",nextDay:\"[morgen um] LT [Uhr]\",nextWeek:\"dddd [um] LT [Uhr]\",lastDay:\"[gestern um] LT [Uhr]\",lastWeek:\"[letzten] dddd [um] LT [Uhr]\"},relativeTime:{future:\"in %s\",past:\"vor %s\",s:\"ein paar Sekunden\",m:processRelativeTime,mm:\"%d Minuten\",h:processRelativeTime,hh:\"%d Stunden\",d:processRelativeTime,dd:processRelativeTime,M:processRelativeTime,MM:processRelativeTime,y:processRelativeTime,yy:processRelativeTime},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});function processRelativeTime$1(number,withoutSuffix,key,isFuture){var format={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[number+\" Tage\",number+\" Tagen\"],M:[\"ein Monat\",\"einem Monat\"],MM:[number+\" Monate\",number+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[number+\" Jahre\",number+\" Jahren\"]};return withoutSuffix?format[key][0]:format[key][1]}hooks.defineLocale(\"de-ch\",{months:\"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember\".split(\"_\"),monthsShort:\"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.\".split(\"_\"),monthsParseExact:true,weekdays:\"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag\".split(\"_\"),weekdaysShort:\"So_Mo_Di_Mi_Do_Fr_Sa\".split(\"_\"),weekdaysMin:\"So_Mo_Di_Mi_Do_Fr_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY HH.mm\",LLLL:\"dddd, D. MMMM YYYY HH.mm\"},calendar:{sameDay:\"[heute um] LT [Uhr]\",sameElse:\"L\",nextDay:\"[morgen um] LT [Uhr]\",nextWeek:\"dddd [um] LT [Uhr]\",lastDay:\"[gestern um] LT [Uhr]\",lastWeek:\"[letzten] dddd [um] LT [Uhr]\"},relativeTime:{future:\"in %s\",past:\"vor %s\",s:\"ein paar Sekunden\",m:processRelativeTime$1,mm:\"%d Minuten\",h:processRelativeTime$1,hh:\"%d Stunden\",d:processRelativeTime$1,dd:processRelativeTime$1,M:processRelativeTime$1,MM:processRelativeTime$1,y:processRelativeTime$1,yy:processRelativeTime$1},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});function processRelativeTime$2(number,withoutSuffix,key,isFuture){var format={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[number+\" Tage\",number+\" Tagen\"],M:[\"ein Monat\",\"einem Monat\"],MM:[number+\" Monate\",number+\" Monaten\"],y:[\"ein Jahr\",\"einem Jahr\"],yy:[number+\" Jahre\",number+\" Jahren\"]};return withoutSuffix?format[key][0]:format[key][1]}hooks.defineLocale(\"de\",{months:\"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember\".split(\"_\"),monthsShort:\"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.\".split(\"_\"),monthsParseExact:true,weekdays:\"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag\".split(\"_\"),weekdaysShort:\"So._Mo._Di._Mi._Do._Fr._Sa.\".split(\"_\"),weekdaysMin:\"So_Mo_Di_Mi_Do_Fr_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY HH:mm\",LLLL:\"dddd, D. MMMM YYYY HH:mm\"},calendar:{sameDay:\"[heute um] LT [Uhr]\",sameElse:\"L\",nextDay:\"[morgen um] LT [Uhr]\",nextWeek:\"dddd [um] LT [Uhr]\",lastDay:\"[gestern um] LT [Uhr]\",lastWeek:\"[letzten] dddd [um] LT [Uhr]\"},relativeTime:{future:\"in %s\",past:\"vor %s\",s:\"ein paar Sekunden\",m:processRelativeTime$2,mm:\"%d Minuten\",h:processRelativeTime$2,hh:\"%d Stunden\",d:processRelativeTime$2,dd:processRelativeTime$2,M:processRelativeTime$2,MM:processRelativeTime$2,y:processRelativeTime$2,yy:processRelativeTime$2},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var months$4=[\"ޖެނުއަރީ\",\"ފެބްރުއަރީ\",\"މާރިޗު\",\"އޭޕްރީލު\",\"މޭ\",\"ޖޫން\",\"ޖުލައި\",\"އޯގަސްޓު\",\"ސެޕްޓެމްބަރު\",\"އޮކްޓޯބަރު\",\"ނޮވެމްބަރު\",\"ޑިސެމްބަރު\"];var weekdays=[\"އާދިއްތަ\",\"ހޯމަ\",\"އަންގާރަ\",\"ބުދަ\",\"ބުރާސްފަތި\",\"ހުކުރު\",\"ހޮނިހިރު\"];hooks.defineLocale(\"dv\",{months:months$4,monthsShort:months$4,weekdays:weekdays,weekdaysShort:weekdays,weekdaysMin:\"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"D/M/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},meridiemParse:/މކ|މފ/,isPM:function(input){return\"މފ\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"މކ\"}else{return\"މފ\"}},calendar:{sameDay:\"[މިއަދު] LT\",nextDay:\"[މާދަމާ] LT\",nextWeek:\"dddd LT\",lastDay:\"[އިއްޔެ] LT\",lastWeek:\"[ފާއިތުވި] dddd LT\",sameElse:\"L\"},relativeTime:{future:\"ތެރޭގައި %s\",past:\"ކުރިން %s\",s:\"ސިކުންތުކޮޅެއް\",m:\"މިނިޓެއް\",mm:\"މިނިޓު %d\",h:\"ގަޑިއިރެއް\",hh:\"ގަޑިއިރު %d\",d:\"ދުވަހެއް\",dd:\"ދުވަސް %d\",M:\"މަހެއް\",MM:\"މަސް %d\",y:\"އަހަރެއް\",yy:\"އަހަރު %d\"},preparse:function(string){return string.replace(/،/g,\",\")},postformat:function(string){return string.replace(/,/g,\"،\")},week:{dow:7,doy:12}});hooks.defineLocale(\"el\",{monthsNominativeEl:\"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος\".split(\"_\"),monthsGenitiveEl:\"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου\".split(\"_\"),months:function(momentToFormat,format){if(!momentToFormat){return this._monthsNominativeEl}else if(typeof format===\"string\"&&/D/.test(format.substring(0,format.indexOf(\"MMMM\")))){return this._monthsGenitiveEl[momentToFormat.month()]}else{return this._monthsNominativeEl[momentToFormat.month()]}},monthsShort:\"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ\".split(\"_\"),weekdays:\"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο\".split(\"_\"),weekdaysShort:\"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ\".split(\"_\"),weekdaysMin:\"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα\".split(\"_\"),meridiem:function(hours,minutes,isLower){if(hours>11){return isLower?\"μμ\":\"ΜΜ\"}else{return isLower?\"πμ\":\"ΠΜ\"}},isPM:function(input){return(input+\"\").toLowerCase()[0]===\"μ\"},meridiemParse:/[ΠΜ]\\.?Μ?\\.?/i,longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendarEl:{sameDay:\"[Σήμερα {}] LT\",nextDay:\"[Αύριο {}] LT\",nextWeek:\"dddd [{}] LT\",lastDay:\"[Χθες {}] LT\",lastWeek:function(){switch(this.day()){case 6:return\"[το προηγούμενο] dddd [{}] LT\";default:return\"[την προηγούμενη] dddd [{}] LT\"}},sameElse:\"L\"},calendar:function(key,mom){var output=this._calendarEl[key],hours=mom&&mom.hours();if(isFunction(output)){output=output.apply(mom)}return output.replace(\"{}\",hours%12===1?\"στη\":\"στις\")},relativeTime:{future:\"σε %s\",past:\"%s πριν\",s:\"λίγα δευτερόλεπτα\",m:\"ένα λεπτό\",mm:\"%d λεπτά\",h:\"μία ώρα\",hh:\"%d ώρες\",d:\"μία μέρα\",dd:\"%d μέρες\",M:\"ένας μήνας\",MM:\"%d μήνες\",y:\"ένας χρόνος\",yy:\"%d χρόνια\"},dayOfMonthOrdinalParse:/\\d{1,2}η/,ordinal:\"%dη\",week:{dow:1,doy:4}});hooks.defineLocale(\"en-au\",{months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"en-ca\",{months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"YYYY-MM-DD\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output}});hooks.defineLocale(\"en-gb\",{months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"en-ie\",{months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),\nweekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD-MM-YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"en-nz\",{months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),weekdaysShort:\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),weekdaysMin:\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"eo\",{months:\"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec\".split(\"_\"),weekdays:\"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato\".split(\"_\"),weekdaysShort:\"dim_lun_mard_merk_ĵaŭ_ven_sab\".split(\"_\"),weekdaysMin:\"di_lu_ma_me_ĵa_ve_sa\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY-MM-DD\",LL:\"D[-a de] MMMM, YYYY\",LLL:\"D[-a de] MMMM, YYYY HH:mm\",LLLL:\"dddd, [la] D[-a de] MMMM, YYYY HH:mm\"},meridiemParse:/[ap]\\.t\\.m/i,isPM:function(input){return input.charAt(0).toLowerCase()===\"p\"},meridiem:function(hours,minutes,isLower){if(hours>11){return isLower?\"p.t.m.\":\"P.T.M.\"}else{return isLower?\"a.t.m.\":\"A.T.M.\"}},calendar:{sameDay:\"[Hodiaŭ je] LT\",nextDay:\"[Morgaŭ je] LT\",nextWeek:\"dddd [je] LT\",lastDay:\"[Hieraŭ je] LT\",lastWeek:\"[pasinta] dddd [je] LT\",sameElse:\"L\"},relativeTime:{future:\"post %s\",past:\"antaŭ %s\",s:\"sekundoj\",m:\"minuto\",mm:\"%d minutoj\",h:\"horo\",hh:\"%d horoj\",d:\"tago\",dd:\"%d tagoj\",M:\"monato\",MM:\"%d monatoj\",y:\"jaro\",yy:\"%d jaroj\"},dayOfMonthOrdinalParse:/\\d{1,2}a/,ordinal:\"%da\",week:{dow:1,doy:7}});var monthsShortDot=\"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.\".split(\"_\");var monthsShort$1=\"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic\".split(\"_\");var monthsParse=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i];var monthsRegex$1=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;hooks.defineLocale(\"es-do\",{months:\"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortDot}else if(/-MMM-/.test(format)){return monthsShort$1[m.month()]}else{return monthsShortDot[m.month()]}},monthsRegex:monthsRegex$1,monthsShortRegex:monthsRegex$1,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,monthsParse:monthsParse,longMonthsParse:monthsParse,shortMonthsParse:monthsParse,weekdays:\"domingo_lunes_martes_miércoles_jueves_viernes_sábado\".split(\"_\"),weekdaysShort:\"dom._lun._mar._mié._jue._vie._sáb.\".split(\"_\"),weekdaysMin:\"do_lu_ma_mi_ju_vi_sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY h:mm A\",LLLL:\"dddd, D [de] MMMM [de] YYYY h:mm A\"},calendar:{sameDay:function(){return\"[hoy a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextDay:function(){return\"[mañana a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextWeek:function(){return\"dddd [a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastDay:function(){return\"[ayer a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastWeek:function(){return\"[el] dddd [pasado a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},sameElse:\"L\"},relativeTime:{future:\"en %s\",past:\"hace %s\",s:\"unos segundos\",m:\"un minuto\",mm:\"%d minutos\",h:\"una hora\",hh:\"%d horas\",d:\"un día\",dd:\"%d días\",M:\"un mes\",MM:\"%d meses\",y:\"un año\",yy:\"%d años\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});var monthsShortDot$1=\"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.\".split(\"_\");var monthsShort$2=\"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic\".split(\"_\");hooks.defineLocale(\"es-us\",{months:\"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortDot$1}else if(/-MMM-/.test(format)){return monthsShort$2[m.month()]}else{return monthsShortDot$1[m.month()]}},monthsParseExact:true,weekdays:\"domingo_lunes_martes_miércoles_jueves_viernes_sábado\".split(\"_\"),weekdaysShort:\"dom._lun._mar._mié._jue._vie._sáb.\".split(\"_\"),weekdaysMin:\"do_lu_ma_mi_ju_vi_sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"MM/DD/YYYY\",LL:\"MMMM [de] D [de] YYYY\",LLL:\"MMMM [de] D [de] YYYY H:mm\",LLLL:\"dddd, MMMM [de] D [de] YYYY H:mm\"},calendar:{sameDay:function(){return\"[hoy a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextDay:function(){return\"[mañana a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextWeek:function(){return\"dddd [a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastDay:function(){return\"[ayer a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastWeek:function(){return\"[el] dddd [pasado a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},sameElse:\"L\"},relativeTime:{future:\"en %s\",past:\"hace %s\",s:\"unos segundos\",m:\"un minuto\",mm:\"%d minutos\",h:\"una hora\",hh:\"%d horas\",d:\"un día\",dd:\"%d días\",M:\"un mes\",MM:\"%d meses\",y:\"un año\",yy:\"%d años\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:0,doy:6}});var monthsShortDot$2=\"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.\".split(\"_\");var monthsShort$3=\"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic\".split(\"_\");var monthsParse$1=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i];var monthsRegex$2=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;hooks.defineLocale(\"es\",{months:\"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortDot$2}else if(/-MMM-/.test(format)){return monthsShort$3[m.month()]}else{return monthsShortDot$2[m.month()]}},monthsRegex:monthsRegex$2,monthsShortRegex:monthsRegex$2,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,monthsParse:monthsParse$1,longMonthsParse:monthsParse$1,shortMonthsParse:monthsParse$1,weekdays:\"domingo_lunes_martes_miércoles_jueves_viernes_sábado\".split(\"_\"),weekdaysShort:\"dom._lun._mar._mié._jue._vie._sáb.\".split(\"_\"),weekdaysMin:\"do_lu_ma_mi_ju_vi_sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY H:mm\",LLLL:\"dddd, D [de] MMMM [de] YYYY H:mm\"},calendar:{sameDay:function(){return\"[hoy a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextDay:function(){return\"[mañana a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},nextWeek:function(){return\"dddd [a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastDay:function(){return\"[ayer a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},lastWeek:function(){return\"[el] dddd [pasado a la\"+(this.hours()!==1?\"s\":\"\")+\"] LT\"},sameElse:\"L\"},relativeTime:{future:\"en %s\",past:\"hace %s\",s:\"unos segundos\",m:\"un minuto\",mm:\"%d minutos\",h:\"una hora\",hh:\"%d horas\",d:\"un día\",dd:\"%d días\",M:\"un mes\",MM:\"%d meses\",y:\"un año\",yy:\"%d años\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});function processRelativeTime$3(number,withoutSuffix,key,isFuture){var format={s:[\"mõne sekundi\",\"mõni sekund\",\"paar sekundit\"],m:[\"ühe minuti\",\"üks minut\"],mm:[number+\" minuti\",number+\" minutit\"],h:[\"ühe tunni\",\"tund aega\",\"üks tund\"],hh:[number+\" tunni\",number+\" tundi\"],d:[\"ühe päeva\",\"üks päev\"],M:[\"kuu aja\",\"kuu aega\",\"üks kuu\"],MM:[number+\" kuu\",number+\" kuud\"],y:[\"ühe aasta\",\"aasta\",\"üks aasta\"],yy:[number+\" aasta\",number+\" aastat\"]};if(withoutSuffix){return format[key][2]?format[key][2]:format[key][1]}return isFuture?format[key][0]:format[key][1]}hooks.defineLocale(\"et\",{months:\"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember\".split(\"_\"),monthsShort:\"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets\".split(\"_\"),weekdays:\"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev\".split(\"_\"),weekdaysShort:\"P_E_T_K_N_R_L\".split(\"_\"),weekdaysMin:\"P_E_T_K_N_R_L\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[Täna,] LT\",nextDay:\"[Homme,] LT\",nextWeek:\"[Järgmine] dddd LT\",lastDay:\"[Eile,] LT\",lastWeek:\"[Eelmine] dddd LT\",sameElse:\"L\"},relativeTime:{future:\"%s pärast\",past:\"%s tagasi\",s:processRelativeTime$3,m:processRelativeTime$3,mm:processRelativeTime$3,h:processRelativeTime$3,hh:processRelativeTime$3,d:processRelativeTime$3,dd:\"%d päeva\",M:processRelativeTime$3,MM:processRelativeTime$3,y:processRelativeTime$3,yy:processRelativeTime$3},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"eu\",{months:\"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua\".split(\"_\"),monthsShort:\"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.\".split(\"_\"),monthsParseExact:true,weekdays:\"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata\".split(\"_\"),weekdaysShort:\"ig._al._ar._az._og._ol._lr.\".split(\"_\"),weekdaysMin:\"ig_al_ar_az_og_ol_lr\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY-MM-DD\",LL:\"YYYY[ko] MMMM[ren] D[a]\",LLL:\"YYYY[ko] MMMM[ren] D[a] HH:mm\",LLLL:\"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm\",l:\"YYYY-M-D\",ll:\"YYYY[ko] MMM D[a]\",lll:\"YYYY[ko] MMM D[a] HH:mm\",llll:\"ddd, YYYY[ko] MMM D[a] HH:mm\"},calendar:{sameDay:\"[gaur] LT[etan]\",nextDay:\"[bihar] LT[etan]\",nextWeek:\"dddd LT[etan]\",lastDay:\"[atzo] LT[etan]\",lastWeek:\"[aurreko] dddd LT[etan]\",sameElse:\"L\"},relativeTime:{future:\"%s barru\",past:\"duela %s\",s:\"segundo batzuk\",m:\"minutu bat\",mm:\"%d minutu\",h:\"ordu bat\",hh:\"%d ordu\",d:\"egun bat\",dd:\"%d egun\",M:\"hilabete bat\",MM:\"%d hilabete\",y:\"urte bat\",yy:\"%d urte\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});var symbolMap$5={1:\"۱\",2:\"۲\",3:\"۳\",4:\"۴\",5:\"۵\",6:\"۶\",7:\"۷\",8:\"۸\",9:\"۹\",0:\"۰\"};var numberMap$4={\"۱\":\"1\",\"۲\":\"2\",\"۳\":\"3\",\"۴\":\"4\",\"۵\":\"5\",\"۶\":\"6\",\"۷\":\"7\",\"۸\":\"8\",\"۹\":\"9\",\"۰\":\"0\"};hooks.defineLocale(\"fa\",{months:\"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر\".split(\"_\"),monthsShort:\"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر\".split(\"_\"),weekdays:\"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه\".split(\"_\"),weekdaysShort:\"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه\".split(\"_\"),weekdaysMin:\"ی_د_س_چ_پ_ج_ش\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(input){return/بعد از ظهر/.test(input)},meridiem:function(hour,minute,isLower){if(hour<12){return\"قبل از ظهر\"}else{return\"بعد از ظهر\"}},calendar:{sameDay:\"[امروز ساعت] LT\",nextDay:\"[فردا ساعت] LT\",nextWeek:\"dddd [ساعت] LT\",lastDay:\"[دیروز ساعت] LT\",lastWeek:\"dddd [پیش] [ساعت] LT\",sameElse:\"L\"},relativeTime:{future:\"در %s\",past:\"%s پیش\",s:\"چند ثانیه\",m:\"یک دقیقه\",mm:\"%d دقیقه\",h:\"یک ساعت\",hh:\"%d ساعت\",d:\"یک روز\",dd:\"%d روز\",M:\"یک ماه\",MM:\"%d ماه\",y:\"یک سال\",yy:\"%d سال\"},preparse:function(string){return string.replace(/[۰-۹]/g,function(match){return numberMap$4[match]}).replace(/،/g,\",\")},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$5[match]}).replace(/,/g,\"،\")},dayOfMonthOrdinalParse:/\\d{1,2}م/,ordinal:\"%dم\",week:{dow:6,doy:12}});var numbersPast=\"nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän\".split(\" \");var numbersFuture=[\"nolla\",\"yhden\",\"kahden\",\"kolmen\",\"neljän\",\"viiden\",\"kuuden\",numbersPast[7],numbersPast[8],numbersPast[9]];function translate$2(number,withoutSuffix,key,isFuture){var result=\"\";switch(key){case\"s\":return isFuture?\"muutaman sekunnin\":\"muutama sekunti\";case\"m\":return isFuture?\"minuutin\":\"minuutti\";case\"mm\":result=isFuture?\"minuutin\":\"minuuttia\";break;case\"h\":return isFuture?\"tunnin\":\"tunti\";case\"hh\":result=isFuture?\"tunnin\":\"tuntia\";break;case\"d\":return isFuture?\"päivän\":\"päivä\";case\"dd\":result=isFuture?\"päivän\":\"päivää\";break;case\"M\":return isFuture?\"kuukauden\":\"kuukausi\";case\"MM\":result=isFuture?\"kuukauden\":\"kuukautta\";break;case\"y\":return isFuture?\"vuoden\":\"vuosi\";case\"yy\":result=isFuture?\"vuoden\":\"vuotta\";break}result=verbalNumber(number,isFuture)+\" \"+result;return result}function verbalNumber(number,isFuture){return number<10?isFuture?numbersFuture[number]:numbersPast[number]:number}hooks.defineLocale(\"fi\",{months:\"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu\".split(\"_\"),monthsShort:\"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu\".split(\"_\"),weekdays:\"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai\".split(\"_\"),weekdaysShort:\"su_ma_ti_ke_to_pe_la\".split(\"_\"),weekdaysMin:\"su_ma_ti_ke_to_pe_la\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD.MM.YYYY\",LL:\"Do MMMM[ta] YYYY\",LLL:\"Do MMMM[ta] YYYY, [klo] HH.mm\",LLLL:\"dddd, Do MMMM[ta] YYYY, [klo] HH.mm\",l:\"D.M.YYYY\",ll:\"Do MMM YYYY\",lll:\"Do MMM YYYY, [klo] HH.mm\",llll:\"ddd, Do MMM YYYY, [klo] HH.mm\"},calendar:{sameDay:\"[tänään] [klo] LT\",nextDay:\"[huomenna] [klo] LT\",nextWeek:\"dddd [klo] LT\",lastDay:\"[eilen] [klo] LT\",lastWeek:\"[viime] dddd[na] [klo] LT\",sameElse:\"L\"},relativeTime:{future:\"%s päästä\",past:\"%s sitten\",s:translate$2,m:translate$2,mm:translate$2,h:translate$2,hh:translate$2,d:translate$2,dd:translate$2,M:translate$2,MM:translate$2,y:translate$2,yy:translate$2},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"fo\",{months:\"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des\".split(\"_\"),weekdays:\"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur\".split(\"_\"),weekdaysShort:\"sun_mán_týs_mik_hós_frí_ley\".split(\"_\"),weekdaysMin:\"su_má_tý_mi_hó_fr_le\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D. MMMM, YYYY HH:mm\"},calendar:{sameDay:\"[Í dag kl.] LT\",nextDay:\"[Í morgin kl.] LT\",nextWeek:\"dddd [kl.] LT\",lastDay:\"[Í gjár kl.] LT\",lastWeek:\"[síðstu] dddd [kl] LT\",sameElse:\"L\"},relativeTime:{future:\"um %s\",past:\"%s síðani\",s:\"fá sekund\",m:\"ein minutt\",mm:\"%d minuttir\",h:\"ein tími\",hh:\"%d tímar\",d:\"ein dagur\",dd:\"%d dagar\",M:\"ein mánaði\",MM:\"%d mánaðir\",y:\"eitt ár\",yy:\"%d ár\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"fr-ca\",{months:\"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre\".split(\"_\"),monthsShort:\"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.\".split(\"_\"),monthsParseExact:true,weekdays:\"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi\".split(\"_\"),weekdaysShort:\"dim._lun._mar._mer._jeu._ven._sam.\".split(\"_\"),weekdaysMin:\"Di_Lu_Ma_Me_Je_Ve_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY-MM-DD\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Aujourd’hui à] LT\",nextDay:\"[Demain à] LT\",nextWeek:\"dddd [à] LT\",lastDay:\"[Hier à] LT\",lastWeek:\"dddd [dernier à] LT\",sameElse:\"L\"},relativeTime:{future:\"dans %s\",past:\"il y a %s\",s:\"quelques secondes\",m:\"une minute\",mm:\"%d minutes\",h:\"une heure\",hh:\"%d heures\",d:\"un jour\",dd:\"%d jours\",M:\"un mois\",MM:\"%d mois\",y:\"un an\",yy:\"%d ans\"},dayOfMonthOrdinalParse:/\\d{1,2}(er|e)/,ordinal:function(number,period){switch(period){default:case\"M\":case\"Q\":case\"D\":case\"DDD\":case\"d\":return number+(number===1?\"er\":\"e\");case\"w\":case\"W\":return number+(number===1?\"re\":\"e\")}}});hooks.defineLocale(\"fr-ch\",{months:\"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre\".split(\"_\"),monthsShort:\"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.\".split(\"_\"),monthsParseExact:true,weekdays:\"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi\".split(\"_\"),weekdaysShort:\"dim._lun._mar._mer._jeu._ven._sam.\".split(\"_\"),weekdaysMin:\"Di_Lu_Ma_Me_Je_Ve_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Aujourd’hui à] LT\",nextDay:\"[Demain à] LT\",nextWeek:\"dddd [à] LT\",lastDay:\"[Hier à] LT\",lastWeek:\"dddd [dernier à] LT\",sameElse:\"L\"},relativeTime:{future:\"dans %s\",past:\"il y a %s\",s:\"quelques secondes\",m:\"une minute\",mm:\"%d minutes\",h:\"une heure\",hh:\"%d heures\",d:\"un jour\",dd:\"%d jours\",M:\"un mois\",MM:\"%d mois\",y:\"un an\",yy:\"%d ans\"},dayOfMonthOrdinalParse:/\\d{1,2}(er|e)/,ordinal:function(number,period){switch(period){default:case\"M\":case\"Q\":case\"D\":case\"DDD\":case\"d\":return number+(number===1?\"er\":\"e\");case\"w\":case\"W\":return number+(number===1?\"re\":\"e\")}},week:{dow:1,doy:4}});hooks.defineLocale(\"fr\",{months:\"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre\".split(\"_\"),monthsShort:\"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.\".split(\"_\"),monthsParseExact:true,weekdays:\"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi\".split(\"_\"),weekdaysShort:\"dim._lun._mar._mer._jeu._ven._sam.\".split(\"_\"),weekdaysMin:\"Di_Lu_Ma_Me_Je_Ve_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Aujourd’hui à] LT\",nextDay:\"[Demain à] LT\",nextWeek:\"dddd [à] LT\",lastDay:\"[Hier à] LT\",lastWeek:\"dddd [dernier à] LT\",sameElse:\"L\"},relativeTime:{future:\"dans %s\",past:\"il y a %s\",s:\"quelques secondes\",m:\"une minute\",mm:\"%d minutes\",h:\"une heure\",hh:\"%d heures\",d:\"un jour\",dd:\"%d jours\",M:\"un mois\",MM:\"%d mois\",y:\"un an\",yy:\"%d ans\"},dayOfMonthOrdinalParse:/\\d{1,2}(er|)/,ordinal:function(number,period){switch(period){case\"D\":return number+(number===1?\"er\":\"\");default:case\"M\":case\"Q\":case\"DDD\":case\"d\":return number+(number===1?\"er\":\"e\");case\"w\":case\"W\":return number+(number===1?\"re\":\"e\")}},week:{dow:1,doy:4}});var monthsShortWithDots=\"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.\".split(\"_\");var monthsShortWithoutDots=\"jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des\".split(\"_\");hooks.defineLocale(\"fy\",{months:\"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortWithDots}else if(/-MMM-/.test(format)){return monthsShortWithoutDots[m.month()]}else{return monthsShortWithDots[m.month()]}},monthsParseExact:true,weekdays:\"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon\".split(\"_\"),weekdaysShort:\"si._mo._ti._wo._to._fr._so.\".split(\"_\"),weekdaysMin:\"Si_Mo_Ti_Wo_To_Fr_So\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD-MM-YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[hjoed om] LT\",nextDay:\"[moarn om] LT\",nextWeek:\"dddd [om] LT\",lastDay:\"[juster om] LT\",lastWeek:\"[ôfrûne] dddd [om] LT\",sameElse:\"L\"},relativeTime:{future:\"oer %s\",past:\"%s lyn\",s:\"in pear sekonden\",m:\"ien minút\",mm:\"%d minuten\",h:\"ien oere\",hh:\"%d oeren\",d:\"ien dei\",dd:\"%d dagen\",M:\"ien moanne\",MM:\"%d moannen\",y:\"ien jier\",yy:\"%d jierren\"},dayOfMonthOrdinalParse:/\\d{1,2}(ste|de)/,ordinal:function(number){return number+(number===1||number===8||number>=20?\"ste\":\"de\")},week:{dow:1,doy:4}});var months$5=[\"Am Faoilleach\",\"An Gearran\",\"Am Màrt\",\"An Giblean\",\"An Cèitean\",\"An t-Ògmhios\",\"An t-Iuchar\",\"An Lùnastal\",\"An t-Sultain\",\"An Dàmhair\",\"An t-Samhain\",\"An Dùbhlachd\"];var monthsShort$4=[\"Faoi\",\"Gear\",\"Màrt\",\"Gibl\",\"Cèit\",\"Ògmh\",\"Iuch\",\"Lùn\",\"Sult\",\"Dàmh\",\"Samh\",\"Dùbh\"];var weekdays$1=[\"Didòmhnaich\",\"Diluain\",\"Dimàirt\",\"Diciadain\",\"Diardaoin\",\"Dihaoine\",\"Disathairne\"];var weekdaysShort=[\"Did\",\"Dil\",\"Dim\",\"Dic\",\"Dia\",\"Dih\",\"Dis\"];var weekdaysMin=[\"Dò\",\"Lu\",\"Mà\",\"Ci\",\"Ar\",\"Ha\",\"Sa\"];hooks.defineLocale(\"gd\",{months:months$5,monthsShort:monthsShort$4,monthsParseExact:true,weekdays:weekdays$1,weekdaysShort:weekdaysShort,weekdaysMin:weekdaysMin,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[An-diugh aig] LT\",nextDay:\"[A-màireach aig] LT\",nextWeek:\"dddd [aig] LT\",lastDay:\"[An-dè aig] LT\",lastWeek:\"dddd [seo chaidh] [aig] LT\",sameElse:\"L\"},relativeTime:{future:\"ann an %s\",past:\"bho chionn %s\",s:\"beagan diogan\",m:\"mionaid\",mm:\"%d mionaidean\",h:\"uair\",hh:\"%d uairean\",d:\"latha\",dd:\"%d latha\",M:\"mìos\",MM:\"%d mìosan\",y:\"bliadhna\",yy:\"%d bliadhna\"},dayOfMonthOrdinalParse:/\\d{1,2}(d|na|mh)/,ordinal:function(number){var output=number===1?\"d\":number%10===2?\"na\":\"mh\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"gl\",{months:\"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro\".split(\"_\"),monthsShort:\"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"domingo_luns_martes_mércores_xoves_venres_sábado\".split(\"_\"),weekdaysShort:\"dom._lun._mar._mér._xov._ven._sáb.\".split(\"_\"),weekdaysMin:\"do_lu_ma_mé_xo_ve_sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY H:mm\",LLLL:\"dddd, D [de] MMMM [de] YYYY H:mm\"},calendar:{sameDay:function(){return\"[hoxe \"+(this.hours()!==1?\"ás\":\"á\")+\"] LT\"},nextDay:function(){return\"[mañá \"+(this.hours()!==1?\"ás\":\"á\")+\"] LT\"},nextWeek:function(){return\"dddd [\"+(this.hours()!==1?\"ás\":\"a\")+\"] LT\"},lastDay:function(){return\"[onte \"+(this.hours()!==1?\"á\":\"a\")+\"] LT\"},lastWeek:function(){return\"[o] dddd [pasado \"+(this.hours()!==1?\"ás\":\"a\")+\"] LT\"},sameElse:\"L\"},relativeTime:{future:function(str){if(str.indexOf(\"un\")===0){return\"n\"+str}return\"en \"+str},past:\"hai %s\",s:\"uns segundos\",m:\"un minuto\",mm:\"%d minutos\",h:\"unha hora\",hh:\"%d horas\",d:\"un día\",dd:\"%d días\",M:\"un mes\",MM:\"%d meses\",y:\"un ano\",yy:\"%d anos\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});function processRelativeTime$4(number,withoutSuffix,key,isFuture){var format={s:[\"thodde secondanim\",\"thodde second\"],m:[\"eka mintan\",\"ek minute\"],mm:[number+\" mintanim\",number+\" mintam\"],h:[\"eka horan\",\"ek hor\"],hh:[number+\" horanim\",number+\" hor\"],d:[\"eka disan\",\"ek dis\"],dd:[number+\" disanim\",number+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[number+\" mhoineanim\",number+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[number+\" vorsanim\",number+\" vorsam\"]};return withoutSuffix?format[key][0]:format[key][1]}hooks.defineLocale(\"gom-latn\",{months:\"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr\".split(\"_\"),monthsShort:\"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.\".split(\"_\"),monthsParseExact:true,weekdays:\"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var\".split(\"_\"),weekdaysShort:\"Ait._Som._Mon._Bud._Bre._Suk._Son.\".split(\"_\"),weekdaysMin:\"Ai_Sm_Mo_Bu_Br_Su_Sn\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"A h:mm [vazta]\",LTS:\"A h:mm:ss [vazta]\",L:\"DD-MM-YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY A h:mm [vazta]\",LLLL:\"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]\",llll:\"ddd, D MMM YYYY, A h:mm [vazta]\"},calendar:{sameDay:\"[Aiz] LT\",nextDay:\"[Faleam] LT\",nextWeek:\"[Ieta to] dddd[,] LT\",lastDay:\"[Kal] LT\",lastWeek:\"[Fatlo] dddd[,] LT\",sameElse:\"L\"},relativeTime:{future:\"%s\",past:\"%s adim\",s:processRelativeTime$4,m:processRelativeTime$4,mm:processRelativeTime$4,h:processRelativeTime$4,hh:processRelativeTime$4,d:processRelativeTime$4,dd:processRelativeTime$4,M:processRelativeTime$4,MM:processRelativeTime$4,y:processRelativeTime$4,yy:processRelativeTime$4},dayOfMonthOrdinalParse:/\\d{1,2}(er)/,ordinal:function(number,period){switch(period){case\"D\":return number+\"er\";default:case\"M\":case\"Q\":case\"DDD\":case\"d\":case\"w\":case\"W\":return number}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"rati\"){return hour<4?hour:hour+12}else if(meridiem===\"sokalli\"){return hour}else if(meridiem===\"donparam\"){return hour>12?hour:hour+12}else if(meridiem===\"sanje\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"rati\"}else if(hour<12){return\"sokalli\"}else if(hour<16){return\"donparam\"}else if(hour<20){return\"sanje\"}else{return\"rati\"}}});var symbolMap$6={1:\"૧\",2:\"૨\",3:\"૩\",4:\"૪\",5:\"૫\",6:\"૬\",7:\"૭\",8:\"૮\",9:\"૯\",0:\"૦\"};var numberMap$5={\"૧\":\"1\",\"૨\":\"2\",\"૩\":\"3\",\"૪\":\"4\",\"૫\":\"5\",\"૬\":\"6\",\"૭\":\"7\",\"૮\":\"8\",\"૯\":\"9\",\"૦\":\"0\"};hooks.defineLocale(\"gu\",{months:\"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર\".split(\"_\"),monthsShort:\"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.\".split(\"_\"),monthsParseExact:true,weekdays:\"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર\".split(\"_\"),weekdaysShort:\"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ\".split(\"_\"),weekdaysMin:\"ર_સો_મં_બુ_ગુ_શુ_શ\".split(\"_\"),longDateFormat:{LT:\"A h:mm વાગ્યે\",LTS:\"A h:mm:ss વાગ્યે\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm વાગ્યે\",LLLL:\"dddd, D MMMM YYYY, A h:mm વાગ્યે\"},calendar:{sameDay:\"[આજ] LT\",nextDay:\"[કાલે] LT\",nextWeek:\"dddd, LT\",lastDay:\"[ગઇકાલે] LT\",lastWeek:\"[પાછલા] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s મા\",past:\"%s પેહલા\",s:\"અમુક પળો\",m:\"એક મિનિટ\",mm:\"%d મિનિટ\",h:\"એક કલાક\",hh:\"%d કલાક\",d:\"એક દિવસ\",dd:\"%d દિવસ\",M:\"એક મહિનો\",MM:\"%d મહિનો\",y:\"એક વર્ષ\",yy:\"%d વર્ષ\"},preparse:function(string){return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(match){return numberMap$5[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$6[match]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"રાત\"){return hour<4?hour:hour+12}else if(meridiem===\"સવાર\"){return hour}else if(meridiem===\"બપોર\"){return hour>=10?hour:hour+12}else if(meridiem===\"સાંજ\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"રાત\"}else if(hour<10){return\"સવાર\"}else if(hour<17){return\"બપોર\"}else if(hour<20){return\"સાંજ\"}else{return\"રાત\"}},week:{dow:0,doy:6}});hooks.defineLocale(\"he\",{months:\"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר\".split(\"_\"),monthsShort:\"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳\".split(\"_\"),weekdays:\"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת\".split(\"_\"),weekdaysShort:\"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳\".split(\"_\"),weekdaysMin:\"א_ב_ג_ד_ה_ו_ש\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D [ב]MMMM YYYY\",LLL:\"D [ב]MMMM YYYY HH:mm\",LLLL:\"dddd, D [ב]MMMM YYYY HH:mm\",l:\"D/M/YYYY\",ll:\"D MMM YYYY\",lll:\"D MMM YYYY HH:mm\",llll:\"ddd, D MMM YYYY HH:mm\"},calendar:{sameDay:\"[היום ב־]LT\",nextDay:\"[מחר ב־]LT\",nextWeek:\"dddd [בשעה] LT\",lastDay:\"[אתמול ב־]LT\",lastWeek:\"[ביום] dddd [האחרון בשעה] LT\",sameElse:\"L\"},relativeTime:{future:\"בעוד %s\",past:\"לפני %s\",s:\"מספר שניות\",m:\"דקה\",mm:\"%d דקות\",h:\"שעה\",hh:function(number){if(number===2){return\"שעתיים\"}return number+\" שעות\"},d:\"יום\",dd:function(number){if(number===2){return\"יומיים\"}return number+\" ימים\"},M:\"חודש\",MM:function(number){if(number===2){return\"חודשיים\"}return number+\" חודשים\"},y:\"שנה\",yy:function(number){if(number===2){return\"שנתיים\"}else if(number%10===0&&number!==10){return number+\" שנה\"}return number+\" שנים\"}},meridiemParse:/אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(input){return/^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input)},meridiem:function(hour,minute,isLower){if(hour<5){return\"לפנות בוקר\"}else if(hour<10){return\"בבוקר\"}else if(hour<12){return isLower?'לפנה\"צ':\"לפני הצהריים\"}else if(hour<18){return isLower?'אחה\"צ':\"אחרי הצהריים\"}else{return\"בערב\"}}});var symbolMap$7={1:\"१\",2:\"२\",3:\"३\",4:\"४\",5:\"५\",6:\"६\",7:\"७\",8:\"८\",9:\"९\",0:\"०\"};var numberMap$6={\"१\":\"1\",\"२\":\"2\",\"३\":\"3\",\"४\":\"4\",\"५\":\"5\",\"६\":\"6\",\"७\":\"7\",\"८\":\"8\",\"९\":\"9\",\"०\":\"0\"};hooks.defineLocale(\"hi\",{months:\"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर\".split(\"_\"),monthsShort:\"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.\".split(\"_\"),monthsParseExact:true,weekdays:\"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार\".split(\"_\"),weekdaysShort:\"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि\".split(\"_\"),weekdaysMin:\"र_सो_मं_बु_गु_शु_श\".split(\"_\"),longDateFormat:{LT:\"A h:mm बजे\",LTS:\"A h:mm:ss बजे\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm बजे\",LLLL:\"dddd, D MMMM YYYY, A h:mm बजे\"},calendar:{sameDay:\"[आज] LT\",nextDay:\"[कल] LT\",nextWeek:\"dddd, LT\",lastDay:\"[कल] LT\",lastWeek:\"[पिछले] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s में\",past:\"%s पहले\",s:\"कुछ ही क्षण\",m:\"एक मिनट\",mm:\"%d मिनट\",h:\"एक घंटा\",hh:\"%d घंटे\",d:\"एक दिन\",dd:\"%d दिन\",M:\"एक महीने\",MM:\"%d महीने\",y:\"एक वर्ष\",yy:\"%d वर्ष\"},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap$6[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$7[match]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"रात\"){return hour<4?hour:hour+12}else if(meridiem===\"सुबह\"){return hour}else if(meridiem===\"दोपहर\"){return hour>=10?hour:hour+12}else if(meridiem===\"शाम\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"रात\"}else if(hour<10){return\"सुबह\"}else if(hour<17){return\"दोपहर\"}else if(hour<20){return\"शाम\"}else{return\"रात\"}},week:{dow:0,doy:6}});function translate$3(number,withoutSuffix,key){var result=number+\" \";switch(key){case\"m\":return withoutSuffix?\"jedna minuta\":\"jedne minute\";case\"mm\":if(number===1){result+=\"minuta\"}else if(number===2||number===3||number===4){result+=\"minute\"}else{result+=\"minuta\"}return result;case\"h\":return withoutSuffix?\"jedan sat\":\"jednog sata\";case\"hh\":if(number===1){result+=\"sat\"}else if(number===2||number===3||number===4){result+=\"sata\"}else{result+=\"sati\"}return result;case\"dd\":if(number===1){result+=\"dan\"}else{result+=\"dana\"}return result;case\"MM\":if(number===1){result+=\"mjesec\"}else if(number===2||number===3||number===4){\nresult+=\"mjeseca\"}else{result+=\"mjeseci\"}return result;case\"yy\":if(number===1){result+=\"godina\"}else if(number===2||number===3||number===4){result+=\"godine\"}else{result+=\"godina\"}return result}}hooks.defineLocale(\"hr\",{months:{format:\"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca\".split(\"_\"),standalone:\"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac\".split(\"_\")},monthsShort:\"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.\".split(\"_\"),monthsParseExact:true,weekdays:\"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota\".split(\"_\"),weekdaysShort:\"ned._pon._uto._sri._čet._pet._sub.\".split(\"_\"),weekdaysMin:\"ne_po_ut_sr_če_pe_su\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[danas u] LT\",nextDay:\"[sutra u] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[u] [nedjelju] [u] LT\";case 3:return\"[u] [srijedu] [u] LT\";case 6:return\"[u] [subotu] [u] LT\";case 1:case 2:case 4:case 5:return\"[u] dddd [u] LT\"}},lastDay:\"[jučer u] LT\",lastWeek:function(){switch(this.day()){case 0:case 3:return\"[prošlu] dddd [u] LT\";case 6:return\"[prošle] [subote] [u] LT\";case 1:case 2:case 4:case 5:return\"[prošli] dddd [u] LT\"}},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"prije %s\",s:\"par sekundi\",m:translate$3,mm:translate$3,h:translate$3,hh:translate$3,d:\"dan\",dd:translate$3,M:\"mjesec\",MM:translate$3,y:\"godinu\",yy:translate$3},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});var weekEndings=\"vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton\".split(\" \");function translate$4(number,withoutSuffix,key,isFuture){var num=number;switch(key){case\"s\":return isFuture||withoutSuffix?\"néhány másodperc\":\"néhány másodperce\";case\"m\":return\"egy\"+(isFuture||withoutSuffix?\" perc\":\" perce\");case\"mm\":return num+(isFuture||withoutSuffix?\" perc\":\" perce\");case\"h\":return\"egy\"+(isFuture||withoutSuffix?\" óra\":\" órája\");case\"hh\":return num+(isFuture||withoutSuffix?\" óra\":\" órája\");case\"d\":return\"egy\"+(isFuture||withoutSuffix?\" nap\":\" napja\");case\"dd\":return num+(isFuture||withoutSuffix?\" nap\":\" napja\");case\"M\":return\"egy\"+(isFuture||withoutSuffix?\" hónap\":\" hónapja\");case\"MM\":return num+(isFuture||withoutSuffix?\" hónap\":\" hónapja\");case\"y\":return\"egy\"+(isFuture||withoutSuffix?\" év\":\" éve\");case\"yy\":return num+(isFuture||withoutSuffix?\" év\":\" éve\")}return\"\"}function week(isFuture){return(isFuture?\"\":\"[múlt] \")+\"[\"+weekEndings[this.day()]+\"] LT[-kor]\"}hooks.defineLocale(\"hu\",{months:\"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december\".split(\"_\"),monthsShort:\"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec\".split(\"_\"),weekdays:\"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat\".split(\"_\"),weekdaysShort:\"vas_hét_kedd_sze_csüt_pén_szo\".split(\"_\"),weekdaysMin:\"v_h_k_sze_cs_p_szo\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"YYYY.MM.DD.\",LL:\"YYYY. MMMM D.\",LLL:\"YYYY. MMMM D. H:mm\",LLLL:\"YYYY. MMMM D., dddd H:mm\"},meridiemParse:/de|du/i,isPM:function(input){return input.charAt(1).toLowerCase()===\"u\"},meridiem:function(hours,minutes,isLower){if(hours<12){return isLower===true?\"de\":\"DE\"}else{return isLower===true?\"du\":\"DU\"}},calendar:{sameDay:\"[ma] LT[-kor]\",nextDay:\"[holnap] LT[-kor]\",nextWeek:function(){return week.call(this,true)},lastDay:\"[tegnap] LT[-kor]\",lastWeek:function(){return week.call(this,false)},sameElse:\"L\"},relativeTime:{future:\"%s múlva\",past:\"%s\",s:translate$4,m:translate$4,mm:translate$4,h:translate$4,hh:translate$4,d:translate$4,dd:translate$4,M:translate$4,MM:translate$4,y:translate$4,yy:translate$4},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"hy-am\",{months:{format:\"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի\".split(\"_\"),standalone:\"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր\".split(\"_\")},monthsShort:\"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ\".split(\"_\"),weekdays:\"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ\".split(\"_\"),weekdaysShort:\"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ\".split(\"_\"),weekdaysMin:\"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY թ.\",LLL:\"D MMMM YYYY թ., HH:mm\",LLLL:\"dddd, D MMMM YYYY թ., HH:mm\"},calendar:{sameDay:\"[այսօր] LT\",nextDay:\"[վաղը] LT\",lastDay:\"[երեկ] LT\",nextWeek:function(){return\"dddd [օրը ժամը] LT\"},lastWeek:function(){return\"[անցած] dddd [օրը ժամը] LT\"},sameElse:\"L\"},relativeTime:{future:\"%s հետո\",past:\"%s առաջ\",s:\"մի քանի վայրկյան\",m:\"րոպե\",mm:\"%d րոպե\",h:\"ժամ\",hh:\"%d ժամ\",d:\"օր\",dd:\"%d օր\",M:\"ամիս\",MM:\"%d ամիս\",y:\"տարի\",yy:\"%d տարի\"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(input){return/^(ցերեկվա|երեկոյան)$/.test(input)},meridiem:function(hour){if(hour<4){return\"գիշերվա\"}else if(hour<12){return\"առավոտվա\"}else if(hour<17){return\"ցերեկվա\"}else{return\"երեկոյան\"}},dayOfMonthOrdinalParse:/\\d{1,2}|\\d{1,2}-(ին|րդ)/,ordinal:function(number,period){switch(period){case\"DDD\":case\"w\":case\"W\":case\"DDDo\":if(number===1){return number+\"-ին\"}return number+\"-րդ\";default:return number}},week:{dow:1,doy:7}});hooks.defineLocale(\"id\",{months:\"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des\".split(\"_\"),weekdays:\"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu\".split(\"_\"),weekdaysShort:\"Min_Sen_Sel_Rab_Kam_Jum_Sab\".split(\"_\"),weekdaysMin:\"Mg_Sn_Sl_Rb_Km_Jm_Sb\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [pukul] HH.mm\",LLLL:\"dddd, D MMMM YYYY [pukul] HH.mm\"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"pagi\"){return hour}else if(meridiem===\"siang\"){return hour>=11?hour:hour+12}else if(meridiem===\"sore\"||meridiem===\"malam\"){return hour+12}},meridiem:function(hours,minutes,isLower){if(hours<11){return\"pagi\"}else if(hours<15){return\"siang\"}else if(hours<19){return\"sore\"}else{return\"malam\"}},calendar:{sameDay:\"[Hari ini pukul] LT\",nextDay:\"[Besok pukul] LT\",nextWeek:\"dddd [pukul] LT\",lastDay:\"[Kemarin pukul] LT\",lastWeek:\"dddd [lalu pukul] LT\",sameElse:\"L\"},relativeTime:{future:\"dalam %s\",past:\"%s yang lalu\",s:\"beberapa detik\",m:\"semenit\",mm:\"%d menit\",h:\"sejam\",hh:\"%d jam\",d:\"sehari\",dd:\"%d hari\",M:\"sebulan\",MM:\"%d bulan\",y:\"setahun\",yy:\"%d tahun\"},week:{dow:1,doy:7}});function plural$2(n){if(n%100===11){return true}else if(n%10===1){return false}return true}function translate$5(number,withoutSuffix,key,isFuture){var result=number+\" \";switch(key){case\"s\":return withoutSuffix||isFuture?\"nokkrar sekúndur\":\"nokkrum sekúndum\";case\"m\":return withoutSuffix?\"mínúta\":\"mínútu\";case\"mm\":if(plural$2(number)){return result+(withoutSuffix||isFuture?\"mínútur\":\"mínútum\")}else if(withoutSuffix){return result+\"mínúta\"}return result+\"mínútu\";case\"hh\":if(plural$2(number)){return result+(withoutSuffix||isFuture?\"klukkustundir\":\"klukkustundum\")}return result+\"klukkustund\";case\"d\":if(withoutSuffix){return\"dagur\"}return isFuture?\"dag\":\"degi\";case\"dd\":if(plural$2(number)){if(withoutSuffix){return result+\"dagar\"}return result+(isFuture?\"daga\":\"dögum\")}else if(withoutSuffix){return result+\"dagur\"}return result+(isFuture?\"dag\":\"degi\");case\"M\":if(withoutSuffix){return\"mánuður\"}return isFuture?\"mánuð\":\"mánuði\";case\"MM\":if(plural$2(number)){if(withoutSuffix){return result+\"mánuðir\"}return result+(isFuture?\"mánuði\":\"mánuðum\")}else if(withoutSuffix){return result+\"mánuður\"}return result+(isFuture?\"mánuð\":\"mánuði\");case\"y\":return withoutSuffix||isFuture?\"ár\":\"ári\";case\"yy\":if(plural$2(number)){return result+(withoutSuffix||isFuture?\"ár\":\"árum\")}return result+(withoutSuffix||isFuture?\"ár\":\"ári\")}}hooks.defineLocale(\"is\",{months:\"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des\".split(\"_\"),weekdays:\"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur\".split(\"_\"),weekdaysShort:\"sun_mán_þri_mið_fim_fös_lau\".split(\"_\"),weekdaysMin:\"Su_Má_Þr_Mi_Fi_Fö_La\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY [kl.] H:mm\",LLLL:\"dddd, D. MMMM YYYY [kl.] H:mm\"},calendar:{sameDay:\"[í dag kl.] LT\",nextDay:\"[á morgun kl.] LT\",nextWeek:\"dddd [kl.] LT\",lastDay:\"[í gær kl.] LT\",lastWeek:\"[síðasta] dddd [kl.] LT\",sameElse:\"L\"},relativeTime:{future:\"eftir %s\",past:\"fyrir %s síðan\",s:translate$5,m:translate$5,mm:translate$5,h:\"klukkustund\",hh:translate$5,d:translate$5,dd:translate$5,M:translate$5,MM:translate$5,y:translate$5,yy:translate$5},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"it\",{months:\"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre\".split(\"_\"),monthsShort:\"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic\".split(\"_\"),weekdays:\"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato\".split(\"_\"),weekdaysShort:\"dom_lun_mar_mer_gio_ven_sab\".split(\"_\"),weekdaysMin:\"do_lu_ma_me_gi_ve_sa\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Oggi alle] LT\",nextDay:\"[Domani alle] LT\",nextWeek:\"dddd [alle] LT\",lastDay:\"[Ieri alle] LT\",lastWeek:function(){switch(this.day()){case 0:return\"[la scorsa] dddd [alle] LT\";default:return\"[lo scorso] dddd [alle] LT\"}},sameElse:\"L\"},relativeTime:{future:function(s){return(/^[0-9].+$/.test(s)?\"tra\":\"in\")+\" \"+s},past:\"%s fa\",s:\"alcuni secondi\",m:\"un minuto\",mm:\"%d minuti\",h:\"un'ora\",hh:\"%d ore\",d:\"un giorno\",dd:\"%d giorni\",M:\"un mese\",MM:\"%d mesi\",y:\"un anno\",yy:\"%d anni\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});hooks.defineLocale(\"ja\",{months:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),weekdays:\"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日\".split(\"_\"),weekdaysShort:\"日_月_火_水_木_金_土\".split(\"_\"),weekdaysMin:\"日_月_火_水_木_金_土\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY/MM/DD\",LL:\"YYYY年M月D日\",LLL:\"YYYY年M月D日 HH:mm\",LLLL:\"YYYY年M月D日 HH:mm dddd\",l:\"YYYY/MM/DD\",ll:\"YYYY年M月D日\",lll:\"YYYY年M月D日 HH:mm\",llll:\"YYYY年M月D日 HH:mm dddd\"},meridiemParse:/午前|午後/i,isPM:function(input){return input===\"午後\"},meridiem:function(hour,minute,isLower){if(hour<12){return\"午前\"}else{return\"午後\"}},calendar:{sameDay:\"[今日] LT\",nextDay:\"[明日] LT\",nextWeek:\"[来週]dddd LT\",lastDay:\"[昨日] LT\",lastWeek:\"[前週]dddd LT\",sameElse:\"L\"},dayOfMonthOrdinalParse:/\\d{1,2}日/,ordinal:function(number,period){switch(period){case\"d\":case\"D\":case\"DDD\":return number+\"日\";default:return number}},relativeTime:{future:\"%s後\",past:\"%s前\",s:\"数秒\",m:\"1分\",mm:\"%d分\",h:\"1時間\",hh:\"%d時間\",d:\"1日\",dd:\"%d日\",M:\"1ヶ月\",MM:\"%dヶ月\",y:\"1年\",yy:\"%d年\"}});hooks.defineLocale(\"jv\",{months:\"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember\".split(\"_\"),monthsShort:\"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des\".split(\"_\"),weekdays:\"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu\".split(\"_\"),weekdaysShort:\"Min_Sen_Sel_Reb_Kem_Jem_Sep\".split(\"_\"),weekdaysMin:\"Mg_Sn_Sl_Rb_Km_Jm_Sp\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [pukul] HH.mm\",LLLL:\"dddd, D MMMM YYYY [pukul] HH.mm\"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"enjing\"){return hour}else if(meridiem===\"siyang\"){return hour>=11?hour:hour+12}else if(meridiem===\"sonten\"||meridiem===\"ndalu\"){return hour+12}},meridiem:function(hours,minutes,isLower){if(hours<11){return\"enjing\"}else if(hours<15){return\"siyang\"}else if(hours<19){return\"sonten\"}else{return\"ndalu\"}},calendar:{sameDay:\"[Dinten puniko pukul] LT\",nextDay:\"[Mbenjang pukul] LT\",nextWeek:\"dddd [pukul] LT\",lastDay:\"[Kala wingi pukul] LT\",lastWeek:\"dddd [kepengker pukul] LT\",sameElse:\"L\"},relativeTime:{future:\"wonten ing %s\",past:\"%s ingkang kepengker\",s:\"sawetawis detik\",m:\"setunggal menit\",mm:\"%d menit\",h:\"setunggal jam\",hh:\"%d jam\",d:\"sedinten\",dd:\"%d dinten\",M:\"sewulan\",MM:\"%d wulan\",y:\"setaun\",yy:\"%d taun\"},week:{dow:1,doy:7}});hooks.defineLocale(\"ka\",{months:{standalone:\"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი\".split(\"_\"),format:\"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს\".split(\"_\")},monthsShort:\"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ\".split(\"_\"),weekdays:{standalone:\"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი\".split(\"_\"),format:\"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს\".split(\"_\"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:\"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ\".split(\"_\"),weekdaysMin:\"კვ_ორ_სა_ოთ_ხუ_პა_შა\".split(\"_\"),longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendar:{sameDay:\"[დღეს] LT[-ზე]\",nextDay:\"[ხვალ] LT[-ზე]\",lastDay:\"[გუშინ] LT[-ზე]\",nextWeek:\"[შემდეგ] dddd LT[-ზე]\",lastWeek:\"[წინა] dddd LT-ზე\",sameElse:\"L\"},relativeTime:{future:function(s){return/(წამი|წუთი|საათი|წელი)/.test(s)?s.replace(/ი$/,\"ში\"):s+\"ში\"},past:function(s){if(/(წამი|წუთი|საათი|დღე|თვე)/.test(s)){return s.replace(/(ი|ე)$/,\"ის უკან\")}if(/წელი/.test(s)){return s.replace(/წელი$/,\"წლის უკან\")}},s:\"რამდენიმე წამი\",m:\"წუთი\",mm:\"%d წუთი\",h:\"საათი\",hh:\"%d საათი\",d:\"დღე\",dd:\"%d დღე\",M:\"თვე\",MM:\"%d თვე\",y:\"წელი\",yy:\"%d წელი\"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,ordinal:function(number){if(number===0){return number}if(number===1){return number+\"-ლი\"}if(number<20||number<=100&&number%20===0||number%100===0){return\"მე-\"+number}return number+\"-ე\"},week:{dow:1,doy:7}});var suffixes$1={0:\"-ші\",1:\"-ші\",2:\"-ші\",3:\"-ші\",4:\"-ші\",5:\"-ші\",6:\"-шы\",7:\"-ші\",8:\"-ші\",9:\"-шы\",10:\"-шы\",20:\"-шы\",30:\"-шы\",40:\"-шы\",50:\"-ші\",60:\"-шы\",70:\"-ші\",80:\"-ші\",90:\"-шы\",100:\"-ші\"};hooks.defineLocale(\"kk\",{months:\"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан\".split(\"_\"),monthsShort:\"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел\".split(\"_\"),weekdays:\"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі\".split(\"_\"),weekdaysShort:\"жек_дүй_сей_сәр_бей_жұм_сен\".split(\"_\"),weekdaysMin:\"жк_дй_сй_ср_бй_жм_сн\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Бүгін сағат] LT\",nextDay:\"[Ертең сағат] LT\",nextWeek:\"dddd [сағат] LT\",lastDay:\"[Кеше сағат] LT\",lastWeek:\"[Өткен аптаның] dddd [сағат] LT\",sameElse:\"L\"},relativeTime:{future:\"%s ішінде\",past:\"%s бұрын\",s:\"бірнеше секунд\",m:\"бір минут\",mm:\"%d минут\",h:\"бір сағат\",hh:\"%d сағат\",d:\"бір күн\",dd:\"%d күн\",M:\"бір ай\",MM:\"%d ай\",y:\"бір жыл\",yy:\"%d жыл\"},dayOfMonthOrdinalParse:/\\d{1,2}-(ші|шы)/,ordinal:function(number){var a=number%10,b=number>=100?100:null;return number+(suffixes$1[number]||suffixes$1[a]||suffixes$1[b])},week:{dow:1,doy:7}});hooks.defineLocale(\"km\",{months:\"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ\".split(\"_\"),monthsShort:\"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ\".split(\"_\"),weekdays:\"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍\".split(\"_\"),weekdaysShort:\"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍\".split(\"_\"),weekdaysMin:\"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[ថ្ងៃនេះ ម៉ោង] LT\",nextDay:\"[ស្អែក ម៉ោង] LT\",nextWeek:\"dddd [ម៉ោង] LT\",lastDay:\"[ម្សិលមិញ ម៉ោង] LT\",lastWeek:\"dddd [សប្តាហ៍មុន] [ម៉ោង] LT\",sameElse:\"L\"},relativeTime:{future:\"%sទៀត\",past:\"%sមុន\",s:\"ប៉ុន្មានវិនាទី\",m:\"មួយនាទី\",mm:\"%d នាទី\",h:\"មួយម៉ោង\",hh:\"%d ម៉ោង\",d:\"មួយថ្ងៃ\",dd:\"%d ថ្ងៃ\",M:\"មួយខែ\",MM:\"%d ខែ\",y:\"មួយឆ្នាំ\",yy:\"%d ឆ្នាំ\"},week:{dow:1,doy:4}});var symbolMap$8={1:\"೧\",2:\"೨\",3:\"೩\",4:\"೪\",5:\"೫\",6:\"೬\",7:\"೭\",8:\"೮\",9:\"೯\",0:\"೦\"};var numberMap$7={\"೧\":\"1\",\"೨\":\"2\",\"೩\":\"3\",\"೪\":\"4\",\"೫\":\"5\",\"೬\":\"6\",\"೭\":\"7\",\"೮\":\"8\",\"೯\":\"9\",\"೦\":\"0\"};hooks.defineLocale(\"kn\",{months:\"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್\".split(\"_\"),monthsShort:\"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ\".split(\"_\"),monthsParseExact:true,weekdays:\"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ\".split(\"_\"),weekdaysShort:\"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ\".split(\"_\"),weekdaysMin:\"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ\".split(\"_\"),longDateFormat:{LT:\"A h:mm\",LTS:\"A h:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm\",LLLL:\"dddd, D MMMM YYYY, A h:mm\"},calendar:{sameDay:\"[ಇಂದು] LT\",nextDay:\"[ನಾಳೆ] LT\",nextWeek:\"dddd, LT\",lastDay:\"[ನಿನ್ನೆ] LT\",lastWeek:\"[ಕೊನೆಯ] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s ನಂತರ\",past:\"%s ಹಿಂದೆ\",s:\"ಕೆಲವು ಕ್ಷಣಗಳು\",m:\"ಒಂದು ನಿಮಿಷ\",mm:\"%d ನಿಮಿಷ\",h:\"ಒಂದು ಗಂಟೆ\",hh:\"%d ಗಂಟೆ\",d:\"ಒಂದು ದಿನ\",dd:\"%d ದಿನ\",M:\"ಒಂದು ತಿಂಗಳು\",MM:\"%d ತಿಂಗಳು\",y:\"ಒಂದು ವರ್ಷ\",yy:\"%d ವರ್ಷ\"},preparse:function(string){return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(match){return numberMap$7[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$8[match]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"ರಾತ್ರಿ\"){return hour<4?hour:hour+12}else if(meridiem===\"ಬೆಳಿಗ್ಗೆ\"){return hour}else if(meridiem===\"ಮಧ್ಯಾಹ್ನ\"){return hour>=10?hour:hour+12}else if(meridiem===\"ಸಂಜೆ\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"ರಾತ್ರಿ\"}else if(hour<10){return\"ಬೆಳಿಗ್ಗೆ\"}else if(hour<17){return\"ಮಧ್ಯಾಹ್ನ\"}else if(hour<20){return\"ಸಂಜೆ\"}else{return\"ರಾತ್ರಿ\"}},dayOfMonthOrdinalParse:/\\d{1,2}(ನೇ)/,ordinal:function(number){return number+\"ನೇ\"},week:{dow:0,doy:6}});hooks.defineLocale(\"ko\",{months:\"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월\".split(\"_\"),monthsShort:\"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월\".split(\"_\"),weekdays:\"일요일_월요일_화요일_수요일_목요일_금요일_토요일\".split(\"_\"),weekdaysShort:\"일_월_화_수_목_금_토\".split(\"_\"),weekdaysMin:\"일_월_화_수_목_금_토\".split(\"_\"),longDateFormat:{LT:\"A h:mm\",LTS:\"A h:mm:ss\",L:\"YYYY.MM.DD\",LL:\"YYYY년 MMMM D일\",LLL:\"YYYY년 MMMM D일 A h:mm\",LLLL:\"YYYY년 MMMM D일 dddd A h:mm\",l:\"YYYY.MM.DD\",ll:\"YYYY년 MMMM D일\",lll:\"YYYY년 MMMM D일 A h:mm\",llll:\"YYYY년 MMMM D일 dddd A h:mm\"},calendar:{sameDay:\"오늘 LT\",nextDay:\"내일 LT\",nextWeek:\"dddd LT\",lastDay:\"어제 LT\",lastWeek:\"지난주 dddd LT\",sameElse:\"L\"},relativeTime:{future:\"%s 후\",past:\"%s 전\",s:\"몇 초\",ss:\"%d초\",m:\"1분\",mm:\"%d분\",h:\"한 시간\",hh:\"%d시간\",d:\"하루\",dd:\"%d일\",M:\"한 달\",MM:\"%d달\",y:\"일 년\",yy:\"%d년\"},dayOfMonthOrdinalParse:/\\d{1,2}(일|월|주)/,ordinal:function(number,period){switch(period){case\"d\":case\"D\":case\"DDD\":return number+\"일\";case\"M\":return number+\"월\";case\"w\":case\"W\":return number+\"주\";default:return number}},meridiemParse:/오전|오후/,isPM:function(token){return token===\"오후\"},meridiem:function(hour,minute,isUpper){return hour<12?\"오전\":\"오후\"}});var suffixes$2={0:\"-чү\",1:\"-чи\",2:\"-чи\",3:\"-чү\",4:\"-чү\",5:\"-чи\",6:\"-чы\",7:\"-чи\",8:\"-чи\",9:\"-чу\",10:\"-чу\",20:\"-чы\",30:\"-чу\",40:\"-чы\",50:\"-чү\",60:\"-чы\",70:\"-чи\",80:\"-чи\",90:\"-чу\",100:\"-чү\"};hooks.defineLocale(\"ky\",{months:\"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь\".split(\"_\"),monthsShort:\"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек\".split(\"_\"),weekdays:\"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби\".split(\"_\"),weekdaysShort:\"Жек_Дүй_Шей_Шар_Бей_Жум_Ише\".split(\"_\"),weekdaysMin:\"Жк_Дй_Шй_Шр_Бй_Жм_Иш\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Бүгүн саат] LT\",nextDay:\"[Эртең саат] LT\",nextWeek:\"dddd [саат] LT\",lastDay:\"[Кече саат] LT\",lastWeek:\"[Өткен аптанын] dddd [күнү] [саат] LT\",sameElse:\"L\"},relativeTime:{future:\"%s ичинде\",past:\"%s мурун\",s:\"бирнече секунд\",m:\"бир мүнөт\",mm:\"%d мүнөт\",h:\"бир саат\",hh:\"%d саат\",d:\"бир күн\",dd:\"%d күн\",M:\"бир ай\",MM:\"%d ай\",y:\"бир жыл\",yy:\"%d жыл\"},dayOfMonthOrdinalParse:/\\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(number){var a=number%10,b=number>=100?100:null;return number+(suffixes$2[number]||suffixes$2[a]||suffixes$2[b])},week:{dow:1,doy:7}});function processRelativeTime$5(number,withoutSuffix,key,isFuture){var format={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return withoutSuffix?format[key][0]:format[key][1]}function processFutureTime(string){var number=string.substr(0,string.indexOf(\" \"));if(eifelerRegelAppliesToNumber(number)){return\"a \"+string}return\"an \"+string}function processPastTime(string){var number=string.substr(0,string.indexOf(\" \"));if(eifelerRegelAppliesToNumber(number)){return\"viru \"+string}return\"virun \"+string}function eifelerRegelAppliesToNumber(number){number=parseInt(number,10);if(isNaN(number)){return false}if(number<0){return true}else if(number<10){if(4<=number&&number<=7){return true}return false}else if(number<100){var lastDigit=number%10,firstDigit=number/10;if(lastDigit===0){return eifelerRegelAppliesToNumber(firstDigit)}return eifelerRegelAppliesToNumber(lastDigit)}else if(number<1e4){while(number>=10){number=number/10}return eifelerRegelAppliesToNumber(number)}else{number=number/1e3;return eifelerRegelAppliesToNumber(number)}}hooks.defineLocale(\"lb\",{months:\"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember\".split(\"_\"),monthsShort:\"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.\".split(\"_\"),monthsParseExact:true,weekdays:\"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg\".split(\"_\"),weekdaysShort:\"So._Mé._Dë._Më._Do._Fr._Sa.\".split(\"_\"),weekdaysMin:\"So_Mé_Dë_Më_Do_Fr_Sa\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm [Auer]\",LTS:\"H:mm:ss [Auer]\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm [Auer]\",LLLL:\"dddd, D. MMMM YYYY H:mm [Auer]\"},calendar:{sameDay:\"[Haut um] LT\",sameElse:\"L\",nextDay:\"[Muer um] LT\",nextWeek:\"dddd [um] LT\",lastDay:\"[Gëschter um] LT\",lastWeek:function(){switch(this.day()){case 2:case 4:return\"[Leschten] dddd [um] LT\";default:return\"[Leschte] dddd [um] LT\"}}},relativeTime:{future:processFutureTime,past:processPastTime,s:\"e puer Sekonnen\",m:processRelativeTime$5,mm:\"%d Minutten\",h:processRelativeTime$5,hh:\"%d Stonnen\",d:processRelativeTime$5,dd:\"%d Deeg\",M:processRelativeTime$5,MM:\"%d Méint\",y:processRelativeTime$5,yy:\"%d Joer\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"lo\",{months:\"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ\".split(\"_\"),monthsShort:\"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ\".split(\"_\"),weekdays:\"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ\".split(\"_\"),weekdaysShort:\"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ\".split(\"_\"),weekdaysMin:\"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"ວັນdddd D MMMM YYYY HH:mm\"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(input){return input===\"ຕອນແລງ\"},meridiem:function(hour,minute,isLower){if(hour<12){return\"ຕອນເຊົ້າ\"}else{return\"ຕອນແລງ\"}},calendar:{sameDay:\"[ມື້ນີ້ເວລາ] LT\",nextDay:\"[ມື້ອື່ນເວລາ] LT\",nextWeek:\"[ວັນ]dddd[ໜ້າເວລາ] LT\",lastDay:\"[ມື້ວານນີ້ເວລາ] LT\",lastWeek:\"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT\",sameElse:\"L\"},relativeTime:{future:\"ອີກ %s\",past:\"%sຜ່ານມາ\",s:\"ບໍ່ເທົ່າໃດວິນາທີ\",m:\"1 ນາທີ\",mm:\"%d ນາທີ\",h:\"1 ຊົ່ວໂມງ\",hh:\"%d ຊົ່ວໂມງ\",d:\"1 ມື້\",dd:\"%d ມື້\",M:\"1 ເດືອນ\",MM:\"%d ເດືອນ\",y:\"1 ປີ\",yy:\"%d ປີ\"},dayOfMonthOrdinalParse:/(ທີ່)\\d{1,2}/,ordinal:function(number){return\"ທີ່\"+number}});var units={m:\"minutė_minutės_minutę\",mm:\"minutės_minučių_minutes\",h:\"valanda_valandos_valandą\",hh:\"valandos_valandų_valandas\",d:\"diena_dienos_dieną\",dd:\"dienos_dienų_dienas\",M:\"mėnuo_mėnesio_mėnesį\",MM:\"mėnesiai_mėnesių_mėnesius\",y:\"metai_metų_metus\",yy:\"metai_metų_metus\"};function translateSeconds(number,withoutSuffix,key,isFuture){if(withoutSuffix){return\"kelios sekundės\"}else{return isFuture?\"kelių sekundžių\":\"kelias sekundes\"}}function translateSingular(number,withoutSuffix,key,isFuture){return withoutSuffix?forms(key)[0]:isFuture?forms(key)[1]:forms(key)[2]}function special(number){return number%10===0||number>10&&number<20}function forms(key){return units[key].split(\"_\")}function translate$6(number,withoutSuffix,key,isFuture){var result=number+\" \";if(number===1){return result+translateSingular(number,withoutSuffix,key[0],isFuture)}else if(withoutSuffix){return result+(special(number)?forms(key)[1]:forms(key)[0])}else{if(isFuture){return result+forms(key)[1]}else{return result+(special(number)?forms(key)[1]:forms(key)[2])}}}hooks.defineLocale(\"lt\",{months:{format:\"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio\".split(\"_\"),standalone:\"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis\".split(\"_\"),isFormat:/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/},monthsShort:\"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd\".split(\"_\"),weekdays:{format:\"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį\".split(\"_\"),standalone:\"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis\".split(\"_\"),isFormat:/dddd HH:mm/},weekdaysShort:\"Sek_Pir_Ant_Tre_Ket_Pen_Šeš\".split(\"_\"),weekdaysMin:\"S_P_A_T_K_Pn_Š\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY-MM-DD\",LL:\"YYYY [m.] MMMM D [d.]\",LLL:\"YYYY [m.] MMMM D [d.], HH:mm [val.]\",LLLL:\"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]\",l:\"YYYY-MM-DD\",ll:\"YYYY [m.] MMMM D [d.]\",lll:\"YYYY [m.] MMMM D [d.], HH:mm [val.]\",llll:\"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]\"},calendar:{sameDay:\"[Šiandien] LT\",nextDay:\"[Rytoj] LT\",nextWeek:\"dddd LT\",lastDay:\"[Vakar] LT\",lastWeek:\"[Praėjusį] dddd LT\",sameElse:\"L\"},relativeTime:{future:\"po %s\",past:\"prieš %s\",s:translateSeconds,m:translateSingular,mm:translate$6,h:translateSingular,hh:translate$6,d:translateSingular,dd:translate$6,M:translateSingular,MM:translate$6,y:translateSingular,yy:translate$6},dayOfMonthOrdinalParse:/\\d{1,2}-oji/,ordinal:function(number){return number+\"-oji\"},week:{dow:1,doy:4}});var units$1={m:\"minūtes_minūtēm_minūte_minūtes\".split(\"_\"),mm:\"minūtes_minūtēm_minūte_minūtes\".split(\"_\"),h:\"stundas_stundām_stunda_stundas\".split(\"_\"),hh:\"stundas_stundām_stunda_stundas\".split(\"_\"),d:\"dienas_dienām_diena_dienas\".split(\"_\"),dd:\"dienas_dienām_diena_dienas\".split(\"_\"),M:\"mēneša_mēnešiem_mēnesis_mēneši\".split(\"_\"),MM:\"mēneša_mēnešiem_mēnesis_mēneši\".split(\"_\"),y:\"gada_gadiem_gads_gadi\".split(\"_\"),yy:\"gada_gadiem_gads_gadi\".split(\"_\")};function format$1(forms,number,withoutSuffix){if(withoutSuffix){return number%10===1&&number%100!==11?forms[2]:forms[3]}else{return number%10===1&&number%100!==11?forms[0]:forms[1]}}function relativeTimeWithPlural$1(number,withoutSuffix,key){return number+\" \"+format$1(units$1[key],number,withoutSuffix)}function relativeTimeWithSingular(number,withoutSuffix,key){return format$1(units$1[key],number,withoutSuffix)}function relativeSeconds(number,withoutSuffix){return withoutSuffix?\"dažas sekundes\":\"dažām sekundēm\"}hooks.defineLocale(\"lv\",{months:\"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec\".split(\"_\"),weekdays:\"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena\".split(\"_\"),weekdaysShort:\"Sv_P_O_T_C_Pk_S\".split(\"_\"),weekdaysMin:\"Sv_P_O_T_C_Pk_S\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY.\",LL:\"YYYY. [gada] D. MMMM\",LLL:\"YYYY. [gada] D. MMMM, HH:mm\",LLLL:\"YYYY. [gada] D. MMMM, dddd, HH:mm\"},calendar:{sameDay:\"[Šodien pulksten] LT\",nextDay:\"[Rīt pulksten] LT\",nextWeek:\"dddd [pulksten] LT\",lastDay:\"[Vakar pulksten] LT\",lastWeek:\"[Pagājušā] dddd [pulksten] LT\",sameElse:\"L\"},relativeTime:{future:\"pēc %s\",past:\"pirms %s\",s:relativeSeconds,m:relativeTimeWithSingular,mm:relativeTimeWithPlural$1,h:relativeTimeWithSingular,hh:relativeTimeWithPlural$1,d:relativeTimeWithSingular,dd:relativeTimeWithPlural$1,M:relativeTimeWithSingular,MM:relativeTimeWithPlural$1,y:relativeTimeWithSingular,yy:relativeTimeWithPlural$1},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var translator={words:{m:[\"jedan minut\",\"jednog minuta\"],mm:[\"minut\",\"minuta\",\"minuta\"],h:[\"jedan sat\",\"jednog sata\"],hh:[\"sat\",\"sata\",\"sati\"],dd:[\"dan\",\"dana\",\"dana\"],MM:[\"mjesec\",\"mjeseca\",\"mjeseci\"],yy:[\"godina\",\"godine\",\"godina\"]},correctGrammaticalCase:function(number,wordKey){return number===1?wordKey[0]:number>=2&&number<=4?wordKey[1]:wordKey[2]},translate:function(number,withoutSuffix,key){var wordKey=translator.words[key];if(key.length===1){return withoutSuffix?wordKey[0]:wordKey[1]}else{return number+\" \"+translator.correctGrammaticalCase(number,wordKey)}}};hooks.defineLocale(\"me\",{months:\"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar\".split(\"_\"),monthsShort:\"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota\".split(\"_\"),weekdaysShort:\"ned._pon._uto._sri._čet._pet._sub.\".split(\"_\"),weekdaysMin:\"ne_po_ut_sr_če_pe_su\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[danas u] LT\",nextDay:\"[sjutra u] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[u] [nedjelju] [u] LT\";case 3:return\"[u] [srijedu] [u] LT\";case 6:return\"[u] [subotu] [u] LT\";case 1:case 2:case 4:case 5:return\"[u] dddd [u] LT\"}},lastDay:\"[juče u] LT\",lastWeek:function(){var lastWeekDays=[\"[prošle] [nedjelje] [u] LT\",\"[prošlog] [ponedjeljka] [u] LT\",\"[prošlog] [utorka] [u] LT\",\"[prošle] [srijede] [u] LT\",\"[prošlog] [četvrtka] [u] LT\",\"[prošlog] [petka] [u] LT\",\"[prošle] [subote] [u] LT\"];return lastWeekDays[this.day()]},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"prije %s\",s:\"nekoliko sekundi\",m:translator.translate,mm:translator.translate,h:translator.translate,hh:translator.translate,d:\"dan\",dd:translator.translate,M:\"mjesec\",MM:translator.translate,y:\"godinu\",yy:translator.translate},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});hooks.defineLocale(\"mi\",{months:\"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea\".split(\"_\"),monthsShort:\"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki\".split(\"_\"),monthsRegex:/(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,monthsShortRegex:/(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,weekdays:\"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei\".split(\"_\"),weekdaysShort:\"Ta_Ma_Tū_We_Tāi_Pa_Hā\".split(\"_\"),weekdaysMin:\"Ta_Ma_Tū_We_Tāi_Pa_Hā\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [i] HH:mm\",LLLL:\"dddd, D MMMM YYYY [i] HH:mm\"},calendar:{sameDay:\"[i teie mahana, i] LT\",nextDay:\"[apopo i] LT\",nextWeek:\"dddd [i] LT\",lastDay:\"[inanahi i] LT\",lastWeek:\"dddd [whakamutunga i] LT\",sameElse:\"L\"},relativeTime:{future:\"i roto i %s\",past:\"%s i mua\",s:\"te hēkona ruarua\",m:\"he meneti\",mm:\"%d meneti\",h:\"te haora\",hh:\"%d haora\",d:\"he ra\",dd:\"%d ra\",M:\"he marama\",\nMM:\"%d marama\",y:\"he tau\",yy:\"%d tau\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});hooks.defineLocale(\"mk\",{months:\"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември\".split(\"_\"),monthsShort:\"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек\".split(\"_\"),weekdays:\"недела_понеделник_вторник_среда_четврток_петок_сабота\".split(\"_\"),weekdaysShort:\"нед_пон_вто_сре_чет_пет_саб\".split(\"_\"),weekdaysMin:\"нe_пo_вт_ср_че_пе_сa\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"D.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY H:mm\",LLLL:\"dddd, D MMMM YYYY H:mm\"},calendar:{sameDay:\"[Денес во] LT\",nextDay:\"[Утре во] LT\",nextWeek:\"[Во] dddd [во] LT\",lastDay:\"[Вчера во] LT\",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return\"[Изминатата] dddd [во] LT\";case 1:case 2:case 4:case 5:return\"[Изминатиот] dddd [во] LT\"}},sameElse:\"L\"},relativeTime:{future:\"после %s\",past:\"пред %s\",s:\"неколку секунди\",m:\"минута\",mm:\"%d минути\",h:\"час\",hh:\"%d часа\",d:\"ден\",dd:\"%d дена\",M:\"месец\",MM:\"%d месеци\",y:\"година\",yy:\"%d години\"},dayOfMonthOrdinalParse:/\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(number){var lastDigit=number%10,last2Digits=number%100;if(number===0){return number+\"-ев\"}else if(last2Digits===0){return number+\"-ен\"}else if(last2Digits>10&&last2Digits<20){return number+\"-ти\"}else if(lastDigit===1){return number+\"-ви\"}else if(lastDigit===2){return number+\"-ри\"}else if(lastDigit===7||lastDigit===8){return number+\"-ми\"}else{return number+\"-ти\"}},week:{dow:1,doy:7}});hooks.defineLocale(\"ml\",{months:\"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ\".split(\"_\"),monthsShort:\"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.\".split(\"_\"),monthsParseExact:true,weekdays:\"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച\".split(\"_\"),weekdaysShort:\"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി\".split(\"_\"),weekdaysMin:\"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ\".split(\"_\"),longDateFormat:{LT:\"A h:mm -നു\",LTS:\"A h:mm:ss -നു\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm -നു\",LLLL:\"dddd, D MMMM YYYY, A h:mm -നു\"},calendar:{sameDay:\"[ഇന്ന്] LT\",nextDay:\"[നാളെ] LT\",nextWeek:\"dddd, LT\",lastDay:\"[ഇന്നലെ] LT\",lastWeek:\"[കഴിഞ്ഞ] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s കഴിഞ്ഞ്\",past:\"%s മുൻപ്\",s:\"അൽപ നിമിഷങ്ങൾ\",m:\"ഒരു മിനിറ്റ്\",mm:\"%d മിനിറ്റ്\",h:\"ഒരു മണിക്കൂർ\",hh:\"%d മണിക്കൂർ\",d:\"ഒരു ദിവസം\",dd:\"%d ദിവസം\",M:\"ഒരു മാസം\",MM:\"%d മാസം\",y:\"ഒരു വർഷം\",yy:\"%d വർഷം\"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"രാത്രി\"&&hour>=4||meridiem===\"ഉച്ച കഴിഞ്ഞ്\"||meridiem===\"വൈകുന്നേരം\"){return hour+12}else{return hour}},meridiem:function(hour,minute,isLower){if(hour<4){return\"രാത്രി\"}else if(hour<12){return\"രാവിലെ\"}else if(hour<17){return\"ഉച്ച കഴിഞ്ഞ്\"}else if(hour<20){return\"വൈകുന്നേരം\"}else{return\"രാത്രി\"}}});var symbolMap$9={1:\"१\",2:\"२\",3:\"३\",4:\"४\",5:\"५\",6:\"६\",7:\"७\",8:\"८\",9:\"९\",0:\"०\"};var numberMap$8={\"१\":\"1\",\"२\":\"2\",\"३\":\"3\",\"४\":\"4\",\"५\":\"5\",\"६\":\"6\",\"७\":\"7\",\"८\":\"8\",\"९\":\"9\",\"०\":\"0\"};function relativeTimeMr(number,withoutSuffix,string,isFuture){var output=\"\";if(withoutSuffix){switch(string){case\"s\":output=\"काही सेकंद\";break;case\"m\":output=\"एक मिनिट\";break;case\"mm\":output=\"%d मिनिटे\";break;case\"h\":output=\"एक तास\";break;case\"hh\":output=\"%d तास\";break;case\"d\":output=\"एक दिवस\";break;case\"dd\":output=\"%d दिवस\";break;case\"M\":output=\"एक महिना\";break;case\"MM\":output=\"%d महिने\";break;case\"y\":output=\"एक वर्ष\";break;case\"yy\":output=\"%d वर्षे\";break}}else{switch(string){case\"s\":output=\"काही सेकंदां\";break;case\"m\":output=\"एका मिनिटा\";break;case\"mm\":output=\"%d मिनिटां\";break;case\"h\":output=\"एका तासा\";break;case\"hh\":output=\"%d तासां\";break;case\"d\":output=\"एका दिवसा\";break;case\"dd\":output=\"%d दिवसां\";break;case\"M\":output=\"एका महिन्या\";break;case\"MM\":output=\"%d महिन्यां\";break;case\"y\":output=\"एका वर्षा\";break;case\"yy\":output=\"%d वर्षां\";break}}return output.replace(/%d/i,number)}hooks.defineLocale(\"mr\",{months:\"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर\".split(\"_\"),monthsShort:\"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.\".split(\"_\"),monthsParseExact:true,weekdays:\"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार\".split(\"_\"),weekdaysShort:\"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि\".split(\"_\"),weekdaysMin:\"र_सो_मं_बु_गु_शु_श\".split(\"_\"),longDateFormat:{LT:\"A h:mm वाजता\",LTS:\"A h:mm:ss वाजता\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm वाजता\",LLLL:\"dddd, D MMMM YYYY, A h:mm वाजता\"},calendar:{sameDay:\"[आज] LT\",nextDay:\"[उद्या] LT\",nextWeek:\"dddd, LT\",lastDay:\"[काल] LT\",lastWeek:\"[मागील] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%sमध्ये\",past:\"%sपूर्वी\",s:relativeTimeMr,m:relativeTimeMr,mm:relativeTimeMr,h:relativeTimeMr,hh:relativeTimeMr,d:relativeTimeMr,dd:relativeTimeMr,M:relativeTimeMr,MM:relativeTimeMr,y:relativeTimeMr,yy:relativeTimeMr},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap$8[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$9[match]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"रात्री\"){return hour<4?hour:hour+12}else if(meridiem===\"सकाळी\"){return hour}else if(meridiem===\"दुपारी\"){return hour>=10?hour:hour+12}else if(meridiem===\"सायंकाळी\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"रात्री\"}else if(hour<10){return\"सकाळी\"}else if(hour<17){return\"दुपारी\"}else if(hour<20){return\"सायंकाळी\"}else{return\"रात्री\"}},week:{dow:0,doy:6}});hooks.defineLocale(\"ms-my\",{months:\"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember\".split(\"_\"),monthsShort:\"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis\".split(\"_\"),weekdays:\"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu\".split(\"_\"),weekdaysShort:\"Ahd_Isn_Sel_Rab_Kha_Jum_Sab\".split(\"_\"),weekdaysMin:\"Ah_Is_Sl_Rb_Km_Jm_Sb\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [pukul] HH.mm\",LLLL:\"dddd, D MMMM YYYY [pukul] HH.mm\"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"pagi\"){return hour}else if(meridiem===\"tengahari\"){return hour>=11?hour:hour+12}else if(meridiem===\"petang\"||meridiem===\"malam\"){return hour+12}},meridiem:function(hours,minutes,isLower){if(hours<11){return\"pagi\"}else if(hours<15){return\"tengahari\"}else if(hours<19){return\"petang\"}else{return\"malam\"}},calendar:{sameDay:\"[Hari ini pukul] LT\",nextDay:\"[Esok pukul] LT\",nextWeek:\"dddd [pukul] LT\",lastDay:\"[Kelmarin pukul] LT\",lastWeek:\"dddd [lepas pukul] LT\",sameElse:\"L\"},relativeTime:{future:\"dalam %s\",past:\"%s yang lepas\",s:\"beberapa saat\",m:\"seminit\",mm:\"%d minit\",h:\"sejam\",hh:\"%d jam\",d:\"sehari\",dd:\"%d hari\",M:\"sebulan\",MM:\"%d bulan\",y:\"setahun\",yy:\"%d tahun\"},week:{dow:1,doy:7}});hooks.defineLocale(\"ms\",{months:\"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember\".split(\"_\"),monthsShort:\"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis\".split(\"_\"),weekdays:\"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu\".split(\"_\"),weekdaysShort:\"Ahd_Isn_Sel_Rab_Kha_Jum_Sab\".split(\"_\"),weekdaysMin:\"Ah_Is_Sl_Rb_Km_Jm_Sb\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [pukul] HH.mm\",LLLL:\"dddd, D MMMM YYYY [pukul] HH.mm\"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"pagi\"){return hour}else if(meridiem===\"tengahari\"){return hour>=11?hour:hour+12}else if(meridiem===\"petang\"||meridiem===\"malam\"){return hour+12}},meridiem:function(hours,minutes,isLower){if(hours<11){return\"pagi\"}else if(hours<15){return\"tengahari\"}else if(hours<19){return\"petang\"}else{return\"malam\"}},calendar:{sameDay:\"[Hari ini pukul] LT\",nextDay:\"[Esok pukul] LT\",nextWeek:\"dddd [pukul] LT\",lastDay:\"[Kelmarin pukul] LT\",lastWeek:\"dddd [lepas pukul] LT\",sameElse:\"L\"},relativeTime:{future:\"dalam %s\",past:\"%s yang lepas\",s:\"beberapa saat\",m:\"seminit\",mm:\"%d minit\",h:\"sejam\",hh:\"%d jam\",d:\"sehari\",dd:\"%d hari\",M:\"sebulan\",MM:\"%d bulan\",y:\"setahun\",yy:\"%d tahun\"},week:{dow:1,doy:7}});var symbolMap$10={1:\"၁\",2:\"၂\",3:\"၃\",4:\"၄\",5:\"၅\",6:\"၆\",7:\"၇\",8:\"၈\",9:\"၉\",0:\"၀\"};var numberMap$9={\"၁\":\"1\",\"၂\":\"2\",\"၃\":\"3\",\"၄\":\"4\",\"၅\":\"5\",\"၆\":\"6\",\"၇\":\"7\",\"၈\":\"8\",\"၉\":\"9\",\"၀\":\"0\"};hooks.defineLocale(\"my\",{months:\"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ\".split(\"_\"),monthsShort:\"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ\".split(\"_\"),weekdays:\"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ\".split(\"_\"),weekdaysShort:\"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ\".split(\"_\"),weekdaysMin:\"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[ယနေ.] LT [မှာ]\",nextDay:\"[မနက်ဖြန်] LT [မှာ]\",nextWeek:\"dddd LT [မှာ]\",lastDay:\"[မနေ.က] LT [မှာ]\",lastWeek:\"[ပြီးခဲ့သော] dddd LT [မှာ]\",sameElse:\"L\"},relativeTime:{future:\"လာမည့် %s မှာ\",past:\"လွန်ခဲ့သော %s က\",s:\"စက္ကန်.အနည်းငယ်\",m:\"တစ်မိနစ်\",mm:\"%d မိနစ်\",h:\"တစ်နာရီ\",hh:\"%d နာရီ\",d:\"တစ်ရက်\",dd:\"%d ရက်\",M:\"တစ်လ\",MM:\"%d လ\",y:\"တစ်နှစ်\",yy:\"%d နှစ်\"},preparse:function(string){return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(match){return numberMap$9[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$10[match]})},week:{dow:1,doy:4}});hooks.defineLocale(\"nb\",{months:\"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember\".split(\"_\"),monthsShort:\"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.\".split(\"_\"),monthsParseExact:true,weekdays:\"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag\".split(\"_\"),weekdaysShort:\"sø._ma._ti._on._to._fr._lø.\".split(\"_\"),weekdaysMin:\"sø_ma_ti_on_to_fr_lø\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY [kl.] HH:mm\",LLLL:\"dddd D. MMMM YYYY [kl.] HH:mm\"},calendar:{sameDay:\"[i dag kl.] LT\",nextDay:\"[i morgen kl.] LT\",nextWeek:\"dddd [kl.] LT\",lastDay:\"[i går kl.] LT\",lastWeek:\"[forrige] dddd [kl.] LT\",sameElse:\"L\"},relativeTime:{future:\"om %s\",past:\"%s siden\",s:\"noen sekunder\",m:\"ett minutt\",mm:\"%d minutter\",h:\"en time\",hh:\"%d timer\",d:\"en dag\",dd:\"%d dager\",M:\"en måned\",MM:\"%d måneder\",y:\"ett år\",yy:\"%d år\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var symbolMap$11={1:\"१\",2:\"२\",3:\"३\",4:\"४\",5:\"५\",6:\"६\",7:\"७\",8:\"८\",9:\"९\",0:\"०\"};var numberMap$10={\"१\":\"1\",\"२\":\"2\",\"३\":\"3\",\"४\":\"4\",\"५\":\"5\",\"६\":\"6\",\"७\":\"7\",\"८\":\"8\",\"९\":\"9\",\"०\":\"0\"};hooks.defineLocale(\"ne\",{months:\"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर\".split(\"_\"),monthsShort:\"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.\".split(\"_\"),monthsParseExact:true,weekdays:\"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार\".split(\"_\"),weekdaysShort:\"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.\".split(\"_\"),weekdaysMin:\"आ._सो._मं._बु._बि._शु._श.\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"Aको h:mm बजे\",LTS:\"Aको h:mm:ss बजे\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, Aको h:mm बजे\",LLLL:\"dddd, D MMMM YYYY, Aको h:mm बजे\"},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap$10[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$11[match]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"राति\"){return hour<4?hour:hour+12}else if(meridiem===\"बिहान\"){return hour}else if(meridiem===\"दिउँसो\"){return hour>=10?hour:hour+12}else if(meridiem===\"साँझ\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<3){return\"राति\"}else if(hour<12){return\"बिहान\"}else if(hour<16){return\"दिउँसो\"}else if(hour<20){return\"साँझ\"}else{return\"राति\"}},calendar:{sameDay:\"[आज] LT\",nextDay:\"[भोलि] LT\",nextWeek:\"[आउँदो] dddd[,] LT\",lastDay:\"[हिजो] LT\",lastWeek:\"[गएको] dddd[,] LT\",sameElse:\"L\"},relativeTime:{future:\"%sमा\",past:\"%s अगाडि\",s:\"केही क्षण\",m:\"एक मिनेट\",mm:\"%d मिनेट\",h:\"एक घण्टा\",hh:\"%d घण्टा\",d:\"एक दिन\",dd:\"%d दिन\",M:\"एक महिना\",MM:\"%d महिना\",y:\"एक बर्ष\",yy:\"%d बर्ष\"},week:{dow:0,doy:6}});var monthsShortWithDots$1=\"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.\".split(\"_\");var monthsShortWithoutDots$1=\"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec\".split(\"_\");var monthsParse$2=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i];var monthsRegex$3=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;hooks.defineLocale(\"nl-be\",{months:\"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortWithDots$1}else if(/-MMM-/.test(format)){return monthsShortWithoutDots$1[m.month()]}else{return monthsShortWithDots$1[m.month()]}},monthsRegex:monthsRegex$3,monthsShortRegex:monthsRegex$3,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,monthsParse:monthsParse$2,longMonthsParse:monthsParse$2,shortMonthsParse:monthsParse$2,weekdays:\"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag\".split(\"_\"),weekdaysShort:\"zo._ma._di._wo._do._vr._za.\".split(\"_\"),weekdaysMin:\"zo_ma_di_wo_do_vr_za\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[vandaag om] LT\",nextDay:\"[morgen om] LT\",nextWeek:\"dddd [om] LT\",lastDay:\"[gisteren om] LT\",lastWeek:\"[afgelopen] dddd [om] LT\",sameElse:\"L\"},relativeTime:{future:\"over %s\",past:\"%s geleden\",s:\"een paar seconden\",m:\"één minuut\",mm:\"%d minuten\",h:\"één uur\",hh:\"%d uur\",d:\"één dag\",dd:\"%d dagen\",M:\"één maand\",MM:\"%d maanden\",y:\"één jaar\",yy:\"%d jaar\"},dayOfMonthOrdinalParse:/\\d{1,2}(ste|de)/,ordinal:function(number){return number+(number===1||number===8||number>=20?\"ste\":\"de\")},week:{dow:1,doy:4}});var monthsShortWithDots$2=\"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.\".split(\"_\");var monthsShortWithoutDots$2=\"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec\".split(\"_\");var monthsParse$3=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i];var monthsRegex$4=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;hooks.defineLocale(\"nl\",{months:\"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december\".split(\"_\"),monthsShort:function(m,format){if(!m){return monthsShortWithDots$2}else if(/-MMM-/.test(format)){return monthsShortWithoutDots$2[m.month()]}else{return monthsShortWithDots$2[m.month()]}},monthsRegex:monthsRegex$4,monthsShortRegex:monthsRegex$4,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,monthsParse:monthsParse$3,longMonthsParse:monthsParse$3,shortMonthsParse:monthsParse$3,weekdays:\"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag\".split(\"_\"),weekdaysShort:\"zo._ma._di._wo._do._vr._za.\".split(\"_\"),weekdaysMin:\"zo_ma_di_wo_do_vr_za\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD-MM-YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[vandaag om] LT\",nextDay:\"[morgen om] LT\",nextWeek:\"dddd [om] LT\",lastDay:\"[gisteren om] LT\",lastWeek:\"[afgelopen] dddd [om] LT\",sameElse:\"L\"},relativeTime:{future:\"over %s\",past:\"%s geleden\",s:\"een paar seconden\",m:\"één minuut\",mm:\"%d minuten\",h:\"één uur\",hh:\"%d uur\",d:\"één dag\",dd:\"%d dagen\",M:\"één maand\",MM:\"%d maanden\",y:\"één jaar\",yy:\"%d jaar\"},dayOfMonthOrdinalParse:/\\d{1,2}(ste|de)/,ordinal:function(number){return number+(number===1||number===8||number>=20?\"ste\":\"de\")},week:{dow:1,doy:4}});hooks.defineLocale(\"nn\",{months:\"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des\".split(\"_\"),weekdays:\"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag\".split(\"_\"),weekdaysShort:\"sun_mån_tys_ons_tor_fre_lau\".split(\"_\"),weekdaysMin:\"su_må_ty_on_to_fr_lø\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY [kl.] H:mm\",LLLL:\"dddd D. MMMM YYYY [kl.] HH:mm\"},calendar:{sameDay:\"[I dag klokka] LT\",nextDay:\"[I morgon klokka] LT\",nextWeek:\"dddd [klokka] LT\",lastDay:\"[I går klokka] LT\",lastWeek:\"[Føregåande] dddd [klokka] LT\",sameElse:\"L\"},relativeTime:{future:\"om %s\",past:\"%s sidan\",s:\"nokre sekund\",m:\"eit minutt\",mm:\"%d minutt\",h:\"ein time\",hh:\"%d timar\",d:\"ein dag\",dd:\"%d dagar\",M:\"ein månad\",MM:\"%d månader\",y:\"eit år\",yy:\"%d år\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var symbolMap$12={1:\"੧\",2:\"੨\",3:\"੩\",4:\"੪\",5:\"੫\",6:\"੬\",7:\"੭\",8:\"੮\",9:\"੯\",0:\"੦\"};var numberMap$11={\"੧\":\"1\",\"੨\":\"2\",\"੩\":\"3\",\"੪\":\"4\",\"੫\":\"5\",\"੬\":\"6\",\"੭\":\"7\",\"੮\":\"8\",\"੯\":\"9\",\"੦\":\"0\"};hooks.defineLocale(\"pa-in\",{months:\"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ\".split(\"_\"),monthsShort:\"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ\".split(\"_\"),weekdays:\"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ\".split(\"_\"),weekdaysShort:\"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ\".split(\"_\"),weekdaysMin:\"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ\".split(\"_\"),longDateFormat:{LT:\"A h:mm ਵਜੇ\",LTS:\"A h:mm:ss ਵਜੇ\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm ਵਜੇ\",LLLL:\"dddd, D MMMM YYYY, A h:mm ਵਜੇ\"},calendar:{sameDay:\"[ਅਜ] LT\",nextDay:\"[ਕਲ] LT\",nextWeek:\"dddd, LT\",lastDay:\"[ਕਲ] LT\",lastWeek:\"[ਪਿਛਲੇ] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s ਵਿੱਚ\",past:\"%s ਪਿਛਲੇ\",s:\"ਕੁਝ ਸਕਿੰਟ\",m:\"ਇਕ ਮਿੰਟ\",mm:\"%d ਮਿੰਟ\",h:\"ਇੱਕ ਘੰਟਾ\",hh:\"%d ਘੰਟੇ\",d:\"ਇੱਕ ਦਿਨ\",dd:\"%d ਦਿਨ\",M:\"ਇੱਕ ਮਹੀਨਾ\",MM:\"%d ਮਹੀਨੇ\",y:\"ਇੱਕ ਸਾਲ\",yy:\"%d ਸਾਲ\"},preparse:function(string){return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(match){return numberMap$11[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$12[match]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"ਰਾਤ\"){return hour<4?hour:hour+12}else if(meridiem===\"ਸਵੇਰ\"){return hour}else if(meridiem===\"ਦੁਪਹਿਰ\"){return hour>=10?hour:hour+12}else if(meridiem===\"ਸ਼ਾਮ\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"ਰਾਤ\"}else if(hour<10){return\"ਸਵੇਰ\"}else if(hour<17){return\"ਦੁਪਹਿਰ\"}else if(hour<20){return\"ਸ਼ਾਮ\"}else{return\"ਰਾਤ\"}},week:{dow:0,doy:6}});var monthsNominative=\"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień\".split(\"_\");var monthsSubjective=\"stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia\".split(\"_\");function plural$3(n){return n%10<5&&n%10>1&&~~(n/10)%10!==1}function translate$7(number,withoutSuffix,key){var result=number+\" \";switch(key){case\"m\":return withoutSuffix?\"minuta\":\"minutę\";case\"mm\":return result+(plural$3(number)?\"minuty\":\"minut\");case\"h\":return withoutSuffix?\"godzina\":\"godzinę\";case\"hh\":return result+(plural$3(number)?\"godziny\":\"godzin\");case\"MM\":return result+(plural$3(number)?\"miesiące\":\"miesięcy\");case\"yy\":return result+(plural$3(number)?\"lata\":\"lat\")}}hooks.defineLocale(\"pl\",{months:function(momentToFormat,format){if(!momentToFormat){return monthsNominative}else if(format===\"\"){return\"(\"+monthsSubjective[momentToFormat.month()]+\"|\"+monthsNominative[momentToFormat.month()]+\")\"}else if(/D MMMM/.test(format)){return monthsSubjective[momentToFormat.month()]}else{return monthsNominative[momentToFormat.month()]}},monthsShort:\"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru\".split(\"_\"),weekdays:\"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota\".split(\"_\"),weekdaysShort:\"ndz_pon_wt_śr_czw_pt_sob\".split(\"_\"),weekdaysMin:\"Nd_Pn_Wt_Śr_Cz_Pt_So\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Dziś o] LT\",nextDay:\"[Jutro o] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[W niedzielę o] LT\";case 2:return\"[We wtorek o] LT\";case 3:return\"[W środę o] LT\";case 6:return\"[W sobotę o] LT\";default:return\"[W] dddd [o] LT\"}},lastDay:\"[Wczoraj o] LT\",lastWeek:function(){switch(this.day()){case 0:return\"[W zeszłą niedzielę o] LT\";case 3:return\"[W zeszłą środę o] LT\";case 6:return\"[W zeszłą sobotę o] LT\";default:return\"[W zeszły] dddd [o] LT\"}},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"%s temu\",s:\"kilka sekund\",m:translate$7,mm:translate$7,h:translate$7,hh:translate$7,d:\"1 dzień\",dd:\"%d dni\",M:\"miesiąc\",MM:translate$7,y:\"rok\",yy:translate$7},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"pt-br\",{months:\"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro\".split(\"_\"),monthsShort:\"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez\".split(\"_\"),weekdays:\"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado\".split(\"_\"),weekdaysShort:\"Dom_Seg_Ter_Qua_Qui_Sex_Sáb\".split(\"_\"),weekdaysMin:\"Do_2ª_3ª_4ª_5ª_6ª_Sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY [às] HH:mm\",LLLL:\"dddd, D [de] MMMM [de] YYYY [às] HH:mm\"},calendar:{sameDay:\"[Hoje às] LT\",nextDay:\"[Amanhã às] LT\",nextWeek:\"dddd [às] LT\",lastDay:\"[Ontem às] LT\",lastWeek:function(){return this.day()===0||this.day()===6?\"[Último] dddd [às] LT\":\"[Última] dddd [às] LT\"},sameElse:\"L\"},relativeTime:{future:\"em %s\",past:\"%s atrás\",s:\"poucos segundos\",ss:\"%d segundos\",m:\"um minuto\",mm:\"%d minutos\",h:\"uma hora\",hh:\"%d horas\",d:\"um dia\",dd:\"%d dias\",M:\"um mês\",MM:\"%d meses\",y:\"um ano\",yy:\"%d anos\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\"});hooks.defineLocale(\"pt\",{months:\"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro\".split(\"_\"),monthsShort:\"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez\".split(\"_\"),weekdays:\"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado\".split(\"_\"),weekdaysShort:\"Dom_Seg_Ter_Qua_Qui_Sex_Sáb\".split(\"_\"),weekdaysMin:\"Do_2ª_3ª_4ª_5ª_6ª_Sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY HH:mm\",LLLL:\"dddd, D [de] MMMM [de] YYYY HH:mm\"},calendar:{sameDay:\"[Hoje às] LT\",nextDay:\"[Amanhã às] LT\",nextWeek:\"dddd [às] LT\",lastDay:\"[Ontem às] LT\",lastWeek:function(){return this.day()===0||this.day()===6?\"[Último] dddd [às] LT\":\"[Última] dddd [às] LT\"},sameElse:\"L\"},relativeTime:{future:\"em %s\",past:\"há %s\",s:\"segundos\",m:\"um minuto\",mm:\"%d minutos\",h:\"uma hora\",hh:\"%d horas\",d:\"um dia\",dd:\"%d dias\",M:\"um mês\",MM:\"%d meses\",y:\"um ano\",yy:\"%d anos\"},dayOfMonthOrdinalParse:/\\d{1,2}º/,ordinal:\"%dº\",week:{dow:1,doy:4}});function relativeTimeWithPlural$2(number,withoutSuffix,key){var format={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},separator=\" \";if(number%100>=20||number>=100&&number%100===0){separator=\" de \"}return number+separator+format[key]}hooks.defineLocale(\"ro\",{months:\"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie\".split(\"_\"),monthsShort:\"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"duminică_luni_marți_miercuri_joi_vineri_sâmbătă\".split(\"_\"),weekdaysShort:\"Dum_Lun_Mar_Mie_Joi_Vin_Sâm\".split(\"_\"),weekdaysMin:\"Du_Lu_Ma_Mi_Jo_Vi_Sâ\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY H:mm\",LLLL:\"dddd, D MMMM YYYY H:mm\"},calendar:{sameDay:\"[azi la] LT\",nextDay:\"[mâine la] LT\",nextWeek:\"dddd [la] LT\",lastDay:\"[ieri la] LT\",lastWeek:\"[fosta] dddd [la] LT\",sameElse:\"L\"},relativeTime:{future:\"peste %s\",past:\"%s în urmă\",s:\"câteva secunde\",m:\"un minut\",mm:relativeTimeWithPlural$2,h:\"o oră\",hh:relativeTimeWithPlural$2,d:\"o zi\",dd:relativeTimeWithPlural$2,M:\"o lună\",MM:relativeTimeWithPlural$2,y:\"un an\",yy:relativeTimeWithPlural$2},week:{dow:1,doy:7}});function plural$4(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}function relativeTimeWithPlural$3(number,withoutSuffix,key){var format={mm:withoutSuffix?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"};if(key===\"m\"){return withoutSuffix?\"минута\":\"минуту\"}else{return number+\" \"+plural$4(format[key],+number)}}var monthsParse$4=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];hooks.defineLocale(\"ru\",{months:{format:\"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря\".split(\"_\"),standalone:\"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь\".split(\"_\")},monthsShort:{format:\"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.\".split(\"_\"),standalone:\"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.\".split(\"_\")},weekdays:{standalone:\"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота\".split(\"_\"),format:\"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу\".split(\"_\"),isFormat:/\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\\] ?dddd/},weekdaysShort:\"вс_пн_вт_ср_чт_пт_сб\".split(\"_\"),weekdaysMin:\"вс_пн_вт_ср_чт_пт_сб\".split(\"_\"),monthsParse:monthsParse$4,longMonthsParse:monthsParse$4,shortMonthsParse:monthsParse$4,monthsRegex:/^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,monthsShortRegex:/^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY г.\",LLL:\"D MMMM YYYY г., HH:mm\",LLLL:\"dddd, D MMMM YYYY г., HH:mm\"},calendar:{sameDay:\"[Сегодня в] LT\",nextDay:\"[Завтра в] LT\",lastDay:\"[Вчера в] LT\",nextWeek:function(now){if(now.week()!==this.week()){switch(this.day()){case 0:return\"[В следующее] dddd [в] LT\";case 1:case 2:case 4:return\"[В следующий] dddd [в] LT\";case 3:case 5:case 6:return\"[В следующую] dddd [в] LT\"}}else{if(this.day()===2){return\"[Во] dddd [в] LT\"}else{return\"[В] dddd [в] LT\"}}},lastWeek:function(now){if(now.week()!==this.week()){switch(this.day()){case 0:return\"[В прошлое] dddd [в] LT\";case 1:case 2:case 4:return\"[В прошлый] dddd [в] LT\";case 3:case 5:case 6:return\"[В прошлую] dddd [в] LT\"}}else{if(this.day()===2){return\"[Во] dddd [в] LT\"}else{return\"[В] dddd [в] LT\"}}},sameElse:\"L\"},relativeTime:{future:\"через %s\",past:\"%s назад\",s:\"несколько секунд\",m:relativeTimeWithPlural$3,mm:relativeTimeWithPlural$3,h:\"час\",hh:relativeTimeWithPlural$3,d:\"день\",dd:relativeTimeWithPlural$3,M:\"месяц\",MM:relativeTimeWithPlural$3,y:\"год\",yy:relativeTimeWithPlural$3},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(input){return/^(дня|вечера)$/.test(input)},meridiem:function(hour,minute,isLower){if(hour<4){return\"ночи\"}else if(hour<12){return\"утра\"}else if(hour<17){return\"дня\"}else{return\"вечера\"}},dayOfMonthOrdinalParse:/\\d{1,2}-(й|го|я)/,ordinal:function(number,period){switch(period){case\"M\":case\"d\":case\"DDD\":return number+\"-й\";case\"D\":return number+\"-го\";case\"w\":case\"W\":return number+\"-я\";default:return number}},week:{dow:1,doy:4}});var months$6=[\"جنوري\",\"فيبروري\",\"مارچ\",\"اپريل\",\"مئي\",\"جون\",\"جولاءِ\",\"آگسٽ\",\"سيپٽمبر\",\"آڪٽوبر\",\"نومبر\",\"ڊسمبر\"];var days$1=[\"آچر\",\"سومر\",\"اڱارو\",\"اربع\",\"خميس\",\"جمع\",\"ڇنڇر\"];hooks.defineLocale(\"sd\",{months:months$6,monthsShort:months$6,weekdays:days$1,weekdaysShort:days$1,weekdaysMin:days$1,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd، D MMMM YYYY HH:mm\"},meridiemParse:/صبح|شام/,isPM:function(input){return\"شام\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"صبح\"}return\"شام\"},calendar:{sameDay:\"[اڄ] LT\",nextDay:\"[سڀاڻي] LT\",nextWeek:\"dddd [اڳين هفتي تي] LT\",lastDay:\"[ڪالهه] LT\",lastWeek:\"[گزريل هفتي] dddd [تي] LT\",sameElse:\"L\"},relativeTime:{future:\"%s پوء\",past:\"%s اڳ\",s:\"چند سيڪنڊ\",m:\"هڪ منٽ\",mm:\"%d منٽ\",h:\"هڪ ڪلاڪ\",hh:\"%d ڪلاڪ\",d:\"هڪ ڏينهن\",dd:\"%d ڏينهن\",M:\"هڪ مهينو\",MM:\"%d مهينا\",y:\"هڪ سال\",yy:\"%d سال\"},preparse:function(string){return string.replace(/،/g,\",\")},postformat:function(string){return string.replace(/,/g,\"،\")},week:{dow:1,doy:4}});hooks.defineLocale(\"se\",{months:\"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu\".split(\"_\"),monthsShort:\"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov\".split(\"_\"),weekdays:\"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat\".split(\"_\"),weekdaysShort:\"sotn_vuos_maŋ_gask_duor_bear_láv\".split(\"_\"),weekdaysMin:\"s_v_m_g_d_b_L\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"MMMM D. [b.] YYYY\",LLL:\"MMMM D. [b.] YYYY [ti.] HH:mm\",LLLL:\"dddd, MMMM D. [b.] YYYY [ti.] HH:mm\"},calendar:{sameDay:\"[otne ti] LT\",nextDay:\"[ihttin ti] LT\",nextWeek:\"dddd [ti] LT\",lastDay:\"[ikte ti] LT\",lastWeek:\"[ovddit] dddd [ti] LT\",sameElse:\"L\"},relativeTime:{future:\"%s geažes\",past:\"maŋit %s\",s:\"moadde sekunddat\",m:\"okta minuhta\",mm:\"%d minuhtat\",h:\"okta diimmu\",hh:\"%d diimmut\",d:\"okta beaivi\",dd:\"%d beaivvit\",M:\"okta mánnu\",MM:\"%d mánut\",y:\"okta jahki\",yy:\"%d jagit\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});hooks.defineLocale(\"si\",{months:\"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්\".split(\"_\"),monthsShort:\"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ\".split(\"_\"),weekdays:\"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා\".split(\"_\"),weekdaysShort:\"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන\".split(\"_\"),weekdaysMin:\"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"a h:mm\",LTS:\"a h:mm:ss\",L:\"YYYY/MM/DD\",LL:\"YYYY MMMM D\",LLL:\"YYYY MMMM D, a h:mm\",LLLL:\"YYYY MMMM D [වැනි] dddd, a h:mm:ss\"},calendar:{sameDay:\"[අද] LT[ට]\",nextDay:\"[හෙට] LT[ට]\",nextWeek:\"dddd LT[ට]\",lastDay:\"[ඊයේ] LT[ට]\",lastWeek:\"[පසුගිය] dddd LT[ට]\",sameElse:\"L\"},relativeTime:{future:\"%sකින්\",past:\"%sකට පෙර\",s:\"තත්පර කිහිපය\",m:\"මිනිත්තුව\",mm:\"මිනිත්තු %d\",h:\"පැය\",hh:\"පැය %d\",d:\"දිනය\",dd:\"දින %d\",M:\"මාසය\",MM:\"මාස %d\",y:\"වසර\",yy:\"වසර %d\"},dayOfMonthOrdinalParse:/\\d{1,2} වැනි/,ordinal:function(number){return number+\" වැනි\"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(input){return input===\"ප.ව.\"||input===\"පස් වරු\"},meridiem:function(hours,minutes,isLower){if(hours>11){return isLower?\"ප.ව.\":\"පස් වරු\"}else{return isLower?\"පෙ.ව.\":\"පෙර වරු\"}}})\n;var months$7=\"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december\".split(\"_\");var monthsShort$5=\"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec\".split(\"_\");function plural$5(n){return n>1&&n<5}function translate$8(number,withoutSuffix,key,isFuture){var result=number+\" \";switch(key){case\"s\":return withoutSuffix||isFuture?\"pár sekúnd\":\"pár sekundami\";case\"m\":return withoutSuffix?\"minúta\":isFuture?\"minútu\":\"minútou\";case\"mm\":if(withoutSuffix||isFuture){return result+(plural$5(number)?\"minúty\":\"minút\")}else{return result+\"minútami\"}break;case\"h\":return withoutSuffix?\"hodina\":isFuture?\"hodinu\":\"hodinou\";case\"hh\":if(withoutSuffix||isFuture){return result+(plural$5(number)?\"hodiny\":\"hodín\")}else{return result+\"hodinami\"}break;case\"d\":return withoutSuffix||isFuture?\"deň\":\"dňom\";case\"dd\":if(withoutSuffix||isFuture){return result+(plural$5(number)?\"dni\":\"dní\")}else{return result+\"dňami\"}break;case\"M\":return withoutSuffix||isFuture?\"mesiac\":\"mesiacom\";case\"MM\":if(withoutSuffix||isFuture){return result+(plural$5(number)?\"mesiace\":\"mesiacov\")}else{return result+\"mesiacmi\"}break;case\"y\":return withoutSuffix||isFuture?\"rok\":\"rokom\";case\"yy\":if(withoutSuffix||isFuture){return result+(plural$5(number)?\"roky\":\"rokov\")}else{return result+\"rokmi\"}break}}hooks.defineLocale(\"sk\",{months:months$7,monthsShort:monthsShort$5,weekdays:\"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota\".split(\"_\"),weekdaysShort:\"ne_po_ut_st_št_pi_so\".split(\"_\"),weekdaysMin:\"ne_po_ut_st_št_pi_so\".split(\"_\"),longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[dnes o] LT\",nextDay:\"[zajtra o] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[v nedeľu o] LT\";case 1:case 2:return\"[v] dddd [o] LT\";case 3:return\"[v stredu o] LT\";case 4:return\"[vo štvrtok o] LT\";case 5:return\"[v piatok o] LT\";case 6:return\"[v sobotu o] LT\"}},lastDay:\"[včera o] LT\",lastWeek:function(){switch(this.day()){case 0:return\"[minulú nedeľu o] LT\";case 1:case 2:return\"[minulý] dddd [o] LT\";case 3:return\"[minulú stredu o] LT\";case 4:case 5:return\"[minulý] dddd [o] LT\";case 6:return\"[minulú sobotu o] LT\"}},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"pred %s\",s:translate$8,m:translate$8,mm:translate$8,h:translate$8,hh:translate$8,d:translate$8,dd:translate$8,M:translate$8,MM:translate$8,y:translate$8,yy:translate$8},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});function processRelativeTime$6(number,withoutSuffix,key,isFuture){var result=number+\" \";switch(key){case\"s\":return withoutSuffix||isFuture?\"nekaj sekund\":\"nekaj sekundami\";case\"m\":return withoutSuffix?\"ena minuta\":\"eno minuto\";case\"mm\":if(number===1){result+=withoutSuffix?\"minuta\":\"minuto\"}else if(number===2){result+=withoutSuffix||isFuture?\"minuti\":\"minutama\"}else if(number<5){result+=withoutSuffix||isFuture?\"minute\":\"minutami\"}else{result+=withoutSuffix||isFuture?\"minut\":\"minutami\"}return result;case\"h\":return withoutSuffix?\"ena ura\":\"eno uro\";case\"hh\":if(number===1){result+=withoutSuffix?\"ura\":\"uro\"}else if(number===2){result+=withoutSuffix||isFuture?\"uri\":\"urama\"}else if(number<5){result+=withoutSuffix||isFuture?\"ure\":\"urami\"}else{result+=withoutSuffix||isFuture?\"ur\":\"urami\"}return result;case\"d\":return withoutSuffix||isFuture?\"en dan\":\"enim dnem\";case\"dd\":if(number===1){result+=withoutSuffix||isFuture?\"dan\":\"dnem\"}else if(number===2){result+=withoutSuffix||isFuture?\"dni\":\"dnevoma\"}else{result+=withoutSuffix||isFuture?\"dni\":\"dnevi\"}return result;case\"M\":return withoutSuffix||isFuture?\"en mesec\":\"enim mesecem\";case\"MM\":if(number===1){result+=withoutSuffix||isFuture?\"mesec\":\"mesecem\"}else if(number===2){result+=withoutSuffix||isFuture?\"meseca\":\"mesecema\"}else if(number<5){result+=withoutSuffix||isFuture?\"mesece\":\"meseci\"}else{result+=withoutSuffix||isFuture?\"mesecev\":\"meseci\"}return result;case\"y\":return withoutSuffix||isFuture?\"eno leto\":\"enim letom\";case\"yy\":if(number===1){result+=withoutSuffix||isFuture?\"leto\":\"letom\"}else if(number===2){result+=withoutSuffix||isFuture?\"leti\":\"letoma\"}else if(number<5){result+=withoutSuffix||isFuture?\"leta\":\"leti\"}else{result+=withoutSuffix||isFuture?\"let\":\"leti\"}return result}}hooks.defineLocale(\"sl\",{months:\"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december\".split(\"_\"),monthsShort:\"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota\".split(\"_\"),weekdaysShort:\"ned._pon._tor._sre._čet._pet._sob.\".split(\"_\"),weekdaysMin:\"ne_po_to_sr_če_pe_so\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[danes ob] LT\",nextDay:\"[jutri ob] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[v] [nedeljo] [ob] LT\";case 3:return\"[v] [sredo] [ob] LT\";case 6:return\"[v] [soboto] [ob] LT\";case 1:case 2:case 4:case 5:return\"[v] dddd [ob] LT\"}},lastDay:\"[včeraj ob] LT\",lastWeek:function(){switch(this.day()){case 0:return\"[prejšnjo] [nedeljo] [ob] LT\";case 3:return\"[prejšnjo] [sredo] [ob] LT\";case 6:return\"[prejšnjo] [soboto] [ob] LT\";case 1:case 2:case 4:case 5:return\"[prejšnji] dddd [ob] LT\"}},sameElse:\"L\"},relativeTime:{future:\"čez %s\",past:\"pred %s\",s:processRelativeTime$6,m:processRelativeTime$6,mm:processRelativeTime$6,h:processRelativeTime$6,hh:processRelativeTime$6,d:processRelativeTime$6,dd:processRelativeTime$6,M:processRelativeTime$6,MM:processRelativeTime$6,y:processRelativeTime$6,yy:processRelativeTime$6},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});hooks.defineLocale(\"sq\",{months:\"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor\".split(\"_\"),monthsShort:\"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj\".split(\"_\"),weekdays:\"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë\".split(\"_\"),weekdaysShort:\"Die_Hën_Mar_Mër_Enj_Pre_Sht\".split(\"_\"),weekdaysMin:\"D_H_Ma_Më_E_P_Sh\".split(\"_\"),weekdaysParseExact:true,meridiemParse:/PD|MD/,isPM:function(input){return input.charAt(0)===\"M\"},meridiem:function(hours,minutes,isLower){return hours<12?\"PD\":\"MD\"},longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Sot në] LT\",nextDay:\"[Nesër në] LT\",nextWeek:\"dddd [në] LT\",lastDay:\"[Dje në] LT\",lastWeek:\"dddd [e kaluar në] LT\",sameElse:\"L\"},relativeTime:{future:\"në %s\",past:\"%s më parë\",s:\"disa sekonda\",m:\"një minutë\",mm:\"%d minuta\",h:\"një orë\",hh:\"%d orë\",d:\"një ditë\",dd:\"%d ditë\",M:\"një muaj\",MM:\"%d muaj\",y:\"një vit\",yy:\"%d vite\"},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var translator$1={words:{m:[\"један минут\",\"једне минуте\"],mm:[\"минут\",\"минуте\",\"минута\"],h:[\"један сат\",\"једног сата\"],hh:[\"сат\",\"сата\",\"сати\"],dd:[\"дан\",\"дана\",\"дана\"],MM:[\"месец\",\"месеца\",\"месеци\"],yy:[\"година\",\"године\",\"година\"]},correctGrammaticalCase:function(number,wordKey){return number===1?wordKey[0]:number>=2&&number<=4?wordKey[1]:wordKey[2]},translate:function(number,withoutSuffix,key){var wordKey=translator$1.words[key];if(key.length===1){return withoutSuffix?wordKey[0]:wordKey[1]}else{return number+\" \"+translator$1.correctGrammaticalCase(number,wordKey)}}};hooks.defineLocale(\"sr-cyrl\",{months:\"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар\".split(\"_\"),monthsShort:\"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.\".split(\"_\"),monthsParseExact:true,weekdays:\"недеља_понедељак_уторак_среда_четвртак_петак_субота\".split(\"_\"),weekdaysShort:\"нед._пон._уто._сре._чет._пет._суб.\".split(\"_\"),weekdaysMin:\"не_по_ут_ср_че_пе_су\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[данас у] LT\",nextDay:\"[сутра у] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[у] [недељу] [у] LT\";case 3:return\"[у] [среду] [у] LT\";case 6:return\"[у] [суботу] [у] LT\";case 1:case 2:case 4:case 5:return\"[у] dddd [у] LT\"}},lastDay:\"[јуче у] LT\",lastWeek:function(){var lastWeekDays=[\"[прошле] [недеље] [у] LT\",\"[прошлог] [понедељка] [у] LT\",\"[прошлог] [уторка] [у] LT\",\"[прошле] [среде] [у] LT\",\"[прошлог] [четвртка] [у] LT\",\"[прошлог] [петка] [у] LT\",\"[прошле] [суботе] [у] LT\"];return lastWeekDays[this.day()]},sameElse:\"L\"},relativeTime:{future:\"за %s\",past:\"пре %s\",s:\"неколико секунди\",m:translator$1.translate,mm:translator$1.translate,h:translator$1.translate,hh:translator$1.translate,d:\"дан\",dd:translator$1.translate,M:\"месец\",MM:translator$1.translate,y:\"годину\",yy:translator$1.translate},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});var translator$2={words:{m:[\"jedan minut\",\"jedne minute\"],mm:[\"minut\",\"minute\",\"minuta\"],h:[\"jedan sat\",\"jednog sata\"],hh:[\"sat\",\"sata\",\"sati\"],dd:[\"dan\",\"dana\",\"dana\"],MM:[\"mesec\",\"meseca\",\"meseci\"],yy:[\"godina\",\"godine\",\"godina\"]},correctGrammaticalCase:function(number,wordKey){return number===1?wordKey[0]:number>=2&&number<=4?wordKey[1]:wordKey[2]},translate:function(number,withoutSuffix,key){var wordKey=translator$2.words[key];if(key.length===1){return withoutSuffix?wordKey[0]:wordKey[1]}else{return number+\" \"+translator$2.correctGrammaticalCase(number,wordKey)}}};hooks.defineLocale(\"sr\",{months:\"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar\".split(\"_\"),monthsShort:\"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.\".split(\"_\"),monthsParseExact:true,weekdays:\"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota\".split(\"_\"),weekdaysShort:\"ned._pon._uto._sre._čet._pet._sub.\".split(\"_\"),weekdaysMin:\"ne_po_ut_sr_če_pe_su\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY H:mm\",LLLL:\"dddd, D. MMMM YYYY H:mm\"},calendar:{sameDay:\"[danas u] LT\",nextDay:\"[sutra u] LT\",nextWeek:function(){switch(this.day()){case 0:return\"[u] [nedelju] [u] LT\";case 3:return\"[u] [sredu] [u] LT\";case 6:return\"[u] [subotu] [u] LT\";case 1:case 2:case 4:case 5:return\"[u] dddd [u] LT\"}},lastDay:\"[juče u] LT\",lastWeek:function(){var lastWeekDays=[\"[prošle] [nedelje] [u] LT\",\"[prošlog] [ponedeljka] [u] LT\",\"[prošlog] [utorka] [u] LT\",\"[prošle] [srede] [u] LT\",\"[prošlog] [četvrtka] [u] LT\",\"[prošlog] [petka] [u] LT\",\"[prošle] [subote] [u] LT\"];return lastWeekDays[this.day()]},sameElse:\"L\"},relativeTime:{future:\"za %s\",past:\"pre %s\",s:\"nekoliko sekundi\",m:translator$2.translate,mm:translator$2.translate,h:translator$2.translate,hh:translator$2.translate,d:\"dan\",dd:translator$2.translate,M:\"mesec\",MM:translator$2.translate,y:\"godinu\",yy:translator$2.translate},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:7}});hooks.defineLocale(\"ss\",{months:\"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\"_\"),monthsShort:\"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo\".split(\"_\"),weekdays:\"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo\".split(\"_\"),weekdaysShort:\"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg\".split(\"_\"),weekdaysMin:\"Li_Us_Lb_Lt_Ls_Lh_Ug\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendar:{sameDay:\"[Namuhla nga] LT\",nextDay:\"[Kusasa nga] LT\",nextWeek:\"dddd [nga] LT\",lastDay:\"[Itolo nga] LT\",lastWeek:\"dddd [leliphelile] [nga] LT\",sameElse:\"L\"},relativeTime:{future:\"nga %s\",past:\"wenteka nga %s\",s:\"emizuzwana lomcane\",m:\"umzuzu\",mm:\"%d emizuzu\",h:\"lihora\",hh:\"%d emahora\",d:\"lilanga\",dd:\"%d emalanga\",M:\"inyanga\",MM:\"%d tinyanga\",y:\"umnyaka\",yy:\"%d iminyaka\"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(hours,minutes,isLower){if(hours<11){return\"ekuseni\"}else if(hours<15){return\"emini\"}else if(hours<19){return\"entsambama\"}else{return\"ebusuku\"}},meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"ekuseni\"){return hour}else if(meridiem===\"emini\"){return hour>=11?hour:hour+12}else if(meridiem===\"entsambama\"||meridiem===\"ebusuku\"){if(hour===0){return 0}return hour+12}},dayOfMonthOrdinalParse:/\\d{1,2}/,ordinal:\"%d\",week:{dow:1,doy:4}});hooks.defineLocale(\"sv\",{months:\"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december\".split(\"_\"),monthsShort:\"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec\".split(\"_\"),weekdays:\"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag\".split(\"_\"),weekdaysShort:\"sön_mån_tis_ons_tor_fre_lör\".split(\"_\"),weekdaysMin:\"sö_må_ti_on_to_fr_lö\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY-MM-DD\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY [kl.] HH:mm\",LLLL:\"dddd D MMMM YYYY [kl.] HH:mm\",lll:\"D MMM YYYY HH:mm\",llll:\"ddd D MMM YYYY HH:mm\"},calendar:{sameDay:\"[Idag] LT\",nextDay:\"[Imorgon] LT\",lastDay:\"[Igår] LT\",nextWeek:\"[På] dddd LT\",lastWeek:\"[I] dddd[s] LT\",sameElse:\"L\"},relativeTime:{future:\"om %s\",past:\"för %s sedan\",s:\"några sekunder\",m:\"en minut\",mm:\"%d minuter\",h:\"en timme\",hh:\"%d timmar\",d:\"en dag\",dd:\"%d dagar\",M:\"en månad\",MM:\"%d månader\",y:\"ett år\",yy:\"%d år\"},dayOfMonthOrdinalParse:/\\d{1,2}(e|a)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"e\":b===1?\"a\":b===2?\"a\":b===3?\"e\":\"e\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"sw\",{months:\"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba\".split(\"_\"),monthsShort:\"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des\".split(\"_\"),weekdays:\"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi\".split(\"_\"),weekdaysShort:\"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos\".split(\"_\"),weekdaysMin:\"J2_J3_J4_J5_Al_Ij_J1\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[leo saa] LT\",nextDay:\"[kesho saa] LT\",nextWeek:\"[wiki ijayo] dddd [saat] LT\",lastDay:\"[jana] LT\",lastWeek:\"[wiki iliyopita] dddd [saat] LT\",sameElse:\"L\"},relativeTime:{future:\"%s baadaye\",past:\"tokea %s\",s:\"hivi punde\",m:\"dakika moja\",mm:\"dakika %d\",h:\"saa limoja\",hh:\"masaa %d\",d:\"siku moja\",dd:\"masiku %d\",M:\"mwezi mmoja\",MM:\"miezi %d\",y:\"mwaka mmoja\",yy:\"miaka %d\"},week:{dow:1,doy:7}});var symbolMap$13={1:\"௧\",2:\"௨\",3:\"௩\",4:\"௪\",5:\"௫\",6:\"௬\",7:\"௭\",8:\"௮\",9:\"௯\",0:\"௦\"};var numberMap$12={\"௧\":\"1\",\"௨\":\"2\",\"௩\":\"3\",\"௪\":\"4\",\"௫\":\"5\",\"௬\":\"6\",\"௭\":\"7\",\"௮\":\"8\",\"௯\":\"9\",\"௦\":\"0\"};hooks.defineLocale(\"ta\",{months:\"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்\".split(\"_\"),monthsShort:\"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்\".split(\"_\"),weekdays:\"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை\".split(\"_\"),weekdaysShort:\"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி\".split(\"_\"),weekdaysMin:\"ஞா_தி_செ_பு_வி_வெ_ச\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, HH:mm\",LLLL:\"dddd, D MMMM YYYY, HH:mm\"},calendar:{sameDay:\"[இன்று] LT\",nextDay:\"[நாளை] LT\",nextWeek:\"dddd, LT\",lastDay:\"[நேற்று] LT\",lastWeek:\"[கடந்த வாரம்] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s இல்\",past:\"%s முன்\",s:\"ஒரு சில விநாடிகள்\",m:\"ஒரு நிமிடம்\",mm:\"%d நிமிடங்கள்\",h:\"ஒரு மணி நேரம்\",hh:\"%d மணி நேரம்\",d:\"ஒரு நாள்\",dd:\"%d நாட்கள்\",M:\"ஒரு மாதம்\",MM:\"%d மாதங்கள்\",y:\"ஒரு வருடம்\",yy:\"%d ஆண்டுகள்\"},dayOfMonthOrdinalParse:/\\d{1,2}வது/,ordinal:function(number){return number+\"வது\"},preparse:function(string){return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(match){return numberMap$12[match]})},postformat:function(string){return string.replace(/\\d/g,function(match){return symbolMap$13[match]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(hour,minute,isLower){if(hour<2){return\" யாமம்\"}else if(hour<6){return\" வைகறை\"}else if(hour<10){return\" காலை\"}else if(hour<14){return\" நண்பகல்\"}else if(hour<18){return\" எற்பாடு\"}else if(hour<22){return\" மாலை\"}else{return\" யாமம்\"}},meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"யாமம்\"){return hour<2?hour:hour+12}else if(meridiem===\"வைகறை\"||meridiem===\"காலை\"){return hour}else if(meridiem===\"நண்பகல்\"){return hour>=10?hour:hour+12}else{return hour+12}},week:{dow:0,doy:6}});hooks.defineLocale(\"te\",{months:\"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్\".split(\"_\"),monthsShort:\"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.\".split(\"_\"),monthsParseExact:true,weekdays:\"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం\".split(\"_\"),weekdaysShort:\"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని\".split(\"_\"),weekdaysMin:\"ఆ_సో_మం_బు_గు_శు_శ\".split(\"_\"),longDateFormat:{LT:\"A h:mm\",LTS:\"A h:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY, A h:mm\",LLLL:\"dddd, D MMMM YYYY, A h:mm\"},calendar:{sameDay:\"[నేడు] LT\",nextDay:\"[రేపు] LT\",nextWeek:\"dddd, LT\",lastDay:\"[నిన్న] LT\",lastWeek:\"[గత] dddd, LT\",sameElse:\"L\"},relativeTime:{future:\"%s లో\",past:\"%s క్రితం\",s:\"కొన్ని క్షణాలు\",m:\"ఒక నిమిషం\",mm:\"%d నిమిషాలు\",h:\"ఒక గంట\",hh:\"%d గంటలు\",d:\"ఒక రోజు\",dd:\"%d రోజులు\",M:\"ఒక నెల\",MM:\"%d నెలలు\",y:\"ఒక సంవత్సరం\",yy:\"%d సంవత్సరాలు\"},dayOfMonthOrdinalParse:/\\d{1,2}వ/,ordinal:\"%dవ\",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"రాత్రి\"){return hour<4?hour:hour+12}else if(meridiem===\"ఉదయం\"){return hour}else if(meridiem===\"మధ్యాహ్నం\"){return hour>=10?hour:hour+12}else if(meridiem===\"సాయంత్రం\"){return hour+12}},meridiem:function(hour,minute,isLower){if(hour<4){return\"రాత్రి\"}else if(hour<10){return\"ఉదయం\"}else if(hour<17){return\"మధ్యాహ్నం\"}else if(hour<20){return\"సాయంత్రం\"}else{return\"రాత్రి\"}},week:{dow:0,doy:6}});hooks.defineLocale(\"tet\",{months:\"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru\".split(\"_\"),monthsShort:\"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez\".split(\"_\"),weekdays:\"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu\".split(\"_\"),weekdaysShort:\"Dom_Seg_Ters_Kua_Kint_Sext_Sab\".split(\"_\"),weekdaysMin:\"Do_Seg_Te_Ku_Ki_Sex_Sa\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[Ohin iha] LT\",nextDay:\"[Aban iha] LT\",nextWeek:\"dddd [iha] LT\",lastDay:\"[Horiseik iha] LT\",lastWeek:\"dddd [semana kotuk] [iha] LT\",sameElse:\"L\"},relativeTime:{future:\"iha %s\",past:\"%s liuba\",s:\"minutu balun\",m:\"minutu ida\",mm:\"minutus %d\",h:\"horas ida\",hh:\"horas %d\",d:\"loron ida\",dd:\"loron %d\",M:\"fulan ida\",MM:\"fulan %d\",y:\"tinan ida\",yy:\"tinan %d\"},dayOfMonthOrdinalParse:/\\d{1,2}(st|nd|rd|th)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"th\",{months:\"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม\".split(\"_\"),monthsShort:\"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.\".split(\"_\"),monthsParseExact:true,weekdays:\"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์\".split(\"_\"),weekdaysShort:\"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์\".split(\"_\"),weekdaysMin:\"อา._จ._อ._พ._พฤ._ศ._ส.\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"H:mm\",LTS:\"H:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY เวลา H:mm\",LLLL:\"วันddddที่ D MMMM YYYY เวลา H:mm\"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(input){return input===\"หลังเที่ยง\"},meridiem:function(hour,minute,isLower){if(hour<12){return\"ก่อนเที่ยง\"}else{return\"หลังเที่ยง\"}},calendar:{sameDay:\"[วันนี้ เวลา] LT\",nextDay:\"[พรุ่งนี้ เวลา] LT\",nextWeek:\"dddd[หน้า เวลา] LT\",lastDay:\"[เมื่อวานนี้ เวลา] LT\",lastWeek:\"[วัน]dddd[ที่แล้ว เวลา] LT\",sameElse:\"L\"},relativeTime:{future:\"อีก %s\",past:\"%sที่แล้ว\",s:\"ไม่กี่วินาที\",m:\"1 นาที\",mm:\"%d นาที\",h:\"1 ชั่วโมง\",hh:\"%d ชั่วโมง\",d:\"1 วัน\",dd:\"%d วัน\",M:\"1 เดือน\",MM:\"%d เดือน\",y:\"1 ปี\",yy:\"%d ปี\"}});hooks.defineLocale(\"tl-ph\",{months:\"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre\".split(\"_\"),monthsShort:\"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis\".split(\"_\"),weekdays:\"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado\".split(\"_\"),weekdaysShort:\"Lin_Lun_Mar_Miy_Huw_Biy_Sab\".split(\"_\"),weekdaysMin:\"Li_Lu_Ma_Mi_Hu_Bi_Sab\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"MM/D/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY HH:mm\",LLLL:\"dddd, MMMM DD, YYYY HH:mm\"},calendar:{sameDay:\"LT [ngayong araw]\",nextDay:\"[Bukas ng] LT\",nextWeek:\"LT [sa susunod na] dddd\",lastDay:\"LT [kahapon]\",lastWeek:\"LT [noong nakaraang] dddd\",sameElse:\"L\"},relativeTime:{future:\"sa loob ng %s\",past:\"%s ang nakalipas\",s:\"ilang segundo\",m:\"isang minuto\",mm:\"%d minuto\",h:\"isang oras\",hh:\"%d oras\",d:\"isang araw\",dd:\"%d araw\",M:\"isang buwan\",MM:\"%d buwan\",y:\"isang taon\",yy:\"%d taon\"},dayOfMonthOrdinalParse:/\\d{1,2}/,ordinal:function(number){return number},week:{dow:1,doy:4}});var numbersNouns=\"pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut\".split(\"_\");function translateFuture(output){var time=output;time=output.indexOf(\"jaj\")!==-1?time.slice(0,-3)+\"leS\":output.indexOf(\"jar\")!==-1?time.slice(0,-3)+\"waQ\":output.indexOf(\"DIS\")!==-1?time.slice(0,-3)+\"nem\":time+\" pIq\";return time}function translatePast(output){var time=output;time=output.indexOf(\"jaj\")!==-1?time.slice(0,-3)+\"Hu’\":output.indexOf(\"jar\")!==-1?time.slice(0,-3)+\"wen\":output.indexOf(\"DIS\")!==-1?time.slice(0,-3)+\"ben\":time+\" ret\";return time}function translate$9(number,withoutSuffix,string,isFuture){var numberNoun=numberAsNoun(number);switch(string){case\"mm\":return numberNoun+\" tup\";case\"hh\":return numberNoun+\" rep\";case\"dd\":return numberNoun+\" jaj\";case\"MM\":return numberNoun+\" jar\";case\"yy\":return numberNoun+\" DIS\"}}function numberAsNoun(number){var hundred=Math.floor(number%1e3/100),ten=Math.floor(number%100/10),one=number%10,word=\"\";if(hundred>0){word+=numbersNouns[hundred]+\"vatlh\"}if(ten>0){word+=(word!==\"\"?\" \":\"\")+numbersNouns[ten]+\"maH\"}if(one>0){word+=(word!==\"\"?\" \":\"\")+numbersNouns[one]}return word===\"\"?\"pagh\":word}hooks.defineLocale(\"tlh\",{months:\"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’\".split(\"_\"),monthsShort:\"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’\".split(\"_\"),monthsParseExact:true,weekdays:\"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj\".split(\"_\"),weekdaysShort:\"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj\".split(\"_\"),weekdaysMin:\"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[DaHjaj] LT\",nextDay:\"[wa’leS] LT\",nextWeek:\"LLL\",lastDay:\"[wa’Hu’] LT\",lastWeek:\"LLL\",sameElse:\"L\"},relativeTime:{future:translateFuture,past:translatePast,s:\"puS lup\",m:\"wa’ tup\",mm:translate$9,h:\"wa’ rep\",hh:translate$9,d:\"wa’ jaj\",dd:translate$9,M:\"wa’ jar\",MM:translate$9,y:\"wa’ DIS\",yy:translate$9},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});var suffixes$3={1:\"'inci\",5:\"'inci\",8:\"'inci\",70:\"'inci\",80:\"'inci\",2:\"'nci\",7:\"'nci\",20:\"'nci\",50:\"'nci\",3:\"'üncü\",4:\"'üncü\",100:\"'üncü\",6:\"'ncı\",9:\"'uncu\",10:\"'uncu\",30:\"'uncu\",60:\"'ıncı\",90:\"'ıncı\"};hooks.defineLocale(\"tr\",{months:\"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık\".split(\"_\"),monthsShort:\"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara\".split(\"_\"),weekdays:\"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi\".split(\"_\"),weekdaysShort:\"Paz_Pts_Sal_Çar_Per_Cum_Cts\".split(\"_\"),weekdaysMin:\"Pz_Pt_Sa_Ça_Pe_Cu_Ct\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[bugün saat] LT\",nextDay:\"[yarın saat] LT\",nextWeek:\"[gelecek] dddd [saat] LT\",lastDay:\"[dün] LT\",lastWeek:\"[geçen] dddd [saat] LT\",sameElse:\"L\"},relativeTime:{future:\"%s sonra\",past:\"%s önce\",s:\"birkaç saniye\",m:\"bir dakika\",mm:\"%d dakika\",h:\"bir saat\",hh:\"%d saat\",d:\"bir gün\",dd:\"%d gün\",M:\"bir ay\",MM:\"%d ay\",y:\"bir yıl\",yy:\"%d yıl\"},dayOfMonthOrdinalParse:/\\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(number){if(number===0){return number+\"'ıncı\"}var a=number%10,b=number%100-a,c=number>=100?100:null;return number+(suffixes$3[a]||suffixes$3[b]||suffixes$3[c])},week:{dow:1,doy:7}});hooks.defineLocale(\"tzl\",{months:\"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar\".split(\"_\"),monthsShort:\"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec\".split(\"_\"),weekdays:\"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi\".split(\"_\"),weekdaysShort:\"Súl_Lún_Mai_Már_Xhú_Vié_Sát\".split(\"_\"),weekdaysMin:\"Sú_Lú_Ma_Má_Xh_Vi_Sá\".split(\"_\"),longDateFormat:{LT:\"HH.mm\",LTS:\"HH.mm.ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM [dallas] YYYY\",LLL:\"D. MMMM [dallas] YYYY HH.mm\",LLLL:\"dddd, [li] D. MMMM [dallas] YYYY HH.mm\"},meridiemParse:/d\\'o|d\\'a/i,isPM:function(input){return\"d'o\"===input.toLowerCase()},meridiem:function(hours,minutes,isLower){if(hours>11){return isLower?\"d'o\":\"D'O\"}else{return isLower?\"d'a\":\"D'A\"}},calendar:{sameDay:\"[oxhi à] LT\",nextDay:\"[demà à] LT\",nextWeek:\"dddd [à] LT\",lastDay:\"[ieiri à] LT\",lastWeek:\"[sür el] dddd [lasteu à] LT\",sameElse:\"L\"},relativeTime:{future:\"osprei %s\",past:\"ja%s\",s:processRelativeTime$7,m:processRelativeTime$7,mm:processRelativeTime$7,h:processRelativeTime$7,hh:processRelativeTime$7,d:processRelativeTime$7,dd:processRelativeTime$7,M:processRelativeTime$7,MM:processRelativeTime$7,y:processRelativeTime$7,yy:processRelativeTime$7},dayOfMonthOrdinalParse:/\\d{1,2}\\./,ordinal:\"%d.\",week:{dow:1,doy:4}});function processRelativeTime$7(number,withoutSuffix,key,isFuture){var format={s:[\"viensas secunds\",\"'iensas secunds\"],m:[\"'n míut\",\"'iens míut\"],mm:[number+\" míuts\",\"\"+number+\" míuts\"],h:[\"'n þora\",\"'iensa þora\"],hh:[number+\" þoras\",\"\"+number+\" þoras\"],d:[\"'n ziua\",\"'iensa ziua\"],dd:[number+\" ziuas\",\"\"+number+\" ziuas\"],M:[\"'n mes\",\"'iens mes\"],MM:[number+\" mesen\",\"\"+number+\" mesen\"],y:[\"'n ar\",\"'iens ar\"],yy:[number+\" ars\",\"\"+number+\" ars\"]};return isFuture?format[key][0]:withoutSuffix?format[key][0]:format[key][1]}hooks.defineLocale(\"tzm-latn\",{months:\"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir\".split(\"_\"),monthsShort:\"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir\".split(\"_\"),weekdays:\"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas\".split(\"_\"),weekdaysShort:\"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas\".split(\"_\"),weekdaysMin:\"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[asdkh g] LT\",nextDay:\"[aska g] LT\",nextWeek:\"dddd [g] LT\",lastDay:\"[assant g] LT\",lastWeek:\"dddd [g] LT\",sameElse:\"L\"},relativeTime:{future:\"dadkh s yan %s\",past:\"yan %s\",s:\"imik\",m:\"minuḍ\",mm:\"%d minuḍ\",h:\"saɛa\",hh:\"%d tassaɛin\",d:\"ass\",dd:\"%d ossan\",M:\"ayowr\",MM:\"%d iyyirn\",y:\"asgas\",yy:\"%d isgasn\"},week:{dow:6,doy:12}});hooks.defineLocale(\"tzm\",{months:\"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ\".split(\"_\"),monthsShort:\"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ\".split(\"_\"),weekdays:\"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ\".split(\"_\"),weekdaysShort:\"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ\".split(\"_\"),weekdaysMin:\"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[ⴰⵙⴷⵅ ⴴ] LT\",nextDay:\"[ⴰⵙⴽⴰ ⴴ] LT\",nextWeek:\"dddd [ⴴ] LT\",lastDay:\"[ⴰⵚⴰⵏⵜ ⴴ] LT\",lastWeek:\"dddd [ⴴ] LT\",sameElse:\"L\"},relativeTime:{future:\"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s\",past:\"ⵢⴰⵏ %s\",s:\"ⵉⵎⵉⴽ\",m:\"ⵎⵉⵏⵓⴺ\",mm:\"%d ⵎⵉⵏⵓⴺ\",h:\"ⵙⴰⵄⴰ\",hh:\"%d ⵜⴰⵙⵙⴰⵄⵉⵏ\",d:\"ⴰⵙⵙ\",dd:\"%d oⵙⵙⴰⵏ\",M:\"ⴰⵢoⵓⵔ\",MM:\"%d ⵉⵢⵢⵉⵔⵏ\",y:\"ⴰⵙⴳⴰⵙ\",yy:\"%d ⵉⵙⴳⴰⵙⵏ\"},week:{dow:6,doy:12}});function plural$6(word,num){var forms=word.split(\"_\");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&num%10<=4&&(num%100<10||num%100>=20)?forms[1]:forms[2]}function relativeTimeWithPlural$4(number,withoutSuffix,key){var format={mm:withoutSuffix?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:withoutSuffix?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"};if(key===\"m\"){return withoutSuffix?\"хвилина\":\"хвилину\"}else if(key===\"h\"){return withoutSuffix?\"година\":\"годину\"}else{return number+\" \"+plural$6(format[key],+number)}}function weekdaysCaseReplace(m,format){var weekdays={nominative:\"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота\".split(\"_\"),accusative:\"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу\".split(\"_\"),genitive:\"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи\".split(\"_\")};if(!m){return weekdays[\"nominative\"]}var nounCase=/(\\[[ВвУу]\\]) ?dddd/.test(format)?\"accusative\":/\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)?\"genitive\":\"nominative\";return weekdays[nounCase][m.day()]}function processHoursFunction(str){return function(){return str+\"о\"+(this.hours()===11?\"б\":\"\")+\"] LT\"}}hooks.defineLocale(\"uk\",{months:{format:\"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня\".split(\"_\"),standalone:\"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень\".split(\"_\")},monthsShort:\"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд\".split(\"_\"),weekdays:weekdaysCaseReplace,weekdaysShort:\"нд_пн_вт_ср_чт_пт_сб\".split(\"_\"),weekdaysMin:\"нд_пн_вт_ср_чт_пт_сб\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY р.\",LLL:\"D MMMM YYYY р., HH:mm\",LLLL:\"dddd, D MMMM YYYY р., HH:mm\"},calendar:{sameDay:processHoursFunction(\"[Сьогодні \"),nextDay:processHoursFunction(\"[Завтра \"),lastDay:processHoursFunction(\"[Вчора \"),nextWeek:processHoursFunction(\"[У] dddd [\"),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return processHoursFunction(\"[Минулої] dddd [\").call(this);case 1:case 2:case 4:return processHoursFunction(\"[Минулого] dddd [\").call(this)}},sameElse:\"L\"},relativeTime:{future:\"за %s\",past:\"%s тому\",s:\"декілька секунд\",m:relativeTimeWithPlural$4,mm:relativeTimeWithPlural$4,h:\"годину\",hh:relativeTimeWithPlural$4,d:\"день\",dd:relativeTimeWithPlural$4,M:\"місяць\",MM:relativeTimeWithPlural$4,y:\"рік\",yy:relativeTimeWithPlural$4},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(input){return/^(дня|вечора)$/.test(input)},meridiem:function(hour,minute,isLower){if(hour<4){return\"ночі\"}else if(hour<12){return\"ранку\"}else if(hour<17){return\"дня\"}else{return\"вечора\"}},dayOfMonthOrdinalParse:/\\d{1,2}-(й|го)/,ordinal:function(number,period){switch(period){case\"M\":case\"d\":case\"DDD\":case\"w\":case\"W\":return number+\"-й\";case\"D\":return number+\"-го\";default:return number}},week:{dow:1,doy:7}});var months$8=[\"جنوری\",\"فروری\",\"مارچ\",\"اپریل\",\"مئی\",\"جون\",\"جولائی\",\"اگست\",\"ستمبر\",\"اکتوبر\",\"نومبر\",\"دسمبر\"];var days$2=[\"اتوار\",\"پیر\",\"منگل\",\"بدھ\",\"جمعرات\",\"جمعہ\",\"ہفتہ\"];hooks.defineLocale(\"ur\",{months:months$8,monthsShort:months$8,weekdays:days$2,weekdaysShort:days$2,weekdaysMin:days$2,longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd، D MMMM YYYY HH:mm\"},meridiemParse:/صبح|شام/,isPM:function(input){return\"شام\"===input},meridiem:function(hour,minute,isLower){if(hour<12){return\"صبح\"}return\"شام\"},calendar:{sameDay:\"[آج بوقت] LT\",\nnextDay:\"[کل بوقت] LT\",nextWeek:\"dddd [بوقت] LT\",lastDay:\"[گذشتہ روز بوقت] LT\",lastWeek:\"[گذشتہ] dddd [بوقت] LT\",sameElse:\"L\"},relativeTime:{future:\"%s بعد\",past:\"%s قبل\",s:\"چند سیکنڈ\",m:\"ایک منٹ\",mm:\"%d منٹ\",h:\"ایک گھنٹہ\",hh:\"%d گھنٹے\",d:\"ایک دن\",dd:\"%d دن\",M:\"ایک ماہ\",MM:\"%d ماہ\",y:\"ایک سال\",yy:\"%d سال\"},preparse:function(string){return string.replace(/،/g,\",\")},postformat:function(string){return string.replace(/,/g,\"،\")},week:{dow:1,doy:4}});hooks.defineLocale(\"uz-latn\",{months:\"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr\".split(\"_\"),monthsShort:\"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek\".split(\"_\"),weekdays:\"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba\".split(\"_\"),weekdaysShort:\"Yak_Dush_Sesh_Chor_Pay_Jum_Shan\".split(\"_\"),weekdaysMin:\"Ya_Du_Se_Cho_Pa_Ju_Sha\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"D MMMM YYYY, dddd HH:mm\"},calendar:{sameDay:\"[Bugun soat] LT [da]\",nextDay:\"[Ertaga] LT [da]\",nextWeek:\"dddd [kuni soat] LT [da]\",lastDay:\"[Kecha soat] LT [da]\",lastWeek:\"[O'tgan] dddd [kuni soat] LT [da]\",sameElse:\"L\"},relativeTime:{future:\"Yaqin %s ichida\",past:\"Bir necha %s oldin\",s:\"soniya\",m:\"bir daqiqa\",mm:\"%d daqiqa\",h:\"bir soat\",hh:\"%d soat\",d:\"bir kun\",dd:\"%d kun\",M:\"bir oy\",MM:\"%d oy\",y:\"bir yil\",yy:\"%d yil\"},week:{dow:1,doy:7}});hooks.defineLocale(\"uz\",{months:\"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр\".split(\"_\"),monthsShort:\"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек\".split(\"_\"),weekdays:\"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба\".split(\"_\"),weekdaysShort:\"Якш_Душ_Сеш_Чор_Пай_Жум_Шан\".split(\"_\"),weekdaysMin:\"Як_Ду_Се_Чо_Па_Жу_Ша\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"D MMMM YYYY, dddd HH:mm\"},calendar:{sameDay:\"[Бугун соат] LT [да]\",nextDay:\"[Эртага] LT [да]\",nextWeek:\"dddd [куни соат] LT [да]\",lastDay:\"[Кеча соат] LT [да]\",lastWeek:\"[Утган] dddd [куни соат] LT [да]\",sameElse:\"L\"},relativeTime:{future:\"Якин %s ичида\",past:\"Бир неча %s олдин\",s:\"фурсат\",m:\"бир дакика\",mm:\"%d дакика\",h:\"бир соат\",hh:\"%d соат\",d:\"бир кун\",dd:\"%d кун\",M:\"бир ой\",MM:\"%d ой\",y:\"бир йил\",yy:\"%d йил\"},week:{dow:1,doy:7}});hooks.defineLocale(\"vi\",{months:\"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12\".split(\"_\"),monthsShort:\"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12\".split(\"_\"),monthsParseExact:true,weekdays:\"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy\".split(\"_\"),weekdaysShort:\"CN_T2_T3_T4_T5_T6_T7\".split(\"_\"),weekdaysMin:\"CN_T2_T3_T4_T5_T6_T7\".split(\"_\"),weekdaysParseExact:true,meridiemParse:/sa|ch/i,isPM:function(input){return/^ch$/i.test(input)},meridiem:function(hours,minutes,isLower){if(hours<12){return isLower?\"sa\":\"SA\"}else{return isLower?\"ch\":\"CH\"}},longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM [năm] YYYY\",LLL:\"D MMMM [năm] YYYY HH:mm\",LLLL:\"dddd, D MMMM [năm] YYYY HH:mm\",l:\"DD/M/YYYY\",ll:\"D MMM YYYY\",lll:\"D MMM YYYY HH:mm\",llll:\"ddd, D MMM YYYY HH:mm\"},calendar:{sameDay:\"[Hôm nay lúc] LT\",nextDay:\"[Ngày mai lúc] LT\",nextWeek:\"dddd [tuần tới lúc] LT\",lastDay:\"[Hôm qua lúc] LT\",lastWeek:\"dddd [tuần rồi lúc] LT\",sameElse:\"L\"},relativeTime:{future:\"%s tới\",past:\"%s trước\",s:\"vài giây\",m:\"một phút\",mm:\"%d phút\",h:\"một giờ\",hh:\"%d giờ\",d:\"một ngày\",dd:\"%d ngày\",M:\"một tháng\",MM:\"%d tháng\",y:\"một năm\",yy:\"%d năm\"},dayOfMonthOrdinalParse:/\\d{1,2}/,ordinal:function(number){return number},week:{dow:1,doy:4}});hooks.defineLocale(\"x-pseudo\",{months:\"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér\".split(\"_\"),monthsShort:\"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc\".split(\"_\"),monthsParseExact:true,weekdays:\"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý\".split(\"_\"),weekdaysShort:\"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát\".split(\"_\"),weekdaysMin:\"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá\".split(\"_\"),weekdaysParseExact:true,longDateFormat:{LT:\"HH:mm\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},calendar:{sameDay:\"[T~ódá~ý át] LT\",nextDay:\"[T~ómó~rró~w át] LT\",nextWeek:\"dddd [át] LT\",lastDay:\"[Ý~ést~érdá~ý át] LT\",lastWeek:\"[L~ást] dddd [át] LT\",sameElse:\"L\"},relativeTime:{future:\"í~ñ %s\",past:\"%s á~gó\",s:\"á ~féw ~sécó~ñds\",m:\"á ~míñ~úté\",mm:\"%d m~íñú~tés\",h:\"á~ñ hó~úr\",hh:\"%d h~óúrs\",d:\"á ~dáý\",dd:\"%d d~áýs\",M:\"á ~móñ~th\",MM:\"%d m~óñt~hs\",y:\"á ~ýéár\",yy:\"%d ý~éárs\"},dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=~~(number%100/10)===1?\"th\":b===1?\"st\":b===2?\"nd\":b===3?\"rd\":\"th\";return number+output},week:{dow:1,doy:4}});hooks.defineLocale(\"yo\",{months:\"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀\".split(\"_\"),monthsShort:\"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀\".split(\"_\"),weekdays:\"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta\".split(\"_\"),weekdaysShort:\"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá\".split(\"_\"),weekdaysMin:\"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb\".split(\"_\"),longDateFormat:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY h:mm A\",LLLL:\"dddd, D MMMM YYYY h:mm A\"},calendar:{sameDay:\"[Ònì ni] LT\",nextDay:\"[Ọ̀la ni] LT\",nextWeek:\"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",lastDay:\"[Àna ni] LT\",lastWeek:\"dddd [Ọsẹ̀ tólọ́] [ni] LT\",sameElse:\"L\"},relativeTime:{future:\"ní %s\",past:\"%s kọjá\",s:\"ìsẹjú aayá die\",m:\"ìsẹjú kan\",mm:\"ìsẹjú %d\",h:\"wákati kan\",hh:\"wákati %d\",d:\"ọjọ́ kan\",dd:\"ọjọ́ %d\",M:\"osù kan\",MM:\"osù %d\",y:\"ọdún kan\",yy:\"ọdún %d\"},dayOfMonthOrdinalParse:/ọjọ́\\s\\d{1,2}/,ordinal:\"ọjọ́ %d\",week:{dow:1,doy:4}});hooks.defineLocale(\"zh-cn\",{months:\"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),weekdays:\"星期日_星期一_星期二_星期三_星期四_星期五_星期六\".split(\"_\"),weekdaysShort:\"周日_周一_周二_周三_周四_周五_周六\".split(\"_\"),weekdaysMin:\"日_一_二_三_四_五_六\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY年MMMD日\",LL:\"YYYY年MMMD日\",LLL:\"YYYY年MMMD日Ah点mm分\",LLLL:\"YYYY年MMMD日ddddAh点mm分\",l:\"YYYY年MMMD日\",ll:\"YYYY年MMMD日\",lll:\"YYYY年MMMD日 HH:mm\",llll:\"YYYY年MMMD日dddd HH:mm\"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"凌晨\"||meridiem===\"早上\"||meridiem===\"上午\"){return hour}else if(meridiem===\"下午\"||meridiem===\"晚上\"){return hour+12}else{return hour>=11?hour:hour+12}},meridiem:function(hour,minute,isLower){var hm=hour*100+minute;if(hm<600){return\"凌晨\"}else if(hm<900){return\"早上\"}else if(hm<1130){return\"上午\"}else if(hm<1230){return\"中午\"}else if(hm<1800){return\"下午\"}else{return\"晚上\"}},calendar:{sameDay:\"[今天]LT\",nextDay:\"[明天]LT\",nextWeek:\"[下]ddddLT\",lastDay:\"[昨天]LT\",lastWeek:\"[上]ddddLT\",sameElse:\"L\"},dayOfMonthOrdinalParse:/\\d{1,2}(日|月|周)/,ordinal:function(number,period){switch(period){case\"d\":case\"D\":case\"DDD\":return number+\"日\";case\"M\":return number+\"月\";case\"w\":case\"W\":return number+\"周\";default:return number}},relativeTime:{future:\"%s内\",past:\"%s前\",s:\"几秒\",m:\"1 分钟\",mm:\"%d 分钟\",h:\"1 小时\",hh:\"%d 小时\",d:\"1 天\",dd:\"%d 天\",M:\"1 个月\",MM:\"%d 个月\",y:\"1 年\",yy:\"%d 年\"},week:{dow:1,doy:4}});hooks.defineLocale(\"zh-hk\",{months:\"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),weekdays:\"星期日_星期一_星期二_星期三_星期四_星期五_星期六\".split(\"_\"),weekdaysShort:\"週日_週一_週二_週三_週四_週五_週六\".split(\"_\"),weekdaysMin:\"日_一_二_三_四_五_六\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY年MMMD日\",LL:\"YYYY年MMMD日\",LLL:\"YYYY年MMMD日 HH:mm\",LLLL:\"YYYY年MMMD日dddd HH:mm\",l:\"YYYY年MMMD日\",ll:\"YYYY年MMMD日\",lll:\"YYYY年MMMD日 HH:mm\",llll:\"YYYY年MMMD日dddd HH:mm\"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"凌晨\"||meridiem===\"早上\"||meridiem===\"上午\"){return hour}else if(meridiem===\"中午\"){return hour>=11?hour:hour+12}else if(meridiem===\"下午\"||meridiem===\"晚上\"){return hour+12}},meridiem:function(hour,minute,isLower){var hm=hour*100+minute;if(hm<600){return\"凌晨\"}else if(hm<900){return\"早上\"}else if(hm<1130){return\"上午\"}else if(hm<1230){return\"中午\"}else if(hm<1800){return\"下午\"}else{return\"晚上\"}},calendar:{sameDay:\"[今天]LT\",nextDay:\"[明天]LT\",nextWeek:\"[下]ddddLT\",lastDay:\"[昨天]LT\",lastWeek:\"[上]ddddLT\",sameElse:\"L\"},dayOfMonthOrdinalParse:/\\d{1,2}(日|月|週)/,ordinal:function(number,period){switch(period){case\"d\":case\"D\":case\"DDD\":return number+\"日\";case\"M\":return number+\"月\";case\"w\":case\"W\":return number+\"週\";default:return number}},relativeTime:{future:\"%s內\",past:\"%s前\",s:\"幾秒\",m:\"1 分鐘\",mm:\"%d 分鐘\",h:\"1 小時\",hh:\"%d 小時\",d:\"1 天\",dd:\"%d 天\",M:\"1 個月\",MM:\"%d 個月\",y:\"1 年\",yy:\"%d 年\"}});hooks.defineLocale(\"zh-tw\",{months:\"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),weekdays:\"星期日_星期一_星期二_星期三_星期四_星期五_星期六\".split(\"_\"),weekdaysShort:\"週日_週一_週二_週三_週四_週五_週六\".split(\"_\"),weekdaysMin:\"日_一_二_三_四_五_六\".split(\"_\"),longDateFormat:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY年MMMD日\",LL:\"YYYY年MMMD日\",LLL:\"YYYY年MMMD日 HH:mm\",LLLL:\"YYYY年MMMD日dddd HH:mm\",l:\"YYYY年MMMD日\",ll:\"YYYY年MMMD日\",lll:\"YYYY年MMMD日 HH:mm\",llll:\"YYYY年MMMD日dddd HH:mm\"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(hour,meridiem){if(hour===12){hour=0}if(meridiem===\"凌晨\"||meridiem===\"早上\"||meridiem===\"上午\"){return hour}else if(meridiem===\"中午\"){return hour>=11?hour:hour+12}else if(meridiem===\"下午\"||meridiem===\"晚上\"){return hour+12}},meridiem:function(hour,minute,isLower){var hm=hour*100+minute;if(hm<600){return\"凌晨\"}else if(hm<900){return\"早上\"}else if(hm<1130){return\"上午\"}else if(hm<1230){return\"中午\"}else if(hm<1800){return\"下午\"}else{return\"晚上\"}},calendar:{sameDay:\"[今天]LT\",nextDay:\"[明天]LT\",nextWeek:\"[下]ddddLT\",lastDay:\"[昨天]LT\",lastWeek:\"[上]ddddLT\",sameElse:\"L\"},dayOfMonthOrdinalParse:/\\d{1,2}(日|月|週)/,ordinal:function(number,period){switch(period){case\"d\":case\"D\":case\"DDD\":return number+\"日\";case\"M\":return number+\"月\";case\"w\":case\"W\":return number+\"週\";default:return number}},relativeTime:{future:\"%s內\",past:\"%s前\",s:\"幾秒\",m:\"1 分鐘\",mm:\"%d 分鐘\",h:\"1 小時\",hh:\"%d 小時\",d:\"1 天\",dd:\"%d 天\",M:\"1 個月\",MM:\"%d 個月\",y:\"1 年\",yy:\"%d 年\"}});hooks.locale(\"en\");return hooks});\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/meta',[\"../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.modeInfo = [\n    {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n    {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"pgp\"]},\n    {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn, asn1\"]},\n    {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n    {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\"]},\n    {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n    {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n    {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\"]},\n    {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\"]},\n    {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists.txt$/},\n    {name: \"CoffeeScript\", mime: \"text/x-coffeescript\", mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n    {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n    {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n    {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n    {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n    {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n    {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n    {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n    {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n    {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n    {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n    {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n    {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n    {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n    {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n    {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n    {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n    {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n    {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n    {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n    {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n    {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n    {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\"]},\n    {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n    {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n    {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n    {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history).md$/i},\n    {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n    {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\"]},\n    {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n    {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n    {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n    {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n    {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n    {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\"], alias: [\"xhtml\"]},\n    {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n    {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n    {name: \"Jade\", mime: \"text/x-jade\", mode: \"jade\", ext: [\"jade\"]},\n    {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n    {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n    {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n     mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n    {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n    {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n    {name: \"Jinja2\", mime: \"null\", mode: \"jinja2\"},\n    {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n    {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"kotlin\", ext: [\"kt\"]},\n    {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n    {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n    {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n    {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n    {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n    {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n    {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\"]},\n    {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n    {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\"},\n    {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n    {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n    {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n    {name: \"NTriples\", mime: \"text/n-triples\", mode: \"ntriples\", ext: [\"nt\"]},\n    {name: \"Objective C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\", \"mm\"]},\n    {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n    {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n    {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n    {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n    {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n    {name: \"PHP\", mime: \"application/x-httpd-php\", mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"phtml\"]},\n    {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n    {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n    {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n    {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n    {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"py\", \"pyw\"]},\n    {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n    {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n    {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\"], alias: [\"rscript\"]},\n    {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n    {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n    {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n    {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n    {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n    {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n    {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n    {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n    {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n    {name: \"Shell\", mime: \"text/x-sh\", mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"]},\n    {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n    {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n    {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n    {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n    {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n    {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n    {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n    {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n    {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n    {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n    {name: \"MariaDB\", mime: \"text/x-mariadb\", mode: \"sql\"},\n    {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n    {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\"], alias: [\"tex\"]},\n    {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\"]},\n    {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n    {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n    {name: \"TiddlyWiki \", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n    {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n    {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n    {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n    {name: \"troff\", mime: \"troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n    {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n    {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n    {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n    {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n    {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n    {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n    {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n    {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n    {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n    {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n    {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n    {name: \"YAML\", mime: \"text/x-yaml\", mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n    {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]}\n  ];\n  // Ensure all modes have a mime property for backwards compatibility\n  for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n    var info = CodeMirror.modeInfo[i];\n    if (info.mimes) info.mime = info.mimes[0];\n  }\n\n  CodeMirror.findModeByMIME = function(mime) {\n    mime = mime.toLowerCase();\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.mime == mime) return info;\n      if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n        if (info.mimes[j] == mime) return info;\n    }\n  };\n\n  CodeMirror.findModeByExtension = function(ext) {\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.ext) for (var j = 0; j < info.ext.length; j++)\n        if (info.ext[j] == ext) return info;\n    }\n  };\n\n  CodeMirror.findModeByFileName = function(filename) {\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.file && info.file.test(filename)) return info;\n    }\n    var dot = filename.lastIndexOf(\".\");\n    var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n    if (ext) return CodeMirror.findModeByExtension(ext);\n  };\n\n  CodeMirror.findModeByName = function(name) {\n    name = name.toLowerCase();\n    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n      var info = CodeMirror.modeInfo[i];\n      if (info.name.toLowerCase() == name) return info;\n      if (info.alias) for (var j = 0; j < info.alias.length; j++)\n        if (info.alias[j].toLowerCase() == name) return info;\n    }\n  };\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/utils',[\n    'jquery',\n    'codemirror/lib/codemirror',\n    'moment',\n    'underscore',\n    // silently upgrades CodeMirror\n    'codemirror/mode/meta',\n], function($, CodeMirror, moment, _){\n    \"use strict\";\n    \n    // keep track of which extensions have been loaded already\n    var extensions_loaded = [];\n\n    /**\n     * Whether or not an extension has been loaded\n     * @param  {string} extension - name of the extension\n     * @return {boolean}            true if loaded already\n     */\n    var is_loaded = function(extension) {\n        var ext_path = \"nbextensions/\" + extension;\n        return extensions_loaded.indexOf(ext_path) >= 0;\n    };\n\n    /**\n     * Load a single extension.\n     * @param  {string} extension - extension path.\n     * @return {Promise} that resolves to an extension module handle\n     */\n    var load_extension = function (extension) {\n        return new Promise(function(resolve, reject) {\n            var ext_path = \"nbextensions/\" + extension;\n            requirejs([ext_path], function(module) {\n                if (!is_loaded(extension)) {\n                    console.log(\"Loading extension: \" + extension);\n                    if (module && module.load_ipython_extension) {\n                        Promise.resolve(module.load_ipython_extension()).then(function() {\n                            resolve(module);\n                        }).catch(reject);\n                    }\n                    extensions_loaded.push(ext_path);\n                } else {\n                    console.log(\"Loaded extension already: \" + extension);\n                    resolve(module);\n                }\n            }, function(err) {\n                reject(err);\n            });\n        });\n    };\n\n    /**\n     * Load multiple extensions.\n     * Takes n-args, where each arg is a string path to the extension.\n     * @return {Promise} that resolves to a list of loaded module handles.\n     */\n    var load_extensions = function () {\n        console.log('load_extensions', arguments);\n        return Promise.all(Array.prototype.map.call(arguments, load_extension)).catch(function(err) {\n            console.error(\"Failed to load extension\" + (err.requireModules.length>1?'s':'') + \":\", err.requireModules, err);\n        });\n    };\n\n    /**\n     * Return a list of extensions that should be active\n     * The config for nbextensions comes in as a dict where keys are\n     * nbextensions paths and the values are a bool indicating if it\n     * should be active. This returns a list of nbextension paths\n     * where the value is true\n     */\n    function filter_extensions(nbext_config) {\n        var active = [];\n        Object.keys(nbext_config).forEach(function (nbext) {\n            if (nbext_config[nbext]) {active.push(nbext);}\n        });\n        return active;\n    }\n\n    /**\n     * Wait for a config section to load, and then load the extensions specified\n     * in a 'load_extensions' key inside it.\n     */\n    function load_extensions_from_config(section) {\n        return section.loaded.then(function() {\n            if (section.data.load_extensions) {\n                var active = filter_extensions(section.data.load_extensions);\n                return load_extensions.apply(this, active);\n            }\n        }).catch(utils.reject('Could not load nbextensions from ' + section.section_name + ' config file'));\n    }\n\n    //============================================================================\n    // Cross-browser RegEx Split\n    //============================================================================\n\n    // This code has been MODIFIED from the code licensed below to not replace the\n    // default browser split.  The license is reproduced here.\n\n    // see http://blog.stevenlevithan.com/archives/cross-browser-split for more info:\n    /*!\n     * Cross-Browser Split 1.1.1\n     * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>\n     * Available under the MIT License\n     * ECMAScript compliant, uniform cross-browser split method\n     */\n\n    /**\n     * Splits a string into an array of strings using a regex or string\n     * separator. Matches of the separator are not included in the result array.\n     * However, if `separator` is a regex that contains capturing groups,\n     * backreferences are spliced into the result each time `separator` is\n     * matched. Fixes browser bugs compared to the native\n     * `String.prototype.split` and can be used reliably cross-browser.\n     * @param {String} str String to split.\n     * @param {RegExp} separator Regex to use for separating\n     *     the string.\n     * @param {Number} [limit] Maximum number of items to include in the result\n     *     array.\n     * @returns {Array} Array of substrings.\n     * @example\n     *\n     * // Basic use\n     * regex_split('a b c d', ' ');\n     * // -> ['a', 'b', 'c', 'd']\n     *\n     * // With limit\n     * regex_split('a b c d', ' ', 2);\n     * // -> ['a', 'b']\n     *\n     * // Backreferences in result array\n     * regex_split('..word1 word2..', /([a-z]+)(\\d+)/i);\n     * // -> ['..', 'word', '1', ' ', 'word', '2', '..']\n     */\n    var regex_split = function (str, separator, limit) {\n        var output = [],\n            flags = (separator.ignoreCase ? \"i\" : \"\") +\n                    (separator.multiline  ? \"m\" : \"\") +\n                    (separator.extended   ? \"x\" : \"\") + // Proposed for ES6\n                    (separator.sticky     ? \"y\" : \"\"), // Firefox 3+\n            lastLastIndex = 0,\n            separator2, match, lastIndex, lastLength;\n        // Make `global` and avoid `lastIndex` issues by working with a copy\n        separator = new RegExp(separator.source, flags + \"g\");\n\n        var compliantExecNpcg = typeof(/()??/.exec(\"\")[1]) === \"undefined\";\n        if (!compliantExecNpcg) {\n            // Doesn't need flags gy, but they don't hurt\n            separator2 = new RegExp(\"^\" + separator.source + \"$(?!\\\\s)\", flags);\n        }\n        /* Values for `limit`, per the spec:\n         * If undefined: 4294967295 // Math.pow(2, 32) - 1\n         * If 0, Infinity, or NaN: 0\n         * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n         * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n         * If other: Type-convert, then use the above rules\n         */\n        limit = typeof(limit) === \"undefined\" ?\n            -1 >>> 0 : // Math.pow(2, 32) - 1\n            limit >>> 0; // ToUint32(limit)\n        for (match = separator.exec(str); match; match = separator.exec(str)) {\n            // `separator.lastIndex` is not reliable cross-browser\n            lastIndex = match.index + match[0].length;\n            if (lastIndex > lastLastIndex) {\n                output.push(str.slice(lastLastIndex, match.index));\n                // Fix browsers whose `exec` methods don't consistently return `undefined` for\n                // nonparticipating capturing groups\n                if (!compliantExecNpcg && match.length > 1) {\n                    match[0].replace(separator2, function () {\n                        for (var i = 1; i < arguments.length - 2; i++) {\n                            if (typeof(arguments[i]) === \"undefined\") {\n                                match[i] = undefined;\n                            }\n                        }\n                    });\n                }\n                if (match.length > 1 && match.index < str.length) {\n                    Array.prototype.push.apply(output, match.slice(1));\n                }\n                lastLength = match[0].length;\n                lastLastIndex = lastIndex;\n                if (output.length >= limit) {\n                    break;\n                }\n            }\n            if (separator.lastIndex === match.index) {\n                separator.lastIndex++; // Avoid an infinite loop\n            }\n        }\n        if (lastLastIndex === str.length) {\n            if (lastLength || !separator.test(\"\")) {\n                output.push(\"\");\n            }\n        } else {\n            output.push(str.slice(lastLastIndex));\n        }\n        return output.length > limit ? output.slice(0, limit) : output;\n    };\n\n    //============================================================================\n    // End contributed Cross-browser RegEx Split\n    //============================================================================\n\n\n    var uuid = function () {\n        /**\n         * http://www.ietf.org/rfc/rfc4122.txt\n         */\n        var s = [];\n        var hexDigits = \"0123456789ABCDEF\";\n        for (var i = 0; i < 32; i++) {\n            s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);\n        }\n        s[12] = \"4\";  // bits 12-15 of the time_hi_and_version field to 0010\n        s[16] = hexDigits.substr((s[16] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01\n\n        var uuid = s.join(\"\");\n        return uuid;\n    };\n\n    var _ANSI_COLORS = [\n        \"ansi-black\",\n        \"ansi-red\",\n        \"ansi-green\",\n        \"ansi-yellow\",\n        \"ansi-blue\",\n        \"ansi-magenta\",\n        \"ansi-cyan\",\n        \"ansi-white\",\n        \"ansi-black-intense\",\n        \"ansi-red-intense\",\n        \"ansi-green-intense\",\n        \"ansi-yellow-intense\",\n        \"ansi-blue-intense\",\n        \"ansi-magenta-intense\",\n        \"ansi-cyan-intense\",\n        \"ansi-white-intense\",\n    ];\n    \n    function _getExtendedColors(numbers) {\n        var r, g, b;\n        var n = numbers.shift();\n        if (n === 2 && numbers.length >= 3) {\n            // 24-bit RGB\n            r = numbers.shift();\n            g = numbers.shift();\n            b = numbers.shift();\n            if ([r, g, b].some(function (c) { return c < 0 || 255 < c; })) {\n                throw new RangeError(\"Invalid range for RGB colors\");\n            }\n        } else if (n === 5 && numbers.length >= 1) {\n            // 256 colors\n            var idx = numbers.shift();\n            if (idx < 0) {\n                throw new RangeError(\"Color index must be >= 0\");\n            } else if (idx < 16) {\n                // 16 default terminal colors\n                return idx;\n            } else if (idx < 232) {\n                // 6x6x6 color cube, see http://stackoverflow.com/a/27165165/500098\n                r = Math.floor((idx - 16) / 36);\n                r = r > 0 ? 55 + r * 40 : 0;\n                g = Math.floor(((idx - 16) % 36) / 6);\n                g = g > 0 ? 55 + g * 40 : 0;\n                b = (idx - 16) % 6;\n                b = b > 0 ? 55 + b * 40 : 0;\n            } else if (idx < 256) {\n                // grayscale, see http://stackoverflow.com/a/27165165/500098\n                r = g = b = (idx - 232) * 10 + 8;\n            } else {\n                throw new RangeError(\"Color index must be < 256\");\n            }\n        } else {\n            throw new RangeError(\"Invalid extended color specification\");\n        }\n        return [r, g, b];\n    }\n\n    function _ansispan(str) {\n        var ansi_re = /\\x1b\\[(.*?)([@-~])/g;\n        var fg = [];\n        var bg = [];\n        var bold = false;\n        var underline = false;\n        var inverse = false;\n        var match;\n        var out = [];\n        var numbers = [];\n        var start = 0;\n\n        str += \"\\x1b[m\";  // Ensure markup for trailing text\n        while ((match = ansi_re.exec(str))) {\n            if (match[2] === \"m\") {\n                var items = match[1].split(\";\");\n                for (var i = 0; i < items.length; i++) {\n                    var item = items[i];\n                    if (item === \"\") {\n                        numbers.push(0);\n                    } else if (item.search(/^\\d+$/) !== -1) {\n                        numbers.push(parseInt(item));\n                    } else {\n                        // Ignored: Invalid color specification\n                        numbers.length = 0;\n                        break;\n                    }\n                }\n            } else {\n                // Ignored: Not a color code\n            }\n            var chunk = str.substring(start, match.index);\n            if (chunk) {\n                if (bold && typeof fg === \"number\" && 0 <= fg && fg < 8) {\n                    fg += 8;  // Bold text uses \"intense\" colors\n                }\n                var classes = [];\n                var styles = [];\n\n                if (typeof fg === \"number\") {\n                    classes.push(_ANSI_COLORS[fg] + \"-fg\");\n                } else if (fg.length) {\n                    styles.push(\"color: rgb(\" + fg + \")\");\n                }\n\n                if (typeof bg === \"number\") {\n                    classes.push(_ANSI_COLORS[bg] + \"-bg\");\n                } else if (bg.length) {\n                    styles.push(\"background-color: rgb(\" + bg + \")\");\n                }\n\n                if (bold) {\n                    classes.push(\"ansi-bold\");\n                }\n\n                if (underline) {\n                    classes.push(\"ansi-underline\");\n                }\n\n                if (inverse) {\n                    classes.push(\"ansi-inverse\");\n                }\n\n                if (classes.length || styles.length) {\n                    out.push(\"<span\");\n                    if (classes.length) {\n                        out.push(' class=\"' + classes.join(\" \") + '\"');\n                    }\n                    if (styles.length) {\n                        out.push(' style=\"' + styles.join(\"; \") + '\"');\n                    }\n                    out.push(\">\");\n                    out.push(chunk);\n                    out.push(\"</span>\");\n                } else {\n                    out.push(chunk);\n                }\n            }\n            start = ansi_re.lastIndex;\n\n            while (numbers.length) {\n                var n = numbers.shift();\n                switch (n) {\n                    case 0:\n                        fg = bg = [];\n                        bold = false;\n                        underline = false;\n                        inverse = false;\n                        break;\n                    case 1:\n                    case 5:\n                        bold = true;\n                        break;\n                    case 4:\n                        underline = true;\n                        break;\n                    case 7:\n                        inverse = true;\n                        break;\n                    case 21:\n                    case 22:\n                        bold = false;\n                        break;\n                    case 30:\n                    case 31:\n                    case 32:\n                    case 33:\n                    case 34:\n                    case 35:\n                    case 36:\n                    case 37:\n                        fg = n - 30;\n                        break;\n                    case 38:\n                        try {\n                            fg = _getExtendedColors(numbers);\n                        } catch(e) {\n                            numbers.length = 0;\n                        }\n                        break;\n                    case 39:\n                        fg = [];\n                        break;\n                    case 40:\n                    case 41:\n                    case 42:\n                    case 43:\n                    case 44:\n                    case 45:\n                    case 46:\n                    case 47:\n                        bg = n - 40;\n                        break;\n                    case 48:\n                        try {\n                            bg = _getExtendedColors(numbers);\n                        } catch(e) {\n                            numbers.length = 0;\n                        }\n                        break;\n                    case 49:\n                        bg = [];\n                        break;\n\t\t    case 90:\n\t\t    case 91:\n\t\t    case 92:\n\t\t    case 93:\n\t\t    case 94:\n\t\t    case 95:\n\t\t    case 96:\n\t\t    case 97:\n\t\t\tfg = n - 90 + 8;\n                        break;\n\t\t    case 100:\n\t\t    case 101:\n\t\t    case 102:\n\t\t    case 103:\n\t\t    case 104:\n\t\t    case 105:\n\t\t    case 106:\n\t\t    case 107:\n\t\t\tbg = n - 100 + 8;\n                        break;\n                    default:\n                        // Unknown codes are ignored\n                }\n            }\n        }\n        return out.join(\"\");\n    }\n\n    // Transform ANSI color escape codes into HTML <span> tags with CSS\n    // classes such as \"ansi-green-intense-fg\".\n    // The actual colors used are set in the CSS file.\n    // This is supposed to have the same behavior as nbconvert.filters.ansi2html()\n    function fixConsole(txt) {\n        txt = _.escape(txt);\n\n        // color ansi codes (and remove non-color escape sequences)\n        txt = _ansispan(txt);\n        return txt;\n    }\n\n    // Remove chunks that should be overridden by the effect of\n    // carriage return characters\n    function fixCarriageReturn(txt) {\n        txt = txt.replace(/\\r+\\n/gm, '\\n'); // \\r followed by \\n --> newline\n        while (txt.search(/\\r[^$]/g) > -1) {\n            var base = txt.match(/^(.*)\\r+/m)[1];\n            var insert = txt.match(/\\r+(.*)$/m)[1];\n            insert = insert + base.slice(insert.length, base.length);\n            txt = txt.replace(/\\r+.*$/m, '\\r').replace(/^.*\\r/m, insert);\n        }\n        return txt;\n    }\n\n    // Remove characters that are overridden by backspace characters\n    function fixBackspace(txt) {\n        var tmp = txt;\n        do {\n            txt = tmp;\n            // Cancel out anything-but-newline followed by backspace\n            tmp = txt.replace(/[^\\n]\\x08/gm, '');\n        } while (tmp.length < txt.length);\n        return txt;\n    }\n\n    // Remove characters overridden by backspace and carriage return\n    function fixOverwrittenChars(txt) {\n        return fixCarriageReturn(fixBackspace(txt));\n    }\n\n    // Locate any URLs and convert them to a anchor tag\n    function autoLinkUrls(txt) {\n        return txt.replace(/(^|\\s)(https?|ftp)(:[^'\"<>\\s]+)/gi,\n            \"$1<a target=\\\"_blank\\\" href=\\\"$2$3\\\">$2$3</a>\");\n    }\n\n    var points_to_pixels = function (points) {\n        /**\n         * A reasonably good way of converting between points and pixels.\n         */\n        var test = $('<div style=\"display: none; width: 10000pt; padding:0; border:0;\"></div>');\n        $('body').append(test);\n        var pixel_per_point = test.width()/10000;\n        test.remove();\n        return Math.floor(points*pixel_per_point);\n    };\n    \n    var always_new = function (constructor) {\n        /**\n         * wrapper around contructor to avoid requiring `var a = new constructor()`\n         * useful for passing constructors as callbacks,\n         * not for programmer laziness.\n         * from http://programmers.stackexchange.com/questions/118798\n         */\n        return function () {\n            var obj = Object.create(constructor.prototype);\n            constructor.apply(obj, arguments);\n            return obj;\n        };\n    };\n\n    var url_path_join = function () {\n        /**\n         * join a sequence of url components with '/'\n         */\n        var url = '';\n        for (var i = 0; i < arguments.length; i++) {\n            if (arguments[i] === '') {\n                continue;\n            }\n            if (url.length > 0 && url[url.length-1] != '/') {\n                url = url + '/' + arguments[i];\n            } else {\n                url = url + arguments[i];\n            }\n        }\n        url = url.replace(/\\/\\/+/, '/');\n        return url;\n    };\n    \n    var url_path_split = function (path) {\n        /**\n         * Like os.path.split for URLs.\n         * Always returns two strings, the directory path and the base filename\n         */\n        \n        var idx = path.lastIndexOf('/');\n        if (idx === -1) {\n            return ['', path];\n        } else {\n            return [ path.slice(0, idx), path.slice(idx + 1) ];\n        }\n    };\n    \n    var parse_url = function (url) {\n        /**\n         * an `a` element with an href allows attr-access to the parsed segments of a URL\n         * a = parse_url(\"http://localhost:8888/path/name#hash\")\n         * a.protocol = \"http:\"\n         * a.host     = \"localhost:8888\"\n         * a.hostname = \"localhost\"\n         * a.port     = 8888\n         * a.pathname = \"/path/name\"\n         * a.hash     = \"#hash\"\n         */\n        var a = document.createElement(\"a\");\n        a.href = url;\n        return a;\n    };\n    \n    var encode_uri_components = function (uri) {\n        /**\n         * encode just the components of a multi-segment uri,\n         * leaving '/' separators\n         */\n        return uri.split('/').map(encodeURIComponent).join('/');\n    };\n    \n    var url_join_encode = function () {\n        /**\n         * join a sequence of url components with '/',\n         * encoding each component with encodeURIComponent\n         */\n        return encode_uri_components(url_path_join.apply(null, arguments));\n    };\n\n\n    var splitext = function (filename) {\n        /**\n         * mimic Python os.path.splitext\n         * Returns ['base', '.ext']\n         */\n        var idx = filename.lastIndexOf('.');\n        if (idx > 0) {\n            return [filename.slice(0, idx), filename.slice(idx)];\n        } else {\n            return [filename, ''];\n        }\n    };\n\n\n    var escape_html = function (text) {\n        /**\n         * escape text to HTML\n         */\n        return $(\"<div/>\").text(text).html();\n    };\n\n\n    var get_body_data = function(key) {\n        /**\n         * get a url-encoded item from body.data and decode it\n         * we should never have any encoded URLs anywhere else in code\n         * until we are building an actual request\n         */\n        var val = $('body').data(key);\n        if (typeof val === 'undefined')\n            return val;\n        return decodeURIComponent(val);\n    };\n    \n    var to_absolute_cursor_pos = function (cm, cursor) {\n        console.warn('`utils.to_absolute_cursor_pos(cm, pos)` is deprecated. Use `cm.indexFromPos(cursor)`');\n        return cm.indexFromPos(cursor);\n    };\n    \n    var from_absolute_cursor_pos = function (cm, cursor_pos) {\n        console.warn('`utils.from_absolute_cursor_pos(cm, pos)` is deprecated. Use `cm.posFromIndex(index)`');\n        return cm.posFromIndex(cursor_pos);\n    };\n    \n    // http://stackoverflow.com/questions/2400935/browser-detection-in-javascript\n    var browser = (function() {\n        if (typeof navigator === 'undefined') {\n            // navigator undefined in node\n            return 'None';\n        }\n        var N= navigator.appName, ua= navigator.userAgent, tem;\n        var M= ua.match(/(opera|chrome|safari|firefox|msie)\\/?\\s*(\\.?\\d+(\\.\\d+)*)/i);\n        if (M && (tem= ua.match(/version\\/([\\.\\d]+)/i)) !== null) M[2]= tem[1];\n        M= M? [M[1], M[2]]: [N, navigator.appVersion,'-?'];\n        return M;\n    })();\n\n    // http://stackoverflow.com/questions/11219582/how-to-detect-my-browser-version-and-operating-system-using-javascript\n    var platform = (function () {\n        if (typeof navigator === 'undefined') {\n            // navigator undefined in node\n            return 'None';\n        }\n        var OSName=\"None\";\n        if (navigator.appVersion.indexOf(\"Win\")!=-1) OSName=\"Windows\";\n        if (navigator.appVersion.indexOf(\"Mac\")!=-1) OSName=\"MacOS\";\n        if (navigator.appVersion.indexOf(\"X11\")!=-1) OSName=\"UNIX\";\n        if (navigator.appVersion.indexOf(\"Linux\")!=-1) OSName=\"Linux\";\n        return OSName;\n    })();\n    \n    var get_url_param = function (name) {\n        // get a URL parameter. I cannot believe we actually need this.\n        // Based on http://stackoverflow.com/a/25359264/938949\n        var match = new RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);\n        if (match){\n            return decodeURIComponent(match[1] || '');\n        }\n    };\n    \n    var is_or_has = function (a, b) {\n        /**\n         * Is b a child of a or a itself?\n         */\n        return a.has(b).length !==0 || a.is(b);\n    };\n\n    var is_focused = function (e) {\n        /**\n         * Is element e, or one of its children focused?\n         */\n        e = $(e);\n        var target = $(document.activeElement);\n        if (target.length > 0) {\n            if (is_or_has(e, target)) {\n                return true;\n            } else {\n                return false;\n            }\n        } else {\n            return false;\n        }\n    };\n    \n    var mergeopt = function(_class, options, overwrite){\n        options = options || {};\n        overwrite = overwrite || {};\n        return $.extend(true, {}, _class.options_default, options, overwrite);\n    };\n    \n    var ajax_error_msg = function (jqXHR) {\n        /**\n         * Return a JSON error message if there is one,\n         * otherwise the basic HTTP status text.\n         */\n        if (jqXHR.responseJSON && jqXHR.responseJSON.traceback) {\n            return jqXHR.responseJSON.traceback;\n        } else if (jqXHR.responseJSON && jqXHR.responseJSON.message) {\n            return jqXHR.responseJSON.message;\n        } else {\n            return jqXHR.statusText;\n        }\n    };\n    var log_ajax_error = function (jqXHR, status, error) {\n        /**\n         * log ajax failures with informative messages\n         */\n        var msg = \"API request failed (\" + jqXHR.status + \"): \";\n        console.log(jqXHR);\n        msg += ajax_error_msg(jqXHR);\n        console.log(msg);\n    };\n\n    var requireCodeMirrorMode = function (mode, callback, errback) {\n        /** \n         * find a predefined mode or detect from CM metadata then\n         * require and callback with the resolveable mode string: mime or\n         * custom name\n         */\n\n        var modename = (typeof mode == \"string\") ? mode :\n            mode.mode || mode.name;\n\n        // simplest, cheapest check by mode name: mode may also have config\n        if (CodeMirror.modes.hasOwnProperty(modename)) {\n            // return the full mode object, if it has a name\n            callback(mode.name ? mode : modename);\n            return;\n        }\n\n        // *somehow* get back a CM.modeInfo-like object that has .mode and\n        // .mime\n        var info = (mode && mode.mode && mode.mime && mode) ||\n            CodeMirror.findModeByName(modename) ||\n            CodeMirror.findModeByExtension(modename.split(\".\").slice(-1)) ||\n            CodeMirror.findModeByMIME(modename) ||\n            {mode: modename, mime: modename};\n\n        requirejs([\n                // might want to use CodeMirror.modeURL here\n                ['codemirror/mode', info.mode, info.mode].join('/'),\n            ], function() {\n              // return the original mode, as from a kernelspec on first load\n              // or the mimetype, as for most highlighting\n              callback(mode.name ? mode : info.mime);\n            }, errback\n        );\n    };\n    \n    /** Error type for wrapped XHR errors. */\n    var XHR_ERROR = 'XhrError';\n    \n    /**\n     * Wraps an AJAX error as an Error object.\n     */\n    var wrap_ajax_error = function (jqXHR, status, error) {\n        var wrapped_error = new Error(ajax_error_msg(jqXHR));\n        wrapped_error.name =  XHR_ERROR;\n        // provide xhr response\n        wrapped_error.xhr = jqXHR;\n        wrapped_error.xhr_status = status;\n        wrapped_error.xhr_error = error;\n        return wrapped_error;\n    };\n    \n    var ajax = function (url, settings) {\n        // like $.ajax, but ensure XSRF or Authorization header is set\n        if (typeof url === \"object\") {\n            // called with single argument: $.ajax({url: '...'})\n            settings = url;\n            url = settings.url;\n            delete settings.url;\n        }\n        settings = _add_auth_header(settings);\n        return $.ajax(url, settings);\n    };\n    \n    var _get_cookie = function (name) {\n        // from tornado docs: http://www.tornadoweb.org/en/stable/guide/security.html\n        var r = document.cookie.match(\"\\\\b\" + name + \"=([^;]*)\\\\b\");\n        return r ? r[1] : undefined;\n    }\n\n    var _add_auth_header = function (settings) {\n        /**\n         * Adds auth header to jquery ajax settings\n         */\n        settings = settings || {};\n        if (!settings.headers) {\n            settings.headers = {};\n        }\n        if (!settings.headers.Authorization) {\n            var xsrf_token = _get_cookie('_xsrf');\n            if (xsrf_token) {\n                settings.headers['X-XSRFToken'] = xsrf_token;\n            }\n        }\n        return settings;\n    };\n\n    var promising_ajax = function(url, settings) {\n        /**\n         * Like $.ajax, but returning an ES6 promise. success and error settings\n         * will be ignored.\n         */\n        settings = settings || {};\n        return new Promise(function(resolve, reject) {\n            settings.success = function(data, status, jqXHR) {\n                resolve(data);\n            };\n            settings.error = function(jqXHR, status, error) {\n                log_ajax_error(jqXHR, status, error);\n                reject(wrap_ajax_error(jqXHR, status, error));\n            };\n            ajax(url, settings);\n        });\n    };\n\n    var WrappedError = function(message, error){\n        /**\n         * Wrappable Error class\n         *\n         * The Error class doesn't actually act on `this`.  Instead it always\n         * returns a new instance of Error.  Here we capture that instance so we\n         * can apply it's properties to `this`.\n         */\n        var tmp = Error.apply(this, [message]);\n\n        // Copy the properties of the error over to this.\n        var properties = Object.getOwnPropertyNames(tmp);\n        for (var i = 0; i < properties.length; i++) {\n            this[properties[i]] = tmp[properties[i]];\n        }\n\n        // Keep a stack of the original error messages.\n        if (error instanceof WrappedError) {\n            this.error_stack = error.error_stack;\n        } else {\n            this.error_stack = [error];\n        }\n        this.error_stack.push(tmp);\n\n        return this;\n    };\n\n    WrappedError.prototype = Object.create(Error.prototype, {});\n\n\n    var load_class = function(class_name, module_name, registry) {\n        /**\n         * Tries to load a class\n         *\n         * Tries to load a class from a module using require.js, if a module \n         * is specified, otherwise tries to load a class from the global \n         * registry, if the global registry is provided.\n         */\n        return new Promise(function(resolve, reject) {\n\n            // Try loading the view module using require.js\n            if (module_name) {\n                requirejs([module_name], function(module) {\n                    if (module[class_name] === undefined) {\n                        reject(new Error('Class '+class_name+' not found in module '+module_name));\n                    } else {\n                        resolve(module[class_name]);\n                    }\n                }, reject);\n            } else {\n                if (registry && registry[class_name]) {\n                    resolve(registry[class_name]);\n                } else {\n                    reject(new Error('Class '+class_name+' not found in registry '));\n                }\n            }\n        });\n    };\n\n    var resolve_promises_dict = function(d) {\n        /**\n         * Resolve a promiseful dictionary.\n         * Returns a single Promise.\n         */\n        var keys = Object.keys(d);\n        var values = [];\n        keys.forEach(function(key) {\n            values.push(d[key]);\n        });\n        return Promise.all(values).then(function(v) {\n            d = {};\n            for(var i=0; i<keys.length; i++) {\n                d[keys[i]] = v[i];\n            }\n            return d;\n        });\n    };\n\n    var reject = function(message, log) {\n        /**\n         * Creates a wrappable Promise rejection function.\n         * \n         * Creates a function that returns a Promise.reject with a new WrappedError\n         * that has the provided message and wraps the original error that \n         * caused the promise to reject.\n         */\n        return function(error) { \n            var wrapped_error = new WrappedError(message, error);\n            if (log) {\n                console.error(message, \" -- \", error);\n            }\n            return Promise.reject(wrapped_error); \n        };\n    };\n\n    var typeset = function(element, text) {\n        /**\n         * Apply MathJax rendering to an element, and optionally set its text\n         *\n         * If MathJax is not available, make no changes.\n         *\n         * Returns the output any number of typeset elements, or undefined if\n         * MathJax was not available.\n         *\n         * Parameters\n         * ----------\n         * element: Node, NodeList, or jQuery selection\n         * text: option string\n         */\n        var $el = element.jquery ? element : $(element);\n        if(arguments.length > 1){\n            $el.text(text);\n        }\n        if(!window.MathJax){\n            return;\n        }\n        $el.map(function(){\n            // MathJax takes a DOM node: $.map makes `this` the context\n            MathJax.Hub.Queue([\"Typeset\", MathJax.Hub, this]);\n            try {\n                MathJax.Hub.Queue(\n                    [\"Require\", MathJax.Ajax, \"[MathJax]/extensions/TeX/AMSmath.js\"],\n                    function() { MathJax.InputJax.TeX.resetEquationNumbers(); }\n                );\n            } catch (e) {\n                console.error(\"Error queueing resetEquationNumbers:\", e);\n            }\n        });\n    };\n\n    var parse_b64_data_uri = function(uri) {\n        /**\n         * Parses a base64 encoded data-uri to extract mimetype and the\n         * base64 string.\n         *\n         * For example, given 'data:image/png;base64,iVBORw', it will return\n         * [\"image/png\", \"iVBORw\"]\n         *\n         * Parameters\n         */\n        // For performance reasons, the non-greedy ? qualifiers are crucial so\n        // that the matcher stops early on big blobs. Without them, it will try\n        // to match the whole blob which can take ages\n        var regex = /^data:(.+?\\/.+?);base64,/;\n        var matches = uri.match(regex);\n        var mime = matches[1];\n        // matches[0] contains the whole data-uri prefix\n        var b64_data = uri.slice(matches[0].length);\n        return [mime, b64_data];\n    };\n    \n    var time = {};\n    time.milliseconds = {};\n    time.milliseconds.s = 1000;\n    time.milliseconds.m = 60 * time.milliseconds.s;\n    time.milliseconds.h = 60 * time.milliseconds.m;\n    time.milliseconds.d = 24 * time.milliseconds.h;\n    \n    time.thresholds = {\n        // moment.js thresholds in milliseconds\n        s: moment.relativeTimeThreshold('s') * time.milliseconds.s,\n        m: moment.relativeTimeThreshold('m') * time.milliseconds.m,\n        h: moment.relativeTimeThreshold('h') * time.milliseconds.h,\n        d: moment.relativeTimeThreshold('d') * time.milliseconds.d,\n    };\n    \n    time.timeout_from_dt = function (dt) {\n        /** compute a timeout based on dt\n        \n        input and output both in milliseconds\n        \n        use moment's relative time thresholds:\n        \n        - 10 seconds if in 'seconds ago' territory\n        - 1 minute if in 'minutes ago'\n        - 1 hour otherwise\n        */\n        if (dt < time.thresholds.s) {\n            return 10 * time.milliseconds.s;\n        } else if (dt < time.thresholds.m) {\n            return time.milliseconds.m;\n        } else {\n            return time.milliseconds.h;\n        }\n    };\n\n    var format_datetime = function(date) {\n        var text = moment(date).fromNow();\n        return text === 'a few seconds ago' ? 'seconds ago' : text;\n    };\n\n    var datetime_sort_helper = function(a, b, order) {\n        if (moment(a).isBefore(moment(b))) {\n            return (order == 1) ? -1 : 1;\n        } else if (moment(a).isSame(moment(b))) {\n            return 0;\n        } else {\n            return (order == 1) ? 1 : -1;\n        }\n    };\n\n\n    // javascript stores text as utf16 and string indices use \"code units\",\n    // which stores high-codepoint characters as \"surrogate pairs\",\n    // which occupy two indices in the javascript string.\n    // We need to translate cursor_pos in the protocol (in characters)\n    // to js offset (with surrogate pairs taking two spots).\n    function js_idx_to_char_idx (js_idx, text) {\n        var char_idx = js_idx;\n        for (var i = 0; i + 1 < text.length && i < js_idx; i++) {\n            var char_code = text.charCodeAt(i);\n            // check for surrogate pair\n            if (char_code >= 0xD800 && char_code <= 0xDBFF) {\n                var next_char_code = text.charCodeAt(i+1);\n                if (next_char_code >= 0xDC00 && next_char_code <= 0xDFFF) {\n                    char_idx--;\n                    i++;\n                }\n            }\n        }\n        return char_idx;\n    }\n\n    function char_idx_to_js_idx (char_idx, text) {\n        var js_idx = char_idx;\n        for (var i = 0; i + 1 < text.length && i < js_idx; i++) {\n            var char_code = text.charCodeAt(i);\n            // check for surrogate pair\n            if (char_code >= 0xD800 && char_code <= 0xDBFF) {\n                var next_char_code = text.charCodeAt(i+1);\n                if (next_char_code >= 0xDC00 && next_char_code <= 0xDFFF) {\n                    js_idx++;\n                    i++;\n                }\n            }\n        }\n        return js_idx;\n    }\n\n    if ('𝐚'.length === 1) {\n        // If javascript fixes string indices of non-BMP characters,\n        // don't keep shifting offsets to compensate for surrogate pairs\n        char_idx_to_js_idx = js_idx_to_char_idx = function (idx, text) { return idx; };\n    }\n\n    // Test if a drag'n'drop event contains a file (as opposed to an HTML\n    // element/text from the document)\n    var dnd_contain_file = function(event) {\n        // As per the HTML5 drag'n'drop spec, the dataTransfer.types should\n        // contain one \"Files\" type if a file is being dragged\n        // https://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#dom-datatransfer-types\n        if (event.dataTransfer.types) {\n            for (var i = 0; i < event.dataTransfer.types.length; i++) {\n                if (event.dataTransfer.types[i] == \"Files\") {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n\n    var throttle = function(fn, time) {\n      var pending = null;\n\n      return function () {\n        if (pending) return;\n        pending = setTimeout(run, time);\n\n        return function () {\n          clearTimeout(pending);\n          pending = null;\n        }\n      }\n\n      function run () {\n        pending = null;\n        fn();\n      }\n    }\n    \n    var change_favicon = function (src) {\n        var link = document.createElement('link'),\n            oldLink = document.getElementById('favicon');\n        link.id = 'favicon';\n        link.type = 'image/x-icon';\n        link.rel = 'shortcut icon';\n        link.href = utils.url_path_join(utils.get_body_data('baseUrl'), src);\n        if (oldLink && (link.href === oldLink.href)) {\n            // This favicon is already set, don't modify the DOM.\n            return;\n        }\n        if (oldLink) document.head.removeChild(oldLink);\n        document.head.appendChild(link);\n    };\n\n    var utils = {\n        throttle: throttle,\n        is_loaded: is_loaded,\n        load_extension: load_extension,\n        load_extensions: load_extensions,\n        filter_extensions: filter_extensions,\n        load_extensions_from_config: load_extensions_from_config,\n        regex_split : regex_split,\n        uuid : uuid,\n        fixConsole : fixConsole,\n        fixCarriageReturn : fixCarriageReturn,\n        fixBackspace : fixBackspace,\n        fixOverwrittenChars: fixOverwrittenChars,\n        autoLinkUrls : autoLinkUrls,\n        points_to_pixels : points_to_pixels,\n        get_body_data : get_body_data,\n        parse_url : parse_url,\n        url_path_split : url_path_split,\n        url_path_join : url_path_join,\n        url_join_encode : url_join_encode,\n        encode_uri_components : encode_uri_components,\n        splitext : splitext,\n        escape_html : escape_html,\n        always_new : always_new,\n        to_absolute_cursor_pos : to_absolute_cursor_pos,\n        from_absolute_cursor_pos : from_absolute_cursor_pos,\n        browser : browser,\n        platform: platform,\n        get_url_param: get_url_param,\n        is_or_has : is_or_has,\n        is_focused : is_focused,\n        mergeopt: mergeopt,\n        requireCodeMirrorMode : requireCodeMirrorMode,\n        XHR_ERROR : XHR_ERROR,\n        ajax : ajax,\n        ajax_error_msg : ajax_error_msg,\n        log_ajax_error : log_ajax_error,\n        wrap_ajax_error : wrap_ajax_error,\n        promising_ajax : promising_ajax,\n        WrappedError: WrappedError,\n        load_class: load_class,\n        resolve_promises_dict: resolve_promises_dict,\n        reject: reject,\n        typeset: typeset,\n        parse_b64_data_uri: parse_b64_data_uri,\n        time: time,\n        format_datetime: format_datetime,\n        datetime_sort_helper: datetime_sort_helper,\n        dnd_contain_file: dnd_contain_file,\n        js_idx_to_char_idx: js_idx_to_char_idx,\n        char_idx_to_js_idx: char_idx_to_js_idx,\n        _ansispan:_ansispan,\n        change_favicon: change_favicon\n    };\n\n    return utils;\n}); \n\n",
    "/**\n * @preserve jed.js https://github.com/SlexAxton/Jed\n */\n/*\n-----------\nA gettext compatible i18n library for modern JavaScript Applications\n\nby Alex Sexton - AlexSexton [at] gmail - @SlexAxton\n\nMIT License\n\nA jQuery Foundation project - requires CLA to contribute -\nhttps://contribute.jquery.org/CLA/\n\n\n\nJed offers the entire applicable GNU gettext spec'd set of\nfunctions, but also offers some nicer wrappers around them.\nThe api for gettext was written for a language with no function\noverloading, so Jed allows a little more of that.\n\nMany thanks to Joshua I. Miller - unrtst@cpan.org - who wrote\ngettext.js back in 2008. I was able to vet a lot of my ideas\nagainst his. I also made sure Jed passed against his tests\nin order to offer easy upgrades -- jsgettext.berlios.de\n*/\n(function (root, undef) {\n\n  // Set up some underscore-style functions, if you already have\n  // underscore, feel free to delete this section, and use it\n  // directly, however, the amount of functions used doesn't\n  // warrant having underscore as a full dependency.\n  // Underscore 1.3.0 was used to port and is licensed\n  // under the MIT License by Jeremy Ashkenas.\n  var ArrayProto    = Array.prototype,\n      ObjProto      = Object.prototype,\n      slice         = ArrayProto.slice,\n      hasOwnProp    = ObjProto.hasOwnProperty,\n      nativeForEach = ArrayProto.forEach,\n      breaker       = {};\n\n  // We're not using the OOP style _ so we don't need the\n  // extra level of indirection. This still means that you\n  // sub out for real `_` though.\n  var _ = {\n    forEach : function( obj, iterator, context ) {\n      var i, l, key;\n      if ( obj === null ) {\n        return;\n      }\n\n      if ( nativeForEach && obj.forEach === nativeForEach ) {\n        obj.forEach( iterator, context );\n      }\n      else if ( obj.length === +obj.length ) {\n        for ( i = 0, l = obj.length; i < l; i++ ) {\n          if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {\n            return;\n          }\n        }\n      }\n      else {\n        for ( key in obj) {\n          if ( hasOwnProp.call( obj, key ) ) {\n            if ( iterator.call (context, obj[key], key, obj ) === breaker ) {\n              return;\n            }\n          }\n        }\n      }\n    },\n    extend : function( obj ) {\n      this.forEach( slice.call( arguments, 1 ), function ( source ) {\n        for ( var prop in source ) {\n          obj[prop] = source[prop];\n        }\n      });\n      return obj;\n    }\n  };\n  // END Miniature underscore impl\n\n  // Jed is a constructor function\n  var Jed = function ( options ) {\n    // Some minimal defaults\n    this.defaults = {\n      \"locale_data\" : {\n        \"messages\" : {\n          \"\" : {\n            \"domain\"       : \"messages\",\n            \"lang\"         : \"en\",\n            \"plural_forms\" : \"nplurals=2; plural=(n != 1);\"\n          }\n          // There are no default keys, though\n        }\n      },\n      // The default domain if one is missing\n      \"domain\" : \"messages\",\n      // enable debug mode to log untranslated strings to the console\n      \"debug\" : false\n    };\n\n    // Mix in the sent options with the default options\n    this.options = _.extend( {}, this.defaults, options );\n    this.textdomain( this.options.domain );\n\n    if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {\n      throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');\n    }\n  };\n\n  // The gettext spec sets this character as the default\n  // delimiter for context lookups.\n  // e.g.: context\\u0004key\n  // If your translation company uses something different,\n  // just change this at any time and it will use that instead.\n  Jed.context_delimiter = String.fromCharCode( 4 );\n\n  function getPluralFormFunc ( plural_form_string ) {\n    return Jed.PF.compile( plural_form_string || \"nplurals=2; plural=(n != 1);\");\n  }\n\n  function Chain( key, i18n ){\n    this._key = key;\n    this._i18n = i18n;\n  }\n\n  // Create a chainable api for adding args prettily\n  _.extend( Chain.prototype, {\n    onDomain : function ( domain ) {\n      this._domain = domain;\n      return this;\n    },\n    withContext : function ( context ) {\n      this._context = context;\n      return this;\n    },\n    ifPlural : function ( num, pkey ) {\n      this._val = num;\n      this._pkey = pkey;\n      return this;\n    },\n    fetch : function ( sArr ) {\n      if ( {}.toString.call( sArr ) != '[object Array]' ) {\n        sArr = [].slice.call(arguments, 0);\n      }\n      return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )(\n        this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val),\n        sArr\n      );\n    }\n  });\n\n  // Add functions to the Jed prototype.\n  // These will be the functions on the object that's returned\n  // from creating a `new Jed()`\n  // These seem redundant, but they gzip pretty well.\n  _.extend( Jed.prototype, {\n    // The sexier api start point\n    translate : function ( key ) {\n      return new Chain( key, this );\n    },\n\n    textdomain : function ( domain ) {\n      if ( ! domain ) {\n        return this._textdomain;\n      }\n      this._textdomain = domain;\n    },\n\n    gettext : function ( key ) {\n      return this.dcnpgettext.call( this, undef, undef, key );\n    },\n\n    dgettext : function ( domain, key ) {\n     return this.dcnpgettext.call( this, domain, undef, key );\n    },\n\n    dcgettext : function ( domain , key /*, category */ ) {\n      // Ignores the category anyways\n      return this.dcnpgettext.call( this, domain, undef, key );\n    },\n\n    ngettext : function ( skey, pkey, val ) {\n      return this.dcnpgettext.call( this, undef, undef, skey, pkey, val );\n    },\n\n    dngettext : function ( domain, skey, pkey, val ) {\n      return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );\n    },\n\n    dcngettext : function ( domain, skey, pkey, val/*, category */) {\n      return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );\n    },\n\n    pgettext : function ( context, key ) {\n      return this.dcnpgettext.call( this, undef, context, key );\n    },\n\n    dpgettext : function ( domain, context, key ) {\n      return this.dcnpgettext.call( this, domain, context, key );\n    },\n\n    dcpgettext : function ( domain, context, key/*, category */) {\n      return this.dcnpgettext.call( this, domain, context, key );\n    },\n\n    npgettext : function ( context, skey, pkey, val ) {\n      return this.dcnpgettext.call( this, undef, context, skey, pkey, val );\n    },\n\n    dnpgettext : function ( domain, context, skey, pkey, val ) {\n      return this.dcnpgettext.call( this, domain, context, skey, pkey, val );\n    },\n\n    // The most fully qualified gettext function. It has every option.\n    // Since it has every option, we can use it from every other method.\n    // This is the bread and butter.\n    // Technically there should be one more argument in this function for 'Category',\n    // but since we never use it, we might as well not waste the bytes to define it.\n    dcnpgettext : function ( domain, context, singular_key, plural_key, val ) {\n      // Set some defaults\n\n      plural_key = plural_key || singular_key;\n\n      // Use the global domain default if one\n      // isn't explicitly passed in\n      domain = domain || this._textdomain;\n\n      var fallback;\n\n      // Handle special cases\n\n      // No options found\n      if ( ! this.options ) {\n        // There's likely something wrong, but we'll return the correct key for english\n        // We do this by instantiating a brand new Jed instance with the default set\n        // for everything that could be broken.\n        fallback = new Jed();\n        return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val );\n      }\n\n      // No translation data provided\n      if ( ! this.options.locale_data ) {\n        throw new Error('No locale data provided.');\n      }\n\n      if ( ! this.options.locale_data[ domain ] ) {\n        throw new Error('Domain `' + domain + '` was not found.');\n      }\n\n      if ( ! this.options.locale_data[ domain ][ \"\" ] ) {\n        throw new Error('No locale meta information provided.');\n      }\n\n      // Make sure we have a truthy key. Otherwise we might start looking\n      // into the empty string key, which is the options for the locale\n      // data.\n      if ( ! singular_key ) {\n        throw new Error('No translation key found.');\n      }\n\n      var key  = context ? context + Jed.context_delimiter + singular_key : singular_key,\n          locale_data = this.options.locale_data,\n          dict = locale_data[ domain ],\n          defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[\"\"],\n          pluralForms = dict[\"\"].plural_forms || dict[\"\"][\"Plural-Forms\"] || dict[\"\"][\"plural-forms\"] || defaultConf.plural_forms || defaultConf[\"Plural-Forms\"] || defaultConf[\"plural-forms\"],\n          val_list,\n          res;\n\n      var val_idx;\n      if (val === undefined) {\n        // No value passed in; assume singular key lookup.\n        val_idx = 0;\n\n      } else {\n        // Value has been passed in; use plural-forms calculations.\n\n        // Handle invalid numbers, but try casting strings for good measure\n        if ( typeof val != 'number' ) {\n          val = parseInt( val, 10 );\n\n          if ( isNaN( val ) ) {\n            throw new Error('The number that was passed in is not a number.');\n          }\n        }\n\n        val_idx = getPluralFormFunc(pluralForms)(val);\n      }\n\n      // Throw an error if a domain isn't found\n      if ( ! dict ) {\n        throw new Error('No domain named `' + domain + '` could be found.');\n      }\n\n      val_list = dict[ key ];\n\n      // If there is no match, then revert back to\n      // english style singular/plural with the keys passed in.\n      if ( ! val_list || val_idx > val_list.length ) {\n        if (this.options.missing_key_callback) {\n          this.options.missing_key_callback(key, domain);\n        }\n        res = [ singular_key, plural_key ];\n\n        // collect untranslated strings\n        if (this.options.debug===true) {\n          console.log(res[ getPluralFormFunc(pluralForms)( val ) ]);\n        }\n        return res[ getPluralFormFunc()( val ) ];\n      }\n\n      res = val_list[ val_idx ];\n\n      // This includes empty strings on purpose\n      if ( ! res  ) {\n        res = [ singular_key, plural_key ];\n        return res[ getPluralFormFunc()( val ) ];\n      }\n      return res;\n    }\n  });\n\n\n  // We add in sprintf capabilities for post translation value interolation\n  // This is not internally used, so you can remove it if you have this\n  // available somewhere else, or want to use a different system.\n\n  // We _slightly_ modify the normal sprintf behavior to more gracefully handle\n  // undefined values.\n\n  /**\n   sprintf() for JavaScript 0.7-beta1\n   http://www.diveintojavascript.com/projects/javascript-sprintf\n\n   Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions are met:\n       * Redistributions of source code must retain the above copyright\n         notice, this list of conditions and the following disclaimer.\n       * Redistributions in binary form must reproduce the above copyright\n         notice, this list of conditions and the following disclaimer in the\n         documentation and/or other materials provided with the distribution.\n       * Neither the name of sprintf() for JavaScript nor the\n         names of its contributors may be used to endorse or promote products\n         derived from this software without specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n   DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n  */\n  var sprintf = (function() {\n    function get_type(variable) {\n      return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();\n    }\n    function str_repeat(input, multiplier) {\n      for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}\n      return output.join('');\n    }\n\n    var str_format = function() {\n      if (!str_format.cache.hasOwnProperty(arguments[0])) {\n        str_format.cache[arguments[0]] = str_format.parse(arguments[0]);\n      }\n      return str_format.format.call(null, str_format.cache[arguments[0]], arguments);\n    };\n\n    str_format.format = function(parse_tree, argv) {\n      var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;\n      for (i = 0; i < tree_length; i++) {\n        node_type = get_type(parse_tree[i]);\n        if (node_type === 'string') {\n          output.push(parse_tree[i]);\n        }\n        else if (node_type === 'array') {\n          match = parse_tree[i]; // convenience purposes only\n          if (match[2]) { // keyword argument\n            arg = argv[cursor];\n            for (k = 0; k < match[2].length; k++) {\n              if (!arg.hasOwnProperty(match[2][k])) {\n                throw(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]));\n              }\n              arg = arg[match[2][k]];\n            }\n          }\n          else if (match[1]) { // positional argument (explicit)\n            arg = argv[match[1]];\n          }\n          else { // positional argument (implicit)\n            arg = argv[cursor++];\n          }\n\n          if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {\n            throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));\n          }\n\n          // Jed EDIT\n          if ( typeof arg == 'undefined' || arg === null ) {\n            arg = '';\n          }\n          // Jed EDIT\n\n          switch (match[8]) {\n            case 'b': arg = arg.toString(2); break;\n            case 'c': arg = String.fromCharCode(arg); break;\n            case 'd': arg = parseInt(arg, 10); break;\n            case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;\n            case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;\n            case 'o': arg = arg.toString(8); break;\n            case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;\n            case 'u': arg = Math.abs(arg); break;\n            case 'x': arg = arg.toString(16); break;\n            case 'X': arg = arg.toString(16).toUpperCase(); break;\n          }\n          arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);\n          pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';\n          pad_length = match[6] - String(arg).length;\n          pad = match[6] ? str_repeat(pad_character, pad_length) : '';\n          output.push(match[5] ? arg + pad : pad + arg);\n        }\n      }\n      return output.join('');\n    };\n\n    str_format.cache = {};\n\n    str_format.parse = function(fmt) {\n      var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;\n      while (_fmt) {\n        if ((match = /^[^\\x25]+/.exec(_fmt)) !== null) {\n          parse_tree.push(match[0]);\n        }\n        else if ((match = /^\\x25{2}/.exec(_fmt)) !== null) {\n          parse_tree.push('%');\n        }\n        else if ((match = /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {\n          if (match[2]) {\n            arg_names |= 1;\n            var field_list = [], replacement_field = match[2], field_match = [];\n            if ((field_match = /^([a-z_][a-z_\\d]*)/i.exec(replacement_field)) !== null) {\n              field_list.push(field_match[1]);\n              while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n                if ((field_match = /^\\.([a-z_][a-z_\\d]*)/i.exec(replacement_field)) !== null) {\n                  field_list.push(field_match[1]);\n                }\n                else if ((field_match = /^\\[(\\d+)\\]/.exec(replacement_field)) !== null) {\n                  field_list.push(field_match[1]);\n                }\n                else {\n                  throw('[sprintf] huh?');\n                }\n              }\n            }\n            else {\n              throw('[sprintf] huh?');\n            }\n            match[2] = field_list;\n          }\n          else {\n            arg_names |= 2;\n          }\n          if (arg_names === 3) {\n            throw('[sprintf] mixing positional and named placeholders is not (yet) supported');\n          }\n          parse_tree.push(match);\n        }\n        else {\n          throw('[sprintf] huh?');\n        }\n        _fmt = _fmt.substring(match[0].length);\n      }\n      return parse_tree;\n    };\n\n    return str_format;\n  })();\n\n  var vsprintf = function(fmt, argv) {\n    argv.unshift(fmt);\n    return sprintf.apply(null, argv);\n  };\n\n  Jed.parse_plural = function ( plural_forms, n ) {\n    plural_forms = plural_forms.replace(/n/g, n);\n    return Jed.parse_expression(plural_forms);\n  };\n\n  Jed.sprintf = function ( fmt, args ) {\n    if ( {}.toString.call( args ) == '[object Array]' ) {\n      return vsprintf( fmt, [].slice.call(args) );\n    }\n    return sprintf.apply(this, [].slice.call(arguments) );\n  };\n\n  Jed.prototype.sprintf = function () {\n    return Jed.sprintf.apply(this, arguments);\n  };\n  // END sprintf Implementation\n\n  // Start the Plural forms section\n  // This is a full plural form expression parser. It is used to avoid\n  // running 'eval' or 'new Function' directly against the plural\n  // forms.\n  //\n  // This can be important if you get translations done through a 3rd\n  // party vendor. I encourage you to use this instead, however, I\n  // also will provide a 'precompiler' that you can use at build time\n  // to output valid/safe function representations of the plural form\n  // expressions. This means you can build this code out for the most\n  // part.\n  Jed.PF = {};\n\n  Jed.PF.parse = function ( p ) {\n    var plural_str = Jed.PF.extractPluralExpr( p );\n    return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);\n  };\n\n  Jed.PF.compile = function ( p ) {\n    // Handle trues and falses as 0 and 1\n    function imply( val ) {\n      return (val === true ? 1 : val ? val : 0);\n    }\n\n    var ast = Jed.PF.parse( p );\n    return function ( n ) {\n      return imply( Jed.PF.interpreter( ast )( n ) );\n    };\n  };\n\n  Jed.PF.interpreter = function ( ast ) {\n    return function ( n ) {\n      var res;\n      switch ( ast.type ) {\n        case 'GROUP':\n          return Jed.PF.interpreter( ast.expr )( n );\n        case 'TERNARY':\n          if ( Jed.PF.interpreter( ast.expr )( n ) ) {\n            return Jed.PF.interpreter( ast.truthy )( n );\n          }\n          return Jed.PF.interpreter( ast.falsey )( n );\n        case 'OR':\n          return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );\n        case 'AND':\n          return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );\n        case 'LT':\n          return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );\n        case 'GT':\n          return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );\n        case 'LTE':\n          return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );\n        case 'GTE':\n          return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );\n        case 'EQ':\n          return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );\n        case 'NEQ':\n          return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );\n        case 'MOD':\n          return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );\n        case 'VAR':\n          return n;\n        case 'NUM':\n          return ast.val;\n        default:\n          throw new Error(\"Invalid Token found.\");\n      }\n    };\n  };\n\n  Jed.PF.extractPluralExpr = function ( p ) {\n    // trim first\n    p = p.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\n    if (! /;\\s*$/.test(p)) {\n      p = p.concat(';');\n    }\n\n    var nplurals_re = /nplurals\\=(\\d+);/,\n        plural_re = /plural\\=(.*);/,\n        nplurals_matches = p.match( nplurals_re ),\n        res = {},\n        plural_matches;\n\n    // Find the nplurals number\n    if ( nplurals_matches.length > 1 ) {\n      res.nplurals = nplurals_matches[1];\n    }\n    else {\n      throw new Error('nplurals not found in plural_forms string: ' + p );\n    }\n\n    // remove that data to get to the formula\n    p = p.replace( nplurals_re, \"\" );\n    plural_matches = p.match( plural_re );\n\n    if (!( plural_matches && plural_matches.length > 1 ) ) {\n      throw new Error('`plural` expression not found: ' + p);\n    }\n    return plural_matches[ 1 ];\n  };\n\n  /* Jison generated parser */\n  Jed.PF.parser = (function(){\n\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"expressions\":3,\"e\":4,\"EOF\":5,\"?\":6,\":\":7,\"||\":8,\"&&\":9,\"<\":10,\"<=\":11,\">\":12,\">=\":13,\"!=\":14,\"==\":15,\"%\":16,\"(\":17,\")\":18,\"n\":19,\"NUMBER\":20,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"EOF\",6:\"?\",7:\":\",8:\"||\",9:\"&&\",10:\"<\",11:\"<=\",12:\">\",13:\">=\",14:\"!=\",15:\"==\",16:\"%\",17:\"(\",18:\")\",19:\"n\",20:\"NUMBER\"},\nproductions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],\nperformAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1: return { type : 'GROUP', expr: $$[$0-1] };\nbreak;\ncase 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };\nbreak;\ncase 3:this.$ = { type: \"OR\", left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 4:this.$ = { type: \"AND\", left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };\nbreak;\ncase 13:this.$ = { type: 'VAR' };\nbreak;\ncase 14:this.$ = { type: 'NUM', val: Number(yytext) };\nbreak;\n}\n},\ntable: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],\ndefaultActions: {6:[2,1]},\nparseError: function parseError(str, hash) {\n    throw new Error(str);\n},\nparse: function parse(input) {\n    var self = this,\n        stack = [0],\n        vstack = [null], // semantic value stack\n        lstack = [], // location stack\n        table = this.table,\n        yytext = '',\n        yylineno = 0,\n        yyleng = 0,\n        recovering = 0,\n        TERROR = 2,\n        EOF = 1;\n\n    //this.reductionCount = this.shiftCount = 0;\n\n    this.lexer.setInput(input);\n    this.lexer.yy = this.yy;\n    this.yy.lexer = this.lexer;\n    if (typeof this.lexer.yylloc == 'undefined')\n        this.lexer.yylloc = {};\n    var yyloc = this.lexer.yylloc;\n    lstack.push(yyloc);\n\n    if (typeof this.yy.parseError === 'function')\n        this.parseError = this.yy.parseError;\n\n    function popStack (n) {\n        stack.length = stack.length - 2*n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n\n    function lex() {\n        var token;\n        token = self.lexer.lex() || 1; // $end = 1\n        // if token isn't its numeric value, convert\n        if (typeof token !== 'number') {\n            token = self.symbols_[token] || token;\n        }\n        return token;\n    }\n\n    var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;\n    while (true) {\n        // retreive state number from top of stack\n        state = stack[stack.length-1];\n\n        // use default actions if available\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol == null)\n                symbol = lex();\n            // read action for current state and first input\n            action = table[state] && table[state][symbol];\n        }\n\n        // handle parse error\n        _handle_error:\n        if (typeof action === 'undefined' || !action.length || !action[0]) {\n\n            if (!recovering) {\n                // Report error\n                expected = [];\n                for (p in table[state]) if (this.terminals_[p] && p > 2) {\n                    expected.push(\"'\"+this.terminals_[p]+\"'\");\n                }\n                var errStr = '';\n                if (this.lexer.showPosition) {\n                    errStr = 'Parse error on line '+(yylineno+1)+\":\\n\"+this.lexer.showPosition()+\"\\nExpecting \"+expected.join(', ') + \", got '\" + this.terminals_[symbol]+ \"'\";\n                } else {\n                    errStr = 'Parse error on line '+(yylineno+1)+\": Unexpected \" +\n                                  (symbol == 1 /*EOF*/ ? \"end of input\" :\n                                              (\"'\"+(this.terminals_[symbol] || symbol)+\"'\"));\n                }\n                this.parseError(errStr,\n                    {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});\n            }\n\n            // just recovered from another error\n            if (recovering == 3) {\n                if (symbol == EOF) {\n                    throw new Error(errStr || 'Parsing halted.');\n                }\n\n                // discard current lookahead and grab another\n                yyleng = this.lexer.yyleng;\n                yytext = this.lexer.yytext;\n                yylineno = this.lexer.yylineno;\n                yyloc = this.lexer.yylloc;\n                symbol = lex();\n            }\n\n            // try to recover from error\n            while (1) {\n                // check for error recovery rule in this state\n                if ((TERROR.toString()) in table[state]) {\n                    break;\n                }\n                if (state == 0) {\n                    throw new Error(errStr || 'Parsing halted.');\n                }\n                popStack(1);\n                state = stack[stack.length-1];\n            }\n\n            preErrorSymbol = symbol; // save the lookahead token\n            symbol = TERROR;         // insert generic error symbol as new lookahead\n            state = stack[stack.length-1];\n            action = table[state] && table[state][TERROR];\n            recovering = 3; // allow 3 real symbols to be shifted before reporting a new error\n        }\n\n        // this shouldn't happen, unless resolve defaults are off\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);\n        }\n\n        switch (action[0]) {\n\n            case 1: // shift\n                //this.shiftCount++;\n\n                stack.push(symbol);\n                vstack.push(this.lexer.yytext);\n                lstack.push(this.lexer.yylloc);\n                stack.push(action[1]); // push state\n                symbol = null;\n                if (!preErrorSymbol) { // normal execution/no error\n                    yyleng = this.lexer.yyleng;\n                    yytext = this.lexer.yytext;\n                    yylineno = this.lexer.yylineno;\n                    yyloc = this.lexer.yylloc;\n                    if (recovering > 0)\n                        recovering--;\n                } else { // error just occurred, resume old lookahead f/ before error\n                    symbol = preErrorSymbol;\n                    preErrorSymbol = null;\n                }\n                break;\n\n            case 2: // reduce\n                //this.reductionCount++;\n\n                len = this.productions_[action[1]][1];\n\n                // perform semantic action\n                yyval.$ = vstack[vstack.length-len]; // default to $$ = $1\n                // default location, uses first token for firsts, last for lasts\n                yyval._$ = {\n                    first_line: lstack[lstack.length-(len||1)].first_line,\n                    last_line: lstack[lstack.length-1].last_line,\n                    first_column: lstack[lstack.length-(len||1)].first_column,\n                    last_column: lstack[lstack.length-1].last_column\n                };\n                r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);\n\n                if (typeof r !== 'undefined') {\n                    return r;\n                }\n\n                // pop off stack\n                if (len) {\n                    stack = stack.slice(0,-1*len*2);\n                    vstack = vstack.slice(0, -1*len);\n                    lstack = lstack.slice(0, -1*len);\n                }\n\n                stack.push(this.productions_[action[1]][0]);    // push nonterminal (reduce)\n                vstack.push(yyval.$);\n                lstack.push(yyval._$);\n                // goto new state = table[STATE][NONTERMINAL]\n                newState = table[stack[stack.length-2]][stack[stack.length-1]];\n                stack.push(newState);\n                break;\n\n            case 3: // accept\n                return true;\n        }\n\n    }\n\n    return true;\n}};/* Jison generated lexer */\nvar lexer = (function(){\n\nvar lexer = ({EOF:1,\nparseError:function parseError(str, hash) {\n        if (this.yy.parseError) {\n            this.yy.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\nsetInput:function (input) {\n        this._input = input;\n        this._more = this._less = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};\n        return this;\n    },\ninput:function () {\n        var ch = this._input[0];\n        this.yytext+=ch;\n        this.yyleng++;\n        this.match+=ch;\n        this.matched+=ch;\n        var lines = ch.match(/\\n/);\n        if (lines) this.yylineno++;\n        this._input = this._input.slice(1);\n        return ch;\n    },\nunput:function (ch) {\n        this._input = ch + this._input;\n        return this;\n    },\nmore:function () {\n        this._more = true;\n        return this;\n    },\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\\n/g, \"\");\n    },\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c+\"^\";\n    },\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) this.done = true;\n\n        var token,\n            match,\n            col,\n            lines;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i=0;i < rules.length; i++) {\n            match = this._input.match(this.rules[rules[i]]);\n            if (match) {\n                lines = match[0].match(/\\n.*/g);\n                if (lines) this.yylineno += lines.length;\n                this.yylloc = {first_line: this.yylloc.last_line,\n                               last_line: this.yylineno+1,\n                               first_column: this.yylloc.last_column,\n                               last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}\n                this.yytext += match[0];\n                this.match += match[0];\n                this.matches = match;\n                this.yyleng = this.yytext.length;\n                this._more = false;\n                this._input = this._input.slice(match[0].length);\n                this.matched += match[0];\n                token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);\n                if (token) return token;\n                else return;\n            }\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\\n'+this.showPosition(),\n                    {text: \"\", token: null, line: this.yylineno});\n        }\n    },\nlex:function lex() {\n        var r = this.next();\n        if (typeof r !== 'undefined') {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\nbegin:function begin(condition) {\n        this.conditionStack.push(condition);\n    },\npopState:function popState() {\n        return this.conditionStack.pop();\n    },\n_currentRules:function _currentRules() {\n        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;\n    },\ntopState:function () {\n        return this.conditionStack[this.conditionStack.length-2];\n    },\npushState:function begin(condition) {\n        this.begin(condition);\n    }});\nlexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 20\nbreak;\ncase 2:return 19\nbreak;\ncase 3:return 8\nbreak;\ncase 4:return 9\nbreak;\ncase 5:return 6\nbreak;\ncase 6:return 7\nbreak;\ncase 7:return 11\nbreak;\ncase 8:return 13\nbreak;\ncase 9:return 10\nbreak;\ncase 10:return 12\nbreak;\ncase 11:return 14\nbreak;\ncase 12:return 15\nbreak;\ncase 13:return 16\nbreak;\ncase 14:return 17\nbreak;\ncase 15:return 18\nbreak;\ncase 16:return 5\nbreak;\ncase 17:return 'INVALID'\nbreak;\n}\n};\nlexer.rules = [/^\\s+/,/^[0-9]+(\\.[0-9]+)?\\b/,/^n\\b/,/^\\|\\|/,/^&&/,/^\\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\\(/,/^\\)/,/^$/,/^./];\nlexer.conditions = {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],\"inclusive\":true}};return lexer;})()\nparser.lexer = lexer;\nreturn parser;\n})();\n// End parser\n\n  // Handle node, amd, and global systems\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = Jed;\n    }\n    exports.Jed = Jed;\n  }\n  else {\n    if (typeof define === 'function' && define.amd) {\n      define('jed',[],function() {\n        return Jed;\n      });\n    }\n    // Leak a global regardless of module system\n    root['Jed'] = Jed;\n  }\n\n})(this);\n\n",
    "/**\n * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/text for details\n */\n/*jslint regexp: true */\n/*global require, XMLHttpRequest, ActiveXObject,\n  define, window, process, Packages,\n  java, location, Components, FileUtils */\n\ndefine('text',['module'], function (module) {\n    'use strict';\n\n    var text, fs, Cc, Ci, xpcIsWindows,\n        progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],\n        xmlRegExp = /^\\s*<\\?xml(\\s)+version=[\\'\\\"](\\d)*.(\\d)*[\\'\\\"](\\s)*\\?>/im,\n        bodyRegExp = /<body[^>]*>\\s*([\\s\\S]+)\\s*<\\/body>/im,\n        hasLocation = typeof location !== 'undefined' && location.href,\n        defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\\:/, ''),\n        defaultHostName = hasLocation && location.hostname,\n        defaultPort = hasLocation && (location.port || undefined),\n        buildMap = {},\n        masterConfig = (module.config && module.config()) || {};\n\n    text = {\n        version: '2.0.12',\n\n        strip: function (content) {\n            //Strips <?xml ...?> declarations so that external SVG and XML\n            //documents can be added to a document without worry. Also, if the string\n            //is an HTML document, only the part inside the body tag is returned.\n            if (content) {\n                content = content.replace(xmlRegExp, \"\");\n                var matches = content.match(bodyRegExp);\n                if (matches) {\n                    content = matches[1];\n                }\n            } else {\n                content = \"\";\n            }\n            return content;\n        },\n\n        jsEscape: function (content) {\n            return content.replace(/(['\\\\])/g, '\\\\$1')\n                .replace(/[\\f]/g, \"\\\\f\")\n                .replace(/[\\b]/g, \"\\\\b\")\n                .replace(/[\\n]/g, \"\\\\n\")\n                .replace(/[\\t]/g, \"\\\\t\")\n                .replace(/[\\r]/g, \"\\\\r\")\n                .replace(/[\\u2028]/g, \"\\\\u2028\")\n                .replace(/[\\u2029]/g, \"\\\\u2029\");\n        },\n\n        createXhr: masterConfig.createXhr || function () {\n            //Would love to dump the ActiveX crap in here. Need IE 6 to die first.\n            var xhr, i, progId;\n            if (typeof XMLHttpRequest !== \"undefined\") {\n                return new XMLHttpRequest();\n            } else if (typeof ActiveXObject !== \"undefined\") {\n                for (i = 0; i < 3; i += 1) {\n                    progId = progIds[i];\n                    try {\n                        xhr = new ActiveXObject(progId);\n                    } catch (e) {}\n\n                    if (xhr) {\n                        progIds = [progId];  // so faster next time\n                        break;\n                    }\n                }\n            }\n\n            return xhr;\n        },\n\n        /**\n         * Parses a resource name into its component parts. Resource names\n         * look like: module/name.ext!strip, where the !strip part is\n         * optional.\n         * @param {String} name the resource name\n         * @returns {Object} with properties \"moduleName\", \"ext\" and \"strip\"\n         * where strip is a boolean.\n         */\n        parseName: function (name) {\n            var modName, ext, temp,\n                strip = false,\n                index = name.indexOf(\".\"),\n                isRelative = name.indexOf('./') === 0 ||\n                             name.indexOf('../') === 0;\n\n            if (index !== -1 && (!isRelative || index > 1)) {\n                modName = name.substring(0, index);\n                ext = name.substring(index + 1, name.length);\n            } else {\n                modName = name;\n            }\n\n            temp = ext || modName;\n            index = temp.indexOf(\"!\");\n            if (index !== -1) {\n                //Pull off the strip arg.\n                strip = temp.substring(index + 1) === \"strip\";\n                temp = temp.substring(0, index);\n                if (ext) {\n                    ext = temp;\n                } else {\n                    modName = temp;\n                }\n            }\n\n            return {\n                moduleName: modName,\n                ext: ext,\n                strip: strip\n            };\n        },\n\n        xdRegExp: /^((\\w+)\\:)?\\/\\/([^\\/\\\\]+)/,\n\n        /**\n         * Is an URL on another domain. Only works for browser use, returns\n         * false in non-browser environments. Only used to know if an\n         * optimized .js version of a text resource should be loaded\n         * instead.\n         * @param {String} url\n         * @returns Boolean\n         */\n        useXhr: function (url, protocol, hostname, port) {\n            var uProtocol, uHostName, uPort,\n                match = text.xdRegExp.exec(url);\n            if (!match) {\n                return true;\n            }\n            uProtocol = match[2];\n            uHostName = match[3];\n\n            uHostName = uHostName.split(':');\n            uPort = uHostName[1];\n            uHostName = uHostName[0];\n\n            return (!uProtocol || uProtocol === protocol) &&\n                   (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&\n                   ((!uPort && !uHostName) || uPort === port);\n        },\n\n        finishLoad: function (name, strip, content, onLoad) {\n            content = strip ? text.strip(content) : content;\n            if (masterConfig.isBuild) {\n                buildMap[name] = content;\n            }\n            onLoad(content);\n        },\n\n        load: function (name, req, onLoad, config) {\n            //Name has format: some.module.filext!strip\n            //The strip part is optional.\n            //if strip is present, then that means only get the string contents\n            //inside a body tag in an HTML string. For XML/SVG content it means\n            //removing the <?xml ...?> declarations so the content can be inserted\n            //into the current doc without problems.\n\n            // Do not bother with the work if a build and text will\n            // not be inlined.\n            if (config && config.isBuild && !config.inlineText) {\n                onLoad();\n                return;\n            }\n\n            masterConfig.isBuild = config && config.isBuild;\n\n            var parsed = text.parseName(name),\n                nonStripName = parsed.moduleName +\n                    (parsed.ext ? '.' + parsed.ext : ''),\n                url = req.toUrl(nonStripName),\n                useXhr = (masterConfig.useXhr) ||\n                         text.useXhr;\n\n            // Do not load if it is an empty: url\n            if (url.indexOf('empty:') === 0) {\n                onLoad();\n                return;\n            }\n\n            //Load the text. Use XHR if possible and in a browser.\n            if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {\n                text.get(url, function (content) {\n                    text.finishLoad(name, parsed.strip, content, onLoad);\n                }, function (err) {\n                    if (onLoad.error) {\n                        onLoad.error(err);\n                    }\n                });\n            } else {\n                //Need to fetch the resource across domains. Assume\n                //the resource has been optimized into a JS module. Fetch\n                //by the module name + extension, but do not include the\n                //!strip part to avoid file system issues.\n                req([nonStripName], function (content) {\n                    text.finishLoad(parsed.moduleName + '.' + parsed.ext,\n                                    parsed.strip, content, onLoad);\n                });\n            }\n        },\n\n        write: function (pluginName, moduleName, write, config) {\n            if (buildMap.hasOwnProperty(moduleName)) {\n                var content = text.jsEscape(buildMap[moduleName]);\n                write.asModule(pluginName + \"!\" + moduleName,\n                               \"define(function () { return '\" +\n                                   content +\n                               \"';});\\n\");\n            }\n        },\n\n        writeFile: function (pluginName, moduleName, req, write, config) {\n            var parsed = text.parseName(moduleName),\n                extPart = parsed.ext ? '.' + parsed.ext : '',\n                nonStripName = parsed.moduleName + extPart,\n                //Use a '.js' file name so that it indicates it is a\n                //script that can be loaded across domains.\n                fileName = req.toUrl(parsed.moduleName + extPart) + '.js';\n\n            //Leverage own load() method to load plugin value, but only\n            //write out values that do not have the strip argument,\n            //to avoid any potential issues with ! in file names.\n            text.load(nonStripName, req, function (value) {\n                //Use own write() method to construct full module value.\n                //But need to create shell that translates writeFile's\n                //write() to the right interface.\n                var textWrite = function (contents) {\n                    return write(fileName, contents);\n                };\n                textWrite.asModule = function (moduleName, contents) {\n                    return write.asModule(moduleName, fileName, contents);\n                };\n\n                text.write(pluginName, nonStripName, textWrite, config);\n            }, config);\n        }\n    };\n\n    if (masterConfig.env === 'node' || (!masterConfig.env &&\n            typeof process !== \"undefined\" &&\n            process.versions &&\n            !!process.versions.node &&\n            !process.versions['node-webkit'])) {\n        //Using special require.nodeRequire, something added by r.js.\n        fs = require.nodeRequire('fs');\n\n        text.get = function (url, callback, errback) {\n            try {\n                var file = fs.readFileSync(url, 'utf8');\n                //Remove BOM (Byte Mark Order) from utf8 files if it is there.\n                if (file.indexOf('\\uFEFF') === 0) {\n                    file = file.substring(1);\n                }\n                callback(file);\n            } catch (e) {\n                if (errback) {\n                    errback(e);\n                }\n            }\n        };\n    } else if (masterConfig.env === 'xhr' || (!masterConfig.env &&\n            text.createXhr())) {\n        text.get = function (url, callback, errback, headers) {\n            var xhr = text.createXhr(), header;\n            xhr.open('GET', url, true);\n\n            //Allow plugins direct access to xhr headers\n            if (headers) {\n                for (header in headers) {\n                    if (headers.hasOwnProperty(header)) {\n                        xhr.setRequestHeader(header.toLowerCase(), headers[header]);\n                    }\n                }\n            }\n\n            //Allow overrides specified in config\n            if (masterConfig.onXhr) {\n                masterConfig.onXhr(xhr, url);\n            }\n\n            xhr.onreadystatechange = function (evt) {\n                var status, err;\n                //Do not explicitly handle errors, those should be\n                //visible via console output in the browser.\n                if (xhr.readyState === 4) {\n                    status = xhr.status || 0;\n                    if (status > 399 && status < 600) {\n                        //An http 4xx or 5xx error. Signal an error.\n                        err = new Error(url + ' HTTP status: ' + status);\n                        err.xhr = xhr;\n                        if (errback) {\n                            errback(err);\n                        }\n                    } else {\n                        callback(xhr.responseText);\n                    }\n\n                    if (masterConfig.onXhrComplete) {\n                        masterConfig.onXhrComplete(xhr, url);\n                    }\n                }\n            };\n            xhr.send(null);\n        };\n    } else if (masterConfig.env === 'rhino' || (!masterConfig.env &&\n            typeof Packages !== 'undefined' && typeof java !== 'undefined')) {\n        //Why Java, why is this so awkward?\n        text.get = function (url, callback) {\n            var stringBuffer, line,\n                encoding = \"utf-8\",\n                file = new java.io.File(url),\n                lineSeparator = java.lang.System.getProperty(\"line.separator\"),\n                input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),\n                content = '';\n            try {\n                stringBuffer = new java.lang.StringBuffer();\n                line = input.readLine();\n\n                // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324\n                // http://www.unicode.org/faq/utf_bom.html\n\n                // Note that when we use utf-8, the BOM should appear as \"EF BB BF\", but it doesn't due to this bug in the JDK:\n                // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058\n                if (line && line.length() && line.charAt(0) === 0xfeff) {\n                    // Eat the BOM, since we've already found the encoding on this file,\n                    // and we plan to concatenating this buffer with others; the BOM should\n                    // only appear at the top of a file.\n                    line = line.substring(1);\n                }\n\n                if (line !== null) {\n                    stringBuffer.append(line);\n                }\n\n                while ((line = input.readLine()) !== null) {\n                    stringBuffer.append(lineSeparator);\n                    stringBuffer.append(line);\n                }\n                //Make sure we return a JavaScript string and not a Java string.\n                content = String(stringBuffer.toString()); //String\n            } finally {\n                input.close();\n            }\n            callback(content);\n        };\n    } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&\n            typeof Components !== 'undefined' && Components.classes &&\n            Components.interfaces)) {\n        //Avert your gaze!\n        Cc = Components.classes;\n        Ci = Components.interfaces;\n        Components.utils['import']('resource://gre/modules/FileUtils.jsm');\n        xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);\n\n        text.get = function (url, callback) {\n            var inStream, convertStream, fileObj,\n                readData = {};\n\n            if (xpcIsWindows) {\n                url = url.replace(/\\//g, '\\\\');\n            }\n\n            fileObj = new FileUtils.File(url);\n\n            //XPCOM, you so crazy\n            try {\n                inStream = Cc['@mozilla.org/network/file-input-stream;1']\n                           .createInstance(Ci.nsIFileInputStream);\n                inStream.init(fileObj, 1, 0, false);\n\n                convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']\n                                .createInstance(Ci.nsIConverterInputStream);\n                convertStream.init(inStream, \"utf-8\", inStream.available(),\n                Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);\n\n                convertStream.readString(inStream.available(), readData);\n                convertStream.close();\n                inStream.close();\n                callback(readData.value);\n            } catch (e) {\n                throw new Error((fileObj && fileObj.path || '') + ': ' + e);\n            }\n        };\n    }\n    return text;\n});\n\n",
    "/** @license\n * RequireJS plugin for loading JSON files\n * - depends on Text plugin and it was HEAVILY \"inspired\" by it as well.\n * Author: Miller Medeiros\n * Version: 0.4.0 (2014/04/10)\n * Released under the MIT license\n */\ndefine('json',['text'], function(text){\n\n    var CACHE_BUST_QUERY_PARAM = 'bust',\n        CACHE_BUST_FLAG = '!bust',\n        jsonParse = (typeof JSON !== 'undefined' && typeof JSON.parse === 'function')? JSON.parse : function(val){\n            return eval('('+ val +')'); //quick and dirty\n        },\n        buildMap = {};\n\n    function cacheBust(url){\n        url = url.replace(CACHE_BUST_FLAG, '');\n        url += (url.indexOf('?') < 0)? '?' : '&';\n        return url + CACHE_BUST_QUERY_PARAM +'='+ Math.round(2147483647 * Math.random());\n    }\n\n    //API\n    return {\n\n        load : function(name, req, onLoad, config) {\n            if (( config.isBuild && (config.inlineJSON === false || name.indexOf(CACHE_BUST_QUERY_PARAM +'=') !== -1)) || (req.toUrl(name).indexOf('empty:') === 0)) {\n                //avoid inlining cache busted JSON or if inlineJSON:false\n                //and don't inline files marked as empty!\n                onLoad(null);\n            } else {\n                text.get(req.toUrl(name), function(data){\n                    var parsed;\n                    if (config.isBuild) {\n                        buildMap[name] = data;\n                        onLoad(data);\n                    } else {\n                        try {\n                            parsed = jsonParse(data);\n                        } catch (e) {\n                            onLoad.error(e);\n                        }\n                        onLoad(parsed);\n                    }\n                },\n                    onLoad.error, {\n                        accept: 'application/json'\n                    }\n                );\n            }\n        },\n\n        normalize : function (name, normalize) {\n            // used normalize to avoid caching references to a \"cache busted\" request\n            if (name.indexOf(CACHE_BUST_FLAG) !== -1) {\n                name = cacheBust(name);\n            }\n            // resolve any relative paths\n            return normalize(name);\n        },\n\n        //write method based on RequireJS official text plugin by James Burke\n        //https://github.com/jrburke/requirejs/blob/master/text.js\n        write : function(pluginName, moduleName, write){\n            if(moduleName in buildMap){\n                var content = buildMap[moduleName];\n                write('define(\"'+ pluginName +'!'+ moduleName +'\", function(){ return '+ content +';});\\n');\n            }\n        }\n\n    };\n});\n\n",
    "\ndefine(\"json!base/../../i18n/nbjs.json\", function(){ return {\r\n\t\"domain\": \"nbjs\",\r\n\t\"supported_languages\": [\r\n\t\t\"zh-CN\"\r\n\t],\r\n\t\"locale_data\": {\r\n\t\t\"nbjs\": {\r\n\t\t\t\"\": {\r\n\t\t\t\t\"domain\": \"nbjs\"\r\n         \t}\r\n\t\t}\r\n\t}\r\n}\r\n;});\n\n",
    "/**\n * Plugin to load a single locale.\n */\ndefine('base/js/i18nload',[\n\t\"require\",\n\t\"module\",\n\t // These are only here so that the optimizer knows which ones we MIGHT load.\n\t // We will actually only load the ones we need. There should be one entry\n\t // here for each language you want to support.\n\t // For example, for German....\n\t // \"json!base/../../i18n/de/LC_MESSAGES/nbjs.json\"\n    ], function (require, module) {\n\treturn {\n\t\tid: module.id,\n\n\t\tload: function (locale, callerRequire, onload, loaderConfig) {\n\n\t\t\tvar dependencies = \"json!base/../../i18n/\"+locale+\"/LC_MESSAGES/nbjs.json\";\n\n\t\t\t// Load the JSON file requested\n\t\t\trequire([dependencies], function (data) {\n\t\t\t\tonload(data);\n\t\t\t});\n\t\t}\n\t};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Module to handle i18n ( Internationalization ) and translated UI\n\ndefine('base/js/i18n',[\n    'jed',\n    'moment',\n    'json!../../../i18n/nbjs.json',\n    'base/js/i18nload',\n\t], function(Jed, moment, nbjs, i18nload) {\n    \"use strict\";\n        \n    // Setup language related stuff\n    var ui_lang = navigator.languages && navigator.languages[0] || // Chrome / Firefox\n    navigator.language ||   // All browsers\n    navigator.userLanguage; // IE <= 10\n\n    var init = function() {\n    \tvar msg_promise;\n    \tif (nbjs.supported_languages.indexOf(ui_lang) >= 0) {\n    \t\tmoment.locale(ui_lang);\n    \t\tmsg_promise = new Promise( function (resolve, reject) {\n    \t\t\trequire([i18nload.id+\"!\"+ui_lang], function (data) {\n    \t\t\t\tvar newi18n = new Jed(data);\n    \t\t\t\tnewi18n._ = newi18n.gettext;\n    \t\t\t\tresolve(newi18n);\n    \t\t\t}, function (error) {\n    \t            console.log(\"Error loading translations for language: \"+ui_lang);\n    \t            var newi18n = new Jed(nbjs);\n    \t            newi18n._ = newi18n.gettext;\n    \t            resolve(newi18n);\n    \t\t\t});\n    \t   });\n    \t} else {\n    \t\tmsg_promise = new Promise( function (resolve, reject) {\n\t\t\t    var newi18n = new Jed(nbjs);\n\t\t\t\tnewi18n._ = newi18n.gettext;\n\t\t\t\tresolve(newi18n);\n    \t\t});\n    \t}\n    \treturn msg_promise;\n    }\n    var i18n = new Jed(nbjs);   \n    i18n._ = i18n.gettext;\n    i18n.msg = i18n; // Just a place holder until the init promise resolves.\n    \n    init().then(function (msg) {\n    \ti18n.msg = msg;\n    \ti18n.msg._ = i18n.msg.gettext;\n    });\n    \n    return i18n;\n});\n\n",
    "if(typeof jQuery===\"undefined\"){throw new Error(\"Bootstrap's JavaScript requires jQuery\")}+function($){\"use strict\";var version=$.fn.jquery.split(\" \")[0].split(\".\");if(version[0]<2&&version[1]<9||version[0]==1&&version[1]==9&&version[2]<1||version[0]>3){throw new Error(\"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4\")}}(jQuery);+function($){\"use strict\";function transitionEnd(){var el=document.createElement(\"bootstrap\");var transEndEventNames={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}return false}$.fn.emulateTransitionEnd=function(duration){var called=false;var $el=this;$(this).one(\"bsTransitionEnd\",function(){called=true});var callback=function(){if(!called)$($el).trigger($.support.transition.end)};setTimeout(callback,duration);return this};$(function(){$.support.transition=transitionEnd();if(!$.support.transition)return;$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){\"use strict\";var dismiss='[data-dismiss=\"alert\"]';var Alert=function(el){$(el).on(\"click\",dismiss,this.close)};Alert.VERSION=\"3.3.7\";Alert.TRANSITION_DURATION=150;Alert.prototype.close=function(e){var $this=$(this);var selector=$this.attr(\"data-target\");if(!selector){selector=$this.attr(\"href\");selector=selector&&selector.replace(/.*(?=#[^\\s]*$)/,\"\")}var $parent=$(selector===\"#\"?[]:selector);if(e)e.preventDefault();if(!$parent.length){$parent=$this.closest(\".alert\")}$parent.trigger(e=$.Event(\"close.bs.alert\"));if(e.isDefaultPrevented())return;$parent.removeClass(\"in\");function removeElement(){$parent.detach().trigger(\"closed.bs.alert\").remove()}$.support.transition&&$parent.hasClass(\"fade\")?$parent.one(\"bsTransitionEnd\",removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.alert\");if(!data)$this.data(\"bs.alert\",data=new Alert(this));if(typeof option==\"string\")data[option].call($this)})}var old=$.fn.alert;$.fn.alert=Plugin;$.fn.alert.Constructor=Alert;$.fn.alert.noConflict=function(){$.fn.alert=old;return this};$(document).on(\"click.bs.alert.data-api\",dismiss,Alert.prototype.close)}(jQuery);+function($){\"use strict\";var Button=function(element,options){this.$element=$(element);this.options=$.extend({},Button.DEFAULTS,options);this.isLoading=false};Button.VERSION=\"3.3.7\";Button.DEFAULTS={loadingText:\"loading...\"};Button.prototype.setState=function(state){var d=\"disabled\";var $el=this.$element;var val=$el.is(\"input\")?\"val\":\"html\";var data=$el.data();state+=\"Text\";if(data.resetText==null)$el.data(\"resetText\",$el[val]());setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state]);if(state==\"loadingText\"){this.isLoading=true;$el.addClass(d).attr(d,d).prop(d,true)}else if(this.isLoading){this.isLoading=false;$el.removeClass(d).removeAttr(d).prop(d,false)}},this),0)};Button.prototype.toggle=function(){var changed=true;var $parent=this.$element.closest('[data-toggle=\"buttons\"]');if($parent.length){var $input=this.$element.find(\"input\");if($input.prop(\"type\")==\"radio\"){if($input.prop(\"checked\"))changed=false;$parent.find(\".active\").removeClass(\"active\");this.$element.addClass(\"active\")}else if($input.prop(\"type\")==\"checkbox\"){if($input.prop(\"checked\")!==this.$element.hasClass(\"active\"))changed=false;this.$element.toggleClass(\"active\")}$input.prop(\"checked\",this.$element.hasClass(\"active\"));if(changed)$input.trigger(\"change\")}else{this.$element.attr(\"aria-pressed\",!this.$element.hasClass(\"active\"));this.$element.toggleClass(\"active\")}};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.button\");var options=typeof option==\"object\"&&option;if(!data)$this.data(\"bs.button\",data=new Button(this,options));if(option==\"toggle\")data.toggle();else if(option)data.setState(option)})}var old=$.fn.button;$.fn.button=Plugin;$.fn.button.Constructor=Button;$.fn.button.noConflict=function(){$.fn.button=old;return this};$(document).on(\"click.bs.button.data-api\",'[data-toggle^=\"button\"]',function(e){var $btn=$(e.target).closest(\".btn\");Plugin.call($btn,\"toggle\");if(!$(e.target).is('input[type=\"radio\"], input[type=\"checkbox\"]')){e.preventDefault();if($btn.is(\"input,button\"))$btn.trigger(\"focus\");else $btn.find(\"input:visible,button:visible\").first().trigger(\"focus\")}}).on(\"focus.bs.button.data-api blur.bs.button.data-api\",'[data-toggle^=\"button\"]',function(e){$(e.target).closest(\".btn\").toggleClass(\"focus\",/^focus(in)?$/.test(e.type))})}(jQuery);+function($){\"use strict\";var Carousel=function(element,options){this.$element=$(element);this.$indicators=this.$element.find(\".carousel-indicators\");this.options=options;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on(\"keydown.bs.carousel\",$.proxy(this.keydown,this));this.options.pause==\"hover\"&&!(\"ontouchstart\"in document.documentElement)&&this.$element.on(\"mouseenter.bs.carousel\",$.proxy(this.pause,this)).on(\"mouseleave.bs.carousel\",$.proxy(this.cycle,this))};Carousel.VERSION=\"3.3.7\";Carousel.TRANSITION_DURATION=600;Carousel.DEFAULTS={interval:5e3,pause:\"hover\",wrap:true,keyboard:true};Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return;switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()};Carousel.prototype.cycle=function(e){e||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval));return this};Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children(\".item\");return this.$items.index(item||this.$active)};Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active);var willWrap=direction==\"prev\"&&activeIndex===0||direction==\"next\"&&activeIndex==this.$items.length-1;if(willWrap&&!this.options.wrap)return active;var delta=direction==\"prev\"?-1:1;var itemIndex=(activeIndex+delta)%this.$items.length;return this.$items.eq(itemIndex)};Carousel.prototype.to=function(pos){var that=this;var activeIndex=this.getItemIndex(this.$active=this.$element.find(\".item.active\"));if(pos>this.$items.length-1||pos<0)return;if(this.sliding)return this.$element.one(\"slid.bs.carousel\",function(){that.to(pos)});if(activeIndex==pos)return this.pause().cycle();return this.slide(pos>activeIndex?\"next\":\"prev\",this.$items.eq(pos))};Carousel.prototype.pause=function(e){e||(this.paused=true);if(this.$element.find(\".next, .prev\").length&&$.support.transition){this.$element.trigger($.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};Carousel.prototype.next=function(){if(this.sliding)return;return this.slide(\"next\")};Carousel.prototype.prev=function(){if(this.sliding)return;return this.slide(\"prev\")};Carousel.prototype.slide=function(type,next){var $active=this.$element.find(\".item.active\");var $next=next||this.getItemForDirection(type,$active);var isCycling=this.interval;var direction=type==\"next\"?\"left\":\"right\";var that=this;if($next.hasClass(\"active\"))return this.sliding=false;var relatedTarget=$next[0];var slideEvent=$.Event(\"slide.bs.carousel\",{relatedTarget:relatedTarget,direction:direction});this.$element.trigger(slideEvent);if(slideEvent.isDefaultPrevented())return;this.sliding=true;isCycling&&this.pause();if(this.$indicators.length){this.$indicators.find(\".active\").removeClass(\"active\");var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]);$nextIndicator&&$nextIndicator.addClass(\"active\")}var slidEvent=$.Event(\"slid.bs.carousel\",{relatedTarget:relatedTarget,direction:direction});if($.support.transition&&this.$element.hasClass(\"slide\")){$next.addClass(type);$next[0].offsetWidth;$active.addClass(direction);$next.addClass(direction);$active.one(\"bsTransitionEnd\",function(){$next.removeClass([type,direction].join(\" \")).addClass(\"active\");$active.removeClass([\"active\",direction].join(\" \"));that.sliding=false;setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass(\"active\");$next.addClass(\"active\");this.sliding=false;this.$element.trigger(slidEvent)}isCycling&&this.cycle();return this};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.carousel\");var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option==\"object\"&&option);var action=typeof option==\"string\"?option:options.slide;if(!data)$this.data(\"bs.carousel\",data=new Carousel(this,options));if(typeof option==\"number\")data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle()})}var old=$.fn.carousel;$.fn.carousel=Plugin;$.fn.carousel.Constructor=Carousel;$.fn.carousel.noConflict=function(){$.fn.carousel=old;return this};var clickHandler=function(e){var href;var $this=$(this);var $target=$($this.attr(\"data-target\")||(href=$this.attr(\"href\"))&&href.replace(/.*(?=#[^\\s]+$)/,\"\"));if(!$target.hasClass(\"carousel\"))return;var options=$.extend({},$target.data(),$this.data());var slideIndex=$this.attr(\"data-slide-to\");if(slideIndex)options.interval=false;Plugin.call($target,options);if(slideIndex){$target.data(\"bs.carousel\").to(slideIndex)}e.preventDefault()};$(document).on(\"click.bs.carousel.data-api\",\"[data-slide]\",clickHandler).on(\"click.bs.carousel.data-api\",\"[data-slide-to]\",clickHandler);$(window).on(\"load\",function(){$('[data-ride=\"carousel\"]').each(function(){var $carousel=$(this);Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){\"use strict\";var Collapse=function(element,options){this.$element=$(element);this.options=$.extend({},Collapse.DEFAULTS,options);this.$trigger=$('[data-toggle=\"collapse\"][href=\"#'+element.id+'\"],'+'[data-toggle=\"collapse\"][data-target=\"#'+element.id+'\"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle)this.toggle()};Collapse.VERSION=\"3.3.7\";Collapse.TRANSITION_DURATION=350;Collapse.DEFAULTS={toggle:true};Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass(\"width\");return hasWidth?\"width\":\"height\"};Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass(\"in\"))return;var activesData;var actives=this.$parent&&this.$parent.children(\".panel\").children(\".in, .collapsing\");if(actives&&actives.length){activesData=actives.data(\"bs.collapse\");if(activesData&&activesData.transitioning)return}var startEvent=$.Event(\"show.bs.collapse\");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;if(actives&&actives.length){Plugin.call(actives,\"hide\");activesData||actives.data(\"bs.collapse\",null)}var dimension=this.dimension();this.$element.removeClass(\"collapse\").addClass(\"collapsing\")[dimension](0).attr(\"aria-expanded\",true);this.$trigger.removeClass(\"collapsed\").attr(\"aria-expanded\",true);this.transitioning=1;var complete=function(){this.$element.removeClass(\"collapsing\").addClass(\"collapse in\")[dimension](\"\");this.transitioning=0;this.$element.trigger(\"shown.bs.collapse\")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase([\"scroll\",dimension].join(\"-\"));this.$element.one(\"bsTransitionEnd\",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])};Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass(\"in\"))return;var startEvent=$.Event(\"hide.bs.collapse\");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight;this.$element.addClass(\"collapsing\").removeClass(\"collapse in\").attr(\"aria-expanded\",false);this.$trigger.addClass(\"collapsed\").attr(\"aria-expanded\",false);this.transitioning=1;var complete=function(){this.transitioning=0;this.$element.removeClass(\"collapsing\").addClass(\"collapse\").trigger(\"hidden.bs.collapse\")};if(!$.support.transition)return complete.call(this);this.$element[dimension](0).one(\"bsTransitionEnd\",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)};Collapse.prototype.toggle=function(){this[this.$element.hasClass(\"in\")?\"hide\":\"show\"]()};Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle=\"collapse\"][data-parent=\"'+this.options.parent+'\"]').each($.proxy(function(i,element){var $element=$(element);this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()};Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass(\"in\");$element.attr(\"aria-expanded\",isOpen);$trigger.toggleClass(\"collapsed\",!isOpen).attr(\"aria-expanded\",isOpen)};function getTargetFromTrigger($trigger){var href;var target=$trigger.attr(\"data-target\")||(href=$trigger.attr(\"href\"))&&href.replace(/.*(?=#[^\\s]+$)/,\"\");return $(target)}function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.collapse\");var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option==\"object\"&&option);if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=false;if(!data)$this.data(\"bs.collapse\",data=new Collapse(this,options));if(typeof option==\"string\")data[option]()})}var old=$.fn.collapse;$.fn.collapse=Plugin;$.fn.collapse.Constructor=Collapse;$.fn.collapse.noConflict=function(){$.fn.collapse=old;return this};$(document).on(\"click.bs.collapse.data-api\",'[data-toggle=\"collapse\"]',function(e){var $this=$(this);if(!$this.attr(\"data-target\"))e.preventDefault();var $target=getTargetFromTrigger($this);var data=$target.data(\"bs.collapse\");var option=data?\"toggle\":$this.data();Plugin.call($target,option)})}(jQuery);+function($){\"use strict\";var backdrop=\".dropdown-backdrop\";var toggle='[data-toggle=\"dropdown\"]';var Dropdown=function(element){$(element).on(\"click.bs.dropdown\",this.toggle)};Dropdown.VERSION=\"3.3.7\";function getParent($this){var selector=$this.attr(\"data-target\");if(!selector){selector=$this.attr(\"href\");selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\\s]*$)/,\"\")}var $parent=selector&&$(selector);return $parent&&$parent.length?$parent:$this.parent()}function clearMenus(e){if(e&&e.which===3)return;$(backdrop).remove();$(toggle).each(function(){var $this=$(this);var $parent=getParent($this);var relatedTarget={relatedTarget:this};if(!$parent.hasClass(\"open\"))return;if(e&&e.type==\"click\"&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target))return;$parent.trigger(e=$.Event(\"hide.bs.dropdown\",relatedTarget));if(e.isDefaultPrevented())return;$this.attr(\"aria-expanded\",\"false\");$parent.removeClass(\"open\").trigger($.Event(\"hidden.bs.dropdown\",relatedTarget))})}Dropdown.prototype.toggle=function(e){var $this=$(this);if($this.is(\".disabled, :disabled\"))return;var $parent=getParent($this);var isActive=$parent.hasClass(\"open\");clearMenus();if(!isActive){if(\"ontouchstart\"in document.documentElement&&!$parent.closest(\".navbar-nav\").length){$(document.createElement(\"div\")).addClass(\"dropdown-backdrop\").insertAfter($(this)).on(\"click\",clearMenus)}var relatedTarget={relatedTarget:this};$parent.trigger(e=$.Event(\"show.bs.dropdown\",relatedTarget));if(e.isDefaultPrevented())return;$this.trigger(\"focus\").attr(\"aria-expanded\",\"true\");$parent.toggleClass(\"open\").trigger($.Event(\"shown.bs.dropdown\",relatedTarget))}return false};Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return;var $this=$(this);e.preventDefault();e.stopPropagation();if($this.is(\".disabled, :disabled\"))return;var $parent=getParent($this);var isActive=$parent.hasClass(\"open\");if(!isActive&&e.which!=27||isActive&&e.which==27){if(e.which==27)$parent.find(toggle).trigger(\"focus\");return $this.trigger(\"click\")}var desc=\" li:not(.disabled):visible a\";var $items=$parent.find(\".dropdown-menu\"+desc);if(!$items.length)return;var index=$items.index(e.target);if(e.which==38&&index>0)index--;if(e.which==40&&index<$items.length-1)index++;if(!~index)index=0;$items.eq(index).trigger(\"focus\")};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.dropdown\");if(!data)$this.data(\"bs.dropdown\",data=new Dropdown(this));if(typeof option==\"string\")data[option].call($this)})}var old=$.fn.dropdown;$.fn.dropdown=Plugin;$.fn.dropdown.Constructor=Dropdown;$.fn.dropdown.noConflict=function(){$.fn.dropdown=old;return this};$(document).on(\"click.bs.dropdown.data-api\",clearMenus).on(\"click.bs.dropdown.data-api\",\".dropdown form\",function(e){e.stopPropagation()}).on(\"click.bs.dropdown.data-api\",toggle,Dropdown.prototype.toggle).on(\"keydown.bs.dropdown.data-api\",toggle,Dropdown.prototype.keydown).on(\"keydown.bs.dropdown.data-api\",\".dropdown-menu\",Dropdown.prototype.keydown)}(jQuery);+function($){\"use strict\";var Modal=function(element,options){this.options=options;this.$body=$(document.body);this.$element=$(element);this.$dialog=this.$element.find(\".modal-dialog\");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=false;if(this.options.remote){this.$element.find(\".modal-content\").load(this.options.remote,$.proxy(function(){this.$element.trigger(\"loaded.bs.modal\")},this))}};Modal.VERSION=\"3.3.7\";Modal.TRANSITION_DURATION=300;Modal.BACKDROP_TRANSITION_DURATION=150;Modal.DEFAULTS={backdrop:true,keyboard:true,show:true};Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)};Modal.prototype.show=function(_relatedTarget){var that=this;var e=$.Event(\"show.bs.modal\",{relatedTarget:_relatedTarget});this.$element.trigger(e);if(this.isShown||e.isDefaultPrevented())return;this.isShown=true;this.checkScrollbar();this.setScrollbar();this.$body.addClass(\"modal-open\");this.escape();this.resize();this.$element.on(\"click.dismiss.bs.modal\",'[data-dismiss=\"modal\"]',$.proxy(this.hide,this));this.$dialog.on(\"mousedown.dismiss.bs.modal\",function(){that.$element.one(\"mouseup.dismiss.bs.modal\",function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=true})});this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass(\"fade\");if(!that.$element.parent().length){that.$element.appendTo(that.$body)}that.$element.show().scrollTop(0);that.adjustDialog();if(transition){that.$element[0].offsetWidth}that.$element.addClass(\"in\");that.enforceFocus();var e=$.Event(\"shown.bs.modal\",{relatedTarget:_relatedTarget});transition?that.$dialog.one(\"bsTransitionEnd\",function(){that.$element.trigger(\"focus\").trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger(\"focus\").trigger(e)})};Modal.prototype.hide=function(e){if(e)e.preventDefault();e=$.Event(\"hide.bs.modal\");this.$element.trigger(e);if(!this.isShown||e.isDefaultPrevented())return;this.isShown=false;this.escape();this.resize();$(document).off(\"focusin.bs.modal\");this.$element.removeClass(\"in\").off(\"click.dismiss.bs.modal\").off(\"mouseup.dismiss.bs.modal\");this.$dialog.off(\"mousedown.dismiss.bs.modal\");$.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one(\"bsTransitionEnd\",$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()};Modal.prototype.enforceFocus=function(){$(document).off(\"focusin.bs.modal\").on(\"focusin.bs.modal\",$.proxy(function(e){if(document!==e.target&&this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger(\"focus\")}},this))};Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on(\"keydown.dismiss.bs.modal\",$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off(\"keydown.dismiss.bs.modal\")}};Modal.prototype.resize=function(){if(this.isShown){$(window).on(\"resize.bs.modal\",$.proxy(this.handleUpdate,this))}else{$(window).off(\"resize.bs.modal\")}};Modal.prototype.hideModal=function(){var that=this;this.$element.hide();this.backdrop(function(){that.$body.removeClass(\"modal-open\");that.resetAdjustments();that.resetScrollbar();that.$element.trigger(\"hidden.bs.modal\")})};Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};Modal.prototype.backdrop=function(callback){var that=this;var animate=this.$element.hasClass(\"fade\")?\"fade\":\"\";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;this.$backdrop=$(document.createElement(\"div\")).addClass(\"modal-backdrop \"+animate).appendTo(this.$body);this.$element.on(\"click.dismiss.bs.modal\",$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false;return}if(e.target!==e.currentTarget)return;this.options.backdrop==\"static\"?this.$element[0].focus():this.hide()},this));if(doAnimate)this.$backdrop[0].offsetWidth;this.$backdrop.addClass(\"in\");if(!callback)return;doAnimate?this.$backdrop.one(\"bsTransitionEnd\",callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass(\"in\");var callbackRemove=function(){that.removeBackdrop();callback&&callback()};$.support.transition&&this.$element.hasClass(\"fade\")?this.$backdrop.one(\"bsTransitionEnd\",callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}};Modal.prototype.handleUpdate=function(){this.adjustDialog()};Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:\"\",paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:\"\"})};Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:\"\",paddingRight:\"\"})};Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth;if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect();fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth;this.scrollbarWidth=this.measureScrollbar()};Modal.prototype.setScrollbar=function(){var bodyPad=parseInt(this.$body.css(\"padding-right\")||0,10);this.originalBodyPad=document.body.style.paddingRight||\"\";if(this.bodyIsOverflowing)this.$body.css(\"padding-right\",bodyPad+this.scrollbarWidth)};Modal.prototype.resetScrollbar=function(){this.$body.css(\"padding-right\",this.originalBodyPad)};Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement(\"div\");scrollDiv.className=\"modal-scrollbar-measure\";this.$body.append(scrollDiv);var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth;this.$body[0].removeChild(scrollDiv);return scrollbarWidth};function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.modal\");var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option==\"object\"&&option);if(!data)$this.data(\"bs.modal\",data=new Modal(this,options));if(typeof option==\"string\")data[option](_relatedTarget);else if(options.show)data.show(_relatedTarget)})}var old=$.fn.modal;$.fn.modal=Plugin;$.fn.modal.Constructor=Modal;$.fn.modal.noConflict=function(){$.fn.modal=old;return this};$(document).on(\"click.bs.modal.data-api\",'[data-toggle=\"modal\"]',function(e){var $this=$(this);var href=$this.attr(\"href\");var $target=$($this.attr(\"data-target\")||href&&href.replace(/.*(?=#[^\\s]+$)/,\"\"));var option=$target.data(\"bs.modal\")?\"toggle\":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());if($this.is(\"a\"))e.preventDefault();$target.one(\"show.bs.modal\",function(showEvent){if(showEvent.isDefaultPrevented())return;$target.one(\"hidden.bs.modal\",function(){$this.is(\":visible\")&&$this.trigger(\"focus\")})});Plugin.call($target,option,this)})}(jQuery);+function($){\"use strict\";var Tooltip=function(element,options){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init(\"tooltip\",element,options)};Tooltip.VERSION=\"3.3.7\";Tooltip.TRANSITION_DURATION=150;Tooltip.DEFAULTS={animation:true,placement:\"top\",selector:false,template:'<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',trigger:\"hover focus\",title:\"\",delay:0,html:false,container:false,viewport:{selector:\"body\",padding:0}};Tooltip.prototype.init=function(type,element,options){this.enabled=true;this.type=type;this.$element=$(element);this.options=this.getOptions(options);this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport);this.inState={click:false,hover:false,focus:false};if(this.$element[0]instanceof document.constructor&&!this.options.selector){throw new Error(\"`selector` option must be specified when initializing \"+this.type+\" on the window.document object!\")}var triggers=this.options.trigger.split(\" \");for(var i=triggers.length;i--;){var trigger=triggers[i];if(trigger==\"click\"){this.$element.on(\"click.\"+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!=\"manual\"){var eventIn=trigger==\"hover\"?\"mouseenter\":\"focusin\";var eventOut=trigger==\"hover\"?\"mouseleave\":\"focusout\";this.$element.on(eventIn+\".\"+this.type,this.options.selector,$.proxy(this.enter,this));this.$element.on(eventOut+\".\"+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()};Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS};Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options);if(options.delay&&typeof options.delay==\"number\"){options.delay={show:options.delay,hide:options.delay}}return options};Tooltip.prototype.getDelegateOptions=function(){var options={};var defaults=this.getDefaults();this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value});return options};Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data(\"bs.\"+this.type);if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions());$(obj.currentTarget).data(\"bs.\"+this.type,self)}if(obj instanceof $.Event){self.inState[obj.type==\"focusin\"?\"focus\":\"hover\"]=true}if(self.tip().hasClass(\"in\")||self.hoverState==\"in\"){self.hoverState=\"in\";return}clearTimeout(self.timeout);self.hoverState=\"in\";if(!self.options.delay||!self.options.delay.show)return self.show();self.timeout=setTimeout(function(){if(self.hoverState==\"in\")self.show()},self.options.delay.show)};Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState){if(this.inState[key])return true}return false};Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data(\"bs.\"+this.type);if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions());$(obj.currentTarget).data(\"bs.\"+this.type,self)}if(obj instanceof $.Event){self.inState[obj.type==\"focusout\"?\"focus\":\"hover\"]=false}if(self.isInStateTrue())return;clearTimeout(self.timeout);self.hoverState=\"out\";if(!self.options.delay||!self.options.delay.hide)return self.hide();self.timeout=setTimeout(function(){if(self.hoverState==\"out\")self.hide()},self.options.delay.hide)};Tooltip.prototype.show=function(){var e=$.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!inDom)return;var that=this;var $tip=this.tip();var tipId=this.getUID(this.type);this.setContent();$tip.attr(\"id\",tipId);this.$element.attr(\"aria-describedby\",tipId);if(this.options.animation)$tip.addClass(\"fade\");var placement=typeof this.options.placement==\"function\"?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement;var autoToken=/\\s?auto?\\s?/i;var autoPlace=autoToken.test(placement);if(autoPlace)placement=placement.replace(autoToken,\"\")||\"top\";$tip.detach().css({top:0,left:0,display:\"block\"}).addClass(placement).data(\"bs.\"+this.type,this);this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element);this.$element.trigger(\"inserted.bs.\"+this.type);var pos=this.getPosition();var actualWidth=$tip[0].offsetWidth;var actualHeight=$tip[0].offsetHeight;if(autoPlace){var orgPlacement=placement;var viewportDim=this.getPosition(this.$viewport);placement=placement==\"bottom\"&&pos.bottom+actualHeight>viewportDim.bottom?\"top\":placement==\"top\"&&pos.top-actualHeight<viewportDim.top?\"bottom\":placement==\"right\"&&pos.right+actualWidth>viewportDim.width?\"left\":placement==\"left\"&&pos.left-actualWidth<viewportDim.left?\"right\":placement;$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight);this.applyPlacement(calculatedOffset,placement);var complete=function(){var prevHoverState=that.hoverState;that.$element.trigger(\"shown.bs.\"+that.type);that.hoverState=null;if(prevHoverState==\"out\")that.leave(that)};$.support.transition&&this.$tip.hasClass(\"fade\")?$tip.one(\"bsTransitionEnd\",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}};Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip();var width=$tip[0].offsetWidth;var height=$tip[0].offsetHeight;var marginTop=parseInt($tip.css(\"margin-top\"),10);var marginLeft=parseInt($tip.css(\"margin-left\"),10);if(isNaN(marginTop))marginTop=0;if(isNaN(marginLeft))marginLeft=0;offset.top+=marginTop;offset.left+=marginLeft;$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0);$tip.addClass(\"in\");var actualWidth=$tip[0].offsetWidth;var actualHeight=$tip[0].offsetHeight;if(placement==\"top\"&&actualHeight!=height){offset.top=offset.top+height-actualHeight}var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight);if(delta.left)offset.left+=delta.left;else offset.top+=delta.top;var isVertical=/top|bottom/.test(placement);var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight;var arrowOffsetPosition=isVertical?\"offsetWidth\":\"offsetHeight\";$tip.offset(offset);this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)};Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?\"left\":\"top\",50*(1-delta/dimension)+\"%\").css(isVertical?\"top\":\"left\",\"\")};Tooltip.prototype.setContent=function(){var $tip=this.tip();var title=this.getTitle();$tip.find(\".tooltip-inner\")[this.options.html?\"html\":\"text\"](title);$tip.removeClass(\"fade in top bottom left right\")};Tooltip.prototype.hide=function(callback){var that=this;var $tip=$(this.$tip);var e=$.Event(\"hide.bs.\"+this.type);function complete(){if(that.hoverState!=\"in\")$tip.detach();if(that.$element){that.$element.removeAttr(\"aria-describedby\").trigger(\"hidden.bs.\"+that.type)}callback&&callback()}this.$element.trigger(e);if(e.isDefaultPrevented())return;$tip.removeClass(\"in\");$.support.transition&&$tip.hasClass(\"fade\")?$tip.one(\"bsTransitionEnd\",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete();this.hoverState=null;return this\n};Tooltip.prototype.fixTitle=function(){var $e=this.$element;if($e.attr(\"title\")||typeof $e.attr(\"data-original-title\")!=\"string\"){$e.attr(\"data-original-title\",$e.attr(\"title\")||\"\").attr(\"title\",\"\")}};Tooltip.prototype.hasContent=function(){return this.getTitle()};Tooltip.prototype.getPosition=function($element){$element=$element||this.$element;var el=$element[0];var isBody=el.tagName==\"BODY\";var elRect=el.getBoundingClientRect();if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}var isSvg=window.SVGElement&&el instanceof window.SVGElement;var elOffset=isBody?{top:0,left:0}:isSvg?null:$element.offset();var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()};var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null;return $.extend({},elRect,scroll,outerDims,elOffset)};Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement==\"bottom\"?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement==\"top\"?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement==\"left\"?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}};Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0};if(!this.$viewport)return delta;var viewportPadding=this.options.viewport&&this.options.viewport.padding||0;var viewportDimensions=this.getPosition(this.$viewport);if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll;var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight;if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding;var rightEdgeOffset=pos.left+viewportPadding+actualWidth;if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.right){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}return delta};Tooltip.prototype.getTitle=function(){var title;var $e=this.$element;var o=this.options;title=$e.attr(\"data-original-title\")||(typeof o.title==\"function\"?o.title.call($e[0]):o.title);return title};Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1e6);while(document.getElementById(prefix));return prefix};Tooltip.prototype.tip=function(){if(!this.$tip){this.$tip=$(this.options.template);if(this.$tip.length!=1){throw new Error(this.type+\" `template` option must consist of exactly 1 top-level element!\")}}return this.$tip};Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")};Tooltip.prototype.enable=function(){this.enabled=true};Tooltip.prototype.disable=function(){this.enabled=false};Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled};Tooltip.prototype.toggle=function(e){var self=this;if(e){self=$(e.currentTarget).data(\"bs.\"+this.type);if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions());$(e.currentTarget).data(\"bs.\"+this.type,self)}}if(e){self.inState.click=!self.inState.click;if(self.isInStateTrue())self.enter(self);else self.leave(self)}else{self.tip().hasClass(\"in\")?self.leave(self):self.enter(self)}};Tooltip.prototype.destroy=function(){var that=this;clearTimeout(this.timeout);this.hide(function(){that.$element.off(\".\"+that.type).removeData(\"bs.\"+that.type);if(that.$tip){that.$tip.detach()}that.$tip=null;that.$arrow=null;that.$viewport=null;that.$element=null})};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.tooltip\");var options=typeof option==\"object\"&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data(\"bs.tooltip\",data=new Tooltip(this,options));if(typeof option==\"string\")data[option]()})}var old=$.fn.tooltip;$.fn.tooltip=Plugin;$.fn.tooltip.Constructor=Tooltip;$.fn.tooltip.noConflict=function(){$.fn.tooltip=old;return this}}(jQuery);+function($){\"use strict\";var Popover=function(element,options){this.init(\"popover\",element,options)};if(!$.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");Popover.VERSION=\"3.3.7\";Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'});Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype);Popover.prototype.constructor=Popover;Popover.prototype.getDefaults=function(){return Popover.DEFAULTS};Popover.prototype.setContent=function(){var $tip=this.tip();var title=this.getTitle();var content=this.getContent();$tip.find(\".popover-title\")[this.options.html?\"html\":\"text\"](title);$tip.find(\".popover-content\").children().detach().end()[this.options.html?typeof content==\"string\"?\"html\":\"append\":\"text\"](content);$tip.removeClass(\"fade top bottom left right in\");if(!$tip.find(\".popover-title\").html())$tip.find(\".popover-title\").hide()};Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()};Popover.prototype.getContent=function(){var $e=this.$element;var o=this.options;return $e.attr(\"data-content\")||(typeof o.content==\"function\"?o.content.call($e[0]):o.content)};Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.popover\");var options=typeof option==\"object\"&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data(\"bs.popover\",data=new Popover(this,options));if(typeof option==\"string\")data[option]()})}var old=$.fn.popover;$.fn.popover=Plugin;$.fn.popover.Constructor=Popover;$.fn.popover.noConflict=function(){$.fn.popover=old;return this}}(jQuery);+function($){\"use strict\";function ScrollSpy(element,options){this.$body=$(document.body);this.$scrollElement=$(element).is(document.body)?$(window):$(element);this.options=$.extend({},ScrollSpy.DEFAULTS,options);this.selector=(this.options.target||\"\")+\" .nav li > a\";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on(\"scroll.bs.scrollspy\",$.proxy(this.process,this));this.refresh();this.process()}ScrollSpy.VERSION=\"3.3.7\";ScrollSpy.DEFAULTS={offset:10};ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};ScrollSpy.prototype.refresh=function(){var that=this;var offsetMethod=\"offset\";var offsetBase=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();if(!$.isWindow(this.$scrollElement[0])){offsetMethod=\"position\";offsetBase=this.$scrollElement.scrollTop()}this.$body.find(this.selector).map(function(){var $el=$(this);var href=$el.data(\"target\")||$el.attr(\"href\");var $href=/^#./.test(href)&&$(href);return $href&&$href.length&&$href.is(\":visible\")&&[[$href[offsetMethod]().top+offsetBase,href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0]);that.targets.push(this[1])})};ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset;var scrollHeight=this.getScrollHeight();var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height();var offsets=this.offsets;var targets=this.targets;var activeTarget=this.activeTarget;var i;if(this.scrollHeight!=scrollHeight){this.refresh()}if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length-1])&&this.activate(i)}if(activeTarget&&scrollTop<offsets[0]){this.activeTarget=null;return this.clear()}for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(offsets[i+1]===undefined||scrollTop<offsets[i+1])&&this.activate(targets[i])}};ScrollSpy.prototype.activate=function(target){this.activeTarget=target;this.clear();var selector=this.selector+'[data-target=\"'+target+'\"],'+this.selector+'[href=\"'+target+'\"]';var active=$(selector).parents(\"li\").addClass(\"active\");if(active.parent(\".dropdown-menu\").length){active=active.closest(\"li.dropdown\").addClass(\"active\")}active.trigger(\"activate.bs.scrollspy\")};ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,\".active\").removeClass(\"active\")};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.scrollspy\");var options=typeof option==\"object\"&&option;if(!data)$this.data(\"bs.scrollspy\",data=new ScrollSpy(this,options));if(typeof option==\"string\")data[option]()})}var old=$.fn.scrollspy;$.fn.scrollspy=Plugin;$.fn.scrollspy.Constructor=ScrollSpy;$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old;return this};$(window).on(\"load.bs.scrollspy.data-api\",function(){$('[data-spy=\"scroll\"]').each(function(){var $spy=$(this);Plugin.call($spy,$spy.data())})})}(jQuery);+function($){\"use strict\";var Tab=function(element){this.element=$(element)};Tab.VERSION=\"3.3.7\";Tab.TRANSITION_DURATION=150;Tab.prototype.show=function(){var $this=this.element;var $ul=$this.closest(\"ul:not(.dropdown-menu)\");var selector=$this.data(\"target\");if(!selector){selector=$this.attr(\"href\");selector=selector&&selector.replace(/.*(?=#[^\\s]*$)/,\"\")}if($this.parent(\"li\").hasClass(\"active\"))return;var $previous=$ul.find(\".active:last a\");var hideEvent=$.Event(\"hide.bs.tab\",{relatedTarget:$this[0]});var showEvent=$.Event(\"show.bs.tab\",{relatedTarget:$previous[0]});$previous.trigger(hideEvent);$this.trigger(showEvent);if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return;var $target=$(selector);this.activate($this.closest(\"li\"),$ul);this.activate($target,$target.parent(),function(){$previous.trigger({type:\"hidden.bs.tab\",relatedTarget:$this[0]});$this.trigger({type:\"shown.bs.tab\",relatedTarget:$previous[0]})})};Tab.prototype.activate=function(element,container,callback){var $active=container.find(\"> .active\");var transition=callback&&$.support.transition&&($active.length&&$active.hasClass(\"fade\")||!!container.find(\"> .fade\").length);function next(){$active.removeClass(\"active\").find(\"> .dropdown-menu > .active\").removeClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",false);element.addClass(\"active\").find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",true);if(transition){element[0].offsetWidth;element.addClass(\"in\")}else{element.removeClass(\"fade\")}if(element.parent(\".dropdown-menu\").length){element.closest(\"li.dropdown\").addClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",true)}callback&&callback()}$active.length&&transition?$active.one(\"bsTransitionEnd\",next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next();$active.removeClass(\"in\")};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.tab\");if(!data)$this.data(\"bs.tab\",data=new Tab(this));if(typeof option==\"string\")data[option]()})}var old=$.fn.tab;$.fn.tab=Plugin;$.fn.tab.Constructor=Tab;$.fn.tab.noConflict=function(){$.fn.tab=old;return this};var clickHandler=function(e){e.preventDefault();Plugin.call($(this),\"show\")};$(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"]',clickHandler).on(\"click.bs.tab.data-api\",'[data-toggle=\"pill\"]',clickHandler)}(jQuery);+function($){\"use strict\";var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options);this.$target=$(this.options.target).on(\"scroll.bs.affix.data-api\",$.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",$.proxy(this.checkPositionWithEventLoop,this));this.$element=$(element);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()};Affix.VERSION=\"3.3.7\";Affix.RESET=\"affix affix-top affix-bottom\";Affix.DEFAULTS={offset:0,target:window};Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop();var position=this.$element.offset();var targetHeight=this.$target.height();if(offsetTop!=null&&this.affixed==\"top\")return scrollTop<offsetTop?\"top\":false;if(this.affixed==\"bottom\"){if(offsetTop!=null)return scrollTop+this.unpin<=position.top?false:\"bottom\";return scrollTop+targetHeight<=scrollHeight-offsetBottom?false:\"bottom\"}var initializing=this.affixed==null;var colliderTop=initializing?scrollTop:position.top;var colliderHeight=initializing?targetHeight:height;if(offsetTop!=null&&scrollTop<=offsetTop)return\"top\";if(offsetBottom!=null&&colliderTop+colliderHeight>=scrollHeight-offsetBottom)return\"bottom\";return false};Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(Affix.RESET).addClass(\"affix\");var scrollTop=this.$target.scrollTop();var position=this.$element.offset();return this.pinnedOffset=position.top-scrollTop};Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)};Affix.prototype.checkPosition=function(){if(!this.$element.is(\":visible\"))return;var height=this.$element.height();var offset=this.options.offset;var offsetTop=offset.top;var offsetBottom=offset.bottom;var scrollHeight=Math.max($(document).height(),$(document.body).height());if(typeof offset!=\"object\")offsetBottom=offsetTop=offset;if(typeof offsetTop==\"function\")offsetTop=offset.top(this.$element);if(typeof offsetBottom==\"function\")offsetBottom=offset.bottom(this.$element);var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom);if(this.affixed!=affix){if(this.unpin!=null)this.$element.css(\"top\",\"\");var affixType=\"affix\"+(affix?\"-\"+affix:\"\");var e=$.Event(affixType+\".bs.affix\");this.$element.trigger(e);if(e.isDefaultPrevented())return;this.affixed=affix;this.unpin=affix==\"bottom\"?this.getPinnedOffset():null;this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace(\"affix\",\"affixed\")+\".bs.affix\")}if(affix==\"bottom\"){this.$element.offset({top:scrollHeight-height-offsetBottom})}};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data(\"bs.affix\");var options=typeof option==\"object\"&&option;if(!data)$this.data(\"bs.affix\",data=new Affix(this,options));if(typeof option==\"string\")data[option]()})}var old=$.fn.affix;$.fn.affix=Plugin;$.fn.affix.Constructor=Affix;$.fn.affix.noConflict=function(){$.fn.affix=old;return this};$(window).on(\"load\",function(){$('[data-spy=\"affix\"]').each(function(){var $spy=$(this);var data=$spy.data();data.offset=data.offset||{};if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom;if(data.offsetTop!=null)data.offset.top=data.offsetTop;Plugin.call($spy,data)})})}(jQuery);\ndefine(\"bootstrap\", [\"jquery\"], (function (global) {\n    return function () {\n        var ret, fn;\n        return ret || global.bootstrap;\n    };\n}(this)));\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/dialog',['jquery',\n    'codemirror/lib/codemirror',\n    'bootstrap',\n\t'base/js/i18n'],\n\tfunction($, CodeMirror, bs, i18n) {\n    \"use strict\";\n\n    /**\n     * A wrapper around bootstrap modal for easier use\n     * Pass it an option dictionary with the following properties:\n     *\n     *    - body : <string> or <DOM node>, main content of the dialog\n     *            if pass a <string> it will be wrapped in a p tag and\n     *            html element escaped, unless you specify sanitize=false\n     *            option.\n     *    - title : Dialog title, default to empty string.\n     *    - buttons : dict of btn_options who keys are button label.\n     *            see btn_options below for description\n     *    - open : callback to trigger on dialog open.\n     *    - destroy:\n     *    - notebook : notebook instance\n     *    - keyboard_manager: keyboard manager instance.\n     *\n     *  Unlike bootstrap modals, the backdrop options is set by default \n     *  to 'static'.\n     *\n     *  The rest of the options are passed as is to bootstrap modals. \n     *\n     *  btn_options: dict with the following property:\n     *  \n     *    - click : callback to trigger on click\n     *    - class : css classes to add to button.\n     *\n     *\n     *\n     **/\n    var modal = function (options) {\n\n        var modal = $(\"<div/>\")\n            .addClass(\"modal\")\n            .addClass(\"fade\")\n            .attr(\"role\", \"dialog\");\n        var dialog = $(\"<div/>\")\n            .addClass(\"modal-dialog\")\n            .appendTo(modal);\n        var dialog_content = $(\"<div/>\")\n            .addClass(\"modal-content\")\n            .appendTo(dialog);\n        if(typeof(options.body) === 'string' && options.sanitize !== false){\n            options.body = $(\"<p/>\").text(options.body);\n        }\n        dialog_content.append(\n            $(\"<div/>\")\n                .addClass(\"modal-header\")\n                .mousedown(function() {\n                  $(\".modal\").draggable({handle: '.modal-header'});\n                })\n                .append($(\"<button>\")\n                    .attr(\"type\", \"button\")\n                    .addClass(\"close\")\n                    .attr(\"data-dismiss\", \"modal\")\n                    .attr(\"aria-hidden\", \"true\")\n                    .html(\"&times;\")\n                ).append(\n                    $(\"<h4/>\")\n                        .addClass('modal-title')\n                        .text(options.title || \"\")\n                )\n        ).append(\n            $(\"<div/>\")\n                .addClass(\"modal-body\")\n                .append(\n                    options.body || $(\"<p/>\")\n                )\n        );\n        \n        var footer = $(\"<div/>\").addClass(\"modal-footer\");\n        \n        var default_button;\n        \n        for (var label in options.buttons) {\n            var btn_opts = options.buttons[label];\n            var button = $(\"<button/>\")\n                .addClass(\"btn btn-default btn-sm\")\n                .attr(\"data-dismiss\", \"modal\")\n                .text(i18n.msg.translate(label).fetch());\n            if (btn_opts.id) {\n                button.attr('id', btn_opts.id);\n            }\n            if (btn_opts.click) {\n                button.click($.proxy(btn_opts.click, dialog_content));\n            }\n            if (btn_opts.class) {\n                button.addClass(btn_opts.class);\n            }\n            footer.append(button);\n            if (options.default_button && label === options.default_button) {\n                default_button = button;\n            }\n        }\n        if (!options.default_button) {\n            default_button = footer.find(\"button\").last();\n        }\n        dialog_content.append(footer);\n        // hook up on-open event\n        modal.on(\"shown.bs.modal\", function () {\n            setTimeout(function () {\n                default_button.focus();\n                if (options.open) {\n                    $.proxy(options.open, modal)();\n                }\n            }, 0);\n        });\n        \n        // destroy modal on hide, unless explicitly asked not to\n        if (options.destroy === undefined || options.destroy) {\n            modal.on(\"hidden.bs.modal\", function () {\n                modal.remove();\n            });\n        }\n        modal.on(\"hidden.bs.modal\", function () {\n            if (options.notebook) {\n                var cell = options.notebook.get_selected_cell();\n                if (cell) cell.select();\n            }\n            if (options.keyboard_manager) {\n                options.keyboard_manager.enable();\n                options.keyboard_manager.command_mode();\n            }\n        });\n        \n        if (options.keyboard_manager) {\n            options.keyboard_manager.disable();\n        }\n        \n        if(options.backdrop === undefined){\n          options.backdrop = 'static';\n        }\n        \n        return modal.modal(options);\n    };\n\n    var kernel_modal = function (options) {\n        /**\n         * only one kernel dialog should be open at a time -- but\n         * other modal dialogs can still be open\n         */\n        $('.kernel-modal').modal('hide');\n        var dialog = modal(options);\n        dialog.addClass('kernel-modal');\n        return dialog;\n    };\n\n    var edit_metadata = function (options) {\n        options.name = options.name || \"Cell\";\n        var error_div = $('<div/>').css('color', 'red');\n        var message_cell = \n            i18n.msg._(\"Manually edit the JSON below to manipulate the metadata for this cell.\");\n        var message_notebook = \n            i18n.msg._(\"Manually edit the JSON below to manipulate the metadata for this notebook.\");\n        var message_end = \n            i18n.msg._(\" We recommend putting custom metadata attributes in an appropriately named substructure,\" +\n            \" so they don't conflict with those of others.\");\n\n        var message;\n        if (options.name === 'Notebook') {\n        \tmessage = message_notebook + message_end;\n        } else {\n        \tmessage = message_cell + message_end;\n        }\n        var textarea = $('<textarea/>')\n            .attr('rows', '13')\n            .attr('cols', '80')\n            .attr('name', 'metadata')\n            .text(JSON.stringify(options.md || {}, null, 2));\n        \n        var dialogform = $('<div/>').attr('title', i18n.msg._('Edit the metadata'))\n            .append(\n                $('<form/>').append(\n                    $('<fieldset/>').append(\n                        $('<label/>')\n                        .attr('for','metadata')\n                        .text(message)\n                        )\n                        .append(error_div)\n                        .append($('<br/>'))\n                        .append(textarea)\n                    )\n            );\n        var editor = CodeMirror.fromTextArea(textarea[0], {\n            lineNumbers: true,\n            matchBrackets: true,\n            indentUnit: 2,\n            autoIndent: true,\n            mode: 'application/json',\n        });\n        var title_msg;\n        if (options.name === \"Notebook\") {\n        \ttitle_msg = i18n.msg._(\"Edit Notebook Metadata\");\n        } else {\n        \ttitle_msg = i18n.msg._(\"Edit Cell Metadata\");\n        }\n        // This statement is used simply so that message extraction\n        // will pick up the strings.\n        var button_labels = [ i18n.msg._(\"Cancel\"), i18n.msg._(\"Edit\"), i18n.msg._(\"OK\"), i18n.msg._(\"Apply\")];\n        var modal_obj = modal({\n            title: title_msg,\n            body: dialogform,\n            default_button: \"Cancel\",\n            buttons: {\n                Cancel: {},\n                Edit: { class : \"btn-primary\",\n                    click: function() {\n                        /**\n                         * validate json and set it\n                         */\n                        var new_md;\n                        try {\n                            new_md = JSON.parse(editor.getValue());\n                        } catch(e) {\n                            console.log(e);\n                            error_div.text(i18n.msg._('WARNING: Could not save invalid JSON.'));\n                            return false;\n                        }\n                        options.callback(new_md);\n                    }\n                }\n            },\n            notebook: options.notebook,\n            keyboard_manager: options.keyboard_manager,\n        });\n\n        modal_obj.on('shown.bs.modal', function(){ editor.refresh(); });\n    };\n\n    var edit_attachments = function (options) {\n        // This shows the Edit Attachments dialog. This dialog allows the\n        // user to delete attachments. We show a list of attachments to\n        // the user and he can mark some of them for deletion. The deletion\n        // is applied when the 'Apply' button of this dialog is pressed.\n        var message;\n        var attachments_list;\n        if (Object.keys(options.attachments).length == 0) {\n            message = i18n.msg._(\"There are no attachments for this cell.\");\n            attachments_list = $('<div>');\n        } else {\n            message = i18n.msg._(\"Current cell attachments\");\n\n            attachments_list = $('<div>')\n                .addClass('list_container')\n                .append(\n                    $('<div>')\n                    .addClass('row list_header')\n                    .append(\n                        $('<div>')\n                        .text(i18n.msg._('Attachments'))\n                    )\n                );\n\n            // This is a set containing keys of attachments to be deleted when\n            // the Apply button is clicked\n            var to_delete = {};\n\n            var refresh_attachments_list = function() {\n                $(attachments_list).find('.row').remove();\n                for (var key in options.attachments) {\n                    var mime = Object.keys(options.attachments[key])[0];\n                    var deleted = key in to_delete;\n\n                    // This ensures the current value of key is captured since\n                    // javascript only has function scope\n                    var btn;\n                    // Trash/restore button\n                    (function(){\n                        var _key = key;\n                        btn = $('<button>')\n                            .addClass('btn btn-default btn-xs')\n                            .css('display', 'inline-block');\n                        if (deleted) {\n                            btn.attr('title', i18n.msg._('Restore'))\n                               .append(\n                                   $('<i>')\n                                   .addClass('fa fa-plus')\n                               );\n                            btn.click(function() {\n                                delete to_delete[_key];\n                                refresh_attachments_list();\n                            });\n                        } else {\n                            btn.attr('title', i18n.msg._('Delete'))\n                               .addClass('btn-danger')\n                               .append(\n                                   $('<i>')\n                                   .addClass('fa fa-trash')\n                               );\n                            btn.click(function() {\n                                to_delete[_key] = true;\n                                refresh_attachments_list();\n                            });\n                        }\n                        return btn;\n                    })();\n                    var row = $('<div>')\n                        .addClass('col-md-12 att_row')\n                        .append(\n                            $('<div>')\n                            .addClass('row')\n                            .append(\n                                $('<div>')\n                                .addClass('att-name col-xs-4')\n                                .text(key)\n                            )\n                            .append(\n                                $('<div>')\n                                .addClass('col-xs-4 text-muted')\n                                .text(mime)\n                            )\n                            .append(\n                                $('<div>')\n                                .addClass('item-buttons pull-right')\n                                .append(btn)\n                            )\n                        );\n                    if (deleted) {\n                        row.find('.att-name')\n                           .css('text-decoration', 'line-through');\n                    }\n\n                    attachments_list.append($('<div>')\n                        .addClass('list_item row')\n                        .append(row)\n                    );\n                }\n            };\n            refresh_attachments_list();\n        }\n\n        var dialogform = $('<div/>')\n            .attr('title', i18n.msg._('Edit attachments'))\n            .append(message)\n            .append('<br />')\n            .append(attachments_list);\n        var title_msg;\n        if ( options.name === \"Notebook\" ) {\n        \ttitle_msg = i18n.msg._(\"Edit Notebook Attachments\");\n        } else {\n        \ttitle_msg = i18n.msg._(\"Edit Cell Attachments\");\n        }\n        var modal_obj = modal({\n            title: title_msg,\n            body: dialogform,\n            buttons: {\n                Apply: { class : \"btn-primary\",\n                    click: function() {\n                        for (var key in to_delete) {\n                            delete options.attachments[key];\n                        }\n                        options.callback(options.attachments);\n                    }\n                },\n                Cancel: {}\n            },\n            notebook: options.notebook,\n            keyboard_manager: options.keyboard_manager,\n        });\n    };\n\n    var insert_image = function (options) {\n        var message =\n            i18n.msg._(\"Select a file to insert.\");\n        var file_input = $('<input/>')\n            .attr('type', 'file')\n            .attr('accept', 'image/*')\n            .attr('name', 'file')\n            .on('change', function(file) {\n                var $btn = $(modal_obj).find('#btn_ok');\n                if (this.files.length > 0) {\n                    $btn.removeClass('disabled');\n                } else {\n                    $btn.addClass('disabled');\n                }\n            });\n        var dialogform = $('<div/>').attr('title', i18n.msg._('Edit attachments'))\n            .append(\n                $('<form id=\"insert-image-form\" />').append(\n                    $('<fieldset/>').append(\n                        $('<label/>')\n                        .attr('for','file')\n                        .text(message)\n                        )\n                        .append($('<br/>'))\n                        .append(file_input)\n                    )\n            );\n        var modal_obj = modal({\n            title: i18n.msg._(\"Select a file\"),\n            body: dialogform,\n            buttons: {\n                OK: {\n                    id : 'btn_ok',\n                    class : \"btn-primary disabled\",\n                    click: function() {\n                        options.callback(file_input[0].files[0]);\n                    }\n                },\n                Cancel: {}\n            },\n            notebook: options.notebook,\n            keyboard_manager: options.keyboard_manager,\n        });\n    };\n\n    \n    var dialog = {\n        modal : modal,\n        kernel_modal : kernel_modal,\n        edit_metadata : edit_metadata,\n        edit_attachments : edit_attachments,\n        insert_image : insert_image\n    };\n\n    return dialog;\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/edit/matchbrackets',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n    (document.documentMode == null || document.documentMode < 8);\n\n  var Pos = CodeMirror.Pos;\n\n  var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\"};\n\n  function findMatchingBracket(cm, where, strict, config) {\n    var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n    var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n    if (!match) return null;\n    var dir = match.charAt(1) == \">\" ? 1 : -1;\n    if (strict && (dir > 0) != (pos == where.ch)) return null;\n    var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n    var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n    if (found == null) return null;\n    return {from: Pos(where.line, pos), to: found && found.pos,\n            match: found && found.ch == match.charAt(0), forward: dir > 0};\n  }\n\n  // bracketRegex is used to specify which type of bracket to scan\n  // should be a regexp, e.g. /[[\\]]/\n  //\n  // Note: If \"where\" is on an open bracket, then this bracket is ignored.\n  //\n  // Returns false when no bracket was found, null when it reached\n  // maxScanLines and gave up\n  function scanForBracket(cm, where, dir, style, config) {\n    var maxScanLen = (config && config.maxScanLineLength) || 10000;\n    var maxScanLines = (config && config.maxScanLines) || 1000;\n\n    var stack = [];\n    var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n    var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n                          : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n    for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n      var line = cm.getLine(lineNo);\n      if (!line) continue;\n      var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n      if (line.length > maxScanLen) continue;\n      if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n      for (; pos != end; pos += dir) {\n        var ch = line.charAt(pos);\n        if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n          var match = matching[ch];\n          if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n          else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n          else stack.pop();\n        }\n      }\n    }\n    return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n  }\n\n  function matchBrackets(cm, autoclear, config) {\n    // Disable brace matching in long lines, since it'll cause hugely slow updates\n    var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n    var marks = [], ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++) {\n      var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);\n      if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n        var style = match.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n        marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n        if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n          marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n      }\n    }\n\n    if (marks.length) {\n      // Kludge to work around the IE bug from issue #1193, where text\n      // input stops going to the textare whever this fires.\n      if (ie_lt8 && cm.state.focused) cm.focus();\n\n      var clear = function() {\n        cm.operation(function() {\n          for (var i = 0; i < marks.length; i++) marks[i].clear();\n        });\n      };\n      if (autoclear) setTimeout(clear, 800);\n      else return clear;\n    }\n  }\n\n  var currentlyHighlighted = null;\n  function doMatchBrackets(cm) {\n    cm.operation(function() {\n      if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n      currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n    });\n  }\n\n  CodeMirror.defineOption(\"matchBrackets\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init)\n      cm.off(\"cursorActivity\", doMatchBrackets);\n    if (val) {\n      cm.state.matchBrackets = typeof val == \"object\" ? val : {};\n      cm.on(\"cursorActivity\", doMatchBrackets);\n    }\n  });\n\n  CodeMirror.defineExtension(\"matchBrackets\", function() {matchBrackets(this, true);});\n  CodeMirror.defineExtension(\"findMatchingBracket\", function(pos, strict, config){\n    return findMatchingBracket(this, pos, strict, config);\n  });\n  CodeMirror.defineExtension(\"scanForBracket\", function(pos, dir, style, config){\n    return scanForBracket(this, pos, dir, style, config);\n  });\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/edit/closebrackets',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var defaults = {\n    pairs: \"()[]{}''\\\"\\\"\",\n    triples: \"\",\n    explode: \"[]{}\"\n  };\n\n  var Pos = CodeMirror.Pos;\n\n  CodeMirror.defineOption(\"autoCloseBrackets\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      cm.removeKeyMap(keyMap);\n      cm.state.closeBrackets = null;\n    }\n    if (val) {\n      cm.state.closeBrackets = val;\n      cm.addKeyMap(keyMap);\n    }\n  });\n\n  function getOption(conf, name) {\n    if (name == \"pairs\" && typeof conf == \"string\") return conf;\n    if (typeof conf == \"object\" && conf[name] != null) return conf[name];\n    return defaults[name];\n  }\n\n  var bind = defaults.pairs + \"`\";\n  var keyMap = {Backspace: handleBackspace, Enter: handleEnter};\n  for (var i = 0; i < bind.length; i++)\n    keyMap[\"'\" + bind.charAt(i) + \"'\"] = handler(bind.charAt(i));\n\n  function handler(ch) {\n    return function(cm) { return handleChar(cm, ch); };\n  }\n\n  function getConfig(cm) {\n    var deflt = cm.state.closeBrackets;\n    if (!deflt) return null;\n    var mode = cm.getModeAt(cm.getCursor());\n    return mode.closeBrackets || deflt;\n  }\n\n  function handleBackspace(cm) {\n    var conf = getConfig(cm);\n    if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n    var pairs = getOption(conf, \"pairs\");\n    var ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++) {\n      if (!ranges[i].empty()) return CodeMirror.Pass;\n      var around = charsAround(cm, ranges[i].head);\n      if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n    }\n    for (var i = ranges.length - 1; i >= 0; i--) {\n      var cur = ranges[i].head;\n      cm.replaceRange(\"\", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));\n    }\n  }\n\n  function handleEnter(cm) {\n    var conf = getConfig(cm);\n    var explode = conf && getOption(conf, \"explode\");\n    if (!explode || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n    var ranges = cm.listSelections();\n    for (var i = 0; i < ranges.length; i++) {\n      if (!ranges[i].empty()) return CodeMirror.Pass;\n      var around = charsAround(cm, ranges[i].head);\n      if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n    }\n    cm.operation(function() {\n      cm.replaceSelection(\"\\n\\n\", null);\n      cm.execCommand(\"goCharLeft\");\n      ranges = cm.listSelections();\n      for (var i = 0; i < ranges.length; i++) {\n        var line = ranges[i].head.line;\n        cm.indentLine(line, null, true);\n        cm.indentLine(line + 1, null, true);\n      }\n    });\n  }\n\n  function handleChar(cm, ch) {\n    var conf = getConfig(cm);\n    if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n    var pairs = getOption(conf, \"pairs\");\n    var pos = pairs.indexOf(ch);\n    if (pos == -1) return CodeMirror.Pass;\n    var triples = getOption(conf, \"triples\");\n\n    var identical = pairs.charAt(pos + 1) == ch;\n    var ranges = cm.listSelections();\n    var opening = pos % 2 == 0;\n\n    var type, next;\n    for (var i = 0; i < ranges.length; i++) {\n      var range = ranges[i], cur = range.head, curType;\n      var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));\n      if (opening && !range.empty()) {\n        curType = \"surround\";\n      } else if ((identical || !opening) && next == ch) {\n        if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)\n          curType = \"skipThree\";\n        else\n          curType = \"skip\";\n      } else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 &&\n                 cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch &&\n                 (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != ch)) {\n        curType = \"addFour\";\n      } else if (identical) {\n        if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, ch)) curType = \"both\";\n        else return CodeMirror.Pass;\n      } else if (opening && (cm.getLine(cur.line).length == cur.ch ||\n                             isClosingBracket(next, pairs) ||\n                             /\\s/.test(next))) {\n        curType = \"both\";\n      } else {\n        return CodeMirror.Pass;\n      }\n      if (!type) type = curType;\n      else if (type != curType) return CodeMirror.Pass;\n    }\n\n    var left = pos % 2 ? pairs.charAt(pos - 1) : ch;\n    var right = pos % 2 ? ch : pairs.charAt(pos + 1);\n    cm.operation(function() {\n      if (type == \"skip\") {\n        cm.execCommand(\"goCharRight\");\n      } else if (type == \"skipThree\") {\n        for (var i = 0; i < 3; i++)\n          cm.execCommand(\"goCharRight\");\n      } else if (type == \"surround\") {\n        var sels = cm.getSelections();\n        for (var i = 0; i < sels.length; i++)\n          sels[i] = left + sels[i] + right;\n        cm.replaceSelections(sels, \"around\");\n      } else if (type == \"both\") {\n        cm.replaceSelection(left + right, null);\n        cm.triggerElectric(left + right);\n        cm.execCommand(\"goCharLeft\");\n      } else if (type == \"addFour\") {\n        cm.replaceSelection(left + left + left + left, \"before\");\n        cm.execCommand(\"goCharRight\");\n      }\n    });\n  }\n\n  function isClosingBracket(ch, pairs) {\n    var pos = pairs.lastIndexOf(ch);\n    return pos > -1 && pos % 2 == 1;\n  }\n\n  function charsAround(cm, pos) {\n    var str = cm.getRange(Pos(pos.line, pos.ch - 1),\n                          Pos(pos.line, pos.ch + 1));\n    return str.length == 2 ? str : null;\n  }\n\n  // Project the token type that will exists after the given char is\n  // typed, and use it to determine whether it would cause the start\n  // of a string token.\n  function enteringString(cm, pos, ch) {\n    var line = cm.getLine(pos.line);\n    var token = cm.getTokenAt(pos);\n    if (/\\bstring2?\\b/.test(token.type)) return false;\n    var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4);\n    stream.pos = stream.start = token.start;\n    for (;;) {\n      var type1 = cm.getMode().token(stream, token.state);\n      if (stream.pos >= pos.ch + 1) return /\\bstring2?\\b/.test(type1);\n      stream.start = stream.pos;\n    }\n  }\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/comment/comment',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  var noOptions = {};\n  var nonWS = /[^\\s\\u00a0]/;\n  var Pos = CodeMirror.Pos;\n\n  function firstNonWS(str) {\n    var found = str.search(nonWS);\n    return found == -1 ? 0 : found;\n  }\n\n  CodeMirror.commands.toggleComment = function(cm) {\n    var minLine = Infinity, ranges = cm.listSelections(), mode = null;\n    for (var i = ranges.length - 1; i >= 0; i--) {\n      var from = ranges[i].from(), to = ranges[i].to();\n      if (from.line >= minLine) continue;\n      if (to.line >= minLine) to = Pos(minLine, 0);\n      minLine = from.line;\n      if (mode == null) {\n        if (cm.uncomment(from, to)) mode = \"un\";\n        else { cm.lineComment(from, to); mode = \"line\"; }\n      } else if (mode == \"un\") {\n        cm.uncomment(from, to);\n      } else {\n        cm.lineComment(from, to);\n      }\n    }\n  };\n\n  CodeMirror.defineExtension(\"lineComment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var commentString = options.lineComment || mode.lineComment;\n    if (!commentString) {\n      if (options.blockCommentStart || mode.blockCommentStart) {\n        options.fullLines = true;\n        self.blockComment(from, to, options);\n      }\n      return;\n    }\n    var firstLine = self.getLine(from.line);\n    if (firstLine == null) return;\n    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);\n    var pad = options.padding == null ? \" \" : options.padding;\n    var blankLines = options.commentBlankLines || from.line == to.line;\n\n    self.operation(function() {\n      if (options.indent) {\n        var baseString = firstLine.slice(0, firstNonWS(firstLine));\n        for (var i = from.line; i < end; ++i) {\n          var line = self.getLine(i), cut = baseString.length;\n          if (!blankLines && !nonWS.test(line)) continue;\n          if (line.slice(0, cut) != baseString) cut = firstNonWS(line);\n          self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));\n        }\n      } else {\n        for (var i = from.line; i < end; ++i) {\n          if (blankLines || nonWS.test(self.getLine(i)))\n            self.replaceRange(commentString + pad, Pos(i, 0));\n        }\n      }\n    });\n  });\n\n  CodeMirror.defineExtension(\"blockComment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var startString = options.blockCommentStart || mode.blockCommentStart;\n    var endString = options.blockCommentEnd || mode.blockCommentEnd;\n    if (!startString || !endString) {\n      if ((options.lineComment || mode.lineComment) && options.fullLines != false)\n        self.lineComment(from, to, options);\n      return;\n    }\n\n    var end = Math.min(to.line, self.lastLine());\n    if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;\n\n    var pad = options.padding == null ? \" \" : options.padding;\n    if (from.line > end) return;\n\n    self.operation(function() {\n      if (options.fullLines != false) {\n        var lastLineHasText = nonWS.test(self.getLine(end));\n        self.replaceRange(pad + endString, Pos(end));\n        self.replaceRange(startString + pad, Pos(from.line, 0));\n        var lead = options.blockCommentLead || mode.blockCommentLead;\n        if (lead != null) for (var i = from.line + 1; i <= end; ++i)\n          if (i != end || lastLineHasText)\n            self.replaceRange(lead + pad, Pos(i, 0));\n      } else {\n        self.replaceRange(endString, to);\n        self.replaceRange(startString, from);\n      }\n    });\n  });\n\n  CodeMirror.defineExtension(\"uncomment\", function(from, to, options) {\n    if (!options) options = noOptions;\n    var self = this, mode = self.getModeAt(from);\n    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);\n\n    // Try finding line comments\n    var lineString = options.lineComment || mode.lineComment, lines = [];\n    var pad = options.padding == null ? \" \" : options.padding, didSomething;\n    lineComment: {\n      if (!lineString) break lineComment;\n      for (var i = start; i <= end; ++i) {\n        var line = self.getLine(i);\n        var found = line.indexOf(lineString);\n        if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;\n        if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;\n        if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;\n        lines.push(line);\n      }\n      self.operation(function() {\n        for (var i = start; i <= end; ++i) {\n          var line = lines[i - start];\n          var pos = line.indexOf(lineString), endPos = pos + lineString.length;\n          if (pos < 0) continue;\n          if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;\n          didSomething = true;\n          self.replaceRange(\"\", Pos(i, pos), Pos(i, endPos));\n        }\n      });\n      if (didSomething) return true;\n    }\n\n    // Try block comments\n    var startString = options.blockCommentStart || mode.blockCommentStart;\n    var endString = options.blockCommentEnd || mode.blockCommentEnd;\n    if (!startString || !endString) return false;\n    var lead = options.blockCommentLead || mode.blockCommentLead;\n    var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);\n    var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);\n    if (close == -1 && start != end) {\n      endLine = self.getLine(--end);\n      close = endLine.lastIndexOf(endString);\n    }\n    if (open == -1 || close == -1 ||\n        !/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||\n        !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))\n      return false;\n\n    // Avoid killing block comments completely outside the selection.\n    // Positions of the last startString before the start of the selection, and the first endString after it.\n    var lastStart = startLine.lastIndexOf(startString, from.ch);\n    var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);\n    if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;\n    // Positions of the first endString after the end of the selection, and the last startString before it.\n    firstEnd = endLine.indexOf(endString, to.ch);\n    var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);\n    lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;\n    if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;\n\n    self.operation(function() {\n      self.replaceRange(\"\", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n                        Pos(end, close + endString.length));\n      var openEnd = open + startString.length;\n      if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;\n      self.replaceRange(\"\", Pos(start, open), Pos(start, openEnd));\n      if (lead) for (var i = start + 1; i <= end; ++i) {\n        var line = self.getLine(i), found = line.indexOf(lead);\n        if (found == -1 || nonWS.test(line.slice(0, found))) continue;\n        var foundEnd = found + lead.length;\n        if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;\n        self.replaceRange(\"\", Pos(i, found), Pos(i, foundEnd));\n      }\n    });\n    return true;\n  });\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/config',[\n    'base/js/utils',\n    ],\nfunction(utils) {\n    \"use strict\";\n    var ConfigSection = function(section_name, options) {\n        this.section_name = section_name;\n        this.base_url = options.base_url;\n        this.data = {};\n        \n        var that = this;\n        \n        /* .loaded is a promise, fulfilled the first time the config is loaded\n         * from the server. Code can do:\n         *      conf.loaded.then(function() { ... using conf.data ... });\n         */\n        this._one_load_finished = false;\n        this.loaded = new Promise(function(resolve, reject) {\n            that._finish_firstload = resolve;\n        });\n    };\n\n    ConfigSection.prototype.api_url = function() {\n        return utils.url_path_join(this.base_url, 'api/config',\n            utils.encode_uri_components(this.section_name));\n    };\n    \n    ConfigSection.prototype._load_done = function() {\n        if (!this._one_load_finished) {\n            this._one_load_finished = true;\n            this._finish_firstload();\n        }\n    };\n    \n    ConfigSection.prototype.load = function() {\n        var that = this;\n        return utils.promising_ajax(this.api_url(), {\n            cache: false,\n            type: \"GET\",\n            dataType: \"json\",\n        }).then(function(data) {\n            that.data = data;\n            that._load_done();\n            return data;\n        });\n    };\n    \n    /**\n     * Modify the config values stored. Update the local data immediately,\n     * send the change to the server, and use the updated data from the server\n     * when the reply comes.\n     */\n    ConfigSection.prototype.update = function(newdata) {\n        $.extend(true, this.data, newdata);  // true -> recursive update\n        \n        var that = this;\n        return utils.promising_ajax(this.api_url(), {\n            processData: false,\n            type : \"PATCH\",\n            data: JSON.stringify(newdata),\n            dataType : \"json\",\n            contentType: 'application/json',\n        }).then(function(data) {\n            that.data = data;\n            that._load_done();\n            return data;\n        });\n    };\n    \n    \n    var ConfigWithDefaults = function(section, defaults, classname) {\n        this.section = section;\n        this.defaults = defaults;\n        this.classname = classname;\n    };\n    \n    ConfigWithDefaults.prototype._class_data = function() {\n        if (this.classname) {\n            return this.section.data[this.classname] || {};\n        } else {\n            return this.section.data;\n        }\n    };\n    \n    /**\n     * Wait for config to have loaded, then get a value or the default.\n     * Returns a promise.\n     */\n    ConfigWithDefaults.prototype.get = function(key) {\n        var that = this;\n        return this.section.loaded.then(function() {\n            return that.get_sync(key);\n        });\n    };\n    \n    /**\n     * Return a config value. If config is not yet loaded, return the default\n     * instead of waiting for it to load.\n     */\n    ConfigWithDefaults.prototype.get_sync = function(key) {\n        var data = this._class_data();\n        if (key === undefined) {\n            // no key specified, return full config data\n            return $.extend(true, {}, this.defaults, data);\n        }\n\n        var value = data[key];\n        if (value !== undefined) {\n            if (typeof value == 'object') {\n                // merge with defaults if it's an object\n                return $.extend(true, {}, this.defaults[key], value);\n            } else {\n                return value;\n            }\n        }\n        return this.defaults[key];\n    };\n    \n    /**\n     * Set a config value. Send the update to the server, and change our\n     * local copy of the data immediately.\n     * Returns a promise which is fulfilled when the server replies to the\n     * change.\n     */\n     ConfigWithDefaults.prototype.set = function(key, value) {\n         var d = {};\n         d[key] = value;\n         if (this.classname) {\n            var d2 = {};\n            d2[this.classname] = d;\n            return this.section.update(d2);\n        } else {\n            return this.section.update(d);\n        }\n    };\n    \n    return {ConfigSection: ConfigSection,\n            ConfigWithDefaults: ConfigWithDefaults,\n           };\n\n});\n\n",
    "// Distributed under the terms of the Modified BSD License.\n\n/**\n *\n *\n * @module cell\n * @namespace cell\n * @class Cell\n */\n\n\ndefine('notebook/js/cell',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'codemirror/lib/codemirror',\n    'codemirror/addon/edit/matchbrackets',\n    'codemirror/addon/edit/closebrackets',\n    'codemirror/addon/comment/comment',\n    'services/config',\n], function($, utils, i18n, CodeMirror, cm_match, cm_closeb, cm_comment, configmod) {\n    \"use strict\";\n    \n    var overlayHack = CodeMirror.scrollbarModel.native.prototype.overlayHack;\n\n    CodeMirror.scrollbarModel.native.prototype.overlayHack = function () {\n        overlayHack.apply(this, arguments);\n        // Reverse `min-height: 18px` scrollbar hack on OS X\n        // which causes a dead area, making it impossible to click on the last line\n        // when there is horizontal scrolling to do and the \"show scrollbar only when scrolling\" behavior\n        // is enabled.\n        // This, in turn, has the undesirable behavior of never showing the horizontal scrollbar,\n        // even when it should, which is less problematic, at least.\n        if (/Mac/.test(navigator.platform)) {\n            this.horiz.style.minHeight = \"\";\n        }\n    };\n    \n    var Cell = function (options) {\n        /* Constructor\n         *\n         * The Base `Cell` class from which to inherit.\n         * @constructor\n         * @param:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance\n         *          config: dictionary\n         *          keyboard_manager: KeyboardManager instance\n         */\n        options = options || {};\n        this.keyboard_manager = options.keyboard_manager;\n        this.events = options.events;\n        var config = options.config;\n        // superclass default overwrite our default\n        \n        this.selected = false;\n        this.anchor = false;\n        this.rendered = false;\n        this.mode = 'command';\n\n        // Metadata property\n        var that = this;\n        this._metadata = {};\n        Object.defineProperty(this, 'metadata', {\n            get: function() { return that._metadata; },\n            set: function(value) {\n                that._metadata = value;\n                if (that.celltoolbar) {\n                    that.celltoolbar.rebuild();\n                }\n            }\n        });\n\n\n        // backward compat.\n        Object.defineProperty(this, 'cm_config', {\n            get: function() {\n                console.warn(i18n.msg._(\"Warning: accessing Cell.cm_config directly is deprecated.\"));\n                return that._options.cm_config;\n            },\n        });\n\n        // load this from metadata later ?\n        this.user_highlight = 'auto';\n\n        // merge my class-specific config data with general cell-level config\n        var class_config_data = {};\n        if (this.class_config) {\n            class_config_data = this.class_config.get_sync();\n        }\n\n        var cell_config = new configmod.ConfigWithDefaults(options.config,\n            Cell.options_default, 'Cell');\n        var cell_config_data = cell_config.get_sync();\n\n        // this._options is a merge of SomeCell and Cell config data:\n        this._options = utils.mergeopt({}, cell_config_data, class_config_data);\n        this.placeholder = this._options.placeholder || '';\n\n        this.cell_id = utils.uuid();\n\n        // For JS VM engines optimization, attributes should be all set (even\n        // to null) in the constructor, and if possible, if different subclass\n        // have new attributes with same name, they should be created in the\n        // same order. Easiest is to create and set to null in parent class.\n\n        this.element = null;\n        this.cell_type = this.cell_type || null;\n        this.code_mirror = null;\n\n        // The nbformat only specifies attachments for textcell, but to avoid\n        // data loss when switching between cell types in the UI, all cells\n        // have an attachments property here. It is only saved to disk\n        // for textcell though (in toJSON)\n        this.attachments = {};\n\n        this.create_element();\n        if (this.element !== null) {\n            this.element.data(\"cell\", this);\n            this.bind_events();\n            this.init_classes();\n        }\n    };\n\n    Cell.options_default = {\n        cm_config : {\n            indentUnit : 4,\n            readOnly: false,\n            theme: \"default\",\n            extraKeys: {\n                \"Cmd-Right\": \"goLineRight\",\n                \"End\": \"goLineRight\",\n                \"Cmd-Left\": \"goLineLeft\",\n                \"Tab\": \"indentMore\",\n                \"Shift-Tab\" : \"indentLess\",\n                \"Cmd-/\" : \"toggleComment\",\n                \"Ctrl-/\" : \"toggleComment\",\n            }\n        }\n    };\n    \n    // FIXME: Workaround CM Bug #332 (Safari segfault on drag)\n    // by disabling drag/drop altogether on Safari\n    // https://github.com/codemirror/CodeMirror/issues/332    \n    if (utils.browser[0] == \"Safari\") {\n        Cell.options_default.cm_config.dragDrop = false;\n    }\n\n    /**\n     * Empty. Subclasses must implement create_element.\n     * This should contain all the code to create the DOM element in notebook\n     * and will be called by Base Class constructor.\n     * @method create_element\n     */\n    Cell.prototype.create_element = function () {\n    };\n\n    Cell.prototype.init_classes = function () {\n        /**\n         * Call after this.element exists to initialize the css classes\n         * related to selected, rendered and mode.\n         */\n        if (this.selected) {\n            this.element.addClass('selected');\n        } else {\n            this.element.addClass('unselected');\n        }\n        if (this.rendered) {\n            this.element.addClass('rendered');\n        } else {\n            this.element.addClass('unrendered');\n        }\n    };\n\n    /**\n     * trigger on focus and on click to bubble up to the notebook and\n     * potentially extend the selection if shift-click, contract the selection\n     * if just codemirror focus (so edit mode).\n     * We **might** be able to move that to notebook `handle_edit_mode`.\n     */\n    Cell.prototype._on_click = function (event) {\n        if (!this.selected) {\n            this.events.trigger('select.Cell', {'cell':this, 'extendSelection':event.shiftKey});\n        } else {\n            // I'm already part of the selection; contract selection to just me\n            this.events.trigger('select.Cell', {'cell': this});\n        }\n    };\n\n    /**\n     * Subclasses can implement override bind_events.\n     * Be careful to call the parent method when overwriting as it fires event.\n     * this will be triggered after create_element in constructor.\n     * @method bind_events\n     */\n    Cell.prototype.bind_events = function () {\n        var that = this;\n        // We trigger events so that Cell doesn't have to depend on Notebook.\n        that.element.click(function (event) {\n            that._on_click(event);\n        });\n        if (this.code_mirror) {\n            this.code_mirror.on(\"change\", function(cm, change) {\n                that.events.trigger(\"change.Cell\", {cell: that, change: change});\n                that.events.trigger(\"set_dirty.Notebook\", {value: true});\n            });\n        }\n        if (this.code_mirror) {\n            this.code_mirror.on('focus', function(cm, change) {\n                if (!that.selected) {\n                    that.events.trigger('select.Cell', {'cell':that});\n                }\n                that.events.trigger('edit_mode.Cell', {cell: that});\n            });\n        }\n        if (this.code_mirror) {\n            this.code_mirror.on('blur', function(cm, change) {\n                that.events.trigger('command_mode.Cell', {cell: that});\n            });\n        }\n\n        this.element.dblclick(function () {\n            if (that.selected === false) {\n                this.events.trigger('select.Cell', {'cell':that});\n            }\n        });\n    };\n    \n    /**\n     * This method gets called in CodeMirror's onKeyDown/onKeyPress\n     * handlers and is used to provide custom key handling.\n     *\n     * To have custom handling, subclasses should override this method, but still call it\n     * in order to process the Edit mode keyboard shortcuts.\n     *\n     * @method handle_codemirror_keyevent\n     * @param {CodeMirror} editor - The codemirror instance bound to the cell\n     * @param {event} event - key press event which either should or should not be handled by CodeMirror\n     * @return {Boolean} `true` if CodeMirror should ignore the event, `false` Otherwise\n     */\n    Cell.prototype.handle_codemirror_keyevent = function (editor, event) {\n        var shortcuts = this.keyboard_manager.edit_shortcuts;\n\n        var cur = editor.getCursor();\n        if((cur.line !== 0 || cur.ch !==0) && event.keyCode === 38){\n            event._ipkmIgnore = true;\n        }\n        var nLastLine = editor.lastLine();\n        if ((event.keyCode === 40) &&\n             ((cur.line !== nLastLine) ||\n               (cur.ch !== editor.getLineHandle(nLastLine).text.length))\n           ) {\n            event._ipkmIgnore = true;\n        }\n        // if this is an edit_shortcuts shortcut, the global keyboard/shortcut\n        // manager will handle it\n        if (shortcuts.handles(event)) {\n            return true;\n        }\n        \n        return false;\n    };\n\n\n    /**\n     * Triger typesetting of math by mathjax on current cell element\n     * @method typeset\n     */\n    Cell.prototype.typeset = function () {\n        utils.typeset(this.element);\n    };\n\n    /**\n     * handle cell level logic when a cell is selected\n     * @method select\n     * @return is the action being taken\n     */\n    Cell.prototype.select = function (moveanchor) {\n        // if anchor is true, set the move the anchor\n        moveanchor = (moveanchor === undefined)? true:moveanchor;\n        if(moveanchor){\n            this.anchor=true;\n        }\n\n        if (!this.selected) {\n            this.element.addClass('selected');\n            this.element.removeClass('unselected');\n            this.selected = true;\n            // disable 'insert image' menu item (specific cell types will enable\n            // it in their override select())\n            this.notebook.set_insert_image_enabled(false);\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     * handle cell level logic when the cell is unselected\n     * @method unselect\n     * @return is the action being taken\n     */\n    Cell.prototype.unselect = function (moveanchor) {\n        // if anchor is true, remove also the anchor\n        moveanchor = (moveanchor === undefined)? true:moveanchor;\n        if (moveanchor){\n            this.anchor = false;\n        }\n        if (this.selected) {\n            this.element.addClass('unselected');\n            this.element.removeClass('selected');\n            this.selected = false;\n            return true;\n        } else {\n            return false;\n        }\n    };\n    \n\n    /**\n     * should be overwritten by subclass\n     * @method execute\n     */\n    Cell.prototype.execute = function () {\n        return;\n    };\n\n    /**\n     * handle cell level logic when a cell is rendered\n     * @method render\n     * @return is the action being taken\n     */\n    Cell.prototype.render = function () {\n        if (!this.rendered) {\n            this.element.addClass('rendered');\n            this.element.removeClass('unrendered');\n            this.rendered = true;\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     * handle cell level logic when a cell is unrendered\n     * @method unrender\n     * @return is the action being taken\n     */\n    Cell.prototype.unrender = function () {\n        if (this.rendered) {\n            this.element.addClass('unrendered');\n            this.element.removeClass('rendered');\n            this.rendered = false;\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     * Delegates keyboard shortcut handling to either Jupyter keyboard\n     * manager when in command mode, or CodeMirror when in edit mode\n     *\n     * @method handle_keyevent\n     * @param {CodeMirror} editor - The codemirror instance bound to the cell\n     * @param {event} - key event to be handled\n     * @return {Boolean} `true` if CodeMirror should ignore the event, `false` Otherwise\n     */\n    Cell.prototype.handle_keyevent = function (editor, event) {\n        if (this.mode === 'command') {\n            return true;\n        } else if (this.mode === 'edit') {\n            return this.handle_codemirror_keyevent(editor, event);\n        }\n    };\n\n    /**\n     * @method at_top\n     * @return {Boolean}\n     */\n    Cell.prototype.at_top = function () {\n        var cm = this.code_mirror;\n        var cursor = cm.getCursor();\n        if (cursor.line === 0 && cursor.ch === 0) {\n            return true;\n        }\n        return false;\n    };\n\n    /**\n     * @method at_bottom\n     * @return {Boolean}\n     * */\n    Cell.prototype.at_bottom = function () {\n        var cm = this.code_mirror;\n        var cursor = cm.getCursor();\n        if (cursor.line === (cm.lineCount()-1) && cursor.ch === cm.getLine(cursor.line).length) {\n            return true;\n        }\n        return false;\n    };\n\n    /**\n     * enter the command mode for the cell\n     * @method command_mode\n     * @return is the action being taken\n     */\n    Cell.prototype.command_mode = function () {\n        if (this.mode !== 'command') {\n            this.mode = 'command';\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     * enter the edit mode for the cell\n     * @method command_mode\n     * @return is the action being taken\n     */\n    Cell.prototype.edit_mode = function () {\n        if (this.mode !== 'edit') {\n            this.mode = 'edit';\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    Cell.prototype.ensure_focused = function() {\n        if(this.element !== document.activeElement && !this.code_mirror.hasFocus()){\n            this.focus_cell();\n        }\n    };\n    \n    /**\n     * Focus the cell in the DOM sense\n     * @method focus_cell\n     */\n    Cell.prototype.focus_cell = function () {\n        this.element.focus();\n        this._on_click({});\n    };\n\n    /**\n     * Focus the editor area so a user can type\n     *\n     * NOTE: If codemirror is focused via a mouse click event, you don't want to\n     * call this because it will cause a page jump.\n     * @method focus_editor\n     */\n    Cell.prototype.focus_editor = function () {\n        this.refresh();\n        this.code_mirror.focus();\n    };\n\n    /**\n     * Refresh codemirror instance\n     * @method refresh\n     */\n    Cell.prototype.refresh = function () {\n        if (this.code_mirror) {\n            this.code_mirror.refresh();\n        }\n    };\n\n    /**\n     * should be overritten by subclass\n     * @method get_text\n     */\n    Cell.prototype.get_text = function () {\n    };\n\n    /**\n     * should be overritten by subclass\n     * @method set_text\n     * @param {string} text\n     */\n    Cell.prototype.set_text = function (text) {\n    };\n\n    /**\n     * should be overritten by subclass\n     * serialise cell to json.\n     * @method toJSON\n     **/\n    Cell.prototype.toJSON = function () {\n        var data = {};\n        // deepcopy the metadata so copied cells don't share the same object\n        data.metadata = JSON.parse(JSON.stringify(this.metadata));\n        if (data.metadata.deletable) {\n            delete data.metadata.deletable;\n        }\n        if (data.metadata.editable) {\n            delete data.metadata.editable;\n        }\n        if (data.metadata.collapsed === false) {\n            delete data.metadata.collapsed;\n        }\n        data.cell_type = this.cell_type;\n        return data;\n    };\n\n    /**\n     * should be overritten by subclass\n     * @method fromJSON\n     **/\n    Cell.prototype.fromJSON = function (data) {\n        if (data.metadata !== undefined) {\n            this.metadata = data.metadata;\n        }\n    };\n\n\n    /**\n     * can the cell be split into two cells (false if not deletable)\n     *\n     * @method is_splittable\n     **/\n    Cell.prototype.is_splittable = function () {\n        return this.is_deletable();\n    };\n\n\n    /**\n     * can the cell be merged with other cells (false if not deletable)\n     * @method is_mergeable\n     **/\n    Cell.prototype.is_mergeable = function () {\n        return this.is_deletable();\n    };\n\n    /**\n     * is the cell edtitable? only false (readonly) if\n     * metadata.editable is explicitly false -- everything else\n     * counts as true\n     *\n     * @method is_editable\n     **/\n    Cell.prototype.is_editable = function () {\n        if (this.metadata.editable === false) {\n            return false;\n        }\n        return true;\n    };\n\n    /**\n     * is the cell deletable? only false (undeletable) if\n     * metadata.deletable is explicitly false or if the cell is not\n     * editable -- everything else counts as true\n     *\n     * @method is_deletable\n     **/\n    Cell.prototype.is_deletable = function () {\n        if (this.metadata.deletable === false || !this.is_editable()) {\n            return false;\n        }\n        return true;\n    };\n\n    /**\n     * @return {String} - the text before the cursor\n     * @method get_pre_cursor\n     **/\n    Cell.prototype.get_pre_cursor = function () {\n        var cursor = this.code_mirror.getCursor();\n        var text = this.code_mirror.getRange({line:0, ch:0}, cursor);\n        text = text.replace(/^\\n+/, '').replace(/\\n+$/, '');\n        return text;\n    };\n\n\n    /**\n     * @return {String} - the text after the cursor\n     * @method get_post_cursor\n     **/\n    Cell.prototype.get_post_cursor = function () {\n        var cursor = this.code_mirror.getCursor();\n        var last_line_num = this.code_mirror.lineCount()-1;\n        var last_line_len = this.code_mirror.getLine(last_line_num).length;\n        var end = {line:last_line_num, ch:last_line_len};\n        var text = this.code_mirror.getRange(cursor, end);\n        text = text.replace(/^\\n+/, '').replace(/\\n+$/, '');\n        return text;\n    };\n\n    /**\n     * Show/Hide CodeMirror LineNumber\n     * @method show_line_numbers\n     *\n     * @param value {Bool}  show (true), or hide (false) the line number in CodeMirror\n     **/\n    Cell.prototype.show_line_numbers = function (value) {\n        this.code_mirror.setOption('lineNumbers', value);\n        this.code_mirror.refresh();\n    };\n\n    /**\n     * Toggle  CodeMirror LineNumber\n     * @method toggle_line_numbers\n     **/\n    Cell.prototype.toggle_line_numbers = function () {\n        var val = this.code_mirror.getOption('lineNumbers');\n        this.show_line_numbers(!val);\n    };\n\n    /**\n     * Force codemirror highlight mode\n     * @method force_highlight\n     * @param {object} - CodeMirror mode\n     **/\n    Cell.prototype.force_highlight = function(mode) {\n        this.user_highlight = mode;\n        this.auto_highlight();\n    };\n    \n    /**\n     * Trigger autodetection of highlight scheme for current cell\n     * @method auto_highlight\n     */\n    Cell.prototype.auto_highlight = function () {\n        this._auto_highlight(this.class_config.get_sync('highlight_modes'));\n    };\n    \n    /**\n     * Try to autodetect cell highlight mode, or use selected mode\n     * @methods _auto_highlight\n     * @private\n     * @param {String|object|undefined} - CodeMirror mode | 'auto'\n     **/\n    Cell.prototype._auto_highlight = function (modes) {\n        /**\n         *Here we handle manually selected modes\n         */\n        var that = this;\n        var mode;\n        if( this.user_highlight !== undefined &&  this.user_highlight != 'auto' )\n        {\n            mode = this.user_highlight;\n            CodeMirror.autoLoadMode(this.code_mirror, mode);\n            this.code_mirror.setOption('mode', mode);\n            return;\n        }\n        var current_mode = this.code_mirror.getOption('mode', mode);\n        var first_line = this.code_mirror.getLine(0);\n        // loop on every pairs\n        for(mode in modes) {\n            var regs = modes[mode].reg;\n            // only one key every time but regexp can't be keys...\n            for(var i=0; i<regs.length; i++) {\n                // here we handle non magic_modes.\n                // TODO :\n                // On 3.0 and below, these things were regex.\n                // But now should be string for json-able config. \n                // We should get rid of assuming they might be already \n                // in a later version of Jupyter.\n                var re = regs[i];\n                if(typeof(re) === 'string'){\n                    re = new RegExp(re);\n                }\n                if(first_line.match(re) !== null) {\n                    if(current_mode == mode){\n                        return;\n                    }\n                    if (mode.search('magic_') !== 0) {\n                        utils.requireCodeMirrorMode(mode, function (spec) {\n                            that.code_mirror.setOption('mode', spec);\n                        });\n                        return;\n                    }\n                    var magic_mode = mode;\n                    mode = magic_mode.substr(6);\n                    if(current_mode == magic_mode){\n                        return;\n                    }\n                    utils.requireCodeMirrorMode(mode, function (spec) {\n                        // Add an overlay mode to recognize the first line as \"magic\" instead\n                        // of the mode used for the rest of the cell.\n                        CodeMirror.defineMode(magic_mode, function(config) {\n                            var magicOverlay = {\n                                startState: function() {\n                                    return {firstMatched : false, inMagicLine: false};\n                                },\n                                token: function(stream, state) {\n                                    if(!state.firstMatched) {\n                                        state.firstMatched = true;\n                                        if (stream.match(\"%%\", false)) {\n                                            state.inMagicLine = true;\n                                        }\n                                    }\n                                    if (state.inMagicLine) {\n                                        stream.eat(function any(ch) { return true; });\n                                        if (stream.eol()) {\n                                            state.inMagicLine = false;\n                                        }\n                                        return \"magic\";\n                                    }\n                                    stream.skipToEnd();\n                                    return null;\n                                }\n                            };\n                            return CodeMirror.overlayMode(CodeMirror.getMode(config, spec), magicOverlay);\n                        });\n                        that.code_mirror.setOption('mode', magic_mode);\n                    });\n                    return;\n                }\n            }\n        }\n        // fallback on default\n        var default_mode;\n        try {\n            default_mode = this._options.cm_config.mode;\n        } catch(e) {\n            default_mode = 'text/plain';\n        }\n        if( current_mode === default_mode){\n            return;\n        }\n        this.code_mirror.setOption('mode', default_mode);\n    };\n\n    var UnrecognizedCell = function (options) {\n        /** Constructor for unrecognized cells */\n        Cell.apply(this, arguments);\n        this.cell_type = 'unrecognized';\n        this.celltoolbar = null;\n        this.data = {};\n        \n        Object.seal(this);\n    };\n\n    UnrecognizedCell.prototype = Object.create(Cell.prototype);\n    \n    \n    // cannot merge or split unrecognized cells\n    UnrecognizedCell.prototype.is_mergeable = function () {\n        return false;\n    };\n    \n    UnrecognizedCell.prototype.is_splittable = function () {\n        return false;\n    };\n    \n    UnrecognizedCell.prototype.toJSON = function () {\n        /**\n         * deepcopy the metadata so copied cells don't share the same object\n         */\n        return JSON.parse(JSON.stringify(this.data));\n    };\n\n    UnrecognizedCell.prototype.fromJSON = function (data) {\n        this.data = data;\n        if (data.metadata !== undefined) {\n            this.metadata = data.metadata;\n        } else {\n            data.metadata = this.metadata;\n        }\n        this.element.find('.inner_cell').find(\"a\").text(i18n.msg.sprintf(i18n.msg._(\"Unrecognized cell type: %s\"), data.cell_type));\n    };\n    \n    UnrecognizedCell.prototype.create_element = function () {\n        Cell.prototype.create_element.apply(this, arguments);\n        var cell = this.element = $(\"<div>\").addClass('cell unrecognized_cell');\n        cell.attr('tabindex','2');\n\n        var prompt = $('<div/>').addClass('prompt input_prompt');\n        cell.append(prompt);\n        var inner_cell = $('<div/>').addClass('inner_cell');\n        inner_cell.append(\n            $(\"<a>\")\n                .attr(\"href\", \"#\")\n                .text(i18n.msg._(\"Unrecognized cell type\"))\n        );\n        cell.append(inner_cell);\n        this.element = cell;\n    };\n\n    UnrecognizedCell.prototype.bind_events = function () {\n        Cell.prototype.bind_events.apply(this, arguments);\n        var cell = this;\n        \n        this.element.find('.inner_cell').find(\"a\").click(function () {\n            cell.events.trigger('unrecognized_cell.Cell', {cell: cell});\n        });\n    };\n\n    return {\n        Cell: Cell,\n        UnrecognizedCell: UnrecognizedCell\n    };\n});\n\n",
    "var CSS_PROP_BIT_QUANTITY=1;var CSS_PROP_BIT_HASH_VALUE=2;var CSS_PROP_BIT_NEGATIVE_QUANTITY=4;var CSS_PROP_BIT_QSTRING=8;var CSS_PROP_BIT_URL=16;var CSS_PROP_BIT_UNRESERVED_WORD=64;var CSS_PROP_BIT_UNICODE_RANGE=128;var CSS_PROP_BIT_GLOBAL_NAME=512;var CSS_PROP_BIT_PROPERTY_NAME=1024;var cssSchema=function(){var L=[[\"aliceblue\",\"antiquewhite\",\"aqua\",\"aquamarine\",\"azure\",\"beige\",\"bisque\",\"black\",\"blanchedalmond\",\"blue\",\"blueviolet\",\"brown\",\"burlywood\",\"cadetblue\",\"chartreuse\",\"chocolate\",\"coral\",\"cornflowerblue\",\"cornsilk\",\"crimson\",\"cyan\",\"darkblue\",\"darkcyan\",\"darkgoldenrod\",\"darkgray\",\"darkgreen\",\"darkkhaki\",\"darkmagenta\",\"darkolivegreen\",\"darkorange\",\"darkorchid\",\"darkred\",\"darksalmon\",\"darkseagreen\",\"darkslateblue\",\"darkslategray\",\"darkturquoise\",\"darkviolet\",\"deeppink\",\"deepskyblue\",\"dimgray\",\"dodgerblue\",\"firebrick\",\"floralwhite\",\"forestgreen\",\"fuchsia\",\"gainsboro\",\"ghostwhite\",\"gold\",\"goldenrod\",\"gray\",\"green\",\"greenyellow\",\"honeydew\",\"hotpink\",\"indianred\",\"indigo\",\"ivory\",\"khaki\",\"lavender\",\"lavenderblush\",\"lawngreen\",\"lemonchiffon\",\"lightblue\",\"lightcoral\",\"lightcyan\",\"lightgoldenrodyellow\",\"lightgreen\",\"lightgrey\",\"lightpink\",\"lightsalmon\",\"lightseagreen\",\"lightskyblue\",\"lightslategray\",\"lightsteelblue\",\"lightyellow\",\"lime\",\"limegreen\",\"linen\",\"magenta\",\"maroon\",\"mediumaquamarine\",\"mediumblue\",\"mediumorchid\",\"mediumpurple\",\"mediumseagreen\",\"mediumslateblue\",\"mediumspringgreen\",\"mediumturquoise\",\"mediumvioletred\",\"midnightblue\",\"mintcream\",\"mistyrose\",\"moccasin\",\"navajowhite\",\"navy\",\"oldlace\",\"olive\",\"olivedrab\",\"orange\",\"orangered\",\"orchid\",\"palegoldenrod\",\"palegreen\",\"paleturquoise\",\"palevioletred\",\"papayawhip\",\"peachpuff\",\"peru\",\"pink\",\"plum\",\"powderblue\",\"purple\",\"red\",\"rosybrown\",\"royalblue\",\"saddlebrown\",\"salmon\",\"sandybrown\",\"seagreen\",\"seashell\",\"sienna\",\"silver\",\"skyblue\",\"slateblue\",\"slategray\",\"snow\",\"springgreen\",\"steelblue\",\"tan\",\"teal\",\"thistle\",\"tomato\",\"transparent\",\"turquoise\",\"violet\",\"wheat\",\"white\",\"whitesmoke\",\"yellow\",\"yellowgreen\"],[\"all-scroll\",\"col-resize\",\"crosshair\",\"default\",\"e-resize\",\"hand\",\"help\",\"move\",\"n-resize\",\"ne-resize\",\"no-drop\",\"not-allowed\",\"nw-resize\",\"pointer\",\"progress\",\"row-resize\",\"s-resize\",\"se-resize\",\"sw-resize\",\"text\",\"vertical-text\",\"w-resize\",\"wait\"],[\"armenian\",\"decimal\",\"decimal-leading-zero\",\"disc\",\"georgian\",\"lower-alpha\",\"lower-greek\",\"lower-latin\",\"lower-roman\",\"square\",\"upper-alpha\",\"upper-latin\",\"upper-roman\"],[\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\",\"bold\",\"bolder\",\"lighter\"],[\"block-level\",\"inline-level\",\"table-caption\",\"table-cell\",\"table-column\",\"table-column-group\",\"table-footer-group\",\"table-header-group\",\"table-row\",\"table-row-group\"],[\"condensed\",\"expanded\",\"extra-condensed\",\"extra-expanded\",\"narrower\",\"semi-condensed\",\"semi-expanded\",\"ultra-condensed\",\"ultra-expanded\",\"wider\"],[\"inherit\",\"inline\",\"inline-block\",\"inline-box\",\"inline-flex\",\"inline-grid\",\"inline-list-item\",\"inline-stack\",\"inline-table\",\"run-in\"],[\"behind\",\"center-left\",\"center-right\",\"far-left\",\"far-right\",\"left-side\",\"leftwards\",\"right-side\",\"rightwards\"],[\"large\",\"larger\",\"small\",\"smaller\",\"x-large\",\"x-small\",\"xx-large\",\"xx-small\"],[\"dashed\",\"dotted\",\"double\",\"groove\",\"outset\",\"ridge\",\"solid\"],[\"ease\",\"ease-in\",\"ease-in-out\",\"ease-out\",\"linear\",\"step-end\",\"step-start\"],[\"at\",\"closest-corner\",\"closest-side\",\"ellipse\",\"farthest-corner\",\"farthest-side\"],[\"baseline\",\"middle\",\"sub\",\"super\",\"text-bottom\",\"text-top\"],[\"caption\",\"icon\",\"menu\",\"message-box\",\"small-caption\",\"status-bar\"],[\"fast\",\"faster\",\"slow\",\"slower\",\"x-fast\",\"x-slow\"],[\"above\",\"below\",\"higher\",\"level\",\"lower\"],[\"cursive\",\"fantasy\",\"monospace\",\"sans-serif\",\"serif\"],[\"loud\",\"silent\",\"soft\",\"x-loud\",\"x-soft\"],[\"no-repeat\",\"repeat-x\",\"repeat-y\",\"round\",\"space\"],[\"blink\",\"line-through\",\"overline\",\"underline\"],[\"block\",\"flex\",\"grid\",\"table\"],[\"high\",\"low\",\"x-high\",\"x-low\"],[\"nowrap\",\"pre\",\"pre-line\",\"pre-wrap\"],[\"absolute\",\"relative\",\"static\"],[\"alternate\",\"alternate-reverse\",\"reverse\"],[\"border-box\",\"content-box\",\"padding-box\"],[\"capitalize\",\"lowercase\",\"uppercase\"],[\"child\",\"female\",\"male\"],[\"=\",\"opacity\"],[\"backwards\",\"forwards\"],[\"bidi-override\",\"embed\"],[\"bottom\",\"top\"],[\"break-all\",\"keep-all\"],[\"clip\",\"ellipsis\"],[\"contain\",\"cover\"],[\"continuous\",\"digits\"],[\"end\",\"start\"],[\"flat\",\"preserve-3d\"],[\"hide\",\"show\"],[\"horizontal\",\"vertical\"],[\"inside\",\"outside\"],[\"italic\",\"oblique\"],[\"left\",\"right\"],[\"ltr\",\"rtl\"],[\"no-content\",\"no-display\"],[\"paused\",\"running\"],[\"suppress\",\"unrestricted\"],[\"thick\",\"thin\"],[\",\"],[\"/\"],[\"all\"],[\"always\"],[\"auto\"],[\"avoid\"],[\"both\"],[\"break-word\"],[\"center\"],[\"circle\"],[\"code\"],[\"collapse\"],[\"contents\"],[\"fixed\"],[\"hidden\"],[\"infinite\"],[\"inset\"],[\"invert\"],[\"justify\"],[\"list-item\"],[\"local\"],[\"medium\"],[\"mix\"],[\"none\"],[\"normal\"],[\"once\"],[\"repeat\"],[\"scroll\"],[\"separate\"],[\"small-caps\"],[\"spell-out\"],[\"to\"],[\"visible\"]];var schema={animation:{cssPropBits:517,cssLitGroup:[L[10],L[24],L[29],L[45],L[48],L[54],L[63],L[71],L[72]],cssFns:[\"cubic-bezier()\",\"steps()\"]},\"animation-delay\":{cssPropBits:5,cssLitGroup:[L[48]],cssFns:[]},\"animation-direction\":{cssPropBits:0,cssLitGroup:[L[24],L[48],L[72]],cssFns:[]},\"animation-duration\":\"animation-delay\",\"animation-fill-mode\":{cssPropBits:0,cssLitGroup:[L[29],L[48],L[54],L[71]],cssFns:[]},\"animation-iteration-count\":{cssPropBits:5,cssLitGroup:[L[48],L[63]],cssFns:[]},\"animation-name\":{cssPropBits:512,cssLitGroup:[L[48],L[71]],cssFns:[]},\"animation-play-state\":{cssPropBits:0,cssLitGroup:[L[45],L[48]],cssFns:[]},\"animation-timing-function\":{cssPropBits:0,cssLitGroup:[L[10],L[48]],cssFns:[\"cubic-bezier()\",\"steps()\"]},appearance:{cssPropBits:0,cssLitGroup:[L[71]],cssFns:[]},azimuth:{cssPropBits:5,cssLitGroup:[L[7],L[42],L[56]],cssFns:[]},\"backface-visibility\":{cssPropBits:0,cssLitGroup:[L[59],L[62],L[80]],cssFns:[]},background:{cssPropBits:23,cssLitGroup:[L[0],L[18],L[25],L[31],L[34],L[42],L[48],L[49],L[52],L[56],L[61],L[68],L[71],L[74],L[75]],cssFns:[\"image()\",\"linear-gradient()\",\"radial-gradient()\",\"repeating-linear-gradient()\",\"repeating-radial-gradient()\",\"rgb()\",\"rgba()\"]},\"background-attachment\":{cssPropBits:0,cssLitGroup:[L[48],L[61],L[68],L[75]],cssFns:[]},\"background-color\":{cssPropBits:2,cssLitGroup:[L[0]],cssFns:[\"rgb()\",\"rgba()\"]},\"background-image\":{cssPropBits:16,cssLitGroup:[L[48],L[71]],cssFns:[\"image()\",\"linear-gradient()\",\"radial-gradient()\",\"repeating-linear-gradient()\",\"repeating-radial-gradient()\"]},\"background-position\":{cssPropBits:5,cssLitGroup:[L[31],L[42],L[48],L[56]],cssFns:[]},\"background-repeat\":{cssPropBits:0,cssLitGroup:[L[18],L[48],L[74]],cssFns:[]},\"background-size\":{cssPropBits:5,cssLitGroup:[L[34],L[48],L[52]],cssFns:[]},border:{cssPropBits:7,cssLitGroup:[L[0],L[9],L[47],L[62],L[64],L[69],L[71]],cssFns:[\"rgb()\",\"rgba()\"]},\"border-bottom\":\"border\",\"border-bottom-color\":\"background-color\",\"border-bottom-left-radius\":{cssPropBits:5,cssFns:[]},\"border-bottom-right-radius\":\"border-bottom-left-radius\",\"border-bottom-style\":{cssPropBits:0,cssLitGroup:[L[9],L[62],L[64],L[71]],cssFns:[]},\"border-bottom-width\":{cssPropBits:5,cssLitGroup:[L[47],L[69]],cssFns:[]},\"border-collapse\":{cssPropBits:0,cssLitGroup:[L[59],L[76]],cssFns:[]},\"border-color\":\"background-color\",\"border-left\":\"border\",\"border-left-color\":\"background-color\",\"border-left-style\":\"border-bottom-style\",\"border-left-width\":\"border-bottom-width\",\"border-radius\":{cssPropBits:5,cssLitGroup:[L[49]],cssFns:[]},\"border-right\":\"border\",\"border-right-color\":\"background-color\",\"border-right-style\":\"border-bottom-style\",\"border-right-width\":\"border-bottom-width\",\"border-spacing\":\"border-bottom-left-radius\",\"border-style\":\"border-bottom-style\",\"border-top\":\"border\",\"border-top-color\":\"background-color\",\"border-top-left-radius\":\"border-bottom-left-radius\",\"border-top-right-radius\":\"border-bottom-left-radius\",\"border-top-style\":\"border-bottom-style\",\"border-top-width\":\"border-bottom-width\",\"border-width\":\"border-bottom-width\",bottom:{cssPropBits:5,cssLitGroup:[L[52]],cssFns:[]},box:{cssPropBits:0,cssLitGroup:[L[60],L[71],L[72]],cssFns:[]},\"box-shadow\":{cssPropBits:7,cssLitGroup:[L[0],L[48],L[64],L[71]],cssFns:[\"rgb()\",\"rgba()\"]},\"box-sizing\":{cssPropBits:0,cssLitGroup:[L[25]],cssFns:[]},\"caption-side\":{cssPropBits:0,cssLitGroup:[L[31]],cssFns:[]},clear:{cssPropBits:0,cssLitGroup:[L[42],L[54],L[71]],cssFns:[]},clip:{cssPropBits:0,cssLitGroup:[L[52]],cssFns:[\"rect()\"]},color:\"background-color\",content:{cssPropBits:8,cssLitGroup:[L[71],L[72]],cssFns:[]},cue:{cssPropBits:16,cssLitGroup:[L[71]],cssFns:[]},\"cue-after\":\"cue\",\"cue-before\":\"cue\",cursor:{cssPropBits:16,cssLitGroup:[L[1],L[48],L[52]],cssFns:[]},direction:{cssPropBits:0,cssLitGroup:[L[43]],cssFns:[]},display:{cssPropBits:0,cssLitGroup:[L[4],L[6],L[20],L[52],L[67],L[71]],cssFns:[]},\"display-extras\":{cssPropBits:0,cssLitGroup:[L[67],L[71]],cssFns:[]},\"display-inside\":{cssPropBits:0,cssLitGroup:[L[20],L[52]],cssFns:[]},\"display-outside\":{cssPropBits:0,cssLitGroup:[L[4],L[71]],cssFns:[]},elevation:{cssPropBits:5,cssLitGroup:[L[15]],cssFns:[]},\"empty-cells\":{cssPropBits:0,cssLitGroup:[L[38]],cssFns:[]},filter:{cssPropBits:0,cssFns:[\"alpha()\"]},float:{cssPropBits:0,cssLitGroup:[L[42],L[71]],cssFns:[]},font:{cssPropBits:73,cssLitGroup:[L[3],L[8],L[13],L[16],L[41],L[48],L[49],L[69],L[72],L[77]],cssFns:[]},\"font-family\":{cssPropBits:72,cssLitGroup:[L[16],L[48]],cssFns:[]},\"font-size\":{cssPropBits:1,cssLitGroup:[L[8],L[69]],cssFns:[]},\"font-stretch\":{cssPropBits:0,cssLitGroup:[L[5],L[72]],cssFns:[]},\"font-style\":{cssPropBits:0,cssLitGroup:[L[41],L[72]],cssFns:[]},\"font-variant\":{cssPropBits:0,cssLitGroup:[L[72],L[77]],cssFns:[]},\"font-weight\":{cssPropBits:0,cssLitGroup:[L[3],L[72]],cssFns:[]},height:\"bottom\",left:\"bottom\",\"letter-spacing\":{cssPropBits:5,cssLitGroup:[L[72]],cssFns:[]},\"line-height\":{cssPropBits:1,cssLitGroup:[L[72]],cssFns:[]},\"list-style\":{cssPropBits:16,cssLitGroup:[L[2],L[40],L[57],L[71]],cssFns:[\"image()\",\"linear-gradient()\",\"radial-gradient()\",\"repeating-linear-gradient()\",\"repeating-radial-gradient()\"]},\"list-style-image\":{cssPropBits:16,cssLitGroup:[L[71]],cssFns:[\"image()\",\"linear-gradient()\",\"radial-gradient()\",\"repeating-linear-gradient()\",\"repeating-radial-gradient()\"]},\"list-style-position\":{cssPropBits:0,cssLitGroup:[L[40]],cssFns:[]},\"list-style-type\":{cssPropBits:0,cssLitGroup:[L[2],L[57],L[71]],cssFns:[]},margin:\"bottom\",\"margin-bottom\":\"bottom\",\"margin-left\":\"bottom\",\"margin-right\":\"bottom\",\"margin-top\":\"bottom\",\"max-height\":{cssPropBits:1,cssLitGroup:[L[52],L[71]],cssFns:[]},\"max-width\":\"max-height\",\"min-height\":{cssPropBits:1,cssLitGroup:[L[52]],cssFns:[]},\"min-width\":\"min-height\",opacity:{cssPropBits:1,cssFns:[]},outline:{cssPropBits:7,cssLitGroup:[L[0],L[9],L[47],L[62],L[64],L[65],L[69],L[71]],cssFns:[\"rgb()\",\"rgba()\"]},\"outline-color\":{cssPropBits:2,cssLitGroup:[L[0],L[65]],cssFns:[\"rgb()\",\"rgba()\"]},\"outline-style\":\"border-bottom-style\",\"outline-width\":\"border-bottom-width\",overflow:{cssPropBits:0,cssLitGroup:[L[52],L[62],L[75],L[80]],cssFns:[]},\"overflow-wrap\":{cssPropBits:0,cssLitGroup:[L[55],L[72]],cssFns:[]},\"overflow-x\":{cssPropBits:0,cssLitGroup:[L[44],L[52],L[62],L[75],L[80]],cssFns:[]},\"overflow-y\":\"overflow-x\",padding:\"opacity\",\"padding-bottom\":\"opacity\",\"padding-left\":\"opacity\",\"padding-right\":\"opacity\",\"padding-top\":\"opacity\",\"page-break-after\":{cssPropBits:0,cssLitGroup:[L[42],L[51],L[52],L[53]],cssFns:[]},\"page-break-before\":\"page-break-after\",\"page-break-inside\":{cssPropBits:0,cssLitGroup:[L[52],L[53]],cssFns:[]},pause:\"border-bottom-left-radius\",\"pause-after\":\"border-bottom-left-radius\",\"pause-before\":\"border-bottom-left-radius\",perspective:{cssPropBits:5,cssLitGroup:[L[71]],cssFns:[]},\"perspective-origin\":{cssPropBits:5,cssLitGroup:[L[31],L[42],L[56]],cssFns:[]},pitch:{cssPropBits:5,cssLitGroup:[L[21],L[69]],cssFns:[]},\"pitch-range\":\"border-bottom-left-radius\",\"play-during\":{cssPropBits:16,cssLitGroup:[L[52],L[70],L[71],L[74]],cssFns:[]},position:{cssPropBits:0,cssLitGroup:[L[23]],cssFns:[]},quotes:{cssPropBits:8,cssLitGroup:[L[71]],cssFns:[]},resize:{cssPropBits:0,cssLitGroup:[L[39],L[54],L[71]],cssFns:[]},richness:\"border-bottom-left-radius\",right:\"bottom\",speak:{cssPropBits:0,cssLitGroup:[L[71],L[72],L[78]],cssFns:[]},\"speak-header\":{cssPropBits:0,cssLitGroup:[L[51],L[73]],cssFns:[]},\"speak-numeral\":{cssPropBits:0,cssLitGroup:[L[35]],cssFns:[]},\"speak-punctuation\":{cssPropBits:0,cssLitGroup:[L[58],L[71]],cssFns:[]},\"speech-rate\":{cssPropBits:5,cssLitGroup:[L[14],L[69]],cssFns:[]},stress:\"border-bottom-left-radius\",\"table-layout\":{cssPropBits:0,cssLitGroup:[L[52],L[61]],cssFns:[]},\"text-align\":{cssPropBits:0,cssLitGroup:[L[42],L[56],L[66]],cssFns:[]},\"text-decoration\":{cssPropBits:0,cssLitGroup:[L[19],L[71]],cssFns:[]},\"text-indent\":\"border-bottom-left-radius\",\"text-overflow\":{cssPropBits:8,cssLitGroup:[L[33]],cssFns:[]},\"text-shadow\":\"box-shadow\",\"text-transform\":{cssPropBits:0,cssLitGroup:[L[26],L[71]],cssFns:[]},\"text-wrap\":{cssPropBits:0,cssLitGroup:[L[46],L[71],L[72]],cssFns:[]},top:\"bottom\",transform:{cssPropBits:0,cssLitGroup:[L[71]],cssFns:[\"matrix()\",\"perspective()\",\"rotate()\",\"rotate3d()\",\"rotatex()\",\"rotatey()\",\"rotatez()\",\"scale()\",\"scale3d()\",\"scalex()\",\"scaley()\",\"scalez()\",\"skew()\",\"skewx()\",\"skewy()\",\"translate()\",\"translate3d()\",\"translatex()\",\"translatey()\",\"translatez()\"]},\"transform-origin\":\"perspective-origin\",\"transform-style\":{cssPropBits:0,cssLitGroup:[L[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[L[10],L[48],L[50],L[71]],cssFns:[\"cubic-bezier()\",\"steps()\"]},\"transition-delay\":\"animation-delay\",\"transition-duration\":\"animation-delay\",\"transition-property\":{cssPropBits:1024,cssLitGroup:[L[48],L[50]],cssFns:[]},\"transition-timing-function\":\"animation-timing-function\",\"unicode-bidi\":{cssPropBits:0,cssLitGroup:[L[30],L[72]],cssFns:[]},\"vertical-align\":{cssPropBits:5,cssLitGroup:[L[12],L[31]],cssFns:[]},visibility:\"backface-visibility\",\"voice-family\":{cssPropBits:8,cssLitGroup:[L[27],L[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[L[17],L[69]],cssFns:[]},\"white-space\":{cssPropBits:0,cssLitGroup:[L[22],L[72]],cssFns:[]},width:\"min-height\",\"word-break\":{cssPropBits:0,cssLitGroup:[L[32],L[72]],cssFns:[]},\"word-spacing\":\"letter-spacing\",\"word-wrap\":\"overflow-wrap\",\"z-index\":\"bottom\",zoom:\"line-height\",\"cubic-bezier()\":\"animation-delay\",\"steps()\":{cssPropBits:5,cssLitGroup:[L[36],L[48]],cssFns:[]},\"image()\":{cssPropBits:18,cssLitGroup:[L[0],L[48]],cssFns:[\"rgb()\",\"rgba()\"]},\"linear-gradient()\":{cssPropBits:7,cssLitGroup:[L[0],L[31],L[42],L[48],L[79]],cssFns:[\"rgb()\",\"rgba()\"]},\"radial-gradient()\":{cssPropBits:7,cssLitGroup:[L[0],L[11],L[31],L[42],L[48],L[56],L[57]],cssFns:[\"rgb()\",\"rgba()\"]},\"repeating-linear-gradient()\":\"linear-gradient()\",\"repeating-radial-gradient()\":\"radial-gradient()\",\"rgb()\":{cssPropBits:1,cssLitGroup:[L[48]],cssFns:[]},\"rgba()\":\"rgb()\",\"rect()\":{cssPropBits:5,cssLitGroup:[L[48],L[52]],cssFns:[]},\"alpha()\":{cssPropBits:1,cssLitGroup:[L[28]],cssFns:[]},\"matrix()\":\"animation-delay\",\"perspective()\":\"border-bottom-left-radius\",\"rotate()\":\"border-bottom-left-radius\",\"rotate3d()\":\"animation-delay\",\"rotatex()\":\"border-bottom-left-radius\",\"rotatey()\":\"border-bottom-left-radius\",\"rotatez()\":\"border-bottom-left-radius\",\"scale()\":\"animation-delay\",\"scale3d()\":\"animation-delay\",\"scalex()\":\"border-bottom-left-radius\",\"scaley()\":\"border-bottom-left-radius\",\"scalez()\":\"border-bottom-left-radius\",\"skew()\":\"animation-delay\",\"skewx()\":\"border-bottom-left-radius\",\"skewy()\":\"border-bottom-left-radius\",\"translate()\":\"animation-delay\",\"translate3d()\":\"animation-delay\",\"translatex()\":\"border-bottom-left-radius\",\"translatey()\":\"border-bottom-left-radius\",\"translatez()\":\"border-bottom-left-radius\"};if(true){for(var key in schema){if(\"string\"===typeof schema[key]&&Object.hasOwnProperty.call(schema,key)){schema[key]=schema[schema[key]]}}}return schema}();if(typeof window!==\"undefined\"){window[\"cssSchema\"]=cssSchema}var lexCss;var decodeCss;(function(){function decodeCssEscape(s){var i=parseInt(s.substring(1),16);if(i>65535){return i-=65536,String.fromCharCode(55296+(i>>10),56320+(i&1023))}else if(i==i){return String.fromCharCode(i)}else if(s[1]<\" \"){return\"\"}else{return s[1]}}function escapeCssString(s,replacer){return'\"'+s.replace(/[\\u0000-\\u001f\\\\\\\"<>]/g,replacer)+'\"'}function escapeCssStrChar(ch){return cssStrChars[ch]||(cssStrChars[ch]=\"\\\\\"+ch.charCodeAt(0).toString(16)+\" \")}function escapeCssUrlChar(ch){return cssUrlChars[ch]||(cssUrlChars[ch]=(ch<\"\u0010\"?\"%0\":\"%\")+ch.charCodeAt(0).toString(16))}var cssStrChars={\"\\\\\":\"\\\\\\\\\"};var cssUrlChars={\"\\\\\":\"%5c\"};var WC=\"[\\\\t\\\\n\\\\f ]\";var W=WC+\"*\";var NL=\"[\\\\n\\\\f]\";var SURROGATE_PAIR=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\";var NONASCII=\"[\\\\u0080-\\\\ud7ff\\\\ue000-\\\\ufffd]|\"+SURROGATE_PAIR;var UNICODE_TAIL=\"[0-9a-fA-F]{1,6}\"+WC+\"?\";var UNICODE=\"\\\\\\\\\"+UNICODE_TAIL;var ESCAPE_TAIL=\"(?:\"+UNICODE_TAIL+\"|[\\\\u0020-\\\\u007e\\\\u0080-\\\\ud7ff\\\\ue000\\\\ufffd]|\"+SURROGATE_PAIR+\")\";var ESCAPE=\"\\\\\\\\\"+ESCAPE_TAIL;var URLCHAR=\"(?:[\\\\t\\\\x21\\\\x23-\\\\x26\\\\x28-\\\\x5b\\\\x5d-\\\\x7e]|\"+NONASCII+\"|\"+ESCAPE+\")\";var STRINGCHAR=\"[^'\\\"\\\\n\\\\f\\\\\\\\]|\\\\\\\\[\\\\s\\\\S]\";var STRING=\"\\\"(?:'|\"+STRINGCHAR+')*\"'+\"|'(?:\\\"|\"+STRINGCHAR+\")*'\";var NUM=\"[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)\";var NMSTART=\"(?:[a-zA-Z_]|\"+NONASCII+\"|\"+ESCAPE+\")\";var NMCHAR=\"(?:[a-zA-Z0-9_-]|\"+NONASCII+\"|\"+ESCAPE+\")\";var NAME=NMCHAR+\"+\";var IDENT=\"-?\"+NMSTART+NMCHAR+\"*\";var ATKEYWORD=\"@\"+IDENT;var HASH=\"#\"+NAME;var NUMBER=NUM;var WORD_TERM=\"(?:@?-?\"+NMSTART+\"|#)\"+NMCHAR+\"*\";var PERCENTAGE=NUM+\"%\";var DIMENSION=NUM+IDENT;var NUMERIC_VALUE=NUM+\"(?:%|\"+IDENT+\")?\";var URI=\"url[(]\"+W+\"(?:\"+STRING+\"|\"+URLCHAR+\"*)\"+W+\"[)]\";var UNICODE_RANGE=\"U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?\";var CDO=\"\\x3c!--\";var CDC=\"--\\x3e\";var S=WC+\"+\";var COMMENT=\"/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\\\n\\\\f]*)\";var FUNCTION=\"(?!url[(])\"+IDENT+\"[(]\";var INCLUDES=\"~=\";var DASHMATCH=\"[|]=\";var PREFIXMATCH=\"[^]=\";var SUFFIXMATCH=\"[$]=\";var SUBSTRINGMATCH=\"[*]=\";var CMP_OPS=\"[~|^$*]=\";var CHAR=\"[^\\\"'\\\\\\\\/]|/(?![/*])\";var BOM=\"\\\\uFEFF\";var CSS_TOKEN=new RegExp([BOM,UNICODE_RANGE,URI,FUNCTION,WORD_TERM,STRING,NUMERIC_VALUE,CDO,CDC,S,COMMENT,CMP_OPS,CHAR].join(\"|\"),\"gi\");var CSS_DECODER=new RegExp(\"\\\\\\\\(?:\"+ESCAPE_TAIL+\"|\"+NL+\")\",\"g\");var URL_RE=new RegExp(\"^url\\\\(\"+W+\"[\\\"']?|[\\\"']?\"+W+\"\\\\)$\",\"gi\");decodeCss=function(css){return css.replace(CSS_DECODER,decodeCssEscape)};lexCss=function(cssText){cssText=(\"￿\"+cssText).replace(/^\\uffff/,\"\");cssText=cssText.replace(/\\r\\n?/g,\"\\n\");var tokens=cssText.match(CSS_TOKEN)||[];var j=0;var last=\" \";for(var i=0,n=tokens.length;i<n;++i){var tok=decodeCss(tokens[i]);var len=tok.length;var cc=tok.charCodeAt(0);tok=cc=='\"'.charCodeAt(0)||cc==\"'\".charCodeAt(0)?escapeCssString(tok.substring(1,len-1),escapeCssStrChar):cc==\"/\".charCodeAt(0)&&len>1||tok==\"\\\\\"||tok==CDC||tok==CDO||tok==\"\\ufeff\"||cc<=\" \".charCodeAt(0)?\" \":/url\\(/i.test(tok)?\"url(\"+escapeCssString(tok.replace(URL_RE,\"\"),escapeCssUrlChar)+\")\":tok;if(last!=tok||tok!=\" \"){tokens[j++]=last=tok}}tokens.length=j;return tokens}})();if(typeof window!==\"undefined\"){window[\"lexCss\"]=lexCss;window[\"decodeCss\"]=decodeCss}var URI=function(){function parse(uriStr){var m=(\"\"+uriStr).match(URI_RE_);if(!m){return null}return new URI(nullIfAbsent(m[1]),nullIfAbsent(m[2]),nullIfAbsent(m[3]),nullIfAbsent(m[4]),nullIfAbsent(m[5]),nullIfAbsent(m[6]),nullIfAbsent(m[7]))}function create(scheme,credentials,domain,port,path,query,fragment){var uri=new URI(encodeIfExists2(scheme,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_),encodeIfExists2(credentials,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_),encodeIfExists(domain),port>0?port.toString():null,encodeIfExists2(path,URI_DISALLOWED_IN_PATH_),null,encodeIfExists(fragment));if(query){if(\"string\"===typeof query){uri.setRawQuery(query.replace(/[^?&=0-9A-Za-z_\\-~.%]/g,encodeOne))}else{uri.setAllParameters(query)}}return uri}function encodeIfExists(unescapedPart){if(\"string\"==typeof unescapedPart){return encodeURIComponent(unescapedPart)}return null}function encodeIfExists2(unescapedPart,extra){if(\"string\"==typeof unescapedPart){return encodeURI(unescapedPart).replace(extra,encodeOne)}return null}function encodeOne(ch){var n=ch.charCodeAt(0);return\"%\"+\"0123456789ABCDEF\".charAt(n>>4&15)+\"0123456789ABCDEF\".charAt(n&15)}function normPath(path){return path.replace(/(^|\\/)\\.(?:\\/|$)/g,\"$1\").replace(/\\/{2,}/g,\"/\")}var PARENT_DIRECTORY_HANDLER=new RegExp(\"\"+\"(/|^)\"+\"(?:[^./][^/]*|\\\\.{2,}(?:[^./][^/]*)|\\\\.{3,}[^/]*)\"+\"/\\\\.\\\\.(?:/|$)\");var PARENT_DIRECTORY_HANDLER_RE=new RegExp(PARENT_DIRECTORY_HANDLER);var EXTRA_PARENT_PATHS_RE=/^(?:\\.\\.\\/)*(?:\\.\\.$)?/;function collapse_dots(path){if(path===null){return null}var p=normPath(path);var r=PARENT_DIRECTORY_HANDLER_RE;for(var q;(q=p.replace(r,\"$1\"))!=p;p=q){}return p}function resolve(baseUri,relativeUri){var absoluteUri=baseUri.clone();var overridden=relativeUri.hasScheme();if(overridden){absoluteUri.setRawScheme(relativeUri.getRawScheme())}else{overridden=relativeUri.hasCredentials()}if(overridden){absoluteUri.setRawCredentials(relativeUri.getRawCredentials())}else{overridden=relativeUri.hasDomain()}if(overridden){absoluteUri.setRawDomain(relativeUri.getRawDomain())}else{overridden=relativeUri.hasPort()}var rawPath=relativeUri.getRawPath();var simplifiedPath=collapse_dots(rawPath);if(overridden){absoluteUri.setPort(relativeUri.getPort());simplifiedPath=simplifiedPath&&simplifiedPath.replace(EXTRA_PARENT_PATHS_RE,\"\")}else{overridden=!!rawPath;if(overridden){if(simplifiedPath.charCodeAt(0)!==47){var absRawPath=collapse_dots(absoluteUri.getRawPath()||\"\").replace(EXTRA_PARENT_PATHS_RE,\"\");var slash=absRawPath.lastIndexOf(\"/\")+1;simplifiedPath=collapse_dots((slash?absRawPath.substring(0,slash):\"\")+collapse_dots(rawPath)).replace(EXTRA_PARENT_PATHS_RE,\"\")}}else{simplifiedPath=simplifiedPath&&simplifiedPath.replace(EXTRA_PARENT_PATHS_RE,\"\");if(simplifiedPath!==rawPath){absoluteUri.setRawPath(simplifiedPath)}}}if(overridden){absoluteUri.setRawPath(simplifiedPath)}else{overridden=relativeUri.hasQuery()}if(overridden){absoluteUri.setRawQuery(relativeUri.getRawQuery())}else{overridden=relativeUri.hasFragment()}if(overridden){absoluteUri.setRawFragment(relativeUri.getRawFragment())}return absoluteUri}function URI(rawScheme,rawCredentials,rawDomain,port,rawPath,rawQuery,rawFragment){this.scheme_=rawScheme;this.credentials_=rawCredentials;this.domain_=rawDomain;this.port_=port;this.path_=rawPath;this.query_=rawQuery;this.fragment_=rawFragment;this.paramCache_=null}URI.prototype.toString=function(){var out=[];if(null!==this.scheme_){out.push(this.scheme_,\":\")}if(null!==this.domain_){out.push(\"//\");if(null!==this.credentials_){out.push(this.credentials_,\"@\")}out.push(this.domain_);if(null!==this.port_){out.push(\":\",this.port_.toString())}}if(null!==this.path_){out.push(this.path_)}if(null!==this.query_){out.push(\"?\",this.query_)}if(null!==this.fragment_){out.push(\"#\",this.fragment_)}return out.join(\"\")};URI.prototype.clone=function(){return new URI(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)};URI.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()};URI.prototype.getRawScheme=function(){return this.scheme_};URI.prototype.setScheme=function(newScheme){this.scheme_=encodeIfExists2(newScheme,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_);return this};URI.prototype.setRawScheme=function(newScheme){this.scheme_=newScheme?newScheme:null;return this};URI.prototype.hasScheme=function(){return null!==this.scheme_};URI.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)};URI.prototype.getRawCredentials=function(){return this.credentials_};URI.prototype.setCredentials=function(newCredentials){this.credentials_=encodeIfExists2(newCredentials,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_);return this};URI.prototype.setRawCredentials=function(newCredentials){this.credentials_=newCredentials?newCredentials:null;return this};URI.prototype.hasCredentials=function(){return null!==this.credentials_};URI.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)};URI.prototype.getRawDomain=function(){return this.domain_};URI.prototype.setDomain=function(newDomain){return this.setRawDomain(newDomain&&encodeURIComponent(newDomain))};URI.prototype.setRawDomain=function(newDomain){this.domain_=newDomain?newDomain:null;return this.setRawPath(this.path_)};URI.prototype.hasDomain=function(){return null!==this.domain_};URI.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)};URI.prototype.setPort=function(newPort){if(newPort){newPort=Number(newPort);if(newPort!==(newPort&65535)){throw new Error(\"Bad port number \"+newPort)}this.port_=\"\"+newPort}else{this.port_=null}return this};URI.prototype.hasPort=function(){return null!==this.port_};URI.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)};URI.prototype.getRawPath=function(){return this.path_};URI.prototype.setPath=function(newPath){return this.setRawPath(encodeIfExists2(newPath,URI_DISALLOWED_IN_PATH_))};URI.prototype.setRawPath=function(newPath){if(newPath){newPath=String(newPath);this.path_=!this.domain_||/^\\//.test(newPath)?newPath:\"/\"+newPath}else{this.path_=null}return this};URI.prototype.hasPath=function(){return null!==this.path_};URI.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\\+/g,\" \")};URI.prototype.getRawQuery=function(){return this.query_};URI.prototype.setQuery=function(newQuery){this.paramCache_=null;this.query_=encodeIfExists(newQuery);return this};URI.prototype.setRawQuery=function(newQuery){this.paramCache_=null;this.query_=newQuery?newQuery:null;return this};URI.prototype.hasQuery=function(){return null!==this.query_};URI.prototype.setAllParameters=function(params){if(typeof params===\"object\"){if(!(params instanceof Array)&&(params instanceof Object||Object.prototype.toString.call(params)!==\"[object Array]\")){var newParams=[];var i=-1;for(var k in params){var v=params[k];if(\"string\"===typeof v){newParams[++i]=k;newParams[++i]=v}}params=newParams}}this.paramCache_=null;var queryBuf=[];var separator=\"\";for(var j=0;j<params.length;){var k=params[j++];var v=params[j++];queryBuf.push(separator,encodeURIComponent(k.toString()));separator=\"&\";if(v){queryBuf.push(\"=\",encodeURIComponent(v.toString()))}}this.query_=queryBuf.join(\"\");return this};URI.prototype.checkParameterCache_=function(){if(!this.paramCache_){var q=this.query_;if(!q){this.paramCache_=[]}else{var cgiParams=q.split(/[&\\?]/);var out=[];var k=-1;for(var i=0;i<cgiParams.length;++i){var m=cgiParams[i].match(/^([^=]*)(?:=(.*))?$/);out[++k]=decodeURIComponent(m[1]).replace(/\\+/g,\" \");out[++k]=decodeURIComponent(m[2]||\"\").replace(/\\+/g,\" \")}this.paramCache_=out}}};URI.prototype.setParameterValues=function(key,values){if(typeof values===\"string\"){values=[values]}this.checkParameterCache_();var newValueIndex=0;var pc=this.paramCache_;var params=[];for(var i=0,k=0;i<pc.length;i+=2){if(key===pc[i]){if(newValueIndex<values.length){params.push(key,values[newValueIndex++])}}else{params.push(pc[i],pc[i+1])}}while(newValueIndex<values.length){params.push(key,values[newValueIndex++])}this.setAllParameters(params);return this};URI.prototype.removeParameter=function(key){return this.setParameterValues(key,[])};URI.prototype.getAllParameters=function(){this.checkParameterCache_();return this.paramCache_.slice(0,this.paramCache_.length)};URI.prototype.getParameterValues=function(paramNameUnescaped){this.checkParameterCache_();var values=[];for(var i=0;i<this.paramCache_.length;i+=2){if(paramNameUnescaped===this.paramCache_[i]){values.push(this.paramCache_[i+1])}}return values};URI.prototype.getParameterMap=function(paramNameUnescaped){this.checkParameterCache_();var paramMap={};for(var i=0;i<this.paramCache_.length;i+=2){var key=this.paramCache_[i++],value=this.paramCache_[i++];if(!(key in paramMap)){paramMap[key]=[value]}else{paramMap[key].push(value)}}return paramMap};URI.prototype.getParameterValue=function(paramNameUnescaped){this.checkParameterCache_();for(var i=0;i<this.paramCache_.length;i+=2){if(paramNameUnescaped===this.paramCache_[i]){return this.paramCache_[i+1]}}return null};URI.prototype.getFragment=function(){return this.fragment_&&decodeURIComponent(this.fragment_)};URI.prototype.getRawFragment=function(){return this.fragment_};URI.prototype.setFragment=function(newFragment){this.fragment_=newFragment?encodeURIComponent(newFragment):null;return this};URI.prototype.setRawFragment=function(newFragment){this.fragment_=newFragment?newFragment:null;return this};URI.prototype.hasFragment=function(){return null!==this.fragment_};function nullIfAbsent(matchPart){return\"string\"==typeof matchPart&&matchPart.length>0?matchPart:null}var URI_RE_=new RegExp(\"^\"+\"(?:\"+\"([^:/?#]+)\"+\":)?\"+\"(?://\"+\"(?:([^/?#]*)@)?\"+\"([^/?#:@]*)\"+\"(?::([0-9]+))?\"+\")?\"+\"([^?#]+)?\"+\"(?:\\\\?([^#]*))?\"+\"(?:#(.*))?\"+\"$\");var URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_=/[#\\/\\?@]/g;var URI_DISALLOWED_IN_PATH_=/[\\#\\?]/g;URI.parse=parse;URI.create=create;URI.resolve=resolve;URI.collapse_dots=collapse_dots;URI.utils={mimeTypeOf:function(uri){var uriObj=parse(uri);if(/\\.html$/.test(uriObj.getPath())){return\"text/html\"}else{return\"application/javascript\"}},resolve:function(base,uri){if(base){return resolve(parse(base),parse(uri)).toString()}else{return\"\"+uri}}};return URI}();if(typeof window!==\"undefined\"){window[\"URI\"]=URI}var sanitizeCssProperty=undefined;var sanitizeCssSelectorList=undefined;var sanitizeStylesheet=undefined;var sanitizeStylesheetWithExternals=undefined;var sanitizeMediaQuery=undefined;(function(){var NOEFFECT_URL='url(\"about:blank\")';var NORM_URL_REGEXP=/[\\n\\f\\r\\\"\\'()*<>]/g;var NORM_URL_REPLACEMENTS={\"\\n\":\"%0a\",\"\\f\":\"%0c\",\"\\r\":\"%0d\",'\"':\"%22\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"*\":\"%2a\",\"<\":\"%3c\",\">\":\"%3e\"};function normalizeUrl(s){if(\"string\"===typeof s){return'url(\"'+s.replace(NORM_URL_REGEXP,normalizeUrlChar)+'\")'}else{return NOEFFECT_URL}}function normalizeUrlChar(ch){return NORM_URL_REPLACEMENTS[ch]}var URI_SCHEME_RE=new RegExp(\"^\"+\"(?:\"+\"([^:/?# ]+)\"+\":)?\");var ALLOWED_URI_SCHEMES=/^(?:https?|mailto)$/i;function resolveUri(baseUri,uri){if(baseUri){return URI.utils.resolve(baseUri,uri)}return uri}function safeUri(uri,prop,naiveUriRewriter){if(!naiveUriRewriter){return null}var parsed=(\"\"+uri).match(URI_SCHEME_RE);if(parsed&&(!parsed[1]||ALLOWED_URI_SCHEMES.test(parsed[1]))){return naiveUriRewriter(uri,prop)}else{return null}}function withoutVendorPrefix(ident){return ident.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,\"\")}sanitizeCssProperty=function(){function unionArrays(arrs){var map={};for(var i=arrs.length;--i>=0;){var arr=arrs[i];for(var j=arr.length;--j>=0;){map[arr[j]]=ALLOWED_LITERAL}}return map}var ALLOWED_LITERAL={};return function sanitize(property,tokens,opt_naiveUriRewriter,opt_baseUri,opt_idSuffix){var propertyKey=withoutVendorPrefix(property);var propertySchema=cssSchema[propertyKey];if(!propertySchema||\"object\"!==typeof propertySchema){tokens.length=0;return}var propBits=propertySchema[\"cssPropBits\"];function sanitizeFunctionCall(tokens,start){var parenDepth=1,end=start+1,n=tokens.length;while(end<n&&parenDepth){var token=tokens[end++];parenDepth+=token===\")\"?-1:/^[^\"']*\\($/.test(token)}if(!parenDepth){var fnToken=tokens[start].toLowerCase();var bareFnToken=withoutVendorPrefix(fnToken);var fnTokens=tokens.splice(start,end-start,\"\");var fns=propertySchema[\"cssFns\"];for(var i=0,nFns=fns.length;i<nFns;++i){if(fns[i].substring(0,bareFnToken.length)==bareFnToken){fnTokens[0]=fnTokens[fnTokens.length-1]=\"\";sanitize(fns[i],fnTokens,opt_naiveUriRewriter,opt_baseUri);return fnToken+fnTokens.join(\" \")+\")\"}}}return\"\"}var stringDisposition=propBits&(CSS_PROP_BIT_URL|CSS_PROP_BIT_UNRESERVED_WORD);var identDisposition=propBits&(CSS_PROP_BIT_GLOBAL_NAME|CSS_PROP_BIT_PROPERTY_NAME);var lastQuoted=NaN;var i=0,k=0;for(;i<tokens.length;++i){var token=tokens[i].toLowerCase()\n;var cc=token.charCodeAt(0),cc1,cc2,isnum1,isnum2,end;var litGroup,litMap;token=cc===\" \".charCodeAt(0)?\"\":cc==='\"'.charCodeAt(0)?stringDisposition===CSS_PROP_BIT_URL?opt_naiveUriRewriter?normalizeUrl(safeUri(resolveUri(opt_baseUri,decodeCss(tokens[i].substring(1,token.length-1))),propertyKey,opt_naiveUriRewriter)):\"\":propBits&CSS_PROP_BIT_QSTRING&&!(stringDisposition&stringDisposition-1)?token:\"\":token===\"inherit\"?token:(litGroup=propertySchema[\"cssLitGroup\"],litMap=litGroup?propertySchema[\"cssLitMap\"]||(propertySchema[\"cssLitMap\"]=unionArrays(litGroup)):ALLOWED_LITERAL,litMap[withoutVendorPrefix(token)]===ALLOWED_LITERAL)?token:cc===\"#\".charCodeAt(0)&&/^#(?:[0-9a-f]{3}){1,2}$/.test(token)?propBits&CSS_PROP_BIT_HASH_VALUE?token:\"\":\"0\".charCodeAt(0)<=cc&&cc<=\"9\".charCodeAt(0)?propBits&CSS_PROP_BIT_QUANTITY?token:\"\":(cc1=token.charCodeAt(1),cc2=token.charCodeAt(2),isnum1=\"0\".charCodeAt(0)<=cc1&&cc1<=\"9\".charCodeAt(0),isnum2=\"0\".charCodeAt(0)<=cc2&&cc2<=\"9\".charCodeAt(0),cc===\"+\".charCodeAt(0)&&(isnum1||cc1===\".\".charCodeAt(0)&&isnum2))?propBits&CSS_PROP_BIT_QUANTITY?(isnum1?\"\":\"0\")+token.substring(1):\"\":cc===\"-\".charCodeAt(0)&&(isnum1||cc1===\".\".charCodeAt(0)&&isnum2)?propBits&CSS_PROP_BIT_NEGATIVE_QUANTITY?(isnum1?\"-\":\"-0\")+token.substring(1):propBits&CSS_PROP_BIT_QUANTITY?\"0\":\"\":cc===\".\".charCodeAt(0)&&isnum1?propBits&CSS_PROP_BIT_QUANTITY?\"0\"+token:\"\":'url(\"'===token.substring(0,5)?opt_naiveUriRewriter&&propBits&CSS_PROP_BIT_URL?normalizeUrl(safeUri(resolveUri(opt_baseUri,tokens[i].substring(5,token.length-2)),propertyKey,opt_naiveUriRewriter)):\"\":token.charAt(token.length-1)===\"(\"?sanitizeFunctionCall(tokens,i):identDisposition&&/^-?[a-z_][\\w\\-]*$/.test(token)&&!/__$/.test(token)?opt_idSuffix&&identDisposition===CSS_PROP_BIT_GLOBAL_NAME?tokens[i]+opt_idSuffix:identDisposition===CSS_PROP_BIT_PROPERTY_NAME&&cssSchema[token]&&\"number\"===typeof cssSchema[token].cssPropBits?token:\"\":/^\\w+$/.test(token)&&stringDisposition===CSS_PROP_BIT_UNRESERVED_WORD&&propBits&CSS_PROP_BIT_QSTRING?lastQuoted+1===k?(tokens[lastQuoted]=tokens[lastQuoted].substring(0,tokens[lastQuoted].length-1)+\" \"+token+'\"',token=\"\"):(lastQuoted=k,'\"'+token+'\"'):\"\";if(token){tokens[k++]=token}}if(k===1&&tokens[0]===NOEFFECT_URL){k=0}tokens.length=k}}();var PSEUDO_SELECTOR_WHITELIST=new RegExp(\"^(active|after|before|blank|checked|default|disabled\"+\"|drop|empty|enabled|first|first-child|first-letter\"+\"|first-line|first-of-type|fullscreen|focus|hover\"+\"|in-range|indeterminate|invalid|last-child|last-of-type\"+\"|left|link|only-child|only-of-type|optional|out-of-range\"+\"|placeholder-shown|read-only|read-write|required|right\"+\"|root|scope|user-error|valid|visited\"+\")$\");var COMBINATOR={};COMBINATOR[\">\"]=COMBINATOR[\"+\"]=COMBINATOR[\"~\"]=COMBINATOR;sanitizeCssSelectorList=function(selectors,virtualization,opt_onUntranslatableSelector){var containerClass=virtualization.containerClass;var idSuffix=virtualization.idSuffix;var tagPolicy=virtualization.tagPolicy;var sanitized=[];var k=0,i,inBrackets=0,tok;for(i=0;i<selectors.length;++i){tok=selectors[i];if(tok==\"(\"||tok==\"[\"?(++inBrackets,true):tok==\")\"||tok==\"]\"?(inBrackets&&--inBrackets,true):!(selectors[i]==\" \"&&(inBrackets||COMBINATOR[selectors[i-1]]===COMBINATOR||COMBINATOR[selectors[i+1]]===COMBINATOR))){selectors[k++]=selectors[i]}}selectors.length=k;var n=selectors.length,start=0;for(i=0;i<n;++i){if(selectors[i]===\",\"){if(!processComplexSelector(start,i)){return null}start=i+1}}if(!processComplexSelector(start,n)){return null}function processComplexSelector(start,end){if(selectors[start]===\" \"){++start}if(end-1!==start&&selectors[end]===\" \"){--end}var out=[];var lastOperator=start;var valid=true;for(var i=start;valid&&i<end;++i){var tok=selectors[i];if(COMBINATOR[tok]===COMBINATOR||tok===\" \"){if(!processCompoundSelector(lastOperator,i,tok)){valid=false}else{lastOperator=i+1}}}if(!processCompoundSelector(lastOperator,end,\"\")){valid=false}function processCompoundSelector(start,end,combinator){var element,classId,attrs,pseudoSelector,tok,valid=true;element=\"\";if(start<end){tok=selectors[start];if(tok===\"*\"){++start;element=tok}else if(/^[a-zA-Z]/.test(tok)){var decision=tagPolicy(tok.toLowerCase(),[]);if(decision){if(\"tagName\"in decision){tok=decision[\"tagName\"]}++start;element=tok}}}classId=\"\";attrs=\"\";pseudoSelector=\"\";for(;valid&&start<end;++start){tok=selectors[start];if(tok.charAt(0)===\"#\"){if(/^#_|__$|[^\\w#:\\-]/.test(tok)){valid=false}else{classId+=tok+idSuffix}}else if(tok===\".\"){if(++start<end&&/^[0-9A-Za-z:_\\-]+$/.test(tok=selectors[start])&&!/^_|__$/.test(tok)){classId+=\".\"+tok}else{valid=false}}else if(start+1<end&&selectors[start]===\"[\"){++start;var vAttr=selectors[start++].toLowerCase();var atype=html4.ATTRIBS[element+\"::\"+vAttr];if(atype!==+atype){atype=html4.ATTRIBS[\"*::\"+vAttr]}var rAttr;if(virtualization.virtualizeAttrName){rAttr=virtualization.virtualizeAttrName(element,vAttr);if(typeof rAttr!==\"string\"){valid=false;rAttr=vAttr}if(valid&&atype!==+atype){atype=html4.atype[\"NONE\"]}}else{rAttr=vAttr;if(atype!==+atype){valid=false}}var op=\"\",value=\"\",ignoreCase=false;if(/^[~^$*|]?=$/.test(selectors[start])){op=selectors[start++];value=selectors[start++];if(/^[0-9A-Za-z:_\\-]+$/.test(value)){value='\"'+value+'\"'}else if(value===\"]\"){value='\"\"';--start}if(!/^\"([^\\\"\\\\]|\\\\.)*\"$/.test(value)){valid=false}ignoreCase=selectors[start]===\"i\";if(ignoreCase){++start}}if(selectors[start]!==\"]\"){++start;valid=false}switch(atype){case html4.atype[\"CLASSES\"]:case html4.atype[\"LOCAL_NAME\"]:case html4.atype[\"NONE\"]:break;case html4.atype[\"GLOBAL_NAME\"]:case html4.atype[\"ID\"]:case html4.atype[\"IDREF\"]:if((op===\"=\"||op===\"~=\"||op===\"$=\")&&value!='\"\"'&&!ignoreCase){value='\"'+value.substring(1,value.length-1)+idSuffix+'\"'}else if(op===\"|=\"||op===\"\"){}else{valid=false}break;case html4.atype[\"URI\"]:case html4.atype[\"URI_FRAGMENT\"]:if(op!==\"\"){valid=false}break;default:valid=false}if(valid){attrs+=\"[\"+rAttr.replace(/[^\\w-]/g,\"\\\\$&\")+op+value+(ignoreCase?\" i]\":\"]\")}}else if(start<end&&selectors[start]===\":\"){tok=selectors[++start];if(PSEUDO_SELECTOR_WHITELIST.test(tok)){pseudoSelector+=\":\"+tok}else{break}}else{break}}if(start!==end){valid=false}if(valid){var selector=(element+classId).replace(/[^ .*#\\w-]/g,\"\\\\$&\")+attrs+pseudoSelector+combinator;if(selector){out.push(selector)}}return valid}if(valid){if(out.length){var safeSelector=out.join(\"\");if(containerClass!==null){safeSelector=\".\"+containerClass+\" \"+safeSelector}sanitized.push(safeSelector)}return true}else{return!opt_onUntranslatableSelector||opt_onUntranslatableSelector(selectors.slice(start,end))}}return sanitized};(function(){var MEDIA_TYPE=\"(?:\"+\"all|aural|braille|embossed|handheld|print\"+\"|projection|screen|speech|tty|tv\"+\")\";var MEDIA_FEATURE=\"(?:\"+\"(?:min-|max-)?\"+\"(?:\"+(\"(?:device-)?\"+\"(?:aspect-ratio|height|width)\"+\"|color(?:-index)?\"+\"|monochrome\"+\"|orientation\"+\"|resolution\")+\")\"+\"|grid\"+\"|hover\"+\"|luminosity\"+\"|pointer\"+\"|scan\"+\"|script\"+\")\";var LENGTH_UNIT=\"(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)\";var CSS_VALUE=\"-?(?:\"+\"[a-z]\\\\w+(?:-\\\\w+)*\"+\"|\\\\d+(?: / \\\\d+|(?:\\\\.\\\\d+)?\"+LENGTH_UNIT+\"?)\"+\")\";var MEDIA_EXPR=\"\\\\( \"+MEDIA_FEATURE+\" (?:\"+\": \"+CSS_VALUE+\" )?\\\\)\";var MEDIA_QUERY=\"(?:\"+\"(?:(?:(?:only|not) )?\"+MEDIA_TYPE+\"|\"+MEDIA_EXPR+\")\"+\"(?: and ?\"+MEDIA_EXPR+\")*\"+\")\";var STARTS_WITH_KEYWORD_REGEXP=/^\\w/;var MEDIA_QUERY_LIST_REGEXP=new RegExp(\"^\"+MEDIA_QUERY+\"(?: , \"+MEDIA_QUERY+\")*\"+\"$\",\"i\");sanitizeMediaQuery=function(cssTokens){cssTokens=cssTokens.slice();var nTokens=cssTokens.length,k=0;for(var i=0;i<nTokens;++i){var tok=cssTokens[i];if(tok!=\" \"){cssTokens[k++]=tok}}cssTokens.length=k;var css=cssTokens.join(\" \");css=!css.length?\"\":!MEDIA_QUERY_LIST_REGEXP.test(css)?\"not all\":STARTS_WITH_KEYWORD_REGEXP.test(css)?css:\"not all , \"+css;return css}})();(function(){function cssParseUri(candidate){var string1=/^\\s*[\"]([^\"]*)[\"]\\s*$/;var string2=/^\\s*[']([^']*)[']\\s*$/;var url1=/^\\s*url\\s*[(][\"]([^\"]*)[\"][)]\\s*$/;var url2=/^\\s*url\\s*[(][']([^']*)['][)]\\s*$/;var url3=/^\\s*url\\s*[(]([^)]*)[)]\\s*$/;var match;if(match=string1.exec(candidate)){return match[1]}else if(match=string2.exec(candidate)){return match[1]}else if(match=url1.exec(candidate)){return match[1]}else if(match=url2.exec(candidate)){return match[1]}else if(match=url3.exec(candidate)){return match[1]}return null}function sanitizeStylesheetInternal(baseUri,cssText,virtualization,naiveUriRewriter,naiveUriFetcher,continuation,opt_importCount){var safeCss=void 0;var importCount=opt_importCount||[0];var blockStack=[];var elide=false;parseCssStylesheet(cssText,{startStylesheet:function(){safeCss=[]},endStylesheet:function(){},startAtrule:function(atIdent,headerArray){if(elide){atIdent=null}else if(atIdent===\"@media\"){safeCss.push(\"@media\",\" \",sanitizeMediaQuery(headerArray))}else if(atIdent===\"@keyframes\"||atIdent===\"@-webkit-keyframes\"){var animationId=headerArray[0];if(headerArray.length===1&&!/__$|[^\\w\\-]/.test(animationId)){safeCss.push(atIdent,\" \",animationId+virtualization.idSuffix);atIdent=\"@keyframes\"}else{atIdent=null}}else{if(atIdent===\"@import\"&&headerArray.length>0){atIdent=null;if(\"function\"===typeof continuation){var mediaQuery=sanitizeMediaQuery(headerArray.slice(1));if(mediaQuery!==\"not all\"){++importCount[0];var placeholder=[];safeCss.push(placeholder);var cssUrl=safeUri(resolveUri(baseUri,cssParseUri(headerArray[0])),function(result){var sanitized=sanitizeStylesheetInternal(cssUrl,result.html,virtualization,naiveUriRewriter,naiveUriFetcher,continuation,importCount);--importCount[0];var safeImportedCss=mediaQuery?{toString:function(){return\"@media \"+mediaQuery+\" {\"+sanitized.result+\"}\"}}:sanitized.result;placeholder[0]=safeImportedCss;continuation(safeImportedCss,!!importCount[0])},naiveUriFetcher)}}else{if(window.console){window.console.log(\"@import \"+headerArray.join(\" \")+\" elided\")}}}}elide=!atIdent;blockStack.push(atIdent)},endAtrule:function(){blockStack.pop();if(!elide){safeCss.push(\";\")}checkElide()},startBlock:function(){if(!elide){safeCss.push(\"{\")}},endBlock:function(){if(!elide){safeCss.push(\"}\");elide=true}},startRuleset:function(selectorArray){if(!elide){var selector=void 0;if(blockStack[blockStack.length-1]===\"@keyframes\"){selector=selectorArray.join(\" \").match(/^ *(?:from|to|\\d+(?:\\.\\d+)?%) *(?:, *(?:from|to|\\d+(?:\\.\\d+)?%) *)*$/i);elide=!selector;if(selector){selector=selector[0].replace(/ +/g,\"\")}}else{var selectors=sanitizeCssSelectorList(selectorArray,virtualization);if(!selectors||!selectors.length){elide=true}else{selector=selectors.join(\", \")}}if(!elide){safeCss.push(selector,\"{\")}}blockStack.push(null)},endRuleset:function(){blockStack.pop();if(!elide){safeCss.push(\"}\")}checkElide()},declaration:function(property,valueArray){if(!elide){var isImportant=false;var nValues=valueArray.length;if(nValues>=2&&valueArray[nValues-2]===\"!\"&&valueArray[nValues-1].toLowerCase()===\"important\"){isImportant=true;valueArray.length-=2}sanitizeCssProperty(property,valueArray,naiveUriRewriter,baseUri,virtualization.idSuffix);if(valueArray.length){safeCss.push(property,\":\",valueArray.join(\" \"),isImportant?\" !important;\":\";\")}}}});function checkElide(){elide=blockStack.length&&blockStack[blockStack.length-1]===null}return{result:{toString:function(){return safeCss.join(\"\")}},moreToCome:!!importCount[0]}}sanitizeStylesheet=function(baseUri,cssText,virtualization,naiveUriRewriter){return sanitizeStylesheetInternal(baseUri,cssText,virtualization,naiveUriRewriter,undefined,undefined).result.toString()};sanitizeStylesheetWithExternals=function(baseUri,cssText,virtualization,naiveUriRewriter,naiveUriFetcher,continuation){return sanitizeStylesheetInternal(baseUri,cssText,virtualization,naiveUriRewriter,naiveUriFetcher,continuation)}})()})();if(typeof window!==\"undefined\"){window[\"sanitizeCssProperty\"]=sanitizeCssProperty;window[\"sanitizeCssSelectorList\"]=sanitizeCssSelectorList;window[\"sanitizeStylesheet\"]=sanitizeStylesheet;window[\"sanitizeMediaQuery\"]=sanitizeMediaQuery}if(\"I\".toLowerCase()!==\"i\"){throw\"I/i problem\"}var parseCssStylesheet;var parseCssDeclarations;(function(){parseCssStylesheet=function(cssText,handler){var toks=lexCss(cssText);if(handler[\"startStylesheet\"]){handler[\"startStylesheet\"]()}for(var i=0,n=toks.length;i<n;){i=toks[i]===\" \"?i+1:statement(toks,i,n,handler)}if(handler[\"endStylesheet\"]){handler[\"endStylesheet\"]()}};function statement(toks,i,n,handler){if(i<n){var tok=toks[i];if(tok.charAt(0)===\"@\"){return atrule(toks,i,n,handler,true)}else{return ruleset(toks,i,n,handler)}}else{return i}}function atrule(toks,i,n,handler,blockok){var start=i++;while(i<n&&toks[i]!==\"{\"&&toks[i]!==\";\"){++i}if(i<n&&(blockok||toks[i]===\";\")){var s=start+1,e=i;if(s<n&&toks[s]===\" \"){++s}if(e>s&&toks[e-1]===\" \"){--e}if(handler[\"startAtrule\"]){handler[\"startAtrule\"](toks[start].toLowerCase(),toks.slice(s,e))}i=toks[i]===\"{\"?block(toks,i,n,handler):i+1;if(handler[\"endAtrule\"]){handler[\"endAtrule\"]()}}return i}function block(toks,i,n,handler){++i;if(handler[\"startBlock\"]){handler[\"startBlock\"]()}while(i<n){var ch=toks[i].charAt(0);if(ch==\"}\"){++i;break}if(ch===\" \"||ch===\";\"){i=i+1}else if(ch===\"@\"){i=atrule(toks,i,n,handler,false)}else if(ch===\"{\"){i=block(toks,i,n,handler)}else{i=ruleset(toks,i,n,handler)}}if(handler[\"endBlock\"]){handler[\"endBlock\"]()}return i}function ruleset(toks,i,n,handler){var s=i,e=selector(toks,i,n,true);if(e<0){e=~e;return e===s?e+1:e}var tok=toks[e];if(tok!==\"{\"){return e===s?e+1:e}i=e+1;if(e>s&&toks[e-1]===\" \"){--e}if(handler[\"startRuleset\"]){handler[\"startRuleset\"](toks.slice(s,e))}while(i<n){tok=toks[i];if(tok===\"}\"){++i;break}if(tok===\" \"){i=i+1}else{i=declaration(toks,i,n,handler)}}if(handler[\"endRuleset\"]){handler[\"endRuleset\"]()}return i}function selector(toks,i,n,allowSemi){var s=i;var tok;var brackets=[],stackLast=-1;for(;i<n;++i){tok=toks[i].charAt(0);if(tok===\"[\"||tok===\"(\"){brackets[++stackLast]=tok}else if(tok===\"]\"&&brackets[stackLast]===\"[\"||tok===\")\"&&brackets[stackLast]===\"(\"){--stackLast}else if(tok===\"{\"||tok===\"}\"||tok===\";\"||tok===\"@\"||tok===\":\"&&!allowSemi){break}}if(stackLast>=0){i=~(i+1)}return i}var ident=/^-?[a-z]/i;function skipDeclaration(toks,i,n){while(i<n&&toks[i]!==\";\"&&toks[i]!==\"}\"){++i}return i<n&&toks[i]===\";\"?i+1:i}function declaration(toks,i,n,handler){var property=toks[i++];if(!ident.test(property)){return skipDeclaration(toks,i,n)}var tok;if(i<n&&toks[i]===\" \"){++i}if(i==n||toks[i]!==\":\"){return skipDeclaration(toks,i,n)}++i;if(i<n&&toks[i]===\" \"){++i}var s=i,e=selector(toks,i,n,false);if(e<0){e=~e}else{var value=[],valuelen=0;for(var j=s;j<e;++j){tok=toks[j];if(tok!==\" \"){value[valuelen++]=tok}}if(e<n){do{tok=toks[e];if(tok===\";\"||tok===\"}\"){break}valuelen=0}while(++e<n);if(tok===\";\"){++e}}if(valuelen&&handler[\"declaration\"]){handler[\"declaration\"](property.toLowerCase(),value)}}return e}parseCssDeclarations=function(cssText,handler){var toks=lexCss(cssText);for(var i=0,n=toks.length;i<n;){i=toks[i]!==\" \"?declaration(toks,i,n,handler):i+1}}})();if(typeof window!==\"undefined\"){window[\"parseCssStylesheet\"]=parseCssStylesheet;window[\"parseCssDeclarations\"]=parseCssDeclarations}var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13};html4[\"atype\"]=html4.atype;html4.ATTRIBS={\"*::class\":9,\"*::dir\":0,\"*::draggable\":0,\"*::hidden\":0,\"*::id\":4,\"*::inert\":0,\"*::itemprop\":0,\"*::itemref\":6,\"*::itemscope\":0,\"*::lang\":0,\"*::onblur\":2,\"*::onchange\":2,\"*::onclick\":2,\"*::ondblclick\":2,\"*::onerror\":2,\"*::onfocus\":2,\"*::onkeydown\":2,\"*::onkeypress\":2,\"*::onkeyup\":2,\"*::onload\":2,\"*::onmousedown\":2,\"*::onmousemove\":2,\"*::onmouseout\":2,\"*::onmouseover\":2,\"*::onmouseup\":2,\"*::onreset\":2,\"*::onscroll\":2,\"*::onselect\":2,\"*::onsubmit\":2,\"*::ontouchcancel\":2,\"*::ontouchend\":2,\"*::ontouchenter\":2,\"*::ontouchleave\":2,\"*::ontouchmove\":2,\"*::ontouchstart\":2,\"*::onunload\":2,\"*::spellcheck\":0,\"*::style\":3,\"*::tabindex\":0,\"*::title\":0,\"*::translate\":0,\"a::accesskey\":0,\"a::coords\":0,\"a::href\":1,\"a::hreflang\":0,\"a::name\":7,\"a::onblur\":2,\"a::onfocus\":2,\"a::shape\":0,\"a::target\":10,\"a::type\":0,\"area::accesskey\":0,\"area::alt\":0,\"area::coords\":0,\"area::href\":1,\"area::nohref\":0,\"area::onblur\":2,\"area::onfocus\":2,\"area::shape\":0,\"area::target\":10,\"audio::controls\":0,\"audio::loop\":0,\"audio::mediagroup\":5,\"audio::muted\":0,\"audio::preload\":0,\"audio::src\":1,\"bdo::dir\":0,\"blockquote::cite\":1,\"br::clear\":0,\"button::accesskey\":0,\"button::disabled\":0,\"button::name\":8,\"button::onblur\":2,\"button::onfocus\":2,\"button::type\":0,\"button::value\":0,\"canvas::height\":0,\"canvas::width\":0,\"caption::align\":0,\"col::align\":0,\"col::char\":0,\"col::charoff\":0,\"col::span\":0,\"col::valign\":0,\"col::width\":0,\"colgroup::align\":0,\"colgroup::char\":0,\"colgroup::charoff\":0,\"colgroup::span\":0,\"colgroup::valign\":0,\"colgroup::width\":0,\"command::checked\":0,\"command::command\":5,\"command::disabled\":0,\"command::icon\":1,\"command::label\":0,\"command::radiogroup\":0,\"command::type\":0,\"data::value\":0,\"del::cite\":1,\"del::datetime\":0,\"details::open\":0,\"dir::compact\":0,\"div::align\":0,\"dl::compact\":0,\"fieldset::disabled\":0,\"font::color\":0,\"font::face\":0,\"font::size\":0,\"form::accept\":0,\"form::action\":1,\"form::autocomplete\":0,\"form::enctype\":0,\"form::method\":0,\"form::name\":7,\"form::novalidate\":0,\"form::onreset\":2,\"form::onsubmit\":2,\"form::target\":10,\"h1::align\":0,\"h2::align\":0,\"h3::align\":0,\"h4::align\":0,\"h5::align\":0,\"h6::align\":0,\"hr::align\":0,\"hr::noshade\":0,\"hr::size\":0,\"hr::width\":0,\"iframe::align\":0,\"iframe::frameborder\":0,\"iframe::height\":0,\"iframe::marginheight\":0,\"iframe::marginwidth\":0,\"iframe::width\":0,\"img::align\":0,\"img::alt\":0,\"img::border\":0,\"img::height\":0,\"img::hspace\":0,\"img::ismap\":0,\"img::name\":7,\"img::src\":1,\"img::usemap\":11,\"img::vspace\":0,\"img::width\":0,\"input::accept\":0,\"input::accesskey\":0,\"input::align\":0,\"input::alt\":0,\"input::autocomplete\":0,\"input::checked\":0,\"input::disabled\":0,\"input::inputmode\":0,\"input::ismap\":0,\"input::list\":5,\"input::max\":0,\"input::maxlength\":0,\"input::min\":0,\"input::multiple\":0,\"input::name\":8,\"input::onblur\":2,\"input::onchange\":2,\"input::onfocus\":2,\"input::onselect\":2,\"input::pattern\":0,\"input::placeholder\":0,\"input::readonly\":0,\"input::required\":0,\"input::size\":0,\"input::src\":1,\"input::step\":0,\"input::type\":0,\"input::usemap\":11,\"input::value\":0,\"ins::cite\":1,\"ins::datetime\":0,\"label::accesskey\":0,\"label::for\":5,\"label::onblur\":2,\"label::onfocus\":2,\"legend::accesskey\":0,\"legend::align\":0,\"li::type\":0,\"li::value\":0,\"map::name\":7,\"menu::compact\":0,\"menu::label\":0,\"menu::type\":0,\"meter::high\":0,\"meter::low\":0,\"meter::max\":0,\"meter::min\":0,\"meter::optimum\":0,\"meter::value\":0,\"ol::compact\":0,\"ol::reversed\":0,\"ol::start\":0,\"ol::type\":0,\"optgroup::disabled\":0,\"optgroup::label\":0,\"option::disabled\":0,\"option::label\":0,\"option::selected\":0,\"option::value\":0,\"output::for\":6,\"output::name\":8,\"p::align\":0,\"pre::width\":0,\"progress::max\":0,\"progress::min\":0,\"progress::value\":0,\"q::cite\":1,\"select::autocomplete\":0,\"select::disabled\":0,\"select::multiple\":0,\"select::name\":8,\"select::onblur\":2,\"select::onchange\":2,\"select::onfocus\":2,\"select::required\":0,\"select::size\":0,\"source::type\":0,\"table::align\":0,\"table::bgcolor\":0,\"table::border\":0,\"table::cellpadding\":0,\"table::cellspacing\":0,\"table::frame\":0,\"table::rules\":0,\"table::summary\":0,\"table::width\":0,\"tbody::align\":0,\"tbody::char\":0,\"tbody::charoff\":0,\"tbody::valign\":0,\"td::abbr\":0,\"td::align\":0,\"td::axis\":0,\"td::bgcolor\":0,\"td::char\":0,\"td::charoff\":0,\"td::colspan\":0,\"td::headers\":6,\"td::height\":0,\"td::nowrap\":0,\"td::rowspan\":0,\"td::scope\":0,\"td::valign\":0,\"td::width\":0,\"textarea::accesskey\":0,\"textarea::autocomplete\":0,\"textarea::cols\":0,\"textarea::disabled\":0,\"textarea::inputmode\":0,\"textarea::name\":8,\"textarea::onblur\":2,\"textarea::onchange\":2,\"textarea::onfocus\":2,\"textarea::onselect\":2,\"textarea::placeholder\":0,\"textarea::readonly\":0,\"textarea::required\":0,\"textarea::rows\":0,\"textarea::wrap\":0,\"tfoot::align\":0,\"tfoot::char\":0,\"tfoot::charoff\":0,\"tfoot::valign\":0,\"th::abbr\":0,\"th::align\":0,\"th::axis\":0,\"th::bgcolor\":0,\"th::char\":0,\"th::charoff\":0,\"th::colspan\":0,\"th::headers\":6,\"th::height\":0,\"th::nowrap\":0,\"th::rowspan\":0,\"th::scope\":0,\"th::valign\":0,\"th::width\":0,\"thead::align\":0,\"thead::char\":0,\"thead::charoff\":0,\"thead::valign\":0,\"tr::align\":0,\"tr::bgcolor\":0,\"tr::char\":0,\"tr::charoff\":0,\"tr::valign\":0,\"track::default\":0,\"track::kind\":0,\"track::label\":0,\"track::srclang\":0,\"ul::compact\":0,\"ul::type\":0,\"video::controls\":0,\"video::height\":0,\"video::loop\":0,\"video::mediagroup\":5,\"video::muted\":0,\"video::poster\":1,\"video::preload\":0,\"video::src\":1,\"video::width\":0};html4[\"ATTRIBS\"]=html4.ATTRIBS;html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};html4[\"eflags\"]=html4.eflags;html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,var:0,video:0,wbr:2};html4[\"ELEMENTS\"]=html4.ELEMENTS;html4.ELEMENT_DOM_INTERFACES={a:\"HTMLAnchorElement\",abbr:\"HTMLElement\",acronym:\"HTMLElement\",address:\"HTMLElement\",applet:\"HTMLAppletElement\",area:\"HTMLAreaElement\",article:\"HTMLElement\",aside:\"HTMLElement\",audio:\"HTMLAudioElement\",b:\"HTMLElement\",base:\"HTMLBaseElement\",basefont:\"HTMLBaseFontElement\",bdi:\"HTMLElement\",bdo:\"HTMLElement\",big:\"HTMLElement\",blockquote:\"HTMLQuoteElement\",body:\"HTMLBodyElement\",br:\"HTMLBRElement\",button:\"HTMLButtonElement\",canvas:\"HTMLCanvasElement\",caption:\"HTMLTableCaptionElement\",center:\"HTMLElement\",cite:\"HTMLElement\",code:\"HTMLElement\",col:\"HTMLTableColElement\",colgroup:\"HTMLTableColElement\",command:\"HTMLCommandElement\",data:\"HTMLElement\",datalist:\"HTMLDataListElement\",dd:\"HTMLElement\",del:\"HTMLModElement\",details:\"HTMLDetailsElement\",dfn:\"HTMLElement\",dialog:\"HTMLDialogElement\",dir:\"HTMLDirectoryElement\",div:\"HTMLDivElement\",dl:\"HTMLDListElement\",dt:\"HTMLElement\",em:\"HTMLElement\",fieldset:\"HTMLFieldSetElement\",figcaption:\"HTMLElement\",figure:\"HTMLElement\",font:\"HTMLFontElement\",footer:\"HTMLElement\",form:\"HTMLFormElement\",frame:\"HTMLFrameElement\",frameset:\"HTMLFrameSetElement\",h1:\"HTMLHeadingElement\",h2:\"HTMLHeadingElement\",h3:\"HTMLHeadingElement\",h4:\"HTMLHeadingElement\",h5:\"HTMLHeadingElement\",h6:\"HTMLHeadingElement\",head:\"HTMLHeadElement\",header:\"HTMLElement\",hgroup:\"HTMLElement\",hr:\"HTMLHRElement\",html:\"HTMLHtmlElement\",i:\"HTMLElement\",iframe:\"HTMLIFrameElement\",img:\"HTMLImageElement\",input:\"HTMLInputElement\",ins:\"HTMLModElement\",isindex:\"HTMLUnknownElement\",kbd:\"HTMLElement\",keygen:\"HTMLKeygenElement\",label:\"HTMLLabelElement\",legend:\"HTMLLegendElement\",li:\"HTMLLIElement\",link:\"HTMLLinkElement\",map:\"HTMLMapElement\",mark:\"HTMLElement\",menu:\"HTMLMenuElement\",meta:\"HTMLMetaElement\",meter:\"HTMLMeterElement\",nav:\"HTMLElement\",nobr:\"HTMLElement\",noembed:\"HTMLElement\",noframes:\"HTMLElement\",noscript:\"HTMLElement\",object:\"HTMLObjectElement\",ol:\"HTMLOListElement\",optgroup:\"HTMLOptGroupElement\",option:\"HTMLOptionElement\",output:\"HTMLOutputElement\",p:\"HTMLParagraphElement\",param:\"HTMLParamElement\",pre:\"HTMLPreElement\",progress:\"HTMLProgressElement\",q:\"HTMLQuoteElement\",s:\"HTMLElement\",samp:\"HTMLElement\",script:\"HTMLScriptElement\",section:\"HTMLElement\",select:\"HTMLSelectElement\",small:\"HTMLElement\",source:\"HTMLSourceElement\",span:\"HTMLSpanElement\",strike:\"HTMLElement\",strong:\"HTMLElement\",style:\"HTMLStyleElement\",sub:\"HTMLElement\",summary:\"HTMLElement\",sup:\"HTMLElement\",table:\"HTMLTableElement\",tbody:\"HTMLTableSectionElement\",td:\"HTMLTableDataCellElement\",textarea:\"HTMLTextAreaElement\",tfoot:\"HTMLTableSectionElement\",th:\"HTMLTableHeaderCellElement\",thead:\"HTMLTableSectionElement\",time:\"HTMLTimeElement\",title:\"HTMLTitleElement\",tr:\"HTMLTableRowElement\",track:\"HTMLTrackElement\",tt:\"HTMLElement\",u:\"HTMLElement\",ul:\"HTMLUListElement\",var:\"HTMLElement\",video:\"HTMLVideoElement\",wbr:\"HTMLElement\"};html4[\"ELEMENT_DOM_INTERFACES\"]=html4.ELEMENT_DOM_INTERFACES;html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};html4[\"ueffects\"]=html4.ueffects;html4.URIEFFECTS={\"a::href\":2,\"area::href\":2,\"audio::src\":1,\"blockquote::cite\":0,\"command::icon\":1,\"del::cite\":0,\"form::action\":2,\"img::src\":1,\"input::src\":1,\"ins::cite\":0,\"q::cite\":0,\"video::poster\":1,\"video::src\":1};html4[\"URIEFFECTS\"]=html4.URIEFFECTS;html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0};html4[\"ltypes\"]=html4.ltypes;html4.LOADERTYPES={\"a::href\":2,\"area::href\":2,\"audio::src\":2,\"blockquote::cite\":2,\"command::icon\":1,\"del::cite\":2,\"form::action\":2,\"img::src\":1,\"input::src\":1,\"ins::cite\":2,\"q::cite\":2,\"video::poster\":1,\"video::src\":2};html4[\"LOADERTYPES\"]=html4.LOADERTYPES;if(typeof window!==\"undefined\"){window[\"html4\"]=html4}if(\"I\".toLowerCase()!==\"i\"){throw\"I/i problem\"}var defs={};defs.TagPolicyDecision;defs.TagPolicy;var html=function(html4){var parseCssDeclarations,sanitizeCssProperty,cssSchema;if(\"undefined\"!==typeof window){parseCssDeclarations=window[\"parseCssDeclarations\"];sanitizeCssProperty=window[\"sanitizeCssProperty\"];cssSchema=window[\"cssSchema\"]}var ENTITIES={lt:\"<\",LT:\"<\",gt:\">\",GT:\">\",amp:\"&\",AMP:\"&\",quot:'\"',apos:\"'\",nbsp:\" \"};var decimalEscapeRe=/^#(\\d+)$/;var hexEscapeRe=/^#x([0-9A-Fa-f]+)$/;var safeEntityNameRe=/^[A-Za-z][A-za-z0-9]+$/;var entityLookupElement=\"undefined\"!==typeof window&&window[\"document\"]?window[\"document\"].createElement(\"textarea\"):null;function lookupEntity(name){if(ENTITIES.hasOwnProperty(name)){return ENTITIES[name]}var m=name.match(decimalEscapeRe);if(m){return String.fromCharCode(parseInt(m[1],10))}else if(!!(m=name.match(hexEscapeRe))){return String.fromCharCode(parseInt(m[1],16))}else if(entityLookupElement&&safeEntityNameRe.test(name)){entityLookupElement.innerHTML=\"&\"+name+\";\";var text=entityLookupElement.textContent;ENTITIES[name]=text;return text}else{return\"&\"+name+\";\"}}function decodeOneEntity(_,name){return lookupEntity(name)}var nulRe=/\\0/g;function stripNULs(s){return s.replace(nulRe,\"\")}var ENTITY_RE_1=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\\w+);/g;var ENTITY_RE_2=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\\w+);/;function unescapeEntities(s){return s.replace(ENTITY_RE_1,decodeOneEntity)}var ampRe=/&/g;var looseAmpRe=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi;var ltRe=/[<]/g;var gtRe=/>/g;var quotRe=/\\\"/g;function escapeAttrib(s){return(\"\"+s).replace(ampRe,\"&amp;\").replace(ltRe,\"&lt;\").replace(gtRe,\"&gt;\").replace(quotRe,\"&#34;\")}function normalizeRCData(rcdata){return rcdata.replace(looseAmpRe,\"&amp;$1\").replace(ltRe,\"&lt;\").replace(gtRe,\"&gt;\")}var ATTR_RE=new RegExp(\"^\\\\s*\"+\"([-.:\\\\w]+)\"+\"(?:\"+(\"\\\\s*(=)\\\\s*\"+\"(\"+('(\")[^\"]*(\"|$)'+\"|\"+\"(')[^']*('|$)\"+\"|\"+\"(?=[a-z][-\\\\w]*\\\\s*=)\"+\"|\"+\"[^\\\"'\\\\s]*\")+\")\")+\")?\",\"i\");var splitWillCapture=\"a,b\".split(/(,)/).length===3;var EFLAGS_TEXT=html4.eflags[\"CDATA\"]|html4.eflags[\"RCDATA\"];function makeSaxParser(handler){var hcopy={cdata:handler.cdata||handler[\"cdata\"],comment:handler.comment||handler[\"comment\"],endDoc:handler.endDoc||handler[\"endDoc\"],endTag:handler.endTag||handler[\"endTag\"],pcdata:handler.pcdata||handler[\"pcdata\"],rcdata:handler.rcdata||handler[\"rcdata\"],startDoc:handler.startDoc||handler[\"startDoc\"],startTag:handler.startTag||handler[\"startTag\"]};return function(htmlText,param){return parse(htmlText,hcopy,param)}}var continuationMarker={};function parse(htmlText,handler,param){var m,p,tagName;var parts=htmlSplit(htmlText);var state={noMoreGT:false,noMoreEndComments:false};parseCPS(handler,parts,0,state,param)}function continuationMaker(h,parts,initial,state,param){return function(){parseCPS(h,parts,initial,state,param)}}function parseCPS(h,parts,initial,state,param){try{if(h.startDoc&&initial==0){h.startDoc(param)}var m,p,tagName;for(var pos=initial,end=parts.length;pos<end;){var current=parts[pos++];var next=parts[pos];switch(current){case\"&\":if(ENTITY_RE_2.test(next)){if(h.pcdata){h.pcdata(\"&\"+next,param,continuationMarker,continuationMaker(h,parts,pos,state,param))}pos++}else{if(h.pcdata){h.pcdata(\"&amp;\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}break;case\"</\":if(m=/^([-\\w:]+)[^\\'\\\"]*/.exec(next)){if(m[0].length===next.length&&parts[pos+1]===\">\"){pos+=2;tagName=m[1].toLowerCase();if(h.endTag){h.endTag(tagName,param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}else{pos=parseEndTag(parts,pos,h,param,continuationMarker,state)}}else{if(h.pcdata){h.pcdata(\"&lt;/\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}break;case\"<\":if(m=/^([-\\w:]+)\\s*\\/?/.exec(next)){if(m[0].length===next.length&&parts[pos+1]===\">\"){pos+=2;tagName=m[1].toLowerCase();if(h.startTag){h.startTag(tagName,[],param,continuationMarker,continuationMaker(h,parts,pos,state,param))}var eflags=html4.ELEMENTS[tagName];if(eflags&EFLAGS_TEXT){var tag={name:tagName,next:pos,eflags:eflags};pos=parseText(parts,tag,h,param,continuationMarker,state)}}else{pos=parseStartTag(parts,pos,h,param,continuationMarker,state)}}else{if(h.pcdata){h.pcdata(\"&lt;\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}break;case\"\\x3c!--\":if(!state.noMoreEndComments){for(p=pos+1;p<end;p++){if(parts[p]===\">\"&&/--$/.test(parts[p-1])){break}}if(p<end){if(h.comment){var comment=parts.slice(pos,p).join(\"\");h.comment(comment.substr(0,comment.length-2),param,continuationMarker,continuationMaker(h,parts,p+1,state,param))}pos=p+1}else{state.noMoreEndComments=true}}if(state.noMoreEndComments){if(h.pcdata){h.pcdata(\"&lt;!--\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}break;case\"<!\":if(!/^\\w/.test(next)){if(h.pcdata){h.pcdata(\"&lt;!\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}else{if(!state.noMoreGT){for(p=pos+1;p<end;p++){if(parts[p]===\">\"){break}}if(p<end){pos=p+1}else{state.noMoreGT=true}}if(state.noMoreGT){if(h.pcdata){h.pcdata(\"&lt;!\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}}break;case\"<?\":if(!state.noMoreGT){for(p=pos+1;p<end;p++){if(parts[p]===\">\"){break}}if(p<end){pos=p+1}else{state.noMoreGT=true}}if(state.noMoreGT){if(h.pcdata){h.pcdata(\"&lt;?\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}}break;case\">\":if(h.pcdata){h.pcdata(\"&gt;\",param,continuationMarker,continuationMaker(h,parts,pos,state,param))}break;case\"\":break;default:if(h.pcdata){h.pcdata(current,param,continuationMarker,continuationMaker(h,parts,pos,state,param))}break}}if(h.endDoc){h.endDoc(param)}}catch(e){if(e!==continuationMarker){throw e}}}function htmlSplit(str){var re=/(<\\/|<\\!--|<[!?]|[&<>])/g;str+=\"\";if(splitWillCapture){return str.split(re)}else{var parts=[];var lastPos=0;var m;while((m=re.exec(str))!==null){parts.push(str.substring(lastPos,m.index));parts.push(m[0]);lastPos=m.index+m[0].length}parts.push(str.substring(lastPos));return parts}}function parseEndTag(parts,pos,h,param,continuationMarker,state){var tag=parseTagAndAttrs(parts,pos);if(!tag){return parts.length}if(h.endTag){h.endTag(tag.name,param,continuationMarker,continuationMaker(h,parts,pos,state,param))}return tag.next}function parseStartTag(parts,pos,h,param,continuationMarker,state){var tag=parseTagAndAttrs(parts,pos);if(!tag){return parts.length}if(h.startTag){h.startTag(tag.name,tag.attrs,param,continuationMarker,continuationMaker(h,parts,tag.next,state,param))}if(tag.eflags&EFLAGS_TEXT){return parseText(parts,tag,h,param,continuationMarker,state)}else{\nreturn tag.next}}var endTagRe={};function parseText(parts,tag,h,param,continuationMarker,state){var end=parts.length;if(!endTagRe.hasOwnProperty(tag.name)){endTagRe[tag.name]=new RegExp(\"^\"+tag.name+\"(?:[\\\\s\\\\/]|$)\",\"i\")}var re=endTagRe[tag.name];var first=tag.next;var p=tag.next+1;for(;p<end;p++){if(parts[p-1]===\"</\"&&re.test(parts[p])){break}}if(p<end){p-=1}var buf=parts.slice(first,p).join(\"\");if(tag.eflags&html4.eflags[\"CDATA\"]){if(h.cdata){h.cdata(buf,param,continuationMarker,continuationMaker(h,parts,p,state,param))}}else if(tag.eflags&html4.eflags[\"RCDATA\"]){if(h.rcdata){h.rcdata(normalizeRCData(buf),param,continuationMarker,continuationMaker(h,parts,p,state,param))}}else{throw new Error(\"bug\")}return p}function parseTagAndAttrs(parts,pos){var m=/^([-\\w:]+)/.exec(parts[pos]);var tag={};tag.name=m[1].toLowerCase();tag.eflags=html4.ELEMENTS[tag.name];var buf=parts[pos].substr(m[0].length);var p=pos+1;var end=parts.length;for(;p<end;p++){if(parts[p]===\">\"){break}buf+=parts[p]}if(end<=p){return void 0}var attrs=[];while(buf!==\"\"){m=ATTR_RE.exec(buf);if(!m){buf=buf.replace(/^[\\s\\S][^a-z\\s]*/,\"\")}else if(m[4]&&!m[5]||m[6]&&!m[7]){var quote=m[4]||m[6];var sawQuote=false;var abuf=[buf,parts[p++]];for(;p<end;p++){if(sawQuote){if(parts[p]===\">\"){break}}else if(0<=parts[p].indexOf(quote)){sawQuote=true}abuf.push(parts[p])}if(end<=p){break}buf=abuf.join(\"\");continue}else{var aName=m[1].toLowerCase();var aValue=m[2]?decodeValue(m[3]):\"\";attrs.push(aName,aValue);buf=buf.substr(m[0].length)}}tag.attrs=attrs;tag.next=p+1;return tag}function decodeValue(v){var q=v.charCodeAt(0);if(q===34||q===39){v=v.substr(1,v.length-2)}return unescapeEntities(stripNULs(v))}function makeHtmlSanitizer(tagPolicy){var stack;var ignoring;var emit=function(text,out){if(!ignoring){out.push(text)}};return makeSaxParser({startDoc:function(_){stack=[];ignoring=false},startTag:function(tagNameOrig,attribs,out){if(ignoring){return}if(!html4.ELEMENTS.hasOwnProperty(tagNameOrig)){return}var eflagsOrig=html4.ELEMENTS[tagNameOrig];if(eflagsOrig&html4.eflags[\"FOLDABLE\"]){return}var decision=tagPolicy(tagNameOrig,attribs);if(!decision){ignoring=!(eflagsOrig&html4.eflags[\"EMPTY\"]);return}else if(typeof decision!==\"object\"){throw new Error(\"tagPolicy did not return object (old API?)\")}if(\"attribs\"in decision){attribs=decision[\"attribs\"]}else{throw new Error(\"tagPolicy gave no attribs\")}var eflagsRep;var tagNameRep;if(\"tagName\"in decision){tagNameRep=decision[\"tagName\"];eflagsRep=html4.ELEMENTS[tagNameRep]}else{tagNameRep=tagNameOrig;eflagsRep=eflagsOrig}if(eflagsOrig&html4.eflags[\"OPTIONAL_ENDTAG\"]){var onStack=stack[stack.length-1];if(onStack&&onStack.orig===tagNameOrig&&(onStack.rep!==tagNameRep||tagNameOrig!==tagNameRep)){out.push(\"</\",onStack.rep,\">\")}}if(!(eflagsOrig&html4.eflags[\"EMPTY\"])){stack.push({orig:tagNameOrig,rep:tagNameRep})}out.push(\"<\",tagNameRep);for(var i=0,n=attribs.length;i<n;i+=2){var attribName=attribs[i],value=attribs[i+1];if(value!==null&&value!==void 0){out.push(\" \",attribName,'=\"',escapeAttrib(value),'\"')}}out.push(\">\");if(eflagsOrig&html4.eflags[\"EMPTY\"]&&!(eflagsRep&html4.eflags[\"EMPTY\"])){out.push(\"</\",tagNameRep,\">\")}},endTag:function(tagName,out){if(ignoring){ignoring=false;return}if(!html4.ELEMENTS.hasOwnProperty(tagName)){return}var eflags=html4.ELEMENTS[tagName];if(!(eflags&(html4.eflags[\"EMPTY\"]|html4.eflags[\"FOLDABLE\"]))){var index;if(eflags&html4.eflags[\"OPTIONAL_ENDTAG\"]){for(index=stack.length;--index>=0;){var stackElOrigTag=stack[index].orig;if(stackElOrigTag===tagName){break}if(!(html4.ELEMENTS[stackElOrigTag]&html4.eflags[\"OPTIONAL_ENDTAG\"])){return}}}else{for(index=stack.length;--index>=0;){if(stack[index].orig===tagName){break}}}if(index<0){return}for(var i=stack.length;--i>index;){var stackElRepTag=stack[i].rep;if(!(html4.ELEMENTS[stackElRepTag]&html4.eflags[\"OPTIONAL_ENDTAG\"])){out.push(\"</\",stackElRepTag,\">\")}}if(index<stack.length){tagName=stack[index].rep}stack.length=index;out.push(\"</\",tagName,\">\")}},pcdata:emit,rcdata:emit,cdata:emit,endDoc:function(out){for(;stack.length;stack.length--){out.push(\"</\",stack[stack.length-1].rep,\">\")}}})}var ALLOWED_URI_SCHEMES=/^(?:https?|mailto)$/i;function safeUri(uri,effect,ltype,hints,naiveUriRewriter){if(!naiveUriRewriter){return null}try{var parsed=URI.parse(\"\"+uri);if(parsed){if(!parsed.hasScheme()||ALLOWED_URI_SCHEMES.test(parsed.getScheme())){var safe=naiveUriRewriter(parsed,effect,ltype,hints);return safe?safe.toString():null}}}catch(e){return null}return null}function log(logger,tagName,attribName,oldValue,newValue){if(!attribName){logger(tagName+\" removed\",{change:\"removed\",tagName:tagName})}if(oldValue!==newValue){var changed=\"changed\";if(oldValue&&!newValue){changed=\"removed\"}else if(!oldValue&&newValue){changed=\"added\"}logger(tagName+\".\"+attribName+\" \"+changed,{change:changed,tagName:tagName,attribName:attribName,oldValue:oldValue,newValue:newValue})}}function lookupAttribute(map,tagName,attribName){var attribKey;attribKey=tagName+\"::\"+attribName;if(map.hasOwnProperty(attribKey)){return map[attribKey]}attribKey=\"*::\"+attribName;if(map.hasOwnProperty(attribKey)){return map[attribKey]}return void 0}function getAttributeType(tagName,attribName){return lookupAttribute(html4.ATTRIBS,tagName,attribName)}function getLoaderType(tagName,attribName){return lookupAttribute(html4.LOADERTYPES,tagName,attribName)}function getUriEffect(tagName,attribName){return lookupAttribute(html4.URIEFFECTS,tagName,attribName)}function sanitizeAttribs(tagName,attribs,opt_naiveUriRewriter,opt_nmTokenPolicy,opt_logger){for(var i=0;i<attribs.length;i+=2){var attribName=attribs[i];var value=attribs[i+1];var oldValue=value;var atype=null,attribKey;if((attribKey=tagName+\"::\"+attribName,html4.ATTRIBS.hasOwnProperty(attribKey))||(attribKey=\"*::\"+attribName,html4.ATTRIBS.hasOwnProperty(attribKey))){atype=html4.ATTRIBS[attribKey]}if(atype!==null){switch(atype){case html4.atype[\"NONE\"]:break;case html4.atype[\"SCRIPT\"]:value=null;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break;case html4.atype[\"STYLE\"]:if(\"undefined\"===typeof parseCssDeclarations){value=null;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break}var sanitizedDeclarations=[];parseCssDeclarations(value,{declaration:function(property,tokens){var normProp=property.toLowerCase();sanitizeCssProperty(normProp,tokens,opt_naiveUriRewriter?function(url){return safeUri(url,html4.ueffects.SAME_DOCUMENT,html4.ltypes.SANDBOXED,{TYPE:\"CSS\",CSS_PROP:normProp},opt_naiveUriRewriter)}:null);if(tokens.length){sanitizedDeclarations.push(normProp+\": \"+tokens.join(\" \"))}}});value=sanitizedDeclarations.length>0?sanitizedDeclarations.join(\" ; \"):null;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break;case html4.atype[\"ID\"]:case html4.atype[\"IDREF\"]:case html4.atype[\"IDREFS\"]:case html4.atype[\"GLOBAL_NAME\"]:case html4.atype[\"LOCAL_NAME\"]:case html4.atype[\"CLASSES\"]:value=opt_nmTokenPolicy?opt_nmTokenPolicy(value):value;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break;case html4.atype[\"URI\"]:value=safeUri(value,getUriEffect(tagName,attribName),getLoaderType(tagName,attribName),{TYPE:\"MARKUP\",XML_ATTR:attribName,XML_TAG:tagName},opt_naiveUriRewriter);if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break;case html4.atype[\"URI_FRAGMENT\"]:if(value&&\"#\"===value.charAt(0)){value=value.substring(1);value=opt_nmTokenPolicy?opt_nmTokenPolicy(value):value;if(value!==null&&value!==void 0){value=\"#\"+value}}else{value=null}if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break;default:value=null;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}break}}else{value=null;if(opt_logger){log(opt_logger,tagName,attribName,oldValue,value)}}attribs[i+1]=value}return attribs}function makeTagPolicy(opt_naiveUriRewriter,opt_nmTokenPolicy,opt_logger){return function(tagName,attribs){if(!(html4.ELEMENTS[tagName]&html4.eflags[\"UNSAFE\"])){return{attribs:sanitizeAttribs(tagName,attribs,opt_naiveUriRewriter,opt_nmTokenPolicy,opt_logger)}}else{if(opt_logger){log(opt_logger,tagName,undefined,undefined,undefined)}}}}function sanitizeWithPolicy(inputHtml,tagPolicy){var outputArray=[];makeHtmlSanitizer(tagPolicy)(inputHtml,outputArray);return outputArray.join(\"\")}function sanitize(inputHtml,opt_naiveUriRewriter,opt_nmTokenPolicy,opt_logger){var tagPolicy=makeTagPolicy(opt_naiveUriRewriter,opt_nmTokenPolicy,opt_logger);return sanitizeWithPolicy(inputHtml,tagPolicy)}var html={};html.escapeAttrib=html[\"escapeAttrib\"]=escapeAttrib;html.makeHtmlSanitizer=html[\"makeHtmlSanitizer\"]=makeHtmlSanitizer;html.makeSaxParser=html[\"makeSaxParser\"]=makeSaxParser;html.makeTagPolicy=html[\"makeTagPolicy\"]=makeTagPolicy;html.normalizeRCData=html[\"normalizeRCData\"]=normalizeRCData;html.sanitize=html[\"sanitize\"]=sanitize;html.sanitizeAttribs=html[\"sanitizeAttribs\"]=sanitizeAttribs;html.sanitizeWithPolicy=html[\"sanitizeWithPolicy\"]=sanitizeWithPolicy;html.unescapeEntities=html[\"unescapeEntities\"]=unescapeEntities;return html}(html4);var html_sanitize=html[\"sanitize\"];if(typeof window!==\"undefined\"){window[\"html\"]=html;window[\"html_sanitize\"]=html_sanitize};\ndefine(\"components/google-caja/html-css-sanitizer-minified\", function(){});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/security',[\n    'jquery',\n    'components/google-caja/html-css-sanitizer-minified',\n], function($, sanitize) {\n    \"use strict\";\n    \n    var noop = function (x) { return x; };\n    \n    var caja;\n    if (window && window.html) {\n        caja = window.html;\n        caja.html4 = window.html4;\n        caja.sanitizeStylesheet = window.sanitizeStylesheet;\n    }\n    \n    var sanitizeAttribs = function (tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy, opt_logger) {\n        /**\n         * add trusting data-attributes to the default sanitizeAttribs from caja\n         * this function is mostly copied from the caja source\n         */\n        var ATTRIBS = caja.html4.ATTRIBS;\n        for (var i = 0; i < attribs.length; i += 2) {\n            var attribName = attribs[i];\n            if (attribName.substr(0,5) == 'data-') {\n                var attribKey = '*::' + attribName;\n                if (!ATTRIBS.hasOwnProperty(attribKey)) {\n                    ATTRIBS[attribKey] = 0;\n                }\n            }\n        }\n        // Caja doesn't allow data uri for img::src, see\n        // https://github.com/google/caja/issues/1558\n        // This is not a security issue for browser post ie6 though, so we\n        // disable the check\n        // https://www.owasp.org/index.php/Script_in_IMG_tags\n        ATTRIBS['img::src'] = 0;\n        return caja.sanitizeAttribs(tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy, opt_logger);\n    };\n    \n    var sanitize_css = function (css, tagPolicy) {\n        /**\n         * sanitize CSS\n         * like sanitize_html, but for CSS\n         * called by sanitize_stylesheets\n         */\n        return caja.sanitizeStylesheet(\n            window.location.pathname,\n            css,\n            {\n                containerClass: null,\n                idSuffix: '',\n                tagPolicy: tagPolicy,\n                virtualizeAttrName: noop\n            },\n            noop\n        );\n    };\n    \n    var sanitize_stylesheets = function (html, tagPolicy) {\n        /**\n         * sanitize just the css in style tags in a block of html\n         * called by sanitize_html, if allow_css is true\n         */\n        var h = $(\"<div/>\").append(html);\n        var style_tags = h.find(\"style\");\n        if (!style_tags.length) {\n            // no style tags to sanitize\n            return html;\n        }\n        style_tags.each(function(i, style) {\n            style.innerHTML = sanitize_css(style.innerHTML, tagPolicy);\n        });\n        return h.html();\n    };\n    \n    var sanitize_html = function (html, allow_css) {\n        /**\n         * sanitize HTML\n         * if allow_css is true (default: false), CSS is sanitized as well.\n         * otherwise, CSS elements and attributes are simply removed.\n         */\n        var html4 = caja.html4;\n\n        if (allow_css) {\n            // allow sanitization of style tags,\n            // not just scrubbing\n            html4.ELEMENTS.style &= ~html4.eflags.UNSAFE;\n            html4.ATTRIBS.style = html4.atype.STYLE;\n        } else {\n            // scrub all CSS\n            html4.ELEMENTS.style |= html4.eflags.UNSAFE;\n            html4.ATTRIBS.style = html4.atype.SCRIPT;\n        }\n        \n        var record_messages = function (msg, opts) {\n            console.log(\"HTML Sanitizer\", msg, opts);\n        };\n        \n        var policy = function (tagName, attribs) {\n            if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) {\n                return {\n                    'attribs': sanitizeAttribs(tagName, attribs,\n                        noop, noop, record_messages)\n                    };\n            } else {\n                record_messages(tagName + \" removed\", {\n                  change: \"removed\",\n                  tagName: tagName\n                });\n            }\n        };\n        \n        var sanitized = caja.sanitizeWithPolicy(html, policy);\n        \n        if (allow_css) {\n            // sanitize style tags as stylesheets\n            sanitized = sanitize_stylesheets(sanitized, policy);\n        }\n        \n        return sanitized;\n    };\n    \n    var security = {\n        caja: caja,\n        sanitize_html: sanitize_html\n    };\n\n    return security;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/mathjaxutils',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog',\n], function($, utils, dialog) {\n    \"use strict\";\n\n    var init = function () {\n        if (window.MathJax) {\n            // MathJax loaded\n            MathJax.Hub.Config({\n                tex2jax: {\n                    inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n                    displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ],\n                    processEscapes: true,\n                    processEnvironments: true\n                },\n                MathML: {\n                    extensions: ['content-mathml.js']\n                },\n                // Center justify equations in code and markdown cells. Elsewhere\n                // we use CSS to left justify single line equations in code cells.\n                displayAlign: 'center',\n                \"HTML-CSS\": {\n                    availableFonts: [],\n                    imageFont: null,\n                    preferredFont: null,\n                    webFont: \"STIX-Web\",\n                    styles: {'.MathJax_Display': {\"margin\": 0}},\n                    linebreaks: { automatic: true }\n                },\n            });\n            MathJax.Hub.Configured();\n        } else if (window.mathjax_url !== \"\") {\n            // This statement is used simply so that message extraction\n            // will pick up the strings.  The actual setting of the text\n            // for the button is in dialog.js.\n            var button_labels = [ i18n.msg._(\"OK\") ];\n            // Don't have MathJax, but should. Show dialog.\n            dialog.modal({\n                title : i18n.msg.sprintf(i18n.msg._(\"Failed to retrieve MathJax from '%s'\",window.mathjax_url)),\n                body : $(\"<p/>\").addClass('dialog').text(\n                        i18n.msg._(\"Math/LaTeX rendering will be disabled.\")\n                    ),\n                buttons : {\n                    OK : {class: \"btn-danger\"}\n                }\n            });\n        }\n    };\n\n    // Some magic for deferring mathematical expressions to MathJax\n    // by hiding them from the Markdown parser.\n    // Some of the code here is adapted with permission from Davide Cervone\n    // under the terms of the Apache2 license governing the MathJax project.\n    // Other minor modifications are also due to StackExchange and are used with\n    // permission.\n\n    // MATHSPLIT contains the pattern for math delimiters and special symbols\n    // needed for searching for math in the text input.\n    var MATHSPLIT = /(\\$\\$?|\\\\(?:begin|end)\\{[a-z]*\\*?\\}|\\\\[{}$]|[{}]|(?:\\n\\s*)+|@@\\d+@@|\\\\\\\\(?:\\(|\\)|\\[|\\]))/i;\n\n    //  The math is in blocks i through j, so\n    //    collect it into one block and clear the others.\n    //  Replace &, <, and > by named entities.\n    //  For IE, put <br> at the ends of comments since IE removes \\n.\n    //  Clear the current math positions and store the index of the\n    //    math, then push the math string onto the storage array.\n    //  The preProcess function is called on all blocks if it has been passed in\n    var process_math = function (i, j, pre_process, math, blocks) {\n        var block = blocks.slice(i, j + 1).join(\"\").replace(/&/g, \"&amp;\") // use HTML entity for &\n        .replace(/</g, \"&lt;\") // use HTML entity for <\n        .replace(/>/g, \"&gt;\") // use HTML entity for >\n        ;\n        if (utils.browser === 'msie') {\n            block = block.replace(/(%[^\\n]*)\\n/g, \"$1<br/>\\n\");\n        }\n        while (j > i) {\n            blocks[j] = \"\";\n            j--;\n        }\n        blocks[i] = \"@@\" + math.length + \"@@\"; // replace the current block text with a unique tag to find later\n        if (pre_process){\n            block = pre_process(block);\n        }\n        math.push(block);\n        return blocks;\n    };\n\n    //  Break up the text into its component parts and search\n    //    through them for math delimiters, braces, linebreaks, etc.\n    //  Math delimiters must match and braces must balance.\n    //  Don't allow math to pass through a double linebreak\n    //    (which will be a paragraph).\n    //\n    var remove_math = function (text) {\n        var math = []; // stores math strings for later\n        var start;\n        var end;\n        var last;\n        var braces;\n\n        // Except for extreme edge cases, this should catch precisely those pieces of the markdown\n        // source that will later be turned into code spans. While MathJax will not TeXify code spans,\n        // we still have to consider them at this point; the following issue has happened several times:\n        //\n        //     `$foo` and `$bar` are varibales.  -->  <code>$foo ` and `$bar</code> are variables.\n\n        var hasCodeSpans = /`/.test(text),\n            de_tilde;\n        if (hasCodeSpans) {\n            text = text.replace(/~/g, \"~T\").replace(/(^|[^\\\\])(`+)([^\\n]*?[^`\\n])\\2(?!`)/gm, function (wholematch) {\n                return wholematch.replace(/\\$/g, \"~D\");\n            });\n            de_tilde = function (text) {\n                return text.replace(/~([TD])/g, function (wholematch, character) {\n                                                    return { T: \"~\", D: \"$\" }[character];\n                                                });\n            };\n        } else {\n            de_tilde = function (text) { return text; };\n        }\n\n        var blocks = utils.regex_split(text.replace(/\\r\\n?/g, \"\\n\"),MATHSPLIT);\n\n        for (var i = 1, m = blocks.length; i < m; i += 2) {\n            var block = blocks[i];\n            if (block.charAt(0) === \"@\") {\n                //\n                //  Things that look like our math markers will get\n                //  stored and then retrieved along with the math.\n                //\n                blocks[i] = \"@@\" + math.length + \"@@\";\n                math.push(block);\n            }\n            else if (start) {\n                //\n                //  If we are in math, look for the end delimiter,\n                //    but don't go past double line breaks, and\n                //    and balance braces within the math.\n                //\n                if (block === end) {\n                    if (braces) {\n                        last = i;\n                    }\n                    else {\n                        blocks = process_math(start, i, de_tilde, math, blocks);\n                        start  = null;\n                        end    = null;\n                        last   = null;\n                    }\n                }\n                else if (block.match(/\\n.*\\n/)) {\n                    if (last) {\n                        i = last;\n                        blocks = process_math(start, i, de_tilde, math, blocks);\n                    }\n                    start = null;\n                    end = null;\n                    last = null;\n                    braces = 0;\n                }\n                else if (block === \"{\") {\n                    braces++;\n                }\n                else if (block === \"}\" && braces) {\n                    braces--;\n                }\n            }\n            else {\n                //\n                //  Look for math start delimiters and when\n                //    found, set up the end delimiter.\n                //\n                if (block === \"$\" || block === \"$$\") {\n                    start = i;\n                    end = block;\n                    braces = 0;\n                }\n                else if (block === \"\\\\\\\\\\(\" || block === \"\\\\\\\\\\[\") {\n                    start = i;\n                    end = block.slice(-1) === \"(\" ? \"\\\\\\\\\\)\" : \"\\\\\\\\\\]\";\n                    braces = 0;\n                }\n                else if (block.substr(1, 5) === \"begin\") {\n                    start = i;\n                    end = \"\\\\end\" + block.substr(6);\n                    braces = 0;\n                }\n            }\n        }\n        if (last) {\n            blocks = process_math(start, last, de_tilde, math, blocks);\n            start  = null;\n            end    = null;\n            last   = null;\n        }\n        return [de_tilde(blocks.join(\"\")), math];\n    };\n\n    //\n    //  Put back the math strings that were saved,\n    //    and clear the math array (no need to keep it around).\n    //\n    var replace_math = function (text, math) {\n        //\n        //  Replaces a math placeholder with its corresponding group.\n        //  The math delimiters \"\\\\(\", \"\\\\[\", \"\\\\)\" and \"\\\\]\" are replaced\n        //  removing one backslash in order to be interpreted correctly by MathJax.\n        //\n        var math_group_process = function (match, n) {\n            var math_group = math[n];\n\n            if (math_group.substr(0, 3) === \"\\\\\\\\\\(\"  && math_group.substr(math_group.length - 3) === \"\\\\\\\\\\)\") {\n                math_group = \"\\\\\\(\" + math_group.substring(3, math_group.length - 3) + \"\\\\\\)\";\n            } else if (math_group.substr(0, 3) === \"\\\\\\\\\\[\" && math_group.substr(math_group.length - 3) === \"\\\\\\\\\\]\") {\n                math_group = \"\\\\\\[\" + math_group.substring(3, math_group.length - 3) + \"\\\\\\]\";\n            }\n            \n            return math_group;\n        };\n\n        // Replace all the math group placeholders in the text\n        // with the saved strings.\n        text = text.replace(/@@(\\d+)@@/g, math_group_process);\n        \n        return text;\n    };\n\n    var mathjaxutils = {\n        init : init,\n        remove_math : remove_math,\n        replace_math : replace_math\n    };\n\n    return mathjaxutils;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Give us an object to bind all events to. This object should be created\n// before all other objects so it exists when others register event handlers.\n// To register an event handler:\n//\n// require(['base/js/events'], function (events) {\n//     events.on(\"event.Namespace\", function () { do_stuff(); });\n// });\n\ndefine('base/js/events',['jquery', 'base/js/namespace'], function($, Jupyter) {\n    \"use strict\";\n    \n    // Events singleton\n    if (!window._Events) {\n        window._Events = function () {};\n        window._events = new window._Events();\n    }\n    \n    // Backwards compatability.\n    Jupyter.Events = window._Events;\n    Jupyter.events = window._events;\n    \n    var events = $([window._events]);\n\n    // catch and log errors in triggered events\n    events._original_trigger = events.trigger;\n    events.trigger = function (name, data) {\n        try {\n            this._original_trigger.apply(this, arguments);\n        } catch (e) {\n            console.error(\"Exception in event handler for \" + name, e, arguments);\n        }\n    }\n    return events;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbar',[\n    'jquery',\n    'base/js/namespace',\n    'base/js/events',\n    'base/js/i18n'\n], function($, IPython, events, i18n) {\n    \"use strict\";\n\n    var CellToolbar = function (options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance \n         *          cell: Cell instance\n         *          notebook: Notebook instance \n         *\n         *  TODO: This leaks, when cell are deleted\n         *  There is still a reference to each celltoolbars.\n         */\n        CellToolbar._instances.push(this);\n        this.notebook = options.notebook;\n        this.cell = options.cell;\n        this.create_element();\n        this.rebuild();\n        return this;\n    };\n\n\n    CellToolbar.prototype.create_element = function () {\n        this.inner_element = $('<div/>').addClass('celltoolbar');\n        this.element = $('<div/>').addClass('ctb_hideshow')\n            .append(this.inner_element);\n    };\n\n\n    // The default css style for the outer celltoolbar div\n    // (ctb_hideshow) is display: none.\n    // To show the cell toolbar, *both* of the following conditions must be met:\n    // - A parent container has class `ctb_global_show`\n    // - The celltoolbar has the class `ctb_show`\n    // This allows global show/hide, as well as per-cell show/hide.\n\n    CellToolbar.global_hide = function () {\n        $('body').removeClass('ctb_global_show');\n    };\n\n\n    CellToolbar.global_show = function () {\n        $('body').addClass('ctb_global_show');\n    };\n\n\n    CellToolbar.prototype.hide = function () {\n        this.element.removeClass('ctb_show');\n    };\n\n\n    CellToolbar.prototype.show = function () {\n        this.element.addClass('ctb_show');\n    };\n\n\n    /**\n     * Class variable that should contain a dict of all available callback\n     * we need to think of wether or not we allow nested namespace\n     * @property _callback_dict\n     * @private\n     * @static\n     * @type Dict\n     */\n    CellToolbar._callback_dict = {};\n\n\n    /**\n     * Class variable that should contain the reverse order list of the button\n     * to add to the toolbar of each cell\n     * @property _ui_controls_list\n     * @private\n     * @static\n     * @type List\n     */\n    CellToolbar._ui_controls_list = [];\n\n\n    /**\n     * Class variable that should contain the CellToolbar instances for each\n     * cell of the notebook\n     *\n     * @private\n     * @property _instances\n     * @static\n     * @type List\n     */\n    CellToolbar._instances = [];\n\n\n    /**\n     * keep a list of all the available presets for the toolbar\n     * @private\n     * @property _presets\n     * @static\n     * @type Dict\n     */\n    CellToolbar._presets = {};\n\n\n    // this is by design not a prototype.\n    /**\n     * Register a callback to create an UI element in a cell toolbar.\n     * @method register_callback\n     * @param name {String} name to use to refer to the callback. It is advised to use a prefix with the name\n     * for easier sorting and avoid collision\n     * @param callback {function(div, cell)} callback that will be called to generate the ui element\n     * @param [cell_types] {List_of_String|undefined} optional list of cell types. If present the UI element\n     * will be added only to cells of types in the list.\n     *\n     *\n     * The callback will receive the following element :\n     *\n     *    * a div in which to add element.\n     *    * the cell it is responsible from\n     *\n     * @example\n     *\n     * Example that create callback for a button that toggle between `true` and `false` label,\n     * with the metadata under the key 'foo' to reflect the status of the button.\n     *\n     *      // first param reference to a DOM div\n     *      // second param reference to the cell.\n     *      var toggle =  function(div, cell) {\n     *          var button_container = $(div)\n     *\n     *          // let's create a button that show the  current value of the metadata\n     *          var button = $('<div/>').button({label:String(cell.metadata.foo)});\n     *\n     *          // On click, change the metadata value and update the button label\n     *          button.click(function(){\n     *                      var v = cell.metadata.foo;\n     *                      cell.metadata.foo = !v;\n     *                      button.button(\"option\", \"label\", String(!v));\n     *                  })\n     *\n     *          // add the button to the DOM div.\n     *          button_container.append(button);\n     *      }\n     *\n     *      // now we register the callback under the name `foo` to give the\n     *      // user the ability to use it later\n     *      CellToolbar.register_callback('foo', toggle);\n     */\n    CellToolbar.register_callback = function(name, callback, cell_types) {\n        // Overwrite if it already exists.\n        CellToolbar._callback_dict[name] = cell_types ? {callback: callback, cell_types: cell_types} : callback;\n    };\n\n\n    /**\n     * Register a preset of UI element in a cell toolbar.\n     * Not supported Yet.\n     * @method register_preset\n     * @param name {String} name to use to refer to the preset. It is advised to use a prefix with the name\n     * for easier sorting and avoid collision\n     * @param  preset_list {List_of_String} reverse order of the button in the toolbar. Each String of the list\n     *          should correspond to a name of a registerd callback.\n     *\n     * @private\n     * @example\n     *\n     *      CellToolbar.register_callback('foo.c1', function(div, cell){...});\n     *      CellToolbar.register_callback('foo.c2', function(div, cell){...});\n     *      CellToolbar.register_callback('foo.c3', function(div, cell){...});\n     *      CellToolbar.register_callback('foo.c4', function(div, cell){...});\n     *      CellToolbar.register_callback('foo.c5', function(div, cell){...});\n     *\n     *      CellToolbar.register_preset('foo.foo_preset1', ['foo.c1', 'foo.c2', 'foo.c5'])\n     *      CellToolbar.register_preset('foo.foo_preset2', ['foo.c4', 'foo.c5'])\n     */\n    CellToolbar.register_preset = function(name, preset_list, notebook) {\n        CellToolbar._presets[name] = preset_list;\n        events.trigger('preset_added.CellToolbar', {name: name});\n        // When \"register_callback\" is called by a custom extension, it may be executed after notebook is loaded.\n        // In that case, activate the preset if needed.\n        if (notebook && notebook.metadata && notebook.metadata.celltoolbar === name){\n            CellToolbar.activate_preset(name);\n        }\n    };\n\n    /**\n     * unregister the selected preset, \n     *\n     * return true if preset successfully unregistered\n     * false otherwise\n     *\n     **/\n    CellToolbar.unregister_preset = function(name){\n        if(CellToolbar._presets[name]){\n            delete CellToolbar._presets[name];\n            events.trigger('unregistered_preset.CellToolbar', {name: name});\n            return true\n        }\n        return false\n    }\n\n\n    /**\n     * List the names of the presets that are currently registered.\n     *\n     * @method list_presets\n     * @static\n     */\n    CellToolbar.list_presets = function() {\n        var keys = [];\n        for (var k in CellToolbar._presets) {\n            keys.push(k);\n        }\n        return keys;\n    };\n\n\n    /**\n     * Activate an UI preset from `register_preset`\n     *\n     * This does not update the selection UI.\n     *\n     * @method activate_preset\n     * @param preset_name {String} string corresponding to the preset name\n     *\n     * @static\n     * @private\n     * @example\n     *\n     *      CellToolbar.activate_preset('foo.foo_preset1');\n     */\n    CellToolbar.activate_preset = function(preset_name){\n        var preset = CellToolbar._presets[preset_name];\n\n        if(preset !== undefined){\n            CellToolbar._ui_controls_list = preset;\n            CellToolbar.rebuild_all();\n        }\n\n        events.trigger('preset_activated.CellToolbar', {name: preset_name});\n    };\n\n\n    /**\n     * This should be called on the class and not on a instance as it will trigger\n     * rebuild of all the instances.\n     * @method rebuild_all\n     * @static\n     *\n     */\n    CellToolbar.rebuild_all = function(){\n        for(var i=0; i < CellToolbar._instances.length; i++){\n            CellToolbar._instances[i].rebuild();\n        }\n    };\n\n    /**\n     * Rebuild all the button on the toolbar to update its state.\n     * @method rebuild\n     */\n    CellToolbar.prototype.rebuild = function(){\n        /**\n         * strip evrything from the div\n         * which is probably inner_element\n         * or this.element.\n         */\n        this.inner_element.empty();\n        this.ui_controls_list = [];\n\n        var callbacks = CellToolbar._callback_dict;\n        var preset = CellToolbar._ui_controls_list;\n        // Yes we iterate on the class variable, not the instance one.\n        for (var i=0; i < preset.length; i++) {\n            var key = preset[i];\n            var callback = callbacks[key];\n            if (!callback) continue;\n\n            if (typeof callback === 'object') {\n                if (callback.cell_types.indexOf(this.cell.cell_type) === -1) continue;\n                callback = callback.callback;\n            }\n            \n            var local_div = $('<div/>').addClass('button_container');\n            try {\n                callback(local_div, this.cell, this);\n                this.ui_controls_list.push(key);\n            } catch (e) {\n                console.log(i18n.msg.sprintf(i18n.msg._(\"Error in cell toolbar callback %s\"), key), e);\n                continue;\n            }\n            // only append if callback succeeded.\n            this.inner_element.append(local_div);\n        }\n\n        // If there are no controls or the cell is a rendered TextCell hide the toolbar.\n        if (!this.ui_controls_list.length) {\n            this.hide();\n        } else {\n            this.show();\n        }\n    };\n\n\n    CellToolbar.utils = {};\n\n\n    /**\n     * A utility function to generate bindings between a checkbox and cell/metadata\n     * @method utils.checkbox_ui_generator\n     * @static\n     *\n     * @param name {string} Label in front of the checkbox\n     * @param setter {function( cell, newValue )}\n     *        A setter method to set the newValue\n     * @param getter {function( cell )}\n     *        A getter methods which return the current value.\n     *\n     * @return callback {function( div, cell )} Callback to be passed to `register_callback`\n     *\n     * @example\n     *\n     * An exmple that bind the subkey `slideshow.isSectionStart` to a checkbox with a `New Slide` label\n     *\n     *     var newSlide = CellToolbar.utils.checkbox_ui_generator('New Slide',\n     *          // setter\n     *          function(cell, value){\n     *              // we check that the slideshow namespace exist and create it if needed\n     *              if (cell.metadata.slideshow == undefined){cell.metadata.slideshow = {}}\n     *              // set the value\n     *              cell.metadata.slideshow.isSectionStart = value\n     *              },\n     *          //geter\n     *          function(cell){ var ns = cell.metadata.slideshow;\n     *              // if the slideshow namespace does not exist return `undefined`\n     *              // (will be interpreted as `false` by checkbox) otherwise\n     *              // return the value\n     *              return (ns == undefined)? undefined: ns.isSectionStart\n     *              }\n     *      );\n     *\n     *      CellToolbar.register_callback('newSlide', newSlide);\n     *\n     */\n    CellToolbar.utils.checkbox_ui_generator = function(name, setter, getter){\n        return function(div, cell, celltoolbar) {\n            var button_container = $(div);\n\n            var chkb = $('<input/>').attr('type', 'checkbox');\n            var lbl = $('<label/>').append($('<span/>').text(name));\n            chkb.attr(\"checked\", getter(cell));\n\n            chkb.click(function(){\n                        var v = getter(cell);\n                        setter(cell, !v);\n                        chkb.attr(\"checked\", !v);\n            });\n            button_container.append($('<span/>').append(lbl).append(chkb));\n        };\n    };\n\n\n    /**\n     * A utility function to generate bindings between a input field and cell/metadata\n     * @method utils.input_ui_generator\n     * @static\n     *\n     * @param name {string} Label in front of the input field\n     * @param setter {function( cell, newValue )}\n     *        A setter method to set the newValue\n     * @param getter {function( cell )}\n     *        A getter methods which return the current value.\n     *\n     * @return callback {function( div, cell )} Callback to be passed to `register_callback`\n     *\n     */\n    CellToolbar.utils.input_ui_generator = function(name, setter, getter){\n        return function(div, cell, celltoolbar) {\n            var button_container = $(div);\n\n            var text = $('<input/>').attr('type', 'text');\n            var lbl = $('<label/>').append($('<span/>').text(name));\n            text.attr(\"value\", getter(cell));\n\n            text.keyup(function(){\n                setter(cell, text.val());\n            });\n            button_container.append($('<span/>').append(lbl).append(text));\n            IPython.keyboard_manager.register_events(text);\n        };\n    };\n\n    /**\n     * A utility function to generate bindings between a dropdown list cell\n     * @method utils.select_ui_generator\n     * @static\n     *\n     * @param list_list {list_of_sublist} List of sublist of metadata value and name in the dropdown list.\n     *        subslit shoud contain 2 element each, first a string that woul be displayed in the dropdown list,\n     *        and second the corresponding value to  be passed to setter/return by getter. the corresponding value \n     *        should not be \"undefined\" or behavior can be unexpected.\n     * @param setter {function( cell, newValue )}\n     *        A setter method to set the newValue\n     * @param getter {function( cell )}\n     *        A getter methods which return the current value of the metadata.\n     * @param [label=\"\"] {String} optionnal label for the dropdown menu\n     *\n     * @return callback {function( div, cell )} Callback to be passed to `register_callback`\n     *\n     * @example\n     *\n     *      var select_type = CellToolbar.utils.select_ui_generator([\n     *              [\"<None>\"       , \"None\"      ],\n     *              [\"Header Slide\" , \"header_slide\" ],\n     *              [\"Slide\"        , \"slide\"        ],\n     *              [\"Fragment\"     , \"fragment\"     ],\n     *              [\"Skip\"         , \"skip\"         ],\n     *              ],\n     *              // setter\n     *              function(cell, value){\n     *                  // we check that the slideshow namespace exist and create it if needed\n     *                  if (cell.metadata.slideshow == undefined){cell.metadata.slideshow = {}}\n     *                  // set the value\n     *                  cell.metadata.slideshow.slide_type = value\n     *                  },\n     *              //geter\n     *              function(cell){ var ns = cell.metadata.slideshow;\n     *                  // if the slideshow namespace does not exist return `undefined`\n     *                  // (will be interpreted as `false` by checkbox) otherwise\n     *                  // return the value\n     *                  return (ns == undefined)? undefined: ns.slide_type\n     *                  }\n     *      CellToolbar.register_callback('slideshow.select', select_type);\n     *\n     */\n    CellToolbar.utils.select_ui_generator = function(list_list, setter, getter, label) {\n        label = label || \"\";\n        return function(div, cell, celltoolbar) {\n            var button_container = $(div);\n            var lbl = $(\"<label/>\").append($('<span/>').text(label));\n            var select = $('<select/>');\n            for(var i=0; i < list_list.length; i++){\n                var opt = $('<option/>')\n                    .attr('value', list_list[i][1])\n                    .text(list_list[i][0]);\n                select.append(opt);\n            }\n            select.val(getter(cell));\n            select.change(function(){\n                        setter(cell, select.val());\n                    });\n            button_container.append($('<span/>').append(lbl).append(select));\n        };\n    };\n\n    // Backwards compatability.\n    IPython.CellToolbar = CellToolbar;\n\n    return {'CellToolbar': CellToolbar};\n});\n\n",
    "/**\n * marked - a markdown parser\n * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/chjj/marked\n */\n\n;(function() {\n\n/**\n * Block-Level Grammar\n */\n\nvar block = {\n  newline: /^\\n+/,\n  code: /^( {4}[^\\n]+\\n*)+/,\n  fences: noop,\n  hr: /^( *[-*_]){3,} *(?:\\n+|$)/,\n  heading: /^ *(#{1,6}) *([^\\n]+?) *#* *(?:\\n+|$)/,\n  nptable: noop,\n  lheading: /^([^\\n]+)\\n *(=|-){2,} *(?:\\n+|$)/,\n  blockquote: /^( *>[^\\n]+(\\n(?!def)[^\\n]+)*\\n*)+/,\n  list: /^( *)(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n  html: /^ *(?:comment *(?:\\n|\\s*$)|closed *(?:\\n{2,}|\\s*$)|closing *(?:\\n{2,}|\\s*$))/,\n  def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +[\"(]([^\\n]+)[\")])? *(?:\\n+|$)/,\n  table: noop,\n  paragraph: /^((?:[^\\n]+\\n?(?!hr|heading|lheading|blockquote|tag|def))+)\\n*/,\n  text: /^[^\\n]+/\n};\n\nblock.bullet = /(?:[*+-]|\\d+\\.)/;\nblock.item = /^( *)(bull) [^\\n]*(?:\\n(?!\\1bull )[^\\n]*)*/;\nblock.item = replace(block.item, 'gm')\n  (/bull/g, block.bullet)\n  ();\n\nblock.list = replace(block.list)\n  (/bull/g, block.bullet)\n  ('hr', '\\\\n+(?=\\\\1?(?:[-*_] *){3,}(?:\\\\n+|$))')\n  ('def', '\\\\n+(?=' + block.def.source + ')')\n  ();\n\nblock.blockquote = replace(block.blockquote)\n  ('def', block.def)\n  ();\n\nblock._tag = '(?!(?:'\n  + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'\n  + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'\n  + '|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:/|[^\\\\w\\\\s@]*@)\\\\b';\n\nblock.html = replace(block.html)\n  ('comment', /<!--[\\s\\S]*?-->/)\n  ('closed', /<(tag)[\\s\\S]+?<\\/\\1>/)\n  ('closing', /<tag(?:\"[^\"]*\"|'[^']*'|[^'\">])*?>/)\n  (/tag/g, block._tag)\n  ();\n\nblock.paragraph = replace(block.paragraph)\n  ('hr', block.hr)\n  ('heading', block.heading)\n  ('lheading', block.lheading)\n  ('blockquote', block.blockquote)\n  ('tag', '<' + block._tag)\n  ('def', block.def)\n  ();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n  fences: /^ *(`{3,}|~{3,})[ \\.]*(\\S+)? *\\n([\\s\\S]*?)\\s*\\1 *(?:\\n+|$)/,\n  paragraph: /^/,\n  heading: /^ *(#{1,6}) +([^\\n]+?) *#* *(?:\\n+|$)/\n});\n\nblock.gfm.paragraph = replace(block.paragraph)\n  ('(?!', '(?!'\n    + block.gfm.fences.source.replace('\\\\1', '\\\\2') + '|'\n    + block.list.source.replace('\\\\1', '\\\\3') + '|')\n  ();\n\n/**\n * GFM + Tables Block Grammar\n */\n\nblock.tables = merge({}, block.gfm, {\n  nptable: /^ *(\\S.*\\|.*)\\n *([-:]+ *\\|[-| :]*)\\n((?:.*\\|.*(?:\\n|$))*)\\n*/,\n  table: /^ *\\|(.+)\\n *\\|( *[-:]+[-| :]*)\\n((?: *\\|.*(?:\\n|$))*)\\n*/\n});\n\n/**\n * Block Lexer\n */\n\nfunction Lexer(options) {\n  this.tokens = [];\n  this.tokens.links = {};\n  this.options = options || marked.defaults;\n  this.rules = block.normal;\n\n  if (this.options.gfm) {\n    if (this.options.tables) {\n      this.rules = block.tables;\n    } else {\n      this.rules = block.gfm;\n    }\n  }\n}\n\n/**\n * Expose Block Rules\n */\n\nLexer.rules = block;\n\n/**\n * Static Lex Method\n */\n\nLexer.lex = function(src, options) {\n  var lexer = new Lexer(options);\n  return lexer.lex(src);\n};\n\n/**\n * Preprocessing\n */\n\nLexer.prototype.lex = function(src) {\n  src = src\n    .replace(/\\r\\n|\\r/g, '\\n')\n    .replace(/\\t/g, '    ')\n    .replace(/\\u00a0/g, ' ')\n    .replace(/\\u2424/g, '\\n');\n\n  return this.token(src, true);\n};\n\n/**\n * Lexing\n */\n\nLexer.prototype.token = function(src, top, bq) {\n  var src = src.replace(/^ +$/gm, '')\n    , next\n    , loose\n    , cap\n    , bull\n    , b\n    , item\n    , space\n    , i\n    , l;\n\n  while (src) {\n    // newline\n    if (cap = this.rules.newline.exec(src)) {\n      src = src.substring(cap[0].length);\n      if (cap[0].length > 1) {\n        this.tokens.push({\n          type: 'space'\n        });\n      }\n    }\n\n    // code\n    if (cap = this.rules.code.exec(src)) {\n      src = src.substring(cap[0].length);\n      cap = cap[0].replace(/^ {4}/gm, '');\n      this.tokens.push({\n        type: 'code',\n        text: !this.options.pedantic\n          ? cap.replace(/\\n+$/, '')\n          : cap\n      });\n      continue;\n    }\n\n    // fences (gfm)\n    if (cap = this.rules.fences.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'code',\n        lang: cap[2],\n        text: cap[3] || ''\n      });\n      continue;\n    }\n\n    // heading\n    if (cap = this.rules.heading.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'heading',\n        depth: cap[1].length,\n        text: cap[2]\n      });\n      continue;\n    }\n\n    // table no leading pipe (gfm)\n    if (top && (cap = this.rules.nptable.exec(src))) {\n      src = src.substring(cap[0].length);\n\n      item = {\n        type: 'table',\n        header: cap[1].replace(/^ *| *\\| *$/g, '').split(/ *\\| */),\n        align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n        cells: cap[3].replace(/\\n$/, '').split('\\n')\n      };\n\n      for (i = 0; i < item.align.length; i++) {\n        if (/^ *-+: *$/.test(item.align[i])) {\n          item.align[i] = 'right';\n        } else if (/^ *:-+: *$/.test(item.align[i])) {\n          item.align[i] = 'center';\n        } else if (/^ *:-+ *$/.test(item.align[i])) {\n          item.align[i] = 'left';\n        } else {\n          item.align[i] = null;\n        }\n      }\n\n      for (i = 0; i < item.cells.length; i++) {\n        item.cells[i] = item.cells[i].split(/ *\\| */);\n      }\n\n      this.tokens.push(item);\n\n      continue;\n    }\n\n    // lheading\n    if (cap = this.rules.lheading.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'heading',\n        depth: cap[2] === '=' ? 1 : 2,\n        text: cap[1]\n      });\n      continue;\n    }\n\n    // hr\n    if (cap = this.rules.hr.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'hr'\n      });\n      continue;\n    }\n\n    // blockquote\n    if (cap = this.rules.blockquote.exec(src)) {\n      src = src.substring(cap[0].length);\n\n      this.tokens.push({\n        type: 'blockquote_start'\n      });\n\n      cap = cap[0].replace(/^ *> ?/gm, '');\n\n      // Pass `top` to keep the current\n      // \"toplevel\" state. This is exactly\n      // how markdown.pl works.\n      this.token(cap, top, true);\n\n      this.tokens.push({\n        type: 'blockquote_end'\n      });\n\n      continue;\n    }\n\n    // list\n    if (cap = this.rules.list.exec(src)) {\n      src = src.substring(cap[0].length);\n      bull = cap[2];\n\n      this.tokens.push({\n        type: 'list_start',\n        ordered: bull.length > 1\n      });\n\n      // Get each top-level item.\n      cap = cap[0].match(this.rules.item);\n\n      next = false;\n      l = cap.length;\n      i = 0;\n\n      for (; i < l; i++) {\n        item = cap[i];\n\n        // Remove the list item's bullet\n        // so it is seen as the next token.\n        space = item.length;\n        item = item.replace(/^ *([*+-]|\\d+\\.) +/, '');\n\n        // Outdent whatever the\n        // list item contains. Hacky.\n        if (~item.indexOf('\\n ')) {\n          space -= item.length;\n          item = !this.options.pedantic\n            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')\n            : item.replace(/^ {1,4}/gm, '');\n        }\n\n        // Determine whether the next list item belongs here.\n        // Backpedal if it does not belong in this list.\n        if (this.options.smartLists && i !== l - 1) {\n          b = block.bullet.exec(cap[i + 1])[0];\n          if (bull !== b && !(bull.length > 1 && b.length > 1)) {\n            src = cap.slice(i + 1).join('\\n') + src;\n            i = l - 1;\n          }\n        }\n\n        // Determine whether item is loose or not.\n        // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n        // for discount behavior.\n        loose = next || /\\n\\n(?!\\s*$)/.test(item);\n        if (i !== l - 1) {\n          next = item.charAt(item.length - 1) === '\\n';\n          if (!loose) loose = next;\n        }\n\n        this.tokens.push({\n          type: loose\n            ? 'loose_item_start'\n            : 'list_item_start'\n        });\n\n        // Recurse.\n        this.token(item, false, bq);\n\n        this.tokens.push({\n          type: 'list_item_end'\n        });\n      }\n\n      this.tokens.push({\n        type: 'list_end'\n      });\n\n      continue;\n    }\n\n    // html\n    if (cap = this.rules.html.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: this.options.sanitize\n          ? 'paragraph'\n          : 'html',\n        pre: !this.options.sanitizer\n          && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n        text: cap[0]\n      });\n      continue;\n    }\n\n    // def\n    if ((!bq && top) && (cap = this.rules.def.exec(src))) {\n      src = src.substring(cap[0].length);\n      this.tokens.links[cap[1].toLowerCase()] = {\n        href: cap[2],\n        title: cap[3]\n      };\n      continue;\n    }\n\n    // table (gfm)\n    if (top && (cap = this.rules.table.exec(src))) {\n      src = src.substring(cap[0].length);\n\n      item = {\n        type: 'table',\n        header: cap[1].replace(/^ *| *\\| *$/g, '').split(/ *\\| */),\n        align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n        cells: cap[3].replace(/(?: *\\| *)?\\n$/, '').split('\\n')\n      };\n\n      for (i = 0; i < item.align.length; i++) {\n        if (/^ *-+: *$/.test(item.align[i])) {\n          item.align[i] = 'right';\n        } else if (/^ *:-+: *$/.test(item.align[i])) {\n          item.align[i] = 'center';\n        } else if (/^ *:-+ *$/.test(item.align[i])) {\n          item.align[i] = 'left';\n        } else {\n          item.align[i] = null;\n        }\n      }\n\n      for (i = 0; i < item.cells.length; i++) {\n        item.cells[i] = item.cells[i]\n          .replace(/^ *\\| *| *\\| *$/g, '')\n          .split(/ *\\| */);\n      }\n\n      this.tokens.push(item);\n\n      continue;\n    }\n\n    // top-level paragraph\n    if (top && (cap = this.rules.paragraph.exec(src))) {\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'paragraph',\n        text: cap[1].charAt(cap[1].length - 1) === '\\n'\n          ? cap[1].slice(0, -1)\n          : cap[1]\n      });\n      continue;\n    }\n\n    // text\n    if (cap = this.rules.text.exec(src)) {\n      // Top-level should never reach here.\n      src = src.substring(cap[0].length);\n      this.tokens.push({\n        type: 'text',\n        text: cap[0]\n      });\n      continue;\n    }\n\n    if (src) {\n      throw new\n        Error('Infinite loop on byte: ' + src.charCodeAt(0));\n    }\n  }\n\n  return this.tokens;\n};\n\n/**\n * Inline-Level Grammar\n */\n\nvar inline = {\n  escape: /^\\\\([\\\\`*{}\\[\\]()#+\\-.!_>])/,\n  autolink: /^<([^ >]+(@|:\\/)[^ >]+)>/,\n  url: noop,\n  tag: /^<!--[\\s\\S]*?-->|^<\\/?\\w+(?:\"[^\"]*\"|'[^']*'|[^'\">])*?>/,\n  link: /^!?\\[(inside)\\]\\(href\\)/,\n  reflink: /^!?\\[(inside)\\]\\s*\\[([^\\]]*)\\]/,\n  nolink: /^!?\\[((?:\\[[^\\]]*\\]|[^\\[\\]])*)\\]/,\n  strong: /^__([\\s\\S]+?)__(?!_)|^\\*\\*([\\s\\S]+?)\\*\\*(?!\\*)/,\n  em: /^\\b_((?:[^_]|__)+?)_\\b|^\\*((?:\\*\\*|[\\s\\S])+?)\\*(?!\\*)/,\n  code: /^(`+)\\s*([\\s\\S]*?[^`])\\s*\\1(?!`)/,\n  br: /^ {2,}\\n(?!\\s*$)/,\n  del: noop,\n  text: /^[\\s\\S]+?(?=[\\\\<!\\[_*`]| {2,}\\n|$)/\n};\n\ninline._inside = /(?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*/;\ninline._href = /\\s*<?([\\s\\S]*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*/;\n\ninline.link = replace(inline.link)\n  ('inside', inline._inside)\n  ('href', inline._href)\n  ();\n\ninline.reflink = replace(inline.reflink)\n  ('inside', inline._inside)\n  ();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = merge({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = merge({}, inline.normal, {\n  strong: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n  em: /^_(?=\\S)([\\s\\S]*?\\S)_(?!_)|^\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)/\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = merge({}, inline.normal, {\n  escape: replace(inline.escape)('])', '~|])')(),\n  url: /^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/,\n  del: /^~~(?=\\S)([\\s\\S]*?\\S)~~/,\n  text: replace(inline.text)\n    (']|', '~]|')\n    ('|', '|https?://|')\n    ()\n});\n\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\ninline.breaks = merge({}, inline.gfm, {\n  br: replace(inline.br)('{2,}', '*')(),\n  text: replace(inline.gfm.text)('{2,}', '*')()\n});\n\n/**\n * Inline Lexer & Compiler\n */\n\nfunction InlineLexer(links, options) {\n  this.options = options || marked.defaults;\n  this.links = links;\n  this.rules = inline.normal;\n  this.renderer = this.options.renderer || new Renderer;\n  this.renderer.options = this.options;\n\n  if (!this.links) {\n    throw new\n      Error('Tokens array requires a `links` property.');\n  }\n\n  if (this.options.gfm) {\n    if (this.options.breaks) {\n      this.rules = inline.breaks;\n    } else {\n      this.rules = inline.gfm;\n    }\n  } else if (this.options.pedantic) {\n    this.rules = inline.pedantic;\n  }\n}\n\n/**\n * Expose Inline Rules\n */\n\nInlineLexer.rules = inline;\n\n/**\n * Static Lexing/Compiling Method\n */\n\nInlineLexer.output = function(src, links, options) {\n  var inline = new InlineLexer(links, options);\n  return inline.output(src);\n};\n\n/**\n * Lexing/Compiling\n */\n\nInlineLexer.prototype.output = function(src) {\n  var out = ''\n    , link\n    , text\n    , href\n    , cap;\n\n  while (src) {\n    // escape\n    if (cap = this.rules.escape.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += cap[1];\n      continue;\n    }\n\n    // autolink\n    if (cap = this.rules.autolink.exec(src)) {\n      src = src.substring(cap[0].length);\n      if (cap[2] === '@') {\n        text = cap[1].charAt(6) === ':'\n          ? this.mangle(cap[1].substring(7))\n          : this.mangle(cap[1]);\n        href = this.mangle('mailto:') + text;\n      } else {\n        text = escape(cap[1]);\n        href = text;\n      }\n      out += this.renderer.link(href, null, text);\n      continue;\n    }\n\n    // url (gfm)\n    if (!this.inLink && (cap = this.rules.url.exec(src))) {\n      src = src.substring(cap[0].length);\n      text = escape(cap[1]);\n      href = text;\n      out += this.renderer.link(href, null, text);\n      continue;\n    }\n\n    // tag\n    if (cap = this.rules.tag.exec(src)) {\n      if (!this.inLink && /^<a /i.test(cap[0])) {\n        this.inLink = true;\n      } else if (this.inLink && /^<\\/a>/i.test(cap[0])) {\n        this.inLink = false;\n      }\n      src = src.substring(cap[0].length);\n      out += this.options.sanitize\n        ? this.options.sanitizer\n          ? this.options.sanitizer(cap[0])\n          : escape(cap[0])\n        : cap[0]\n      continue;\n    }\n\n    // link\n    if (cap = this.rules.link.exec(src)) {\n      src = src.substring(cap[0].length);\n      this.inLink = true;\n      out += this.outputLink(cap, {\n        href: cap[2],\n        title: cap[3]\n      });\n      this.inLink = false;\n      continue;\n    }\n\n    // reflink, nolink\n    if ((cap = this.rules.reflink.exec(src))\n        || (cap = this.rules.nolink.exec(src))) {\n      src = src.substring(cap[0].length);\n      link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n      link = this.links[link.toLowerCase()];\n      if (!link || !link.href) {\n        out += cap[0].charAt(0);\n        src = cap[0].substring(1) + src;\n        continue;\n      }\n      this.inLink = true;\n      out += this.outputLink(cap, link);\n      this.inLink = false;\n      continue;\n    }\n\n    // strong\n    if (cap = this.rules.strong.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.strong(this.output(cap[2] || cap[1]));\n      continue;\n    }\n\n    // em\n    if (cap = this.rules.em.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.em(this.output(cap[2] || cap[1]));\n      continue;\n    }\n\n    // code\n    if (cap = this.rules.code.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.codespan(escape(cap[2], true));\n      continue;\n    }\n\n    // br\n    if (cap = this.rules.br.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.br();\n      continue;\n    }\n\n    // del (gfm)\n    if (cap = this.rules.del.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.del(this.output(cap[1]));\n      continue;\n    }\n\n    // text\n    if (cap = this.rules.text.exec(src)) {\n      src = src.substring(cap[0].length);\n      out += this.renderer.text(escape(this.smartypants(cap[0])));\n      continue;\n    }\n\n    if (src) {\n      throw new\n        Error('Infinite loop on byte: ' + src.charCodeAt(0));\n    }\n  }\n\n  return out;\n};\n\n/**\n * Compile Link\n */\n\nInlineLexer.prototype.outputLink = function(cap, link) {\n  var href = escape(link.href)\n    , title = link.title ? escape(link.title) : null;\n\n  return cap[0].charAt(0) !== '!'\n    ? this.renderer.link(href, title, this.output(cap[1]))\n    : this.renderer.image(href, title, escape(cap[1]));\n};\n\n/**\n * Smartypants Transformations\n */\n\nInlineLexer.prototype.smartypants = function(text) {\n  if (!this.options.smartypants) return text;\n  return text\n    // em-dashes\n    .replace(/---/g, '\\u2014')\n    // en-dashes\n    .replace(/--/g, '\\u2013')\n    // opening singles\n    .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, '$1\\u2018')\n    // closing singles & apostrophes\n    .replace(/'/g, '\\u2019')\n    // opening doubles\n    .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, '$1\\u201c')\n    // closing doubles\n    .replace(/\"/g, '\\u201d')\n    // ellipses\n    .replace(/\\.{3}/g, '\\u2026');\n};\n\n/**\n * Mangle Links\n */\n\nInlineLexer.prototype.mangle = function(text) {\n  if (!this.options.mangle) return text;\n  var out = ''\n    , l = text.length\n    , i = 0\n    , ch;\n\n  for (; i < l; i++) {\n    ch = text.charCodeAt(i);\n    if (Math.random() > 0.5) {\n      ch = 'x' + ch.toString(16);\n    }\n    out += '&#' + ch + ';';\n  }\n\n  return out;\n};\n\n/**\n * Renderer\n */\n\nfunction Renderer(options) {\n  this.options = options || {};\n}\n\nRenderer.prototype.code = function(code, lang, escaped) {\n  if (this.options.highlight) {\n    var out = this.options.highlight(code, lang);\n    if (out != null && out !== code) {\n      escaped = true;\n      code = out;\n    }\n  }\n\n  if (!lang) {\n    return '<pre><code>'\n      + (escaped ? code : escape(code, true))\n      + '\\n</code></pre>';\n  }\n\n  return '<pre><code class=\"'\n    + this.options.langPrefix\n    + escape(lang, true)\n    + '\">'\n    + (escaped ? code : escape(code, true))\n    + '\\n</code></pre>\\n';\n};\n\nRenderer.prototype.blockquote = function(quote) {\n  return '<blockquote>\\n' + quote + '</blockquote>\\n';\n};\n\nRenderer.prototype.html = function(html) {\n  return html;\n};\n\nRenderer.prototype.heading = function(text, level, raw) {\n  return '<h'\n    + level\n    + ' id=\"'\n    + this.options.headerPrefix\n    + raw.toLowerCase().replace(/[^\\w]+/g, '-')\n    + '\">'\n    + text\n    + '</h'\n    + level\n    + '>\\n';\n};\n\nRenderer.prototype.hr = function() {\n  return this.options.xhtml ? '<hr/>\\n' : '<hr>\\n';\n};\n\nRenderer.prototype.list = function(body, ordered) {\n  var type = ordered ? 'ol' : 'ul';\n  return '<' + type + '>\\n' + body + '</' + type + '>\\n';\n};\n\nRenderer.prototype.listitem = function(text) {\n  return '<li>' + text + '</li>\\n';\n};\n\nRenderer.prototype.paragraph = function(text) {\n  return '<p>' + text + '</p>\\n';\n};\n\nRenderer.prototype.table = function(header, body) {\n  return '<table>\\n'\n    + '<thead>\\n'\n    + header\n    + '</thead>\\n'\n    + '<tbody>\\n'\n    + body\n    + '</tbody>\\n'\n    + '</table>\\n';\n};\n\nRenderer.prototype.tablerow = function(content) {\n  return '<tr>\\n' + content + '</tr>\\n';\n};\n\nRenderer.prototype.tablecell = function(content, flags) {\n  var type = flags.header ? 'th' : 'td';\n  var tag = flags.align\n    ? '<' + type + ' style=\"text-align:' + flags.align + '\">'\n    : '<' + type + '>';\n  return tag + content + '</' + type + '>\\n';\n};\n\n// span level renderer\nRenderer.prototype.strong = function(text) {\n  return '<strong>' + text + '</strong>';\n};\n\nRenderer.prototype.em = function(text) {\n  return '<em>' + text + '</em>';\n};\n\nRenderer.prototype.codespan = function(text) {\n  return '<code>' + text + '</code>';\n};\n\nRenderer.prototype.br = function() {\n  return this.options.xhtml ? '<br/>' : '<br>';\n};\n\nRenderer.prototype.del = function(text) {\n  return '<del>' + text + '</del>';\n};\n\nRenderer.prototype.link = function(href, title, text) {\n  if (this.options.sanitize) {\n    try {\n      var prot = decodeURIComponent(unescape(href))\n        .replace(/[^\\w:]/g, '')\n        .toLowerCase();\n    } catch (e) {\n      return '';\n    }\n    if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) {\n      return '';\n    }\n  }\n  var out = '<a href=\"' + href + '\"';\n  if (title) {\n    out += ' title=\"' + title + '\"';\n  }\n  out += '>' + text + '</a>';\n  return out;\n};\n\nRenderer.prototype.image = function(href, title, text) {\n  var out = '<img src=\"' + href + '\" alt=\"' + text + '\"';\n  if (title) {\n    out += ' title=\"' + title + '\"';\n  }\n  out += this.options.xhtml ? '/>' : '>';\n  return out;\n};\n\nRenderer.prototype.text = function(text) {\n  return text;\n};\n\n/**\n * Parsing & Compiling\n */\n\nfunction Parser(options) {\n  this.tokens = [];\n  this.token = null;\n  this.options = options || marked.defaults;\n  this.options.renderer = this.options.renderer || new Renderer;\n  this.renderer = this.options.renderer;\n  this.renderer.options = this.options;\n}\n\n/**\n * Static Parse Method\n */\n\nParser.parse = function(src, options, renderer) {\n  var parser = new Parser(options, renderer);\n  return parser.parse(src);\n};\n\n/**\n * Parse Loop\n */\n\nParser.prototype.parse = function(src) {\n  this.inline = new InlineLexer(src.links, this.options, this.renderer);\n  this.tokens = src.reverse();\n\n  var out = '';\n  while (this.next()) {\n    out += this.tok();\n  }\n\n  return out;\n};\n\n/**\n * Next Token\n */\n\nParser.prototype.next = function() {\n  return this.token = this.tokens.pop();\n};\n\n/**\n * Preview Next Token\n */\n\nParser.prototype.peek = function() {\n  return this.tokens[this.tokens.length - 1] || 0;\n};\n\n/**\n * Parse Text Tokens\n */\n\nParser.prototype.parseText = function() {\n  var body = this.token.text;\n\n  while (this.peek().type === 'text') {\n    body += '\\n' + this.next().text;\n  }\n\n  return this.inline.output(body);\n};\n\n/**\n * Parse Current Token\n */\n\nParser.prototype.tok = function() {\n  switch (this.token.type) {\n    case 'space': {\n      return '';\n    }\n    case 'hr': {\n      return this.renderer.hr();\n    }\n    case 'heading': {\n      return this.renderer.heading(\n        this.inline.output(this.token.text),\n        this.token.depth,\n        this.token.text);\n    }\n    case 'code': {\n      return this.renderer.code(this.token.text,\n        this.token.lang,\n        this.token.escaped);\n    }\n    case 'table': {\n      var header = ''\n        , body = ''\n        , i\n        , row\n        , cell\n        , flags\n        , j;\n\n      // header\n      cell = '';\n      for (i = 0; i < this.token.header.length; i++) {\n        flags = { header: true, align: this.token.align[i] };\n        cell += this.renderer.tablecell(\n          this.inline.output(this.token.header[i]),\n          { header: true, align: this.token.align[i] }\n        );\n      }\n      header += this.renderer.tablerow(cell);\n\n      for (i = 0; i < this.token.cells.length; i++) {\n        row = this.token.cells[i];\n\n        cell = '';\n        for (j = 0; j < row.length; j++) {\n          cell += this.renderer.tablecell(\n            this.inline.output(row[j]),\n            { header: false, align: this.token.align[j] }\n          );\n        }\n\n        body += this.renderer.tablerow(cell);\n      }\n      return this.renderer.table(header, body);\n    }\n    case 'blockquote_start': {\n      var body = '';\n\n      while (this.next().type !== 'blockquote_end') {\n        body += this.tok();\n      }\n\n      return this.renderer.blockquote(body);\n    }\n    case 'list_start': {\n      var body = ''\n        , ordered = this.token.ordered;\n\n      while (this.next().type !== 'list_end') {\n        body += this.tok();\n      }\n\n      return this.renderer.list(body, ordered);\n    }\n    case 'list_item_start': {\n      var body = '';\n\n      while (this.next().type !== 'list_item_end') {\n        body += this.token.type === 'text'\n          ? this.parseText()\n          : this.tok();\n      }\n\n      return this.renderer.listitem(body);\n    }\n    case 'loose_item_start': {\n      var body = '';\n\n      while (this.next().type !== 'list_item_end') {\n        body += this.tok();\n      }\n\n      return this.renderer.listitem(body);\n    }\n    case 'html': {\n      var html = !this.token.pre && !this.options.pedantic\n        ? this.inline.output(this.token.text)\n        : this.token.text;\n      return this.renderer.html(html);\n    }\n    case 'paragraph': {\n      return this.renderer.paragraph(this.inline.output(this.token.text));\n    }\n    case 'text': {\n      return this.renderer.paragraph(this.parseText());\n    }\n  }\n};\n\n/**\n * Helpers\n */\n\nfunction escape(html, encode) {\n  return html\n    .replace(!encode ? /&(?!#?\\w+;)/g : /&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\"/g, '&quot;')\n    .replace(/'/g, '&#39;');\n}\n\nfunction unescape(html) {\n\t// explicitly match decimal, hex, and named HTML entities \n  return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/g, function(_, n) {\n    n = n.toLowerCase();\n    if (n === 'colon') return ':';\n    if (n.charAt(0) === '#') {\n      return n.charAt(1) === 'x'\n        ? String.fromCharCode(parseInt(n.substring(2), 16))\n        : String.fromCharCode(+n.substring(1));\n    }\n    return '';\n  });\n}\n\nfunction replace(regex, opt) {\n  regex = regex.source;\n  opt = opt || '';\n  return function self(name, val) {\n    if (!name) return new RegExp(regex, opt);\n    val = val.source || val;\n    val = val.replace(/(^|[^\\[])\\^/g, '$1');\n    regex = regex.replace(name, val);\n    return self;\n  };\n}\n\nfunction noop() {}\nnoop.exec = noop;\n\nfunction merge(obj) {\n  var i = 1\n    , target\n    , key;\n\n  for (; i < arguments.length; i++) {\n    target = arguments[i];\n    for (key in target) {\n      if (Object.prototype.hasOwnProperty.call(target, key)) {\n        obj[key] = target[key];\n      }\n    }\n  }\n\n  return obj;\n}\n\n\n/**\n * Marked\n */\n\nfunction marked(src, opt, callback) {\n  if (callback || typeof opt === 'function') {\n    if (!callback) {\n      callback = opt;\n      opt = null;\n    }\n\n    opt = merge({}, marked.defaults, opt || {});\n\n    var highlight = opt.highlight\n      , tokens\n      , pending\n      , i = 0;\n\n    try {\n      tokens = Lexer.lex(src, opt)\n    } catch (e) {\n      return callback(e);\n    }\n\n    pending = tokens.length;\n\n    var done = function(err) {\n      if (err) {\n        opt.highlight = highlight;\n        return callback(err);\n      }\n\n      var out;\n\n      try {\n        out = Parser.parse(tokens, opt);\n      } catch (e) {\n        err = e;\n      }\n\n      opt.highlight = highlight;\n\n      return err\n        ? callback(err)\n        : callback(null, out);\n    };\n\n    if (!highlight || highlight.length < 3) {\n      return done();\n    }\n\n    delete opt.highlight;\n\n    if (!pending) return done();\n\n    for (; i < tokens.length; i++) {\n      (function(token) {\n        if (token.type !== 'code') {\n          return --pending || done();\n        }\n        return highlight(token.text, token.lang, function(err, code) {\n          if (err) return done(err);\n          if (code == null || code === token.text) {\n            return --pending || done();\n          }\n          token.text = code;\n          token.escaped = true;\n          --pending || done();\n        });\n      })(tokens[i]);\n    }\n\n    return;\n  }\n  try {\n    if (opt) opt = merge({}, marked.defaults, opt);\n    return Parser.parse(Lexer.lex(src, opt), opt);\n  } catch (e) {\n    e.message += '\\nPlease report this to https://github.com/chjj/marked.';\n    if ((opt || marked.defaults).silent) {\n      return '<p>An error occured:</p><pre>'\n        + escape(e.message + '', true)\n        + '</pre>';\n    }\n    throw e;\n  }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n  merge(marked.defaults, opt);\n  return marked;\n};\n\nmarked.defaults = {\n  gfm: true,\n  tables: true,\n  breaks: false,\n  pedantic: false,\n  sanitize: false,\n  sanitizer: null,\n  mangle: true,\n  smartLists: false,\n  silent: false,\n  highlight: null,\n  langPrefix: 'lang-',\n  smartypants: false,\n  headerPrefix: '',\n  renderer: new Renderer,\n  xhtml: false\n};\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.parse = marked;\n\nif (typeof module !== 'undefined' && typeof exports === 'object') {\n  module.exports = marked;\n} else if (typeof define === 'function' && define.amd) {\n  define('components/marked/lib/marked',[],function() { return marked; });\n} else {\n  this.marked = marked;\n}\n\n}).call(function() {\n  return this || (typeof window !== 'undefined' ? window : global);\n}());\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/xml/xml',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"xml\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;\n  var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag;\n  if (multilineTagIndentPastTag == null) multilineTagIndentPastTag = true;\n\n  var Kludges = parserConfig.htmlMode ? {\n    autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n                      'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n                      'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n                      'track': true, 'wbr': true, 'menuitem': true},\n    implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n                       'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n                       'th': true, 'tr': true},\n    contextGrabbers: {\n      'dd': {'dd': true, 'dt': true},\n      'dt': {'dd': true, 'dt': true},\n      'li': {'li': true},\n      'option': {'option': true, 'optgroup': true},\n      'optgroup': {'optgroup': true},\n      'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n            'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n            'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n            'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n            'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n      'rp': {'rp': true, 'rt': true},\n      'rt': {'rp': true, 'rt': true},\n      'tbody': {'tbody': true, 'tfoot': true},\n      'td': {'td': true, 'th': true},\n      'tfoot': {'tbody': true},\n      'th': {'td': true, 'th': true},\n      'thead': {'tbody': true, 'tfoot': true},\n      'tr': {'tr': true}\n    },\n    doNotIndent: {\"pre\": true},\n    allowUnquoted: true,\n    allowMissing: true,\n    caseFold: true\n  } : {\n    autoSelfClosers: {},\n    implicitlyClosed: {},\n    contextGrabbers: {},\n    doNotIndent: {},\n    allowUnquoted: false,\n    allowMissing: false,\n    caseFold: false\n  };\n  var alignCDATA = parserConfig.alignCDATA;\n\n  // Return variables for tokenizers\n  var type, setStyle;\n\n  function inText(stream, state) {\n    function chain(parser) {\n      state.tokenize = parser;\n      return parser(stream, state);\n    }\n\n    var ch = stream.next();\n    if (ch == \"<\") {\n      if (stream.eat(\"!\")) {\n        if (stream.eat(\"[\")) {\n          if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n          else return null;\n        } else if (stream.match(\"--\")) {\n          return chain(inBlock(\"comment\", \"-->\"));\n        } else if (stream.match(\"DOCTYPE\", true, true)) {\n          stream.eatWhile(/[\\w\\._\\-]/);\n          return chain(doctype(1));\n        } else {\n          return null;\n        }\n      } else if (stream.eat(\"?\")) {\n        stream.eatWhile(/[\\w\\._\\-]/);\n        state.tokenize = inBlock(\"meta\", \"?>\");\n        return \"meta\";\n      } else {\n        type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n        state.tokenize = inTag;\n        return \"tag bracket\";\n      }\n    } else if (ch == \"&\") {\n      var ok;\n      if (stream.eat(\"#\")) {\n        if (stream.eat(\"x\")) {\n          ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n        } else {\n          ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n        }\n      } else {\n        ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n      }\n      return ok ? \"atom\" : \"error\";\n    } else {\n      stream.eatWhile(/[^&<]/);\n      return null;\n    }\n  }\n\n  function inTag(stream, state) {\n    var ch = stream.next();\n    if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n      state.tokenize = inText;\n      type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n      return \"tag bracket\";\n    } else if (ch == \"=\") {\n      type = \"equals\";\n      return null;\n    } else if (ch == \"<\") {\n      state.tokenize = inText;\n      state.state = baseState;\n      state.tagName = state.tagStart = null;\n      var next = state.tokenize(stream, state);\n      return next ? next + \" tag error\" : \"tag error\";\n    } else if (/[\\'\\\"]/.test(ch)) {\n      state.tokenize = inAttribute(ch);\n      state.stringStartCol = stream.column();\n      return state.tokenize(stream, state);\n    } else {\n      stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n      return \"word\";\n    }\n  }\n\n  function inAttribute(quote) {\n    var closure = function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.next() == quote) {\n          state.tokenize = inTag;\n          break;\n        }\n      }\n      return \"string\";\n    };\n    closure.isInAttribute = true;\n    return closure;\n  }\n\n  function inBlock(style, terminator) {\n    return function(stream, state) {\n      while (!stream.eol()) {\n        if (stream.match(terminator)) {\n          state.tokenize = inText;\n          break;\n        }\n        stream.next();\n      }\n      return style;\n    };\n  }\n  function doctype(depth) {\n    return function(stream, state) {\n      var ch;\n      while ((ch = stream.next()) != null) {\n        if (ch == \"<\") {\n          state.tokenize = doctype(depth + 1);\n          return state.tokenize(stream, state);\n        } else if (ch == \">\") {\n          if (depth == 1) {\n            state.tokenize = inText;\n            break;\n          } else {\n            state.tokenize = doctype(depth - 1);\n            return state.tokenize(stream, state);\n          }\n        }\n      }\n      return \"meta\";\n    };\n  }\n\n  function Context(state, tagName, startOfLine) {\n    this.prev = state.context;\n    this.tagName = tagName;\n    this.indent = state.indented;\n    this.startOfLine = startOfLine;\n    if (Kludges.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n      this.noIndent = true;\n  }\n  function popContext(state) {\n    if (state.context) state.context = state.context.prev;\n  }\n  function maybePopContext(state, nextTagName) {\n    var parentTagName;\n    while (true) {\n      if (!state.context) {\n        return;\n      }\n      parentTagName = state.context.tagName;\n      if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||\n          !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n        return;\n      }\n      popContext(state);\n    }\n  }\n\n  function baseState(type, stream, state) {\n    if (type == \"openTag\") {\n      state.tagStart = stream.column();\n      return tagNameState;\n    } else if (type == \"closeTag\") {\n      return closeTagNameState;\n    } else {\n      return baseState;\n    }\n  }\n  function tagNameState(type, stream, state) {\n    if (type == \"word\") {\n      state.tagName = stream.current();\n      setStyle = \"tag\";\n      return attrState;\n    } else {\n      setStyle = \"error\";\n      return tagNameState;\n    }\n  }\n  function closeTagNameState(type, stream, state) {\n    if (type == \"word\") {\n      var tagName = stream.current();\n      if (state.context && state.context.tagName != tagName &&\n          Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))\n        popContext(state);\n      if (state.context && state.context.tagName == tagName) {\n        setStyle = \"tag\";\n        return closeState;\n      } else {\n        setStyle = \"tag error\";\n        return closeStateErr;\n      }\n    } else {\n      setStyle = \"error\";\n      return closeStateErr;\n    }\n  }\n\n  function closeState(type, _stream, state) {\n    if (type != \"endTag\") {\n      setStyle = \"error\";\n      return closeState;\n    }\n    popContext(state);\n    return baseState;\n  }\n  function closeStateErr(type, stream, state) {\n    setStyle = \"error\";\n    return closeState(type, stream, state);\n  }\n\n  function attrState(type, _stream, state) {\n    if (type == \"word\") {\n      setStyle = \"attribute\";\n      return attrEqState;\n    } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n      var tagName = state.tagName, tagStart = state.tagStart;\n      state.tagName = state.tagStart = null;\n      if (type == \"selfcloseTag\" ||\n          Kludges.autoSelfClosers.hasOwnProperty(tagName)) {\n        maybePopContext(state, tagName);\n      } else {\n        maybePopContext(state, tagName);\n        state.context = new Context(state, tagName, tagStart == state.indented);\n      }\n      return baseState;\n    }\n    setStyle = \"error\";\n    return attrState;\n  }\n  function attrEqState(type, stream, state) {\n    if (type == \"equals\") return attrValueState;\n    if (!Kludges.allowMissing) setStyle = \"error\";\n    return attrState(type, stream, state);\n  }\n  function attrValueState(type, stream, state) {\n    if (type == \"string\") return attrContinuedState;\n    if (type == \"word\" && Kludges.allowUnquoted) {setStyle = \"string\"; return attrState;}\n    setStyle = \"error\";\n    return attrState(type, stream, state);\n  }\n  function attrContinuedState(type, stream, state) {\n    if (type == \"string\") return attrContinuedState;\n    return attrState(type, stream, state);\n  }\n\n  return {\n    startState: function() {\n      return {tokenize: inText,\n              state: baseState,\n              indented: 0,\n              tagName: null, tagStart: null,\n              context: null};\n    },\n\n    token: function(stream, state) {\n      if (!state.tagName && stream.sol())\n        state.indented = stream.indentation();\n\n      if (stream.eatSpace()) return null;\n      type = null;\n      var style = state.tokenize(stream, state);\n      if ((style || type) && style != \"comment\") {\n        setStyle = null;\n        state.state = state.state(type || style, stream, state);\n        if (setStyle)\n          style = setStyle == \"error\" ? style + \" error\" : setStyle;\n      }\n      return style;\n    },\n\n    indent: function(state, textAfter, fullLine) {\n      var context = state.context;\n      // Indent multi-line strings (e.g. css).\n      if (state.tokenize.isInAttribute) {\n        if (state.tagStart == state.indented)\n          return state.stringStartCol + 1;\n        else\n          return state.indented + indentUnit;\n      }\n      if (context && context.noIndent) return CodeMirror.Pass;\n      if (state.tokenize != inTag && state.tokenize != inText)\n        return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n      // Indent the starts of attribute names.\n      if (state.tagName) {\n        if (multilineTagIndentPastTag)\n          return state.tagStart + state.tagName.length + 2;\n        else\n          return state.tagStart + indentUnit * multilineTagIndentFactor;\n      }\n      if (alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n      var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n      if (tagAfter && tagAfter[1]) { // Closing tag spotted\n        while (context) {\n          if (context.tagName == tagAfter[2]) {\n            context = context.prev;\n            break;\n          } else if (Kludges.implicitlyClosed.hasOwnProperty(context.tagName)) {\n            context = context.prev;\n          } else {\n            break;\n          }\n        }\n      } else if (tagAfter) { // Opening tag spotted\n        while (context) {\n          var grabbers = Kludges.contextGrabbers[context.tagName];\n          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n            context = context.prev;\n          else\n            break;\n        }\n      }\n      while (context && !context.startOfLine)\n        context = context.prev;\n      if (context) return context.indent + indentUnit;\n      else return 0;\n    },\n\n    electricInput: /<\\/[\\s\\w:]+>$/,\n    blockCommentStart: \"<!--\",\n    blockCommentEnd: \"-->\",\n\n    configuration: parserConfig.htmlMode ? \"html\" : \"xml\",\n    helperType: parserConfig.htmlMode ? \"html\" : \"xml\"\n  };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n  CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/markdown/markdown',[\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n  var htmlFound = CodeMirror.modes.hasOwnProperty(\"xml\");\n  var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: \"xml\", htmlMode: true} : \"text/plain\");\n\n  function getMode(name) {\n    if (CodeMirror.findModeByName) {\n      var found = CodeMirror.findModeByName(name);\n      if (found) name = found.mime || found.mimes[0];\n    }\n    var mode = CodeMirror.getMode(cmCfg, name);\n    return mode.name == \"null\" ? null : mode;\n  }\n\n  // Should characters that affect highlighting be highlighted separate?\n  // Does not include characters that will be output (such as `1.` and `-` for lists)\n  if (modeCfg.highlightFormatting === undefined)\n    modeCfg.highlightFormatting = false;\n\n  // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n  // Excess `>` will emit `error` token.\n  if (modeCfg.maxBlockquoteDepth === undefined)\n    modeCfg.maxBlockquoteDepth = 0;\n\n  // Should underscores in words open/close em/strong?\n  if (modeCfg.underscoresBreakWords === undefined)\n    modeCfg.underscoresBreakWords = true;\n\n  // Turn on fenced code blocks? (\"```\" to start/end)\n  if (modeCfg.fencedCodeBlocks === undefined) modeCfg.fencedCodeBlocks = false;\n\n  // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n  if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n  // Turn on strikethrough syntax\n  if (modeCfg.strikethrough === undefined)\n    modeCfg.strikethrough = false;\n\n  var codeDepth = 0;\n\n  var header   = 'header'\n  ,   code     = 'comment'\n  ,   quote    = 'quote'\n  ,   list1    = 'variable-2'\n  ,   list2    = 'variable-3'\n  ,   list3    = 'keyword'\n  ,   hr       = 'hr'\n  ,   image    = 'tag'\n  ,   formatting = 'formatting'\n  ,   linkinline = 'link'\n  ,   linkemail = 'link'\n  ,   linktext = 'link'\n  ,   linkhref = 'string'\n  ,   em       = 'em'\n  ,   strong   = 'strong'\n  ,   strikethrough = 'strikethrough';\n\n  var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n  ,   ulRE = /^[*\\-+]\\s+/\n  ,   olRE = /^[0-9]+([.)])\\s+/\n  ,   taskListRE = /^\\[(x| )\\](?=\\s)/ // Must follow ulRE or olRE\n  ,   atxHeaderRE = /^(#+)(?: |$)/\n  ,   setextHeaderRE = /^ *(?:\\={1,}|-{1,})\\s*$/\n  ,   textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~]+/;\n\n  function switchInline(stream, state, f) {\n    state.f = state.inline = f;\n    return f(stream, state);\n  }\n\n  function switchBlock(stream, state, f) {\n    state.f = state.block = f;\n    return f(stream, state);\n  }\n\n\n  // Blocks\n\n  function blankLine(state) {\n    // Reset linkTitle state\n    state.linkTitle = false;\n    // Reset EM state\n    state.em = false;\n    // Reset STRONG state\n    state.strong = false;\n    // Reset strikethrough state\n    state.strikethrough = false;\n    // Reset state.quote\n    state.quote = 0;\n    // Reset state.indentedCode\n    state.indentedCode = false;\n    if (!htmlFound && state.f == htmlBlock) {\n      state.f = inlineNormal;\n      state.block = blockNormal;\n    }\n    // Reset state.trailingSpace\n    state.trailingSpace = 0;\n    state.trailingSpaceNewLine = false;\n    // Mark this line as blank\n    state.thisLineHasContent = false;\n    return null;\n  }\n\n  function blockNormal(stream, state) {\n\n    var sol = stream.sol();\n\n    var prevLineIsList = state.list !== false,\n        prevLineIsIndentedCode = state.indentedCode;\n\n    state.indentedCode = false;\n\n    if (prevLineIsList) {\n      if (state.indentationDiff >= 0) { // Continued list\n        if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block\n          state.indentation -= state.indentationDiff;\n        }\n        state.list = null;\n      } else if (state.indentation > 0) {\n        state.list = null;\n        state.listDepth = Math.floor(state.indentation / 4);\n      } else { // No longer a list\n        state.list = false;\n        state.listDepth = 0;\n      }\n    }\n\n    var match = null;\n    if (state.indentationDiff >= 4) {\n      stream.skipToEnd();\n      if (prevLineIsIndentedCode || !state.prevLineHasContent) {\n        state.indentation -= 4;\n        state.indentedCode = true;\n        return code;\n      } else {\n        return null;\n      }\n    } else if (stream.eatSpace()) {\n      return null;\n    } else if ((match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n      state.header = match[1].length;\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      state.f = state.inline;\n      return getType(state);\n    } else if (state.prevLineHasContent && !state.quote && !prevLineIsList && !prevLineIsIndentedCode && (match = stream.match(setextHeaderRE))) {\n      state.header = match[0].charAt(0) == '=' ? 1 : 2;\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      state.f = state.inline;\n      return getType(state);\n    } else if (stream.eat('>')) {\n      state.quote = sol ? 1 : state.quote + 1;\n      if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n      stream.eatSpace();\n      return getType(state);\n    } else if (stream.peek() === '[') {\n      return switchInline(stream, state, footnoteLink);\n    } else if (stream.match(hrRE, true)) {\n      state.hr = true;\n      return hr;\n    } else if ((!state.prevLineHasContent || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {\n      var listType = null;\n      if (stream.match(ulRE, true)) {\n        listType = 'ul';\n      } else {\n        stream.match(olRE, true);\n        listType = 'ol';\n      }\n      state.indentation += 4;\n      state.list = true;\n      state.listDepth++;\n      if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n        state.taskList = true;\n      }\n      state.f = state.inline;\n      if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n      return getType(state);\n    } else if (modeCfg.fencedCodeBlocks && stream.match(/^```[ \\t]*([\\w+#]*)/, true)) {\n      // try switching mode\n      state.localMode = getMode(RegExp.$1);\n      if (state.localMode) state.localState = state.localMode.startState();\n      state.f = state.block = local;\n      if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n      state.code = true;\n      return getType(state);\n    }\n\n    return switchInline(stream, state, state.inline);\n  }\n\n  function htmlBlock(stream, state) {\n    var style = htmlMode.token(stream, state.htmlState);\n    if ((htmlFound && state.htmlState.tagStart === null && !state.htmlState.context) ||\n        (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n      state.f = inlineNormal;\n      state.block = blockNormal;\n      state.htmlState = null;\n    }\n    return style;\n  }\n\n  function local(stream, state) {\n    if (stream.sol() && stream.match(\"```\", false)) {\n      state.localMode = state.localState = null;\n      state.f = state.block = leavingLocal;\n      return null;\n    } else if (state.localMode) {\n      return state.localMode.token(stream, state.localState);\n    } else {\n      stream.skipToEnd();\n      return code;\n    }\n  }\n\n  function leavingLocal(stream, state) {\n    stream.match(\"```\");\n    state.block = blockNormal;\n    state.f = inlineNormal;\n    if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n    state.code = true;\n    var returnType = getType(state);\n    state.code = false;\n    return returnType;\n  }\n\n  // Inline\n  function getType(state) {\n    var styles = [];\n\n    if (state.formatting) {\n      styles.push(formatting);\n\n      if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n      for (var i = 0; i < state.formatting.length; i++) {\n        styles.push(formatting + \"-\" + state.formatting[i]);\n\n        if (state.formatting[i] === \"header\") {\n          styles.push(formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n        }\n\n        // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n        // Add `error` instead if the maximum blockquote nesting depth is passed\n        if (state.formatting[i] === \"quote\") {\n          if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n            styles.push(formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n          } else {\n            styles.push(\"error\");\n          }\n        }\n      }\n    }\n\n    if (state.taskOpen) {\n      styles.push(\"meta\");\n      return styles.length ? styles.join(' ') : null;\n    }\n    if (state.taskClosed) {\n      styles.push(\"property\");\n      return styles.length ? styles.join(' ') : null;\n    }\n\n    if (state.linkHref) {\n      styles.push(linkhref, \"url\");\n    } else { // Only apply inline styles to non-url text\n      if (state.strong) { styles.push(strong); }\n      if (state.em) { styles.push(em); }\n      if (state.strikethrough) { styles.push(strikethrough); }\n\n      if (state.linkText) { styles.push(linktext); }\n\n      if (state.code) { styles.push(code); }\n    }\n\n    if (state.header) { styles.push(header); styles.push(header + \"-\" + state.header); }\n\n    if (state.quote) {\n      styles.push(quote);\n\n      // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n      if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n        styles.push(quote + \"-\" + state.quote);\n      } else {\n        styles.push(quote + \"-\" + modeCfg.maxBlockquoteDepth);\n      }\n    }\n\n    if (state.list !== false) {\n      var listMod = (state.listDepth - 1) % 3;\n      if (!listMod) {\n        styles.push(list1);\n      } else if (listMod === 1) {\n        styles.push(list2);\n      } else {\n        styles.push(list3);\n      }\n    }\n\n    if (state.trailingSpaceNewLine) {\n      styles.push(\"trailing-space-new-line\");\n    } else if (state.trailingSpace) {\n      styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n    }\n\n    return styles.length ? styles.join(' ') : null;\n  }\n\n  function handleText(stream, state) {\n    if (stream.match(textRE, true)) {\n      return getType(state);\n    }\n    return undefined;\n  }\n\n  function inlineNormal(stream, state) {\n    var style = state.text(stream, state);\n    if (typeof style !== 'undefined')\n      return style;\n\n    if (state.list) { // List marker (*, +, -, 1., etc)\n      state.list = null;\n      return getType(state);\n    }\n\n    if (state.taskList) {\n      var taskOpen = stream.match(taskListRE, true)[1] !== \"x\";\n      if (taskOpen) state.taskOpen = true;\n      else state.taskClosed = true;\n      if (modeCfg.highlightFormatting) state.formatting = \"task\";\n      state.taskList = false;\n      return getType(state);\n    }\n\n    state.taskOpen = false;\n    state.taskClosed = false;\n\n    if (state.header && stream.match(/^#+$/, true)) {\n      if (modeCfg.highlightFormatting) state.formatting = \"header\";\n      return getType(state);\n    }\n\n    // Get sol() value now, before character is consumed\n    var sol = stream.sol();\n\n    var ch = stream.next();\n\n    if (ch === '\\\\') {\n      stream.next();\n      if (modeCfg.highlightFormatting) {\n        var type = getType(state);\n        return type ? type + \" formatting-escape\" : \"formatting-escape\";\n      }\n    }\n\n    // Matches link titles present on next line\n    if (state.linkTitle) {\n      state.linkTitle = false;\n      var matchCh = ch;\n      if (ch === '(') {\n        matchCh = ')';\n      }\n      matchCh = (matchCh+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n      var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n      if (stream.match(new RegExp(regex), true)) {\n        return linkhref;\n      }\n    }\n\n    // If this block is changed, it may need to be updated in GFM mode\n    if (ch === '`') {\n      var previousFormatting = state.formatting;\n      if (modeCfg.highlightFormatting) state.formatting = \"code\";\n      var t = getType(state);\n      var before = stream.pos;\n      stream.eatWhile('`');\n      var difference = 1 + stream.pos - before;\n      if (!state.code) {\n        codeDepth = difference;\n        state.code = true;\n        return getType(state);\n      } else {\n        if (difference === codeDepth) { // Must be exact\n          state.code = false;\n          return t;\n        }\n        state.formatting = previousFormatting;\n        return getType(state);\n      }\n    } else if (state.code) {\n      return getType(state);\n    }\n\n    if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n      stream.match(/\\[[^\\]]*\\]/);\n      state.inline = state.f = linkHref;\n      return image;\n    }\n\n    if (ch === '[' && stream.match(/.*\\](\\(.*\\)| ?\\[.*\\])/, false)) {\n      state.linkText = true;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      return getType(state);\n    }\n\n    if (ch === ']' && state.linkText && stream.match(/\\(.*\\)| ?\\[.*\\]/, false)) {\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      state.linkText = false;\n      state.inline = state.f = linkHref;\n      return type;\n    }\n\n    if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n      state.f = state.inline = linkInline;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkinline;\n    }\n\n    if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n      state.f = state.inline = linkInline;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkemail;\n    }\n\n    if (ch === '<' && stream.match(/^\\w/, false)) {\n      if (stream.string.indexOf(\">\") != -1) {\n        var atts = stream.string.substring(1,stream.string.indexOf(\">\"));\n        if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) {\n          state.md_inside = true;\n        }\n      }\n      stream.backUp(1);\n      state.htmlState = CodeMirror.startState(htmlMode);\n      return switchBlock(stream, state, htmlBlock);\n    }\n\n    if (ch === '<' && stream.match(/^\\/\\w*?>/)) {\n      state.md_inside = false;\n      return \"tag\";\n    }\n\n    var ignoreUnderscore = false;\n    if (!modeCfg.underscoresBreakWords) {\n      if (ch === '_' && stream.peek() !== '_' && stream.match(/(\\w)/, false)) {\n        var prevPos = stream.pos - 2;\n        if (prevPos >= 0) {\n          var prevCh = stream.string.charAt(prevPos);\n          if (prevCh !== '_' && prevCh.match(/(\\w)/, false)) {\n            ignoreUnderscore = true;\n          }\n        }\n      }\n    }\n    if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {\n      if (sol && stream.peek() === ' ') {\n        // Do nothing, surrounded by newline and space\n      } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG\n        if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n        var t = getType(state);\n        state.strong = false;\n        return t;\n      } else if (!state.strong && stream.eat(ch)) { // Add STRONG\n        state.strong = ch;\n        if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n        return getType(state);\n      } else if (state.em === ch) { // Remove EM\n        if (modeCfg.highlightFormatting) state.formatting = \"em\";\n        var t = getType(state);\n        state.em = false;\n        return t;\n      } else if (!state.em) { // Add EM\n        state.em = ch;\n        if (modeCfg.highlightFormatting) state.formatting = \"em\";\n        return getType(state);\n      }\n    } else if (ch === ' ') {\n      if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n        if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n          return getType(state);\n        } else { // Not surrounded by spaces, back up pointer\n          stream.backUp(1);\n        }\n      }\n    }\n\n    if (modeCfg.strikethrough) {\n      if (ch === '~' && stream.eatWhile(ch)) {\n        if (state.strikethrough) {// Remove strikethrough\n          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n          var t = getType(state);\n          state.strikethrough = false;\n          return t;\n        } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n          state.strikethrough = true;\n          if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n          return getType(state);\n        }\n      } else if (ch === ' ') {\n        if (stream.match(/^~~/, true)) { // Probably surrounded by space\n          if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n            return getType(state);\n          } else { // Not surrounded by spaces, back up pointer\n            stream.backUp(2);\n          }\n        }\n      }\n    }\n\n    if (ch === ' ') {\n      if (stream.match(/ +$/, false)) {\n        state.trailingSpace++;\n      } else if (state.trailingSpace) {\n        state.trailingSpaceNewLine = true;\n      }\n    }\n\n    return getType(state);\n  }\n\n  function linkInline(stream, state) {\n    var ch = stream.next();\n\n    if (ch === \">\") {\n      state.f = state.inline = inlineNormal;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var type = getType(state);\n      if (type){\n        type += \" \";\n      } else {\n        type = \"\";\n      }\n      return type + linkinline;\n    }\n\n    stream.match(/^[^>]+/, true);\n\n    return linkinline;\n  }\n\n  function linkHref(stream, state) {\n    // Check if space, and return NULL if so (to avoid marking the space)\n    if(stream.eatSpace()){\n      return null;\n    }\n    var ch = stream.next();\n    if (ch === '(' || ch === '[') {\n      state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n      if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n      state.linkHref = true;\n      return getType(state);\n    }\n    return 'error';\n  }\n\n  function getLinkHrefInside(endChar) {\n    return function(stream, state) {\n      var ch = stream.next();\n\n      if (ch === endChar) {\n        state.f = state.inline = inlineNormal;\n        if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n        var returnState = getType(state);\n        state.linkHref = false;\n        return returnState;\n      }\n\n      if (stream.match(inlineRE(endChar), true)) {\n        stream.backUp(1);\n      }\n\n      state.linkHref = true;\n      return getType(state);\n    };\n  }\n\n  function footnoteLink(stream, state) {\n    if (stream.match(/^[^\\]]*\\]:/, false)) {\n      state.f = footnoteLinkInside;\n      stream.next(); // Consume [\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      state.linkText = true;\n      return getType(state);\n    }\n    return switchInline(stream, state, inlineNormal);\n  }\n\n  function footnoteLinkInside(stream, state) {\n    if (stream.match(/^\\]:/, true)) {\n      state.f = state.inline = footnoteUrl;\n      if (modeCfg.highlightFormatting) state.formatting = \"link\";\n      var returnType = getType(state);\n      state.linkText = false;\n      return returnType;\n    }\n\n    stream.match(/^[^\\]]+/, true);\n\n    return linktext;\n  }\n\n  function footnoteUrl(stream, state) {\n    // Check if space, and return NULL if so (to avoid marking the space)\n    if(stream.eatSpace()){\n      return null;\n    }\n    // Match URL\n    stream.match(/^[^\\s]+/, true);\n    // Check for link title\n    if (stream.peek() === undefined) { // End of line, set flag to check next line\n      state.linkTitle = true;\n    } else { // More content on line, check if link title\n      stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\\\\\|\\\\.)+\"|'(?:[^'\\\\]|\\\\\\\\|\\\\.)+'|\\((?:[^)\\\\]|\\\\\\\\|\\\\.)+\\)))?/, true);\n    }\n    state.f = state.inline = inlineNormal;\n    return linkhref + \" url\";\n  }\n\n  var savedInlineRE = [];\n  function inlineRE(endChar) {\n    if (!savedInlineRE[endChar]) {\n      // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)\n      endChar = (endChar+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n      // Match any non-endChar, escaped character, as well as the closing\n      // endChar.\n      savedInlineRE[endChar] = new RegExp('^(?:[^\\\\\\\\]|\\\\\\\\.)*?(' + endChar + ')');\n    }\n    return savedInlineRE[endChar];\n  }\n\n  var mode = {\n    startState: function() {\n      return {\n        f: blockNormal,\n\n        prevLineHasContent: false,\n        thisLineHasContent: false,\n\n        block: blockNormal,\n        htmlState: null,\n        indentation: 0,\n\n        inline: inlineNormal,\n        text: handleText,\n\n        formatting: false,\n        linkText: false,\n        linkHref: false,\n        linkTitle: false,\n        em: false,\n        strong: false,\n        header: 0,\n        hr: false,\n        taskList: false,\n        list: false,\n        listDepth: 0,\n        quote: 0,\n        trailingSpace: 0,\n        trailingSpaceNewLine: false,\n        strikethrough: false\n      };\n    },\n\n    copyState: function(s) {\n      return {\n        f: s.f,\n\n        prevLineHasContent: s.prevLineHasContent,\n        thisLineHasContent: s.thisLineHasContent,\n\n        block: s.block,\n        htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n        indentation: s.indentation,\n\n        localMode: s.localMode,\n        localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n        inline: s.inline,\n        text: s.text,\n        formatting: false,\n        linkTitle: s.linkTitle,\n        em: s.em,\n        strong: s.strong,\n        strikethrough: s.strikethrough,\n        header: s.header,\n        hr: s.hr,\n        taskList: s.taskList,\n        list: s.list,\n        listDepth: s.listDepth,\n        quote: s.quote,\n        indentedCode: s.indentedCode,\n        trailingSpace: s.trailingSpace,\n        trailingSpaceNewLine: s.trailingSpaceNewLine,\n        md_inside: s.md_inside\n      };\n    },\n\n    token: function(stream, state) {\n\n      // Reset state.formatting\n      state.formatting = false;\n\n      if (stream.sol()) {\n        var forceBlankLine = !!state.header || state.hr;\n\n        // Reset state.header and state.hr\n        state.header = 0;\n        state.hr = false;\n\n        if (stream.match(/^\\s*$/, true) || forceBlankLine) {\n          state.prevLineHasContent = false;\n          blankLine(state);\n          return forceBlankLine ? this.token(stream, state) : null;\n        } else {\n          state.prevLineHasContent = state.thisLineHasContent;\n          state.thisLineHasContent = true;\n        }\n\n        // Reset state.taskList\n        state.taskList = false;\n\n        // Reset state.code\n        state.code = false;\n\n        // Reset state.trailingSpace\n        state.trailingSpace = 0;\n        state.trailingSpaceNewLine = false;\n\n        state.f = state.block;\n        var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, '    ').length;\n        var difference = Math.floor((indentation - state.indentation) / 4) * 4;\n        if (difference > 4) difference = 4;\n        var adjustedIndentation = state.indentation + difference;\n        state.indentationDiff = adjustedIndentation - state.indentation;\n        state.indentation = adjustedIndentation;\n        if (indentation > 0) return null;\n      }\n      return state.f(stream, state);\n    },\n\n    innerMode: function(state) {\n      if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n      if (state.localState) return {state: state.localState, mode: state.localMode};\n      return {state: state, mode: mode};\n    },\n\n    blankLine: blankLine,\n\n    getType: getType,\n\n    fold: \"markdown\"\n  };\n  return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true and not overridden,\n// or state.overlay.combineTokens was true, in which case the styles are\n// combined.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/mode/overlay',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.overlayMode = function(base, overlay, combine) {\n  return {\n    startState: function() {\n      return {\n        base: CodeMirror.startState(base),\n        overlay: CodeMirror.startState(overlay),\n        basePos: 0, baseCur: null,\n        overlayPos: 0, overlayCur: null,\n        streamSeen: null\n      };\n    },\n    copyState: function(state) {\n      return {\n        base: CodeMirror.copyState(base, state.base),\n        overlay: CodeMirror.copyState(overlay, state.overlay),\n        basePos: state.basePos, baseCur: null,\n        overlayPos: state.overlayPos, overlayCur: null\n      };\n    },\n\n    token: function(stream, state) {\n      if (stream != state.streamSeen ||\n          Math.min(state.basePos, state.overlayPos) < stream.start) {\n        state.streamSeen = stream;\n        state.basePos = state.overlayPos = stream.start;\n      }\n\n      if (stream.start == state.basePos) {\n        state.baseCur = base.token(stream, state.base);\n        state.basePos = stream.pos;\n      }\n      if (stream.start == state.overlayPos) {\n        stream.pos = stream.start;\n        state.overlayCur = overlay.token(stream, state.overlay);\n        state.overlayPos = stream.pos;\n      }\n      stream.pos = Math.min(state.basePos, state.overlayPos);\n\n      // state.overlay.combineTokens always takes precedence over combine,\n      // unless set to null\n      if (state.overlayCur == null) return state.baseCur;\n      else if (state.baseCur != null &&\n               state.overlay.combineTokens ||\n               combine && state.overlay.combineTokens == null)\n        return state.baseCur + \" \" + state.overlayCur;\n      else return state.overlayCur;\n    },\n\n    indent: base.indent && function(state, textAfter) {\n      return base.indent(state.base, textAfter);\n    },\n    electricChars: base.electricChars,\n\n    innerMode: function(state) { return {state: state.base, mode: base}; },\n\n    blankLine: function(state) {\n      if (base.blankLine) base.blankLine(state.base);\n      if (overlay.blankLine) overlay.blankLine(state.overlay);\n    }\n  };\n};\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"../markdown/markdown\"), require(\"../../addon/mode/overlay\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/gfm/gfm',[\"../../lib/codemirror\", \"../markdown/markdown\", \"../../addon/mode/overlay\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"gfm\", function(config, modeConfig) {\n  var codeDepth = 0;\n  function blankLine(state) {\n    state.code = false;\n    return null;\n  }\n  var gfmOverlay = {\n    startState: function() {\n      return {\n        code: false,\n        codeBlock: false,\n        ateSpace: false\n      };\n    },\n    copyState: function(s) {\n      return {\n        code: s.code,\n        codeBlock: s.codeBlock,\n        ateSpace: s.ateSpace\n      };\n    },\n    token: function(stream, state) {\n      state.combineTokens = null;\n\n      // Hack to prevent formatting override inside code blocks (block and inline)\n      if (state.codeBlock) {\n        if (stream.match(/^```/)) {\n          state.codeBlock = false;\n          return null;\n        }\n        stream.skipToEnd();\n        return null;\n      }\n      if (stream.sol()) {\n        state.code = false;\n      }\n      if (stream.sol() && stream.match(/^```/)) {\n        stream.skipToEnd();\n        state.codeBlock = true;\n        return null;\n      }\n      // If this block is changed, it may need to be updated in Markdown mode\n      if (stream.peek() === '`') {\n        stream.next();\n        var before = stream.pos;\n        stream.eatWhile('`');\n        var difference = 1 + stream.pos - before;\n        if (!state.code) {\n          codeDepth = difference;\n          state.code = true;\n        } else {\n          if (difference === codeDepth) { // Must be exact\n            state.code = false;\n          }\n        }\n        return null;\n      } else if (state.code) {\n        stream.next();\n        return null;\n      }\n      // Check if space. If so, links can be formatted later on\n      if (stream.eatSpace()) {\n        state.ateSpace = true;\n        return null;\n      }\n      if (stream.sol() || state.ateSpace) {\n        state.ateSpace = false;\n        if(stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+@)?(?:[a-f0-9]{7,40}\\b)/)) {\n          // User/Project@SHA\n          // User@SHA\n          // SHA\n          state.combineTokens = true;\n          return \"link\";\n        } else if (stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+)?#[0-9]+\\b/)) {\n          // User/Project#Num\n          // User#Num\n          // #Num\n          state.combineTokens = true;\n          return \"link\";\n        }\n      }\n      if (stream.match(/^((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\([^\\s()<>]*\\))+(?:\\([^\\s()<>]*\\)|[^\\s`*!()\\[\\]{};:'\".,<>?«»“”‘’]))/i) &&\n         stream.string.slice(stream.start - 2, stream.start) != \"](\") {\n        // URLs\n        // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n        // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine\n        state.combineTokens = true;\n        return \"link\";\n      }\n      stream.next();\n      return null;\n    },\n    blankLine: blankLine\n  };\n\n  var markdownConfig = {\n    underscoresBreakWords: false,\n    taskLists: true,\n    fencedCodeBlocks: true,\n    strikethrough: true\n  };\n  for (var attr in modeConfig) {\n    markdownConfig[attr] = modeConfig[attr];\n  }\n  markdownConfig.name = \"markdown\";\n  CodeMirror.defineMIME(\"gfmBase\", markdownConfig);\n  return CodeMirror.overlayMode(CodeMirror.getMode(config, \"gfmBase\"), gfmOverlay);\n}, \"markdown\");\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/mode/multiplex',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.multiplexingMode = function(outer /*, others */) {\n  // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects\n  var others = Array.prototype.slice.call(arguments, 1);\n\n  function indexOf(string, pattern, from, returnEnd) {\n    if (typeof pattern == \"string\") {\n      var found = string.indexOf(pattern, from);\n      return returnEnd && found > -1 ? found + pattern.length : found;\n    }\n    var m = pattern.exec(from ? string.slice(from) : string);\n    return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;\n  }\n\n  return {\n    startState: function() {\n      return {\n        outer: CodeMirror.startState(outer),\n        innerActive: null,\n        inner: null\n      };\n    },\n\n    copyState: function(state) {\n      return {\n        outer: CodeMirror.copyState(outer, state.outer),\n        innerActive: state.innerActive,\n        inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)\n      };\n    },\n\n    token: function(stream, state) {\n      if (!state.innerActive) {\n        var cutOff = Infinity, oldContent = stream.string;\n        for (var i = 0; i < others.length; ++i) {\n          var other = others[i];\n          var found = indexOf(oldContent, other.open, stream.pos);\n          if (found == stream.pos) {\n            if (!other.parseDelimiters) stream.match(other.open);\n            state.innerActive = other;\n            state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, \"\") : 0);\n            return other.delimStyle;\n          } else if (found != -1 && found < cutOff) {\n            cutOff = found;\n          }\n        }\n        if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);\n        var outerToken = outer.token(stream, state.outer);\n        if (cutOff != Infinity) stream.string = oldContent;\n        return outerToken;\n      } else {\n        var curInner = state.innerActive, oldContent = stream.string;\n        if (!curInner.close && stream.sol()) {\n          state.innerActive = state.inner = null;\n          return this.token(stream, state);\n        }\n        var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;\n        if (found == stream.pos && !curInner.parseDelimiters) {\n          stream.match(curInner.close);\n          state.innerActive = state.inner = null;\n          return curInner.delimStyle;\n        }\n        if (found > -1) stream.string = oldContent.slice(0, found);\n        var innerToken = curInner.mode.token(stream, state.inner);\n        if (found > -1) stream.string = oldContent;\n\n        if (found == stream.pos && curInner.parseDelimiters)\n          state.innerActive = state.inner = null;\n\n        if (curInner.innerStyle) {\n          if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle;\n          else innerToken = curInner.innerStyle;\n        }\n\n        return innerToken;\n      }\n    },\n\n    indent: function(state, textAfter) {\n      var mode = state.innerActive ? state.innerActive.mode : outer;\n      if (!mode.indent) return CodeMirror.Pass;\n      return mode.indent(state.innerActive ? state.inner : state.outer, textAfter);\n    },\n\n    blankLine: function(state) {\n      var mode = state.innerActive ? state.innerActive.mode : outer;\n      if (mode.blankLine) {\n        mode.blankLine(state.innerActive ? state.inner : state.outer);\n      }\n      if (!state.innerActive) {\n        for (var i = 0; i < others.length; ++i) {\n          var other = others[i];\n          if (other.open === \"\\n\") {\n            state.innerActive = other;\n            state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, \"\") : 0);\n          }\n        }\n      } else if (state.innerActive.close === \"\\n\") {\n        state.innerActive = state.inner = null;\n      }\n    },\n\n    electricChars: outer.electricChars,\n\n    innerMode: function(state) {\n      return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};\n    }\n  };\n};\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/python/python',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function wordRegexp(words) {\n    return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\");\n  }\n\n  var wordOperators = wordRegexp([\"and\", \"or\", \"not\", \"is\"]);\n  var commonKeywords = [\"as\", \"assert\", \"break\", \"class\", \"continue\",\n                        \"def\", \"del\", \"elif\", \"else\", \"except\", \"finally\",\n                        \"for\", \"from\", \"global\", \"if\", \"import\",\n                        \"lambda\", \"pass\", \"raise\", \"return\",\n                        \"try\", \"while\", \"with\", \"yield\", \"in\"];\n  var commonBuiltins = [\"abs\", \"all\", \"any\", \"bin\", \"bool\", \"bytearray\", \"callable\", \"chr\",\n                        \"classmethod\", \"compile\", \"complex\", \"delattr\", \"dict\", \"dir\", \"divmod\",\n                        \"enumerate\", \"eval\", \"filter\", \"float\", \"format\", \"frozenset\",\n                        \"getattr\", \"globals\", \"hasattr\", \"hash\", \"help\", \"hex\", \"id\",\n                        \"input\", \"int\", \"isinstance\", \"issubclass\", \"iter\", \"len\",\n                        \"list\", \"locals\", \"map\", \"max\", \"memoryview\", \"min\", \"next\",\n                        \"object\", \"oct\", \"open\", \"ord\", \"pow\", \"property\", \"range\",\n                        \"repr\", \"reversed\", \"round\", \"set\", \"setattr\", \"slice\",\n                        \"sorted\", \"staticmethod\", \"str\", \"sum\", \"super\", \"tuple\",\n                        \"type\", \"vars\", \"zip\", \"__import__\", \"NotImplemented\",\n                        \"Ellipsis\", \"__debug__\"];\n  var py2 = {builtins: [\"apply\", \"basestring\", \"buffer\", \"cmp\", \"coerce\", \"execfile\",\n                        \"file\", \"intern\", \"long\", \"raw_input\", \"reduce\", \"reload\",\n                        \"unichr\", \"unicode\", \"xrange\", \"False\", \"True\", \"None\"],\n             keywords: [\"exec\", \"print\"]};\n  var py3 = {builtins: [\"ascii\", \"bytes\", \"exec\", \"print\"],\n             keywords: [\"nonlocal\", \"False\", \"True\", \"None\", \"async\", \"await\"]};\n\n  CodeMirror.registerHelper(\"hintWords\", \"python\", commonKeywords.concat(commonBuiltins));\n\n  function top(state) {\n    return state.scopes[state.scopes.length - 1];\n  }\n\n  CodeMirror.defineMode(\"python\", function(conf, parserConf) {\n    var ERRORCLASS = \"error\";\n\n    var singleDelimiters = parserConf.singleDelimiters || new RegExp(\"^[\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}@,:`=;\\\\.]\");\n    var doubleOperators = parserConf.doubleOperators || new RegExp(\"^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\\\*\\\\*))\");\n    var doubleDelimiters = parserConf.doubleDelimiters || new RegExp(\"^((\\\\+=)|(\\\\-=)|(\\\\*=)|(%=)|(/=)|(&=)|(\\\\|=)|(\\\\^=))\");\n    var tripleDelimiters = parserConf.tripleDelimiters || new RegExp(\"^((//=)|(>>=)|(<<=)|(\\\\*\\\\*=))\");\n\n    if (parserConf.version && parseInt(parserConf.version, 10) == 3){\n        // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator\n        var singleOperators = parserConf.singleOperators || new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!@]\");\n        var identifiers = parserConf.identifiers|| new RegExp(\"^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*\");\n    } else {\n        var singleOperators = parserConf.singleOperators || new RegExp(\"^[\\\\+\\\\-\\\\*/%&|\\\\^~<>!]\");\n        var identifiers = parserConf.identifiers|| new RegExp(\"^[_A-Za-z][_A-Za-z0-9]*\");\n    }\n\n    var hangingIndent = parserConf.hangingIndent || conf.indentUnit;\n\n    var myKeywords = commonKeywords, myBuiltins = commonBuiltins;\n    if(parserConf.extra_keywords != undefined){\n      myKeywords = myKeywords.concat(parserConf.extra_keywords);\n    }\n    if(parserConf.extra_builtins != undefined){\n      myBuiltins = myBuiltins.concat(parserConf.extra_builtins);\n    }\n    if (parserConf.version && parseInt(parserConf.version, 10) == 3) {\n      myKeywords = myKeywords.concat(py3.keywords);\n      myBuiltins = myBuiltins.concat(py3.builtins);\n      var stringPrefixes = new RegExp(\"^(([rb]|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    } else {\n      myKeywords = myKeywords.concat(py2.keywords);\n      myBuiltins = myBuiltins.concat(py2.builtins);\n      var stringPrefixes = new RegExp(\"^(([rub]|(ur)|(br))?('{3}|\\\"{3}|['\\\"]))\", \"i\");\n    }\n    var keywords = wordRegexp(myKeywords);\n    var builtins = wordRegexp(myBuiltins);\n\n    // tokenizers\n    function tokenBase(stream, state) {\n      // Handle scope changes\n      if (stream.sol() && top(state).type == \"py\") {\n        var scopeOffset = top(state).offset;\n        if (stream.eatSpace()) {\n          var lineOffset = stream.indentation();\n          if (lineOffset > scopeOffset)\n            pushScope(stream, state, \"py\");\n          else if (lineOffset < scopeOffset && dedent(stream, state))\n            state.errorToken = true;\n          return null;\n        } else {\n          var style = tokenBaseInner(stream, state);\n          if (scopeOffset > 0 && dedent(stream, state))\n            style += \" \" + ERRORCLASS;\n          return style;\n        }\n      }\n      return tokenBaseInner(stream, state);\n    }\n\n    function tokenBaseInner(stream, state) {\n      if (stream.eatSpace()) return null;\n\n      var ch = stream.peek();\n\n      // Handle Comments\n      if (ch == \"#\") {\n        stream.skipToEnd();\n        return \"comment\";\n      }\n\n      // Handle Number Literals\n      if (stream.match(/^[0-9\\.]/, false)) {\n        var floatLiteral = false;\n        // Floats\n        if (stream.match(/^\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) { floatLiteral = true; }\n        if (stream.match(/^\\d+\\.\\d*/)) { floatLiteral = true; }\n        if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n        if (floatLiteral) {\n          // Float literals may be \"imaginary\"\n          stream.eat(/J/i);\n          return \"number\";\n        }\n        // Integers\n        var intLiteral = false;\n        // Hex\n        if (stream.match(/^0x[0-9a-f]+/i)) intLiteral = true;\n        // Binary\n        if (stream.match(/^0b[01]+/i)) intLiteral = true;\n        // Octal\n        if (stream.match(/^0o[0-7]+/i)) intLiteral = true;\n        // Decimal\n        if (stream.match(/^[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n          // Decimal literals may be \"imaginary\"\n          stream.eat(/J/i);\n          // TODO - Can you have imaginary longs?\n          intLiteral = true;\n        }\n        // Zero by itself with no other piece of number.\n        if (stream.match(/^0(?![\\dx])/i)) intLiteral = true;\n        if (intLiteral) {\n          // Integer literals may be \"long\"\n          stream.eat(/L/i);\n          return \"number\";\n        }\n      }\n\n      // Handle Strings\n      if (stream.match(stringPrefixes)) {\n        state.tokenize = tokenStringFactory(stream.current());\n        return state.tokenize(stream, state);\n      }\n\n      // Handle operators and Delimiters\n      if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters))\n        return null;\n\n      if (stream.match(doubleOperators) || stream.match(singleOperators))\n        return \"operator\";\n\n      if (stream.match(singleDelimiters))\n        return null;\n\n      if (stream.match(keywords) || stream.match(wordOperators))\n        return \"keyword\";\n\n      if (stream.match(builtins))\n        return \"builtin\";\n\n      if (stream.match(/^(self|cls)\\b/))\n        return \"variable-2\";\n\n      if (stream.match(identifiers)) {\n        if (state.lastToken == \"def\" || state.lastToken == \"class\")\n          return \"def\";\n        return \"variable\";\n      }\n\n      // Handle non-detected items\n      stream.next();\n      return ERRORCLASS;\n    }\n\n    function tokenStringFactory(delimiter) {\n      while (\"rub\".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)\n        delimiter = delimiter.substr(1);\n\n      var singleline = delimiter.length == 1;\n      var OUTCLASS = \"string\";\n\n      function tokenString(stream, state) {\n        while (!stream.eol()) {\n          stream.eatWhile(/[^'\"\\\\]/);\n          if (stream.eat(\"\\\\\")) {\n            stream.next();\n            if (singleline && stream.eol())\n              return OUTCLASS;\n          } else if (stream.match(delimiter)) {\n            state.tokenize = tokenBase;\n            return OUTCLASS;\n          } else {\n            stream.eat(/['\"]/);\n          }\n        }\n        if (singleline) {\n          if (parserConf.singleLineStringErrors)\n            return ERRORCLASS;\n          else\n            state.tokenize = tokenBase;\n        }\n        return OUTCLASS;\n      }\n      tokenString.isString = true;\n      return tokenString;\n    }\n\n    function pushScope(stream, state, type) {\n      var offset = 0, align = null;\n      if (type == \"py\") {\n        while (top(state).type != \"py\")\n          state.scopes.pop();\n      }\n      offset = top(state).offset + (type == \"py\" ? conf.indentUnit : hangingIndent);\n      if (type != \"py\" && !stream.match(/^(\\s|#.*)*$/, false))\n        align = stream.column() + 1;\n      state.scopes.push({offset: offset, type: type, align: align});\n    }\n\n    function dedent(stream, state) {\n      var indented = stream.indentation();\n      while (top(state).offset > indented) {\n        if (top(state).type != \"py\") return true;\n        state.scopes.pop();\n      }\n      return top(state).offset != indented;\n    }\n\n    function tokenLexer(stream, state) {\n      var style = state.tokenize(stream, state);\n      var current = stream.current();\n\n      // Handle '.' connected identifiers\n      if (current == \".\") {\n        style = stream.match(identifiers, false) ? null : ERRORCLASS;\n        if (style == null && state.lastStyle == \"meta\") {\n          // Apply 'meta' style to '.' connected identifiers when\n          // appropriate.\n          style = \"meta\";\n        }\n        return style;\n      }\n\n      // Handle decorators\n      if (current == \"@\"){\n        if(parserConf.version && parseInt(parserConf.version, 10) == 3){\n            return stream.match(identifiers, false) ? \"meta\" : \"operator\";\n        } else {\n            return stream.match(identifiers, false) ? \"meta\" : ERRORCLASS;\n        }\n      }\n\n      if ((style == \"variable\" || style == \"builtin\")\n          && state.lastStyle == \"meta\")\n        style = \"meta\";\n\n      // Handle scope changes.\n      if (current == \"pass\" || current == \"return\")\n        state.dedent += 1;\n\n      if (current == \"lambda\") state.lambda = true;\n      if (current == \":\" && !state.lambda && top(state).type == \"py\")\n        pushScope(stream, state, \"py\");\n\n      var delimiter_index = current.length == 1 ? \"[({\".indexOf(current) : -1;\n      if (delimiter_index != -1)\n        pushScope(stream, state, \"])}\".slice(delimiter_index, delimiter_index+1));\n\n      delimiter_index = \"])}\".indexOf(current);\n      if (delimiter_index != -1) {\n        if (top(state).type == current) state.scopes.pop();\n        else return ERRORCLASS;\n      }\n      if (state.dedent > 0 && stream.eol() && top(state).type == \"py\") {\n        if (state.scopes.length > 1) state.scopes.pop();\n        state.dedent -= 1;\n      }\n\n      return style;\n    }\n\n    var external = {\n      startState: function(basecolumn) {\n        return {\n          tokenize: tokenBase,\n          scopes: [{offset: basecolumn || 0, type: \"py\", align: null}],\n          lastStyle: null,\n          lastToken: null,\n          lambda: false,\n          dedent: 0\n        };\n      },\n\n      token: function(stream, state) {\n        var addErr = state.errorToken;\n        if (addErr) state.errorToken = false;\n        var style = tokenLexer(stream, state);\n\n        state.lastStyle = style;\n\n        var current = stream.current();\n        if (current && style)\n          state.lastToken = current;\n\n        if (stream.eol() && state.lambda)\n          state.lambda = false;\n        return addErr ? style + \" \" + ERRORCLASS : style;\n      },\n\n      indent: function(state, textAfter) {\n        if (state.tokenize != tokenBase)\n          return state.tokenize.isString ? CodeMirror.Pass : 0;\n\n        var scope = top(state);\n        var closing = textAfter && textAfter.charAt(0) == scope.type;\n        if (scope.align != null)\n          return scope.align - (closing ? 1 : 0);\n        else if (closing && state.scopes.length > 1)\n          return state.scopes[state.scopes.length - 2].offset;\n        else\n          return scope.offset;\n      },\n\n      closeBrackets: {triples: \"'\\\"\"},\n      lineComment: \"#\",\n      fold: \"indent\"\n    };\n    return external;\n  });\n\n  CodeMirror.defineMIME(\"text/x-python\", \"python\");\n\n  var words = function(str) { return str.split(\" \"); };\n\n  CodeMirror.defineMIME(\"text/x-cython\", {\n    name: \"python\",\n    extra_keywords: words(\"by cdef cimport cpdef ctypedef enum except\"+\n                          \"extern gil include nogil property public\"+\n                          \"readonly struct union DEF IF ELIF ELSE\")\n  });\n\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/*\n * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)\n * Licence: MIT\n */\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/mode/stex/stex',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineMode(\"stex\", function() {\n    \"use strict\";\n\n    function pushCommand(state, command) {\n      state.cmdState.push(command);\n    }\n\n    function peekCommand(state) {\n      if (state.cmdState.length > 0) {\n        return state.cmdState[state.cmdState.length - 1];\n      } else {\n        return null;\n      }\n    }\n\n    function popCommand(state) {\n      var plug = state.cmdState.pop();\n      if (plug) {\n        plug.closeBracket();\n      }\n    }\n\n    // returns the non-default plugin closest to the end of the list\n    function getMostPowerful(state) {\n      var context = state.cmdState;\n      for (var i = context.length - 1; i >= 0; i--) {\n        var plug = context[i];\n        if (plug.name == \"DEFAULT\") {\n          continue;\n        }\n        return plug;\n      }\n      return { styleIdentifier: function() { return null; } };\n    }\n\n    function addPluginPattern(pluginName, cmdStyle, styles) {\n      return function () {\n        this.name = pluginName;\n        this.bracketNo = 0;\n        this.style = cmdStyle;\n        this.styles = styles;\n        this.argument = null;   // \\begin and \\end have arguments that follow. These are stored in the plugin\n\n        this.styleIdentifier = function() {\n          return this.styles[this.bracketNo - 1] || null;\n        };\n        this.openBracket = function() {\n          this.bracketNo++;\n          return \"bracket\";\n        };\n        this.closeBracket = function() {};\n      };\n    }\n\n    var plugins = {};\n\n    plugins[\"importmodule\"] = addPluginPattern(\"importmodule\", \"tag\", [\"string\", \"builtin\"]);\n    plugins[\"documentclass\"] = addPluginPattern(\"documentclass\", \"tag\", [\"\", \"atom\"]);\n    plugins[\"usepackage\"] = addPluginPattern(\"usepackage\", \"tag\", [\"atom\"]);\n    plugins[\"begin\"] = addPluginPattern(\"begin\", \"tag\", [\"atom\"]);\n    plugins[\"end\"] = addPluginPattern(\"end\", \"tag\", [\"atom\"]);\n\n    plugins[\"DEFAULT\"] = function () {\n      this.name = \"DEFAULT\";\n      this.style = \"tag\";\n\n      this.styleIdentifier = this.openBracket = this.closeBracket = function() {};\n    };\n\n    function setState(state, f) {\n      state.f = f;\n    }\n\n    // called when in a normal (no environment) context\n    function normal(source, state) {\n      var plug;\n      // Do we look like '\\command' ?  If so, attempt to apply the plugin 'command'\n      if (source.match(/^\\\\[a-zA-Z@]+/)) {\n        var cmdName = source.current().slice(1);\n        plug = plugins[cmdName] || plugins[\"DEFAULT\"];\n        plug = new plug();\n        pushCommand(state, plug);\n        setState(state, beginParams);\n        return plug.style;\n      }\n\n      // escape characters\n      if (source.match(/^\\\\[$&%#{}_]/)) {\n        return \"tag\";\n      }\n\n      // white space control characters\n      if (source.match(/^\\\\[,;!\\/\\\\]/)) {\n        return \"tag\";\n      }\n\n      // find if we're starting various math modes\n      if (source.match(\"\\\\[\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"\\\\]\"); });\n        return \"keyword\";\n      }\n      if (source.match(\"$$\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"$$\"); });\n        return \"keyword\";\n      }\n      if (source.match(\"$\")) {\n        setState(state, function(source, state){ return inMathMode(source, state, \"$\"); });\n        return \"keyword\";\n      }\n\n      var ch = source.next();\n      if (ch == \"%\") {\n        source.skipToEnd();\n        return \"comment\";\n      } else if (ch == '}' || ch == ']') {\n        plug = peekCommand(state);\n        if (plug) {\n          plug.closeBracket(ch);\n          setState(state, beginParams);\n        } else {\n          return \"error\";\n        }\n        return \"bracket\";\n      } else if (ch == '{' || ch == '[') {\n        plug = plugins[\"DEFAULT\"];\n        plug = new plug();\n        pushCommand(state, plug);\n        return \"bracket\";\n      } else if (/\\d/.test(ch)) {\n        source.eatWhile(/[\\w.%]/);\n        return \"atom\";\n      } else {\n        source.eatWhile(/[\\w\\-_]/);\n        plug = getMostPowerful(state);\n        if (plug.name == 'begin') {\n          plug.argument = source.current();\n        }\n        return plug.styleIdentifier();\n      }\n    }\n\n    function inMathMode(source, state, endModeSeq) {\n      if (source.eatSpace()) {\n        return null;\n      }\n      if (source.match(endModeSeq)) {\n        setState(state, normal);\n        return \"keyword\";\n      }\n      if (source.match(/^\\\\[a-zA-Z@]+/)) {\n        return \"tag\";\n      }\n      if (source.match(/^[a-zA-Z]+/)) {\n        return \"variable-2\";\n      }\n      // escape characters\n      if (source.match(/^\\\\[$&%#{}_]/)) {\n        return \"tag\";\n      }\n      // white space control characters\n      if (source.match(/^\\\\[,;!\\/]/)) {\n        return \"tag\";\n      }\n      // special math-mode characters\n      if (source.match(/^[\\^_&]/)) {\n        return \"tag\";\n      }\n      // non-special characters\n      if (source.match(/^[+\\-<>|=,\\/@!*:;'\"`~#?]/)) {\n        return null;\n      }\n      if (source.match(/^(\\d+\\.\\d*|\\d*\\.\\d+|\\d+)/)) {\n        return \"number\";\n      }\n      var ch = source.next();\n      if (ch == \"{\" || ch == \"}\" || ch == \"[\" || ch == \"]\" || ch == \"(\" || ch == \")\") {\n        return \"bracket\";\n      }\n\n      if (ch == \"%\") {\n        source.skipToEnd();\n        return \"comment\";\n      }\n      return \"error\";\n    }\n\n    function beginParams(source, state) {\n      var ch = source.peek(), lastPlug;\n      if (ch == '{' || ch == '[') {\n        lastPlug = peekCommand(state);\n        lastPlug.openBracket(ch);\n        source.eat(ch);\n        setState(state, normal);\n        return \"bracket\";\n      }\n      if (/[ \\t\\r]/.test(ch)) {\n        source.eat(ch);\n        return null;\n      }\n      setState(state, normal);\n      popCommand(state);\n\n      return normal(source, state);\n    }\n\n    return {\n      startState: function() {\n        return {\n          cmdState: [],\n          f: normal\n        };\n      },\n      copyState: function(s) {\n        return {\n          cmdState: s.cmdState.slice(),\n          f: s.f\n        };\n      },\n      token: function(stream, state) {\n        return state.f(stream, state);\n      },\n      blankLine: function(state) {\n        state.f = normal;\n        state.cmdState.length = 0;\n      },\n      lineComment: \"%\"\n    };\n  });\n\n  CodeMirror.defineMIME(\"text/x-stex\", \"stex\");\n  CodeMirror.defineMIME(\"text/x-latex\", \"stex\");\n\n});\n\n",
    "// IPython GFM (GitHub Flavored Markdown) mode is just a slightly altered GFM\n// Mode with support for latex.\n//\n// Latex support was supported by Codemirror GFM as of\n//   https://github.com/codemirror/CodeMirror/pull/567\n// But was later removed in\n//   https://github.com/codemirror/CodeMirror/commit/d9c9f1b1ffe984aee41307f3e927f80d1f23590c\n\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\"){ // CommonJS\n    mod(require(\"codemirror/lib/codemirror\")\n        ,require(\"codemirror/addon/mode/multiplex\")\n        ,require(\"codemirror/mode/gfm/gfm\")\n        ,require(\"codemirror/mode/stex/stex\")\n        );\n  } else if (typeof define == \"function\" && define.amd){ // AMD\n    define('notebook/js/codemirror-ipythongfm',[\"codemirror/lib/codemirror\"\n            ,\"codemirror/addon/mode/multiplex\"\n            ,\"codemirror/mode/python/python\"\n            ,\"codemirror/mode/stex/stex\"\n            ], mod);\n  } else {// Plain browser env\n    mod(CodeMirror);\n  }\n})( function(CodeMirror){\n    \"use strict\";\n\n    CodeMirror.defineMode(\"ipythongfm\", function(config, parserConfig) {\n\n        var gfm_mode = CodeMirror.getMode(config, \"gfm\");\n        var tex_mode = CodeMirror.getMode(config, \"stex\");\n\n        return CodeMirror.multiplexingMode(\n            gfm_mode,\n            // By defining the $$ delimiter before the $ delimiter we don't run\n            // into the problem that $$ is interpreted as two consecutive $.\n            {\n                open: \"$$\", close: \"$$\",\n                mode: tex_mode,\n                delimStyle: \"delimit\"\n            },\n            {\n                open: \"$\", close: \"$\",\n                mode: tex_mode,\n                delimStyle: \"delimit\"\n            },\n            {\n                open: \"\\\\(\", close: \"\\\\)\",\n                mode: tex_mode,\n                delimStyle: \"delimit\"\n            },\n            {\n                open: \"\\\\[\", close: \"\\\\]\",\n                mode: tex_mode,\n                delimStyle: \"delimit\"\n            }\n            // .. more multiplexed styles can follow here\n        );\n    }, 'gfm');\n\n    CodeMirror.defineMIME(\"text/x-ipythongfm\", \"ipythongfm\");\n})\n;\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/textcell',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'notebook/js/cell',\n    'base/js/security',\n    'services/config',\n    'notebook/js/mathjaxutils',\n    'notebook/js/celltoolbar',\n    'components/marked/lib/marked',\n    'codemirror/lib/codemirror',\n    'codemirror/mode/gfm/gfm',\n    'notebook/js/codemirror-ipythongfm'\n], function(\n    $,\n    utils,\n    i18n,\n    cell,\n    security,\n    configmod,\n    mathjaxutils,\n    celltoolbar,\n    marked,\n    CodeMirror,\n    gfm,\n    ipgfm\n    ) {\n    \"use strict\";\n    function encodeURIandParens(uri){return encodeURI(uri).replace('(','%28').replace(')','%29')}\n\n    var Cell = cell.Cell;\n\n    var TextCell = function (options) {\n        /**\n         * Constructor\n         *\n         * Construct a new TextCell, codemirror mode is by default 'htmlmixed', \n         * and cell type is 'text' cell start as not redered.\n         *\n         * Parameters:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance \n         *          config: dictionary\n         *          keyboard_manager: KeyboardManager instance \n         *          notebook: Notebook instance\n         */\n        options = options || {};\n\n        // in all TextCell/Cell subclasses\n        // do not assign most of members here, just pass it down\n        // in the options dict potentially overwriting what you wish.\n        // they will be assigned in the base class.\n        this.notebook = options.notebook;\n        this.events = options.events;\n        this.config = options.config;\n        this.notebook = options.notebook;\n        \n        // we cannot put this as a class key as it has handle to \"this\".\n        Cell.apply(this, [{\n                    config: options.config, \n                    keyboard_manager: options.keyboard_manager, \n                    events: this.events}]);\n\n        this.cell_type = this.cell_type || 'text';\n        mathjaxutils = mathjaxutils;\n        this.rendered = false;\n    };\n\n    TextCell.prototype = Object.create(Cell.prototype);\n\n    TextCell.options_default = {\n        cm_config : {\n            mode: 'htmlmixed',\n            lineWrapping : true,\n        }\n    };\n\n\n    /**\n     * Create the DOM element of the TextCell\n     * @method create_element\n     * @private\n     */\n    TextCell.prototype.create_element = function () {\n        Cell.prototype.create_element.apply(this, arguments);\n        var that = this;\n\n        var cell = $(\"<div>\").addClass('cell text_cell');\n        cell.attr('tabindex','2');\n\n        var prompt = $('<div/>').addClass('prompt input_prompt');\n        cell.append(prompt);\n        var inner_cell = $('<div/>').addClass('inner_cell');\n        this.celltoolbar = new celltoolbar.CellToolbar({\n            cell: this, \n            notebook: this.notebook});\n        inner_cell.append(this.celltoolbar.element);\n        var input_area = $('<div/>').addClass('input_area');\n        this.code_mirror = new CodeMirror(input_area.get(0), this._options.cm_config);\n        // In case of bugs that put the keyboard manager into an inconsistent state,\n        // ensure KM is enabled when CodeMirror is focused:\n        this.code_mirror.on('focus', function () {\n            if (that.keyboard_manager) {\n                that.keyboard_manager.enable();\n            }\n            that.code_mirror.setOption('readOnly', !that.is_editable());\n        });\n        this.code_mirror.on('keydown', $.proxy(this.handle_keyevent,this))\n        // The tabindex=-1 makes this div focusable.\n        var render_area = $('<div/>').addClass('text_cell_render rendered_html')\n            .attr('tabindex','-1');\n        inner_cell.append(input_area).append(render_area);\n        cell.append(inner_cell);\n        this.element = cell;\n        this.inner_cell = inner_cell;\n    };\n\n\n    // Cell level actions\n\n    TextCell.prototype.add_attachment = function (key, mime_type, b64_data) {\n        /**\n         * Add a new attachment to this cell\n         */\n        this.attachments[key] = {};\n        this.attachments[key][mime_type] = b64_data;\n    };\n\n    TextCell.prototype.select = function () {\n        var cont = Cell.prototype.select.apply(this, arguments);\n        if (cont) {\n            if (this.mode === 'edit') {\n                this.code_mirror.refresh();\n            }\n        }\n        return cont;\n    };\n\n    TextCell.prototype.unrender = function () {\n        var cont = Cell.prototype.unrender.apply(this);\n        if (cont) {\n            var text_cell = this.element;\n            if (this.get_text() === this.placeholder) {\n                this.set_text('');\n            }\n            this.refresh();\n        }\n        return cont;\n    };\n\n    TextCell.prototype.execute = function () {\n        this.render();\n    };\n\n    /**\n     * setter: {{#crossLink \"TextCell/set_text\"}}{{/crossLink}}\n     * @method get_text\n     * @retrun {string} CodeMirror current text value\n     */\n    TextCell.prototype.get_text = function() {\n        return this.code_mirror.getValue();\n    };\n\n    /**\n     * @param {string} text - Codemiror text value\n     * @see TextCell#get_text\n     * @method set_text\n     * */\n    TextCell.prototype.set_text = function(text) {\n        this.code_mirror.setValue(text);\n        this.unrender();\n        this.code_mirror.refresh();\n    };\n\n    /**\n     * setter :{{#crossLink \"TextCell/set_rendered\"}}{{/crossLink}}\n     * @method get_rendered\n     * */\n    TextCell.prototype.get_rendered = function() {\n        return this.element.find('div.text_cell_render').html();\n    };\n\n    /**\n     * @method set_rendered\n     */\n    TextCell.prototype.set_rendered = function(text) {\n        this.element.find('div.text_cell_render').html(text);\n    };\n\n\n    /**\n     * Create Text cell from JSON\n     * @param {json} data - JSON serialized text-cell\n     * @method fromJSON\n     */\n    TextCell.prototype.fromJSON = function (data) {\n        Cell.prototype.fromJSON.apply(this, arguments);\n        if (data.cell_type === this.cell_type) {\n            if (data.attachments !== undefined) {\n                this.attachments = data.attachments;\n            }\n\n            if (data.source !== undefined) {\n                this.set_text(data.source);\n                // make this value the starting point, so that we can only undo\n                // to this state, instead of a blank cell\n                this.code_mirror.clearHistory();\n                // TODO: This HTML needs to be treated as potentially dangerous\n                // user input and should be handled before set_rendered.\n                this.set_rendered(data.rendered || '');\n                this.rendered = false;\n                this.render();\n            }\n        }\n    };\n\n    /** Generate JSON from cell\n     * @param {bool} gc_attachments - If true, will remove unused attachments\n     *               from the returned JSON\n     * @return {object} cell data serialised to json\n     */\n    TextCell.prototype.toJSON = function (gc_attachments) {\n        if (gc_attachments === undefined) {\n            gc_attachments = false;\n        }\n\n        var data = Cell.prototype.toJSON.apply(this);\n        data.source = this.get_text();\n        if (data.source == this.placeholder) {\n            data.source = \"\";\n        }\n\n        // We deepcopy the attachments so copied cells don't share the same\n        // objects\n        if (Object.keys(this.attachments).length > 0) {\n            if (gc_attachments) {\n                // Garbage collect unused attachments : The general idea is to\n                // render the text, and find used attachments like when we\n                // substitute them in render()\n                var that = this;\n                data.attachments = {};\n                // To find attachments, rendering to HTML is easier than\n                // searching in the markdown source for the multiple ways you\n                // can reference an image in markdown (using []() or a\n                // HTML <img>)\n                var text = this.get_text();\n                marked(text, function (err, html) {\n                    html = security.sanitize_html(html);\n                    html = $($.parseHTML(html));\n                    html.find('img[src^=\"attachment:\"]').each(function (i, h) {\n                        h = $(h);\n                        var key = h.attr('src').replace(/^attachment:/, '');\n                        if (that.attachments.hasOwnProperty(key)) {\n                            data.attachments[key] = JSON.parse(JSON.stringify(\n                                that.attachments[key]));\n                        }\n\n                        // This is to avoid having the browser do a GET request\n                        // on the invalid attachment: URL\n                        h.attr('src', '');\n                    });\n                });\n                if (data.attachments.length === 0) {\n                    // omit attachments dict if no attachments\n                    delete data.attachments;\n                }\n            } else {\n                data.attachments = JSON.parse(JSON.stringify(this.attachments));\n            }\n        }\n        return data;\n    };\n\n\n    var MarkdownCell = function (options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance \n         *          config: ConfigSection instance\n         *          keyboard_manager: KeyboardManager instance \n         *          notebook: Notebook instance\n         */\n        options = options || {};\n        var config_default = utils.mergeopt(TextCell, MarkdownCell.options_default);\n        this.class_config = new configmod.ConfigWithDefaults(options.config,\n                                            config_default, 'MarkdownCell');\n        TextCell.apply(this, [$.extend({}, options, {config: options.config})]);\n\n        this.cell_type = 'markdown';\n\n        // Used to keep track of drag events\n        this.drag_counter = 0;\n    };\n\n    MarkdownCell.options_default = {\n        cm_config: {\n            mode: 'ipythongfm'\n        },\n        placeholder: \"Type *Markdown* and LaTeX: $\\\\alpha^2$\"\n    };\n\n    MarkdownCell.prototype = Object.create(TextCell.prototype);\n\n    MarkdownCell.prototype.set_heading_level = function (level) {\n        /**\n         * make a markdown cell a heading\n         */\n        level = level || 1;\n        var source = this.get_text();\n        source = source.replace(/^(#*)\\s?/,\n            new Array(level + 1).join('#') + ' ');\n        this.set_text(source);\n        this.refresh();\n        if (this.rendered) {\n            this.render();\n        }\n    };\n\n    MarkdownCell.prototype.select = function () {\n        var cont = TextCell.prototype.select.apply(this, arguments);\n        if (cont) {\n            this.notebook.set_insert_image_enabled(!this.rendered);\n        }\n    };\n\n    MarkdownCell.prototype.unrender = function () {\n        var cont = TextCell.prototype.unrender.apply(this);\n        this.notebook.set_insert_image_enabled(true);\n    };\n\n    MarkdownCell.prototype.insert_inline_image_from_blob = function(blob) {\n        /**\n         * Insert markup for an inline image at the current cursor position.\n         * This works as follow :\n         * - We insert the base64-encoded blob data into the cell attachments\n         *   dictionary, keyed by the filename.\n         * - We insert an img tag with a 'attachment:key' src that refers to\n         *   the attachments entry.\n         *\n         * Parameters:\n         *  file: Blob\n         *      The JS Blob object (e.g. from the DataTransferItem)\n         */\n        var that = this;\n        var pos = this.code_mirror.getCursor();\n        var reader = new FileReader();\n        // We can get either a named file (drag'n'drop) or a blob (copy/paste)\n        // We generate names for blobs\n        var key;\n        if (blob.name !== undefined) {\n            key = encodeURIandParens(blob.name);\n        } else {\n            key = '_auto_' + Object.keys(that.attachments).length;\n        }\n\n        reader.onloadend = function() {\n            var d = utils.parse_b64_data_uri(reader.result);\n            if (blob.type != d[0]) {\n                // TODO(julienr): Not sure what we should do in this case\n                console.log('File type (' + blob.type + ') != data-uri ' +\n                            'type (' + d[0] + ')');\n            }\n            that.add_attachment(key, blob.type, d[1]);\n            var img_md = '![' + key + '](attachment:' + key + ')';\n            that.code_mirror.replaceRange(img_md, pos);\n        }\n        reader.readAsDataURL(blob);\n    };\n\n    /**\n     * @method render\n     */\n    MarkdownCell.prototype.render = function () {\n        // We clear the dropzone here just in case the dragenter/leave\n        // logic of bind_events wasn't 100% successful.\n        this.drag_counter = 0;\n        this.inner_cell.removeClass('dropzone');\n\n        var cont = TextCell.prototype.render.apply(this);\n        if (cont) {\n            var that = this;\n            var text = this.get_text();\n            var math = null;\n            if (text === \"\") { text = this.placeholder; }\n            var text_and_math = mathjaxutils.remove_math(text);\n            text = text_and_math[0];\n            math = text_and_math[1];\n            // Prevent marked from returning inline styles for table cells\n            var renderer = new marked.Renderer();\n            renderer.tablecell = function (content, flags) {\n              var type = flags.header ? 'th' : 'td';\n              var start_tag = '<' + type + '>';\n              var end_tag = '</' + type + '>\\n';\n              return start_tag + content + end_tag;\n            };\n            marked(text, { renderer: renderer }, function (err, html) {\n                html = mathjaxutils.replace_math(html, math);\n                html = security.sanitize_html(html);\n                html = $($.parseHTML(html));\n                // add anchors to headings\n                html.find(\":header\").addBack(\":header\").each(function (i, h) {\n                    h = $(h);\n                    var hash = h.text().replace(/ /g, '-');\n                    h.attr('id', hash);\n                    h.append(\n                        $('<a/>')\n                            .addClass('anchor-link')\n                            .attr('href', '#' + hash)\n                            .text('¶')\n                            .on('click',function(){\n                                setTimeout(function(){that.unrender(); that.render()}, 100)\n                            })\n                    );\n                });\n                // links in markdown cells should open in new tabs\n                html.find(\"a[href]\").not('[href^=\"#\"]').attr(\"target\", \"_blank\");\n                // replace attachment:<key> by the corresponding entry\n                // in the cell's attachments\n                html.find('img[src^=\"attachment:\"]').each(function (i, h) {\n                  h = $(h);\n                  var key = h.attr('src').replace(/^attachment:/, '');\n\n                  if (that.attachments.hasOwnProperty(key)) {\n                    var att = that.attachments[key];\n                    var mime = Object.keys(att)[0];\n                    h.attr('src', 'data:' + mime + ';base64,' + att[mime]);\n                  } else {\n                    h.attr('src', '');\n                  }\n                });\n                that.set_rendered(html);\n                that.typeset();\n                that.events.trigger(\"rendered.MarkdownCell\", {cell: that});\n            });\n        }\n        return cont;\n    };\n\n    /** @method bind_events **/\n    MarkdownCell.prototype.bind_events = function () {\n        TextCell.prototype.bind_events.apply(this);\n        var that = this;\n\n        this.element.dblclick(function () {\n            var cont = that.unrender();\n            if (cont) {\n                that.focus_editor();\n            }\n        });\n\n        var attachment_regex = /^image\\/.*$/;\n\n        // Event handlers to allow users to insert image using either\n        // drag'n'drop or copy/paste\n        var div = that.code_mirror.getWrapperElement();\n        $(div).on('paste', function(evt) {\n            var data = evt.originalEvent.clipboardData;\n            var items = data.items;\n            if (data.items !== undefined) {\n                for (var i = 0; i < items.length; ++i) {\n                    var item = items[i];\n                    if (item.kind == 'file' && attachment_regex.test(item.type)) {\n                        // TODO(julienr): This does not stop code_mirror from pasting\n                        // the filename.\n                        evt.stopPropagation();\n                        evt.preventDefault();\n                        that.insert_inline_image_from_blob(item.getAsFile());\n                    }\n                }\n            }\n        });\n\n        // Allow drag event if the dragged file can be used as an attachment\n        // If we use this.code_mirror.on to register a \"dragover\" handler, we\n        // get an empty dataTransfer\n        this.code_mirror.on(\"dragover\", function(cm, evt) {\n            if (utils.dnd_contain_file(evt)) {\n                evt.preventDefault();\n            }\n        });\n\n        // We want to display a visual indicator that the drop is possible.\n        // The dragleave event is fired when we hover a child element (which\n        // is often immediatly after we got the dragenter), so we keep track\n        // of the number of dragenter/dragleave we got, as discussed here :\n        // http://stackoverflow.com/q/7110353/116067\n        // This doesn't seem to be 100% reliable, so we clear the dropzone\n        // class when the cell is rendered as well\n        this.code_mirror.on(\"dragenter\", function(cm, evt) {\n            if (utils.dnd_contain_file(evt)) {\n                that.drag_counter++;\n                that.inner_cell.addClass('dropzone');\n            }\n            evt.preventDefault();\n            evt.stopPropagation();\n        });\n\n        this.code_mirror.on(\"dragleave\", function(cm, evt) {\n            that.drag_counter--;\n            if (that.drag_counter <= 0) {\n                that.inner_cell.removeClass('dropzone');\n            }\n            evt.preventDefault();\n            evt.stopPropagation();\n        });\n\n        this.code_mirror.on(\"drop\", function(cm, evt) {\n            that.drag_counter = 0;\n            that.inner_cell.removeClass('dropzone');\n\n            var files = evt.dataTransfer.files;\n            for (var i = 0; i < files.length; ++i) {\n                var file = files[i];\n                if (attachment_regex.test(file.type)) {\n                    // Prevent the default code_mirror 'drop' event handler\n                    // (which inserts the file content) if this is a\n                    // recognized media file\n                    evt.stopPropagation();\n                    evt.preventDefault();\n                    that.insert_inline_image_from_blob(file);\n                }\n            }\n        });\n    };\n\n\n    var RawCell = function (options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance \n         *          config: ConfigSection instance\n         *          keyboard_manager: KeyboardManager instance \n         *          notebook: Notebook instance\n         */\n        options = options || {};\n        var config_default = utils.mergeopt(TextCell, RawCell.options_default);\n        this.class_config = new configmod.ConfigWithDefaults(options.config,\n                                            config_default, 'RawCell');\n        TextCell.apply(this, [$.extend({}, options, {config: options.config})]);\n        this.cell_type = 'raw';\n    };\n\n    RawCell.options_default = {\n        highlight_modes : {\n            'diff'         :{'reg':[/^diff/]}\n        },\n        placeholder : i18n.msg._(\"Write raw LaTeX or other formats here, for use with nbconvert. \" +\n            \"It will not be rendered in the notebook. \" +\n            \"When passing through nbconvert, a Raw Cell's content is added to the output unmodified.\"),\n    };\n\n    RawCell.prototype = Object.create(TextCell.prototype);\n\n    /** @method bind_events **/\n    RawCell.prototype.bind_events = function () {\n        TextCell.prototype.bind_events.apply(this);\n        var that = this;\n        this.element.focusout(function() {\n            that.auto_highlight();\n            that.render();\n        });\n\n        this.code_mirror.on('focus', function() { that.unrender(); });\n    };\n\n    /** @method render **/\n    RawCell.prototype.render = function () {\n        var cont = TextCell.prototype.render.apply(this);\n        if (cont){\n            var text = this.get_text();\n            if (text === \"\") { text = this.placeholder; }\n            this.set_text(text);\n            this.element.removeClass('rendered');\n            this.auto_highlight();\n        }\n        return cont;\n    };\n\n    var textcell = {\n        TextCell: TextCell,\n        MarkdownCell: MarkdownCell,\n        RawCell: RawCell\n    };\n    return textcell;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n *\n *\n * @module keyboard\n * @namespace keyboard\n * @class ShortcutManager\n */\n\ndefine('base/js/keyboard',[\n    'jquery',\n    'base/js/utils',\n    'underscore',\n], function($, utils, _) {\n    \"use strict\";\n\n\n    /**\n     * Setup global keycodes and inverse keycodes.\n     *\n     * See http://unixpapa.com/js/key.html for a complete description. The short of\n     * it is that there are different keycode sets. Firefox uses the \"Mozilla keycodes\"\n     * and Webkit/IE use the \"IE keycodes\". These keycode sets are mostly the same\n     * but have minor differences.\n     **/\n\n     // These apply to Firefox, (Webkit and IE)\n     // This does work **only** on US keyboard.\n    var _keycodes = {\n        'a': 65, 'b': 66, 'c': 67, 'd': 68, 'e': 69, 'f': 70, 'g': 71, 'h': 72, 'i': 73,\n        'j': 74, 'k': 75, 'l': 76, 'm': 77, 'n': 78, 'o': 79, 'p': 80, 'q': 81, 'r': 82,\n        's': 83, 't': 84, 'u': 85, 'v': 86, 'w': 87, 'x': 88, 'y': 89, 'z': 90,\n        '1 !': 49, '2 @': 50, '3 #': 51, '4 $': 52, '5 %': 53, '6 ^': 54,\n        '7 &': 55, '8 *': 56, '9 (': 57, '0 )': 48, \n        '[ {': 219, '] }': 221, '` ~': 192,  ', <': 188, '. >': 190, '/ ?': 191,\n        '\\\\ |': 220, '\\' \"': 222,\n        'numpad0': 96, 'numpad1': 97, 'numpad2': 98, 'numpad3': 99, 'numpad4': 100,\n        'numpad5': 101, 'numpad6': 102, 'numpad7': 103, 'numpad8': 104, 'numpad9': 105,\n        'multiply': 106, 'add': 107, 'subtract': 109, 'decimal': 110, 'divide': 111,\n        'f1': 112, 'f2': 113, 'f3': 114, 'f4': 115, 'f5': 116, 'f6': 117, 'f7': 118,\n        'f8': 119, 'f9': 120, 'f10': 121, 'f11': 122, 'f12': 123, 'f13': 124, 'f14': 125, 'f15': 126,\n        'backspace': 8, 'tab': 9, 'enter': 13, 'shift': 16, 'ctrl': 17, 'alt': 18,\n        'meta': 91, 'capslock': 20, 'esc': 27, 'space': 32, 'pageup': 33, 'pagedown': 34,\n        'end': 35, 'home': 36, 'left': 37, 'up': 38, 'right': 39, 'down': 40,\n        'insert': 45, 'delete': 46, 'numlock': 144,\n    };\n    \n    // These apply to Firefox and Opera\n    var _mozilla_keycodes = {\n        '; :': 59, '= +': 61, '- _': 173, 'meta': 224, 'minus':173\n    };\n    \n    // This apply to Webkit and IE\n    var _ie_keycodes = {\n        '; :': 186, '= +': 187, '- _': 189, 'minus':189\n    };\n    \n    var browser = utils.browser[0];\n    var platform = utils.platform;\n    \n    if (browser === 'Firefox' || browser === 'Opera' || browser === 'Netscape') {\n        $.extend(_keycodes, _mozilla_keycodes);\n    } else if (browser === 'Safari' || browser === 'Chrome' || browser === 'MSIE') {\n        $.extend(_keycodes, _ie_keycodes);\n    }\n\n    var keycodes = {};\n    var inv_keycodes = {};\n    for (var name in _keycodes) {\n        var names = name.split(' ');\n        if (names.length === 1) {\n            var n = names[0];\n            keycodes[n] = _keycodes[n];\n            inv_keycodes[_keycodes[n]] = n;\n        } else {\n            var primary = names[0];\n            var secondary = names[1];\n            keycodes[primary] = _keycodes[name];\n            keycodes[secondary] = _keycodes[name];\n            inv_keycodes[_keycodes[name]] = primary;\n        }\n    }\n\n    var normalize_key = function (key) {\n        return inv_keycodes[keycodes[key]];\n    };\n\n    var normalize_shortcut = function (shortcut) {\n        /**\n         * @function _normalize_shortcut\n         * @private\n         * return a dict containing the normalized shortcut and the number of time it should be pressed:\n         *\n         * Put a shortcut into normalized form:\n         * 1. Make lowercase\n         * 2. Replace cmd by meta\n         * 3. Sort '-' separated modifiers into the order alt-ctrl-meta-shift\n         * 4. Normalize keys\n         **/\n        if (platform === 'MacOS') {\n            shortcut = shortcut.toLowerCase().replace('cmdtrl-', 'cmd-');\n        } else {\n            shortcut = shortcut.toLowerCase().replace('cmdtrl-', 'ctrl-');\n        }\n\n        shortcut = shortcut.toLowerCase().replace('cmd', 'meta');\n        shortcut = shortcut.replace(/-$/, 'minus');  // catch shortcuts using '-' key\n        shortcut = shortcut.replace(/,$/, 'comma');  // catch shortcuts using '-' key\n        if(shortcut.indexOf(',') !== -1){\n            var sht = shortcut.split(',');\n            sht = _.map(sht, normalize_shortcut);\n            return shortcut;\n        }\n        shortcut = shortcut.replace(/comma/g, ',');  // catch shortcuts using '-' key\n        var values = shortcut.split(\"-\");\n        if (values.length === 1) {\n            return normalize_key(values[0]);\n        } else {\n            var modifiers = values.slice(0,-1);\n            var key = normalize_key(values[values.length-1]);\n            modifiers.sort();\n            return modifiers.join('-') + '-' + key;\n        }\n    };\n\n    var shortcut_to_event = function (shortcut, type) {\n        /**\n         * Convert a shortcut (shift-r) to a jQuery Event object\n         **/\n        type = type || 'keydown';\n        shortcut = normalize_shortcut(shortcut);\n        shortcut = shortcut.replace(/-$/, 'minus');  // catch shortcuts using '-' key\n        var values = shortcut.split(\"-\");\n        var modifiers = values.slice(0,-1);\n        var key = values[values.length-1];\n        var opts = {which: keycodes[key]};\n        if (modifiers.indexOf('alt') !== -1) {opts.altKey = true;}\n        if (modifiers.indexOf('ctrl') !== -1) {opts.ctrlKey = true;}\n        if (modifiers.indexOf('meta') !== -1) {opts.metaKey = true;}\n        if (modifiers.indexOf('shift') !== -1) {opts.shiftKey = true;}\n        return $.Event(type, opts);\n    };\n\n    var only_modifier_event = function(event){\n        /**\n         * Return `true` if the event only contains modifiers keys.\n         * false otherwise\n         **/\n        var key = inv_keycodes[event.which];\n        return ((event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) &&\n         (key === 'alt'|| key === 'ctrl'|| key === 'meta'|| key === 'shift'));\n\n    };\n\n    var event_to_shortcut = function (event) {\n        /**\n         * Convert a jQuery Event object to a normalized shortcut string (shift-r)\n         **/\n        var shortcut = '';\n        var key = inv_keycodes[event.which];\n        if (event.altKey && key !== 'alt') {shortcut += 'alt-';}\n        if (event.ctrlKey && key !== 'ctrl') {shortcut += 'ctrl-';}\n        if (event.metaKey && key !== 'meta') {shortcut += 'meta-';}\n        if (event.shiftKey && key !== 'shift') {shortcut += 'shift-';}\n        shortcut += key;\n        return shortcut;\n    };\n\n    // Shortcut manager class\n\n    var ShortcutManager = function (delay, events, actions, env, config, mode) {\n        /**\n         * A class to deal with keyboard event and shortcut\n         *\n         * @class ShortcutManager\n         * @constructor\n         *\n         * :config: configobjet on which to call `update(....)` to persist the config.\n         * :mode: mode of this shortcut manager where to persist config.\n         */\n        mode = mode || 'command';\n        this._shortcuts = {};\n        this._defaults_bindings = [];\n        this.delay = delay || 800; // delay in milliseconds\n        this.events = events;\n        this.actions = actions;\n        this.actions.extend_env(env);\n        this._queue = [];\n        this._cleartimeout = null;\n        this._config = config;\n        this._mode = mode;\n        Object.seal(this);\n    };\n\n    ShortcutManager.prototype.clearsoon = function(){\n        /**\n         * Clear the pending shortcut soon, and cancel previous clearing\n         * that might be registered.\n         **/\n         var that = this;\n         clearTimeout(this._cleartimeout);\n         this._cleartimeout = setTimeout(function(){that.clearqueue();}, this.delay);\n    };\n\n\n    ShortcutManager.prototype.clearqueue = function(){\n        /**\n         * clear the pending shortcut sequence now. \n         **/\n        this._queue = [];\n        clearTimeout(this._cleartimeout);\n    };\n\n\n    var flatten_shorttree = function(tree){\n        /**\n         * Flatten a tree of shortcut sequences. \n         * use full to iterate over all the key/values of available shortcuts.\n         **/\n        var  dct = {};\n        for(var key in tree){\n            var value = tree[key];\n            if(typeof(value) === 'string'){\n                dct[key] = value;\n            } else {\n                var ftree=flatten_shorttree(value);\n                for(var subkey in ftree){\n                    dct[key+','+subkey] = ftree[subkey];\n                }\n            } \n        }\n        return dct;\n    };\n\n\n    ShortcutManager.prototype.get_action_shortcuts = function(name){\n      var ftree = flatten_shorttree(this._shortcuts);\n      var res = [];\n      for (var sht in ftree ){\n        if(ftree[sht] === name){\n          res.push(sht);\n        }\n      }\n      return res;\n    };\n    \n    ShortcutManager.prototype.get_action_shortcut = function(name){\n      var ftree = flatten_shorttree(this._shortcuts);\n      for (var sht in ftree ){\n        if(ftree[sht] === name){\n          return sht;\n        }\n      }\n      return undefined;\n    };\n\n    ShortcutManager.prototype.help = function () {\n        var help = [];\n        var ftree = flatten_shorttree(this._shortcuts);\n        for (var shortcut in ftree) {\n            var action = this.actions.get(ftree[shortcut]);\n            var help_string = action.help||'== no help ==';\n            var help_index = action.help_index;\n            if (help_string) {\n                var shortstring = (action.shortstring||shortcut);\n                help.push({\n                    shortcut: shortstring,\n                    help: help_string,\n                    help_index: help_index}\n                );\n            }\n        }\n        help.sort(function (a, b) {\n            if (a.help_index === b.help_index) {\n                if (a.shortcut === b.shortcut) {\n                    return 0;\n                }\n                if (a.shortcut > b.shortcut) {\n                    return 1;\n                }\n                return -1;\n            }\n            if (a.help_index === undefined || a.help_index > b.help_index){\n                return 1;\n            }\n            return -1;\n        });\n        return help;\n    };\n\n    ShortcutManager.prototype.clear_shortcuts = function () {\n        this._shortcuts = {};\n    };\n\n    ShortcutManager.prototype.get_shortcut = function (shortcut){\n        /**\n         * return a node of the shortcut tree which an action name (string) if leaf,\n         * and an object with `object.subtree===true`\n         **/\n        if(typeof(shortcut) === 'string'){\n            shortcut = shortcut.split(',');\n        }\n        \n        return this._get_leaf(shortcut, this._shortcuts);\n    };\n\n\n    ShortcutManager.prototype._get_leaf = function(shortcut_array, tree){\n        /**\n         * @private\n         * find a leaf/node in a subtree of the keyboard shortcut\n         *\n         **/\n        if(shortcut_array.length === 1){\n            return tree[shortcut_array[0]];\n        } else if(  typeof(tree[shortcut_array[0]]) !== 'string'){\n            return this._get_leaf(shortcut_array.slice(1), tree[shortcut_array[0]]);\n        }\n        return null;\n    };\n\n    ShortcutManager.prototype.set_shortcut = function( shortcut, action_name){\n        if( typeof(action_name) !== 'string'){throw new Error('action is not a string', action_name);}\n        if( typeof(shortcut) === 'string'){\n            shortcut = shortcut.split(',');\n        }\n        return this._set_leaf(shortcut, action_name, this._shortcuts);\n    };\n\n    ShortcutManager.prototype._is_leaf = function(shortcut_array, tree){\n        if(shortcut_array.length === 1){\n           return(typeof(tree[shortcut_array[0]]) === 'string');\n        } else {\n            var subtree = tree[shortcut_array[0]];\n            return this._is_leaf(shortcut_array.slice(1), subtree );\n        }\n    };\n\n    ShortcutManager.prototype._remove_leaf = function(shortcut_array, tree, allow_node){\n        if(shortcut_array.length === 1){\n            var current_node = tree[shortcut_array[0]];\n            if(typeof(current_node) === 'string'){\n                delete tree[shortcut_array[0]];\n            } else {\n                throw new Error('try to delete non-leaf');\n            }\n        } else {\n            this._remove_leaf(shortcut_array.slice(1),  tree[shortcut_array[0]], allow_node);\n            if(_.keys(tree[shortcut_array[0]]).length === 0){\n                delete tree[shortcut_array[0]];\n            }\n        }\n    };\n\n    ShortcutManager.prototype.is_available_shortcut = function(shortcut){\n        var shortcut_array = shortcut.split(',');\n        return this._is_available_shortcut(shortcut_array, this._shortcuts);\n    };\n\n    ShortcutManager.prototype._is_available_shortcut = function(shortcut_array, tree){\n        var current_node = tree[shortcut_array[0]];\n        if(!shortcut_array[0]){\n            return false;\n        }\n        if(current_node === undefined){\n            return true;\n        } else {\n            if (typeof(current_node) == 'string'){\n                return false;\n            } else { // assume is a sub-shortcut tree\n                return this._is_available_shortcut(shortcut_array.slice(1), current_node);\n            }\n        }\n    };\n\n    ShortcutManager.prototype._set_leaf = function(shortcut_array, action_name, tree){\n        var current_node = tree[shortcut_array[0]];\n\n        if(shortcut_array.length === 1){\n            if(current_node !== undefined && typeof(current_node) !== 'string'){\n                console.warn('[warning], you are overriting a long shortcut with a shorter one');\n            }\n            tree[shortcut_array[0]] = action_name;\n            return true;\n        } else {\n            if(typeof(current_node) === 'string'){\n                console.warn('you are trying to set a shortcut that will be shadowed'+\n                             'by a more specific one. Aborting for :', action_name, 'the follwing '+\n                             'will take precedence', current_node);\n                return false;\n            } else {\n                tree[shortcut_array[0]] = tree[shortcut_array[0]]||{};\n            }\n            this._set_leaf(shortcut_array.slice(1), action_name, tree[shortcut_array[0]]);\n            return true;\n        }\n    };\n\n    ShortcutManager.prototype._persist_shortcut = function(shortcut, data) {\n        /**\n         * add a shortcut to this manager and persist it to the config file. \n         **/ \n        shortcut = shortcut.toLowerCase();\n        this.add_shortcut(shortcut, data);\n        var patch = {keys:{}};\n        var b = {bind:{}};\n        patch.keys[this._mode] = {bind:{}};\n        patch.keys[this._mode].bind[shortcut] = data;\n        this._config.update(patch);\n    };\n\n    ShortcutManager.prototype._persist_remove_shortcut = function(shortcut){\n        /**\n         * Remove a shortcut from this manager and persist its removal.\n         */\n\n        shortcut = shortcut.toLowerCase();\n        this.remove_shortcut(shortcut);\n        var patch = {keys: {}};\n        var b = {bind: {}};\n        patch.keys[this._mode] = {bind:{}};\n        patch.keys[this._mode].bind[shortcut] = null;\n        this._config.update(patch);\n\n        // if the shortcut we unbind is a default one, we add it to the list of\n        // things to unbind at startup\n        if( this._defaults_bindings.indexOf(shortcut) !== -1 ){\n            var cnf = (this._config.data.keys || {})[this._mode];\n            var unbind_array = cnf.unbind || [];\n\n\n            // unless it's already there (like if we have remapped a default\n            // shortcut to another command): unbind it)\n            if(unbind_array.indexOf(shortcut) === -1){\n                var _parray = unbind_array.concat(shortcut);\n                var unbind_patch = {keys:{}};\n                unbind_patch.keys[this._mode] = {unbind:_parray};\n                console.warn('up:', unbind_patch);\n                this._config.update(unbind_patch);\n            }\n        }\n    };\n\n\n    ShortcutManager.prototype.add_shortcut = function (shortcut, data, suppress_help_update) {\n        /**\n         * Add a action to be handled by shortcut manager. \n         * \n         * - `shortcut` should be a `Shortcut Sequence` of the for `Ctrl-Alt-C,Meta-X`...\n         * - `data` could be an `action name`, an `action` or a `function`.\n         *   if a `function` is passed it will be converted to an anonymous `action`. \n         *\n         **/\n        var action_name = this.actions.get_name(data);\n        if (! action_name){\n          throw new Error('does not know how to deal with : ' + data);\n        }\n        var _shortcut = normalize_shortcut(shortcut);\n        this.set_shortcut(_shortcut, action_name);\n\n        if (!suppress_help_update) {\n            // update the keyboard shortcuts notebook help\n            this.events.trigger('rebuild.QuickHelp');\n        }\n    };\n\n    ShortcutManager.prototype.add_shortcuts = function (data) {\n        /**\n         * Convenient methods to call `add_shortcut(key, value)` on several items\n         * \n         *  data : Dict of the form {key:value, ...}\n         **/\n        for (var shortcut in data) {\n            this.add_shortcut(shortcut, data[shortcut], true);\n        }\n        // update the keyboard shortcuts notebook help\n        this.events.trigger('rebuild.QuickHelp');\n    };\n\n    ShortcutManager.prototype._add_default_shortcuts = function (data) {\n        /**\n         * same as add_shortcuts, but register them as \"default\" that if persistently unbound, with\n         * persist_remove_shortcut, need to be on the \"unbind\" list. \n         **/\n        this._defaults_bindings = this._defaults_bindings.concat(Object.keys(data));\n        this.add_shortcuts(data);\n\n    };\n\n    ShortcutManager.prototype.remove_shortcut = function (shortcut, suppress_help_update) {\n        /**\n         * Remove the binding of shortcut `sortcut` with its action.\n         * throw an error if trying to remove a non-exiting shortcut\n         **/\n        if(!shortcut){\n            console.warn('trying to remove empty shortcut');\n            return;\n        }\n        shortcut = normalize_shortcut(shortcut);\n        if( typeof(shortcut) === 'string'){\n            shortcut = shortcut.split(',');\n        }\n        /*\n         *  The shortcut error should be explicit here, because it will be\n         *  seen by users.\n         */\n        try {\n          this._remove_leaf(shortcut, this._shortcuts);\n          if (!suppress_help_update) {\n            // update the keyboard shortcuts notebook help\n            this.events.trigger('rebuild.QuickHelp');\n          }\n        } catch (ex) {\n          throw new Error('trying to remove a non-existent shortcut', shortcut, typeof shortcut);\n        }\n    };\n\n\n\n    ShortcutManager.prototype.call_handler = function (event) {\n        /**\n         * Call the corresponding shortcut handler for a keyboard event\n         * @method call_handler\n         * @return {Boolean} `true|false`, `false` if no handler was found, otherwise the  value return by the handler. \n         * @param event {event}\n         *\n         * given an event, call the corresponding shortcut. \n         * return false is event wan handled, true otherwise \n         * in any case returning false stop event propagation\n         **/\n\n\n        this.clearsoon();\n        if(only_modifier_event(event)){\n            return true;\n        }\n        var shortcut = event_to_shortcut(event);\n        this._queue.push(shortcut);\n        var action_name = this.get_shortcut(this._queue);\n\n        if (typeof(action_name) === 'undefined'|| action_name === null){\n            this.clearqueue();\n            return true;\n        }\n        \n        if (this.actions.exists(action_name)) {\n            event.preventDefault();\n            this.clearqueue();\n            return this.actions.call(action_name, event);\n        }\n\n        return false;\n    };\n\n\n    ShortcutManager.prototype.handles = function (event) {\n        var shortcut = event_to_shortcut(event);\n        var action_name = this.get_shortcut(this._queue.concat(shortcut));\n        return (typeof(action_name) !== 'undefined');\n    };\n\n    var keyboard = {\n        keycodes : keycodes,\n        inv_keycodes : inv_keycodes,\n        ShortcutManager : ShortcutManager,\n        normalize_key : normalize_key,\n        normalize_shortcut : normalize_shortcut,\n        shortcut_to_event : shortcut_to_event,\n        event_to_shortcut : event_to_shortcut,\n    };\n\n    return keyboard;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/outputarea',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/security',\n    'base/js/keyboard',\n    'services/config',\n    'notebook/js/mathjaxutils',\n    'components/marked/lib/marked',\n], function($, utils, i18n, security, keyboard, configmod, mathjaxutils, marked) {\n    \"use strict\";\n\n    /**\n     * @class OutputArea\n     *\n     * @constructor\n     */\n\n    var OutputArea = function (options) {\n        this.config = options.config;\n        this.selector = options.selector;\n        this.events = options.events;\n        this.keyboard_manager = options.keyboard_manager;\n        this.wrapper = $(options.selector);\n        this.outputs = [];\n        this.collapsed = false;\n        this.scrolled = false;\n        this.scroll_state = 'auto';\n        this.trusted = true;\n        this.clear_queued = null;\n        if (options.prompt_area === undefined) {\n            this.prompt_area = true;\n        } else {\n            this.prompt_area = options.prompt_area;\n        }\n        this._display_id_targets = {};\n        this.create_elements();\n        this.style();\n        this.bind_events();\n        this.class_config = new configmod.ConfigWithDefaults(this.config,\n                                        OutputArea.config_defaults, 'OutputArea');\n\n        this.handle_appended = utils.throttle(this.handle_appended.bind(this));\n    };\n\n    OutputArea.config_defaults = {\n        stream_chunk_size: 8192, // chunk size for stream output\n    };\n    \n    /**\n     * Class prototypes\n     **/\n\n    OutputArea.prototype.create_elements = function () {\n        var element = this.element = $(\"<div/>\");\n        // wrap element in safe trigger,\n        // so that errors (e.g. in widget extensions) are logged instead of\n        // breaking everything.\n        this.element._original_trigger = this.element.trigger;\n        this.element.trigger = function (name, data) {\n            try {\n                this._original_trigger.apply(this, arguments);\n            } catch (e) {\n                console.error(\"Exception in event handler for \" + name, e, arguments);\n            }\n        }\n        this.collapse_button = $(\"<div/>\");\n        this.prompt_overlay = $(\"<div/>\");\n        this.wrapper.append(this.prompt_overlay);\n        this.wrapper.append(this.element);\n        this.wrapper.append(this.collapse_button);\n    };\n\n\n    OutputArea.prototype.style = function () {\n        this.collapse_button.hide();\n        if (!this.prompt_area) {\n            this.prompt_overlay.hide();\n        }\n        \n        this.wrapper.addClass('output_wrapper');\n        this.element.addClass('output');\n        \n        this.collapse_button.addClass(\"btn btn-default output_collapsed\");\n        this.collapse_button.attr('title', i18n.msg._('click to expand output'));\n        this.collapse_button.text('. . .');\n        \n        this.prompt_overlay.addClass('out_prompt_overlay prompt');\n        this.prompt_overlay.attr('title', i18n.msg._('click to expand output; double click to hide output'));\n        \n        this.expand();\n    };\n\n    /**\n     * Should the OutputArea scroll?\n     * Returns whether the height (in lines) exceeds the current threshold.\n     * Threshold will be OutputArea.minimum_scroll_threshold if scroll_state=true (manually requested)\n     * or OutputArea.auto_scroll_threshold if scroll_state='auto'.\n     * This will always return false if scroll_state=false (scroll disabled).\n     *\n     */\n    OutputArea.prototype._should_scroll = function () {\n        var threshold;\n        if (this.scroll_state === false) {\n            return false;\n        } else if (this.scroll_state === true) {\n            threshold = OutputArea.minimum_scroll_threshold;\n        } else {\n            threshold = OutputArea.auto_scroll_threshold;\n        }\n        if (threshold <=0) {\n            return false;\n        }\n        // line-height from http://stackoverflow.com/questions/1185151\n        var fontSize = this.element.css('font-size') || '14px';\n        var lineHeight = Math.floor((parseFloat(fontSize.replace('px','')) || 14) * 1.3);\n        return (this.element.height() > threshold * lineHeight);\n    };\n\n\n    OutputArea.prototype.bind_events = function () {\n        var that = this;\n        this.prompt_overlay.dblclick(function () { that.toggle_output(); });\n        this.prompt_overlay.click(function () { that.toggle_scroll(); });\n\n        this.element.on('resizeOutput', function () {\n            // maybe scroll output,\n            // if it's grown large enough and hasn't already been scrolled.\n            if (!that.scrolled && that._should_scroll()) {\n                that.scroll_area();\n            }\n        });\n        this.collapse_button.click(function () {\n            that.expand();\n        });\n    };\n\n\n    OutputArea.prototype.collapse = function () {\n        if (!this.collapsed) {\n            this.element.hide();\n            this.prompt_overlay.hide();\n            if (this.element.html()){\n                this.collapse_button.show();\n            }\n            this.collapsed = true;\n            // collapsing output clears scroll state\n            this.scroll_state = 'auto';\n        }\n    };\n\n\n    OutputArea.prototype.expand = function () {\n        if (this.collapsed) {\n            this.collapse_button.hide();\n            this.element.show();\n            if (this.prompt_area) {\n                this.prompt_overlay.show();\n            }\n            this.collapsed = false;\n            this.scroll_if_long();\n        }\n    };\n\n\n    OutputArea.prototype.toggle_output = function () {\n        if (this.collapsed) {\n            this.expand();\n        } else {\n            this.collapse();\n        }\n    };\n\n\n    OutputArea.prototype.scroll_area = function () {\n        this.element.addClass('output_scroll');\n        this.prompt_overlay.attr('title', i18n.msg._('click to unscroll output; double click to hide'));\n        this.scrolled = true;\n    };\n\n\n    OutputArea.prototype.unscroll_area = function () {\n        this.element.removeClass('output_scroll');\n        this.prompt_overlay.attr('title', i18n.msg._('click to scroll output; double click to hide'));\n        this.scrolled = false;\n    };\n\n    /**\n     * Scroll OutputArea if height exceeds a threshold.\n     *\n     * Threshold is OutputArea.minimum_scroll_threshold if scroll_state = true,\n     * OutputArea.auto_scroll_threshold if scroll_state='auto'.\n     *\n     **/\n    OutputArea.prototype.scroll_if_long = function () {\n        var should_scroll = this._should_scroll();\n        if (!this.scrolled && should_scroll) {\n            // only allow scrolling long-enough output\n            this.scroll_area();\n        } else if (this.scrolled && !should_scroll) {\n            // scrolled and shouldn't be\n            this.unscroll_area();\n        }\n    };\n\n\n    OutputArea.prototype.toggle_scroll = function () {\n        if (this.scroll_state == 'auto') {\n            this.scroll_state = !this.scrolled;\n        } else {\n            this.scroll_state = !this.scroll_state;\n        }\n        if (this.scrolled) {\n            this.unscroll_area();\n        } else {\n            // only allow scrolling long-enough output\n            this.scroll_if_long();\n        }\n    };\n\n\n    // typeset with MathJax if MathJax is available\n    OutputArea.prototype.typeset = function () {\n        utils.typeset(this.element);\n    };\n\n\n    OutputArea.prototype.handle_output = function (msg) {\n        var json = {};\n        var msg_type = json.output_type = msg.header.msg_type;\n        var content = msg.content;\n        switch(msg_type) {\n        case \"stream\" :\n            json.text = content.text;\n            json.name = content.name;\n            break;\n        case \"execute_result\":\n            json.execution_count = content.execution_count;\n        case \"update_display_data\":\n        case \"display_data\":\n            json.transient = content.transient;\n            json.data = content.data;\n            json.metadata = content.metadata;\n            break;\n        case \"error\":\n            json.ename = content.ename;\n            json.evalue = content.evalue;\n            json.traceback = content.traceback;\n            break;\n        default:\n            console.error(\"unhandled output message\", msg);\n            return;\n        }\n        this.append_output(json);\n    };\n    \n    // Declare mime type as constants\n    var MIME_JAVASCRIPT = 'application/javascript';\n    var MIME_HTML = 'text/html';\n    var MIME_MARKDOWN = 'text/markdown';\n    var MIME_LATEX = 'text/latex';\n    var MIME_SVG = 'image/svg+xml';\n    var MIME_PNG = 'image/png';\n    var MIME_JPEG = 'image/jpeg';\n    var MIME_GIF = 'image/gif';\n    var MIME_PDF = 'application/pdf';\n    var MIME_TEXT = 'text/plain';\n    \n    \n    OutputArea.output_types = [\n        MIME_JAVASCRIPT,\n        MIME_HTML,\n        MIME_MARKDOWN,\n        MIME_LATEX,\n        MIME_SVG,\n        MIME_PNG,\n        MIME_JPEG,\n        MIME_GIF,\n        MIME_PDF,\n        MIME_TEXT,\n    ];\n\n    OutputArea.prototype.validate_mimebundle = function (bundle) {\n        /** scrub invalid outputs */\n        if (typeof bundle.data !== 'object') {\n            console.warn(\"mimebundle missing data\", bundle);\n            bundle.data = {};\n        }\n        if (typeof bundle.metadata !== 'object') {\n            console.warn(\"mimebundle missing metadata\", bundle);\n            bundle.metadata = {};\n        }\n        var data = bundle.data;\n        $.map(OutputArea.output_types, function(key){\n            if ((key.indexOf('application/') === -1 || key.indexOf('json') === -1) &&\n                data[key] !== undefined &&\n                typeof data[key] !== 'string'\n            ) {\n                console.log(\"Invalid type for \" + key, data[key]);\n                delete data[key];\n            }\n        });\n        return bundle;\n    };\n    \n    OutputArea.prototype.append_output = function (json) {\n        this.expand();\n        \n        if (this.clear_queued) {\n            this.clear_output(false);\n            this._needs_height_reset = true;\n        }\n\n        var record_output = true;\n        switch(json.output_type) {\n            case 'update_display_data':\n                record_output = false;\n                json = this.validate_mimebundle(json);\n                this.update_display_data(json);\n                return;\n            case 'execute_result':\n                json = this.validate_mimebundle(json);\n                this.append_execute_result(json);\n                break;\n            case 'stream':\n                // append_stream might have merged the output with earlier stream output\n                record_output = this.append_stream(json);\n                break;\n            case 'error':\n                this.append_error(json);\n                break;\n            case 'display_data':\n                // append handled below\n                json = this.validate_mimebundle(json);\n                break;\n            default:\n                console.log(\"unrecognized output type: \" + json.output_type);\n                this.append_unrecognized(json);\n        }\n\n        if (json.output_type === 'display_data') {\n            var that = this;\n            this.append_display_data(json, this.handle_appended);\n        } else {\n            this.handle_appended();\n        }\n\n        if (record_output) {\n            this.outputs.push(json);\n        }\n\n        this.events.trigger('output_added.OutputArea', {\n            output: json,\n            output_area: this,\n        });\n    };\n\n    OutputArea.prototype.handle_appended = function () {\n        if (this._needs_height_reset) {\n            this.element.height('');\n            this._needs_height_reset = false;\n        }\n\n        this.element.trigger('resizeOutput', {output_area: this});\n    };\n\n    OutputArea.prototype.create_output_area = function () {\n        var oa = $(\"<div/>\").addClass(\"output_area\");\n        if (this.prompt_area) {\n            oa.append($('<div/>').addClass('prompt'));\n        }\n        return oa;\n    };\n\n\n    function _get_metadata_key(metadata, key, mime) {\n        var mime_md = metadata[mime];\n        // mime-specific higher priority\n        if (mime_md && mime_md[key] !== undefined) {\n            return mime_md[key];\n        }\n        // fallback on global\n        return metadata[key];\n    }\n\n    OutputArea.prototype.create_output_subarea = function(md, classes, mime) {\n        var subarea = $('<div/>').addClass('output_subarea').addClass(classes);\n        if (_get_metadata_key(md, 'isolated', mime)) {\n            // Create an iframe to isolate the subarea from the rest of the\n            // document\n            var iframe = $('<iframe/>').addClass('box-flex1');\n            iframe.css({'height':1, 'width':'100%', 'display':'block'});\n            iframe.attr('frameborder', 0);\n            iframe.attr('scrolling', 'auto');\n\n            // Once the iframe is loaded, the subarea is dynamically inserted\n            iframe.on('load', function() {\n                // Workaround needed by Firefox, to properly render svg inside\n                // iframes, see http://stackoverflow.com/questions/10177190/\n                // svg-dynamically-added-to-iframe-does-not-render-correctly\n                this.contentDocument.open();\n\n                // Insert the subarea into the iframe\n                // We must directly write the html. When using Jquery's append\n                // method, javascript is evaluated in the parent document and\n                // not in the iframe document.  At this point, subarea doesn't\n                // contain any user content.\n                this.contentDocument.write(subarea.html());\n\n                this.contentDocument.close();\n\n                var body = this.contentDocument.body;\n                // Adjust the iframe height automatically\n                iframe.height(body.scrollHeight + 'px');\n            });\n\n            // Elements should be appended to the inner subarea and not to the\n            // iframe\n            iframe.append = function(that) {\n                subarea.append(that);\n            };\n\n            return iframe;\n        } else {\n            return subarea;\n        }\n    };\n\n\n    OutputArea.prototype._append_javascript_error = function (err, element) {\n        /**\n         * display a message when a javascript error occurs in display output\n         */\n        var msg = i18n.msg._(\"Javascript error adding output!\");\n        if ( element === undefined ) return;\n        element\n            .append($('<div/>').text(msg).addClass('js-error'))\n            .append($('<div/>').text(err.toString()).addClass('js-error'))\n            .append($('<div/>').text(i18n.msg._('See your browser Javascript console for more details.')).addClass('js-error'));\n    };\n    \n    OutputArea.prototype._safe_append = function (toinsert, toreplace) {\n        /**\n         * safely append an item to the document\n         * this is an object created by user code,\n         * and may have errors, which should not be raised\n         * under any circumstances.\n         */\n        try {\n            if (toreplace) {\n                toreplace.replaceWith(toinsert);\n            } else {\n                this.element.append(toinsert);\n            }\n        } catch(err) {\n            console.error(err);\n            // Create an actual output_area and output_subarea, which creates\n            // the prompt area and the proper indentation.\n            toinsert = this.create_output_area();\n            var subarea = $('<div/>').addClass('output_subarea');\n            toinsert.append(subarea);\n            this._append_javascript_error(err, subarea);\n            this.element.append(toinsert);\n        }\n\n        // Notify others of changes.\n        this.element.trigger('changed', {output_area: this});\n    };\n\n    OutputArea.output_prompt_classical = function(prompt_value) {\n        return $('<bdi>').text(i18n.msg.sprintf(i18n.msg._('Out[%d]:'),prompt_value));\n    };\n\n    OutputArea.output_prompt_function = OutputArea.output_prompt_classical;\n\n    OutputArea.prototype.append_execute_result = function (json) {\n        var n = json.execution_count || ' ';\n        var toinsert = this.create_output_area();\n        this._record_display_id(json, toinsert);\n        if (this.prompt_area) {\n            toinsert.find('div.prompt')\n                    .addClass('output_prompt')\n                    .empty()\n                    .append(OutputArea.output_prompt_function(n));\n        }\n        var inserted = this.append_mime_type(json, toinsert);\n        if (inserted) {\n            inserted.addClass('output_result');\n        }\n        this._safe_append(toinsert);\n        // If we just output latex, typeset it.\n        if ((json.data[MIME_LATEX] !== undefined) ||\n            (json.data[MIME_HTML] !== undefined) ||\n            (json.data[MIME_MARKDOWN] !== undefined)) {\n            this.typeset();\n        }\n    };\n\n\n    OutputArea.prototype.append_error = function (json) {\n        var tb = json.traceback;\n        if (tb !== undefined && tb.length > 0) {\n            var s = '';\n            var len = tb.length;\n            for (var i=0; i<len; i++) {\n                s = s + tb[i] + '\\n';\n            }\n            s = s + '\\n';\n            var toinsert = this.create_output_area();\n            var append_text = OutputArea.append_map[MIME_TEXT];\n            if (append_text) {\n                append_text.apply(this, [s, {}, toinsert]).addClass('output_error');\n            }\n            this._safe_append(toinsert);\n        }\n    };\n\n\n    OutputArea.prototype.append_stream = function (json) {\n        var text = json.text;\n        if (typeof text !== 'string') {\n            console.error(\"Stream output is invalid (missing text)\", json);\n            return false;\n        }\n        var subclass = \"output_\"+json.name;\n\n        if (this.outputs.length > 0){\n            // have at least one output to consider\n            var last = this.outputs[this.outputs.length-1];\n            if (last.output_type == 'stream' && json.name == last.name){\n                if (last.text.length > this.class_config.get_sync('stream_chunk_size')) {\n                    // don't keep extending long blocks\n                    var last_newline_idx = last.text.lastIndexOf('\\n');\n                    // if the last stream output doesn't end on a newline,\n                    // split on last newline and take the tail with the new output\n                    if (last_newline_idx !== -1 && last_newline_idx !== last.text.length - 1) {\n                        // truncate last.text to its last newline,\n                        // and take the tail with the new output.\n                        var tail = last.text.slice(last_newline_idx + 1);\n                        last.text = last.text.slice(0, last_newline_idx + 1);\n                        // we changed last's content, so we have to re-render it\n                        text = json.text = tail + json.text;\n                        var pre = this.element.find('div.'+subclass).last().find('pre');\n                        var html = utils.fixConsole(last.text);\n                        html = utils.autoLinkUrls(html);\n                        pre.html(html);\n                    }\n                } else {\n                    // latest output was in the same stream,\n                    // so append to it instead of making a new output.\n                    // escape ANSI & HTML specials:\n                    last.text = utils.fixOverwrittenChars(last.text + json.text);\n                    var pre = this.element.find('div.'+subclass).last().find('pre');\n                    var html = utils.fixConsole(last.text);\n                    html = utils.autoLinkUrls(html);\n                    // The only user content injected with this HTML call is\n                    // escaped by the fixConsole() method.\n                    pre.html(html);\n                    // return false signals that we merged this output with the previous one,\n                    // and the new output shouldn't be recorded.\n                    return false;\n                }\n            }\n        }\n\n        if (!text.replace(\"\\r\", \"\")) {\n            // text is nothing (empty string, \\r, etc.)\n            // so don't append any elements, which might add undesirable space\n            // return true to indicate the output should be recorded.\n            return true;\n        }\n\n        // If we got here, attach a new div\n        var toinsert = this.create_output_area();\n        var append_text = OutputArea.append_map[MIME_TEXT];\n        if (append_text) {\n            append_text.apply(this, [text, {}, toinsert]).addClass(\"output_stream \" + subclass);\n        }\n        this._safe_append(toinsert);\n        return true;\n    };\n\n\n    OutputArea.prototype.append_unrecognized = function (json) {\n        var that = this;\n        var toinsert = this.create_output_area();\n        var subarea = $('<div/>').addClass('output_subarea output_unrecognized');\n        toinsert.append(subarea);\n        subarea.append(\n            $(\"<a>\")\n                .attr(\"href\", \"#\")\n                .text(i18n.msg.sprintf(i18n.msg._(\"Unrecognized output: %s\"),json.output_type))\n                .click(function () {\n                    that.events.trigger('unrecognized_output.OutputArea', {output: json});\n                })\n        );\n        this._safe_append(toinsert);\n    };\n\n\n    OutputArea.prototype.update_display_data = function (json, handle_inserted) {\n        var oa = this;\n        var targets;\n        var display_id = (json.transient || {}).display_id;\n        if (!display_id) {\n            console.warn(\"Handling update_display with no display_id\", json);\n            return;\n        }\n        targets = this._display_id_targets[display_id];\n        if (!targets) {\n            console.warn(\"No targets for display_id\", display_id, json);\n            return;\n        }\n        // we've seen it before, update output data\n        targets.map(function (target) {\n            oa.outputs[target.index].data = json.data;\n            oa.outputs[target.index].metadata = json.metadata;\n            var toinsert = oa.create_output_area();\n            if (oa.append_mime_type(json, toinsert, handle_inserted)) {\n                oa._safe_append(toinsert, target.element);\n            }\n            target.element = toinsert;\n        });\n\n        // If we just output something that could contain latex, typeset it.\n        if ((json.data[MIME_LATEX] !== undefined) ||\n            (json.data[MIME_HTML] !== undefined) ||\n            (json.data[MIME_MARKDOWN] !== undefined)) {\n            this.typeset();\n        }\n    };\n\n    OutputArea.prototype._record_display_id = function (json, element) {\n        // record display_id of a display_data / execute_result\n        var display_id = (json.transient || {}).display_id;\n        if (!display_id) return;\n        // it has a display_id;\n        var targets = this._display_id_targets[display_id];\n        if (!targets) {\n            targets = this._display_id_targets[display_id] = [];\n        }\n        targets.push({\n            index: this.outputs.length,\n            element: element,\n        });\n    };\n    \n    OutputArea.prototype.append_display_data = function (json, handle_inserted) {\n        var toinsert = this.create_output_area();\n        this._record_display_id(json, toinsert);\n        if (this.append_mime_type(json, toinsert, handle_inserted)) {\n            this._safe_append(toinsert);\n            // If we just output latex, typeset it.\n            if ((json.data[MIME_LATEX] !== undefined) ||\n                (json.data[MIME_HTML] !== undefined) ||\n                (json.data[MIME_MARKDOWN] !== undefined)) {\n                this.typeset();\n            }\n        }\n    };\n\n    OutputArea.safe_outputs = {};\n    OutputArea.safe_outputs[MIME_TEXT] = true;\n    OutputArea.safe_outputs[MIME_LATEX] = true;\n    OutputArea.safe_outputs[MIME_PNG] = true;\n    OutputArea.safe_outputs[MIME_JPEG] = true;\n    OutputArea.safe_outputs[MIME_GIF] = true;\n\n    OutputArea.prototype.append_mime_type = function (json, element, handle_inserted) {\n        for (var i=0; i < OutputArea.display_order.length; i++) {\n            var type = OutputArea.display_order[i];\n            var append = OutputArea.append_map[type];\n            if ((json.data[type] !== undefined) && append) {\n                var value = json.data[type];\n                if (!this.trusted && !OutputArea.safe_outputs[type]) {\n                    // not trusted, sanitize HTML\n                    if (type===MIME_HTML || type==='text/svg') {\n                        value = security.sanitize_html(value);\n                    } else {\n                        // don't display if we don't know how to sanitize it\n                        console.log(\"Ignoring untrusted \" + type + \" output.\");\n                        continue;\n                    }\n                }\n                var md = json.metadata || {};\n                var toinsert = append.apply(this, [value, md, element, handle_inserted]);\n                // Since only the png and jpeg mime types call the inserted\n                // callback, if the mime type is something other we must call the \n                // inserted callback only when the element is actually inserted\n                // into the DOM.  Use a timeout of 0 to do this.\n                if ([MIME_PNG, MIME_JPEG, MIME_GIF].indexOf(type) < 0 && handle_inserted !== undefined) {\n                    setTimeout(handle_inserted, 0);\n                }\n                this.events.trigger('output_appended.OutputArea', [type, value, md, toinsert]);\n                return toinsert;\n            }\n        }\n        return null;\n    };\n\n\n    var append_html = function (html, md, element) {\n        var type = MIME_HTML;\n        var toinsert = this.create_output_subarea(md, \"output_html rendered_html\", type);\n        this.keyboard_manager.register_events(toinsert);\n        toinsert.append(html);\n        dblclick_to_reset_size(toinsert.find('img'));\n        element.append(toinsert);\n        return toinsert;\n    };\n\n\n    var append_markdown = function(markdown, md, element) {\n        var type = MIME_MARKDOWN;\n        var toinsert = this.create_output_subarea(md, \"output_markdown rendered_html\", type);\n        var text_and_math = mathjaxutils.remove_math(markdown);\n        var text = text_and_math[0];\n        var math = text_and_math[1];\n        // Prevent marked from returning inline styles for table cells\n        var renderer = new marked.Renderer();\n        renderer.tablecell = function (content, flags) {\n          var type = flags.header ? 'th' : 'td';\n          var start_tag = '<' + type + '>';\n          var end_tag = '</' + type + '>\\n';\n          return start_tag + content + end_tag;\n        };\n        marked(text, { renderer: renderer }, function (err, html) {\n            html = mathjaxutils.replace_math(html, math);\n            toinsert.append(html);\n        });\n        dblclick_to_reset_size(toinsert.find('img'));\n        element.append(toinsert);\n        return toinsert;\n    };\n\n\n    var append_javascript = function (js, md, element) {\n        /**\n         * We just eval the JS code, element appears in the local scope.\n         */\n        var type = MIME_JAVASCRIPT;\n        var toinsert = this.create_output_subarea(md, \"output_javascript rendered_html\", type);\n        this.keyboard_manager.register_events(toinsert);\n        element.append(toinsert);\n\n        // Fix for ipython/issues/5293, make sure `element` is the area which\n        // output can be inserted into at the time of JS execution.\n        element = toinsert;\n        try {\n            eval(js);\n        } catch(err) {\n            console.log(err);\n            this._append_javascript_error(err, toinsert);\n        }\n        return toinsert;\n    };\n\n\n    var append_text = function (data, md, element) {\n        var type = MIME_TEXT;\n        var toinsert = this.create_output_subarea(md, \"output_text\", type);\n        data = utils.fixOverwrittenChars(data);\n        // escape ANSI & HTML specials in plaintext:\n        data = utils.fixConsole(data);\n        data = utils.autoLinkUrls(data);\n        // The only user content injected with this HTML call is\n        // escaped by the fixConsole() method.\n        toinsert.append($(\"<pre/>\").html(data));\n        element.append(toinsert);\n        return toinsert;\n    };\n\n\n    var append_svg = function (svg_html, md, element) {\n        var type = MIME_SVG;\n        var toinsert = this.create_output_subarea(md, \"output_svg\", type);\n\n        // Get the svg element from within the HTML. \n        // One svg is supposed, but could embed other nested svgs\n        var svg = $($('<div \\>').html(svg_html).find('svg')[0]);\n        var svg_area = $('<div />');\n        var width = svg.attr('width');\n        var height = svg.attr('height');\n        svg\n            .width('100%')\n            .height('100%');\n        svg_area\n            .width(width)\n            .height(height);\n\n        svg_area.append(svg);\n        toinsert.append(svg_area);\n        element.append(toinsert);\n\n        return toinsert;\n    };\n\n    function dblclick_to_reset_size (img) {\n        /**\n         * Double-click on an image toggles confinement to notebook width\n         *\n         * img: jQuery element\n         */\n\n        img.dblclick(function () {\n            // dblclick toggles *raw* size, disabling max-width confinement.\n            if (img.hasClass('unconfined')) {\n                img.removeClass('unconfined');\n            } else {\n                img.addClass('unconfined');\n            }\n        });\n    }\n    \n    var set_width_height = function (img, md, mime) {\n        /**\n         * set width and height of an img element from metadata\n         */\n        var height = _get_metadata_key(md, 'height', mime);\n        if (height !== undefined) img.attr('height', height);\n        var width = _get_metadata_key(md, 'width', mime);\n        if (width !== undefined) img.attr('width', width);\n        if (_get_metadata_key(md, 'unconfined', mime)) {\n            img.addClass('unconfined');\n        }\n    };\n    \n    var append_png = function (png, md, element, handle_inserted) {\n        var type = MIME_PNG;\n        var toinsert = this.create_output_subarea(md, \"output_png\", type);\n        var img = $(\"<img/>\");\n        if (handle_inserted !== undefined) {\n            img.on('load', function(){\n                handle_inserted(img);\n            });\n        }\n        img[0].src = 'data:image/png;base64,'+ png;\n        set_width_height(img, md, type);\n        dblclick_to_reset_size(img);\n        toinsert.append(img);\n        element.append(toinsert);\n        return toinsert;\n    };\n\n\n    var append_jpeg = function (jpeg, md, element, handle_inserted) {\n        var type = MIME_JPEG;\n        var toinsert = this.create_output_subarea(md, \"output_jpeg\", type);\n        var img = $(\"<img/>\");\n        if (handle_inserted !== undefined) {\n            img.on('load', function(){\n                handle_inserted(img);\n            });\n        }\n        img[0].src = 'data:image/jpeg;base64,'+ jpeg;\n        set_width_height(img, md, type);\n        dblclick_to_reset_size(img);\n        toinsert.append(img);\n        element.append(toinsert);\n        return toinsert;\n    };\n    \n    var append_gif = function (gif, md, element, handle_inserted) {\n        var type = MIME_GIF;\n        var toinsert = this.create_output_subarea(md, \"output_gif\", type);\n        var img = $(\"<img/>\");\n        if (handle_inserted !== undefined) {\n            img.on('load', function(){\n                handle_inserted(img);\n            });\n        }\n        img[0].src = 'data:image/gif;base64,'+ gif;\n        set_width_height(img, md, type);\n        dblclick_to_reset_size(img);\n        toinsert.append(img);\n        element.append(toinsert);\n        return toinsert;\n    };\n\n\n    var append_pdf = function (pdf, md, element) {\n        var type = MIME_PDF;\n        var toinsert = this.create_output_subarea(md, \"output_pdf\", type);\n        var a = $('<a/>').attr('href', 'data:application/pdf;base64,'+pdf);\n        a.attr('target', '_blank');\n        a.text('View PDF');\n        toinsert.append(a);\n        element.append(toinsert);\n        return toinsert;\n     };\n\n    var append_latex = function (latex, md, element) {\n        /**\n         * This method cannot do the typesetting because the latex first has to\n         * be on the page.\n         */\n        var type = MIME_LATEX;\n        var toinsert = this.create_output_subarea(md, \"output_latex\", type);\n        toinsert.text(latex);\n        element.append(toinsert);\n        return toinsert;\n    };\n    \n    OutputArea.prototype.append_raw_input = function (msg) {\n        var that = this;\n        this.expand();\n        var content = msg.content;\n        var area = this.create_output_area();\n        \n        // disable any other raw_inputs, if they are left around\n        $(\"div.output_subarea.raw_input_container\").remove();\n        \n        var input_type = content.password ? 'password' : 'text';\n        \n        area.append(\n            $(\"<div/>\")\n            .addClass(\"box-flex1 output_subarea raw_input_container\")\n            .append(\n                $(\"<pre/>\")\n                .addClass(\"raw_input_prompt\")\n                .html(utils.fixConsole(content.prompt))\n                .append(\n                    $(\"<input/>\")\n                    .addClass(\"raw_input\")\n                    .attr('type', input_type)\n                    .attr(\"size\", 47)\n                    .keydown(function (event, ui) {\n                        // make sure we submit on enter,\n                        // and don't re-execute the *cell* on shift-enter\n                        if (event.which === keyboard.keycodes.enter) {\n                            that._submit_raw_input();\n                            return false;\n                        }\n                    })\n                )\n            )\n        );\n        \n        this.element.append(area);\n        var raw_input = area.find('input.raw_input');\n        // Register events that enable/disable the keyboard manager while raw\n        // input is focused.\n        this.keyboard_manager.register_events(raw_input);\n        // Note, the following line used to read raw_input.focus().focus().\n        // This seemed to be needed otherwise only the cell would be focused.\n        // But with the modal UI, this seems to work fine with one call to focus().\n        raw_input.focus();\n    };\n\n    OutputArea.prototype._submit_raw_input = function (evt) {\n        var container = this.element.find(\"div.raw_input_container\");\n        var theprompt = container.find(\"pre.raw_input_prompt\");\n        var theinput = container.find(\"input.raw_input\");\n        var value = theinput.val();\n        var echo  = value;\n        // don't echo if it's a password\n        if (theinput.attr('type') == 'password') {\n            echo = '········';\n        }\n        var content = {\n            output_type : 'stream',\n            name : 'stdout',\n            text : theprompt.text() + echo + '\\n'\n        };\n        // remove form container\n        container.parent().remove();\n        // replace with plaintext version in stdout\n        this.append_output(content);\n        this.events.trigger('send_input_reply.Kernel', value);\n    };\n\n\n    OutputArea.prototype.handle_clear_output = function (msg) {\n        /**\n         * msg spec v4 had stdout, stderr, display keys\n         * v4.1 replaced these with just wait\n         * The default behavior is the same (stdout=stderr=display=True, wait=False),\n         * so v4 messages will still be properly handled,\n         * except for the rarely used clearing less than all output.\n         */\n        this.clear_output(msg.content.wait || false);\n    };\n\n\n    OutputArea.prototype.clear_output = function(wait, ignore_clear_queue) {\n        if (wait) {\n\n            // If a clear is queued, clear before adding another to the queue.\n            if (this.clear_queued) {\n                this.clear_output(false);\n            }\n\n            this.clear_queued = true;\n        } else {\n\n            // Fix the output div's height if the clear_output is waiting for\n            // new output (it is being used in an animation).\n            if (!ignore_clear_queue && this.clear_queued) {\n                // this.element.height() rounds the height, so we get the exact value\n                var height = this.element[0].getBoundingClientRect().height;\n                this.element.height(height);\n                this.clear_queued = false;\n            }\n            \n            // Clear all\n            // Remove load event handlers from img tags because we don't want\n            // them to fire if the image is never added to the page.\n            this.element.find('img').off('load');\n            this.element.trigger('clearing', {output_area: this});\n            this.element.html(\"\");\n\n            // Notify others of changes.\n            this.element.trigger('changed', {output_area: this});\n            this.element.trigger('cleared', {output_area: this});\n            \n            this.outputs = [];\n            this._display_id_targets = {};\n            this.trusted = true;\n            this.unscroll_area();\n            this.expand();\n            return;\n        }\n    };\n\n\n    // JSON serialization\n\n    OutputArea.prototype.fromJSON = function (outputs, metadata) {\n        var len = outputs.length;\n        metadata = metadata || {};\n\n        for (var i=0; i<len; i++) {\n            this.append_output(outputs[i]);\n        }\n        if (metadata.collapsed !== undefined) {\n            if (metadata.collapsed) {\n                this.collapse();\n            } else {\n                this.expand();\n            }\n        }\n        if (metadata.scrolled !== undefined) {\n            this.scroll_state = metadata.scrolled;\n            if (metadata.scrolled) {\n                this.scroll_if_long();\n            } else {\n                this.unscroll_area();\n            }\n        }\n    };\n\n    /**\n     * Return for-saving version of outputs.\n     * Excludes transient values.\n     */\n    OutputArea.prototype.toJSON = function () {\n        return this.outputs.map(function (out) {\n            var out2 = {};\n            Object.keys(out).map(function (key) {\n                if (key != 'transient') {\n                    out2[key] = out[key];\n                }\n            });\n            return out2;\n        });\n    };\n\n    /**\n     * Class properties\n     **/\n\n    /**\n     * Threshold to trigger autoscroll when the OutputArea is resized,\n     * typically when new outputs are added.\n     *\n     * Behavior is undefined if autoscroll is lower than minimum_scroll_threshold,\n     * unless it is < 0, in which case autoscroll will never be triggered\n     *\n     * @property auto_scroll_threshold\n     * @type Number\n     * @default 100\n     *\n     **/\n    OutputArea.auto_scroll_threshold = 100;\n\n    /**\n     * Lower limit (in lines) for OutputArea to be made scrollable. OutputAreas\n     * shorter than this are never scrolled.\n     *\n     * @property minimum_scroll_threshold\n     * @type Number\n     * @default 20\n     *\n     **/\n    OutputArea.minimum_scroll_threshold = 20;\n\n\n    OutputArea.display_order = [\n        MIME_JAVASCRIPT,\n        MIME_HTML,\n        MIME_MARKDOWN,\n        MIME_LATEX,\n        MIME_SVG,\n        MIME_PNG,\n        MIME_JPEG,\n        MIME_GIF,\n        MIME_PDF,\n        MIME_TEXT\n    ];\n\n    OutputArea.append_map = {};\n    OutputArea.append_map[MIME_TEXT] = append_text;\n    OutputArea.append_map[MIME_HTML] = append_html;\n    OutputArea.append_map[MIME_MARKDOWN] = append_markdown;\n    OutputArea.append_map[MIME_SVG] = append_svg;\n    OutputArea.append_map[MIME_PNG] = append_png;\n    OutputArea.append_map[MIME_JPEG] = append_jpeg;\n    OutputArea.append_map[MIME_GIF] = append_gif;\n    OutputArea.append_map[MIME_LATEX] = append_latex;\n    OutputArea.append_map[MIME_JAVASCRIPT] = append_javascript;\n    OutputArea.append_map[MIME_PDF] = append_pdf;\n    \n    OutputArea.prototype.mime_types = function () {\n        return OutputArea.display_order;\n    };\n    \n    OutputArea.prototype.register_mime_type = function (mimetype, append, options) {\n        if (mimetype && typeof(append) === 'function') {\n            OutputArea.output_types.push(mimetype);\n            if (options.safe) OutputArea.safe_outputs[mimetype] = true;\n            OutputArea.display_order.splice(options.index || 0, 0, mimetype);\n            OutputArea.append_map[mimetype] = append;\n        }\n    };\n\n    return {'OutputArea': OutputArea};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// highly adapted for codemiror jshint\ndefine('notebook/js/contexthint',['codemirror/lib/codemirror'], function(CodeMirror) {\n    \"use strict\";\n\n    var forEach = function(arr, f) {\n        for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n    };\n\n    var arrayContains = function(arr, item) {\n        if (!Array.prototype.indexOf) {\n            var i = arr.length;\n            while (i--) {\n                if (arr[i] === item) {\n                    return true;\n                }\n            }\n            return false;\n        }\n        return arr.indexOf(item) != -1;\n    };\n\n    CodeMirror.contextHint = function (editor) {\n        // Find the token at the cursor\n        var cur = editor.getCursor(),\n            token = editor.getTokenAt(cur),\n            tprop = token;\n        // If it's not a 'word-style' token, ignore the token.\n        // If it is a property, find out what it is a property of.\n        var list = [];\n        var clist = getCompletions(token, editor);\n        for (var i = 0; i < clist.length; i++) {\n            list.push({\n                str: clist[i],\n                type: \"context\",\n                from: {\n                    line: cur.line,\n                    ch: token.start\n                },\n                to: {\n                    line: cur.line,\n                    ch: token.end\n                }\n            });\n        }\n        return list;\n    };\n\n    // find all 'words' of current cell\n    var getAllTokens = function (editor) {\n        var found = [];\n\n        // add to found if not already in it\n\n\n        function maybeAdd(str) {\n            if (!arrayContains(found, str)) found.push(str);\n        }\n\n        // loop through all token on all lines\n        var lineCount = editor.lineCount();\n        // loop on line\n        for (var l = 0; l < lineCount; l++) {\n            var line = editor.getLine(l);\n            //loop on char\n            for (var c = 1; c < line.length; c++) {\n                var tk = editor.getTokenAt({\n                    line: l,\n                    ch: c\n                });\n                // if token has a class, it has geat chances of beeing\n                // of interest. Add it to the list of possible completions.\n                // we could skip token of ClassName 'comment'\n                // or 'number' and 'operator'\n                if (tk.className !== null) {\n                    maybeAdd(tk.string);\n                }\n                // jump to char after end of current token\n                c = tk.end;\n            }\n        }\n        return found;\n    };\n\n    var getCompletions = function(token, editor) {\n        var candidates = getAllTokens(editor);\n        // filter all token that have a common start (but nox exactly) the lenght of the current token\n        var lambda = function (x) {\n                return (x.indexOf(token.string) === 0 && x != token.string);\n            };\n        var filterd = candidates.filter(lambda);\n        return filterd;\n    };\n\n    return {'contextHint': CodeMirror.contextHint};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/completer',[\n    'jquery',\n    'base/js/utils',\n    'base/js/keyboard',\n    'notebook/js/contexthint',\n    'codemirror/lib/codemirror',\n], function($, utils, keyboard, CodeMirror) {\n    \"use strict\";\n\n    // easier key mapping\n    var keycodes = keyboard.keycodes;\n\n    var prepend_n_prc = function(str, n) {\n        for( var i =0 ; i< n ; i++){\n            str = '%'+str ;\n        }\n        return str;\n    };\n\n    var _existing_completion = function(item, completion_array){\n        for( var i=0; i < completion_array.length; i++) {\n            if (completion_array[i].trim().substr(-item.length) == item) {\n                return true;\n            }\n        }\n        return false;\n    };\n\n    // what is the common start of all completions\n    function shared_start(B, drop_prct) {\n        if (B.length == 1) {\n            return B[0];\n        }\n        var A = [];\n        var common;\n        var min_lead_prct = 10;\n        for (var i = 0; i < B.length; i++) {\n            var str = B[i].str;\n            var localmin = 0;\n            if(drop_prct === true){\n                while ( str.substr(0, 1) == '%') {\n                    localmin = localmin+1;\n                    str = str.substring(1);\n                }\n            }\n            min_lead_prct = Math.min(min_lead_prct, localmin);\n            A.push(str);\n        }\n\n        if (A.length > 1) {\n            var tem1, tem2, s;\n            A = A.slice(0).sort();\n            tem1 = A[0];\n            s = tem1.length;\n            tem2 = A.pop();\n            while (s && tem2.indexOf(tem1) == -1) {\n                tem1 = tem1.substring(0, --s);\n            }\n            if (tem1 === \"\" || tem2.indexOf(tem1) !== 0) {\n                return {\n                    str:prepend_n_prc('', min_lead_prct),\n                    type: \"computed\",\n                    from: B[0].from,\n                    to: B[0].to\n                    };\n            }\n            return {\n                str: prepend_n_prc(tem1, min_lead_prct),\n                type: \"computed\",\n                from: B[0].from,\n                to: B[0].to\n            };\n        }\n        return null;\n    }\n\n\n    var Completer = function (cell, events) {\n        this.cell = cell;\n        this.editor = cell.code_mirror;\n        var that = this;\n        events.on('kernel_busy.Kernel', function () {\n            that.skip_kernel_completion = true;\n        });\n        events.on('kernel_idle.Kernel', function () {\n            that.skip_kernel_completion = false;\n        });\n    };\n\n    Completer.prototype.startCompletion = function () {\n        /**\n         * call for a 'first' completion, that will set the editor and do some\n         * special behavior like autopicking if only one completion available.\n         */\n        if (this.editor.somethingSelected()|| this.editor.getSelections().length > 1) return;\n        this.done = false;\n        // use to get focus back on opera\n        this.carry_on_completion(true);\n    };\n\n\n    // easy access for julia to monkeypatch\n    //\n    Completer.reinvoke_re = /[%0-9a-z._/\\\\:~-]/i;\n\n    Completer.prototype.reinvoke= function(pre_cursor, block, cursor){\n        return Completer.reinvoke_re.test(pre_cursor);\n    };\n\n    /**\n     *\n     * pass true as parameter if this is the first invocation of the completer\n     * this will prevent the completer to dissmiss itself if it is not on a\n     * word boundary like pressing tab after a space, and make it autopick the\n     * only choice if there is only one which prevent from popping the UI.  as\n     * well as fast-forwarding the typing if all completion have a common\n     * shared start\n     **/\n    Completer.prototype.carry_on_completion = function (first_invocation) {\n        /**\n         * Pass true as parameter if you want the completer to autopick when\n         * only one completion. This function is automatically reinvoked at\n         * each keystroke with first_invocation = false\n         */\n        var cur = this.editor.getCursor();\n        var line = this.editor.getLine(cur.line);\n        var pre_cursor = this.editor.getRange({\n            line: cur.line,\n            ch: cur.ch - 1\n        }, cur);\n\n        // we need to check that we are still on a word boundary\n        // because while typing the completer is still reinvoking itself\n        // so dismiss if we are on a \"bad\" caracter\n        if (!this.reinvoke(pre_cursor) && !first_invocation) {\n            this.close();\n            return;\n        }\n\n        this.autopick = false;\n        if (first_invocation) {\n            this.autopick = true;\n        }\n\n        // We want a single cursor position.\n        if (this.editor.somethingSelected()|| this.editor.getSelections().length > 1) {\n            return;\n        }\n\n        // one kernel completion came back, finish_completing will be called with the results\n        // we fork here and directly call finish completing if kernel is busy\n        var cursor_pos = this.editor.indexFromPos(cur);\n        var text = this.editor.getValue();\n        cursor_pos = utils.js_idx_to_char_idx(cursor_pos, text);\n        if (this.skip_kernel_completion) {\n            this.finish_completing({ content: {\n                matches: [],\n                cursor_start: cursor_pos,\n                cursor_end: cursor_pos,\n            }});\n        } else {\n            this.cell.kernel.complete(text, cursor_pos,\n                $.proxy(this.finish_completing, this)\n            );\n        }\n    };\n\n    Completer.prototype.finish_completing = function (msg) {\n        /**\n         * let's build a function that wrap all that stuff into what is needed\n         * for the new completer:\n         */\n        var content = msg.content;\n        var start = content.cursor_start;\n        var end = content.cursor_end;\n        var matches = content.matches;\n        console.log(content);\n\n        var cur = this.editor.getCursor();\n        if (end === null) {\n            // adapted message spec replies don't have cursor position info,\n            // interpret end=null as current position,\n            // and negative start relative to that\n            end = this.editor.indexFromPos(cur);\n            if (start === null) {\n                start = end;\n            } else if (start < 0) {\n                start = end + start;\n            }\n        } else {\n            // handle surrogate pairs\n            var text = this.editor.getValue();\n            end = utils.char_idx_to_js_idx(end, text);\n            start = utils.char_idx_to_js_idx(start, text);\n        }\n\n        var results = CodeMirror.contextHint(this.editor);\n        var filtered_results = [];\n        //remove results from context completion\n        //that are already in kernel completion\n        var i;\n        for (i=0; i < results.length; i++) {\n            if (!_existing_completion(results[i].str, matches)) {\n                filtered_results.push(results[i]);\n            }\n        }\n\n        // append the introspection result, in order, at at the beginning of\n        // the table and compute the replacement range from current cursor\n        // positon and matched_text length.\n        var from = this.editor.posFromIndex(start);\n        var to = this.editor.posFromIndex(end);\n        for (i = matches.length - 1; i >= 0; --i) {\n            filtered_results.unshift({\n                str: matches[i],\n                type: \"introspection\",\n                from: from,\n                to: to\n            });\n        }\n\n        // one the 2 sources results have been merge, deal with it\n        this.raw_result = filtered_results;\n\n        // if empty result return\n        if (!this.raw_result || !this.raw_result.length) return;\n\n        // When there is only one completion, use it directly.\n        if (this.autopick && this.raw_result.length == 1) {\n            this.insert(this.raw_result[0]);\n            return;\n        }\n\n        if (this.raw_result.length == 1) {\n            // test if first and only completion totally matches\n            // what is typed, in this case dismiss\n            var str = this.raw_result[0].str;\n            var pre_cursor = this.editor.getRange({\n                line: cur.line,\n                ch: cur.ch - str.length\n            }, cur);\n            if (pre_cursor == str) {\n                this.close();\n                return;\n            }\n        }\n\n        if (!this.visible) {\n            this.complete = $('<div/>').addClass('completions');\n            this.complete.attr('id', 'complete');\n\n            // Currently webkit doesn't use the size attr correctly. See:\n            // https://code.google.com/p/chromium/issues/detail?id=4579\n            this.sel = $('<select/>')\n                .attr('tabindex', -1)\n                .attr('multiple', 'true');\n            this.complete.append(this.sel);\n            this.visible = true;\n            $('body').append(this.complete);\n\n            //build the container\n            var that = this;\n            this.sel.click(function () {\n                that.pick();\n                that.editor.focus();\n            });\n            this._handle_keydown = function (cm, event) {\n                that.keydown(event);\n            };\n            this.editor.on('keydown', this._handle_keydown);\n            this._handle_keypress = function (cm, event) {\n                that.keypress(event);\n            };\n            this.editor.on('keypress', this._handle_keypress);\n        }\n        this.sel.attr('size', Math.min(10, this.raw_result.length));\n\n        // After everything is on the page, compute the postion.\n        // We put it above the code if it is too close to the bottom of the page.\n        var pos = this.editor.cursorCoords(\n            this.editor.posFromIndex(start)\n        );\n        var left = pos.left-3;\n        var top;\n        var cheight = this.complete.height();\n        var wheight = $(window).height();\n        if (pos.bottom+cheight+5 > wheight) {\n            top = pos.top-cheight-4;\n        } else {\n            top = pos.bottom+1;\n        }\n        this.complete.css('left', left + 'px');\n        this.complete.css('top', top + 'px');\n\n        // Clear and fill the list.\n        this.sel.text('');\n        this.build_gui_list(this.raw_result);\n        return true;\n    };\n\n    Completer.prototype.insert = function (completion) {\n        this.editor.replaceRange(completion.str, completion.from, completion.to);\n    };\n\n    Completer.prototype.build_gui_list = function (completions) {\n        for (var i = 0; i < completions.length; ++i) {\n            var opt = $('<option/>').text(completions[i].str).addClass(completions[i].type);\n            this.sel.append(opt);\n        }\n        this.sel.children().first().attr('selected', 'true');\n        this.sel.scrollTop(0);\n    };\n\n    Completer.prototype.close = function () {\n        this.done = true;\n        $('#complete').remove();\n        this.editor.off('keydown', this._handle_keydown);\n        this.editor.off('keypress', this._handle_keypress);\n        this.visible = false;\n    };\n\n    Completer.prototype.pick = function () {\n        this.insert(this.raw_result[this.sel[0].selectedIndex]);\n        this.close();\n    };\n\n    Completer.prototype.keydown = function (event) {\n        var code = event.keyCode;\n\n        // Enter\n        var options;\n        var index;\n        if (code == keycodes.enter) {\n            event.codemirrorIgnore = true;\n            event._ipkmIgnore = true;\n            event.preventDefault();\n            this.pick();\n        // Escape or backspace\n        } else if (code == keycodes.esc || code == keycodes.backspace) {\n            event.codemirrorIgnore = true;\n            event._ipkmIgnore = true;\n            event.preventDefault();\n            this.close();\n        } else if (code == keycodes.tab) {\n            //all the fastforwarding operation,\n            //Check that shared start is not null which can append with prefixed completion\n            // like %pylab , pylab have no shred start, and ff will result in py<tab><tab>\n            // to erase py\n            var sh = shared_start(this.raw_result, true);\n            if (sh.str !== '') {\n                this.insert(sh);\n            }\n            this.close();\n            this.carry_on_completion();\n        } else if (code == keycodes.up || code == keycodes.down) {\n            // need to do that to be able to move the arrow\n            // when on the first or last line ofo a code cell\n            event.codemirrorIgnore = true;\n            event._ipkmIgnore = true;\n            event.preventDefault();\n\n            options = this.sel.find('option');\n            index = this.sel[0].selectedIndex;\n            if (code == keycodes.up) {\n                index--;\n            }\n            if (code == keycodes.down) {\n                index++;\n            }\n            index = Math.min(Math.max(index, 0), options.length-1);\n            this.sel[0].selectedIndex = index;\n        } else if (code == keycodes.pageup || code == keycodes.pagedown) {\n            event._ipkmIgnore = true;\n\n            options = this.sel.find('option');\n            index = this.sel[0].selectedIndex;\n            if (code == keycodes.pageup) {\n                index -= 10; // As 10 is the hard coded size of the drop down menu\n            } else {\n                index += 10;\n            }\n            index = Math.min(Math.max(index, 0), options.length-1);\n            this.sel[0].selectedIndex = index;\n        } else if (code == keycodes.left || code == keycodes.right) {\n            this.close();\n        }\n    };\n\n    Completer.prototype.keypress = function (event) {\n        /**\n         * FIXME: This is a band-aid.\n         * on keypress, trigger insertion of a single character.\n         * This simulates the old behavior of completion as you type,\n         * before events were disconnected and CodeMirror stopped\n         * receiving events while the completer is focused.\n         */\n        \n        var that = this;\n        var code = event.keyCode;\n        \n        // don't handle keypress if it's not a character (arrows on FF)\n        // or ENTER/TAB\n        if (event.charCode === 0 ||\n            code == keycodes.tab ||\n            code == keycodes.enter\n        ) return;\n        \n        this.close();\n        this.editor.focus();\n        setTimeout(function () {\n            that.carry_on_completion();\n        }, 50);\n    };\n\n    return {'Completer': Completer};\n});\n\n",
    "// IPython mode is just a slightly altered Python Mode with `?` beeing a extra\n// single operator. Here we define `ipython` mode in the require `python`\n// callback to auto-load python mode, which is more likely not the best things\n// to do, but at least the simple one for now.\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\"){ // CommonJS\n    mod(require(\"codemirror/lib/codemirror\"),\n        require(\"codemirror/mode/python/python\")\n        );\n  } else if (typeof define == \"function\" && define.amd){ // AMD\n    define('notebook/js/codemirror-ipython',[\"codemirror/lib/codemirror\",\n            \"codemirror/mode/python/python\"], mod);\n  } else {// Plain browser env\n    mod(CodeMirror);\n  }\n})(function(CodeMirror) {\n    \"use strict\";\n\n    CodeMirror.defineMode(\"ipython\", function(conf, parserConf) {\n        var pythonConf = {};\n        for (var prop in parserConf) {\n            if (parserConf.hasOwnProperty(prop)) {\n                pythonConf[prop] = parserConf[prop];\n            }\n        }\n        pythonConf.name = 'python';\n        pythonConf.singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/%&|@\\\\^~<>!\\\\?]\");\n        if (pythonConf.version === 3) {\n            pythonConf.identifiers = new RegExp(\"^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*\");\n        } else if (pythonConf.version === 2) {\n            pythonConf.identifiers = new RegExp(\"^[_A-Za-z][_A-Za-z0-9]*\");\n        }\n        return CodeMirror.getMode(conf, pythonConf);\n    }, 'python');\n\n    CodeMirror.defineMIME(\"text/x-ipython\", \"ipython\");\n})\n;\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n *\n *\n * @module codecell\n * @namespace codecell\n * @class CodeCell\n */\n\n\ndefine('notebook/js/codecell',[\n    'jquery',\n    'base/js/namespace',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/keyboard',\n    'services/config',\n    'notebook/js/cell',\n    'notebook/js/outputarea',\n    'notebook/js/completer',\n    'notebook/js/celltoolbar',\n    'codemirror/lib/codemirror',\n    'codemirror/mode/python/python',\n    'notebook/js/codemirror-ipython'\n], function(\n    $,\n    IPython,\n    utils,\n    i18n,\n    keyboard,\n    configmod,\n    cell,\n    outputarea,\n    completer,\n    celltoolbar,\n    CodeMirror,\n    cmpython,\n    cmip\n    ) {\n    \"use strict\";\n    \n    var Cell = cell.Cell;\n\n    /* local util for codemirror */\n    var posEq = function(a, b) {return a.line === b.line && a.ch === b.ch;};\n\n    /**\n     *\n     * function to delete until previous non blanking space character\n     * or first multiple of 4 tabstop.\n     * @private\n     */\n    CodeMirror.commands.delSpaceToPrevTabStop = function(cm){\n        var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);\n         if (sel) {\n            var ranges = cm.listSelections();\n            for (var i = ranges.length - 1; i >= 0; i--) {\n                var head = ranges[i].head;\n                var anchor = ranges[i].anchor;\n                cm.replaceRange(\"\", CodeMirror.Pos(head.line, head.ch), CodeMirror.Pos(anchor.line, anchor.ch));\n            }\n            return;\n        }\n        var cur = cm.getCursor(), line = cm.getLine(cur.line);\n        var tabsize = cm.getOption('tabSize');\n        var chToPrevTabStop = cur.ch-(Math.ceil(cur.ch/tabsize)-1)*tabsize;\n        from = {ch:cur.ch-chToPrevTabStop,line:cur.line};\n        var select = cm.getRange(from,cur);\n        if( select.match(/^\\ +$/) !== null){\n            cm.replaceRange(\"\",from,cur);\n        } else {\n            cm.deleteH(-1,\"char\");\n        }\n    };\n\n    var keycodes = keyboard.keycodes;\n\n    var CodeCell = function (kernel, options) {\n        /**\n         * Constructor\n         *\n         * A Cell conceived to write code.\n         *\n         * Parameters:\n         *  kernel: Kernel instance\n         *      The kernel doesn't have to be set at creation time, in that case\n         *      it will be null and set_kernel has to be called later.\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance \n         *          config: dictionary\n         *          keyboard_manager: KeyboardManager instance \n         *          notebook: Notebook instance\n         *          tooltip: Tooltip instance\n         */\n        this.kernel = kernel || null;\n        this.notebook = options.notebook;\n        this.collapsed = false;\n        this.events = options.events;\n        this.tooltip = options.tooltip;\n        this.config = options.config;\n        this.class_config = new configmod.ConfigWithDefaults(this.config,\n                                        CodeCell.options_default, 'CodeCell');\n\n        // create all attributed in constructor function\n        // even if null for V8 VM optimisation\n        this.input_prompt_number = null;\n        this.celltoolbar = null;\n        this.output_area = null;\n\n        this.last_msg_id = null;\n        this.completer = null;\n\n        Cell.apply(this,[{\n            config: options.config, \n            keyboard_manager: options.keyboard_manager, \n            events: this.events}]);\n\n        // Attributes we want to override in this subclass.\n        this.cell_type = \"code\";\n        var that  = this;\n        this.element.focusout(\n            function() { that.auto_highlight(); }\n        );\n    };\n\n    CodeCell.options_default = {\n        cm_config : {\n            extraKeys: {\n                \"Backspace\" : \"delSpaceToPrevTabStop\",\n            },\n            mode: 'text',\n            theme: 'ipython',\n            matchBrackets: true,\n            autoCloseBrackets: true\n        },\n        highlight_modes : {\n            'magic_javascript'    :{'reg':['^%%javascript']},\n            'magic_perl'          :{'reg':['^%%perl']},\n            'magic_ruby'          :{'reg':['^%%ruby']},\n            'magic_python'        :{'reg':['^%%python3?']},\n            'magic_shell'         :{'reg':['^%%bash']},\n            'magic_r'             :{'reg':['^%%R']},\n            'magic_text/x-cython' :{'reg':['^%%cython']},\n        },\n    };\n\n    CodeCell.msg_cells = {};\n\n    CodeCell.prototype = Object.create(Cell.prototype);\n    \n    /** @method create_element */\n    CodeCell.prototype.create_element = function () {\n        Cell.prototype.create_element.apply(this, arguments);\n        var that = this;\n\n        var cell =  $('<div></div>').addClass('cell code_cell');\n        cell.attr('tabindex','2');\n\n        var input = $('<div></div>').addClass('input');\n        this.input = input;\n        var prompt = $('<div/>').addClass('prompt input_prompt');\n        var inner_cell = $('<div/>').addClass('inner_cell');\n        this.celltoolbar = new celltoolbar.CellToolbar({\n            cell: this, \n            notebook: this.notebook});\n        inner_cell.append(this.celltoolbar.element);\n        var input_area = $('<div/>').addClass('input_area');\n        this.code_mirror = new CodeMirror(input_area.get(0), this._options.cm_config);\n        // In case of bugs that put the keyboard manager into an inconsistent state,\n        // ensure KM is enabled when CodeMirror is focused:\n        this.code_mirror.on('focus', function () {\n            if (that.keyboard_manager) {\n                that.keyboard_manager.enable();\n            }\n\n            that.code_mirror.setOption('readOnly', !that.is_editable());\n        });\n        this.code_mirror.on('keydown', $.proxy(this.handle_keyevent,this));\n        $(this.code_mirror.getInputField()).attr(\"spellcheck\", \"false\");\n        inner_cell.append(input_area);\n        input.append(prompt).append(inner_cell);\n\n        var output = $('<div></div>');\n        cell.append(input).append(output);\n        this.element = cell;\n        this.output_area = new outputarea.OutputArea({\n            config: this.config,\n            selector: output,\n            prompt_area: true,\n            events: this.events,\n            keyboard_manager: this.keyboard_manager,\n        });\n        this.completer = new completer.Completer(this, this.events);\n    };\n\n    /** @method bind_events */\n    CodeCell.prototype.bind_events = function () {\n        Cell.prototype.bind_events.apply(this, arguments);\n        var that = this;\n\n        this.element.focusout(\n            function() { that.auto_highlight(); }\n        );\n    };\n\n\n    /**\n     *  This method gets called in CodeMirror's onKeyDown/onKeyPress\n     *  handlers and is used to provide custom key handling. Its return\n     *  value is used to determine if CodeMirror should ignore the event:\n     *  true = ignore, false = don't ignore.\n     *  @method handle_codemirror_keyevent\n     */\n\n    CodeCell.prototype.handle_codemirror_keyevent = function (editor, event) {\n\n        var that = this;\n        // whatever key is pressed, first, cancel the tooltip request before\n        // they are sent, and remove tooltip if any, except for tab again\n        var tooltip_closed = null;\n        if (event.type === 'keydown' && event.which !== keycodes.tab ) {\n            tooltip_closed = this.tooltip.remove_and_cancel_tooltip();\n        }\n\n        var cur = editor.getCursor();\n        if (event.keyCode === keycodes.enter){\n            this.auto_highlight();\n        }\n\n        if (event.which === keycodes.down && event.type === 'keypress' && this.tooltip.time_before_tooltip >= 0) {\n            // triger on keypress (!) otherwise inconsistent event.which depending on plateform\n            // browser and keyboard layout !\n            // Pressing '(' , request tooltip, don't forget to reappend it\n            // The second argument says to hide the tooltip if the docstring\n            // is actually empty\n            this.tooltip.pending(that, true);\n        } else if ( tooltip_closed && event.which === keycodes.esc && event.type === 'keydown') {\n            // If tooltip is active, cancel it.  The call to\n            // remove_and_cancel_tooltip above doesn't pass, force=true.\n            // Because of this it won't actually close the tooltip\n            // if it is in sticky mode. Thus, we have to check again if it is open\n            // and close it with force=true.\n            if (!this.tooltip._hidden) {\n                this.tooltip.remove_and_cancel_tooltip(true);\n            }\n            // If we closed the tooltip, don't let CM or the global handlers\n            // handle this event.\n            event.codemirrorIgnore = true;\n            event._ipkmIgnore = true;\n            event.preventDefault();\n            return true;\n        } else if (event.keyCode === keycodes.tab && event.type === 'keydown' && event.shiftKey) {\n                if (editor.somethingSelected() || editor.getSelections().length !== 1){\n                    var anchor = editor.getCursor(\"anchor\");\n                    var head = editor.getCursor(\"head\");\n                    if( anchor.line !== head.line){\n                        return false;\n                    }\n                }\n                var pre_cursor = editor.getRange({line:cur.line,ch:0},cur);\n                if (pre_cursor.trim() === \"\") {\n                    // Don't show tooltip if the part of the line before the cursor\n                    // is empty.  In this case, let CodeMirror handle indentation.\n                    return false;\n                } \n                this.tooltip.request(that);\n                event.codemirrorIgnore = true;\n                event.preventDefault();\n                return true;\n        } else if (event.keyCode === keycodes.tab && event.type === 'keydown') {\n            // Tab completion.\n            this.tooltip.remove_and_cancel_tooltip();\n\n            // completion does not work on multicursor, it might be possible though in some cases\n            if (editor.somethingSelected() || editor.getSelections().length > 1) {\n                return false;\n            }\n            var pre_cursor = editor.getRange({line:cur.line,ch:0},cur);\n            if (pre_cursor.trim() === \"\") {\n                // Don't autocomplete if the part of the line before the cursor\n                // is empty.  In this case, let CodeMirror handle indentation.\n                return false;\n            } else {\n                event.codemirrorIgnore = true;\n                event.preventDefault();\n                this.completer.startCompletion();\n                return true;\n            }\n        } \n        \n        // keyboard event wasn't one of those unique to code cells, let's see\n        // if it's one of the generic ones (i.e. check edit mode shortcuts)\n        return Cell.prototype.handle_codemirror_keyevent.apply(this, [editor, event]);\n    };\n\n    // Kernel related calls.\n\n    CodeCell.prototype.set_kernel = function (kernel) {\n        this.kernel = kernel;\n    };\n\n    /**\n     * Execute current code cell to the kernel\n     * @method execute\n     */\n    CodeCell.prototype.execute = function (stop_on_error) {\n        if (!this.kernel) {\n            console.log(i18n.msg._(\"Can't execute cell since kernel is not set.\"));\n            return;\n        }\n\n        if (stop_on_error === undefined) {\n            if (this.metadata !== undefined && \n                    this.metadata.tags !== undefined) {\n                if (this.metadata.tags.indexOf('raises-exception') !== -1) {\n                    stop_on_error = false;\n                } else {\n                    stop_on_error = true;\n                }\n            } else {\n               stop_on_error = true;\n            }\n        }\n\n        this.clear_output(false, true);\n        var old_msg_id = this.last_msg_id;\n        if (old_msg_id) {\n            this.kernel.clear_callbacks_for_msg(old_msg_id);\n            delete CodeCell.msg_cells[old_msg_id];\n            this.last_msg_id = null;\n        }\n        if (this.get_text().trim().length === 0) {\n            // nothing to do\n            this.set_input_prompt(null);\n            return;\n        }\n        this.set_input_prompt('*');\n        this.element.addClass(\"running\");\n        var callbacks = this.get_callbacks();\n        \n        this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true,\n            stop_on_error : stop_on_error});\n        CodeCell.msg_cells[this.last_msg_id] = this;\n        this.render();\n        this.events.trigger('execute.CodeCell', {cell: this});\n        var that = this;\n        function handleFinished(evt, data) {\n            if (that.kernel.id === data.kernel.id && that.last_msg_id === data.msg_id) {\n                    that.events.trigger('finished_execute.CodeCell', {cell: that});\n                that.events.off('finished_iopub.Kernel', handleFinished);\n              }\n        }\n        this.events.on('finished_iopub.Kernel', handleFinished);\n    };\n    \n    /**\n     * Construct the default callbacks for\n     * @method get_callbacks\n     */\n    CodeCell.prototype.get_callbacks = function () {\n        var that = this;\n        return {\n            clear_on_done: false,\n            shell : {\n                reply : $.proxy(this._handle_execute_reply, this),\n                payload : {\n                    set_next_input : $.proxy(this._handle_set_next_input, this),\n                    page : $.proxy(this._open_with_pager, this)\n                }\n            },\n            iopub : {\n                output : function() { \n                    that.events.trigger('set_dirty.Notebook', {value: true});\n                    that.output_area.handle_output.apply(that.output_area, arguments);\n                }, \n                clear_output : function() { \n                    that.events.trigger('set_dirty.Notebook', {value: true});\n                    that.output_area.handle_clear_output.apply(that.output_area, arguments);\n                }, \n            },\n            input : $.proxy(this._handle_input_request, this),\n        };\n    };\n    \n    CodeCell.prototype._open_with_pager = function (payload) {\n        this.events.trigger('open_with_text.Pager', payload);\n    };\n\n    /**\n     * @method _handle_execute_reply\n     * @private\n     */\n    CodeCell.prototype._handle_execute_reply = function (msg) {\n        this.set_input_prompt(msg.content.execution_count);\n        this.element.removeClass(\"running\");\n        this.events.trigger('set_dirty.Notebook', {value: true});\n    };\n\n    /**\n     * @method _handle_set_next_input\n     * @private\n     */\n    CodeCell.prototype._handle_set_next_input = function (payload) {\n        var data = {\n            cell: this,\n            text: payload.text,\n            replace: payload.replace,\n            clear_output: payload.clear_output,\n        };\n        this.events.trigger('set_next_input.Notebook', data);\n    };\n\n    /**\n     * @method _handle_input_request\n     * @private\n     */\n    CodeCell.prototype._handle_input_request = function (msg) {\n        this.output_area.append_raw_input(msg);\n    };\n\n\n    // Basic cell manipulation.\n\n    CodeCell.prototype.select = function () {\n        var cont = Cell.prototype.select.apply(this, arguments);\n        if (cont) {\n            this.code_mirror.refresh();\n            this.auto_highlight();\n        }\n        return cont;\n    };\n\n    CodeCell.prototype.render = function () {\n        var cont = Cell.prototype.render.apply(this, arguments);\n        // Always execute, even if we are already in the rendered state\n        return cont;\n    };\n    \n    CodeCell.prototype.select_all = function () {\n        var start = {line: 0, ch: 0};\n        var nlines = this.code_mirror.lineCount();\n        var last_line = this.code_mirror.getLine(nlines-1);\n        var end = {line: nlines-1, ch: last_line.length};\n        this.code_mirror.setSelection(start, end);\n    };\n\n\n    CodeCell.prototype.collapse_output = function () {\n        this.output_area.collapse();\n    };\n\n\n    CodeCell.prototype.expand_output = function () {\n        this.output_area.expand();\n        this.output_area.unscroll_area();\n    };\n\n    CodeCell.prototype.scroll_output = function () {\n        this.output_area.expand();\n        this.output_area.scroll_if_long();\n    };\n\n    CodeCell.prototype.toggle_output = function () {\n        this.output_area.toggle_output();\n    };\n\n    CodeCell.prototype.toggle_output_scroll = function () {\n        this.output_area.toggle_scroll();\n    };\n\n\n    CodeCell.input_prompt_classical = function (prompt_value, lines_number) {\n        var ns;\n        if (prompt_value === undefined || prompt_value === null) {\n            ns = \"&nbsp;\";\n        } else {\n            ns = encodeURIComponent(prompt_value);\n        }\n        return '<bdi>'+i18n.msg._('In')+'</bdi>&nbsp;[' + ns + ']:';\n    };\n\n    CodeCell.input_prompt_continuation = function (prompt_value, lines_number) {\n        var html = [CodeCell.input_prompt_classical(prompt_value, lines_number)];\n        for(var i=1; i < lines_number; i++) {\n            html.push(['...:']);\n        }\n        return html.join('<br/>');\n    };\n\n    CodeCell.input_prompt_function = CodeCell.input_prompt_classical;\n\n\n    CodeCell.prototype.set_input_prompt = function (number) {\n        var nline = 1;\n        if (this.code_mirror !== undefined) {\n           nline = this.code_mirror.lineCount();\n        }\n        this.input_prompt_number = number;\n        var prompt_html = CodeCell.input_prompt_function(this.input_prompt_number, nline);\n        // This HTML call is okay because the user contents are escaped.\n        this.element.find('div.input_prompt').html(prompt_html);\n        this.events.trigger('set_dirty.Notebook', {value: true});\n    };\n\n\n    CodeCell.prototype.clear_input = function () {\n        this.code_mirror.setValue('');\n    };\n\n\n    CodeCell.prototype.get_text = function () {\n        return this.code_mirror.getValue();\n    };\n\n\n    CodeCell.prototype.set_text = function (code) {\n        return this.code_mirror.setValue(code);\n    };\n\n\n    CodeCell.prototype.clear_output = function (wait, ignore_queue) {\n        this.events.trigger('clear_output.CodeCell', {cell: this});\n        this.output_area.clear_output(wait, ignore_queue);\n        this.set_input_prompt();\n    };\n\n\n    // JSON serialization\n\n    CodeCell.prototype.fromJSON = function (data) {\n        Cell.prototype.fromJSON.apply(this, arguments);\n        if (data.cell_type === 'code') {\n            if (data.source !== undefined) {\n                this.set_text(data.source);\n                // make this value the starting point, so that we can only undo\n                // to this state, instead of a blank cell\n                this.code_mirror.clearHistory();\n                this.auto_highlight();\n            }\n            this.set_input_prompt(data.execution_count);\n            this.output_area.trusted = data.metadata.trusted || false;\n            this.output_area.fromJSON(data.outputs, data.metadata);\n        }\n    };\n\n\n    CodeCell.prototype.toJSON = function () {\n        var data = Cell.prototype.toJSON.apply(this);\n        data.source = this.get_text();\n        // is finite protect against undefined and '*' value\n        if (isFinite(this.input_prompt_number)) {\n            data.execution_count = this.input_prompt_number;\n        } else {\n            data.execution_count = null;\n        }\n        var outputs = this.output_area.toJSON();\n        data.outputs = outputs;\n        data.metadata.trusted = this.output_area.trusted;\n        if (this.output_area.collapsed) {\n            data.metadata.collapsed = this.output_area.collapsed;\n        } else {\n            delete data.metadata.collapsed;\n        }\n        if (this.output_area.scroll_state === 'auto') {\n            delete data.metadata.scrolled;\n        } else {\n            data.metadata.scrolled = this.output_area.scroll_state;\n        }\n        return data;\n    };\n\n    /**\n     * handle cell level logic when the cell is unselected\n     * @method unselect\n     * @return is the action being taken\n     */\n    CodeCell.prototype.unselect = function() {\n        var cont = Cell.prototype.unselect.apply(this, arguments);\n        if (cont) {\n            // When a code cell is unselected, make sure that the corresponding\n            // tooltip and completer to that cell is closed.\n            this.tooltip.remove_and_cancel_tooltip(true);\n            if (this.completer !== null) {\n                this.completer.close();\n            }\n        }\n        return cont;\n    };\n\n    // Backwards compatability.\n    IPython.CodeCell = CodeCell;\n\n    return {'CodeCell': CodeCell};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/kernels/comm',[\n    'jquery',\n    'base/js/utils',\n], function($, utils) {\n    \"use strict\";\n\n    //-----------------------------------------------------------------------\n    // CommManager class\n    //-----------------------------------------------------------------------\n    \n    var CommManager = function (kernel) {\n        this.comms = {};\n        this.targets = {};\n        if (kernel !== undefined) {\n            this.init_kernel(kernel);\n        }\n    };\n    \n    CommManager.prototype.init_kernel = function (kernel) {\n        /**\n         * connect the kernel, and register message handlers\n         */\n        this.kernel = kernel;\n        var msg_types = ['comm_open', 'comm_msg', 'comm_close'];\n        for (var i = 0; i < msg_types.length; i++) {\n            var msg_type = msg_types[i];\n            kernel.register_iopub_handler(msg_type, $.proxy(this[msg_type], this));\n        }\n    };\n\n    CommManager.prototype.new_comm = function (target_name, data, callbacks, metadata, comm_id, buffers) {\n        /**\n         * Create a new Comm, register it, and open its Kernel-side counterpart\n         * Mimics the auto-registration in `Comm.__init__` in the Jupyter Comm.\n         *\n         * argument comm_id is optional\n         */\n        var comm = new Comm(target_name, comm_id);\n        this.register_comm(comm);\n        comm.open(data, callbacks, metadata, buffers);\n        return comm;\n    };\n    \n    CommManager.prototype.register_target = function (target_name, f) {\n        /**\n         * Register a target function for a given target name\n         */\n        this.targets[target_name] = f;\n    };\n    \n    CommManager.prototype.unregister_target = function (target_name, f) {\n        /**\n         * Unregister a target function for a given target name\n         */\n        delete this.targets[target_name];\n    };\n    \n    CommManager.prototype.register_comm = function (comm) {\n        /**\n         * Register a comm in the mapping\n         */\n        this.comms[comm.comm_id] = Promise.resolve(comm);\n        comm.kernel = this.kernel;\n        return comm.comm_id;\n    };\n    \n    CommManager.prototype.unregister_comm = function (comm) {\n        /**\n         * Remove a comm from the mapping\n         */\n        delete this.comms[comm.comm_id];\n    };\n    \n    // comm message handlers\n    \n    CommManager.prototype.comm_open = function (msg) {\n        var content = msg.content;\n        var that = this;\n        var comm_id = content.comm_id;\n\n        this.comms[comm_id] = utils.load_class(content.target_name, content.target_module, \n            this.targets).then(function(target) {\n                var comm = new Comm(content.target_name, comm_id);\n                comm.kernel = that.kernel;\n                try {\n                    var response = target(comm, msg);\n                } catch (e) {\n                    comm.close();\n                    that.unregister_comm(comm);\n                    var wrapped_error = new utils.WrappedError(\"Exception opening new comm\", e);\n                    console.error(wrapped_error);\n                    return Promise.reject(wrapped_error);\n                }\n                // Regardless of the target return value, we need to\n                // then return the comm\n                return Promise.resolve(response).then(function() {return comm;});\n            }, utils.reject('Could not open comm', true));\n        return this.comms[comm_id];\n    };\n    \n    CommManager.prototype.comm_close = function(msg) {\n        var content = msg.content;\n        if (this.comms[content.comm_id] === undefined) {\n            console.error('Comm promise not found for comm id ' + content.comm_id);\n            return;\n        }\n        var that = this;\n        this.comms[content.comm_id] = this.comms[content.comm_id].then(function(comm) {\n            that.unregister_comm(comm);\n            try {\n                comm.handle_close(msg);\n            } catch (e) {\n                console.log(\"Exception closing comm: \", e, e.stack, msg);\n            }\n            // don't return a comm, so that further .then() functions\n            // get an undefined comm input\n        });\n        return this.comms[content.comm_id];\n    };\n    \n    CommManager.prototype.comm_msg = function(msg) {\n        var content = msg.content;\n        if (this.comms[content.comm_id] === undefined) {\n            console.error('Comm promise not found for comm id ' + content.comm_id);\n            return;\n        }\n\n        this.comms[content.comm_id] = this.comms[content.comm_id].then(function(comm) {\n            return (Promise.resolve(comm.handle_msg(msg))\n                .catch(utils.reject('Exception handling comm message'))\n                .then(function() {return comm;}));\n        });\n        return this.comms[content.comm_id];\n    };\n    \n    //-----------------------------------------------------------------------\n    // Comm base class\n    //-----------------------------------------------------------------------\n    \n    var Comm = function (target_name, comm_id) {\n        this.target_name = target_name;\n        this.comm_id = comm_id || utils.uuid();\n        this._msg_callback = this._close_callback = null;\n    };\n    \n    // methods for sending messages\n    Comm.prototype.open = function (data, callbacks, metadata, buffers) {\n        var content = {\n            comm_id : this.comm_id,\n            target_name : this.target_name,\n            data : data || {},\n        };\n        return this.kernel.send_shell_message(\"comm_open\", content, callbacks, metadata, buffers);\n    };\n    \n    Comm.prototype.send = function (data, callbacks, metadata, buffers) {\n        var content = {\n            comm_id : this.comm_id,\n            data : data || {},\n        };\n        return this.kernel.send_shell_message(\"comm_msg\", content, callbacks, metadata, buffers);\n    };\n\n    Comm.prototype.close = function (data, callbacks, metadata, buffers) {\n        var content = {\n            comm_id : this.comm_id,\n            data : data || {},\n        };\n        return this.kernel.send_shell_message(\"comm_close\", content, callbacks, metadata, buffers);\n    };\n    \n    // methods for registering callbacks for incoming messages\n    Comm.prototype._register_callback = function (key, callback) {\n        this['_' + key + '_callback'] = callback;\n    };\n    \n    Comm.prototype.on_msg = function (callback) {\n        this._register_callback('msg', callback);\n    };\n    \n    Comm.prototype.on_close = function (callback) {\n        this._register_callback('close', callback);\n    };\n    \n    // methods for handling incoming messages\n    \n    Comm.prototype._callback = function (key, msg) {\n        var callback = this['_' + key + '_callback'];\n        if (callback) {\n            try {\n                return callback(msg);\n            } catch (e) {\n                console.log(\"Exception in Comm callback\", e, e.stack, msg);\n            }\n        }\n    };\n    \n    Comm.prototype.handle_msg = function (msg) {\n        return this._callback('msg', msg);\n    };\n    \n    Comm.prototype.handle_close = function (msg) {\n        this._callback('close', msg);\n    };\n    \n    return {\n        'CommManager': CommManager,\n        'Comm': Comm\n    };\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/kernels/serialize',[\n    'underscore',\n    ], function (_) {\n    \"use strict\";\n    \n    var _deserialize_array_buffer = function (buf) {\n        var data = new DataView(buf);\n        // read the header: 1 + nbufs 32b integers\n        var nbufs = data.getUint32(0);\n        var offsets = [];\n        var i;\n        for (i = 1; i <= nbufs; i++) {\n            offsets.push(data.getUint32(i * 4));\n        }\n        var json_bytes = new Uint8Array(buf.slice(offsets[0], offsets[1]));\n        var msg = JSON.parse(\n            (new TextDecoder('utf8')).decode(json_bytes)\n        );\n        // the remaining chunks are stored as DataViews in msg.buffers\n        msg.buffers = [];\n        var start, stop;\n        for (i = 1; i < nbufs; i++) {\n            start = offsets[i];\n            stop = offsets[i+1] || buf.byteLength;\n            msg.buffers.push(new DataView(buf.slice(start, stop)));\n        }\n        return msg;\n    };\n    \n    var _deserialize_binary = function(data) {\n        /**\n         * deserialize the binary message format\n         * callback will be called with a message whose buffers attribute\n         * will be an array of DataViews.\n         */\n        if (data instanceof Blob) {\n            // data is Blob, have to deserialize from ArrayBuffer in reader callback\n            var reader = new FileReader();\n            var promise = new Promise(function(resolve, reject) {\n                reader.onload = function () {\n                    var msg = _deserialize_array_buffer(this.result);\n                    resolve(msg);\n                };\n            });\n            reader.readAsArrayBuffer(data);\n            return promise;\n        } else {\n            // data is ArrayBuffer, can deserialize directly\n            var msg = _deserialize_array_buffer(data);\n            return msg;\n        }\n    };\n\n    var deserialize = function (data) {\n        /**\n         * deserialize a message and return a promise for the unpacked message\n         */\n        if (typeof data === \"string\") {\n            // text JSON message\n            return Promise.resolve(JSON.parse(data));\n        } else {\n            // binary message\n            return Promise.resolve(_deserialize_binary(data));\n        }\n    };\n    \n    var _serialize_binary = function (msg) {\n        /**\n         * implement the binary serialization protocol\n         * serializes JSON message to ArrayBuffer\n         */\n        msg = _.clone(msg);\n        var offsets = [];\n        var buffers = [];\n        var i;\n        for (i = 0; i < msg.buffers.length; i++) {\n            // msg.buffers elements could be either views or ArrayBuffers\n            // buffers elements are ArrayBuffers\n            var b = msg.buffers[i];\n            buffers.push(b.buffer instanceof ArrayBuffer ? b.buffer : b);\n        }\n        delete msg.buffers;\n        var json_utf8 = (new TextEncoder('utf8')).encode(JSON.stringify(msg));\n        buffers.unshift(json_utf8);\n        var nbufs = buffers.length;\n        offsets.push(4 * (nbufs + 1));\n        for (i = 0; i + 1 < buffers.length; i++) {\n            offsets.push(offsets[offsets.length-1] + buffers[i].byteLength);\n        }\n        var msg_buf = new Uint8Array(\n            offsets[offsets.length-1] + buffers[buffers.length-1].byteLength\n        );\n        // use DataView.setUint32 for network byte-order\n        var view = new DataView(msg_buf.buffer);\n        // write nbufs to first 4 bytes\n        view.setUint32(0, nbufs);\n        // write offsets to next 4 * nbufs bytes\n        for (i = 0; i < offsets.length; i++) {\n            view.setUint32(4 * (i+1), offsets[i]);\n        }\n        // write all the buffers at their respective offsets\n        for (i = 0; i < buffers.length; i++) {\n            msg_buf.set(new Uint8Array(buffers[i]), offsets[i]);\n        }\n        \n        // return raw ArrayBuffer\n        return msg_buf.buffer;\n    };\n    \n    var serialize = function (msg) {\n        if (msg.buffers && msg.buffers.length) {\n            return _serialize_binary(msg);\n        } else {\n            return JSON.stringify(msg);\n        }\n    };\n    \n    var exports = {\n        deserialize : deserialize,\n        serialize: serialize\n    };\n    return exports;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/kernels/kernel',[\n    'jquery',\n    'base/js/utils',\n    './comm',\n    './serialize',\n    'base/js/events'\n], function($, utils, comm, serialize, events) {\n    \"use strict\";\n\n    /**\n     * A Kernel class to communicate with the Python kernel. This\n     * should generally not be constructed directly, but be created\n     * by.  the `Session` object. Once created, this object should be\n     * used to communicate with the kernel.\n     * \n     * Preliminary documentation for the REST API is at\n     * https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping#kernels-api\n     * \n     * @class Kernel\n     * @param {string} kernel_service_url - the URL to access the kernel REST api\n     * @param {string} ws_url - the websockets URL\n     * @param {string} name - the kernel type (e.g. python3)\n     */\n    var Kernel = function (kernel_service_url, ws_url, name) {\n        this.events = events;\n\n        this.id = null;\n        this.name = name;\n        this.ws = null;\n        this._stopping = false;\n\n        this.kernel_service_url = kernel_service_url;\n        this.kernel_url = null;\n        this.ws_url = ws_url || utils.get_body_data(\"wsUrl\");\n        if (!this.ws_url) {\n            // trailing 's' in https will become wss for secure web sockets\n            this.ws_url = location.protocol.replace('http', 'ws') + \"//\" + location.host;\n        }\n\n        this.username = \"username\";\n        this.session_id = utils.uuid();\n        this._msg_callbacks = {};\n        this._msg_callbacks_overrides = {};\n        this._display_id_to_parent_ids = {};\n        this._msg_queue = Promise.resolve();\n        this.info_reply = {}; // kernel_info_reply stored here after starting\n\n        if (typeof(WebSocket) !== 'undefined') {\n            this.WebSocket = WebSocket;\n        } else if (typeof(MozWebSocket) !== 'undefined') {\n            this.WebSocket = MozWebSocket;\n        } else {\n            alert('Your browser does not have WebSocket support, please try Chrome, Safari or Firefox ≥ 6. Firefox 4 and 5 are also supported by you have to enable WebSockets in about:config.');\n        }\n        \n        this.bind_events();\n        this.init_iopub_handlers();\n        this.comm_manager = new comm.CommManager(this);\n        \n        this.last_msg_id = null;\n        this.last_msg_callbacks = {};\n\n        this._autorestart_attempt = 0;\n        this._reconnect_attempt = 0;\n        this.reconnect_limit = 7;\n        \n        this._pending_messages = [];\n    };\n\n    /**\n     * @function _get_msg\n     */\n    Kernel.prototype._get_msg = function (msg_type, content, metadata, buffers) {\n        var msg = {\n            header : {\n                msg_id : utils.uuid(),\n                username : this.username,\n                session : this.session_id,\n                msg_type : msg_type,\n                version : \"5.2\",\n            },\n            metadata : metadata || {},\n            content : content,\n            buffers : buffers || [],\n            parent_header : {}\n        };\n        return msg;\n    };\n\n    /**\n     * @function bind_events\n     */\n    Kernel.prototype.bind_events = function () {\n        var that = this;\n        this.events.on('send_input_reply.Kernel', function(evt, data) { \n            that.send_input_reply(data);\n        });\n\n        var record_status = function (evt, info) {\n            console.log('Kernel: ' + evt.type + ' (' + info.kernel.id + ')');\n        };\n\n        this.events.on('kernel_created.Kernel', record_status);\n        this.events.on('kernel_reconnecting.Kernel', record_status);\n        this.events.on('kernel_connected.Kernel', record_status);\n        this.events.on('kernel_starting.Kernel', record_status);\n        this.events.on('kernel_restarting.Kernel', record_status);\n        this.events.on('kernel_autorestarting.Kernel', record_status);\n        this.events.on('kernel_interrupting.Kernel', record_status);\n        this.events.on('kernel_disconnected.Kernel', record_status);\n        // these are commented out because they are triggered a lot, but can\n        // be uncommented for debugging purposes\n        //this.events.on('kernel_idle.Kernel', record_status);\n        //this.events.on('kernel_busy.Kernel', record_status);\n        this.events.on('kernel_ready.Kernel', record_status);\n        this.events.on('kernel_killed.Kernel', record_status);\n        this.events.on('kernel_dead.Kernel', record_status);\n\n        this.events.on('kernel_ready.Kernel', function () {\n            that._autorestart_attempt = 0;\n        });\n        this.events.on('kernel_connected.Kernel', function () {\n            that._reconnect_attempt = 0;\n        });\n    };\n\n    /**\n     * Initialize the iopub handlers.\n     *\n     * @function init_iopub_handlers\n     */\n    Kernel.prototype.init_iopub_handlers = function () {\n        var output_msg_types = ['stream', 'display_data', 'execute_result', 'error', 'update_display_data'];\n        this._iopub_handlers = {};\n        this.register_iopub_handler('status', $.proxy(this._handle_status_message, this));\n        this.register_iopub_handler('clear_output', $.proxy(this._handle_clear_output, this));\n        this.register_iopub_handler('execute_input', $.proxy(this._handle_input_message, this));\n        \n        for (var i=0; i < output_msg_types.length; i++) {\n            this.register_iopub_handler(output_msg_types[i], $.proxy(this._handle_output_message, this));\n        }\n    };\n\n    /**\n     * GET /api/kernels\n     *\n     * Get the list of running kernels.\n     *\n     * @function list\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Kernel.prototype.list = function (success, error) {\n        utils.ajax(this.kernel_service_url, {\n            processData: false,\n            cache: false,\n            type: \"GET\",\n            dataType: \"json\",\n            success: success,\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * POST /api/kernels\n     *\n     * Start a new kernel.\n     *\n     * In general this shouldn't be used -- the kernel should be\n     * started through the session API. If you use this function and\n     * are also using the session API then your session and kernel\n     * WILL be out of sync!\n     *\n     * @function start\n     * @param {params} [Object] - parameters to include in the query string\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Kernel.prototype.start = function (params, success, error) {\n        var url = this.kernel_service_url;\n        var qs = $.param(params || {}); // query string for sage math stuff\n        if (qs !== \"\") {\n            url = url + \"?\" + qs;\n        }\n\n        this.events.trigger('kernel_starting.Kernel', {kernel: this});\n        var that = this;\n        var on_success = function (data, status, xhr) {\n            that.events.trigger('kernel_created.Kernel', {kernel: that});\n            that._kernel_created(data);\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n\n        utils.ajax(url, {\n            processData: false,\n            cache: false,\n            type: \"POST\",\n            data: JSON.stringify({name: this.name}),\n            contentType: 'application/json',\n            dataType: \"json\",\n            success: this._on_success(on_success),\n            error: this._on_error(error)\n        });\n\n        return url;\n    };\n\n    /**\n     * GET /api/kernels/[:kernel_id]\n     *\n     * Get information about the kernel.\n     *\n     * @function get_info\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Kernel.prototype.get_info = function (success, error) {\n        utils.ajax(this.kernel_url, {\n            processData: false,\n            cache: false,\n            type: \"GET\",\n            dataType: \"json\",\n            success: this._on_success(success),\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * DELETE /api/kernels/[:kernel_id]\n     *\n     * Shutdown the kernel.\n     *\n     * If you are also using sessions, then this function shoul NOT be\n     * used. Instead, use Session.delete. Otherwise, the session and\n     * kernel WILL be out of sync.\n     *\n     * @function kill\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Kernel.prototype.kill = function (success, error) {\n        this.events.trigger('kernel_killed.Kernel', {kernel: this});\n        this._kernel_dead();\n        utils.ajax(this.kernel_url, {\n            processData: false,\n            cache: false,\n            type: \"DELETE\",\n            dataType: \"json\",\n            success: this._on_success(success),\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * POST /api/kernels/[:kernel_id]/interrupt\n     *\n     * Interrupt the kernel.\n     *\n     * @function interrupt\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Kernel.prototype.interrupt = function (success, error) {\n        this.events.trigger('kernel_interrupting.Kernel', {kernel: this});\n\n        var that = this;\n        var on_success = function (data, status, xhr) {\n            /**\n             * get kernel info so we know what state the kernel is in\n             */\n            that.kernel_info();\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n\n        var url = utils.url_path_join(this.kernel_url, 'interrupt');\n        utils.ajax(url, {\n            processData: false,\n            cache: false,\n            type: \"POST\",\n            contentType: false,  // there's no data with this\n            dataType: \"json\",\n            success: this._on_success(on_success),\n            error: this._on_error(error)\n        });\n    };\n\n    Kernel.prototype.restart = function (success, error) {\n        /**\n         * POST /api/kernels/[:kernel_id]/restart\n         *\n         * Restart the kernel.\n         *\n         * @function interrupt\n         * @param {function} [success] - function executed on ajax success\n         * @param {function} [error] - functon executed on ajax error\n         */\n        this.events.trigger('kernel_restarting.Kernel', {kernel: this});\n        this.stop_channels();\n        this._msg_callbacks = {};\n        this._msg_callbacks_overrides = {};\n        this._display_id_to_parent_ids = {};\n\n        var that = this;\n        var on_success = function (data, status, xhr) {\n            that.events.trigger('kernel_created.Kernel', {kernel: that});\n            that._kernel_created(data);\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n\n        var on_error = function (xhr, status, err) {\n            that.events.trigger('kernel_failed_restart.Kernel', {kernel: that});\n            that._kernel_dead();\n            if (error) {\n                error(xhr, status, err);\n            }\n        };\n\n        var url = utils.url_path_join(this.kernel_url, 'restart');\n        utils.ajax(url, {\n            processData: false,\n            cache: false,\n            type: \"POST\",\n            contentType: false,  // there's no data with this\n            dataType: \"json\",\n            success: this._on_success(on_success),\n            error: this._on_error(on_error)\n        });\n    };\n\n    Kernel.prototype.reconnect = function () {\n        /**\n         * Reconnect to a disconnected kernel. This is not actually a\n         * standard HTTP request, but useful function nonetheless for\n         * reconnecting to the kernel if the connection is somehow lost.\n         *\n         * @function reconnect\n         */\n        if (this.is_connected()) {\n            this.stop_channels();\n        }\n        this._reconnect_attempt = this._reconnect_attempt + 1;\n        this.events.trigger('kernel_reconnecting.Kernel', {\n            kernel: this,\n            attempt: this._reconnect_attempt,\n        });\n        this.start_channels();\n    };\n\n    Kernel.prototype._on_success = function (success) {\n        /**\n         * Handle a successful AJAX request by updating the kernel id and\n         * name from the response, and then optionally calling a provided\n         * callback.\n         *\n         * @function _on_success\n         * @param {function} success - callback\n         */\n        var that = this;\n        return function (data, status, xhr) {\n            if (data) {\n                that.id = data.id;\n                that.name = data.name;\n            }\n            that.kernel_url = utils.url_path_join(that.kernel_service_url,\n                encodeURIComponent(that.id));\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n    };\n\n    Kernel.prototype._on_error = function (error) {\n        /**\n         * Handle a failed AJAX request by logging the error message, and\n         * then optionally calling a provided callback.\n         *\n         * @function _on_error\n         * @param {function} error - callback\n         */\n        return function (xhr, status, err) {\n            utils.log_ajax_error(xhr, status, err);\n            if (error) {\n                error(xhr, status, err);\n            }\n        };\n    };\n\n    Kernel.prototype._kernel_created = function (data) {\n        /**\n         * Perform necessary tasks once the kernel has been started,\n         * including actually connecting to the kernel.\n         *\n         * @function _kernel_created\n         * @param {Object} data - information about the kernel including id\n         */\n        this.id = data.id;\n        this.kernel_url = utils.url_path_join(this.kernel_service_url,\n            encodeURIComponent(this.id));\n        this.start_channels();\n    };\n\n    Kernel.prototype._kernel_connected = function () {\n        /**\n         * Perform necessary tasks once the connection to the kernel has\n         * been established. This includes requesting information about\n         * the kernel.\n         *\n         * @function _kernel_connected\n         */\n        this.events.trigger('kernel_connected.Kernel', {kernel: this});\n\n        // Send pending messages. We shift the message off the queue\n        // after the message is sent so that if there is an exception,\n        // the message is still pending.\n        while (this._pending_messages.length > 0) {\n          this.ws.send(this._pending_messages[0]);\n          this._pending_messages.shift();\n        }\n\n        // get kernel info so we know what state the kernel is in\n        var that = this;\n        this.kernel_info(function (reply) {\n            that.info_reply = reply.content;\n            that.events.trigger('kernel_ready.Kernel', {kernel: that});\n        });\n    };\n\n    Kernel.prototype._kernel_dead = function () {\n        /**\n         * Perform necessary tasks after the kernel has died. This closing\n         * communication channels to the kernel if they are still somehow\n         * open.\n         *\n         * @function _kernel_dead\n         */\n        this.stop_channels();\n    };\n\n    Kernel.prototype.start_channels = function () {\n        /**\n         * Start the websocket channels.\n         * Will stop and restart them if they already exist.\n         *\n         * @function start_channels\n         */\n        var that = this;\n        this.stop_channels();\n        var ws_host_url = this.ws_url + this.kernel_url;\n\n        console.log(\"Starting WebSockets:\", ws_host_url);\n\n        this.ws = new this.WebSocket([\n                that.ws_url,\n                utils.url_path_join(that.kernel_url, 'channels'),\n                \"?session_id=\" + that.session_id\n            ].join('')\n        );\n        \n        var already_called_onclose = false; // only alert once\n        var ws_closed_early = function(evt){\n            if (already_called_onclose){\n                return;\n            }\n            already_called_onclose = true;\n            if ( ! evt.wasClean ){\n                // If the websocket was closed early, that could mean\n                // that the kernel is actually dead. Try getting\n                // information about the kernel from the API call --\n                // if that fails, then assume the kernel is dead,\n                // otherwise just follow the typical websocket closed\n                // protocol.\n                that.get_info(function () {\n                    that._ws_closed(ws_host_url, false);\n                }, function () {\n                    that.events.trigger('kernel_dead.Kernel', {kernel: that});\n                    that._kernel_dead();\n                });\n            }\n        };\n        var ws_closed_late = function(evt){\n            if (already_called_onclose){\n                return;\n            }\n            already_called_onclose = true;\n            if ( ! evt.wasClean ){\n                that._ws_closed(ws_host_url, false);\n            }\n        };\n        var ws_error = function(evt){\n            if (already_called_onclose){\n                return;\n            }\n            already_called_onclose = true;\n            that._ws_closed(ws_host_url, true);\n        };\n\n        this.ws.onopen = $.proxy(this._ws_opened, this);\n        this.ws.onclose = ws_closed_early;\n        this.ws.onerror = ws_error;\n        // switch from early-close to late-close message after 1s\n        setTimeout(function() {\n            if (that.ws !== null && !that._stopping) {\n                that.ws.onclose = ws_closed_late;\n            }\n        }, 1000);\n        this.ws.onmessage = $.proxy(this._handle_ws_message, this);\n    };\n\n    Kernel.prototype._ws_opened = function (evt) {\n        /**\n         * Handle a websocket entering the open state,\n         * signaling that the kernel is connected when websocket is open.\n         *\n         * @function _ws_opened\n         */\n        if (this.is_connected()) {\n            // all events ready, trigger started event.\n            this._kernel_connected();\n        }\n    };\n\n    Kernel.prototype._ws_closed = function(ws_url, error) {\n        /**\n         * Handle a websocket entering the closed state.  If the websocket\n         * was not closed due to an error, try to reconnect to the kernel.\n         *\n         * @function _ws_closed\n         * @param {string} ws_url - the websocket url\n         * @param {bool} error - whether the connection was closed due to an error\n         */\n        this.stop_channels();\n\n        this.events.trigger('kernel_disconnected.Kernel', {kernel: this});\n        if (error) {\n            console.log('WebSocket connection failed: ', ws_url, error);\n            this.events.trigger('kernel_connection_failed.Kernel', {\n                kernel: this,\n                ws_url: ws_url,\n                attempt: this._reconnect_attempt,\n                error: error,\n            });\n        }\n        this._schedule_reconnect();\n    };\n    \n    Kernel.prototype._schedule_reconnect = function () {\n        /**\n         * function to call when kernel connection is lost\n         * schedules reconnect, or fires 'connection_dead' if reconnect limit is hit\n         */\n        if (this._reconnect_attempt < this.reconnect_limit) {\n            var timeout = Math.pow(2, this._reconnect_attempt);\n            console.log(\"Connection lost, reconnecting in \" + timeout + \" seconds.\");\n            setTimeout($.proxy(this.reconnect, this), 1e3 * timeout);\n        } else {\n            this.events.trigger('kernel_connection_dead.Kernel', {\n                kernel: this,\n                reconnect_attempt: this._reconnect_attempt,\n            });\n            console.log(\"Failed to reconnect, giving up.\");\n        }\n    };\n    \n    Kernel.prototype.stop_channels = function () {\n        /**\n         * Close the websocket. After successful close, the value\n         * in `this.ws` will be null.\n         *\n         * @function stop_channels\n         */\n        var that = this;\n        var close = function () {\n            that._stopping = false;\n            if (that.ws && that.ws.readyState === WebSocket.CLOSED) {\n                that.ws = null;\n            }\n        };\n        if (this.ws !== null) {\n            // flag to avoid races with on_close_late\n            this._stopping = true;\n            if (this.ws.readyState === WebSocket.OPEN) {\n                this.ws.onclose = close;\n                this.ws.close();\n            } else {\n                close();\n            }\n        }\n    };\n\n    Kernel.prototype.is_connected = function () {\n        /**\n         * Check whether there is a connection to the kernel. This\n         * function only returns true if websocket has been\n         * created and has a state of WebSocket.OPEN.\n         *\n         * @function is_connected\n         * @returns {bool} - whether there is a connection\n         */\n        // if any channel is not ready, then we're not connected\n        if (this.ws === null) {\n            return false;\n        }\n        if (this.ws.readyState !== WebSocket.OPEN) {\n            return false;\n        }\n        return true;\n    };\n\n    Kernel.prototype.is_fully_disconnected = function () {\n        /**\n         * Check whether the connection to the kernel has been completely\n         * severed. This function only returns true if all channel objects\n         * are null.\n         *\n         * @function is_fully_disconnected\n         * @returns {bool} - whether the kernel is fully disconnected\n         */\n        return (this.ws === null);\n    };\n    \n    Kernel.prototype._send = function(msg) {\n      /**\n       * Send a message (if the kernel is connected) or queue the message for future delivery\n       *\n       * Pending messages will automatically be sent when a kernel becomes connected.\n       *\n       * @function _send\n       * @param msg\n       */\n      if (this.is_connected()) {\n            this.ws.send(msg);\n        } else {\n            this._pending_messages.push(msg);\n        }\n    };\n    \n    Kernel.prototype.send_shell_message = function (msg_type, content, callbacks, metadata, buffers) {\n        /**\n         * Send a message on the Kernel's shell channel\n         *\n         * If the kernel is not connected, the message will be buffered.\n         * \n         * @function send_shell_message\n         */\n        var msg = this._get_msg(msg_type, content, metadata, buffers);\n        msg.channel = 'shell';\n        this.set_callbacks_for_msg(msg.header.msg_id, callbacks);\n        this._send(serialize.serialize(msg));\n        return msg.header.msg_id;\n    };\n\n    Kernel.prototype.kernel_info = function (callback) {\n        /**\n         * Get kernel info\n         *\n         * @function kernel_info\n         * @param callback {function}\n         *\n         * When calling this method, pass a callback function that expects one argument.\n         * The callback will be passed the complete `kernel_info_reply` message documented\n         * [here](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info)\n         */\n        var callbacks;\n        if (callback) {\n            callbacks = { shell : { reply : callback } };\n        }\n        return this.send_shell_message(\"kernel_info_request\", {}, callbacks);\n    };\n\n    Kernel.prototype.comm_info = function (target_name, callback) {\n        /**\n         * Get comm info\n         *\n         * @function comm_info\n         * @param callback {function}\n         *\n         * When calling this method, pass a callback function that expects one argument.\n         * The callback will be passed the complete `comm_info_reply` message documented\n         * [here](https://jupyter-client.readthedocs.io/en/latest/messaging.html#comm_info)\n         */\n        var callbacks;\n        if (callback) {\n            callbacks = { shell : { reply : callback } };\n        }\n        var content = {\n            target_name : target_name,\n        };\n        return this.send_shell_message(\"comm_info_request\", content, callbacks);\n    };\n\n    Kernel.prototype.inspect = function (code, cursor_pos, callback) {\n        /**\n         * Get info on an object\n         *\n         * When calling this method, pass a callback function that expects one argument.\n         * The callback will be passed the complete `inspect_reply` message documented\n         * [here](https://jupyter-client.readthedocs.io/en/latest/messaging.html#object-information)\n         *\n         * @function inspect\n         * @param code {string}\n         * @param cursor_pos {integer}\n         * @param callback {function}\n         */\n        var callbacks;\n        if (callback) {\n            callbacks = { shell : { reply : callback } };\n        }\n        \n        var content = {\n            code : code,\n            cursor_pos : cursor_pos,\n            detail_level : 0\n        };\n        return this.send_shell_message(\"inspect_request\", content, callbacks);\n    };\n\n    Kernel.prototype.execute = function (code, callbacks, options) {\n        /**\n         * Execute given code into kernel, and pass result to callback.\n         *\n         * @async\n         * @function execute\n         * @param {string} code\n         * @param [callbacks] {Object} With the following keys (all optional)\n         *      @param callbacks.shell.reply {function}\n         *      @param callbacks.shell.payload.[payload_name] {function}\n         *      @param callbacks.iopub.output {function}\n         *      @param callbacks.iopub.clear_output {function}\n         *      @param callbacks.input {function}\n         *      @param callbacks.clear_on_done=true {Bolean}\n         * @param {object} [options]\n         *      @param [options.silent=false] {Boolean}\n         *      @param [options.user_expressions=empty_dict] {Dict}\n         *      @param [options.allow_stdin=false] {Boolean} true|false\n         *\n         * @example\n         *\n         * The options object should contain the options for the execute\n         * call. Its default values are:\n         *\n         *      options = {\n         *        silent : true,\n         *        user_expressions : {},\n         *        allow_stdin : false\n         *      }\n         *\n         * When calling this method pass a callbacks structure of the\n         * form:\n         *\n         *      callbacks = {\n         *       shell : {\n         *         reply : execute_reply_callback,\n         *         payload : {\n         *           set_next_input : set_next_input_callback,\n         *         }\n         *       },\n         *       iopub : {\n         *         output : output_callback,\n         *         clear_output : clear_output_callback,\n         *       },\n         *       input : raw_input_callback\n         *      }\n         *\n         * Each callback will be passed the entire message as a single\n         * arugment.  Payload handlers will be passed the corresponding\n         * payload and the execute_reply message.\n         */\n        var content = {\n            code : code,\n            silent : true,\n            store_history : false,\n            user_expressions : {},\n            allow_stdin : false\n        };\n        callbacks = callbacks || {};\n        if (callbacks.input !== undefined) {\n            content.allow_stdin = true;\n        }\n        $.extend(true, content, options);\n        this.events.trigger('execution_request.Kernel', {kernel: this, content: content});\n        return this.send_shell_message(\"execute_request\", content, callbacks);\n    };\n\n    /**\n     * When calling this method, pass a function to be called with the\n     * `complete_reply` message as its only argument when it arrives.\n     *\n     * `complete_reply` is documented\n     * [here](https://jupyter-client.readthedocs.io/en/latest/messaging.html#complete)\n     *\n     * @function complete\n     * @param code {string}\n     * @param cursor_pos {integer}\n     * @param callback {function}\n     */\n    Kernel.prototype.complete = function (code, cursor_pos, callback) {\n        var callbacks;\n        if (callback) {\n            callbacks = { shell : { reply : callback } };\n        }\n        var content = {\n            code : code,\n            cursor_pos : cursor_pos\n        };\n        return this.send_shell_message(\"complete_request\", content, callbacks);\n    };\n\n    /**\n     * @function send_input_reply\n     */\n    Kernel.prototype.send_input_reply = function (input) {\n        var content = {\n            value : input\n        };\n        this.events.trigger('input_reply.Kernel', {kernel: this, content: content});\n        var msg = this._get_msg(\"input_reply\", content);\n        msg.channel = 'stdin';\n        this._send(serialize.serialize(msg));\n        return msg.header.msg_id;\n    };\n\n    /**\n     * @function register_iopub_handler\n     */\n    Kernel.prototype.register_iopub_handler = function (msg_type, callback) {\n        this._iopub_handlers[msg_type] = callback;\n    };\n\n    /**\n     * Get the iopub handler for a specific message type.\n     *\n     * @function get_iopub_handler\n     */\n    Kernel.prototype.get_iopub_handler = function (msg_type) {\n        return this._iopub_handlers[msg_type];\n    };\n\n    /**\n     * Get callbacks for a specific message.\n     *\n     * @function get_callbacks_for_msg\n     */\n    Kernel.prototype.get_callbacks_for_msg = function (msg_id) {\n        if (msg_id == this.last_msg_id) {\n            return this.last_msg_callbacks;\n        } else {\n            return this._msg_callbacks[msg_id];\n        }\n    };\n\n    /**\n     * Get output callbacks for a specific message.\n     *\n     * @function get_output_callbacks_for_msg\n     *\n     * Since output callbacks can be overridden, we first check the override stack.\n     */\n    Kernel.prototype.get_output_callbacks_for_msg = function (msg_id) {\n        return this.get_callbacks_for_msg(this.get_output_callback_id(msg_id));\n    };\n\n\n    /**\n     * Get the output callback id for a message\n     *\n     * Since output callbacks can be redirected, this may not be the same as\n     * the msg_id.\n     *\n     * @function get_output_callback_id\n     */\n    Kernel.prototype.get_output_callback_id = function (msg_id) {\n        var callback_id = msg_id;\n        var overrides = this._msg_callbacks_overrides[msg_id];\n        if (overrides && overrides.length > 0) {\n            callback_id = overrides[overrides.length-1];\n        }\n        return callback_id\n    }\n\n    /**\n     * Clear callbacks for a specific message.\n     *\n     * @function clear_callbacks_for_msg\n     */\n    Kernel.prototype.clear_callbacks_for_msg = function (msg_id) {\n        if (this._msg_callbacks[msg_id] !== undefined ) {\n            var callbacks = this._msg_callbacks[msg_id];\n            var kernel = this;\n            // clear display_id:msg_id map for display_ids associated with this msg_id\n            if (!callbacks) return;\n            callbacks.display_ids.map(function (display_id) {\n                var msg_ids = kernel._display_id_to_parent_ids[display_id];\n                if (msg_ids) {\n                    var idx = msg_ids.indexOf(msg_id);\n                    if (idx === -1) {\n                        return;\n                    }\n                    if (msg_ids.length === 1) {\n                        delete kernel._display_id_to_parent_ids[display_id];\n                    } else {\n                        msg_ids.splice(idx, 1);\n                        kernel._display_id_to_parent_ids[display_id] = msg_ids;\n                    }\n                }\n            });\n            delete this._msg_callbacks[msg_id];\n        }\n    };\n    \n    /**\n     * @function _finish_shell\n     */\n    Kernel.prototype._finish_shell = function (msg_id) {\n        var callbacks = this._msg_callbacks[msg_id];\n        if (callbacks !== undefined) {\n            callbacks.shell_done = true;\n            if (callbacks.clear_on_done && callbacks.iopub_done) {\n                this.clear_callbacks_for_msg(msg_id);\n            }\n        }\n    };\n\n    /**\n     * @function _finish_iopub\n     */\n    Kernel.prototype._finish_iopub = function (msg_id) {\n        var callbacks = this._msg_callbacks[msg_id];\n        if (callbacks !== undefined) {\n            callbacks.iopub_done = true;\n            if (callbacks.clear_on_done && callbacks.shell_done) {\n                this.clear_callbacks_for_msg(msg_id);\n            }\n        }\n        this.events.trigger('finished_iopub.Kernel', {kernel: this, msg_id: msg_id});\n    };\n    \n    /**\n     * Set callbacks for a particular message.\n     * Callbacks should be a struct of the following form:\n     * shell : {\n     * \n     * }\n     *\n     * If the third parameter is truthy, the callback is set as the last\n     * callback registered.\n     *\n     * @function set_callbacks_for_msg\n     */\n    Kernel.prototype.set_callbacks_for_msg = function (msg_id, callbacks, save) {\n        var remember = save || true;\n        if (remember) {\n            this.last_msg_id = msg_id;\n        }\n        if (callbacks) {\n            // shallow-copy mapping, because we will modify it at the top level\n            var cbcopy = this._msg_callbacks[msg_id] = this.last_msg_callbacks = {};\n            cbcopy.shell = callbacks.shell;\n            cbcopy.iopub = callbacks.iopub;\n            cbcopy.input = callbacks.input;\n            cbcopy.clear_on_done = callbacks.clear_on_done;\n            cbcopy.shell_done = (!callbacks.shell);\n            cbcopy.iopub_done = (!callbacks.iopub);\n            cbcopy.display_ids = [];\n            if (callbacks.clear_on_done === undefined) {\n                // default to clear-on-done\n                cbcopy.clear_on_done = true;\n            }\n        } else if (remember) {\n            this.last_msg_callbacks = {};\n        }\n    };\n\n    /**\n     * Override output callbacks for a particular msg_id\n     */\n    Kernel.prototype.output_callback_overrides_push = function(msg_id, callback_id) {\n        var output_callbacks = this._msg_callbacks_overrides[msg_id];\n        if (!output_callbacks) {\n            this._msg_callbacks_overrides[msg_id] = output_callbacks = [];\n        }\n        output_callbacks.push(callback_id);\n    }\n\n    Kernel.prototype.output_callback_overrides_pop = function(msg_id) {\n        var callback_ids = this._msg_callbacks_overrides[msg_id];\n        if (!callback_ids) {\n            console.error(\"Popping callback overrides, but none registered\", msg_id);\n            return;\n        }\n        return callback_ids.pop();\n    }\n\n    Kernel.prototype._handle_ws_message = function (e) {\n        var that = this;\n        this._msg_queue = this._msg_queue.then(function() {\n            return serialize.deserialize(e.data);\n        }).then(function(msg) {return that._finish_ws_message(msg);})\n        .catch(function(error) { console.error(\"Couldn't process kernel message\", error); });\n    };\n\n    Kernel.prototype._finish_ws_message = function (msg) {\n        switch (msg.channel) {\n            case 'shell':\n                return this._handle_shell_reply(msg);\n            case 'iopub':\n                return this._handle_iopub_message(msg);\n            case 'stdin':\n                return this._handle_input_request(msg);\n            default:\n                console.error(\"unrecognized message channel\", msg.channel, msg);\n        }\n    };\n    \n    Kernel.prototype._handle_shell_reply = function (reply) {\n        this.events.trigger('shell_reply.Kernel', {kernel: this, reply:reply});\n        var that = this;\n        var content = reply.content;\n        var metadata = reply.metadata;\n        var parent_id = reply.parent_header.msg_id;\n        var callbacks = this.get_callbacks_for_msg(parent_id);\n        var promise = Promise.resolve();\n        if (!callbacks || !callbacks.shell) {\n            return;\n        }\n        var shell_callbacks = callbacks.shell;\n        \n        // signal that shell callbacks are done\n        this._finish_shell(parent_id);\n        \n        if (shell_callbacks.reply !== undefined) {\n            promise = promise.then(function() {return shell_callbacks.reply(reply);});\n        }\n        if (content.payload && shell_callbacks.payload) {\n            promise = promise.then(function() {\n                return that._handle_payloads(content.payload, shell_callbacks.payload, reply);\n            });\n        }\n        return promise;\n    };\n\n    /**\n     * @function _handle_payloads\n     */\n    Kernel.prototype._handle_payloads = function (payloads, payload_callbacks, msg) {\n        var promise = [];\n        var l = payloads.length;\n        // Payloads are handled by triggering events because we don't want the Kernel\n        // to depend on the Notebook or Pager classes.\n        for (var i=0; i<l; i++) {\n            var payload = payloads[i];\n            var callback = payload_callbacks[payload.source];\n            if (callback) {\n                promise.push(callback(payload, msg));\n            }\n        }\n        return Promise.all(promise);\n    };\n\n    /**\n     * @function _handle_status_message\n     */\n    Kernel.prototype._handle_status_message = function (msg) {\n        var execution_state = msg.content.execution_state;\n        var parent_id = msg.parent_header.msg_id;\n        \n        // dispatch status msg callbacks, if any\n        var callbacks = this.get_callbacks_for_msg(parent_id);\n        if (callbacks && callbacks.iopub && callbacks.iopub.status) {\n            try {\n                callbacks.iopub.status(msg);\n            } catch (e) {\n                console.log(\"Exception in status msg handler\", e, e.stack);\n            }\n        }\n        \n        if (execution_state === 'busy') {\n            this.events.trigger('kernel_busy.Kernel', {kernel: this});\n\n        } else if (execution_state === 'idle') {\n            // signal that iopub callbacks are (probably) done\n            // async output may still arrive,\n            // but only for the most recent request\n            this._finish_iopub(parent_id);\n            \n            // trigger status_idle event\n            this.events.trigger('kernel_idle.Kernel', {kernel: this});\n\n        } else if (execution_state === 'starting') {\n            this.events.trigger('kernel_starting.Kernel', {kernel: this});\n            var that = this;\n            this.kernel_info(function (reply) {\n                that.info_reply = reply.content;\n                that.events.trigger('kernel_ready.Kernel', {kernel: that});\n            });\n\n        } else if (execution_state === 'restarting') {\n            // autorestarting is distinct from restarting,\n            // in that it means the kernel died and the server is restarting it.\n            // kernel_restarting sets the notification widget,\n            // autorestart shows the more prominent dialog.\n            this._autorestart_attempt = this._autorestart_attempt + 1;\n            this.events.trigger('kernel_restarting.Kernel', {kernel: this});\n            this.events.trigger('kernel_autorestarting.Kernel', {kernel: this, attempt: this._autorestart_attempt});\n\n        } else if (execution_state === 'dead') {\n            this.events.trigger('kernel_dead.Kernel', {kernel: this});\n            this._kernel_dead();\n        }\n    };\n    \n    /**\n     * Handle clear_output message\n     *\n     * @function _handle_clear_output\n     */\n    Kernel.prototype._handle_clear_output = function (msg) {\n        var callbacks = this.get_output_callbacks_for_msg(msg.parent_header.msg_id);\n        if (!callbacks || !callbacks.iopub) {\n            return;\n        }\n        var callback = callbacks.iopub.clear_output;\n        if (callback) {\n            callback(msg);\n        }\n    };\n\n    /**\n     * handle an output message (execute_result, display_data, etc.)\n     *\n     * @function _handle_output_message\n     */\n    Kernel.prototype._handle_output_message = function (msg) {\n        var that = this;\n        var msg_id = msg.parent_header.msg_id;\n        var callbacks = this.get_output_callbacks_for_msg(msg_id);\n        if (['display_data', 'update_display_data', 'execute_result'].indexOf(msg.header.msg_type) > -1) {\n            // display_data messages may re-route based on their display_id\n            var display_id = (msg.content.transient || {}).display_id;\n            if (display_id) {\n                // it has a display_id\n                var parent_ids = this._display_id_to_parent_ids[display_id];\n                if (parent_ids) {\n                    // we've seen it before, update existing outputs with same display_id\n                    // by handling display_data as update_display_data\n                    var update_msg = $.extend(true, {}, msg);\n                    update_msg.header.msg_type = 'update_display_data';\n\n                    parent_ids.map(function (parent_id) {\n                        var callbacks = that.get_callbacks_for_msg(parent_id);\n                        if (!callbacks) return;\n                        var callback = callbacks.iopub.output;\n                        if (callback) {\n                            callback(update_msg);\n                        }\n                    });\n                }\n                // we're done here if it's update_display\n                if (msg.header.msg_type === 'update_display_data') {\n                    // it's an update, don't proceed to the normal display\n                    return;\n                }\n                // regular display_data with id, record it for future updating\n                // in _display_id_to_parent_ids for future lookup\n                if (this._display_id_to_parent_ids[display_id] === undefined) {\n                    this._display_id_to_parent_ids[display_id] = [];\n                }\n                var callback_id = this.get_output_callback_id(msg_id);\n                if (this._display_id_to_parent_ids[display_id].indexOf(callback_id) === -1) {\n                    this._display_id_to_parent_ids[display_id].push(callback_id);\n                }\n                // and in callbacks for cleanup on clear_callbacks_for_msg\n                if (callbacks && callbacks.display_ids.indexOf(display_id) === -1) {\n                    callbacks.display_ids.push(display_id);\n                }\n            }\n        }\n\n\n        if (!callbacks || !callbacks.iopub) {\n            // The message came from another client. Let the UI decide what to\n            // do with it.\n            this.events.trigger('received_unsolicited_message.Kernel', msg);\n            return;\n        }\n        var callback = callbacks.iopub.output;\n        if (callback) {\n            callback(msg);\n        }\n    };\n\n    /**\n     * Handle an input message (execute_input).\n     *\n     * @function _handle_input message\n     */\n    Kernel.prototype._handle_input_message = function (msg) {\n        var callbacks = this.get_callbacks_for_msg(msg.parent_header.msg_id);\n        if (!callbacks) {\n            // The message came from another client. Let the UI decide what to\n            // do with it.\n            this.events.trigger('received_unsolicited_message.Kernel', msg);\n        }\n    };\n\n    /**\n     * Dispatch IOPub messages to respective handlers. Each message\n     * type should have a handler.\n     *\n     * @function _handle_iopub_message\n     */\n    Kernel.prototype._handle_iopub_message = function (msg) {\n        var handler = this.get_iopub_handler(msg.header.msg_type);\n        if (handler !== undefined) {\n            return handler(msg);\n        }\n    };\n\n    /**\n     * @function _handle_input_request\n     */\n    Kernel.prototype._handle_input_request = function (request) {\n        var header = request.header;\n        var content = request.content;\n        var metadata = request.metadata;\n        var msg_type = header.msg_type;\n        if (msg_type !== 'input_request') {\n            console.log(\"Invalid input request!\", request);\n            return;\n        }\n        var callbacks = this.get_callbacks_for_msg(request.parent_header.msg_id);\n        if (callbacks) {\n            if (callbacks.input) {\n                callbacks.input(request);\n            }\n        }\n    };\n\n    return {'Kernel': Kernel};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/sessions/session',[\n    'jquery',\n    'base/js/utils',\n    'services/kernels/kernel',\n], function($, utils, kernel) {\n    \"use strict\";\n\n    /**\n     * Session object for accessing the session REST api. The session\n     * should be used to start kernels and then shut them down -- for\n     * all other operations, the kernel object should be used.\n     *\n     * Preliminary documentation for the REST API is at\n     * https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping#sessions-api\n     *\n     * Options should include:\n     *  - notebook_path: the path (not including name) to the notebook\n     *  - kernel_name: the type of kernel (e.g. python3)\n     *  - base_url: the root url of the notebook server\n     *  - ws_url: the url to access websockets\n     *  - notebook: Notebook object\n     *\n     * @class Session\n     * @param {Object} options\n     */\n    var Session = function (options) {\n        this.id = null;\n        this.notebook_model = {\n            path: options.notebook_path\n        };\n        this.kernel_model = {\n            id: null,\n            name: options.kernel_name\n        };\n\n        this.base_url = options.base_url;\n        this.ws_url = options.ws_url;\n        this.session_service_url = utils.url_path_join(this.base_url, 'api/sessions');\n        this.session_url = null;\n\n        this.notebook = options.notebook;\n        this.kernel = null;\n        this.events = options.notebook.events;\n\n        this.bind_events();\n    };\n\n    Session.prototype.bind_events = function () {\n        var that = this;\n        var record_status = function (evt, info) {\n            console.log('Session: ' + evt.type + ' (' + info.session.id + ')');\n        };\n\n        this.events.on('kernel_created.Session', record_status);\n        this.events.on('kernel_dead.Session', record_status);\n        this.events.on('kernel_killed.Session', record_status);\n\n        // if the kernel dies, then also remove the session\n        this.events.on('kernel_dead.Kernel', function () {\n            that.delete();\n        });\n        this.events.on('kernel_failed_restart.Kernel', function () {\n            that.notebook.start_session();\n        });\n    };\n\n\n    // Public REST api functions\n\n    /**\n     * GET /api/sessions\n     *\n     * Get a list of the current sessions.\n     *\n     * @function list\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.list = function (success, error) {\n        utils.ajax(this.session_service_url, {\n            processData: false,\n            cache: false,\n            type: \"GET\",\n            dataType: \"json\",\n            success: success,\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * POST /api/sessions\n     *\n     * Start a new session. This function can only executed once.\n     *\n     * @function start\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.start = function (success, error) {\n        var that = this;\n        var on_success = function (data, status, xhr) {\n            if (that.kernel) {\n                that.kernel.name = that.kernel_model.name;\n            } else {\n                var kernel_service_url = utils.url_path_join(that.base_url, \"api/kernels\");\n                that.kernel = new kernel.Kernel(kernel_service_url, that.ws_url, that.kernel_model.name);\n            }\n            that.events.trigger('kernel_created.Session', {session: that, kernel: that.kernel});\n            that.kernel._kernel_created(data.kernel);\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n        var on_error = function (xhr, status, err) {\n            that.events.trigger('kernel_dead.Session', {session: that, xhr: xhr, status: status, error: err});\n            if (error) {\n                error(xhr, status, err);\n            }\n        };\n\n        utils.ajax(this.session_service_url, {\n            processData: false,\n            cache: false,\n            type: \"POST\",\n            data: JSON.stringify(this._get_model()),\n            contentType: 'application/json',\n            dataType: \"json\",\n            success: this._on_success(on_success),\n            error: this._on_error(on_error)\n        });\n    };\n\n    /**\n     * GET /api/sessions/[:session_id]\n     *\n     * Get information about a session.\n     *\n     * @function get_info\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.get_info = function (success, error) {\n        utils.ajax(this.session_url, {\n            processData: false,\n            cache: false,\n            type: \"GET\",\n            dataType: \"json\",\n            success: this._on_success(success),\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * PATCH /api/sessions/[:session_id]\n     *\n     * Rename or move a notebook. If the given name or path are\n     * undefined, then they will not be changed.\n     *\n     * @function rename_notebook\n     * @param {string} [path] - new notebook path\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.rename_notebook = function (path, success, error) {\n        if (path !== undefined) {\n            this.notebook_model.path = path;\n        }\n\n        utils.ajax(this.session_url, {\n            processData: false,\n            cache: false,\n            type: \"PATCH\",\n            data: JSON.stringify(this._get_model()),\n            contentType: 'application/json',\n            dataType: \"json\",\n            success: this._on_success(success),\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * DELETE /api/sessions/[:session_id]\n     *\n     * Kill the kernel and shutdown the session.\n     *\n     * @function delete\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.delete = function (success, error) {\n        if (this.kernel && this.kernel.is_connected()) {\n            this.events.trigger('kernel_killed.Session', {session: this, kernel: this.kernel});\n            this.kernel._kernel_dead();\n        }\n\n        utils.ajax(this.session_url, {\n            processData: false,\n            cache: false,\n            type: \"DELETE\",\n            dataType: \"json\",\n            success: this._on_success(success),\n            error: this._on_error(error)\n        });\n    };\n\n    /**\n     * Restart the session by deleting it and the starting it\n     * fresh. If options are given, they can include any of the\n     * following:\n     *\n     * - notebook_path - the path to the notebook\n     * - kernel_name - the name (type) of the kernel\n     *\n     * @function restart\n     * @param {Object} [options] - options for the new kernel\n     * @param {function} [success] - function executed on ajax success\n     * @param {function} [error] - functon executed on ajax error\n     */\n    Session.prototype.restart = function (options, success, error) {\n        var that = this;\n        var start = function () {\n            if (options && options.notebook_path) {\n                that.notebook_model.path = options.notebook_path;\n            }\n            if (options && options.kernel_name) {\n                that.kernel_model.name = options.kernel_name;\n            }\n            that.kernel_model.id = null;\n            that.start(success, error);\n        };\n        this.delete(start, start);\n    };\n\n    // Helper functions\n\n    /**\n     * Get the data model for the session, which includes the notebook path\n     * and kernel (name and id).\n     *\n     * @function _get_model\n     * @returns {Object} - the data model\n     */\n    Session.prototype._get_model = function () {\n        return {\n            path: this.notebook_model.path,\n            type: 'notebook',\n            name: '',\n            kernel: this.kernel_model\n        };\n    };\n\n    /**\n     * Update the data model from the given JSON object, which should\n     * have attributes of `id`, `notebook`, and/or `kernel`. If\n     * provided, the notebook data must include name and path, and the\n     * kernel data must include name and id.\n     *\n     * @function _update_model\n     * @param {Object} data - updated data model\n     */\n    Session.prototype._update_model = function (data) {\n        if (data && data.id) {\n            this.id = data.id;\n            this.session_url = utils.url_path_join(this.session_service_url, this.id);\n        }\n        if (data && data.notebook) {\n            this.notebook_model.path = data.path;\n        }\n        if (data && data.kernel) {\n            this.kernel_model.name = data.kernel.name;\n            this.kernel_model.id = data.kernel.id;\n        }\n    };\n\n    /**\n     * Handle a successful AJAX request by updating the session data\n     * model with the response, and then optionally calling a provided\n     * callback.\n     *\n     * @function _on_success\n     * @param {function} success - callback\n     */\n    Session.prototype._on_success = function (success) {\n        var that = this;\n        return function (data, status, xhr) {\n            that._update_model(data);\n            if (success) {\n                success(data, status, xhr);\n            }\n        };\n    };\n\n    /**\n     * Handle a failed AJAX request by logging the error message, and\n     * then optionally calling a provided callback.\n     *\n     * @function _on_error\n     * @param {function} error - callback\n     */\n    Session.prototype._on_error = function (error) {\n        return function (xhr, status, err) {\n            utils.log_ajax_error(xhr, status, err);\n            if (error) {\n                error(xhr, status, err);\n            }\n        };\n    };\n\n    /**\n     * Error type indicating that the session is already starting.\n     */\n    var SessionAlreadyStarting = function (message) {\n        this.name = \"SessionAlreadyStarting\";\n        this.message = (message || \"\");\n    };\n\n    SessionAlreadyStarting.prototype = Error.prototype;\n\n    return {\n        Session: Session,\n        SessionAlreadyStarting: SessionAlreadyStarting\n    };\n});\n\n",
    "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define('codemirror/addon/runmode/runmode',[\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.runMode = function(string, modespec, callback, options) {\n  var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);\n  var ie = /MSIE \\d/.test(navigator.userAgent);\n  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);\n\n  if (callback.nodeType == 1) {\n    var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;\n    var node = callback, col = 0;\n    node.innerHTML = \"\";\n    callback = function(text, style) {\n      if (text == \"\\n\") {\n        // Emitting LF or CRLF on IE8 or earlier results in an incorrect display.\n        // Emitting a carriage return makes everything ok.\n        node.appendChild(document.createTextNode(ie_lt9 ? '\\r' : text));\n        col = 0;\n        return;\n      }\n      var content = \"\";\n      // replace tabs\n      for (var pos = 0;;) {\n        var idx = text.indexOf(\"\\t\", pos);\n        if (idx == -1) {\n          content += text.slice(pos);\n          col += text.length - pos;\n          break;\n        } else {\n          col += idx - pos;\n          content += text.slice(pos, idx);\n          var size = tabSize - col % tabSize;\n          col += size;\n          for (var i = 0; i < size; ++i) content += \" \";\n          pos = idx + 1;\n        }\n      }\n\n      if (style) {\n        var sp = node.appendChild(document.createElement(\"span\"));\n        sp.className = \"cm-\" + style.replace(/ +/g, \" cm-\");\n        sp.appendChild(document.createTextNode(content));\n      } else {\n        node.appendChild(document.createTextNode(content));\n      }\n    };\n  }\n\n  var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);\n  for (var i = 0, e = lines.length; i < e; ++i) {\n    if (i) callback(\"\\n\");\n    var stream = new CodeMirror.StringStream(lines[i]);\n    if (!stream.string && mode.blankLine) mode.blankLine(state);\n    while (!stream.eol()) {\n      var style = mode.token(stream, state);\n      callback(stream.current(), style, i, stream.start, state);\n      stream.start = stream.pos;\n    }\n  }\n};\n\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/tooltip',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n'\n], function($, utils, i18n) {\n    \"use strict\";\n\n    // tooltip constructor\n    var Tooltip = function (events) {\n        var that = this;\n        this.events = events;\n        this.time_before_tooltip = 1200;\n\n        // handle to html\n        this.tooltip = $('#tooltip');\n        this._hidden = true;\n\n        // variable for consecutive call\n        this._old_cell = null;\n        this._old_request = null;\n        this._consecutive_counter = 0;\n\n        // 'sticky ?'\n        this._sticky = false;\n\n        // display tooltip if the docstring is empty?\n        this._hide_if_no_docstring = false;\n\n        // contain the button in the upper right corner\n        this.buttons = $('<div/>').addClass('tooltipbuttons');\n\n        // will contain the docstring\n        this.text = $('<div/>').addClass('tooltiptext').addClass('smalltooltip');\n\n        // build the buttons menu on the upper right\n        // expand the tooltip to see more\n        var expandlink = $('<a/>').attr('href', \"#\").addClass(\"ui-corner-all\") //rounded corner\n        .attr('role', \"button\").attr('id', 'expanbutton').attr('title', i18n.msg._('Grow the tooltip vertically (press shift-tab twice)')).click(function () {\n            that.expand();\n            event.preventDefault();\n        }).append(\n        $('<span/>').text('Expand').addClass('ui-icon').addClass('ui-icon-plus'));\n\n        // open in pager\n        var morelink = $('<a/>').attr('href', \"#\").attr('role', \"button\").addClass('ui-button').attr('title', i18n.msg._('show the current docstring in pager (press shift-tab 4 times)'));\n        var morespan = $('<span/>').text(i18n.msg._('Open in Pager')).addClass('ui-icon').addClass('ui-icon-arrowstop-l-n');\n        morelink.append(morespan);\n        morelink.click(function () {\n            that.showInPager(that._old_cell);\n            event.preventDefault();\n        });\n\n        // close the tooltip\n        var closelink = $('<a/>').attr('href', \"#\").attr('role', \"button\").addClass('ui-button');\n        var closespan = $('<span/>').text(i18n.msg._('Close')).addClass('ui-icon').addClass('ui-icon-close');\n        closelink.append(closespan);\n        closelink.click(function () {\n            that.remove_and_cancel_tooltip(true);\n            event.preventDefault();\n        });\n\n        this._clocklink = $('<a/>').attr('href', \"#\");\n        this._clocklink.attr('role', \"button\");\n        this._clocklink.addClass('ui-button');\n        this._clocklink.attr('title', i18n.msg._('Tooltip will linger for 10 seconds while you type'));\n        var clockspan = $('<span/>').text(i18n.msg._('Close'));\n        clockspan.addClass('ui-icon');\n        clockspan.addClass('ui-icon-clock');\n        this._clocklink.append(clockspan);\n        this._clocklink.click(function () {\n            that.cancel_stick();\n            event.preventDefault();\n        });\n\n\n\n\n        //construct the tooltip\n        // add in the reverse order you want them to appear\n        this.buttons.append(closelink);\n        this.buttons.append(expandlink);\n        this.buttons.append(morelink);\n        this.buttons.append(this._clocklink);\n        this._clocklink.hide();\n\n\n        // we need a phony element to make the small arrow\n        // of the tooltip in css\n        // we will move the arrow later\n        this.arrow = $('<div/>').addClass('pretooltiparrow');\n        this.tooltip.append(this.buttons);\n        this.tooltip.append(this.arrow);\n        this.tooltip.append(this.text);\n\n        // function that will be called if you press tab 1, 2, 3... times in a row\n        this.tabs_functions = [function (cell, text, cursor) {\n            that._request_tooltip(cell, text, cursor);\n        }, function () {\n            that.expand();\n        }, function () {\n            that.stick();\n        }, function (cell) {\n            that.cancel_stick();\n            that.showInPager(cell);\n        }];\n        // call after all the tabs function above have bee call to clean their effects\n        // if necessary\n        this.reset_tabs_function = function (cell, text) {\n            this._old_cell = (cell) ? cell : null;\n            this._old_request = (text) ? text : null;\n            this._consecutive_counter = 0;\n        };\n    };\n\n    Tooltip.prototype.is_visible = function () {\n        return !this._hidden;\n    };\n\n    Tooltip.prototype.showInPager = function (cell) {\n        /**\n         * reexecute last call in pager by appending ? to show back in pager\n         */\n        this.events.trigger('open_with_text.Pager', this._reply.content);\n        this.remove_and_cancel_tooltip();\n    };\n\n    // grow the tooltip verticaly\n    Tooltip.prototype.expand = function () {\n        this.text.removeClass('smalltooltip');\n        this.text.addClass('bigtooltip');\n        $('#expanbutton').hide('slow');\n    };\n\n    // deal with all the logic of hiding the tooltip\n    // and reset it's status\n    Tooltip.prototype._hide = function () {\n        this._hidden = true;\n        this.tooltip.fadeOut('fast');\n        $('#expanbutton').show('slow');\n        this.text.removeClass('bigtooltip');\n        this.text.addClass('smalltooltip');\n        // keep scroll top to be sure to always see the first line\n        this.text.scrollTop(0);\n        this.code_mirror = null;\n    };\n\n    // return true on successfully removing a visible tooltip; otherwise return\n    // false.\n    Tooltip.prototype.remove_and_cancel_tooltip = function (force) {\n        /**\n         * note that we don't handle closing directly inside the calltip\n         * as in the completer, because it is not focusable, so won't\n         * get the event.\n         */\n        this.cancel_pending();\n        if (!this._hidden) {\n          if (force || !this._sticky) {\n              this.cancel_stick();\n              this._hide();\n          }\n          this.reset_tabs_function();\n          return true;\n        } else {\n          return false;\n        }\n    };\n\n    // cancel autocall done after '(' for example.\n    Tooltip.prototype.cancel_pending = function () {\n        if (this._tooltip_timeout !== null) {\n            clearTimeout(this._tooltip_timeout);\n            this._tooltip_timeout = null;\n        }\n    };\n\n    // will trigger tooltip after timeout\n    Tooltip.prototype.pending = function (cell, hide_if_no_docstring) {\n        var that = this;\n        this._tooltip_timeout = setTimeout(function () {\n            that.request(cell, hide_if_no_docstring);\n        }, that.time_before_tooltip);\n    };\n\n    // easy access for julia monkey patching.\n    Tooltip.last_token_re = /[a-z_][0-9a-z._]*$/gi;\n\n    Tooltip.prototype._request_tooltip = function (cell, text, cursor_pos) {\n        var callbacks = $.proxy(this._show, this);\n        var msg_id = cell.kernel.inspect(text, cursor_pos, callbacks);\n    };\n\n    // make an immediate completion request\n    Tooltip.prototype.request = function (cell, hide_if_no_docstring) {\n        /**\n         * request(codecell)\n         * Deal with extracting the text from the cell and counting\n         * call in a row\n         */\n        this.cancel_pending();\n        var editor = cell.code_mirror;\n        var cursor = editor.getCursor();\n        var text = cell.get_text();\n        var cursor_pos = utils.js_idx_to_char_idx(editor.indexFromPos(cursor), text);\n\n        this._hide_if_no_docstring = hide_if_no_docstring;\n\n        if(editor.somethingSelected()){\n            // get only the most recent selection.\n            text = editor.getSelection();\n        }\n\n        // need a permanent handle to code_mirror for future auto recall\n        this.code_mirror = editor;\n\n        // now we treat the different number of keypress\n        // first if same cell, same text, increment counter by 1\n        if (this._old_cell == cell && this._old_request == text && this._hidden === false) {\n            this._consecutive_counter++;\n        } else {\n            // else reset\n            this.cancel_stick();\n            this.reset_tabs_function (cell, text);\n        }\n\n        this.tabs_functions[this._consecutive_counter](cell, text, cursor_pos);\n\n        // then if we are at the end of list function, reset\n        if (this._consecutive_counter == this.tabs_functions.length) {\n            this.reset_tabs_function (cell, text, cursor);\n        }\n\n        return;\n    };\n\n    // cancel the option of having the tooltip to stick\n    Tooltip.prototype.cancel_stick = function () {\n        clearTimeout(this._stick_timeout);\n        this._stick_timeout = null;\n        this._clocklink.hide('slow');\n        this._sticky = false;\n    };\n\n    // put the tooltip in a sicky state for 10 seconds\n    // it won't be removed by remove_and_cancell() unless you called with\n    // the first parameter set to true.\n    // remove_and_cancell_tooltip(true)\n    Tooltip.prototype.stick = function (time) {\n        time = (time !== undefined) ? time : 10;\n        var that = this;\n        this._sticky = true;\n        this._clocklink.show('slow');\n        this._stick_timeout = setTimeout(function () {\n            that._sticky = false;\n            that._clocklink.hide('slow');\n        }, time * 1000);\n    };\n\n    // should be called with the kernel reply to actually show the tooltip\n    Tooltip.prototype._show = function (reply) {\n        /**\n         * move the bubble if it is not hidden\n         * otherwise fade it\n         */\n        this._reply = reply;\n        var content = reply.content;\n        if (!content.found) {\n            // object not found, nothing to show\n            return;\n        }\n        this.name = content.name;\n\n        // do some math to have the tooltip arrow on more or less on left or right\n        // position of the editor\n        var cm_pos = $(this.code_mirror.getWrapperElement()).position();\n        var cell_pos = $(this.code_mirror.getWrapperElement().offsetParent).position();\n\n        // anchor and head positions are local within CodeMirror element\n        var anchor = this.code_mirror.cursorCoords(false, 'local');\n        var head = this.code_mirror.cursorCoords(true, 'local');\n        // locate the target at the center of anchor, head\n        var center_left = (head.left + anchor.left) / 2;\n        // locate the left edge of the tooltip, at most 450 px left of the arrow\n        var edge_left = Math.max(center_left - 450, 0);\n        // locate the arrow at the cursor. A 24 px offset seems necessary.\n        var arrow_left = center_left - edge_left - 24;\n        \n        // locate left, top within container element\n        var left = (cell_pos.left + cm_pos.left + edge_left) + 'px';\n        var top = (cell_pos.top + cm_pos.top + head.bottom + 10) + 'px';\n\n        if (this._hidden === false) {\n            this.tooltip.animate({\n                left: left,\n                top: top\n            });\n        } else {\n            this.tooltip.css({\n                left: left\n            });\n            this.tooltip.css({\n                top: top\n            });\n        }\n        this.arrow.animate({\n            'left': arrow_left + 'px'\n        });\n        \n        this._hidden = false;\n        this.tooltip.fadeIn('fast');\n        this.text.children().remove();\n        \n        // This should support rich data types, but only text/plain for now\n        // Any HTML within the docstring is escaped by the fixConsole() method.\n        var pre = $('<pre/>').html(utils.fixConsole(content.data['text/plain']));\n        this.text.append(pre);\n        // keep scroll top to be sure to always see the first line\n        this.text.scrollTop(0);\n    };\n\n    return {'Tooltip': Tooltip};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbarpresets/default',[\n    'notebook/js/celltoolbar',\n    'base/js/dialog',\n    'base/js/i18n'\n], function(celltoolbar, dialog, i18n) {\n    \"use strict\";\n\n    var CellToolbar = celltoolbar.CellToolbar;\n\n    var raw_edit = function (cell) {\n        dialog.edit_metadata({\n            md: cell.metadata,\n            callback: function (md) {\n                cell.metadata = md;\n            },\n            name: i18n.msg._('Cell'),\n            notebook: this.notebook,\n            keyboard_manager: this.keyboard_manager\n        });\n    };\n\n    var add_raw_edit_button = function(div, cell) {\n        var button_container = $(div);\n        var button = $('<button/>')\n            .addClass(\"btn btn-default btn-xs\")\n            .text(i18n.msg._(\"Edit Metadata\"))\n            .click( function () {\n                raw_edit(cell);\n                return false;\n            });\n        button_container.append(button);\n    };\n\n    var register = function (notebook) {\n        CellToolbar.register_callback('default.rawedit', add_raw_edit_button);\n        raw_edit = $.proxy(raw_edit, {\n            notebook: notebook,\n            keyboard_manager: notebook.keyboard_manager\n        });\n\n        var example_preset = [];\n        example_preset.push('default.rawedit');\n\n        CellToolbar.register_preset(i18n.msg._('Edit Metadata'), example_preset, notebook);\n    };\n    return {'register': register};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbarpresets/rawcell',[\n    'notebook/js/celltoolbar',\n    'base/js/dialog',\n    'base/js/keyboard',\n    'base/js/i18n'\n], function(celltoolbar, dialog, keyboard, i18n) {\n    \"use strict\";\n\n  var CellToolbar = celltoolbar.CellToolbar;\n  var raw_cell_preset = [];\n\n  var select_type = CellToolbar.utils.select_ui_generator([\n    [i18n.msg._(\"None\"), \"-\"],\n    [\"LaTeX\", \"text/latex\"],\n    [\"reST\", \"text/restructuredtext\"],\n    [\"HTML\", \"text/html\"],\n    [\"Markdown\", \"text/markdown\"],\n    [\"Python\", \"text/x-python\"],\n    [i18n.msg._(\"Custom\"), \"dialog\"],\n\n    ],\n      // setter\n      function(cell, value) {\n        if (value === \"-\") {\n          delete cell.metadata.raw_mimetype;\n        } else if (value === 'dialog'){\n            var dialog = $('<div/>').append(\n                $(\"<p/>\")\n                    .text(i18n.msg._(\"Set the MIME type of the raw cell:\"))\n            ).append(\n                $(\"<br/>\")\n            ).append(\n                $('<input/>').attr('type','text').attr('size','25')\n                .val(cell.metadata.raw_mimetype || \"-\")\n            );\n            dialog.modal({\n                title: i18n.msg._(\"Raw Cell MIME Type\"),\n                body: dialog,\n                buttons : {\n                    \"Cancel\": {},\n                    \"OK\": {\n                        class: \"btn-primary\",\n                        click: function () {\n                            console.log(cell);\n                            cell.metadata.raw_mimetype = $(this).find('input').val();\n                            console.log(cell.metadata);\n                        }\n                    }\n                },\n                open : function (event, ui) {\n                    var that = $(this);\n                    // Upon ENTER, click the OK button.\n                    that.find('input[type=\"text\"]').keydown(function (event, ui) {\n                        if (event.which === keyboard.keycodes.enter) {\n                            that.find('.btn-primary').first().click();\n                            return false;\n                        }\n                    });\n                    that.find('input[type=\"text\"]').focus().select();\n                }\n            });\n        } else {\n          cell.metadata.raw_mimetype = value;\n        }\n      },\n      //getter\n      function(cell) {\n        return cell.metadata.raw_mimetype || \"\";\n      },\n      // name\n      i18n.msg._(\"Raw NBConvert Format\")\n  );\n\n  var register = function (notebook) {\n    CellToolbar.register_callback('raw_cell.select', select_type, ['raw']);\n    raw_cell_preset.push('raw_cell.select');\n\n    CellToolbar.register_preset(i18n.msg._('Raw Cell Format'), raw_cell_preset, notebook);\n  };\n  return {'register': register};\n\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbarpresets/slideshow',[\n    'notebook/js/celltoolbar',\n    'base/js/i18n'\n], function(celltoolbar, i18n) {\n    \"use strict\";\n\n    var CellToolbar = celltoolbar.CellToolbar;\n    var slideshow_preset = [];\n\n    var select_type = CellToolbar.utils.select_ui_generator([\n            [\"-\"            ,\"-\"            ],\n            [i18n.msg._(\"Slide\")        ,\"slide\"        ],\n            [i18n.msg._(\"Sub-Slide\")    ,\"subslide\"     ],\n            [i18n.msg._(\"Fragment\")     ,\"fragment\"     ],\n            [i18n.msg._(\"Skip\")         ,\"skip\"         ],\n            [i18n.msg._(\"Notes\")        ,\"notes\"        ],\n            ],\n            // setter\n            function(cell, value){\n                // we check that the slideshow namespace exist and create it if needed\n                if (cell.metadata.slideshow === undefined){cell.metadata.slideshow = {};}\n                // set the value\n                cell.metadata.slideshow.slide_type = value;\n                },\n            //geter\n            function(cell){ var ns = cell.metadata.slideshow;\n                // if the slideshow namespace does not exist return `undefined`\n                // (will be interpreted as `false` by checkbox) otherwise\n                // return the value\n                return (ns === undefined)? undefined: ns.slide_type;\n                },\n            i18n.msg._(\"Slide Type\"));\n\n    var register = function (notebook) {\n        CellToolbar.register_callback('slideshow.select',select_type);\n        slideshow_preset.push('slideshow.select');\n\n        CellToolbar.register_preset(i18n.msg._('Slideshow'),slideshow_preset, notebook);\n    };\n    return {'register': register};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbarpresets/attachments',[\n    'notebook/js/celltoolbar',\n    'base/js/dialog',\n    'base/js/i18n'\n], function(celltoolbar, dialog, i18n) {\n    \"use strict\";\n\n    var CellToolbar = celltoolbar.CellToolbar;\n\n    var edit_attachments_dialog = function(cell) {\n        dialog.edit_attachments({\n          attachments: cell.attachments,\n          callback: function(attachments) {\n            cell.attachments = attachments;\n            // Force cell refresh\n            cell.unrender();\n            cell.render();\n          },\n          name: 'Cell',\n          notebook: cell.notebook,\n          keyboard_manager: cell.keyboard_manager\n        });\n    };\n\n    var add_dialog_button = function(div, cell) {\n        var button_container = $(div);\n        var button = $('<button />')\n            .addClass('btn btn-default btn-xs')\n            .text(i18n.msg._('Edit Attachments'))\n            .click( function() {\n              edit_attachments_dialog(cell);\n              return false;\n            });\n        button_container.append(button);\n    };\n\n    var register = function(notebook) {\n      CellToolbar.register_callback('attachments.edit', add_dialog_button);\n\n      var attachments_preset = [];\n      attachments_preset.push('attachments.edit');\n\n      CellToolbar.register_preset(i18n.msg._('Attachments'), attachments_preset, notebook);\n\n    };\n    return {'register' : register};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/celltoolbarpresets/tags',[\n    'notebook/js/celltoolbar',\n    'base/js/dialog',\n    'base/js/i18n'\n], function(celltoolbar, dialog, i18n) {\n    \"use strict\";\n\n    var CellToolbar = celltoolbar.CellToolbar;\n\n    var array_difference = function(a, b) {\n        return a.filter(function(n) {\n            return b.indexOf(n) === -1;\n        });\n    };\n\n    var write_tag = function(cell, name, add) {\n        if (add) {\n            // Add to metadata\n            if (cell.metadata.tags === undefined) {\n                cell.metadata.tags = [];\n            } else if (cell.metadata.tags.indexOf(name) !== -1) {\n                // Tag already exists\n                return false;\n            }\n            cell.metadata.tags.push(name);\n        } else {\n            // Remove from metadata\n            if (!cell.metadata || !cell.metadata.tags) {\n                // No tags to remove\n                return false;\n            }\n            // Remove tag from tags list\n            var index = cell.metadata.tags.indexOf(name);\n            if (index !== -1) {\n                cell.metadata.tags.splice(index, 1);\n            }\n            // If tags list is empty, remove it\n            if (cell.metadata.tags.length === 0) {\n                delete cell.metadata.tags;\n            }\n        }\n        cell.events.trigger('set_dirty.Notebook', {value: true});\n        return true;\n    };\n\n    var preprocess_input = function(input) {\n        // Split on whitespace + commas:\n        return input.split(/[,\\s]+/)\n    };\n\n    var add_tag = function(cell, tag_container, on_remove) {\n        return function(name) {\n            if (name === '') {\n                // Skip empty strings\n                return;\n            }\n            // Write tag to metadata\n            var changed = write_tag(cell, name, true);\n\n            if (changed) {\n                // Make tag UI\n                var tag = make_tag(name, on_remove);\n                tag_container.append(tag);\n                var tag_map = jQuery.data(tag_container, \"tag_map\") || {};\n                tag_map[name] = tag;\n                jQuery.data(tag_container, 'tag_map', tag_map);\n            }\n        };\n    };\n\n    var remove_tag = function(cell, tag_container) {\n        return function(name) {\n            var changed = write_tag(cell, name, false);\n            if (changed) {\n                // Remove tag UI\n                var tag_map = jQuery.data(tag_container, \"tag_map\") || {};\n                var tag_UI = tag_map[name];\n                delete tag_map[name];\n                tag_UI.remove();\n            }\n        };\n    };\n\n    var init_tag_container = function(cell, tag_container, on_remove) {\n        var tag_list = cell.metadata.tags || [];\n        if (!Array.isArray(tag_list)) {\n            // We cannot make tags UI for this cell!\n            // Maybe someone else used \"tags\" for something?\n            return false;  // Fail gracefully\n        }\n\n        var tag_map = {};\n        for (var i=0; i < tag_list.length; ++i) {\n            var tag_name = tag_list[i];\n            if (typeof tag_name !== 'string') {\n                // Unexpected type, disable toolbar for safety\n                return false;\n            }\n            var tag = make_tag(tag_name, on_remove);\n            tag_container.append(tag);\n            tag_map[tag_name] = tag;\n        }\n        jQuery.data(tag_container, 'tag_map', tag_map);\n        return true;\n    };\n\n    var make_tag = function(name, on_remove) {\n        var tag_UI = $('<span/>')\n            .addClass('cell-tag')\n            .text(name);\n\n        var remove_button = $('<i/>')\n            .addClass('remove-tag-btn')\n            .addClass('fa fa-times')\n            .click(function () {\n                on_remove(name);\n                return false;\n            });\n        tag_UI.append(remove_button);\n        return tag_UI;\n    };\n\n    // Single edit with button to add tags\n    var add_tag_edit = function(div, cell, on_add, on_remove) {\n        var button_container = $(div);\n\n        var text = $('<input/>').attr('type', 'text');\n        var button = $('<button />')\n            .addClass('btn btn-default btn-xs')\n            .text(i18n.msg._('Add tag'))\n            .click(function() {\n                var tags = preprocess_input(text[0].value);\n                for (var i=0; i < tags.length; ++i) {\n                    on_add(tags[i]);\n                }\n                // Clear input after adding:\n                text[0].value = '';\n                return false;\n            });\n        // Wire enter in input to button click\n        text.keyup(function(event){\n            if(event.keyCode == 13){\n                button.click();\n            }\n        });\n        var input_container = $('<span/>')\n            .addClass('tags-input');\n        add_dialog_button(input_container, cell, on_add, on_remove);\n        button_container.append(input_container\n                .append(text)\n                .append(button)\n            );\n        IPython.keyboard_manager.register_events(text);\n    };\n\n    var tag_dialog = function(cell, on_add, on_remove) {\n        var tag_list = cell.metadata.tags || [];\n\n        var message =\n            i18n.msg._(\"Edit the list of tags below. All whitespace \" +\n            \"is treated as tag separators.\");\n\n        var textarea = $('<textarea/>')\n            .attr('rows', '13')\n            .attr('cols', '80')\n            .attr('name', 'tags')\n            .text(tag_list.join('\\n'));\n\n        var dialogform = $('<div/>').attr('title', i18n.msg._('Edit the tags'))\n            .append(\n                $('<form/>').append(\n                    $('<fieldset/>').append(\n                        $('<label/>')\n                        .attr('for','tags')\n                        .text(message)\n                        )\n                    .append($('<br/>'))\n                    .append(textarea)\n                    )\n            );\n\n        var modal_obj = dialog.modal({\n            title: i18n.msg._(\"Edit Tags\"),\n            body: dialogform,\n            default_button: \"Cancel\",\n            buttons: {\n                Cancel: {},\n                Edit: { class : \"btn-primary\",\n                    click: function() {\n                        var old_tags = cell.metadata.tags || [];\n                        var new_tags = preprocess_input(textarea[0].value);\n                        var added_tags = array_difference(new_tags, old_tags);\n                        var removed_tags = array_difference(old_tags, new_tags);\n                        for (var i=0; i < added_tags.length; ++i) {\n                            on_add(added_tags[i]);\n                        }\n                        for (var i=0; i < removed_tags.length; ++i) {\n                            on_remove(removed_tags[i]);\n                        }\n                    }\n                }\n            },\n            notebook: cell.notebook,\n            keyboard_manager: cell.keyboard_manager,\n        });\n    };\n\n    var add_dialog_button = function(container, cell, on_add, on_remove) {\n        var button = $('<button />')\n            .addClass('btn btn-default btn-xs tags-dialog-btn')\n            .text('...')\n            .click( function() {\n              tag_dialog(cell, on_add, on_remove);\n              return false;\n            });\n        container.append(button);\n    };\n\n    var add_tags_cellbar = function(div, cell) {\n        var button_container = $(div);\n\n        button_container.addClass('tags_button_container');\n\n        var tag_container = $('<span/>').\n            addClass('tag-container');\n        var on_remove = remove_tag(cell, tag_container);\n        var ok = init_tag_container(cell, tag_container, on_remove);\n        if (!ok) {\n            return;\n        }\n        button_container.append(tag_container);\n\n        var on_add = add_tag(cell, tag_container, on_remove);\n        add_tag_edit(div, cell, on_add, on_remove);\n    };\n\n    var register = function(notebook) {\n      CellToolbar.register_callback('tags.edit', add_tags_cellbar);\n\n      var tags_preset = [];\n      tags_preset.push('tags.edit');\n\n      CellToolbar.register_preset('Tags', tags_preset, notebook);\n\n    };\n    return {'register' : register};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\ndefine('notebook/js/scrollmanager',['jquery'], function($) {\n    \"use strict\";\n\n    var ScrollManager = function(notebook, options) {\n        /**\n         * Public constructor.\n         */\n        this.notebook = notebook;\n        this.element = $('#site');\n        options = options || {};\n        this.animation_speed = options.animation_speed || 250; //ms\n    };\n\n    ScrollManager.prototype.onScroll = function (func, rate) {\n        /**\n         * Register a function to be called when the page is scrolled, throttled\n         * at a particular rate limit.\n         */\n         rate = rate || 100; // default rate limit\n         this.element.scroll(function () {\n             clearTimeout(func._timeout);\n             func._timeout = setTimeout(func, rate);\n         });\n    };\n\n    ScrollManager.prototype.scroll = function (delta) {\n        /**\n         * Scroll the document.\n         *\n         * Parameters\n         * ----------\n         * delta: integer\n         *  direction to scroll the document.  Positive is downwards. \n         *  Unit is one page length.\n         */\n        this.scroll_some(delta);\n        return false;\n    };\n\n    ScrollManager.prototype.scroll_to = function(selector) {\n        /**\n         * Scroll to an element in the notebook.\n         */\n        this.element.animate({'scrollTop': $(selector).offset().top + this.element.scrollTop() - this.element.offset().top}, this.animation_speed);\n    };\n\n    ScrollManager.prototype.scroll_some = function(pages) {\n        /**\n         * Scroll up or down a given number of pages.\n         *\n         * Parameters\n         * ----------\n         * pages: integer\n         *  number of pages to scroll the document, may be positive or negative.\n         */\n        this.element.animate({'scrollTop': this.element.scrollTop() + pages * this.element.height()}, this.animation_speed);\n    };\n\n    ScrollManager.prototype.get_first_visible_cell = function() {\n        /**\n         * Gets the index of the first visible cell in the document.\n         *\n         * First, attempt to be smart by guessing the index of the cell we are\n         * scrolled to.  Then, walk from there up or down until the right cell \n         * is found.  To guess the index, get the top of the last cell, and\n         * divide that by the number of cells to get an average cell height.  \n         * Then divide the scroll height by the average cell height.\n         */\n        var cell_count = this.notebook.ncells();\n        var first_cell_top = this.notebook.get_cell(0).element.offset().top;\n        var last_cell_top = this.notebook.get_cell(cell_count-1).element.offset().top;\n        var avg_cell_height = (last_cell_top - first_cell_top) / cell_count;\n        var i = Math.ceil(this.element.scrollTop() / avg_cell_height);\n        i = Math.min(Math.max(i , 0), cell_count - 1);\n\n        while (this.notebook.get_cell(i).element.offset().top - first_cell_top < this.element.scrollTop() && i < cell_count - 1) {\n            i += 1;\n        } \n\n        while (this.notebook.get_cell(i).element.offset().top - first_cell_top > this.element.scrollTop() - 50 && i >= 0) {\n            i -= 1;\n        } \n        return Math.min(i + 1, cell_count - 1);\n    };\n\n    ScrollManager.prototype.is_cell_visible = function (cell) {\n        var cell_rect = cell.element[0].getBoundingClientRect();\n        var scroll_rect = this.element[0].getBoundingClientRect();\n        return ((cell_rect.top <= scroll_rect.bottom) && (cell_rect.bottom >= scroll_rect.top));\n    };\n\n\n    var TargetScrollManager = function(notebook, options) {\n        /**\n         * Public constructor.\n         */\n        ScrollManager.apply(this, [notebook, options]);\n    };\n    TargetScrollManager.prototype = Object.create(ScrollManager.prototype);\n\n    TargetScrollManager.prototype.is_target = function (index) {\n        /**\n         * Check if a cell should be a scroll stop.\n         *\n         * Returns `true` if the cell is a cell that the scroll manager\n         * should scroll to.  Otherwise, false is returned. \n         *\n         * Parameters\n         * ----------\n         * index: integer\n         *  index of the cell to test.\n         */\n        return false;\n    };\n\n    TargetScrollManager.prototype.scroll = function (delta) {\n        /**\n         * Scroll the document.\n         *\n         * Parameters\n         * ----------\n         * delta: integer\n         *  direction to scroll the document.  Positive is downwards.\n         *  Units are targets.\n         *\n         * Try to scroll to the next slide.\n         */\n        var cell_count = this.notebook.ncells();\n        var selected_index = this.get_first_visible_cell() + delta;\n        while (0 <= selected_index && selected_index < cell_count && !this.is_target(selected_index)) {\n            selected_index += delta;\n        }\n\n        if (selected_index < 0 || cell_count <= selected_index) {\n            return ScrollManager.prototype.scroll.apply(this, [delta]);\n        } else {\n            this.scroll_to(this.notebook.get_cell(selected_index).element);\n            \n            // Cancel browser keyboard scroll.\n            return false;\n        }\n    };\n\n\n    var SlideScrollManager = function(notebook, options) {\n        /**\n         * Public constructor.\n         */\n        TargetScrollManager.apply(this, [notebook, options]);\n    };\n    SlideScrollManager.prototype = Object.create(TargetScrollManager.prototype);\n\n    SlideScrollManager.prototype.is_target = function (index) {\n        var cell = this.notebook.get_cell(index);\n        return cell.metadata && cell.metadata.slideshow && \n            cell.metadata.slideshow.slide_type && \n            (cell.metadata.slideshow.slide_type === \"slide\" ||\n            cell.metadata.slideshow.slide_type === \"subslide\");\n    };\n\n\n    var HeadingScrollManager = function(notebook, options) {\n        /**\n         * Public constructor.\n         */\n        ScrollManager.apply(this, [notebook, options]);\n        options = options || {};\n        this._level = options.heading_level || 1;\n    };\n    HeadingScrollManager.prototype = Object.create(ScrollManager.prototype);\n\n    HeadingScrollManager.prototype.scroll = function (delta) {\n        /**\n         * Scroll the document.\n         *\n         * Parameters\n         * ----------\n         * delta: integer\n         *  direction to scroll the document.  Positive is downwards.\n         *  Units are headers.\n         *\n         * Get all of the header elements that match the heading level or are of\n         * greater magnitude (a smaller header number).\n         */\n        var headers = $();\n        var i;\n        for (i = 1; i <= this._level; i++) {\n            headers = headers.add('#notebook-container h' + i);\n        }\n\n        // Find the header the user is on or below.\n        var first_cell_top = this.notebook.get_cell(0).element.offset().top;\n        var current_scroll = this.element.scrollTop();\n        var header_scroll = 0;\n        i = -1;\n        while (current_scroll >= header_scroll && i < headers.length) {\n            if (++i < headers.length) {\n                header_scroll = $(headers[i]).offset().top - first_cell_top;\n            }\n        }\n        i--;\n\n        // Check if the user is below the header.\n        if (i < 0 || current_scroll > $(headers[i]).offset().top - first_cell_top + 30) {\n            // Below the header, count the header as a target.\n            if (delta < 0) {\n                delta += 1;\n            }\n        }\n        i += delta;\n\n        // Scroll!\n        if (0 <= i && i < headers.length) {\n            this.scroll_to(headers[i]);\n            return false;\n        } else {\n            // Default to the base's scroll behavior when target header doesn't\n            // exist.\n            return ScrollManager.prototype.scroll.apply(this, [delta]);\n        }\n    };\n\n    // Return naemspace for require.js loads\n    return {\n        'ScrollManager': ScrollManager,\n        'SlideScrollManager': SlideScrollManager,\n        'HeadingScrollManager': HeadingScrollManager,\n        'TargetScrollManager': TargetScrollManager\n    };\n});\n\n",
    "/*!\n * jQuery Typeahead\n * Copyright (C) 2017 RunningCoder.org\n * Licensed under the MIT license\n *\n * @author Tom Bertrand\n * @version 2.10.4 (2017-10-17)\n * @link http://www.runningcoder.org/jquerytypeahead/\n */\n(function (factory) {\n    if (typeof define === \"function\" && define.amd) {\n        define(\"jquery-typeahead\", [\"jquery\"], function (jQuery) {\n            return factory(jQuery);\n        });\n    } else if (typeof module === \"object\" && module.exports) {\n        module.exports = (function (jQuery, root) {\n            if (jQuery === undefined) {\n                if (typeof window !== \"undefined\") {\n                    jQuery = require(\"jquery\");\n                } else {\n                    jQuery = require(\"jquery\")(root);\n                }\n            }\n            return factory(jQuery);\n        })();\n    } else {\n        factory(jQuery);\n    }\n})(function ($) {\n    \"use strict\";\n\n    window.Typeahead = {\n        version: '2.10.4'\n    };\n\n    /**\n     * @private\n     * Default options\n     * @link http://www.runningcoder.org/jquerytypeahead/documentation/\n     */\n    var _options = {\n        input: null,                // *RECOMMENDED*, jQuery selector to reach Typeahead's input for initialization\n        minLength: 2,               // Accepts 0 to search on focus, minimum character length to perform a search\n        maxLength: false,           // False as \"Infinity\" will not put character length restriction for searching results\n        maxItem: 8,                 // Accepts 0 / false as \"Infinity\" meaning all the results will be displayed\n        dynamic: false,             // When true, Typeahead will get a new dataset from the source option on every key press\n        delay: 300,                 // delay in ms when dynamic option is set to true\n        order: null,                // \"asc\" or \"desc\" to sort results\n        offset: false,              // Set to true to match items starting from their first character\n        hint: false,                // Added support for excessive \"space\" characters\n        accent: false,              // Will allow to type accent and give letter equivalent results, also can define a custom replacement object\n        highlight: true,            // Added \"any\" to highlight any word in the template, by default true will only highlight display keys\n        multiselect: null,          // Multiselect configuration object, see documentation for all options\n        group: false,               // Improved feature, Boolean,string,object(key, template (string, function))\n        groupOrder: null,           // New feature, order groups \"asc\", \"desc\", Array, Function\n        maxItemPerGroup: null,      // Maximum number of result per Group\n        dropdownFilter: false,      // Take group options string and create a dropdown filter\n        dynamicFilter: null,        // Filter the typeahead results based on dynamic value, Ex: Players based on TeamID\n        backdrop: false,            // Add a backdrop behind Typeahead results\n        backdropOnFocus: false,     // Display the backdrop option as the Typeahead input is :focused\n        cache: false,               // Improved option, true OR 'localStorage' OR 'sessionStorage'\n        ttl: 3600000,               // Cache time to live in ms\n        compression: false,         // Requires LZString library\n        searchOnFocus: false,       // Display search results on input focus\n        blurOnTab: true,            // Blur Typeahead when Tab key is pressed, if false Tab will go though search results\n        resultContainer: null,      // List the results inside any container string or jQuery object\n        generateOnLoad: null,       // Forces the source to be generated on page load even if the input is not focused!\n        mustSelectItem: false,      // The submit function only gets called if an item is selected\n        href: null,                 // String or Function to format the url for right-click & open in new tab on link results\n        display: [\"display\"],       // Allows search in multiple item keys [\"display1\", \"display2\"]\n        template: null,             // Display template of each of the result list\n        templateValue: null,        // Set the input value template when an item is clicked\n        groupTemplate: null,        // Set a custom template for the groups\n        correlativeTemplate: false, // Compile display keys, enables multiple key search from the template string\n        emptyTemplate: false,       // Display an empty template if no result\n        cancelButton: true,         // If text is detected in the input, a cancel button will be available to reset the input (pressing ESC also cancels)\n        loadingAnimation: true,     // Display a loading animation when typeahead is doing request / searching for results\n        filter: true,               // Set to false or function to bypass Typeahead filtering. WARNING: accent, correlativeTemplate, offset & matcher will not be interpreted\n        matcher: null,              // Add an extra filtering function after the typeahead functions\n        source: null,               // Source of data for Typeahead to filter\n        callback: {\n            onInit: null,               // When Typeahead is first initialized (happens only once)\n            onReady: null,              // When the Typeahead initial preparation is completed\n            onShowLayout: null,         // Called when the layout is shown\n            onHideLayout: null,         // Called when the layout is hidden\n            onSearch: null,             // When data is being fetched & analyzed to give search results\n            onResult: null,             // When the result container is displayed\n            onLayoutBuiltBefore: null,  // When the result HTML is build, modify it before it get showed\n            onLayoutBuiltAfter: null,   // Modify the dom right after the results gets inserted in the result container\n            onNavigateBefore: null,     // When a key is pressed to navigate the results, before the navigation happens\n            onNavigateAfter: null,      // When a key is pressed to navigate the results\n            onEnter: null,              // When an item in the result list is focused\n            onLeave: null,              // When an item in the result list is blurred\n            onClickBefore: null,        // Possibility to e.preventDefault() to prevent the Typeahead behaviors\n            onClickAfter: null,         // Happens after the default clicked behaviors has been executed\n            onDropdownFilter: null,     // When the dropdownFilter is changed, trigger this callback\n            onSendRequest: null,        // Gets called when the Ajax request(s) are sent\n            onReceiveRequest: null,     // Gets called when the Ajax request(s) are all received\n            onPopulateSource: null,     // Perform operation on the source data before it gets in Typeahead data\n            onCacheSave: null,          // Perform operation on the source data before it gets in Typeahead cache\n            onSubmit: null,             // When Typeahead form is submitted\n            onCancel: null              // Triggered if the typeahead had text inside and is cleared\n        },\n        selector: {\n            container: \"typeahead__container\",\n            result: \"typeahead__result\",\n            list: \"typeahead__list\",\n            group: \"typeahead__group\",\n            item: \"typeahead__item\",\n            empty: \"typeahead__empty\",\n            display: \"typeahead__display\",\n            query: \"typeahead__query\",\n            filter: \"typeahead__filter\",\n            filterButton: \"typeahead__filter-button\",\n            dropdown: \"typeahead__dropdown\",\n            dropdownItem: \"typeahead__dropdown-item\",\n            labelContainer: \"typeahead__label-container\",\n            label: \"typeahead__label\",\n            button: \"typeahead__button\",\n            backdrop: \"typeahead__backdrop\",\n            hint: \"typeahead__hint\",\n            cancelButton: \"typeahead__cancel-button\"\n        },\n        debug: false // Display debug information (RECOMMENDED for dev environment)\n    };\n\n    /**\n     * @private\n     * Event namespace\n     */\n    var _namespace = \".typeahead\";\n\n    /**\n     * @private\n     * Accent equivalents\n     */\n    var _accent = {\n        from: \"ãàáäâẽèéëêìíïîõòóöôùúüûñç\",\n        to: \"aaaaaeeeeeiiiiooooouuuunc\"\n    };\n\n    /**\n     * #62 IE9 doesn't trigger \"input\" event when text gets removed (backspace, ctrl+x, etc)\n     * @private\n     */\n    var _isIE9 = ~window.navigator.appVersion.indexOf(\"MSIE 9.\");\n\n    /**\n     * #193 Clicking on a suggested option does not select it on IE10/11\n     * @private\n     */\n    var _isIE10 = ~window.navigator.appVersion.indexOf(\"MSIE 10\");\n    var _isIE11 = ~window.navigator.userAgent.indexOf(\"Trident\")\n        ? ~window.navigator.userAgent.indexOf(\"rv:11\")\n        : false;\n\n    // SOURCE GROUP RESERVED WORDS: ajax, data, url\n    // SOURCE ITEMS RESERVED KEYS: group, display, data, matchedKey, compiled, href\n\n    /**\n     * @constructor\n     * Typeahead Class\n     *\n     * @param {object} node jQuery input object\n     * @param {object} options User defined options\n     */\n    var Typeahead = function (node, options) {\n        this.rawQuery = node.val() || \"\";   // Unmodified input query\n        this.query = node.val() || \"\";      // Input query\n        this.selector = node[0].selector;   // Typeahead instance selector (to reach from window.Typeahead[SELECTOR])\n        this.deferred = null;               // Promise when \"input\" event in triggered, this.node.triggerHandler('input').then(() => {})\n        this.tmpSource = {};                // Temp var to preserve the source order for the searchResult function\n        this.source = {};                   // The generated source kept in memory\n        this.dynamicGroups = [];            // Store the source groups that are defined as dynamic\n        this.hasDynamicGroups = false;      // Boolean if at least one of the groups has a dynamic source\n        this.generatedGroupCount = 0;       // Number of groups generated, if limit reached the search can be done\n        this.groupBy = \"group\";             // This option will change according to filtering or custom grouping\n        this.groups = [];                   // Array of all the available groups, used to build the groupTemplate\n        this.searchGroups = [];             // Array of groups to generate when Typeahead searches data\n        this.generateGroups = [];           // Array of groups to generate when Typeahead requests data\n        this.requestGroups = [];            // Array of groups to request via Ajax\n        this.result = [];                   // Results based on Source-query match (only contains the displayed elements)\n        this.tmpResult = {};                // Temporary object of results, before they get passed to the buildLayout function\n        this.groupTemplate = \"\";            // Result template at the {{group}} level\n        this.resultHtml = null;             // HTML Results (displayed elements)\n        this.resultCount = 0;               // Total results based on Source-query match\n        this.resultCountPerGroup = {};      // Total results based on Source-query match per group\n        this.options = options;             // Typeahead options (Merged default & user defined)\n        this.node = node;                   // jQuery object of the Typeahead <input>\n        this.namespace =\n            \".\" +\n            this.helper.slugify.call(this, this.selector) +\n            _namespace;                     // Every Typeahead instance gets its own namespace for events\n        this.isContentEditable = typeof this.node.attr('contenteditable') !== \"undefined\"\n            && this.node.attr('contenteditable') !== \"false\";\n        this.container = null;              // Typeahead container, usually right after <form>\n        this.resultContainer = null;        // Typeahead result container (html)\n        this.item = null;                   // Selected item\n        this.items = null;                  // Multiselect selected items\n        this.comparedItems = null;          // Multiselect items stored for comparison\n        this.xhr = {};                      // Ajax request(s) stack\n        this.hintIndex = null;              // Numeric value of the hint index in the result list\n        this.filters = {                    // Filter list for searching, dropdown and dynamic(s)\n            dropdown: {},                   // Dropdown menu if options.dropdownFilter is set\n            dynamic: {}                     // Checkbox / Radio / Select to filter the source data\n        };\n        this.dropdownFilter = {\n            static: [],                     // Objects that has a value\n            dynamic: []\n        };\n        this.dropdownFilterAll = null;      // The last \"all\" definition\n        this.isDropdownEvent = false;       // If a dropdownFilter is clicked, this will be true to trigger the callback\n\n        this.requests = {};                 // Store the group:request instead of generating them every time\n\n        this.backdrop = {};                 // The backdrop object\n        this.hint = {};                     // The hint object\n        this.label = {};                    // The label object\n        this.hasDragged = false;            // Will cancel mouseend events if true\n        this.focusOnly = false;             // Focus the input preventing any operations\n\n        this.__construct();\n    };\n\n    Typeahead.prototype = {\n        _validateCacheMethod: function (cache) {\n            var supportedCache = [\"localStorage\", \"sessionStorage\"],\n                supported;\n\n            if (cache === true) {\n                cache = \"localStorage\";\n            } else if (typeof cache === \"string\" && !~supportedCache.indexOf(cache)) {\n                // {debug}\n                if (this.options.debug) {\n                    _debug.log({\n                        node: this.selector,\n                        function: \"extendOptions()\",\n                        message: 'Invalid options.cache, possible options are \"localStorage\" or \"sessionStorage\"'\n                    });\n\n                    _debug.print();\n                }\n                // {/debug}\n                return false;\n            }\n\n            supported = typeof window[cache] !== \"undefined\";\n\n            try {\n                window[cache].setItem(\"typeahead\", \"typeahead\");\n                window[cache].removeItem(\"typeahead\");\n            } catch (e) {\n                supported = false;\n            }\n\n            return (supported && cache) || false;\n        },\n\n        extendOptions: function () {\n            this.options.cache = this._validateCacheMethod(this.options.cache);\n\n            if (this.options.compression) {\n                if (typeof LZString !== \"object\" || !this.options.cache) {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"extendOptions()\",\n                            message: \"Missing LZString Library or options.cache, no compression will occur.\"\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                    this.options.compression = false;\n                }\n            }\n\n            if (!this.options.maxLength || isNaN(this.options.maxLength)) {\n                this.options.maxLength = Infinity;\n            }\n\n            if (\n                typeof this.options.maxItem !== \"undefined\" && ~[0, false].indexOf(this.options.maxItem)\n            ) {\n                this.options.maxItem = Infinity;\n            }\n\n            if (\n                this.options.maxItemPerGroup && !/^\\d+$/.test(this.options.maxItemPerGroup)\n            ) {\n                this.options.maxItemPerGroup = null;\n            }\n\n            if (this.options.display && !Array.isArray(this.options.display)) {\n                this.options.display = [this.options.display];\n            }\n\n            if (this.options.multiselect) {\n                this.items = [];\n                this.comparedItems = [];\n                if (typeof this.options.multiselect.matchOn === \"string\") {\n                    this.options.multiselect.matchOn = [this.options.multiselect.matchOn];\n                }\n            }\n\n            if (this.options.group) {\n                if (!Array.isArray(this.options.group)) {\n                    if (typeof this.options.group === \"string\") {\n                        this.options.group = {\n                            key: this.options.group\n                        };\n                    } else if (typeof this.options.group === \"boolean\") {\n                        this.options.group = {\n                            key: \"group\"\n                        };\n                    }\n\n                    this.options.group.key = this.options.group.key || \"group\";\n                } else {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"extendOptions()\",\n                            message: \"options.group must be a boolean|string|object as of 2.5.0\"\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                }\n            }\n\n            if (this.options.highlight && !~[\"any\", true].indexOf(this.options.highlight)) {\n                this.options.highlight = false;\n            }\n\n            if (\n                this.options.dropdownFilter &&\n                this.options.dropdownFilter instanceof Object\n            ) {\n                if (!Array.isArray(this.options.dropdownFilter)) {\n                    this.options.dropdownFilter = [this.options.dropdownFilter];\n                }\n                for (var i = 0, ii = this.options.dropdownFilter.length; i < ii; ++i) {\n                    this.dropdownFilter[\n                        this.options.dropdownFilter[i].value ? \"static\" : \"dynamic\"\n                        ].push(this.options.dropdownFilter[i]);\n                }\n            }\n\n            if (this.options.dynamicFilter && !Array.isArray(this.options.dynamicFilter)) {\n                this.options.dynamicFilter = [this.options.dynamicFilter];\n            }\n\n            if (this.options.accent) {\n                if (typeof this.options.accent === \"object\") {\n                    if (\n                        this.options.accent.from &&\n                        this.options.accent.to &&\n                        this.options.accent.from.length !== this.options.accent.to.length\n                    ) {\n                        // {debug}\n                        if (this.options.debug) {\n                            _debug.log({\n                                node: this.selector,\n                                function: \"extendOptions()\",\n                                message: 'Invalid \"options.accent\", from and to must be defined and same length.'\n                            });\n\n                            _debug.print();\n                        }\n                        // {/debug}\n                    }\n\n                } else {\n                    this.options.accent = _accent;\n                }\n            }\n\n            if (this.options.groupTemplate) {\n                this.groupTemplate = this.options.groupTemplate;\n            }\n\n            if (this.options.resultContainer) {\n                if (typeof this.options.resultContainer === \"string\") {\n                    this.options.resultContainer = $(this.options.resultContainer);\n                }\n\n                if (\n                    !(this.options.resultContainer instanceof $) || !this.options.resultContainer[0]\n                ) {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"extendOptions()\",\n                            message: 'Invalid jQuery selector or jQuery Object for \"options.resultContainer\".'\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                } else {\n                    this.resultContainer = this.options.resultContainer;\n                }\n            }\n\n            if (\n                this.options.maxItemPerGroup &&\n                this.options.group &&\n                this.options.group.key\n            ) {\n                this.groupBy = this.options.group.key;\n            }\n\n            // Compatibility onClick callback\n            if (this.options.callback && this.options.callback.onClick) {\n                this.options.callback.onClickBefore = this.options.callback.onClick;\n                delete this.options.callback.onClick;\n            }\n\n            // Compatibility onNavigate callback\n            if (this.options.callback && this.options.callback.onNavigate) {\n                this.options.callback.onNavigateBefore = this.options.callback.onNavigate;\n                delete this.options.callback.onNavigate;\n            }\n\n            this.options = $.extend(true, {}, _options, this.options);\n        },\n\n        unifySourceFormat: function () {\n            this.dynamicGroups = [];\n\n            // source: ['item1', 'item2', 'item3']\n            if (Array.isArray(this.options.source)) {\n                this.options.source = {\n                    group: {\n                        data: this.options.source\n                    }\n                };\n            }\n\n            // source: \"http://www.test.com/url.json\"\n            if (typeof this.options.source === \"string\") {\n                this.options.source = {\n                    group: {\n                        ajax: {\n                            url: this.options.source\n                        }\n                    }\n                };\n            }\n\n            if (this.options.source.ajax) {\n                this.options.source = {\n                    group: {\n                        ajax: this.options.source.ajax\n                    }\n                };\n            }\n\n            // source: {data: ['item1', 'item2'], url: \"http://www.test.com/url.json\"}\n            if (this.options.source.url || this.options.source.data) {\n                this.options.source = {\n                    group: this.options.source\n                };\n            }\n\n            var group, groupSource, tmpAjax;\n\n            for (group in this.options.source) {\n                if (!this.options.source.hasOwnProperty(group)) continue;\n\n                groupSource = this.options.source[group];\n\n                // source: {group: \"http://www.test.com/url.json\"}\n                if (typeof groupSource === \"string\") {\n                    groupSource = {\n                        ajax: {\n                            url: groupSource\n                        }\n                    };\n                }\n\n                // source: {group: {url: [\"http://www.test.com/url.json\", \"json.path\"]}}\n                tmpAjax = groupSource.url || groupSource.ajax;\n                if (Array.isArray(tmpAjax)) {\n                    groupSource.ajax =\n                        typeof tmpAjax[0] === \"string\"\n                            ? {\n                                url: tmpAjax[0]\n                            }\n                            : tmpAjax[0];\n                    groupSource.ajax.path = groupSource.ajax.path || tmpAjax[1] || null;\n                    delete groupSource.url;\n                } else {\n                    // source: {group: {url: {url: \"http://www.test.com/url.json\", method: \"GET\"}}}\n                    // source: {group: {url: \"http://www.test.com/url.json\", dataType: \"jsonp\"}}\n                    if (typeof groupSource.url === \"object\") {\n                        groupSource.ajax = groupSource.url;\n                    } else if (typeof groupSource.url === \"string\") {\n                        groupSource.ajax = {\n                            url: groupSource.url\n                        };\n                    }\n                    delete groupSource.url;\n                }\n\n                if (!groupSource.data && !groupSource.ajax) {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"unifySourceFormat()\",\n                            arguments: JSON.stringify(this.options.source),\n                            message: 'Undefined \"options.source.' +\n                            group +\n                            '.[data|ajax]\" is Missing - Typeahead dropped'\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n\n                    return false;\n                }\n\n                if (groupSource.display && !Array.isArray(groupSource.display)) {\n                    groupSource.display = [groupSource.display];\n                }\n\n                groupSource.minLength =\n                    typeof groupSource.minLength === \"number\"\n                        ? groupSource.minLength\n                        : this.options.minLength;\n                groupSource.maxLength =\n                    typeof groupSource.maxLength === \"number\"\n                        ? groupSource.maxLength\n                        : this.options.maxLength;\n                groupSource.dynamic =\n                    typeof groupSource.dynamic === \"boolean\" || this.options.dynamic;\n\n                if (groupSource.minLength > groupSource.maxLength) {\n                    groupSource.minLength = groupSource.maxLength;\n                }\n                this.options.source[group] = groupSource;\n\n                if (this.options.source[group].dynamic) {\n                    this.dynamicGroups.push(group);\n                }\n\n                groupSource.cache =\n                    typeof groupSource.cache !== \"undefined\"\n                        ? this._validateCacheMethod(groupSource.cache)\n                        : this.options.cache;\n\n                if (groupSource.compression) {\n                    if (typeof LZString !== \"object\" || !groupSource.cache) {\n                        // {debug}\n                        if (this.options.debug) {\n                            _debug.log({\n                                node: this.selector,\n                                function: \"unifySourceFormat()\",\n                                message: \"Missing LZString Library or group.cache, no compression will occur on group: \" +\n                                group\n                            });\n\n                            _debug.print();\n                        }\n                        // {/debug}\n                        groupSource.compression = false;\n                    }\n                }\n            }\n\n            this.hasDynamicGroups =\n                this.options.dynamic || !!this.dynamicGroups.length;\n\n            return true;\n        },\n\n        init: function () {\n            this.helper.executeCallback.call(this, this.options.callback.onInit, [\n                this.node\n            ]);\n\n            this.container = this.node.closest(\".\" + this.options.selector.container);\n\n            // {debug}\n            if (this.options.debug) {\n                _debug.log({\n                    node: this.selector,\n                    function: \"init()\",\n                    //'arguments': JSON.stringify(this.options),\n                    message: \"OK - Typeahead activated on \" + this.selector\n                });\n\n                _debug.print();\n            }\n            // {/debug}\n        },\n\n        delegateEvents: function () {\n            var scope = this,\n                events = [\n                    \"focus\" + this.namespace,\n                    \"input\" + this.namespace,\n                    \"propertychange\" + this.namespace, // IE8 Fix\n                    \"keydown\" + this.namespace,\n                    \"keyup\" + this.namespace, // IE9 Fix\n                    \"search\" + this.namespace,\n                    \"generate\" + this.namespace\n                ];\n\n            // #149 - Adding support for Mobiles\n            $(\"html\")\n                .on(\"touchmove\", function () {\n                    scope.hasDragged = true;\n                })\n                .on(\"touchstart\", function () {\n                    scope.hasDragged = false;\n                });\n\n            this.node\n                .closest(\"form\")\n                .on(\"submit\", function (e) {\n                    if (\n                        scope.options.mustSelectItem &&\n                        scope.helper.isEmpty(scope.item)\n                    ) {\n                        e.preventDefault();\n                        return;\n                    }\n\n                    if (!scope.options.backdropOnFocus) {\n                        scope.hideLayout();\n                    }\n\n                    if (scope.options.callback.onSubmit) {\n                        return scope.helper.executeCallback.call(\n                            scope,\n                            scope.options.callback.onSubmit,\n                            [scope.node, this, scope.item || scope.items, e]\n                        );\n                    }\n                })\n                .on(\"reset\", function () {\n                    // #221 - Reset Typeahead on form reset.\n                    // setTimeout to re-queue the `input.typeahead` event at the end\n                    setTimeout(function () {\n                        scope.node.trigger(\"input\" + scope.namespace);\n                        // #243 - minLength: 0 opens the Typeahead results\n                        scope.hideLayout();\n                    });\n                });\n\n            // IE8 fix\n            var preventNextEvent = false;\n\n            // IE10/11 fix\n            if (this.node.attr(\"placeholder\") && (_isIE10 || _isIE11)) {\n                var preventInputEvent = true;\n\n                this.node.on(\"focusin focusout\", function () {\n                    preventInputEvent = !!(!this.value && this.placeholder);\n                });\n\n                this.node.on(\"input\", function (e) {\n                    if (preventInputEvent) {\n                        e.stopImmediatePropagation();\n                        preventInputEvent = false;\n                    }\n                });\n            }\n\n            this.node\n                .off(this.namespace)\n                .on(events.join(\" \"), function (e, data) {\n                    switch (e.type) {\n                        case \"generate\":\n                            scope.generateSource(Object.keys(scope.options.source));\n                            break;\n                        case \"focus\":\n                            if (scope.focusOnly) {\n                                scope.focusOnly = false;\n                                break;\n                            }\n                            if (scope.options.backdropOnFocus) {\n                                scope.buildBackdropLayout();\n                                scope.showLayout();\n                            }\n                            if (scope.options.searchOnFocus && !scope.item) {\n                                scope.deferred = $.Deferred();\n                                scope.assignQuery();\n                                scope.generateSource();\n                            }\n                            break;\n                        case \"keydown\":\n                            if (e.keyCode === 8\n                                && scope.options.multiselect\n                                && scope.options.multiselect.cancelOnBackspace\n                                && scope.query === ''\n                                && scope.items.length\n                            ) {\n                                scope.cancelMultiselectItem(scope.items.length - 1, null, e);\n                            } else if (e.keyCode && ~[9, 13, 27, 38, 39, 40].indexOf(e.keyCode)) {\n                                preventNextEvent = true;\n                                scope.navigate(e);\n                            }\n                            break;\n                        case \"keyup\":\n                            if (\n                                _isIE9 &&\n                                scope.node[0].value.replace(/^\\s+/, \"\").toString().length <\n                                scope.query.length\n                            ) {\n                                scope.node.trigger(\"input\" + scope.namespace);\n                            }\n                            break;\n                        case \"propertychange\":\n                            if (preventNextEvent) {\n                                preventNextEvent = false;\n                                break;\n                            }\n                        case \"input\":\n                            scope.deferred = $.Deferred();\n                            scope.assignQuery();\n\n                            // #195 Trigger an onCancel event if the Typeahead is cleared\n                            if (scope.rawQuery === \"\" && scope.query === \"\") {\n                                e.originalEvent = data || {};\n                                scope.helper.executeCallback.call(\n                                    scope,\n                                    scope.options.callback.onCancel,\n                                    [scope.node, e]\n                                );\n                            }\n\n                            scope.options.cancelButton &&\n                            scope.toggleCancelButtonVisibility();\n\n                            if (\n                                scope.options.hint &&\n                                scope.hint.container &&\n                                scope.hint.container.val() !== \"\"\n                            ) {\n                                if (scope.hint.container.val().indexOf(scope.rawQuery) !== 0) {\n                                    scope.hint.container.val(\"\");\n                                    if (scope.isContentEditable) {\n                                        scope.hint.container.text(\"\");\n                                    }\n                                }\n                            }\n\n                            if (scope.hasDynamicGroups) {\n                                scope.helper.typeWatch(function () {\n                                    scope.generateSource();\n                                }, scope.options.delay);\n                            } else {\n                                scope.generateSource();\n                            }\n                            break;\n                        case \"search\":\n                            scope.searchResult();\n                            scope.buildLayout();\n\n                            if (scope.result.length ||\n                                (scope.searchGroups.length &&\n                                scope.options.emptyTemplate &&\n                                scope.query.length)\n                            ) {\n                                scope.showLayout();\n                            } else {\n                                scope.hideLayout();\n                            }\n\n                            scope.deferred && scope.deferred.resolve();\n                            break;\n                    }\n\n                    return scope.deferred && scope.deferred.promise();\n                });\n\n            if (this.options.generateOnLoad) {\n                this.node.trigger(\"generate\" + this.namespace);\n            }\n        },\n\n        assignQuery: function () {\n            if (this.isContentEditable) {\n                this.rawQuery = this.node.text();\n            } else {\n                this.rawQuery = this.node.val().toString();\n            }\n            this.rawQuery = this.rawQuery.replace(/^\\s+/, \"\");\n\n            if (this.rawQuery !== this.query) {\n                this.item = null;\n                this.query = this.rawQuery;\n            }\n        },\n\n        filterGenerateSource: function () {\n            this.searchGroups = [];\n            this.generateGroups = [];\n\n            if (this.focusOnly && !this.options.multiselect) return;\n\n            for (var group in this.options.source) {\n                if (!this.options.source.hasOwnProperty(group)) continue;\n                if (\n                    this.query.length >= this.options.source[group].minLength &&\n                    this.query.length <= this.options.source[group].maxLength\n                ) {\n                    this.searchGroups.push(group);\n                    if (!this.options.source[group].dynamic && this.source[group]) {\n                        continue;\n                    }\n                    this.generateGroups.push(group);\n                }\n            }\n        },\n\n        generateSource: function (generateGroups) {\n            this.filterGenerateSource();\n            if (Array.isArray(generateGroups) && generateGroups.length) {\n                this.generateGroups = generateGroups;\n            } else if (!this.generateGroups.length) {\n                this.node.trigger(\"search\" + this.namespace);\n                return;\n            }\n\n            this.requestGroups = [];\n            this.generatedGroupCount = 0;\n            this.options.loadingAnimation && this.container.addClass(\"loading\");\n\n            if (!this.helper.isEmpty(this.xhr)) {\n                for (var i in this.xhr) {\n                    if (!this.xhr.hasOwnProperty(i)) continue;\n                    this.xhr[i].abort();\n                }\n                this.xhr = {};\n            }\n\n            var scope = this,\n                group,\n                groupData,\n                groupSource,\n                cache,\n                compression,\n                dataInStorage,\n                isValidStorage;\n\n            for (var i = 0, ii = this.generateGroups.length; i < ii; ++i) {\n                group = this.generateGroups[i];\n                groupSource = this.options.source[group];\n                cache = groupSource.cache;\n                compression = groupSource.compression;\n\n                if (cache) {\n                    dataInStorage = window[cache].getItem(\n                        \"TYPEAHEAD_\" + this.selector + \":\" + group\n                    );\n                    if (dataInStorage) {\n                        if (compression) {\n                            dataInStorage = LZString.decompressFromUTF16(dataInStorage);\n                        }\n\n                        isValidStorage = false;\n                        try {\n                            dataInStorage = JSON.parse(dataInStorage + \"\");\n\n                            if (\n                                dataInStorage.data &&\n                                dataInStorage.ttl > new Date().getTime()\n                            ) {\n                                this.populateSource(dataInStorage.data, group);\n                                isValidStorage = true;\n\n                                // {debug}\n                                if (this.options.debug) {\n                                    _debug.log({\n                                        node: this.selector,\n                                        function: \"generateSource()\",\n                                        message: 'Source for group \"' + group + '\" found in ' + cache\n                                    });\n                                    _debug.print();\n                                }\n                                // {/debug}\n                            } else {\n                                window[cache].removeItem(\n                                    \"TYPEAHEAD_\" + this.selector + \":\" + group\n                                );\n                            }\n                        } catch (error) {\n                        }\n\n                        if (isValidStorage) continue;\n                    }\n                }\n\n                if (groupSource.data && !groupSource.ajax) {\n                    // #198 Add support for async data source\n                    if (typeof groupSource.data === \"function\") {\n                        groupData = groupSource.data.call(this);\n                        if (Array.isArray(groupData)) {\n                            scope.populateSource(groupData, group);\n                        } else if (typeof groupData.promise === \"function\") {\n                            (function (group) {\n                                $.when(groupData).then(function (deferredData) {\n                                    if (deferredData && Array.isArray(deferredData)) {\n                                        scope.populateSource(deferredData, group);\n                                    }\n                                });\n                            })(group);\n                        }\n                    } else {\n                        this.populateSource($.extend(true, [], groupSource.data), group);\n                    }\n                    continue;\n                }\n\n                if (groupSource.ajax) {\n                    if (!this.requests[group]) {\n                        this.requests[group] = this.generateRequestObject(group);\n                    }\n                    this.requestGroups.push(group);\n                }\n            }\n\n            if (this.requestGroups.length) {\n                this.handleRequests();\n            }\n\n            return !!this.generateGroups.length;\n        },\n\n        generateRequestObject: function (group) {\n            var scope = this,\n                groupSource = this.options.source[group];\n\n            var xhrObject = {\n                request: {\n                    url: groupSource.ajax.url || null,\n                    dataType: \"json\",\n                    beforeSend: function (jqXHR, options) {\n                        // Important to call .abort() in case of dynamic requests\n                        scope.xhr[group] = jqXHR;\n\n                        var beforeSend =\n                            scope.requests[group].callback.beforeSend ||\n                            groupSource.ajax.beforeSend;\n                        typeof beforeSend === \"function\" &&\n                        beforeSend.apply(null, arguments);\n                    }\n                },\n                callback: {\n                    beforeSend: null,\n                    done: null,\n                    fail: null,\n                    then: null,\n                    always: null\n                },\n                extra: {\n                    path: groupSource.ajax.path || null,\n                    group: group\n                },\n                validForGroup: [group]\n            };\n\n            if (typeof groupSource.ajax !== \"function\") {\n                if (groupSource.ajax instanceof Object) {\n                    xhrObject = this.extendXhrObject(xhrObject, groupSource.ajax);\n                }\n\n                if (Object.keys(this.options.source).length > 1) {\n                    for (var _group in this.requests) {\n                        if (!this.requests.hasOwnProperty(_group)) continue;\n                        if (this.requests[_group].isDuplicated) continue;\n\n                        if (\n                            xhrObject.request.url &&\n                            xhrObject.request.url === this.requests[_group].request.url\n                        ) {\n                            this.requests[_group].validForGroup.push(group);\n                            xhrObject.isDuplicated = true;\n                            delete xhrObject.validForGroup;\n                        }\n                    }\n                }\n            }\n\n            return xhrObject;\n        },\n\n        extendXhrObject: function (xhrObject, groupRequest) {\n            if (typeof groupRequest.callback === \"object\") {\n                xhrObject.callback = groupRequest.callback;\n                delete groupRequest.callback;\n            }\n\n            // #132 Fixed beforeSend when using a function as the request object\n            if (typeof groupRequest.beforeSend === \"function\") {\n                xhrObject.callback.beforeSend = groupRequest.beforeSend;\n                delete groupRequest.beforeSend;\n            }\n\n            // Fixes #105 Allow user to define their beforeSend function.\n            // Fixes #181 IE8 incompatibility\n            xhrObject.request = $.extend(true, xhrObject.request, groupRequest);\n\n            // JSONP needs a unique jsonpCallback to run concurrently\n            if (\n                xhrObject.request.dataType.toLowerCase() === \"jsonp\" && !xhrObject.request.jsonpCallback\n            ) {\n                xhrObject.request.jsonpCallback = \"callback_\" + xhrObject.extra.group;\n            }\n\n            return xhrObject;\n        },\n\n        handleRequests: function () {\n            var scope = this,\n                group,\n                requestsCount = this.requestGroups.length;\n\n            if (\n                this.helper.executeCallback.call(\n                    this,\n                    this.options.callback.onSendRequest,\n                    [this.node, this.query]\n                ) === false\n            ) {\n                return;\n            }\n\n            for (var i = 0, ii = this.requestGroups.length; i < ii; ++i) {\n                group = this.requestGroups[i];\n                if (this.requests[group].isDuplicated) continue;\n\n                (function (group, xhrObject) {\n                    if (typeof scope.options.source[group].ajax === \"function\") {\n                        var _groupRequest = scope.options.source[group].ajax.call(\n                            scope,\n                            scope.query\n                        );\n\n                        // Fixes #271 Data is cached inside the xhrObject\n                        xhrObject = scope.extendXhrObject(\n                            scope.generateRequestObject(group),\n                            typeof _groupRequest === \"object\" ? _groupRequest : {}\n                        );\n\n                        if (\n                            typeof xhrObject.request !== \"object\" || !xhrObject.request.url\n                        ) {\n                            // {debug}\n                            if (scope.options.debug) {\n                                _debug.log({\n                                    node: scope.selector,\n                                    function: \"handleRequests\",\n                                    message: 'Source function must return an object containing \".url\" key for group \"' +\n                                    group +\n                                    '\"'\n                                });\n                                _debug.print();\n                            }\n                            // {/debug}\n                            scope.populateSource([], group);\n                            return;\n                        }\n                        scope.requests[group] = xhrObject;\n                    }\n\n                    var _request,\n                        _isExtended = false, // Prevent the main request from being changed\n                        _groupData = {};\n\n                    if (~xhrObject.request.url.indexOf(\"{{query}}\")) {\n                        if (!_isExtended) {\n                            xhrObject = $.extend(true, {}, xhrObject);\n                            _isExtended = true;\n                        }\n                        // #184 Invalid encoded characters on dynamic requests for `{{query}}`\n                        xhrObject.request.url = xhrObject.request.url.replace(\n                            \"{{query}}\",\n                            encodeURIComponent(scope.query)\n                        );\n                    }\n\n                    if (xhrObject.request.data) {\n                        for (var i in xhrObject.request.data) {\n                            if (!xhrObject.request.data.hasOwnProperty(i)) continue;\n                            if (~String(xhrObject.request.data[i]).indexOf(\"{{query}}\")) {\n                                if (!_isExtended) {\n                                    xhrObject = $.extend(true, {}, xhrObject);\n                                    _isExtended = true;\n                                }\n                                // jQuery handles encodeURIComponent when the query is inside the data object\n                                xhrObject.request.data[i] = xhrObject.request.data[i].replace(\n                                    \"{{query}}\",\n                                    scope.query\n                                );\n                                break;\n                            }\n                        }\n                    }\n\n                    $.ajax(xhrObject.request)\n                        .done(function (data, textStatus, jqXHR) {\n                            var _group;\n\n                            for (\n                                var i = 0, ii = xhrObject.validForGroup.length;\n                                i < ii;\n                                i++\n                            ) {\n                                _group = xhrObject.validForGroup[i];\n                                _request = scope.requests[_group];\n\n                                if (_request.callback.done instanceof Function) {\n                                    _groupData[_group] = _request.callback.done.call(\n                                        scope,\n                                        data,\n                                        textStatus,\n                                        jqXHR\n                                    );\n\n                                    // {debug}\n                                    if (\n                                        !Array.isArray(_groupData[_group]) ||\n                                        typeof _groupData[_group] !== \"object\"\n                                    ) {\n                                        if (scope.options.debug) {\n                                            _debug.log({\n                                                node: scope.selector,\n                                                function: \"Ajax.callback.done()\",\n                                                message: \"Invalid returned data has to be an Array\"\n                                            });\n                                            _debug.print();\n                                        }\n                                    }\n                                    // {/debug}\n                                }\n                            }\n                        })\n                        .fail(function (jqXHR, textStatus, errorThrown) {\n                            for (\n                                var i = 0, ii = xhrObject.validForGroup.length;\n                                i < ii;\n                                i++\n                            ) {\n                                _request = scope.requests[xhrObject.validForGroup[i]];\n                                _request.callback.fail instanceof Function &&\n                                _request.callback.fail.call(\n                                    scope,\n                                    jqXHR,\n                                    textStatus,\n                                    errorThrown\n                                );\n                            }\n\n                            // {debug}\n                            if (scope.options.debug) {\n                                _debug.log({\n                                    node: scope.selector,\n                                    function: \"Ajax.callback.fail()\",\n                                    arguments: JSON.stringify(xhrObject.request),\n                                    message: textStatus\n                                });\n\n                                console.log(errorThrown);\n\n                                _debug.print();\n                            }\n                            // {/debug}\n                        })\n                        .always(function (data, textStatus, jqXHR) {\n                            var _group;\n                            for (\n                                var i = 0, ii = xhrObject.validForGroup.length;\n                                i < ii;\n                                i++\n                            ) {\n                                _group = xhrObject.validForGroup[i];\n                                _request = scope.requests[_group];\n                                _request.callback.always instanceof Function &&\n                                _request.callback.always.call(scope, data, textStatus, jqXHR);\n\n                                // #248, #303 Aborted requests would call populate with invalid data\n                                if (typeof jqXHR !== \"object\") return;\n\n                                // #265 Modified data from ajax.callback.done is not being registered (use of _groupData[_group])\n                                scope.populateSource(\n                                    (data !== null && typeof data.promise === \"function\" && []) ||\n                                    _groupData[_group] ||\n                                    data,\n                                    _request.extra.group,\n                                    _request.extra.path || _request.request.path\n                                );\n\n                                requestsCount -= 1;\n                                if (requestsCount === 0) {\n                                    scope.helper.executeCallback.call(\n                                        scope,\n                                        scope.options.callback.onReceiveRequest,\n                                        [scope.node, scope.query]\n                                    );\n                                }\n                            }\n                        })\n                        .then(function (jqXHR, textStatus) {\n                            for (\n                                var i = 0, ii = xhrObject.validForGroup.length;\n                                i < ii;\n                                i++\n                            ) {\n                                _request = scope.requests[xhrObject.validForGroup[i]];\n                                _request.callback.then instanceof Function &&\n                                _request.callback.then.call(scope, jqXHR, textStatus);\n                            }\n                        });\n                })(group, this.requests[group]);\n            }\n        },\n\n        /**\n         * Build the source groups to be cycled for matched results\n         *\n         * @param {Array} data Array of Strings or Array of Objects\n         * @param {String} group\n         * @param {String} [path]\n         * @return {*}\n         */\n        populateSource: function (data, group, path) {\n            var scope = this,\n                groupSource = this.options.source[group],\n                extraData = groupSource.ajax && groupSource.data;\n\n            if (path && typeof path === \"string\") {\n                data = this.helper.namespace.call(this, path, data);\n            }\n\n            if (typeof data === \"undefined\") {\n                // {debug}\n                if (this.options.debug) {\n                    _debug.log({\n                        node: this.selector,\n                        function: \"populateSource()\",\n                        arguments: path,\n                        message: \"Invalid data path.\"\n                    });\n\n                    _debug.print();\n                }\n                // {/debug}\n            }\n\n            if (!Array.isArray(data)) {\n                // {debug}\n                if (this.options.debug) {\n                    _debug.log({\n                        node: this.selector,\n                        function: \"populateSource()\",\n                        arguments: JSON.stringify({group: group}),\n                        message: \"Invalid data type, must be Array type.\"\n                    });\n                    _debug.print();\n                }\n                // {/debug}\n                data = [];\n            }\n\n            if (extraData) {\n                if (typeof extraData === \"function\") {\n                    extraData = extraData();\n                }\n\n                if (Array.isArray(extraData)) {\n                    data = data.concat(extraData);\n                } else {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"populateSource()\",\n                            arguments: JSON.stringify(extraData),\n                            message: \"WARNING - this.options.source.\" +\n                            group +\n                            \".data Must be an Array or a function that returns an Array.\"\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                }\n            }\n\n            var tmpObj,\n                display = groupSource.display\n                    ? groupSource.display[0] === \"compiled\"\n                        ? groupSource.display[1]\n                        : groupSource.display[0]\n                    : this.options.display[0] === \"compiled\"\n                        ? this.options.display[1]\n                        : this.options.display[0];\n\n            for (var i = 0, ii = data.length; i < ii; i++) {\n                if (data[i] === null || typeof data[i] === \"boolean\") {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"populateSource()\",\n                            message: \"WARNING - NULL/BOOLEAN value inside \" +\n                            group +\n                            \"! The data was skipped.\"\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                    continue;\n                }\n                if (typeof data[i] === \"string\") {\n                    tmpObj = {};\n                    tmpObj[display] = data[i];\n                    data[i] = tmpObj;\n                }\n                data[i].group = group;\n            }\n\n            if (!this.hasDynamicGroups && this.dropdownFilter.dynamic.length) {\n                var key,\n                    value,\n                    tmpValues = {};\n\n                for (var i = 0, ii = data.length; i < ii; i++) {\n                    for (\n                        var k = 0, kk = this.dropdownFilter.dynamic.length;\n                        k < kk;\n                        k++\n                    ) {\n                        key = this.dropdownFilter.dynamic[k].key;\n\n                        value = data[i][key];\n                        if (!value) continue;\n                        if (!this.dropdownFilter.dynamic[k].value) {\n                            this.dropdownFilter.dynamic[k].value = [];\n                        }\n                        if (!tmpValues[key]) {\n                            tmpValues[key] = [];\n                        }\n                        if (!~tmpValues[key].indexOf(value.toLowerCase())) {\n                            tmpValues[key].push(value.toLowerCase());\n                            this.dropdownFilter.dynamic[k].value.push(value);\n                        }\n                    }\n                }\n            }\n\n            if (this.options.correlativeTemplate) {\n                var template = groupSource.template || this.options.template,\n                    compiledTemplate = \"\";\n\n                if (typeof template === \"function\") {\n                    template = template.call(this, \"\", {});\n                }\n\n                if (!template) {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"populateSource()\",\n                            arguments: String(group),\n                            message: \"WARNING - this.options.correlativeTemplate is enabled but no template was found.\"\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                } else {\n                    // #109 correlativeTemplate can be an array of display keys instead of the complete template\n                    if (Array.isArray(this.options.correlativeTemplate)) {\n                        for (\n                            var i = 0, ii = this.options.correlativeTemplate.length;\n                            i < ii;\n                            i++\n                        ) {\n                            compiledTemplate +=\n                                \"{{\" + this.options.correlativeTemplate[i] + \"}} \";\n                        }\n                    } else {\n                        // Strip down the html tags, #351 if the template needs \"<>\" use html entities instead &#60;{{email}}&#62;\n                        compiledTemplate = template\n                            .replace(/<.+?>/g, \" \")\n                            .replace(/\\s{2,}/, \" \")\n                            .trim();\n                    }\n\n                    for (var i = 0, ii = data.length; i < ii; i++) {\n                        // Fix #351, convert htmlEntities from the template string\n                        data[i].compiled = $(\"<textarea />\")\n                            .html(\n                                compiledTemplate\n                                    .replace(/\\{\\{([\\w\\-\\.]+)(?:\\|(\\w+))?}}/g, function (match,\n                                                                                         index) {\n                                        return scope.helper.namespace.call(\n                                            scope,\n                                            index,\n                                            data[i],\n                                            \"get\",\n                                            \"\"\n                                        );\n                                    })\n                                    .trim()\n                            )\n                            .text();\n                    }\n\n                    if (groupSource.display) {\n                        if (!~groupSource.display.indexOf(\"compiled\")) {\n                            groupSource.display.unshift(\"compiled\");\n                        }\n                    } else if (!~this.options.display.indexOf(\"compiled\")) {\n                        this.options.display.unshift(\"compiled\");\n                    }\n                }\n            }\n\n            if (this.options.callback.onPopulateSource) {\n                data = this.helper.executeCallback.call(\n                    this,\n                    this.options.callback.onPopulateSource,\n                    [this.node, data, group, path]\n                );\n\n                // {debug}\n                if (this.options.debug) {\n                    if (!data || !Array.isArray(data)) {\n                        _debug.log({\n                            node: this.selector,\n                            function: \"callback.populateSource()\",\n                            message: 'callback.onPopulateSource must return the \"data\" parameter'\n                        });\n\n                        _debug.print();\n                    }\n                }\n                // {/debug}\n            }\n\n            // Save the data inside tmpSource to re-order once every requests are completed\n            this.tmpSource[group] = (Array.isArray(data) && data) || [];\n\n            var cache = this.options.source[group].cache,\n                compression = this.options.source[group].compression,\n                ttl = this.options.source[group].ttl || this.options.ttl;\n\n            if (\n                cache && !window[cache].getItem(\"TYPEAHEAD_\" + this.selector + \":\" + group)\n            ) {\n                if (this.options.callback.onCacheSave) {\n                    data = this.helper.executeCallback.call(\n                        this,\n                        this.options.callback.onCacheSave,\n                        [this.node, data, group, path]\n                    );\n\n                    // {debug}\n                    if (this.options.debug) {\n                        if (!data || !Array.isArray(data)) {\n                            _debug.log({\n                                node: this.selector,\n                                function: \"callback.populateSource()\",\n                                message: 'callback.onCacheSave must return the \"data\" parameter'\n                            });\n\n                            _debug.print();\n                        }\n                    }\n                    // {/debug}\n                }\n\n                var storage = JSON.stringify({\n                    data: data,\n                    ttl: new Date().getTime() + ttl\n                });\n\n                if (compression) {\n                    storage = LZString.compressToUTF16(storage);\n                }\n\n                window[cache].setItem(\n                    \"TYPEAHEAD_\" + this.selector + \":\" + group,\n                    storage\n                );\n            }\n\n            this.incrementGeneratedGroup();\n        },\n\n        incrementGeneratedGroup: function () {\n            this.generatedGroupCount++;\n            if (this.generatedGroupCount !== this.generateGroups.length) {\n                return;\n            }\n\n            this.xhr = {};\n\n            for (var i = 0, ii = this.generateGroups.length; i < ii; i++) {\n                this.source[this.generateGroups[i]] = this.tmpSource[\n                    this.generateGroups[i]\n                    ];\n            }\n\n            if (!this.hasDynamicGroups) {\n                this.buildDropdownItemLayout(\"dynamic\");\n            }\n\n            this.options.loadingAnimation && this.container.removeClass(\"loading\");\n            this.node.trigger(\"search\" + this.namespace);\n        },\n\n        /**\n         * Key Navigation\n         * tab 9: if option is enabled, blur Typeahead\n         * Up 38: select previous item, skip \"group\" item\n         * Down 40: select next item, skip \"group\" item\n         * Right 39: change charAt, if last char fill hint (if options is true)\n         * Esc 27: clears input (is not empty) / blur (if empty)\n         * Enter 13: Select item + submit search\n         *\n         * @param {Object} e Event object\n         * @returns {*}\n         */\n        navigate: function (e) {\n            this.helper.executeCallback.call(\n                this,\n                this.options.callback.onNavigateBefore,\n                [this.node, this.query, e]\n            );\n\n            if (e.keyCode === 27) {\n                // #166 Different browsers do not have the same behaviors by default, lets enforce what we want instead\n                e.preventDefault();\n                if (this.query.length) {\n                    this.resetInput();\n                    this.node.trigger(\"input\" + this.namespace, [e]);\n                } else {\n                    this.node.blur();\n                    this.hideLayout();\n                }\n                return;\n            }\n\n            if (!this.result.length) return;\n\n            var itemList = this.resultContainer\n                    .find(\".\" + this.options.selector.item)\n                    .not(\"[disabled]\"),\n                activeItem = itemList.filter(\".active\"),\n                activeItemIndex = activeItem[0] ? itemList.index(activeItem) : null,\n                activeDataIndex = activeItem[0] ? activeItem.attr(\"data-index\") : null,\n                newActiveItemIndex = null,\n                newActiveDataIndex = null;\n\n            this.clearActiveItem();\n\n            this.helper.executeCallback.call(this, this.options.callback.onLeave, [\n                this.node,\n                (activeItemIndex !== null && itemList.eq(activeItemIndex)) || undefined,\n                (activeDataIndex !== null && this.result[activeDataIndex]) || undefined,\n                e\n            ]);\n\n            if (e.keyCode === 13) {\n                // Chrome needs preventDefault else the input search event is triggered\n                e.preventDefault();\n                if (activeItem.length > 0) {\n                    // #311 When href is defined and \"enter\" is pressed, it needs to act as a \"clicked\" link\n                    if (activeItem.find(\"a:first\")[0].href === \"javascript:;\") {\n                        activeItem.find(\"a:first\").trigger(\"click\", e);\n                    } else {\n                        activeItem.find(\"a:first\")[0].click();\n                    }\n                } else {\n                    this.node\n                        .closest(\"form\")\n                        .trigger(\"submit\");\n                }\n                return;\n            }\n\n            if (e.keyCode === 39) {\n                if (activeItemIndex !== null) {\n                    itemList\n                        .eq(activeItemIndex)\n                        .find(\"a:first\")[0]\n                        .click();\n                } else if (\n                    this.options.hint &&\n                    this.hint.container.val() !== \"\" &&\n                    this.helper.getCaret(this.node[0]) >= this.query.length\n                ) {\n                    itemList\n                        .filter('[data-index=\"' + this.hintIndex + '\"]')\n                        .find(\"a:first\")[0]\n                        .click();\n                }\n                return;\n            }\n\n            // #284 Blur Typeahead when \"Tab\" key is pressed\n            // #326 Improve Up / Down / Tab navigation to have only 1 \"selected\" item\n            if (e.keyCode === 9) {\n                if (this.options.blurOnTab) {\n                    this.hideLayout();\n                } else {\n                    if (activeItem.length > 0) {\n                        if (activeItemIndex + 1 < itemList.length) {\n                            e.preventDefault();\n                            newActiveItemIndex = activeItemIndex + 1;\n                            this.addActiveItem(itemList.eq(newActiveItemIndex));\n                        } else {\n                            this.hideLayout();\n                        }\n                    } else {\n                        if (itemList.length) {\n                            e.preventDefault();\n                            newActiveItemIndex = 0;\n                            this.addActiveItem(itemList.first());\n                        } else {\n                            this.hideLayout();\n                        }\n                    }\n                }\n            } else if (e.keyCode === 38) {\n                e.preventDefault();\n\n                if (activeItem.length > 0) {\n                    if (activeItemIndex - 1 >= 0) {\n                        newActiveItemIndex = activeItemIndex - 1;\n                        this.addActiveItem(itemList.eq(newActiveItemIndex));\n                    }\n                } else if (itemList.length) {\n                    newActiveItemIndex = itemList.length - 1;\n                    this.addActiveItem(itemList.last());\n                }\n            } else if (e.keyCode === 40) {\n                e.preventDefault();\n\n                if (activeItem.length > 0) {\n                    if (activeItemIndex + 1 < itemList.length) {\n                        newActiveItemIndex = activeItemIndex + 1;\n                        this.addActiveItem(itemList.eq(newActiveItemIndex));\n                    }\n                } else if (itemList.length) {\n                    newActiveItemIndex = 0;\n                    this.addActiveItem(itemList.first());\n                }\n            }\n\n            newActiveDataIndex =\n                newActiveItemIndex !== null\n                    ? itemList.eq(newActiveItemIndex).attr(\"data-index\")\n                    : null;\n\n            this.helper.executeCallback.call(this, this.options.callback.onEnter, [\n                this.node,\n                (newActiveItemIndex !== null && itemList.eq(newActiveItemIndex)) ||\n                undefined,\n                (newActiveDataIndex !== null && this.result[newActiveDataIndex]) ||\n                undefined,\n                e\n            ]);\n\n            // #115 Prevent the input from changing when navigating (arrow up / down) the results\n            if (e.preventInputChange && ~[38, 40].indexOf(e.keyCode)) {\n                this.buildHintLayout(\n                    newActiveDataIndex !== null && newActiveDataIndex < this.result.length\n                        ? [this.result[newActiveDataIndex]]\n                        : null\n                );\n            }\n\n            if (this.options.hint && this.hint.container) {\n                this.hint.container.css(\n                    \"color\",\n                    e.preventInputChange\n                        ? this.hint.css.color\n                        : (newActiveDataIndex === null && this.hint.css.color) ||\n                        this.hint.container.css(\"background-color\") ||\n                        \"fff\"\n                );\n            }\n\n            var nodeValue =\n                newActiveDataIndex === null || e.preventInputChange\n                    ? this.rawQuery\n                    : this.getTemplateValue.call(this, this.result[newActiveDataIndex]);\n\n            this.node.val(nodeValue);\n            if (this.isContentEditable) {\n                this.node.text(nodeValue);\n            }\n\n            this.helper.executeCallback.call(\n                this,\n                this.options.callback.onNavigateAfter,\n                [\n                    this.node,\n                    itemList,\n                    (newActiveItemIndex !== null &&\n                    itemList.eq(newActiveItemIndex).find(\"a:first\")) ||\n                    undefined,\n                    (newActiveDataIndex !== null && this.result[newActiveDataIndex]) ||\n                    undefined,\n                    this.query,\n                    e\n                ]\n            );\n        },\n\n        getTemplateValue: function (item) {\n            if (!item) return;\n            var templateValue =\n                (item.group && this.options.source[item.group].templateValue) ||\n                this.options.templateValue;\n            if (typeof templateValue === \"function\") {\n                templateValue = templateValue.call(this);\n            }\n            if (!templateValue) {\n                return this.helper.namespace\n                    .call(this, item.matchedKey, item)\n                    .toString();\n            }\n            var scope = this;\n\n            return templateValue.replace(/\\{\\{([\\w\\-.]+)}}/gi, function (match, index) {\n                return scope.helper.namespace.call(scope, index, item, \"get\", \"\");\n            });\n        },\n\n        clearActiveItem: function () {\n            this.resultContainer\n                .find(\".\" + this.options.selector.item)\n                .removeClass(\"active\");\n        },\n\n        addActiveItem: function (item) {\n            item.addClass(\"active\");\n        },\n\n        searchResult: function () {\n            this.resetLayout();\n\n            if (\n                this.helper.executeCallback.call(this, this.options.callback.onSearch, [\n                    this.node,\n                    this.query\n                ]) === false\n            ) return;\n\n            if (\n                this.searchGroups.length && !(\n                    this.options.multiselect &&\n                    this.options.multiselect.limit &&\n                    this.items.length >= this.options.multiselect.limit\n                )\n            ) {\n                this.searchResultData();\n            }\n\n            this.helper.executeCallback.call(this, this.options.callback.onResult, [\n                this.node,\n                this.query,\n                this.result,\n                this.resultCount,\n                this.resultCountPerGroup\n            ]);\n\n            if (this.isDropdownEvent) {\n                this.helper.executeCallback.call(\n                    this,\n                    this.options.callback.onDropdownFilter,\n                    [this.node, this.query, this.filters.dropdown, this.result]\n                );\n                this.isDropdownEvent = false;\n            }\n        },\n\n        searchResultData: function () {\n            var scope = this,\n                group,\n                groupBy = this.groupBy,\n                groupReference = null,\n                item,\n                match,\n                comparedDisplay,\n                comparedQuery = this.query.toLowerCase(),\n                maxItem = this.options.maxItem,\n                maxItemPerGroup = this.options.maxItemPerGroup,\n                hasDynamicFilters =\n                    this.filters.dynamic && !this.helper.isEmpty(this.filters.dynamic),\n                displayKeys,\n                displayValue,\n                missingDisplayKey = {},\n                groupFilter,\n                groupFilterResult,\n                groupMatcher,\n                groupMatcherResult,\n                matcher =\n                    typeof this.options.matcher === \"function\" && this.options.matcher,\n                correlativeMatch,\n                correlativeQuery,\n                correlativeDisplay;\n\n            if (this.options.accent) {\n                comparedQuery = this.helper.removeAccent.call(this, comparedQuery);\n            }\n\n            for (var i = 0, ii = this.searchGroups.length; i < ii; ++i) {\n                group = this.searchGroups[i];\n\n                if (\n                    this.filters.dropdown &&\n                    this.filters.dropdown.key === \"group\" &&\n                    this.filters.dropdown.value !== group\n                )\n                    continue;\n\n                groupFilter =\n                    typeof this.options.source[group].filter !== \"undefined\"\n                        ? this.options.source[group].filter\n                        : this.options.filter;\n                groupMatcher =\n                    (typeof this.options.source[group].matcher === \"function\" &&\n                    this.options.source[group].matcher) ||\n                    matcher;\n\n                for (var k = 0, kk = this.source[group].length; k < kk; k++) {\n                    if (this.resultItemCount >= maxItem && !this.options.callback.onResult) break;\n                    if (hasDynamicFilters && !this.dynamicFilter.validate.apply(this, [this.source[group][k]])) continue;\n\n                    item = this.source[group][k];\n                    // Validation over null item\n                    if (item === null || typeof item === \"boolean\") continue;\n                    if (this.options.multiselect && !this.isMultiselectUniqueData(item)) continue;\n\n                    // dropdownFilter by custom groups\n                    if (\n                        this.filters.dropdown &&\n                        (item[this.filters.dropdown.key] || \"\").toLowerCase() !==\n                        (this.filters.dropdown.value || \"\").toLowerCase()\n                    ) {\n                        continue;\n                    }\n\n                    groupReference =\n                        groupBy === \"group\"\n                            ? group\n                            : item[groupBy] ? item[groupBy] : item.group;\n\n                    if (groupReference && !this.tmpResult[groupReference]) {\n                        this.tmpResult[groupReference] = [];\n                        this.resultCountPerGroup[groupReference] = 0;\n                    }\n\n                    if (maxItemPerGroup) {\n                        if (\n                            groupBy === \"group\" &&\n                            this.tmpResult[groupReference].length >= maxItemPerGroup && !this.options.callback.onResult\n                        ) {\n                            break;\n                        }\n                    }\n\n                    displayKeys = this.options.source[group].display || this.options.display;\n                    for (var v = 0, vv = displayKeys.length; v < vv; ++v) {\n                        // #286 option.filter: false shouldn't bother about the option.display keys\n                        if (groupFilter !== false) {\n                            // #183 Allow searching for deep source object keys\n                            displayValue = /\\./.test(displayKeys[v])\n                                ? this.helper.namespace.call(this, displayKeys[v], item)\n                                : item[displayKeys[v]];\n\n                            // #182 Continue looping if empty or undefined key\n                            if (typeof displayValue === \"undefined\" || displayValue === \"\") {\n                                // {debug}\n                                if (this.options.debug) {\n                                    missingDisplayKey[v] = {\n                                        display: displayKeys[v],\n                                        data: item\n                                    };\n                                }\n                                // {/debug}\n                                continue;\n                            }\n\n                            displayValue = this.helper.cleanStringFromScript(displayValue);\n                        }\n\n                        if (typeof groupFilter === \"function\") {\n                            groupFilterResult = groupFilter.call(this, item, displayValue);\n\n                            // return undefined to skip to next item\n                            // return false to attempt the matching function on the next displayKey\n                            // return true to add the item to the result list\n                            // return item object to modify the item and add it to the result list\n\n                            if (groupFilterResult === undefined) break;\n                            if (!groupFilterResult) continue;\n                            if (typeof groupFilterResult === \"object\") {\n                                item = groupFilterResult;\n                            }\n                        }\n\n                        if (~[undefined, true].indexOf(groupFilter)) {\n                            comparedDisplay = displayValue;\n                            comparedDisplay = comparedDisplay.toString().toLowerCase();\n\n                            if (this.options.accent) {\n                                comparedDisplay = this.helper.removeAccent.call(\n                                    this,\n                                    comparedDisplay\n                                );\n                            }\n\n                            match = comparedDisplay.indexOf(comparedQuery);\n\n                            if (\n                                this.options.correlativeTemplate &&\n                                displayKeys[v] === \"compiled\" &&\n                                match < 0 &&\n                                /\\s/.test(comparedQuery)\n                            ) {\n                                correlativeMatch = true;\n                                correlativeQuery = comparedQuery.split(\" \");\n                                correlativeDisplay = comparedDisplay;\n                                for (var x = 0, xx = correlativeQuery.length; x < xx; x++) {\n                                    if (correlativeQuery[x] === \"\") continue;\n                                    if (!~correlativeDisplay.indexOf(correlativeQuery[x])) {\n                                        correlativeMatch = false;\n                                        break;\n                                    }\n                                    correlativeDisplay = correlativeDisplay.replace(\n                                        correlativeQuery[x],\n                                        \"\"\n                                    );\n                                }\n                            }\n\n                            if (match < 0 && !correlativeMatch) continue;\n                            if (this.options.offset && match !== 0) continue;\n\n                            if (groupMatcher) {\n                                groupMatcherResult = groupMatcher.call(\n                                    this,\n                                    item,\n                                    displayValue\n                                );\n\n                                // return undefined to skip to next item\n                                // return false to attempt the matching function on the next displayKey\n                                // return true to add the item to the result list\n                                // return item object to modify the item and add it to the result list\n\n                                if (groupMatcherResult === undefined) break;\n                                if (!groupMatcherResult) continue;\n                                if (typeof groupMatcherResult === \"object\") {\n                                    item = groupMatcherResult;\n                                }\n                            }\n                        }\n\n                        this.resultCount++;\n                        this.resultCountPerGroup[groupReference]++;\n\n                        if (this.resultItemCount < maxItem) {\n                            if (\n                                maxItemPerGroup &&\n                                this.tmpResult[groupReference].length >= maxItemPerGroup\n                            ) {\n                                break;\n                            }\n\n                            this.tmpResult[groupReference].push(\n                                $.extend(true, {matchedKey: displayKeys[v]}, item)\n                            );\n                            this.resultItemCount++;\n                        }\n                        break;\n                    }\n\n                    if (!this.options.callback.onResult) {\n                        if (this.resultItemCount >= maxItem) {\n                            break;\n                        }\n                        if (\n                            maxItemPerGroup &&\n                            this.tmpResult[groupReference].length >= maxItemPerGroup\n                        ) {\n                            if (groupBy === \"group\") {\n                                break;\n                            }\n                        }\n                    }\n                }\n            }\n\n            // {debug}\n            if (this.options.debug) {\n                if (!this.helper.isEmpty(missingDisplayKey)) {\n                    _debug.log({\n                        node: this.selector,\n                        function: \"searchResult()\",\n                        arguments: JSON.stringify(missingDisplayKey),\n                        message: \"Missing keys for display, make sure options.display is set properly.\"\n                    });\n\n                    _debug.print();\n                }\n            }\n            // {/debug}\n\n            if (this.options.order) {\n                var displayKeys = [],\n                    displayKey;\n\n                for (var group in this.tmpResult) {\n                    if (!this.tmpResult.hasOwnProperty(group)) continue;\n                    for (var i = 0, ii = this.tmpResult[group].length; i < ii; i++) {\n                        displayKey =\n                            this.options.source[this.tmpResult[group][i].group].display ||\n                            this.options.display;\n                        if (!~displayKeys.indexOf(displayKey[0])) {\n                            displayKeys.push(displayKey[0]);\n                        }\n                    }\n                    this.tmpResult[group].sort(\n                        scope.helper.sort(\n                            displayKeys,\n                            scope.options.order === \"asc\",\n                            function (a) {\n                                return a.toString().toUpperCase();\n                            }\n                        )\n                    );\n                }\n            }\n\n            var concatResults = [],\n                groupOrder = [];\n\n            if (typeof this.options.groupOrder === \"function\") {\n                groupOrder = this.options.groupOrder.apply(this, [\n                    this.node,\n                    this.query,\n                    this.tmpResult,\n                    this.resultCount,\n                    this.resultCountPerGroup\n                ]);\n            } else if (Array.isArray(this.options.groupOrder)) {\n                groupOrder = this.options.groupOrder;\n            } else if (\n                typeof this.options.groupOrder === \"string\" && ~[\"asc\", \"desc\"].indexOf(this.options.groupOrder)\n            ) {\n                groupOrder = Object.keys(this.tmpResult).sort(\n                    scope.helper.sort([], scope.options.groupOrder === \"asc\", function (a) {\n                        return a.toString().toUpperCase();\n                    })\n                );\n            } else {\n                groupOrder = Object.keys(this.tmpResult);\n            }\n\n            for (var i = 0, ii = groupOrder.length; i < ii; i++) {\n                concatResults = concatResults.concat(this.tmpResult[groupOrder[i]] || []);\n            }\n\n            // #286 groupTemplate option was deleting group reference Array\n            this.groups = JSON.parse(JSON.stringify(groupOrder));\n\n            this.result = concatResults;\n        },\n\n        buildLayout: function () {\n            this.buildHtmlLayout();\n\n            this.buildBackdropLayout();\n\n            this.buildHintLayout();\n\n            if (this.options.callback.onLayoutBuiltBefore) {\n                this.helper.executeCallback.call(\n                    this,\n                    this.options.callback.onLayoutBuiltBefore,\n                    [this.node, this.query, this.result, this.resultHtml]\n                );\n            }\n\n            if (this.resultHtml instanceof $) {\n                this.resultContainer.html(this.resultHtml);\n            }\n\n            if (this.options.callback.onLayoutBuiltAfter) {\n                this.helper.executeCallback.call(\n                    this,\n                    this.options.callback.onLayoutBuiltAfter,\n                    [this.node, this.query, this.result]\n                );\n            }\n        },\n\n        buildHtmlLayout: function () {\n            // #150 Add the option to have no resultList but still perform the search and trigger the callbacks\n            if (this.options.resultContainer === false) return;\n\n            if (!this.resultContainer) {\n                this.resultContainer = $(\"<div/>\", {\n                    class: this.options.selector.result\n                });\n\n                this.container.append(this.resultContainer);\n            }\n\n            var emptyTemplate;\n            if (!this.result.length) {\n                if (\n                    this.options.multiselect &&\n                    this.options.multiselect.limit &&\n                    this.items.length >= this.options.multiselect.limit\n                ) {\n                    if (this.options.multiselect.limitTemplate) {\n                        emptyTemplate =\n                            typeof this.options.multiselect.limitTemplate === \"function\"\n                                ? this.options.multiselect.limitTemplate.call(this, this.query)\n                                : this.options.multiselect.limitTemplate.replace(\n                                    /\\{\\{query}}/gi,\n                                    $(\"<div>\")\n                                        .text(this.helper.cleanStringFromScript(this.query))\n                                        .html()\n                                );\n                    } else {\n                        emptyTemplate =\n                            \"Can't select more than \" + this.items.length + \" items.\";\n                    }\n                } else if (this.options.emptyTemplate && this.query !== \"\") {\n                    emptyTemplate =\n                        typeof this.options.emptyTemplate === \"function\"\n                            ? this.options.emptyTemplate.call(this, this.query)\n                            : this.options.emptyTemplate.replace(\n                                /\\{\\{query}}/gi,\n                                $(\"<div>\")\n                                    .text(this.helper.cleanStringFromScript(this.query))\n                                    .html()\n                            );\n                } else {\n                    return;\n                }\n            }\n\n            var _query = this.query.toLowerCase();\n            if (this.options.accent) {\n                _query = this.helper.removeAccent.call(this, _query);\n            }\n\n            var scope = this,\n                groupTemplate = this.groupTemplate || \"<ul></ul>\",\n                hasEmptyTemplate = false;\n\n            if (this.groupTemplate) {\n                groupTemplate = $(\n                    groupTemplate.replace(\n                        /<([^>]+)>\\{\\{(.+?)}}<\\/[^>]+>/g,\n                        function (match, tag, group, offset, string) {\n                            var template = \"\",\n                                groups = group === \"group\" ? scope.groups : [group];\n\n                            if (!scope.result.length) {\n                                if (hasEmptyTemplate === true) return \"\";\n                                hasEmptyTemplate = true;\n\n                                return (\n                                    \"<\" + tag + ' class=\"' + scope.options.selector.empty + '\">' + emptyTemplate + \"</\" + tag + \">\"\n                                );\n                            }\n\n                            for (var i = 0, ii = groups.length; i < ii; ++i) {\n                                template += \"<\" + tag + ' data-group-template=\"' + groups[i] + '\"><ul></ul></' + tag + \">\";\n                            }\n\n                            return template;\n                        }\n                    )\n                );\n            } else {\n                groupTemplate = $(groupTemplate);\n                if (!this.result.length) {\n                    groupTemplate.append(\n                        emptyTemplate instanceof $\n                            ? emptyTemplate\n                            : '<li class=\"' +\n                            scope.options.selector.empty +\n                            '\">' +\n                            emptyTemplate +\n                            \"</li>\"\n                    );\n                }\n            }\n\n            groupTemplate.addClass(\n                this.options.selector.list +\n                (this.helper.isEmpty(this.result) ? \" empty\" : \"\")\n            );\n\n            var _group,\n                _groupTemplate,\n                _item,\n                _href,\n                _liHtml,\n                _template,\n                _aHtml,\n                _display,\n                _displayKeys,\n                _displayValue,\n                _unusedGroups =\n                    (this.groupTemplate && this.result.length && scope.groups) || [],\n                _tmpIndexOf;\n\n            for (var i = 0, ii = this.result.length; i < ii; ++i) {\n                _item = this.result[i];\n                _group = _item.group;\n                _href =\n                    (!this.options.multiselect &&\n                    this.options.source[_item.group].href) ||\n                    this.options.href;\n                _display = [];\n                _displayKeys =\n                    this.options.source[_item.group].display || this.options.display;\n\n                if (this.options.group) {\n                    _group = _item[this.options.group.key];\n                    if (this.options.group.template) {\n                        if (typeof this.options.group.template === \"function\") {\n                            _groupTemplate = this.options.group.template.call(this, _item);\n                        } else if (typeof this.options.group.template === \"string\") {\n                            _groupTemplate = this.options.group.template.replace(\n                                /\\{\\{([\\w\\-\\.]+)}}/gi,\n                                function (match, index) {\n                                    return scope.helper.namespace.call(\n                                        scope,\n                                        index,\n                                        _item,\n                                        \"get\",\n                                        \"\"\n                                    );\n                                }\n                            );\n                        }\n                    }\n\n                    if (!groupTemplate.find('[data-search-group=\"' + _group + '\"]')[0]) {\n                        (this.groupTemplate\n                            ? groupTemplate.find('[data-group-template=\"' + _group + '\"] ul')\n                            : groupTemplate).append(\n                            $(\"<li/>\", {\n                                class: scope.options.selector.group,\n                                html: $(\"<a/>\", {\n                                    href: \"javascript:;\",\n                                    html: _groupTemplate || _group,\n                                    tabindex: -1\n                                }),\n                                \"data-search-group\": _group\n                            })\n                        );\n                    }\n                }\n\n                if (this.groupTemplate && _unusedGroups.length) {\n                    _tmpIndexOf = _unusedGroups.indexOf(_group || _item.group);\n                    if (~_tmpIndexOf) {\n                        _unusedGroups.splice(_tmpIndexOf, 1);\n                    }\n                }\n\n                _liHtml = $(\"<li/>\", {\n                    class: scope.options.selector.item + \" \" + scope.options.selector.group + \"-\" + this.helper.slugify.call(this, _group),\n                    disabled: _item.disabled ? true : false,\n                    \"data-group\": _group,\n                    \"data-index\": i,\n                    html: $(\"<a/>\", {\n                        href: _href && !_item.disabled\n                            ? (function (href, item) {\n                                return item.href = scope.generateHref.call(\n                                    scope,\n                                    href,\n                                    item\n                                );\n                            })(_href, _item)\n                            : \"javascript:;\",\n                        html: function () {\n                            _template =\n                                (_item.group && scope.options.source[_item.group].template) ||\n                                scope.options.template;\n\n                            if (_template) {\n                                if (typeof _template === \"function\") {\n                                    _template = _template.call(scope, scope.query, _item);\n                                }\n\n                                _aHtml = _template.replace(\n                                    /\\{\\{([^\\|}]+)(?:\\|([^}]+))*}}/gi,\n                                    function (match, index, options) {\n                                        var value = scope.helper.cleanStringFromScript(\n                                            String(\n                                                scope.helper.namespace.call(\n                                                    scope,\n                                                    index,\n                                                    _item,\n                                                    \"get\",\n                                                    \"\"\n                                                )\n                                            )\n                                        );\n\n                                        // #151 Slugify should be an option, not enforced\n                                        options = (options && options.split(\"|\")) || [];\n                                        if (~options.indexOf(\"slugify\")) {\n                                            value = scope.helper.slugify.call(scope, value);\n                                        }\n\n                                        if (!~options.indexOf(\"raw\")) {\n                                            if (\n                                                scope.options.highlight === true &&\n                                                _query && ~_displayKeys.indexOf(index)\n                                            ) {\n                                                value = scope.helper.highlight.call(\n                                                    scope,\n                                                    value,\n                                                    _query.split(\" \"),\n                                                    scope.options.accent\n                                                );\n                                            }\n                                        }\n                                        return value;\n                                    }\n                                );\n                            } else {\n                                for (var i = 0, ii = _displayKeys.length; i < ii; i++) {\n                                    _displayValue = /\\./.test(_displayKeys[i])\n                                        ? scope.helper.namespace.call(\n                                            scope,\n                                            _displayKeys[i],\n                                            _item,\n                                            \"get\",\n                                            \"\"\n                                        )\n                                        : _item[_displayKeys[i]];\n\n                                    if (\n                                        typeof _displayValue === \"undefined\" ||\n                                        _displayValue === \"\"\n                                    )\n                                        continue;\n\n                                    _display.push(_displayValue);\n                                }\n\n                                _aHtml =\n                                    '<span class=\"' +\n                                    scope.options.selector.display +\n                                    '\">' +\n                                    scope.helper.cleanStringFromScript(\n                                        String(_display.join(\" \"))\n                                    ) +\n                                    \"</span>\";\n                            }\n\n                            if (\n                                (scope.options.highlight === true && _query && !_template) ||\n                                scope.options.highlight === \"any\"\n                            ) {\n                                _aHtml = scope.helper.highlight.call(\n                                    scope,\n                                    _aHtml,\n                                    _query.split(\" \"),\n                                    scope.options.accent\n                                );\n                            }\n\n                            $(this).append(_aHtml);\n                        }\n                    })\n                });\n\n                (function (i, item, liHtml) {\n                    liHtml.on(\"click\", function (e, originalEvent) {\n                        if (item.disabled) {\n                            e.preventDefault();\n                            return;\n                        }\n\n                        // #208 - Attach \"keyboard Enter\" original event\n                        if (originalEvent && typeof originalEvent === \"object\") {\n                            e.originalEvent = originalEvent;\n                        }\n\n                        if (scope.options.mustSelectItem && scope.helper.isEmpty(item)) {\n                            e.preventDefault();\n                            return;\n                        }\n\n                        if (scope.options.multiselect) {\n                            scope.items.push(item);\n                            scope.comparedItems.push(scope.getMultiselectComparedData(item));\n                        } else {\n                            scope.item = item;\n                        }\n\n                        if (\n                            scope.helper.executeCallback.call(\n                                scope,\n                                scope.options.callback.onClickBefore,\n                                [scope.node, $(this), item, e]\n                            ) === false\n                        ) return;\n\n                        if (\n                            (e.originalEvent && e.originalEvent.defaultPrevented) ||\n                            e.isDefaultPrevented()\n                        ) return;\n\n                        var templateValue = scope.getTemplateValue.call(scope, item);\n\n                        if (scope.options.multiselect) {\n                            scope.query = scope.rawQuery = \"\";\n                            scope.addMultiselectItemLayout(templateValue);\n                        } else {\n                            scope.focusOnly = true;\n                            scope.query = scope.rawQuery = templateValue;\n                            if (scope.isContentEditable) {\n                                scope.node.text(scope.query);\n                                scope.helper.setCaretAtEnd(scope.node[0]);\n                            }\n                        }\n\n                        scope.hideLayout();\n\n                        scope.node\n                            .val(scope.query)\n                            .focus();\n\n                        scope.helper.executeCallback.call(\n                            scope,\n                            scope.options.callback.onClickAfter,\n                            [scope.node, $(this), item, e]\n                        );\n                    });\n                    liHtml.on(\"mouseenter\", function (e) {\n                        if (!item.disabled) {\n                            scope.clearActiveItem();\n                            scope.addActiveItem($(this));\n                        }\n                        scope.helper.executeCallback.call(\n                            scope,\n                            scope.options.callback.onEnter,\n                            [scope.node, $(this), item, e]\n                        );\n                    });\n                    liHtml.on(\"mouseleave\", function (e) {\n                        if (!item.disabled) {\n                            scope.clearActiveItem();\n                        }\n                        scope.helper.executeCallback.call(\n                            scope,\n                            scope.options.callback.onLeave,\n                            [scope.node, $(this), item, e]\n                        );\n                    });\n                })(i, _item, _liHtml);\n\n                (this.groupTemplate\n                    ? groupTemplate.find('[data-group-template=\"' + _group + '\"] ul')\n                    : groupTemplate).append(_liHtml);\n            }\n\n            if (this.result.length && _unusedGroups.length) {\n                for (var i = 0, ii = _unusedGroups.length; i < ii; ++i) {\n                    groupTemplate\n                        .find('[data-group-template=\"' + _unusedGroups[i] + '\"]')\n                        .remove();\n                }\n            }\n\n            this.resultHtml = groupTemplate;\n        },\n\n        generateHref: function (href, item) {\n            var scope = this;\n\n            if (typeof href === \"string\") {\n                href = href.replace(\n                    /\\{\\{([^\\|}]+)(?:\\|([^}]+))*}}/gi,\n                    function (match, index, options) {\n                        var value = scope.helper.namespace.call(\n                            scope,\n                            index,\n                            item,\n                            \"get\",\n                            \"\"\n                        );\n\n                        // #151 Slugify should be an option, not enforced\n                        options = (options && options.split(\"|\")) || [];\n                        if (~options.indexOf(\"slugify\")) {\n                            value = scope.helper.slugify.call(scope, value);\n                        }\n\n                        return value;\n                    }\n                );\n            } else if (typeof href === \"function\") {\n                href = href.call(this, item);\n            }\n\n            return href;\n        },\n\n        getMultiselectComparedData: function (item) {\n            var uniqueComparedItem = \"\";\n            if (Array.isArray(this.options.multiselect.matchOn)) {\n                for (\n                    var i = 0, ii = this.options.multiselect.matchOn.length;\n                    i < ii;\n                    ++i\n                ) {\n                    uniqueComparedItem +=\n                        typeof item[this.options.multiselect.matchOn[i]] !== \"undefined\"\n                            ? item[this.options.multiselect.matchOn[i]]\n                            : \"\";\n                }\n            } else {\n                var tmpItem = JSON.parse(JSON.stringify(item)),\n                    extraKeys = [\"group\", \"matchedKey\", \"compiled\", \"href\"];\n\n                for (var i = 0, ii = extraKeys.length; i < ii; ++i) {\n                    delete tmpItem[extraKeys[i]];\n                }\n                uniqueComparedItem = JSON.stringify(tmpItem);\n            }\n            return uniqueComparedItem;\n        },\n\n        buildBackdropLayout: function () {\n            if (!this.options.backdrop) return;\n\n            if (!this.backdrop.container) {\n                this.backdrop.css = $.extend(\n                    {\n                        opacity: 0.6,\n                        filter: \"alpha(opacity=60)\",\n                        position: \"fixed\",\n                        top: 0,\n                        right: 0,\n                        bottom: 0,\n                        left: 0,\n                        \"z-index\": 1040,\n                        \"background-color\": \"#000\"\n                    },\n                    this.options.backdrop\n                );\n\n                this.backdrop.container = $(\"<div/>\", {\n                    class: this.options.selector.backdrop,\n                    css: this.backdrop.css\n                }).insertAfter(this.container);\n            }\n            this.container.addClass(\"backdrop\").css({\n                \"z-index\": this.backdrop.css[\"z-index\"] + 1,\n                position: \"relative\"\n            });\n        },\n\n        buildHintLayout: function (result) {\n            if (!this.options.hint) return;\n            // #144 hint doesn't overlap with the input when the query is too long\n            if (this.node[0].scrollWidth > Math.ceil(this.node.innerWidth())) {\n                this.hint.container && this.hint.container.val(\"\");\n                return;\n            }\n\n            var scope = this,\n                hint = \"\",\n                result = result || this.result,\n                query = this.query.toLowerCase();\n\n            if (this.options.accent) {\n                query = this.helper.removeAccent.call(this, query);\n            }\n\n            this.hintIndex = null;\n\n            if (this.searchGroups.length) {\n                if (!this.hint.container) {\n                    this.hint.css = $.extend(\n                        {\n                            \"border-color\": \"transparent\",\n                            position: \"absolute\",\n                            top: 0,\n                            display: \"inline\",\n                            \"z-index\": -1,\n                            float: \"none\",\n                            color: \"silver\",\n                            \"box-shadow\": \"none\",\n                            cursor: \"default\",\n                            \"-webkit-user-select\": \"none\",\n                            \"-moz-user-select\": \"none\",\n                            \"-ms-user-select\": \"none\",\n                            \"user-select\": \"none\"\n                        },\n                        this.options.hint\n                    );\n\n                    this.hint.container = $(\"<\" + this.node[0].nodeName + \"/>\", {\n                        type: this.node.attr(\"type\"),\n                        class: this.node.attr(\"class\"),\n                        readonly: true,\n                        unselectable: \"on\",\n                        \"aria-hidden\": \"true\",\n                        tabindex: -1,\n                        click: function () {\n                            // IE8 Fix\n                            scope.node.focus();\n                        }\n                    })\n                        .addClass(this.options.selector.hint)\n                        .css(this.hint.css)\n                        .insertAfter(this.node);\n\n                    this.node.parent().css({\n                        position: \"relative\"\n                    });\n                }\n\n                this.hint.container.css(\"color\", this.hint.css.color);\n\n                // Do not display hint for empty query\n                if (query) {\n                    var _displayKeys, _group, _comparedValue;\n\n                    for (var i = 0, ii = result.length; i < ii; i++) {\n                        if (result[i].disabled) continue;\n\n                        _group = result[i].group;\n                        _displayKeys =\n                            this.options.source[_group].display || this.options.display;\n\n                        for (var k = 0, kk = _displayKeys.length; k < kk; k++) {\n                            _comparedValue = String(result[i][_displayKeys[k]]).toLowerCase();\n                            if (this.options.accent) {\n                                _comparedValue = this.helper.removeAccent.call(\n                                    this,\n                                    _comparedValue\n                                );\n                            }\n\n                            if (_comparedValue.indexOf(query) === 0) {\n                                hint = String(result[i][_displayKeys[k]]);\n                                this.hintIndex = i;\n                                break;\n                            }\n                        }\n                        if (this.hintIndex !== null) {\n                            break;\n                        }\n                    }\n                }\n\n                var hintValue =\n                    (hint.length > 0 &&\n                    this.rawQuery + hint.substring(this.query.length)) ||\n                    \"\";\n                this.hint.container.val(hintValue);\n\n                if (this.isContentEditable) {\n                    this.hint.container.text(hintValue);\n                }\n            }\n        },\n\n        buildDropdownLayout: function () {\n            if (!this.options.dropdownFilter) return;\n\n            var scope = this;\n\n            $(\"<span/>\", {\n                class: this.options.selector.filter,\n                html: function () {\n                    $(this).append(\n                        $(\"<button/>\", {\n                            type: \"button\",\n                            class: scope.options.selector.filterButton,\n                            style: \"display: none;\",\n                            click: function () {\n                                scope.container.toggleClass(\"filter\");\n\n                                var _ns = scope.namespace + \"-dropdown-filter\";\n\n                                $(\"html\").off(_ns);\n\n                                if (scope.container.hasClass(\"filter\")) {\n                                    $(\"html\").on(\"click\" + _ns + \" touchend\" + _ns, function (e) {\n                                        if (\n                                            ($(e.target).closest(\n                                                \".\" + scope.options.selector.filter\n                                            )[0] &&\n                                            $(e.target).closest(scope.container)[0]) ||\n                                            scope.hasDragged\n                                        )\n                                            return;\n                                        scope.container.removeClass(\"filter\");\n\n                                        $(\"html\").off(_ns);\n                                    });\n                                }\n                            }\n                        })\n                    );\n\n                    $(this).append(\n                        $(\"<ul/>\", {\n                            class: scope.options.selector.dropdown\n                        })\n                    );\n                }\n            }).insertAfter(scope.container.find(\".\" + scope.options.selector.query));\n        },\n\n        buildDropdownItemLayout: function (type) {\n            if (!this.options.dropdownFilter) return;\n\n            var scope = this,\n                template,\n                all =\n                    (typeof this.options.dropdownFilter === \"string\" &&\n                    this.options.dropdownFilter) ||\n                    \"All\",\n                ulScope = this.container.find(\".\" + this.options.selector.dropdown),\n                filter;\n\n            // Use regular groups defined in options.source\n            if (\n                type === \"static\" &&\n                (this.options.dropdownFilter === true ||\n                typeof this.options.dropdownFilter === \"string\")\n            ) {\n                this.dropdownFilter.static.push({\n                    key: \"group\",\n                    template: \"{{group}}\",\n                    all: all,\n                    value: Object.keys(this.options.source)\n                });\n            }\n\n            for (var i = 0, ii = this.dropdownFilter[type].length; i < ii; i++) {\n                filter = this.dropdownFilter[type][i];\n\n                if (!Array.isArray(filter.value)) {\n                    filter.value = [filter.value];\n                }\n\n                if (filter.all) {\n                    this.dropdownFilterAll = filter.all;\n                }\n\n                for (var k = 0, kk = filter.value.length; k <= kk; k++) {\n                    // Only add \"all\" at the last filter iteration\n                    if (k === kk && i !== ii - 1) {\n                        continue;\n                    } else if (k === kk && i === ii - 1) {\n                        if (type === \"static\" && this.dropdownFilter.dynamic.length) {\n                            continue;\n                        }\n                    }\n\n                    template = this.dropdownFilterAll || all;\n                    if (filter.value[k]) {\n                        if (filter.template) {\n                            template = filter.template.replace(\n                                new RegExp(\"{{\" + filter.key + \"}}\", \"gi\"),\n                                filter.value[k]\n                            );\n                        } else {\n                            template = filter.value[k];\n                        }\n                    } else {\n                        this.container\n                            .find(\".\" + scope.options.selector.filterButton)\n                            .html(template);\n                    }\n\n                    (function (k, filter, template) {\n                        ulScope.append(\n                            $(\"<li/>\", {\n                                class: scope.options.selector.dropdownItem +\n                                \" \" +\n                                scope.helper.slugify.call(\n                                    scope,\n                                    filter.key + \"-\" + (filter.value[k] || all)\n                                ),\n                                html: $(\"<a/>\", {\n                                    href: \"javascript:;\",\n                                    html: template,\n                                    click: function (e) {\n                                        e.preventDefault();\n                                        _selectFilter.call(scope, {\n                                            key: filter.key,\n                                            value: filter.value[k] || \"*\",\n                                            template: template\n                                        });\n                                    }\n                                })\n                            })\n                        );\n                    })(k, filter, template);\n                }\n            }\n\n            if (this.dropdownFilter[type].length) {\n                this.container\n                    .find(\".\" + scope.options.selector.filterButton)\n                    .removeAttr(\"style\");\n            }\n\n            /**\n             * @private\n             * Select the filter and rebuild the result group\n             *\n             * @param {object} item\n             */\n            function _selectFilter(item) {\n                if (item.value === \"*\") {\n                    delete this.filters.dropdown;\n                } else {\n                    this.filters.dropdown = item;\n                }\n\n                this.container\n                    .removeClass(\"filter\")\n                    .find(\".\" + this.options.selector.filterButton)\n                    .html(item.template);\n\n                this.isDropdownEvent = true;\n                this.node.trigger(\"search\" + this.namespace);\n\n                if (this.options.multiselect) {\n                    this.adjustInputSize();\n                }\n\n                this.node.focus();\n            }\n        },\n\n        dynamicFilter: {\n            isEnabled: false,\n            init: function () {\n                if (!this.options.dynamicFilter) return;\n\n                this.dynamicFilter.bind.call(this);\n                this.dynamicFilter.isEnabled = true;\n            },\n\n            validate: function (item) {\n                var isValid,\n                    softValid = null,\n                    hardValid = null,\n                    itemValue;\n\n                for (var key in this.filters.dynamic) {\n                    if (!this.filters.dynamic.hasOwnProperty(key)) continue;\n                    if (!!~key.indexOf(\".\")) {\n                        itemValue = this.helper.namespace.call(this, key, item, \"get\");\n                    } else {\n                        itemValue = item[key];\n                    }\n\n                    if (this.filters.dynamic[key].modifier === \"|\" && !softValid) {\n                        softValid = itemValue == this.filters.dynamic[key].value || false;\n                    }\n\n                    if (this.filters.dynamic[key].modifier === \"&\") {\n                        // Leaving \"==\" in case of comparing number with string\n                        if (itemValue == this.filters.dynamic[key].value) {\n                            hardValid = true;\n                        } else {\n                            hardValid = false;\n                            break;\n                        }\n                    }\n                }\n\n                isValid = softValid;\n                if (hardValid !== null) {\n                    isValid = hardValid;\n                    if (hardValid === true && softValid !== null) {\n                        isValid = softValid;\n                    }\n                }\n\n                return !!isValid;\n            },\n\n            set: function (key, value) {\n                var matches = key.match(/^([|&])?(.+)/);\n\n                if (!value) {\n                    delete this.filters.dynamic[matches[2]];\n                } else {\n                    this.filters.dynamic[matches[2]] = {\n                        modifier: matches[1] || \"|\",\n                        value: value\n                    };\n                }\n\n                if (this.dynamicFilter.isEnabled) {\n                    this.generateSource();\n                }\n            },\n            bind: function () {\n                var scope = this,\n                    filter;\n\n                for (var i = 0, ii = this.options.dynamicFilter.length; i < ii; i++) {\n                    filter = this.options.dynamicFilter[i];\n\n                    if (typeof filter.selector === \"string\") {\n                        filter.selector = $(filter.selector);\n                    }\n\n                    if (\n                        !(filter.selector instanceof $) || !filter.selector[0] || !filter.key\n                    ) {\n                        // {debug}\n                        if (this.options.debug) {\n                            _debug.log({\n                                node: this.selector,\n                                function: \"buildDynamicLayout()\",\n                                message: 'Invalid jQuery selector or jQuery Object for \"filter.selector\" or missing filter.key'\n                            });\n\n                            _debug.print();\n                        }\n                        // {/debug}\n                        continue;\n                    }\n\n                    (function (filter) {\n                        filter.selector\n                            .off(scope.namespace)\n                            .on(\"change\" + scope.namespace, function () {\n                                scope.dynamicFilter.set.apply(scope, [\n                                    filter.key,\n                                    scope.dynamicFilter.getValue(this)\n                                ]);\n                            })\n                            .trigger(\"change\" + scope.namespace);\n                    })(filter);\n                }\n            },\n\n            getValue: function (tag) {\n                var value;\n                if (tag.tagName === \"SELECT\") {\n                    value = tag.value;\n                } else if (tag.tagName === \"INPUT\") {\n                    if (tag.type === \"checkbox\") {\n                        value =\n                            (tag.checked && tag.getAttribute(\"value\")) || tag.checked || null;\n                    } else if (tag.type === \"radio\" && tag.checked) {\n                        value = tag.value;\n                    }\n                }\n                return value;\n            }\n        },\n\n        buildMultiselectLayout: function () {\n            if (!this.options.multiselect) return;\n            var scope = this;\n            var multiselectData;\n\n            this.label.container = $(\"<span/>\", {\n                class: this.options.selector.labelContainer,\n                \"data-padding-left\": parseFloat(this.node.css(\"padding-left\")) || 0,\n                \"data-padding-right\": parseFloat(this.node.css(\"padding-right\")) || 0,\n                \"data-padding-top\": parseFloat(this.node.css(\"padding-top\")) || 0,\n                click: function (e) {\n                    if ($(e.target).hasClass(scope.options.selector.labelContainer)) {\n                        scope.node.focus();\n                    }\n                }\n            });\n\n            this.node\n                .closest(\".\" + this.options.selector.query)\n                .prepend(this.label.container);\n\n            if (!this.options.multiselect.data) return;\n\n            if (Array.isArray(this.options.multiselect.data)) {\n                this.populateMultiselectData(this.options.multiselect.data);\n            } else if (typeof this.options.multiselect.data === 'function') {\n                multiselectData = this.options.multiselect.data.call(this);\n                if (Array.isArray(multiselectData)) {\n                    this.populateMultiselectData(multiselectData);\n                } else if (typeof multiselectData.promise === \"function\") {\n                    $.when(multiselectData).then(function (deferredData) {\n                        if (deferredData && Array.isArray(deferredData)) {\n                            scope.populateMultiselectData(deferredData);\n                        }\n                    });\n                }\n            }\n        },\n\n        isMultiselectUniqueData: function (data) {\n            var isUniqueData = true;\n            for (var x = 0, xx = this.comparedItems.length; x < xx; ++x) {\n                if (\n                    this.comparedItems[x] ===\n                    this.getMultiselectComparedData(data)\n                ) {\n                    isUniqueData = false;\n                    break;\n                }\n            }\n            return isUniqueData;\n        },\n\n        populateMultiselectData: function (data) {\n            for (var i = 0, ii = data.length; i < ii; ++i) {\n                if (!this.isMultiselectUniqueData(data[i])) continue;\n\n                this.items.push(data[i]);\n                this.comparedItems.push(\n                    this.getMultiselectComparedData(data[i])\n                );\n                this.addMultiselectItemLayout(\n                    this.getTemplateValue(data[i])\n                );\n            }\n\n            this.node.trigger(\"search\" + this.namespace, { origin: 'populateMultiselectData' });\n        },\n\n        addMultiselectItemLayout: function (templateValue) {\n            var scope = this,\n                htmlTag = this.options.multiselect.href ? \"a\" : \"span\";\n\n            var label = $(\"<span/>\", {\n                class: this.options.selector.label,\n                html: $(\"<\" + htmlTag + \"/>\", {\n                    text: templateValue,\n                    click: function (e) {\n                        var currentLabel = $(this).closest(\n                                \".\" + scope.options.selector.label\n                            ),\n                            index = scope.label.container\n                                .find(\".\" + scope.options.selector.label)\n                                .index(currentLabel);\n\n                        scope.options.multiselect.callback && scope.helper.executeCallback.call(\n                            scope,\n                            scope.options.multiselect.callback.onClick,\n                            [scope.node, scope.items[index], e]\n                        );\n                    },\n                    href: this.options.multiselect.href\n                        ? (function (item) {\n                            return scope.generateHref.call(\n                                scope,\n                                scope.options.multiselect.href,\n                                item\n                            );\n                        })(scope.items[scope.items.length - 1])\n                        : null\n                })\n            });\n\n            label.append(\n                $(\"<span/>\", {\n                    class: this.options.selector.cancelButton,\n                    html: \"×\",\n                    click: function (e) {\n                        var label = $(this).closest(\n                                \".\" + scope.options.selector.label\n                            ),\n                            index = scope.label.container\n                                .find(\".\" + scope.options.selector.label)\n                                .index(label);\n\n                        scope.cancelMultiselectItem(index, label, e);\n                    }\n                })\n            );\n\n            this.label.container.append(label);\n            this.adjustInputSize();\n        },\n\n        cancelMultiselectItem: function (index, label, e) {\n            var item = this.items[index];\n\n            label = label\n                || this.label.container\n                    .find('.' + this.options.selector.label)\n                    .eq(index);\n\n            label.remove();\n\n            this.items.splice(index, 1);\n            this.comparedItems.splice(index, 1);\n\n            this.options.multiselect.callback && this.helper.executeCallback.call(\n                this,\n                this.options.multiselect.callback.onCancel,\n                [this.node, item, e]\n            );\n\n            this.adjustInputSize();\n\n            this.focusOnly = true;\n            this.node.focus().trigger('input' + this.namespace, { origin: 'cancelMultiselectItem' });\n        },\n\n        adjustInputSize: function () {\n            var nodeWidth =\n                this.node[0].getBoundingClientRect().width -\n                (parseFloat(this.label.container.data(\"padding-right\")) || 0) -\n                (parseFloat(this.label.container.css(\"padding-left\")) || 0);\n\n            var labelOuterWidth = 0,\n                numberOfRows = 0,\n                currentRowWidth = 0,\n                isRowAdded = false,\n                labelOuterHeight = 0;\n\n            this.label.container\n                .find(\".\" + this.options.selector.label)\n                .filter(function (i, v) {\n                    if (i === 0) {\n                        labelOuterHeight =\n                            $(v)[0].getBoundingClientRect().height +\n                            parseFloat($(v).css(\"margin-bottom\") || 0);\n                    }\n\n                    // labelOuterWidth = Math.round($(v)[0].getBoundingClientRect().width * 100) / 100 + parseFloat($(v).css('margin-right'));\n                    labelOuterWidth =\n                        $(v)[0].getBoundingClientRect().width +\n                        parseFloat($(v).css(\"margin-right\") || 0);\n\n                    if (\n                        currentRowWidth + labelOuterWidth > nodeWidth * 0.7 && !isRowAdded\n                    ) {\n                        numberOfRows++;\n                        isRowAdded = true;\n                    }\n\n                    if (currentRowWidth + labelOuterWidth < nodeWidth) {\n                        currentRowWidth += labelOuterWidth;\n                    } else {\n                        isRowAdded = false;\n                        currentRowWidth = labelOuterWidth;\n                    }\n                });\n\n            var paddingLeft =\n                parseFloat(this.label.container.data(\"padding-left\") || 0) +\n                (isRowAdded ? 0 : currentRowWidth);\n            var paddingTop =\n                numberOfRows * labelOuterHeight +\n                parseFloat(this.label.container.data(\"padding-top\") || 0);\n\n            this.container\n                .find(\".\" + this.options.selector.query)\n                .find(\"input, textarea, [contenteditable], .typeahead__hint\")\n                .css({\n                    paddingLeft: paddingLeft,\n                    paddingTop: paddingTop\n                });\n        },\n\n        showLayout: function () {\n            if (this.container.hasClass(\"result\") ||\n                (\n                    !this.result.length && !this.options.emptyTemplate && !this.options.backdropOnFocus\n                )\n            ) return;\n\n            _addHtmlListeners.call(this);\n\n            this.container.addClass(\n                [\n                    this.result.length ||\n                    (this.searchGroups.length &&\n                    this.options.emptyTemplate &&\n                    this.query.length)\n                        ? \"result \"\n                        : \"\",\n                    this.options.hint && this.searchGroups.length ? \"hint\" : \"\",\n                    this.options.backdrop || this.options.backdropOnFocus\n                        ? \"backdrop\"\n                        : \"\"\n                ].join(\" \")\n            );\n\n            this.helper.executeCallback.call(\n                this,\n                this.options.callback.onShowLayout,\n                [this.node, this.query]\n            );\n\n            function _addHtmlListeners() {\n                var scope = this;\n\n                // If Typeahead is blured by pressing the \"Tab\" Key, hide the results\n                $(\"html\")\n                    .off(\"keydown\" + this.namespace)\n                    .on(\"keydown\" + this.namespace, function (e) {\n                        if (!e.keyCode || e.keyCode !== 9) return;\n                        setTimeout(function () {\n                            if (\n                                !$(\":focus\")\n                                    .closest(scope.container)\n                                    .find(scope.node)[0]\n                            ) {\n                                scope.hideLayout();\n                            }\n                        }, 0);\n                    });\n\n                // If Typeahead is blured by clicking outside, hide the results\n                $(\"html\")\n                    .off(\"click\" + this.namespace + \" touchend\" + this.namespace)\n                    .on(\"click\" + this.namespace + \" touchend\" + this.namespace, function (e) {\n                        if ($(e.target).closest(scope.container)[0] ||\n                            $(e.target).closest('.' + scope.options.selector.item)[0] ||\n                            e.target.className === scope.options.selector.cancelButton ||\n                            scope.hasDragged\n                        ) return;\n\n                        scope.hideLayout();\n                    });\n            }\n        },\n\n        hideLayout: function () {\n            // Means the container is already hidden\n            if (!this.container.hasClass(\"result\") && !this.container.hasClass(\"backdrop\")) return;\n\n            this.container.removeClass(\n                \"result hint filter\" +\n                (this.options.backdropOnFocus && $(this.node).is(\":focus\")\n                    ? \"\"\n                    : \" backdrop\")\n            );\n\n            if (this.options.backdropOnFocus && this.container.hasClass(\"backdrop\"))\n                return;\n\n            // Make sure the event HTML gets cleared\n            $(\"html\").off(this.namespace);\n\n            this.helper.executeCallback.call(\n                this,\n                this.options.callback.onHideLayout,\n                [this.node, this.query]\n            );\n        },\n\n        resetLayout: function () {\n            this.result = [];\n            this.tmpResult = {};\n            this.groups = [];\n            this.resultCount = 0;\n            this.resultCountPerGroup = {};\n            this.resultItemCount = 0;\n            this.resultHtml = null;\n\n            if (this.options.hint && this.hint.container) {\n                this.hint.container.val(\"\");\n                if (this.isContentEditable) {\n                    this.hint.container.text(\"\");\n                }\n            }\n        },\n\n        resetInput: function () {\n            this.node.val(\"\");\n            if (this.isContentEditable) {\n                this.node.text(\"\");\n            }\n            this.item = null;\n            this.query = \"\";\n            this.rawQuery = \"\";\n        },\n\n        buildCancelButtonLayout: function () {\n            if (!this.options.cancelButton) return;\n            var scope = this;\n\n            $(\"<span/>\", {\n                class: this.options.selector.cancelButton,\n                html: \"×\",\n                mousedown: function (e) {\n                    // Don't blur the input\n                    e.stopImmediatePropagation();\n                    e.preventDefault();\n\n                    scope.resetInput();\n                    scope.node.trigger(\"input\" + scope.namespace, [e]);\n                }\n            }).insertBefore(this.node);\n        },\n\n        toggleCancelButtonVisibility: function () {\n            this.container.toggleClass(\"cancel\", !!this.query.length);\n        },\n\n        __construct: function () {\n            this.extendOptions();\n\n            if (!this.unifySourceFormat()) {\n                return;\n            }\n\n            this.dynamicFilter.init.apply(this);\n\n            this.init();\n            this.buildDropdownLayout();\n            this.buildDropdownItemLayout(\"static\");\n\n            this.buildMultiselectLayout();\n\n            this.delegateEvents();\n            this.buildCancelButtonLayout();\n\n            this.helper.executeCallback.call(this, this.options.callback.onReady, [\n                this.node\n            ]);\n        },\n\n        helper: {\n            isEmpty: function (obj) {\n                for (var prop in obj) {\n                    if (obj.hasOwnProperty(prop)) return false;\n                }\n\n                return true;\n            },\n\n            /**\n             * Remove every accent(s) from a string\n             *\n             * @param {String} string\n             * @returns {*}\n             */\n            removeAccent: function (string) {\n                if (typeof string !== \"string\") {\n                    return;\n                }\n\n                var accent = _accent;\n\n                if (typeof this.options.accent === \"object\") {\n                    accent = this.options.accent;\n                }\n\n                string = string\n                    .toLowerCase()\n                    .replace(new RegExp(\"[\" + accent.from + \"]\", \"g\"), function (match) {\n                        return accent.to[accent.from.indexOf(match)];\n                    });\n\n                return string;\n            },\n\n            /**\n             * Creates a valid url from string\n             *\n             * @param {String} string\n             * @returns {string}\n             */\n            slugify: function (string) {\n                string = String(string);\n\n                if (string !== \"\") {\n                    string = this.helper.removeAccent.call(this, string);\n                    string = string\n                        .replace(/[^-a-z0-9]+/g, \"-\")\n                        .replace(/-+/g, \"-\")\n                        .replace(/^-|-$/g, \"\");\n                }\n\n                return string;\n            },\n\n            /**\n             * Sort list of object by key\n             *\n             * @param {String|Array} field\n             * @param {Boolean} reverse\n             * @param {Function} primer\n             * @returns {Function}\n             */\n            sort: function (field, reverse, primer) {\n                var key = function (x) {\n                    for (var i = 0, ii = field.length; i < ii; i++) {\n                        if (typeof x[field[i]] !== \"undefined\") {\n                            return primer(x[field[i]]);\n                        }\n                    }\n                    return x;\n                };\n\n                reverse = [-1, 1][+!!reverse];\n\n                return function (a, b) {\n                    return (a = key(a)), (b = key(b)), reverse * ((a > b) - (b > a));\n                };\n            },\n\n            /**\n             * Replace a string from-to index\n             *\n             * @param {String} string The complete string to replace into\n             * @param {Number} offset The cursor position to start replacing from\n             * @param {Number} length The length of the replacing string\n             * @param {String} replace The replacing string\n             * @returns {String}\n             */\n            replaceAt: function (string, offset, length, replace) {\n                return (\n                    string.substring(0, offset) +\n                    replace +\n                    string.substring(offset + length)\n                );\n            },\n\n            /**\n             * Adds <strong> html around a matched string\n             *\n             * @param {String} string The complete string to match from\n             * @param {String} key\n             * @param {Boolean} [accents]\n             * @returns {*}\n             */\n            highlight: function (string, keys, accents) {\n                string = String(string);\n\n                var searchString =\n                        (accents && this.helper.removeAccent.call(this, string)) || string,\n                    matches = [];\n\n                if (!Array.isArray(keys)) {\n                    keys = [keys];\n                }\n\n                keys.sort(function (a, b) {\n                    return b.length - a.length;\n                });\n\n                // Make sure the '|' join will be safe!\n                for (var i = keys.length - 1; i >= 0; i--) {\n                    if (keys[i].trim() === \"\") {\n                        keys.splice(i, 1);\n                        continue;\n                    }\n                    keys[i] = keys[i].replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n                }\n\n                searchString.replace(\n                    new RegExp(\"(?:\" + keys.join(\"|\") + \")(?!([^<]+)?>)\", \"gi\"),\n                    function (match, index, offset) {\n                        matches.push({\n                            offset: offset,\n                            length: match.length\n                        });\n                    }\n                );\n\n                for (var i = matches.length - 1; i >= 0; i--) {\n                    string = this.helper.replaceAt(\n                        string,\n                        matches[i].offset,\n                        matches[i].length,\n                        \"<strong>\" +\n                        string.substr(matches[i].offset, matches[i].length) +\n                        \"</strong>\"\n                    );\n                }\n\n                return string;\n            },\n\n            /**\n             * Get caret position, used for right arrow navigation\n             * when hint option is enabled\n             * @param {Node} element\n             * @returns {Number} Caret position\n             */\n            getCaret: function (element) {\n                var caretPos = 0;\n\n                if (element.selectionStart) {\n                    // Input & Textarea\n                    return element.selectionStart;\n                } else if (document.selection) {\n                    var r = document.selection.createRange();\n                    if (r === null) {\n                        return caretPos;\n                    }\n\n                    var re = element.createTextRange(),\n                        rc = re.duplicate();\n                    re.moveToBookmark(r.getBookmark());\n                    rc.setEndPoint(\"EndToStart\", re);\n\n                    caretPos = rc.text.length;\n                } else if (window.getSelection) {\n                    // Contenteditable\n                    var sel = window.getSelection();\n                    if (sel.rangeCount) {\n                        var range = sel.getRangeAt(0);\n                        if (range.commonAncestorContainer.parentNode == element) {\n                            caretPos = range.endOffset;\n                        }\n                    }\n                }\n                return caretPos;\n            },\n\n            /**\n             * For [contenteditable] typeahead node only,\n             * when an item is clicked set the cursor at the end\n             * @param {Node} element\n             */\n            setCaretAtEnd: function (element) {\n                if (\n                    typeof window.getSelection !== \"undefined\" &&\n                    typeof document.createRange !== \"undefined\"\n                ) {\n                    var range = document.createRange();\n                    range.selectNodeContents(element);\n                    range.collapse(false);\n                    var sel = window.getSelection();\n                    sel.removeAllRanges();\n                    sel.addRange(range);\n                } else if (typeof document.body.createTextRange !== \"undefined\") {\n                    var textRange = document.body.createTextRange();\n                    textRange.moveToElementText(element);\n                    textRange.collapse(false);\n                    textRange.select();\n                }\n            },\n\n            /**\n             * Clean strings from possible XSS (script and iframe tags)\n             * @param string\n             * @returns {string}\n             */\n            cleanStringFromScript: function (string) {\n                return (\n                    (typeof string === \"string\" &&\n                    string.replace(/<\\/?(?:script|iframe)\\b[^>]*>/gm, \"\")) ||\n                    string\n                );\n            },\n\n            /**\n             * Executes an anonymous function or a string reached from the window scope.\n             *\n             * @example\n             * Note: These examples works with every configuration callbacks\n             *\n             * // An anonymous function inside the \"onInit\" option\n             * onInit: function() { console.log(':D'); };\n             *\n             * // myFunction() located on window.coucou scope\n             * onInit: 'window.coucou.myFunction'\n             *\n             * // myFunction(a,b) located on window.coucou scope passing 2 parameters\n             * onInit: ['window.coucou.myFunction', [':D', ':)']];\n             *\n             * // Anonymous function to execute a local function\n             * onInit: function () { myFunction(':D'); }\n             *\n             * @param {String|Array} callback The function to be called\n             * @param {Array} [extraParams] In some cases the function can be called with Extra parameters (onError)\n             * @returns {*}\n             */\n            executeCallback: function (callback, extraParams) {\n                if (!callback) {\n                    return;\n                }\n\n                var _callback;\n\n                if (typeof callback === \"function\") {\n                    _callback = callback;\n                } else if (typeof callback === \"string\" || Array.isArray(callback)) {\n                    if (typeof callback === \"string\") {\n                        callback = [callback, []];\n                    }\n\n                    _callback = this.helper.namespace.call(this, callback[0], window);\n\n                    if (typeof _callback !== \"function\") {\n                        // {debug}\n                        if (this.options.debug) {\n                            _debug.log({\n                                node: this.selector,\n                                function: \"executeCallback()\",\n                                arguments: JSON.stringify(callback),\n                                message: 'WARNING - Invalid callback function\"'\n                            });\n\n                            _debug.print();\n                        }\n                        // {/debug}\n                        return;\n                    }\n                }\n\n                return _callback.apply(\n                    this,\n                    (callback[1] || []).concat(extraParams ? extraParams : [])\n                );\n            },\n\n            namespace: function (string, object, method, defaultValue) {\n                if (typeof string !== \"string\" || string === \"\") {\n                    // {debug}\n                    if (this.options.debug) {\n                        _debug.log({\n                            node: this.options.input || this.selector,\n                            function: \"helper.namespace()\",\n                            arguments: string,\n                            message: 'ERROR - Missing string\"'\n                        });\n\n                        _debug.print();\n                    }\n                    // {/debug}\n                    return false;\n                }\n\n                var value = typeof defaultValue !== \"undefined\"\n                    ? defaultValue\n                    : undefined;\n\n                // Exit before looping if the string doesn't contain an object reference\n                if (!~string.indexOf(\".\")) {\n                    return object[string] || value;\n                }\n\n                var parts = string.split(\".\"),\n                    parent = object || window,\n                    method = method || \"get\",\n                    currentPart = \"\";\n\n                for (var i = 0, length = parts.length; i < length; i++) {\n                    currentPart = parts[i];\n\n                    if (typeof parent[currentPart] === \"undefined\") {\n                        if (~[\"get\", \"delete\"].indexOf(method)) {\n                            return typeof defaultValue !== \"undefined\"\n                                ? defaultValue\n                                : undefined;\n                        }\n                        parent[currentPart] = {};\n                    }\n\n                    if (~[\"set\", \"create\", \"delete\"].indexOf(method)) {\n                        if (i === length - 1) {\n                            if (method === \"set\" || method === \"create\") {\n                                parent[currentPart] = value;\n                            } else {\n                                delete parent[currentPart];\n                                return true;\n                            }\n                        }\n                    }\n\n                    parent = parent[currentPart];\n                }\n                return parent;\n            },\n\n            typeWatch: (function () {\n                var timer = 0;\n                return function (callback, ms) {\n                    clearTimeout(timer);\n                    timer = setTimeout(callback, ms);\n                };\n            })()\n        }\n    };\n\n    /**\n     * @public\n     * Implement Typeahead on the selected input node.\n     *\n     * @param {Object} options\n     * @return {Object} Modified DOM element\n     */\n    $.fn.typeahead = $.typeahead = function (options) {\n        return _api.typeahead(this, options);\n    };\n\n    /**\n     * @private\n     * API to handles Typeahead methods via jQuery.\n     */\n    var _api = {\n        /**\n         * Enable Typeahead\n         *\n         * @param {Object} node\n         * @param {Object} options\n         * @returns {*}\n         */\n        typeahead: function (node, options) {\n            if (!options || !options.source || typeof options.source !== \"object\") {\n                // {debug}\n                _debug.log({\n                    node: node.selector || (options && options.input),\n                    function: \"$.typeahead()\",\n                    arguments: JSON.stringify((options && options.source) || \"\"),\n                    message: 'Undefined \"options\" or \"options.source\" or invalid source type - Typeahead dropped'\n                });\n\n                _debug.print();\n                // {/debug}\n\n                return;\n            }\n\n            if (typeof node === \"function\") {\n                if (!options.input) {\n                    // {debug}\n                    _debug.log({\n                        node: node.selector,\n                        function: \"$.typeahead()\",\n                        //'arguments': JSON.stringify(options),\n                        message: 'Undefined \"options.input\" - Typeahead dropped'\n                    });\n\n                    _debug.print();\n                    // {/debug}\n\n                    return;\n                }\n\n                node = $(options.input);\n            }\n            if (typeof node[0].value === \"undefined\") {\n                node[0].value = node.text();\n            }\n            if (!node.length) {\n                // {debug}\n                _debug.log({\n                    node: node.selector,\n                    function: \"$.typeahead()\",\n                    arguments: JSON.stringify(options.input),\n                    message: \"Unable to find jQuery input element - Typeahead dropped\"\n                });\n\n                _debug.print();\n                // {/debug}\n\n                return;\n            }\n\n            // #270 Forcing node.selector, the property was deleted from jQuery3\n            // In case of multiple init, each of the instances needs it's own selector!\n            if (node.length === 1) {\n                node[0].selector =\n                    node.selector || options.input || node[0].nodeName.toLowerCase();\n\n                /*jshint boss:true */\n                return (window.Typeahead[node[0].selector] = new Typeahead(node, options));\n            } else {\n                var instances = {},\n                    instanceName;\n\n                for (var i = 0, ii = node.length; i < ii; ++i) {\n                    instanceName = node[i].nodeName.toLowerCase();\n                    if (typeof instances[instanceName] !== \"undefined\") {\n                        instanceName += i;\n                    }\n                    node[i].selector = instanceName;\n\n                    window.Typeahead[instanceName] = instances[instanceName] = new Typeahead(node.eq(i), options);\n                }\n\n                return instances;\n            }\n        }\n    };\n\n    // {debug}\n    var _debug = {\n        table: {},\n        log: function (debugObject) {\n            if (!debugObject.message || typeof debugObject.message !== \"string\") {\n                return;\n            }\n\n            this.table[debugObject.message] = $.extend(\n                {\n                    node: \"\",\n                    function: \"\",\n                    arguments: \"\"\n                },\n                debugObject\n            );\n        },\n        print: function () {\n            if (\n                Typeahead.prototype.helper.isEmpty(this.table) || !console || !console.table\n            ) {\n                return;\n            }\n\n            if (console.group !== undefined || console.table !== undefined) {\n                console.groupCollapsed(\"--- jQuery Typeahead Debug ---\");\n                console.table(this.table);\n                console.groupEnd();\n            }\n\n            this.table = {};\n        }\n    };\n    _debug.log({\n        message: \"WARNING - You are using the DEBUG version. Use /dist/jquery.typeahead.min.js in production.\"\n    });\n\n    _debug.print();\n    // {/debug}\n\n    // IE8 Shims\n    window.console = window.console || {\n            log: function () {\n            }\n        };\n\n    if (!Array.isArray) {\n        Array.isArray = function (arg) {\n            return Object.prototype.toString.call(arg) === \"[object Array]\";\n        };\n    }\n\n    if (!(\"trim\" in String.prototype)) {\n        String.prototype.trim = function () {\n            return this.replace(/^\\s+/, \"\").replace(/\\s+$/, \"\");\n        };\n    }\n    if (!(\"indexOf\" in Array.prototype)) {\n        Array.prototype.indexOf = function (find, i /*opt*/) {\n            if (i === undefined) i = 0;\n            if (i < 0) i += this.length;\n            if (i < 0) i = 0;\n            for (var n = this.length; i < n; i++)\n                if (i in this && this[i] === find) return i;\n            return -1;\n        };\n    }\n    if (!Object.keys) {\n        Object.keys = function (obj) {\n            var keys = [],\n                k;\n            for (k in obj) {\n                if (Object.prototype.hasOwnProperty.call(obj, k)) {\n                    keys.push(k);\n                }\n            }\n            return keys;\n        };\n    }\n\n    return Typeahead;\n});\n\ndefine(\"typeahead\", [\"jquery\"], (function (global) {\n    return function () {\n        var ret, fn;\n        return ret || global.typeahead;\n    };\n}(this)));\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/quickhelp',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog',\n    'underscore'\n], function($, utils, i18n, dialog, _) {\n    \"use strict\";\n\n    var platform = utils.platform;\n\n    var QuickHelp = function (options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance\n         *          keyboard_manager: KeyboardManager instance\n         *          notebook: Notebook instance\n         */\n        this.keyboard_manager = options.keyboard_manager;\n        this.notebook = options.notebook;\n        this.keyboard_manager.quick_help = this;\n        this.events = options.events;\n    };\n\n    var cmd_ctrl = 'Ctrl-';\n    var platform_specific;\n\n    if (platform === 'MacOS') {\n        // Mac OS X specific\n        cmd_ctrl = 'Cmd-';\n        platform_specific = [\n            { shortcut: \"Cmd-Up\", help:i18n.msg._(\"go to cell start\") },\n            { shortcut: \"Cmd-Down\", help:i18n.msg._(\"go to cell end\") },\n            { shortcut: \"Alt-Left\", help:i18n.msg._(\"go one word left\") },\n            { shortcut: \"Alt-Right\", help:i18n.msg._(\"go one word right\") },\n            { shortcut: \"Alt-Backspace\", help:i18n.msg._(\"delete word before\") },\n            { shortcut: \"Alt-Delete\", help:i18n.msg._(\"delete word after\") },\n            { shortcut: \"Cmd-Shift-z\", help:i18n.msg._(\"redo\") },\n            { shortcut: \"Cmd-Shift-u\", help:i18n.msg._(\"redo selection\") },\n            { shortcut: \"Ctrl-k\", help:i18n.msg._(\"emacs-style line kill\") },\n            { shortcut: \"Cmd-Backspace\", help:i18n.msg._(\"delete line left of cursor\") },\n            { shortcut: \"Cmd-Delete\", help:i18n.msg._(\"delete line right of cursor\") }\n        ];\n    } else {\n        // PC specific\n        platform_specific = [\n            { shortcut: \"Ctrl-Home\", help:i18n.msg._(\"go to cell start\") },\n            { shortcut: \"Ctrl-Up\", help:i18n.msg._(\"go to cell start\") },\n            { shortcut: \"Ctrl-End\", help:i18n.msg._(\"go to cell end\") },\n            { shortcut: \"Ctrl-Down\", help:i18n.msg._(\"go to cell end\") },\n            { shortcut: \"Ctrl-Left\", help:i18n.msg._(\"go one word left\") },\n            { shortcut: \"Ctrl-Right\", help:i18n.msg._(\"go one word right\") },\n            { shortcut: \"Ctrl-Backspace\", help:i18n.msg._(\"delete word before\")},\n            { shortcut: \"Ctrl-Delete\", help:i18n.msg._(\"delete word after\")},\n            { shortcut: \"Ctrl-y\", help:i18n.msg._(\"redo\")},\n            { shortcut: \"Alt-u\", help:i18n.msg._(\"redo selection\") }\n        ];\n    }\n\n    var cm_shortcuts = [\n        { shortcut:\"Tab\", help:i18n.msg._(\"code completion or indent\") },\n        { shortcut:\"Shift-Tab\", help:i18n.msg._(\"tooltip\") },\n        { shortcut: cmd_ctrl + \"]\", help:i18n.msg._(\"indent\") },\n        { shortcut: cmd_ctrl + \"[\", help:i18n.msg._(\"dedent\") },\n        { shortcut: cmd_ctrl + \"a\", help:i18n.msg._(\"select all\") },\n        { shortcut: cmd_ctrl + \"z\", help:i18n.msg._(\"undo\") },\n        { shortcut: cmd_ctrl + \"/\", help:i18n.msg._(\"comment\") },\n        { shortcut: cmd_ctrl + \"d\", help:i18n.msg._(\"delete whole line\") },\n        { shortcut: cmd_ctrl + \"u\", help:i18n.msg._(\"undo selection\") },\n        { shortcut: \"Insert\", help:i18n.msg._(\"toggle overwrite flag\") }\n    ].concat( platform_specific );\n    \n    var mac_humanize_map = {\n        // all these are unicode, will probably display badly on anything except macs.\n        // these are the standard symbol that are used in MacOS native menus\n        // cf http://apple.stackexchange.com/questions/55727/\n        // for htmlentities and/or unicode value\n        'cmd':'⌘',\n        'shift':'⇧',\n        'alt':'⌥',\n        'up':'↑',\n        'down':'↓',\n        'left':'←',\n        'right':'→',\n        'eject':'⏏',\n        'tab':'⇥',\n        'backtab':'⇤',\n        'capslock':'⇪',\n        'esc':'esc',\n        'ctrl':'⌃',\n        'enter':'↩',\n        'pageup':'⇞',\n        'pagedown':'⇟',\n        'home':'↖',\n        'end':'↘',\n        'altenter':'⌤',\n        'space':'␣',\n        'delete':'⌦',\n        'backspace':'⌫',\n        'apple':'',\n    };\n\n    var default_humanize_map = {\n        'shift':i18n.msg._('Shift'),\n        'alt':i18n.msg._('Alt'),\n        'up':i18n.msg._('Up'),\n        'down':i18n.msg._('Down'),\n        'left':i18n.msg._('Left'),\n        'right':i18n.msg._('Right'),\n        'tab':i18n.msg._('Tab'),\n        'capslock':i18n.msg._('Caps Lock'),\n        'esc':i18n.msg._('Esc'),\n        'ctrl':i18n.msg._('Ctrl'),\n        'enter':i18n.msg._('Enter'),\n        'pageup':i18n.msg._('Page Up'),\n        'pagedown':i18n.msg._('Page Down'),\n        'home':i18n.msg._('Home'),\n        'end':i18n.msg._('End'),\n        'space':i18n.msg._('Space'),\n        'backspace':i18n.msg._('Backspace'),\n        '-':i18n.msg._('Minus')\n        };\n    \n    var humanize_map;\n\n    if (platform === 'MacOS'){\n        humanize_map = mac_humanize_map;\n    } else {\n        humanize_map = default_humanize_map;\n    }\n\n    var special_case = { pageup: i18n.msg._(\"PageUp\"), pagedown: i18n.msg._(\"Page Down\") };\n    \n    function humanize_key(key){\n        if (key.length === 1){\n            return key.toUpperCase();\n        }\n\n        key = humanize_map[key.toLowerCase()]||key;\n        \n        if (key.indexOf(',') === -1){\n            return  ( special_case[key] ? special_case[key] : key.charAt(0).toUpperCase() + key.slice(1) );\n        }\n    }\n\n    // return an **html** string of the keyboard shortcut\n    // for human eyes consumption.\n    // the sequence is a string, comma sepparated linkt of shortcut,\n    // where the shortcut is a list of dash-joined keys.\n    // Each shortcut will be wrapped in <kbd> tag, and joined by comma is in a\n    // sequence.\n    //\n    // Depending on the platform each shortcut will be normalized, with or without dashes.\n    // and replace with the corresponding unicode symbol for modifier if necessary.\n    function humanize_sequence(sequence){\n        var joinchar = ',';\n        var hum = _.map(sequence.replace(/meta/g, 'cmd').split(','), humanize_shortcut).join(joinchar);\n        return hum;\n    }\n\n    function _humanize_sequence(sequence){\n        var joinchar = ',';\n        var hum = _.map(sequence.replace(/meta/g, 'cmd').split(','), _humanize_shortcut).join(joinchar);\n        return hum;\n    }\n\n    function _humanize_shortcut(shortcut){\n        var joinchar = '-';\n        if (platform === 'MacOS'){\n            joinchar = '';\n        }\n        return _.map(shortcut.split('-'), humanize_key ).join(joinchar);\n    }\n\n    function humanize_shortcut(shortcut){\n        return '<kbd>'+_humanize_shortcut(shortcut)+'</kbd>';\n    }\n    \n\n    QuickHelp.prototype.show_keyboard_shortcuts = function () {\n        /**\n         * toggles display of keyboard shortcut dialog\n         */\n        var that = this;\n        if ( this.force_rebuild ) {\n            this.shortcut_dialog.remove();\n            delete(this.shortcut_dialog);\n            this.force_rebuild = false;\n        }\n        if ( this.shortcut_dialog ){\n            // if dialog is already shown, close it\n            $(this.shortcut_dialog).modal(\"toggle\");\n            return;\n        }\n        var element = $('<div/>');\n\n        // The documentation\n        var doc = $('<div/>').addClass('alert alert-info');\n        doc.append(i18n.msg._('The Jupyter Notebook has two different keyboard input modes.'))\n           .append(' ')\n           .append(i18n.msg._('<b>Edit mode</b> allows you to type code or text into a cell and is indicated by a green cell border.'))\n           .append(' ')\n           .append(i18n.msg._('<b>Command mode</b> binds the keyboard to notebook level commands and is indicated by a grey cell border with a blue left margin.')\n        );\n        element.append(doc);\n        if (platform === 'MacOS') {\n            doc = $('<div/>').addClass('alert alert-info');\n            var key_div = this.build_key_names();\n            doc.append(key_div);\n            element.append(doc);\n        }\n\n        // Command mode\n        var cmd_div = this.build_command_help();\n        element.append(cmd_div);\n\n        // Edit mode\n        var edit_div = this.build_edit_help(cm_shortcuts);\n        element.append(edit_div);\n\n        // This statement is used simply so that message extraction\n        // will pick up the strings.  The actual setting of the text\n        // for the button is in dialog.js.\n        var button_labels = [ i18n.msg._(\"Close\") ];\n\n        this.shortcut_dialog = dialog.modal({\n            title : i18n.msg._(\"Keyboard shortcuts\"),\n            body : element,\n            destroy : false,\n            buttons : {\n                Close : {}\n            },\n            notebook: this.notebook,\n            keyboard_manager: this.keyboard_manager,\n        });\n        this.shortcut_dialog.addClass(\"modal_stretch\");\n        \n        this.events.on('rebuild.QuickHelp', function() { that.force_rebuild = true;});\n    };\n\n    QuickHelp.prototype.build_key_names = function () {\n       var key_names_mac =  [{ shortcut:\"⌘\", help:i18n.msg._(\"Command\") },\n                    { shortcut:\"⌃\", help:i18n.msg._(\"Control\") },\n                    { shortcut:\"⌥\", help:i18n.msg._(\"Option\") },\n                    { shortcut:\"⇧\", help:i18n.msg._(\"Shift\") },\n                    { shortcut:\"↩\", help:i18n.msg._(\"Return\") },\n                    { shortcut:\"␣\", help:i18n.msg._(\"Space\") },\n                    { shortcut:\"⇥\", help:i18n.msg._(\"Tab\") }];\n        var i, half, n;\n        var div = $('<div/>').append('Mac OS X modifier keys:');\n        var sub_div = $('<div/>').addClass('container-fluid');\n        var col1 = $('<div/>').addClass('col-md-6');\n        var col2 = $('<div/>').addClass('col-md-6');\n        n = key_names_mac.length;\n        half = ~~(n/2);\n        for (i=0; i<half; i++) { col1.append(\n                build_one(key_names_mac[i])\n                ); }\n        for (i=half; i<n; i++) { col2.append(\n                build_one(key_names_mac[i])\n                ); }\n        sub_div.append(col1).append(col2);\n        div.append(sub_div);\n        return div;\n    };\n\n\n    QuickHelp.prototype.build_command_help = function () {\n        var that = this;\n        var command_shortcuts = this.keyboard_manager.command_shortcuts.help();\n        var cmdkey = '<kbd>'+i18n.msg._('Esc')+'</kbd>';\n        var div = build_div('<h4>'+i18n.msg.sprintf(i18n.msg._('Command Mode (press %s to enable)'),cmdkey)+'</h4>', command_shortcuts);\n        var edit_button = $('<button/>')\n            .text(i18n.msg._(\"Edit Shortcuts\"))\n            .addClass('btn btn-xs btn-default pull-right')\n            .attr('href', '#')\n            .attr('title', i18n.msg._('edit command-mode keyboard shortcuts'))\n            .click(function () {\n                // close this dialog\n                $(that.shortcut_dialog).modal(\"toggle\");\n                // and open the next one\n                $(that.shortcut_dialog).on('hidden.bs.modal', function (e) {\n                    that.keyboard_manager.actions.call(\n                        'jupyter-notebook:edit-command-mode-keyboard-shortcuts'\n                    );\n                });\n            });\n        div.find('h4').append(edit_button);\n        return div;\n    };\n\n    \n    QuickHelp.prototype.build_edit_help = function (cm_shortcuts) {\n        var edit_shortcuts = this.keyboard_manager.edit_shortcuts.help();\n        var enterkey = '<kbd>'+i18n.msg._('Enter')+'</kbd>';\n        edit_shortcuts = $.merge($.merge([], cm_shortcuts), edit_shortcuts);\n        return build_div('<h4>'+i18n.msg.sprintf(i18n.msg._('Edit Mode (press %s to enable)'),enterkey)+'</h4>', edit_shortcuts);\n    };\n\n    var build_one = function (s) {\n        var help = s.help;\n        var shortcut = '';\n        if(s.shortcut){\n            shortcut = humanize_sequence(s.shortcut);\n        }\n        return $('<div>').addClass('quickhelp').\n            append($('<span/>').addClass('shortcut_key').append($(shortcut))).\n            append($('<span/>').addClass('shortcut_descr').text(' : ' + help));\n\n    };\n\n    var build_div = function (title, shortcuts) {\n        \n        // Remove jupyter-notebook:ignore shortcuts.\n        shortcuts = shortcuts.filter(function(shortcut) {\n            if (shortcut.help === 'ignore') {\n                return false;\n            } else {\n                return true;\n            }\n        });\n        \n        var i, half, n;\n        var div = $('<div/>').append($(title));\n        var sub_div = $('<div/>').addClass('container-fluid');\n        var col1 = $('<div/>').addClass('col-md-6');\n        var col2 = $('<div/>').addClass('col-md-6');\n        n = shortcuts.length;\n        half = ~~(n/2);  // Truncate :)\n        for (i=0; i<half; i++) { col1.append( build_one(shortcuts[i]) ); }\n        for (i=half; i<n; i++) { col2.append( build_one(shortcuts[i]) ); }\n        sub_div.append(col1).append(col2);\n        div.append(sub_div);\n        return div;\n    };\n\n    return {'QuickHelp': QuickHelp,\n      humanize_shortcut: humanize_shortcut,\n      humanize_sequence: humanize_sequence,\n      _humanize_sequence: _humanize_sequence,\n  };\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/commandpalette',[\n    'jquery',\n    'typeahead',\n    'base/js/i18n',\n    'notebook/js/quickhelp'\n],function($, typeahead, i18n, QH){\n    \"use strict\";\n\n    /**\n     * Humanize the action name to be consumed by user.\n     * internaly the actions anem are of the form\n     * <namespace>:<description-with-dashes>\n     * we drop <namesapce> and replace dashes for space.\n     */\n    var humanize_action_id = function(str) {\n      return str.split(':')[1].replace(/-/g, ' ').replace(/_/g, '-');\n    };\n\n    /**\n     * given an action id return 'command-shortcut', 'edit-shortcut' or 'no-shortcut'\n     * for the action. This allows us to tag UI in order to visually distinguish\n     * wether an action have a keybinding or not.\n     **/\n    var get_mode_for_action_id = function(name, notebook) {\n      var shortcut = notebook.keyboard_manager.command_shortcuts.get_action_shortcut(name);\n      if (shortcut) {\n        return 'command-shortcut';\n      }\n      shortcut = notebook.keyboard_manager.edit_shortcuts.get_action_shortcut(name);\n      if (shortcut) {\n        return 'edit-shortcut';\n      }\n      return 'no-shortcut';\n    };\n\n    var CommandPalette = function(notebook) {\n        if(!notebook){\n          throw new Error(\"CommandPalette takes a notebook non-null mandatory arguement\");\n        }\n\n        // typeahead lib need a specific layout with specific class names.\n        // the following just does that\n        var form = $('<form/>');\n        var container = $('<div/>').addClass('typeahead-container');\n        var field = $('<div/>').addClass('typeahead-field');\n        var input = $('<input/>').attr('type', 'search');\n\n        field\n          .append(\n            $('<span>').addClass('typeahead-query').append(\n              input\n            )\n          )\n          .append(\n            $('<span/>').addClass('typeahead-button').append(\n              $('<button/>').attr('type', 'submit').append(\n                $('<span/>').addClass('typeahead-search-icon')\n              )\n            )\n          );\n\n        container.append(field);\n        form.append(container);\n\n\n        var mod = $('<div/>').addClass('modal cmd-palette').append(\n          $('<div/>').addClass('modal-dialog')\n          .append(\n            $('<div/>').addClass('modal-content').append(\n              $('<div/>').addClass('modal-body')\n              .append(\n                form\n              )\n            )\n          )\n        )\n        // end setting up right layout\n        .modal({show: false, backdrop:true})\n        .on('shown.bs.modal', function () {\n              // click on button trigger de-focus on mouse up.\n              // or somethign like that.\n              setTimeout(function(){input.focus();}, 100);\n        });\n\n        notebook.keyboard_manager.disable();\n\n        var before_close = function() {\n          // little trick to trigger early in onsubmit\n          // when the action called pop-up a dialog\n          // insure this function is only called once\n          if (before_close.ok) {\n            return;\n          }\n          var cell = notebook.get_selected_cell();\n          if (cell) {\n            cell.select();\n          }\n          if (notebook.keyboard_manager) {\n            notebook.keyboard_manager.enable();\n            notebook.keyboard_manager.command_mode();\n          }\n          before_close.ok = true; // avoid double call.\n        };\n        \n        mod.on(\"hide.bs.modal\", before_close);\n        \n\n        // will be trigger when user select action\n        var onSubmit = function(node, query, result, resultCount) {\n          if (actions.indexOf(result.key) >= 0) {\n            before_close();\n            notebook.keyboard_manager.actions.call(result.key);\n          } else {\n            console.warning(\"No command \" + result.key);\n          }\n          mod.modal('hide');\n        };\n\n        /* Whenever a result is rendered, if there is only one resulting\n         * element then automatically select that element.\n         */\n        var onResult = function(node, query, result, resultCount) {\n            if (resultCount == 1) {\n                requestAnimationFrame(function() {\n                    $('.typeahead-list > li:nth-child(2)').addClass('active');\n                });\n            }\n        };\n\n        // generate structure needed for typeahead layout and ability to search\n        var src = {};\n\n        var actions = Object.keys(notebook.keyboard_manager.actions._actions);\n\n        for (var i = 0; i < actions.length; i++) {\n          var action_id = actions[i];\n          var action = notebook.keyboard_manager.actions.get(action_id);\n          var group = action_id.split(':')[0];\n\n          src[group] = src[group] || {\n            data: [],\n            display: 'display'\n          };\n\n          var short = notebook.keyboard_manager.command_shortcuts.get_action_shortcut(action_id) ||\n            notebook.keyboard_manager.edit_shortcuts.get_action_shortcut(action_id);\n          if (short) {\n            short = QH.humanize_sequence(short);\n          }\n\n          var display_text;\n          if (action.cmd) {\n              display_text = i18n.msg._(action.cmd);\n          } else {\n              display_text = humanize_action_id(action_id);\n          }\n          \n          src[group].data.push({\n            display: display_text,\n            shortcut: short,\n            mode_shortcut: get_mode_for_action_id(action_id, notebook),\n            group: group,\n            icon: action.icon,\n            help: i18n.msg._(action.help),\n            key: action_id,\n          });\n        }\n\n        // now src is the right structure for typeahead\n\n        input.typeahead({\n          emptyTemplate: function(query) {\n            return $('<div>').text(\"No results found for \").append(\n                $('<code>').text(query)\n            );\n          },\n          maxItem: 1e3,\n          minLength: 0,\n          hint: true,\n          group: [\"group\", \"{{group}} command group\"],\n          searchOnFocus: true,\n          mustSelectItem: true,\n          template: '<i class=\"fa fa-icon {{icon}}\"></i>{{display}}  <div title={{key}} class=\"pull-right {{mode_shortcut}}\">{{shortcut}}</div>',\n          order: \"asc\",\n          source: src,\n          callback: {\n            onSubmit: onSubmit,\n            onClickAfter: onSubmit,\n            onResult: onResult\n          },\n          debug: false,\n        });\n\n        mod.modal('show');\n    };\n    return {'CommandPalette': CommandPalette};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/shortcuteditor',[\n    \"jquery\",\n    \"notebook/js/quickhelp\",\n    \"base/js/dialog\",\n    \"components/marked/lib/marked\"\n], function (\n    $,\n    QH,\n    dialog,\n    marked\n) {\n    var render = preact.render;\n    var createClass = preactCompat.createClass;\n    var createElement = preactCompat.createElement;\n\n\n/**\n * Humanize the action name to be consumed by user.\n * internally the actions name are of the form\n * <namespace>:<description-with-dashes>\n * we drop <namespace> and replace dashes for space.\n */\nvar humanize_action_id = function(str) {\n  return str.split(':')[1].replace(/-/g, ' ').replace(/_/g, '-');\n};\n\n/**\n * given an action id return 'command-shortcut', 'edit-shortcut' or 'no-shortcut'\n * for the action. This allows us to tag UI in order to visually distinguish\n * Wether an action have a keybinding or not.\n **/\n\nvar KeyBinding = createClass({\n  displayName: 'KeyBindings',\n  getInitialState: function() {\n    return {shrt:''};\n  },\n  handleShrtChange: function (element){\n    this.setState({shrt:element.target.value});\n  },\n  render: function(){\n    var that = this;\n    var available = this.props.available(this.state.shrt);\n    var empty = (this.state.shrt === '');\n    var binding_setter = function(){\n      if (available) { \n        that.props.onAddBindings(that.state.shrt, that.props.ckey);\n      }\n      that.state.shrt='';\n      return false;\n    };\n    return createElement('form', {className:'jupyter-keybindings',\n            onSubmit: binding_setter\n        },\n              createElement('i', {className: \"pull-right fa fa-plus\", alt: 'add-keyboard-shortcut',\n                  onClick: binding_setter\n              }),\n              createElement('input', {\n                                      type:'text', \n                               placeholder:'add shortcut', \n                                 className:'pull-right'+((available||empty)?'':' alert alert-danger'),\n                                     value:that.state.shrt,\n                                  onChange:that.handleShrtChange\n              }),\n              that.props.shortcuts ? that.props.shortcuts.map(function (item, index) {\n                return createElement('span', {className: 'pull-right'},\n                  createElement('kbd', {}, [\n                    item.h,\n                    createElement('i', {className: \"fa fa-times\", alt: 'remove '+item.h,\n                      onClick:function () {\n                        that.props.unbind(item.raw);\n                      }\n                    })\n                  ])\n                );\n              }): null,\n              createElement('div', {title: '(' + that.props.ckey + ')' ,\n                className:'jupyter-keybindings-text'}, that.props.display )\n      );\n  }\n});\n\nvar KeyBindingList = createClass({\n  displayName: 'KeyBindingList',\n  getInitialState: function(){\n    return {data:[]};\n  },\n  componentDidMount: function(){\n      this.setState({data:this.props.callback()});\n  },\n  render: function() {\n      var that = this;\n      var children = this.state.data.map(function (binding) {\n          return createElement(KeyBinding, Object.assign({}, binding, {\n          onAddBindings: function (shortcut, action) {\n              that.props.bind(shortcut, action);\n              that.setState({data:that.props.callback()});\n          },\n          available: that.props.available,\n          unbind: function (shortcut) {\n                  that.props.unbind(shortcut);\n                  that.setState({data:that.props.callback()});\n             }\n          }));\n      });\n      children.unshift(createElement('div', {className:'well', key:'disclamer', id:'short-key-binding-intro', dangerouslySetInnerHTML:\n            {__html: \n            marked(\n\n            \"Here you can modify the keyboard shortcuts available in \"+\n            \"command mode. Your changes will be stored for later sessions. \"+\n            \"See more [**details of defining keyboard shortcuts**](#long-key-binding-intro) below.\"\n            )}\n      }));\n      children.push(createElement('div', {className:'well', key:'disclamer', id:'long-key-binding-intro', dangerouslySetInnerHTML:\n            {__html: \n            marked(\n\n            \"This dialog allows you to modify the keyboard shortcuts available in command mode. \"+ \n            \"Any changes will be persisted between sessions and across environments. \"+\n            \"You can define two kinds of shorctuts: **key combinations** and **key sequences**.\\n\"+\n            \"\\n\"+\n            \" - **Key Combinations**:\\n\"+\n            \"   - Use hyphens `-` to represent keys that should be pressed at the same time.\\n\"+\n            \"   - This is designed for use with *modifier* keys: `Cmd`, `Ctrl`, `Alt` ,`Meta`, \"+\n            \"`Cmdtrl`, and `Shift`.\\n\"+ \n            \"       - `Cmdtrl` acts like `Cmd` on OS X/MacOS and `Ctrl` on Windows/Linux.\\n\"+\n            \"   - At most, one non-modifier key can exist in a key combination.\\n\"+\n            \"   - Multiple modifier keys can exist in a key combination.\\n\"+\n            \"   - Modifier keys need to precede the non-modifier key in a combination.\\n\"+\n            \"   - *Valid Examples*: `Shift-a`, `Ctrl-;`, or `Ctrl-Shift-a`. \\n\"+\n            \"   - *Invalid Example*s: `a-b` and `a-Ctrl-Shift`. \\n\"+\n            \" - **Key Sequences**:\\n\"+\n            \"   - Use commas `,` to represent keys that should be pressed in sequence.\\n\"+\n            \"   - The order in which keys must be pressed exactly matches the left-to-right order of \"+\n            \"the characters in the sequence, with no interruptions.\\n\"+\n            \"     - E.g., `h,a,l,t` would be triggered by typing <kbd>h</kbd> <kbd>a</kbd> \"+\n            \"<kbd>l</kbd> <kbd>t</kbd> but not <kbd>h</kbd> <kbd>a</kbd> <kbd>a</kbd> <kbd>l</kbd> \"+\n            \"<kbd>t</kbd> or <kbd>a</kbd>  <kbd>h</kbd> <kbd>l</kbd> <kbd>t</kbd>.\\n\"+\n            \"   - Sequences can include the same key multiple times (e.g., `d,d`).\\n\"+\n            \"   - You cannot include any pairs of sequences where one is a 'prefix' the other.\\n\"+\n            \"     - E.g., `d,d,d` cannot be used a the same time as `d,d`.\\n\"+ \n            \"   - Key combinations are unique elements that can be used in a sequence.\\n\"+ \n            \"     - E.g., `Ctrl-d,d` and `d,d` can exist at the same time and are both valid key sequences.\\n\"+\n            \"\\n\"+\n            \"**Additional notes**:\\n\"+\n            \"\\n\"+\n            \"The case in which elements are written does not change the binding's meaning. \"+\n            \"E.g., `Ctrl-D` and `cTrl-d` are the same key binding. \"+\n            \"Thus, `Shift` needs to be explicitly included if it is part of the key binding. \"+\n            \"So, for example, if you set a command to be activated by `Shift-D,D`, the second `d` \"+\n            \"cannot be pressed at the same time as the `Shift` modifier key.\\n\"+\n            \"\\n\"+\n            \"Valid modifiers are specified by writing out their names explicitly: \"+\n            \"e.g., `Shift`, `Cmd`, `Ctrl`, `Alt` ,`Meta`, `Cmdtrl`. You cannot use the symbol equivalents \"+\n            \"(e.g., `⇧`, `⌘`, `⌃`, `⌥`); refer to developer docs for the corresponding keys \"+\n            \"(the mapping of which depends on the platform you are using).\"+\n            \"You can hover on the name/description of a command to see its exact internal name and \"+\n            \"differentiate from actions defined in various plugins. \\n\"+\n            \"\\n\"+\n            \"Changing the keybindings of edit mode is not currently available.\"\n            )}\n      }));\n      return createElement('div',{}, children);\n    }\n});\n\nvar get_shortcuts_data = function(notebook) {\n    var actions = Object.keys(notebook.keyboard_manager.actions._actions);\n    var src = [];\n\n    for (var i = 0; i < actions.length; i++) {\n      var action_id = actions[i];\n      var action = notebook.keyboard_manager.actions.get(action_id);\n\n      var shortcuts = notebook.keyboard_manager.command_shortcuts.get_action_shortcuts(action_id);\n      var hshortcuts = [];\n      if (shortcuts.length > 0) {\n        hshortcuts = shortcuts.map(function (raw) {\n          return {h:QH._humanize_sequence(raw),raw:raw};}\n        );\n      }\n      src.push({\n        display: humanize_action_id(action_id),\n        shortcuts: hshortcuts,\n        key:action_id, // react specific thing\n        ckey: action_id\n      });\n    }\n    return src;\n};\n\n\nvar ShortcutEditor = function(notebook) {\n\n    if(!notebook){\n      throw new Error(\"CommandPalette takes a notebook non-null mandatory argument\");\n    }\n\n    var body =  $('<div>');\n    var mod = dialog.modal({\n        notebook: notebook,\n        keyboard_manager: notebook.keyboard_manager,\n        title : \"Edit Command mode Shortcuts\",\n        body : body,\n        buttons : {\n            OK : {}\n        }\n    });\n    \n    var src = get_shortcuts_data(notebook);\n\n    mod.addClass(\"modal_stretch\");\n\n    mod.modal('show');\n    render(\n        createElement(KeyBindingList, {\n            callback: function () { return  get_shortcuts_data(notebook);},\n            bind: function (shortcut, command) {\n                return notebook.keyboard_manager.command_shortcuts._persist_shortcut(shortcut, command);\n            },\n            unbind: function (shortcut) {\n                return notebook.keyboard_manager.command_shortcuts._persist_remove_shortcut(shortcut);\n            },\n            available: function (shrt) { return notebook.keyboard_manager.command_shortcuts.is_available_shortcut(shrt);}\n          }),\n        body.get(0)\n    );\n};\n    return {ShortcutEditor: ShortcutEditor};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * @module notebook\n */\n\"use strict\";\ndefine('notebook/js/notebook',[\n    'jquery',\n    'base/js/namespace',\n    'underscore',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog',\n    './cell',\n    './textcell',\n    './codecell',\n    'moment',\n    'services/config',\n    'services/sessions/session',\n    './celltoolbar',\n    'components/marked/lib/marked',\n    'codemirror/lib/codemirror',\n    'codemirror/addon/runmode/runmode',\n    './mathjaxutils',\n    'base/js/keyboard',\n    './tooltip',\n    './celltoolbarpresets/default',\n    './celltoolbarpresets/rawcell',\n    './celltoolbarpresets/slideshow',\n    './celltoolbarpresets/attachments',\n    './celltoolbarpresets/tags',\n    './scrollmanager',\n    './commandpalette',\n    './shortcuteditor',\n], function (\n    $,\n    IPython,\n    _,\n    utils,\n    i18n,\n    dialog,\n    cellmod,\n    textcell,\n    codecell,\n    moment,\n    configmod,\n    session,\n    celltoolbar,\n    marked,\n    CodeMirror,\n    runMode,\n    mathjaxutils,\n    keyboard,\n    tooltip,\n    default_celltoolbar,\n    rawcell_celltoolbar,\n    slideshow_celltoolbar,\n    attachments_celltoolbar,\n    tags_celltoolbar,\n    scrollmanager,\n    commandpalette,\n    shortcuteditor\n) {\n\n    var ShortcutEditor = shortcuteditor.ShortcutEditor;\n\n    var _SOFT_SELECTION_CLASS = 'jupyter-soft-selected';\n\n    function soft_selected(cell){\n        return cell.element.hasClass(_SOFT_SELECTION_CLASS);\n    }\n\n    /**\n     * Contains and manages cells.\n     * @class Notebook\n     * @param {string}          selector\n     * @param {object}          options - Dictionary of keyword arguments.  \n     * @param {jQuery}          options.events - selector of Events\n     * @param {KeyboardManager} options.keyboard_manager\n     * @param {Contents}        options.contents\n     * @param {SaveWidget}      options.save_widget\n     * @param {object}          options.config\n     * @param {string}          options.base_url\n     * @param {string}          options.notebook_path\n     * @param {string}          options.notebook_name\n     */\n    function Notebook(selector, options) {\n        this.config = options.config;\n        this.config.loaded.then(this.validate_config.bind(this))\n        this.class_config = new configmod.ConfigWithDefaults(this.config, \n                                        Notebook.options_default, 'Notebook');\n        this.base_url = options.base_url;\n        this.notebook_path = options.notebook_path;\n        this.notebook_name = options.notebook_name;\n        this.events = options.events;\n        this.keyboard_manager = options.keyboard_manager;\n        this.contents = options.contents;\n        this.save_widget = options.save_widget;\n        this.tooltip = new tooltip.Tooltip(this.events);\n        this.ws_url = options.ws_url;\n        this._session_starting = false;\n        this.last_modified = null;\n        // debug 484\n        this._last_modified = 'init';\n        // Firefox workaround\n        this._ff_beforeunload_fired = false;\n\n        //  Create default scroll manager.\n        this.scroll_manager = new scrollmanager.ScrollManager(this);\n\n        // TODO: This code smells (and the other `= this` line a couple lines down)\n        // We need a better way to deal with circular instance references.\n        this.keyboard_manager.notebook = this;\n        this.save_widget.notebook = this;\n        \n        mathjaxutils.init();\n\n        if (marked) {\n            marked.setOptions({\n                gfm : true,\n                tables: true,\n                // FIXME: probably want central config for CodeMirror theme when we have js config\n                langPrefix: \"cm-s-ipython language-\",\n                highlight: function(code, lang, callback) {\n                    if (!lang) {\n                        // no language, no highlight\n                        if (callback) {\n                            callback(null, code);\n                            return;\n                        } else {\n                            return code;\n                        }\n                    }\n                    utils.requireCodeMirrorMode(lang, function (spec) {\n                        var el = document.createElement(\"div\");\n                        var mode = CodeMirror.getMode({}, spec);\n                        if (!mode) {\n                            console.log(\"No CodeMirror mode: \" + lang);\n                            callback(null, code);\n                            return;\n                        }\n                        try {\n                            CodeMirror.runMode(code, spec, el);\n                            callback(null, el.innerHTML);\n                        } catch (err) {\n                            console.log(\"Failed to highlight \" + lang + \" code\", err);\n                            callback(err, code);\n                        }\n                    }, function (err) {\n                        console.log(\"No CodeMirror mode: \" + lang);\n                        console.log(\"Require CodeMirror mode error: \" + err);\n                        callback(null, code);\n                    });\n                }\n            });\n        }\n\n        this.element = $(selector);\n        this.element.scroll();\n        this.element.data(\"notebook\", this);\n        this.session = null;\n        this.kernel = null;\n        this.kernel_busy = false;\n        this.clipboard = null;\n        this.clipboard_attachments = null;\n        this.undelete_backup_stack = [];\n        this.paste_enabled = false;\n        this.paste_attachments_enabled = false;\n        this.writable = false;\n        // It is important to start out in command mode to match the intial mode\n        // of the KeyboardManager.\n        this.mode = 'command';\n        this.set_dirty(false);\n        this.metadata = {};\n        this._checkpoint_after_save = false;\n        this.last_checkpoint = null;\n        this.checkpoints = [];\n        this.autosave_interval = 0;\n        this.autosave_timer = null;\n        // autosave *at most* every two minutes\n        this.minimum_autosave_interval = 120000;\n        this.notebook_name_blacklist_re = /[\\/\\\\:]/;\n        this.nbformat = 4; // Increment this when changing the nbformat\n        this.nbformat_minor = this.current_nbformat_minor = 1; // Increment this when changing the nbformat\n        this.codemirror_mode = 'text';\n        this.create_elements();\n        this.bind_events();\n        this.kernel_selector = null;\n        this.dirty = null;\n        this.trusted = null;\n        this._changed_on_disk_dialog = null;\n        this._fully_loaded = false;\n\n        // Trigger cell toolbar registration.\n        default_celltoolbar.register(this);\n        rawcell_celltoolbar.register(this);\n        slideshow_celltoolbar.register(this);\n        attachments_celltoolbar.register(this);\n        tags_celltoolbar.register(this);\n\n        var that = this;\n\n        Object.defineProperty(this, 'line_numbers', {\n            get: function() {\n                var d = that.config.data || {};\n                var cmc =  (d['Cell'] || {}) ['cm_config'] || {};\n                return cmc['lineNumbers'] || false;\n            },\n            set: function(value) {\n                that.config.update({\n                    'Cell': {\n                        'cm_config': {\n                            'lineNumbers':value\n                        }\n                    }\n                });\n            }\n        });\n        \n        Object.defineProperty(this, 'header', {\n            get: function() {\n                return that.class_config.get_sync('Header');\n            },\n            set: function(value) {\n                that.class_config.set('Header', value);\n            }\n        });\n                \n        Object.defineProperty(this, 'toolbar', {\n            get: function() {\n                return that.class_config.get_sync('Toolbar');\n            },\n            set: function(value) {\n                that.class_config.set('Toolbar', value);\n            }\n        });\n        \n        this.class_config.get('Header').then(function(header) {\n            if (header === false) {\n                that.keyboard_manager.actions.call('jupyter-notebook:hide-header');\n            }\n        });\n        \n        this.class_config.get('Toolbar').then(function(toolbar) {\n          if (toolbar === false) {\n              that.keyboard_manager.actions.call('jupyter-notebook:hide-toolbar');\n          }\n        });\n        \n        // prevent assign to miss-typed properties.\n        Object.seal(this);\n    };\n\n    Notebook.options_default = {\n        // can be any cell type, or the special values of\n        // 'above', 'below', or 'selected' to get the value from another cell.\n        default_cell_type: 'code',\n        Header: true,\n        Toolbar: true\n    };\n\n    Notebook.prototype.validate_config = function() {\n        var code_cell = this.config.data['CodeCell'] || {};\n        var cm_keymap = (code_cell['cm_config'] || {})['keyMap'];\n        if (cm_keymap && CodeMirror.keyMap[cm_keymap] === undefined) {\n            console.warn('CodeMirror keymap not found, ignoring: ' + cm_keymap);\n            delete code_cell.cm_config.keyMap;\n        }\n    };\n\n    /**\n     * Create an HTML and CSS representation of the notebook.\n     */\n    Notebook.prototype.create_elements = function () {\n        var that = this;\n        this.element.attr('tabindex','-1');\n        this.container = $(\"<div/>\").addClass(\"container\").attr(\"id\", \"notebook-container\");\n        // We add this end_space div to the end of the notebook div to:\n        // i) provide a margin between the last cell and the end of the notebook\n        // ii) to prevent the div from scrolling up when the last cell is being\n        // edited, but is too low on the page, which browsers will do automatically.\n        var end_space = $('<div/>')\n            .addClass('end_space');\n        end_space.dblclick(function (e) {\n            var ncells = that.ncells();\n            that.insert_cell_below('code',ncells-1);\n        });\n        this.element.append(this.container);\n        this.container.after(end_space);\n    };\n\n    /**\n     * Bind JavaScript events: key presses and custom Jupyter events.\n     */\n    Notebook.prototype.bind_events = function () {\n        var that = this;\n\n\n        this.events.on('set_next_input.Notebook', function (event, data) {\n            if (data.replace) {\n                data.cell.set_text(data.text);\n                if (data.clear_output !== false) {\n                  // default (undefined) is true to preserve prior behavior\n                  data.cell.clear_output();\n                }\n            } else {\n                var index = that.find_cell_index(data.cell);\n                var new_cell = that.insert_cell_below('code',index);\n                new_cell.set_text(data.text);\n            }\n            that.dirty = true;\n        });\n\n        this.events.on('unrecognized_cell.Cell', function () {\n            that.warn_nbformat_minor();\n        });\n\n        this.events.on('unrecognized_output.OutputArea', function () {\n            that.warn_nbformat_minor();\n        });\n\n        this.events.on('set_dirty.Notebook', function (event, data) {\n            that.dirty = data.value;\n        });\n\n        this.events.on('trust_changed.Notebook', function (event, trusted) {\n            that.trusted = trusted;\n        });\n\n        this.events.on('select.Cell', function (event, data) {\n            var index = that.find_cell_index(data.cell);\n            that.select(index, !data.extendSelection);\n        });\n\n        this.events.on('edit_mode.Cell', function (event, data) {\n            that.handle_edit_mode(data.cell);\n        });\n\n        this.events.on('command_mode.Cell', function (event, data) {\n            that.handle_command_mode(data.cell);\n        });\n        \n        this.events.on('spec_changed.Kernel', function(event, data) {\n            var existing_spec = that.metadata.kernelspec;\n            that.metadata.kernelspec = {\n                name: data.name,\n                display_name: data.spec.display_name,\n                language: data.spec.language,\n            };\n            if (!existing_spec || ! _.isEqual(existing_spec, that.metadata.kernelspec)) {\n                that.set_dirty(true);\n            }\n            // start a new session\n            that.start_session(data.name);\n        });\n\n        this.events.on('kernel_ready.Kernel', function(event, data) {\n            var kinfo = data.kernel.info_reply;\n            if (!kinfo.language_info) {\n                delete that.metadata.language_info;\n                return;\n            }\n            var existing_info = that.metadata.language_info;\n            var langinfo = kinfo.language_info;\n            that.metadata.language_info = langinfo;\n            if (!existing_info || ! _.isEqual(existing_info, langinfo)) {\n                that.set_dirty(true);\n            }\n            // Mode 'null' should be plain, unhighlighted text.\n            var cm_mode = langinfo.codemirror_mode || langinfo.name || 'null';\n            that.set_codemirror_mode(cm_mode);\n        });\n        \n        this.events.on('kernel_idle.Kernel', function () {\n            that.kernel_busy = false;\n        });\n        \n        this.events.on('kernel_busy.Kernel', function () {\n            that.kernel_busy = true;\n        });\n\n        var collapse_time = function (time) {\n            var app_height = $('#ipython-main-app').height(); // content height\n            var splitter_height = $('div#pager_splitter').outerHeight(true);\n            var new_height = app_height - splitter_height;\n            that.element.animate({height : new_height + 'px'}, time);\n        };\n\n        this.element.bind('collapse_pager', function (event, extrap) {\n            var time = (extrap !== undefined) ? ((extrap.duration !== undefined ) ? extrap.duration : 'fast') : 'fast';\n            collapse_time(time);\n        });\n\n        var expand_time = function (time) {\n            var app_height = $('#ipython-main-app').height(); // content height\n            var splitter_height = $('div#pager_splitter').outerHeight(true);\n            var pager_height = $('div#pager').outerHeight(true);\n            var new_height = app_height - pager_height - splitter_height;\n            that.element.animate({height : new_height + 'px'}, time);\n        };\n\n        this.element.bind('expand_pager', function (event, extrap) {\n            var time = (extrap !== undefined) ? ((extrap.duration !== undefined ) ? extrap.duration : 'fast') : 'fast';\n            expand_time(time);\n        });\n\n\n        // Firefox 22 broke $(window).on(\"beforeunload\")\n        // I'm not sure why or how.\n        window.onbeforeunload = function (e) {\n            // TODO: Make killing the kernel configurable.\n            var kill_kernel = false;\n            if (kill_kernel) {\n                that.session.delete();\n            }\n            if ( utils.browser[0] === \"Firefox\") {\n                // Workaround ancient Firefox bug showing beforeunload twice: https://bugzilla.mozilla.org/show_bug.cgi?id=531199\n                if (that._ff_beforeunload_fired) {\n                    return; // don't show twice on FF\n                }\n                that._ff_beforeunload_fired = true;\n                // unset flag immediately after dialog is dismissed\n                setTimeout(function () {\n                    that._ff_beforeunload_fired = false;\n                }, 1);\n            }\n            // if we are autosaving, trigger an autosave on nav-away.\n            // still warn, because if we don't the autosave may fail.\n            if (that.dirty) {\n                if ( that.autosave_interval ) {\n                    // schedule autosave in a timeout\n                    // this gives you a chance to forcefully discard changes\n                    // by reloading the page if you *really* want to.\n                    // the timer doesn't start until you *dismiss* the dialog.\n                    setTimeout(function () {\n                        if (that.dirty) {\n                            that.save_notebook();\n                        }\n                    }, 1000);\n                    return i18n.msg._(\"Autosave in progress, latest changes may be lost.\");\n                } else {\n                    return i18n.msg._(\"Unsaved changes will be lost.\");\n                }\n            }\n            // if the kernel is busy, prompt the user if he’s sure\n            if (that.kernel_busy) {\n                return i18n.msg._(\"The Kernel is busy, outputs may be lost.\");\n            }\n            // IE treats null as a string.  Instead just return which will avoid the dialog.\n            return;\n        };\n    };\n    \n\n    Notebook.prototype.show_command_palette = function() {\n        var x = new commandpalette.CommandPalette(this);\n    };\n\n    Notebook.prototype.show_shortcuts_editor = function() {\n        new ShortcutEditor(this);\n    };\n\n    /**\n     * Trigger a warning dialog about missing functionality from newer minor versions\n     */\n    Notebook.prototype.warn_nbformat_minor = function (event) {\n        var v = 'v' + this.nbformat + '.';\n        var orig_vs = v + this.nbformat_minor;\n        var this_vs = v + this.current_nbformat_minor;\n        var msg = i18n.msg.sprintf(i18n.msg._(\"This notebook is version %1$s, but we only fully support up to %2$s.\"),\n                orig_vs,this_vs) + \" \" +\n                i18n.msg._(\"You can still work with this notebook, but cell and output types introduced in later notebook versions will not be available.\");\n\n        // This statement is used simply so that message extraction\n        // will pick up the strings.  The actual setting of the text\n        // for the button is in dialog.js.\n        var button_labels = [ \n            i18n.msg._(\"OK\"),\n            i18n.msg._(\"Restart and Run All Cells\"),\n            i18n.msg._(\"Restart and Clear All Outputs\"),\n            i18n.msg._(\"Restart\"),\n            i18n.msg._(\"Continue Running\"),\n            i18n.msg._(\"Reload\"),\n            i18n.msg._(\"Cancel\"),\n            i18n.msg._(\"Overwrite\"),\n            i18n.msg._(\"Trust\"),\n            i18n.msg._(\"Revert\")];\n        \n        dialog.modal({\n            notebook: this,\n            keyboard_manager: this.keyboard_manager,\n            title : i18n.msg._(\"Newer Notebook\"),\n            body : msg,\n            buttons : {\n                OK : {\n                    \"class\" : \"btn-danger\"\n                }\n            }\n        });\n    };\n\n    /**\n     * Set the dirty flag, and trigger the set_dirty.Notebook event\n     */\n    Notebook.prototype.set_dirty = function (value) {\n        if (value === undefined) {\n            value = true;\n        }\n        if (this.dirty === value) {\n            return;\n        }\n        this.events.trigger('set_dirty.Notebook', {value: value});\n    };\n\n    /**\n     * Scroll the top of the page to a given cell.\n     * \n     * @param {integer}  index - An index of the cell to view\n     * @param {integer}  time - Animation time in milliseconds\n     * @return {integer} Pixel offset from the top of the container\n     */\n    Notebook.prototype.scroll_to_cell = function (index, time) {\n        return this.scroll_cell_percent(index, 0, time);\n    };\n\n    /**\n     * Scroll the middle of the page to a given cell.\n     *\n     * @param {integer}  index - An index of the cell to view\n     * @param {integer}  percent - 0-100, the location on the screen to scroll.\n     *                   0 is the top, 100 is the bottom.\n     * @param {integer}  time - Animation time in milliseconds\n     * @return {integer} Pixel offset from the top of the container\n     */\n    Notebook.prototype.scroll_cell_percent = function (index, percent, time) {\n        var cells = this.get_cells();\n        time = time || 0;\n        percent = percent || 0;\n        index = Math.min(cells.length-1,index);\n        index = Math.max(0             ,index);\n        var sme = this.scroll_manager.element;\n        var h = sme.height();\n        var st = sme.scrollTop();\n        var t = sme.offset().top;\n        var ct = cells[index].element.offset().top;\n        var scroll_value =  st + ct - (t + 0.01 * percent * h);\n        this.scroll_manager.element.animate({scrollTop:scroll_value}, time);\n        return scroll_value;\n    };\n\n    /**\n     * Scroll to the bottom of the page.\n     */\n    Notebook.prototype.scroll_to_bottom = function () {\n        this.scroll_manager.element.animate({scrollTop:this.element.get(0).scrollHeight}, 0);\n    };\n\n    /**\n     * Scroll to the top of the page.\n     */\n    Notebook.prototype.scroll_to_top = function () {\n        this.scroll_manager.element.animate({scrollTop:0}, 0);\n    };\n\n    // Edit Notebook metadata\n\n    /**\n     * Display a dialog that allows the user to edit the Notebook's metadata.\n     */\n    Notebook.prototype.edit_metadata = function () {\n        var that = this;\n        dialog.edit_metadata({\n            md: this.metadata, \n            callback: function (md) {\n                that.metadata = md;\n            },\n            name: 'Notebook',\n            notebook: this,\n            keyboard_manager: this.keyboard_manager});\n    };\n\n    // Cell indexing, retrieval, etc.\n\n    /**\n     * Get all cell elements in the notebook.\n     * \n     * @return {jQuery} A selector of all cell elements\n     */\n    Notebook.prototype.get_cell_elements = function () {\n        var container = this.container || $('#notebook-container')\n        return container.find(\".cell\").not('.cell .cell');\n    };\n\n    /**\n     * Get a particular cell element.\n     * \n     * @param {integer} index An index of a cell to select\n     * @return {jQuery} A selector of the given cell.\n     */\n    Notebook.prototype.get_cell_element = function (index) {\n        var result = null;\n        var e = this.get_cell_elements().eq(index);\n        if (e.length !== 0) {\n            result = e;\n        }\n        return result;\n    };\n\n    /**\n     * Try to get a particular cell by msg_id.\n     * \n     * @param {string} msg_id A message UUID\n     * @return {Cell} Cell or null if no cell was found.\n     */\n    Notebook.prototype.get_msg_cell = function (msg_id) {\n        return codecell.CodeCell.msg_cells[msg_id] || null;\n    };\n\n    /**\n     * Count the cells in this notebook.\n     * \n     * @return {integer} The number of cells in this notebook\n     */\n    Notebook.prototype.ncells = function () {\n        return this.get_cell_elements().length;\n    };\n\n    /**\n     * Get all Cell objects in this notebook.\n     * \n     * @return {Array} This notebook's Cell objects\n     */\n    Notebook.prototype.get_cells = function () {\n        // TODO: we are often calling cells as cells()[i], which we should optimize\n        // to cells(i) or a new method.\n        return this.get_cell_elements().toArray().map(function (e) {\n            return $(e).data(\"cell\");\n        });\n    };\n\n    /**\n     * Get a Cell objects from this notebook.\n     * \n     * @param {integer} index - An index of a cell to retrieve\n     * @return {Cell} Cell or null if no cell was found.\n     */\n    Notebook.prototype.get_cell = function (index) {\n        var result = null;\n        var ce = this.get_cell_element(index);\n        if (ce !== null) {\n            result = ce.data('cell');\n        }\n        return result;\n    };\n\n    /**\n     * Get the cell below a given cell.\n     * \n     * @param {Cell} cell\n     * @return {Cell} the next cell or null if no cell was found.\n     */\n    Notebook.prototype.get_next_cell = function (cell) {\n        var result = null;\n        var index = this.find_cell_index(cell);\n        if (this.is_valid_cell_index(index+1)) {\n            result = this.get_cell(index+1);\n        }\n        return result;\n    };\n    \n    /**\n     * Toggles the display of line numbers in all cells.\n     */\n    Notebook.prototype.toggle_all_line_numbers = function () {\n        this.line_numbers = !this.line_numbers;\n    };\n\n    /**\n     * Get the cell above a given cell.\n     * \n     * @param {Cell} cell\n     * @return {Cell} The previous cell or null if no cell was found.\n     */\n    Notebook.prototype.get_prev_cell = function (cell) {\n        var result = null;\n        var index = this.find_cell_index(cell);\n        if (index !== null && index > 0) {\n            result = this.get_cell(index-1);\n        }\n        return result;\n    };\n    \n    /**\n     * Get the numeric index of a given cell.\n     * \n     * @param {Cell} cell\n     * @return {integer} The cell's numeric index or null if no cell was found.\n     */\n    Notebook.prototype.find_cell_index = function (cell) {\n        var result = null;\n        this.get_cell_elements().filter(function (index) {\n            if ($(this).data(\"cell\") === cell) {\n                result = index;\n            }\n        });\n        return result;\n    };\n\n    /**\n     * Return given index if defined, or the selected index if not.\n     * \n     * @param {integer} [index] - A cell's index\n     * @return {integer} cell index\n     */\n    Notebook.prototype.index_or_selected = function (index) {\n        var i;\n        if (index === undefined || index === null) {\n            i = this.get_selected_index();\n            if (i === null) {\n                i = 0;\n            }\n        } else {\n            i = index;\n        }\n        return i;\n    };\n\n\n    Notebook.prototype.get_selected_cells = function () {\n        return this.get_cells().filter(function(cell, index){ return cell.selected || soft_selected(cell) || cell.anchor;});\n    };\n\n    Notebook.prototype.get_selected_cells_indices = function () {\n\n        var result = [];\n        this.get_cells().filter(function (cell, index) {\n            if (cell.selected || soft_selected(cell) || cell.anchor) {\n                result.push(index);\n            }\n        });\n        return result;\n    };\n\n\n    /**\n     * Get the currently selected cell.\n     * \n     * @return {Cell} The selected cell\n     */\n    Notebook.prototype.get_selected_cell = function () {\n        var index = this.get_selected_index();\n        return this.get_cell(index);\n    };\n\n    /**\n     * Check whether a cell index is valid.\n     * \n     * @param {integer} index - A cell index\n     * @return True if the index is valid, false otherwise\n     */\n    Notebook.prototype.is_valid_cell_index = function (index) {\n        if (index !== null && index >= 0 && index < this.ncells()) {\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     * Returns the index of the cell that the selection is currently anchored on.\n     *\n     * @return {integer} Index of first cell selected in selection\n     */\n    Notebook.prototype.get_anchor_index = function () {\n        var result = null;\n        this.get_cell_elements().filter(function (index) {\n            if ($(this).data(\"cell\").anchor === true) {\n                result = index;\n            }\n        });\n        return result;\n    };\n\n    /**\n     * Get the index of the currently selected cell.\n     *\n     * @return {integer} The selected cell's numeric index\n     */\n    Notebook.prototype.get_selected_index = function () {\n        var result = null;\n        this.get_cell_elements().filter(function (index) {\n            if ($(this).data(\"cell\").selected === true) {\n                result = index;\n            }\n        });\n        return result;\n    };\n\n\n    // Cell selection.\n\n    Notebook.prototype.extend_selection_by = function(delta) {\n        var index = this.get_selected_index();\n        // do not move anchor\n        return this.select(index+delta, false);\n    };\n\n\n    Notebook.prototype.update_soft_selection = function(){\n        var i1 = this.get_selected_index();\n        var i2 = this.get_anchor_index();\n        var low  = Math.min(i1, i2);\n        var high = Math.max(i1, i2);\n        this.get_cells().map(function(cell, index, all){\n            if( low <= index && index <= high && low !== high){\n                cell.element.addClass(_SOFT_SELECTION_CLASS);\n            } else {\n                cell.element.removeClass(_SOFT_SELECTION_CLASS);\n            }\n        });\n    };\n\n    Notebook.prototype._contract_selection = function(){\n        var i = this.get_selected_index();\n        this.select(i, true);\n    };\n\n    /**\n     * Programmatically select a cell.\n     * \n     * @param {integer} index - A cell's index\n     * @param {bool} moveanchor – whether to move the selection\n     *               anchor, default to true.\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.select = function (index, moveanchor) {\n        moveanchor = (moveanchor===undefined)? true : moveanchor;\n\n        if (this.is_valid_cell_index(index)) {\n            var sindex = this.get_selected_index();\n            if (sindex !== null && index !== sindex) {\n                // If we are about to select a different cell, make sure we are\n                // first in command mode.\n                if (this.mode !== 'command') {\n                    this.command_mode();\n                }\n                this.get_cell(sindex).unselect(moveanchor);\n            }\n            if(moveanchor){\n                this.get_cell(this.get_anchor_index()).unselect(moveanchor);\n            }\n            var cell = this.get_cell(index);\n            cell.select(moveanchor);\n            this.update_soft_selection();\n            if (cell.cell_type === 'heading') {\n                this.events.trigger('selected_cell_type_changed.Notebook',\n                    {'cell_type':cell.cell_type, level:cell.level}\n                );\n            } else {\n                this.events.trigger('selected_cell_type_changed.Notebook',\n                    {'cell_type':cell.cell_type}\n                );\n            }\n        }\n        return this;\n    };\n\n    /**\n     * Programmatically select the next cell.\n     *\n     * @param {bool} moveanchor – whether to move the selection\n     *               anchor, default to true.\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.select_next = function (moveanchor) {\n        var index = this.get_selected_index();\n        this.select(index+1, moveanchor);\n        return this;\n    };\n\n    /**\n     * Programmatically select the previous cell.\n     *\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.select_prev = function (moveanchor) {\n        var index = this.get_selected_index();\n        this.select(index-1, moveanchor);\n        return this;\n    };\n\n\n    // Edit/Command mode\n\n    /**\n     * Gets the index of the cell that is in edit mode.\n     *\n     * @return {integer} index\n     */\n    Notebook.prototype.get_edit_index = function () {\n        var result = null;\n        this.get_cell_elements().filter(function (index) {\n            if ($(this).data(\"cell\").mode === 'edit') {\n                result = index;\n            }\n        });\n        return result;\n    };\n\n    /**\n     * Handle when a a cell blurs and the notebook should enter command mode.\n     *\n     * @param {Cell} [cell] - Cell to enter command mode on.\n     */\n    Notebook.prototype.handle_command_mode = function (cell) {\n        if (this.mode !== 'command') {\n            cell.command_mode();\n            this.mode = 'command';\n            this.events.trigger('command_mode.Notebook');\n            this.keyboard_manager.command_mode();\n        }\n    };\n\n    /**\n     * Make the notebook enter command mode.\n     */\n    Notebook.prototype.command_mode = function () {\n        var cell = this.get_cell(this.get_edit_index());\n        if (cell && this.mode !== 'command') {\n            // We don't call cell.command_mode, but rather blur the CM editor\n            // which will trigger the call to handle_command_mode.\n            cell.code_mirror.getInputField().blur();\n        }\n    };\n\n    /**\n     * Handle when a cell fires it's edit_mode event.\n     *\n     * @param {Cell} [cell] Cell to enter edit mode on.\n     */\n    Notebook.prototype.handle_edit_mode = function (cell) {\n        this._contract_selection();\n        if (cell && this.mode !== 'edit') {\n            cell.edit_mode();\n            this.mode = 'edit';\n            this.events.trigger('edit_mode.Notebook');\n            this.keyboard_manager.edit_mode();\n        }\n    };\n\n    /**\n     * Make a cell enter edit mode.\n     */\n    Notebook.prototype.edit_mode = function () {\n        this._contract_selection();\n        var cell = this.get_selected_cell();\n        if (cell && this.mode !== 'edit') {\n            cell.unrender();\n            cell.focus_editor();\n        }\n    };\n    \n    /**\n     * Ensure either cell, or codemirror is focused. Is none \n     * is focused, focus the cell.\n     */\n    Notebook.prototype.ensure_focused = function(){\n        var cell = this.get_selected_cell();\n        if (cell === null) {return;}  // No cell is selected\n        cell.ensure_focused();\n    };\n\n    /**\n     * Focus the currently selected cell.\n     */\n    Notebook.prototype.focus_cell = function () {\n        var cell = this.get_selected_cell();\n        if (cell === null) {return;}  // No cell is selected\n        cell.focus_cell();\n    };\n\n    // Cell movement\n\n    /**\n     * Move the current selection up, keeping the same cells selected\n     * No op if the selection is at the beginning of the notebook\n     */\n    Notebook.prototype.move_selection_up = function(){\n        // actually will move the cell before the selection, after the selection\n        var indices = this.get_selected_cells_indices();\n        var first = indices[0];\n        var last = indices[indices.length - 1];\n\n        var selected = this.get_selected_index();\n        var anchored = this.get_anchor_index();\n\n        if (first === 0){\n            return;\n        }\n        var tomove = this.get_cell_element(first - 1);\n        var pivot = this.get_cell_element(last);\n\n        tomove.detach();\n        pivot.after(tomove);\n\n        this.get_cell(selected-1).focus_cell();\n        this.select(anchored - 1);\n        this.select(selected - 1, false);\n    };\n\n    /**\n     * Move the current selection down, keeping the same cells selected.\n     * No op if the selection is at the end of the notebook\n     */\n    Notebook.prototype.move_selection_down = function(){\n        // actually will move the cell after the selection, before the selection\n        var indices = this.get_selected_cells_indices();\n        var first = indices[0];\n        var last = indices[indices.length - 1];\n\n        var selected = this.get_selected_index();\n        var anchored = this.get_anchor_index();\n\n        if(!this.is_valid_cell_index(last + 1)){\n            return;\n        }\n        var tomove = this.get_cell_element(last + 1);\n        var pivot = this.get_cell_element(first);\n\n        tomove.detach();\n        pivot.before(tomove);\n\n        this.get_cell(selected+1).focus_cell();\n        this.select(first);\n        this.select(anchored + 1);\n        this.select(selected + 1, false);\n    };\n\n    /**\n     * Move given (or selected) cell up and select it.\n     * \n     * @param {integer} [index] - cell index\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.move_cell_up = function (index) {\n        console.warn('Notebook.move_cell_up is deprecated as of v4.1 and will be removed in v5.0');\n\n        if(index === undefined){\n            this.move_selection_up();\n            return this;\n        }\n        \n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i) && i > 0) {\n            var pivot = this.get_cell_element(i-1);\n            var tomove = this.get_cell_element(i);\n            if (pivot !== null && tomove !== null) {\n                tomove.detach();\n                pivot.before(tomove);\n                this.select(i-1);\n                var cell = this.get_selected_cell();\n                cell.focus_cell();\n            }\n            this.set_dirty(true);\n        }\n        return this;\n    };\n\n\n    /**\n     * Move given (or selected) cell down and select it.\n     * \n     * @param {integer} [index] - cell index\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.move_cell_down = function (index) {\n        console.warn('Notebook.move_cell_down is deprecated as of v4.1 and will be removed in v5.0');\n\n        if(index === undefined){\n            this.move_selection_down();\n            return this;\n        }\n        \n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i) && this.is_valid_cell_index(i+1)) {\n            var pivot = this.get_cell_element(i+1);\n            var tomove = this.get_cell_element(i);\n            if (pivot !== null && tomove !== null) {\n                tomove.detach();\n                pivot.after(tomove);\n                this.select(i+1);\n                var cell = this.get_selected_cell();\n                cell.focus_cell();\n            }\n        }\n        this.set_dirty();\n        return this;\n    };\n\n\n    // Insertion, deletion.\n\n    /**\n     * Delete a cell from the notebook without any precautions\n     * Needed to reload checkpoints and other things like that.\n     * \n     * @param {integer} [index] - cell's numeric index\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype._unsafe_delete_cell = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n\n        $('#undelete_cell').addClass('disabled');\n        if (this.is_valid_cell_index(i)) {\n            var old_ncells = this.ncells();\n            var ce = this.get_cell_element(i);\n            ce.remove();\n            this.set_dirty(true);\n        }\n        return this;\n    };\n\n\n    /**\n     * Delete cells from the notebook\n     *\n     * @param {Array} [indices] - the numeric indices of cells to delete.\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.delete_cells = function(indices) {\n        if (indices === undefined) {\n            indices = this.get_selected_cells_indices();\n        }\n\n        var undelete_backup = {\n            cells: [],\n            below: false,\n            index: 0,\n        };\n\n        var cursor_ix_before = this.get_selected_index();\n        var deleting_before_cursor = 0;\n        for (var i=0; i < indices.length; i++) {\n            if (!this.get_cell(indices[i]).is_deletable()) {\n                // If any cell is marked undeletable, cancel\n                return this;\n            }\n\n            if (indices[i] < cursor_ix_before) {\n                deleting_before_cursor++;\n            }\n        }\n\n        // If we started deleting cells from the top, the later indices would\n        // get offset. We sort them into descending order to avoid that.\n        indices.sort(function(a, b) {return b-a;});\n        for (i=0; i < indices.length; i++) {\n            var cell = this.get_cell(indices[i]);\n            undelete_backup.cells.push(cell.toJSON());\n            this.get_cell_element(indices[i]).remove();\n            this.events.trigger('delete.Cell', {'cell': cell, 'index': indices[i]});\n        }\n\n        var new_ncells = this.ncells();\n        // Always make sure we have at least one cell.\n        if (new_ncells === 0) {\n            this.insert_cell_below('code');\n            new_ncells = 1;\n        }\n\n        var cursor_ix_after = this.get_selected_index();\n        if (cursor_ix_after === null) {\n            // Selected cell was deleted\n            cursor_ix_after = cursor_ix_before - deleting_before_cursor;\n            if (cursor_ix_after >= new_ncells) {\n                cursor_ix_after = new_ncells - 1;\n                undelete_backup.below = true;\n            }\n            this.select(cursor_ix_after);\n        }\n\n        // Check if the cells were after the cursor\n        for (i=0; i < indices.length; i++) {\n            if (indices[i] > cursor_ix_before) {\n                undelete_backup.below = true;\n            }\n        }\n\n        // This will put all the deleted cells back in one location, rather than\n        // where they came from. It will do until we have proper undo support.\n        undelete_backup.index = cursor_ix_after;\n        $('#undelete_cell').removeClass('disabled');\n\n        this.undelete_backup_stack.push(undelete_backup);\n        this.set_dirty(true);\n\n        return this;\n    };\n\n    /**\n     * Delete a cell from the notebook.\n     * \n     * @param {integer} [index] - cell's numeric index\n     * @return {Notebook} This notebook\n     */\n    Notebook.prototype.delete_cell = function (index) {\n        if (index === undefined) {\n            return this.delete_cells();\n        } else {\n            return this.delete_cells([index]);\n        }\n    };\n\n    /**\n     * Restore the most recently deleted cells.\n     */\n    Notebook.prototype.undelete_cell = function() {\n        if (this.undelete_backup_stack.length > 0) {\n            var undelete_backup = this.undelete_backup_stack.pop();\n            var i, cell_data, new_cell, insert;\n            if (undelete_backup.below) {\n                insert = $.proxy(this.insert_cell_below, this);\n            } else {\n                insert = $.proxy(this.insert_cell_above, this);\n            }\n            for (i=0; i < undelete_backup.cells.length; i++) {\n                cell_data = undelete_backup.cells[i];\n                new_cell = insert(cell_data.cell_type, undelete_backup.index);\n                new_cell.fromJSON(cell_data);\n            }\n\n            this.set_dirty(true);\n        }\n        if (this.undelete_backup_stack.length === 0) {\n            $('#undelete_cell').addClass('disabled');\n        }\n    };\n\n    /**\n     * Insert a cell so that after insertion the cell is at given index.\n     *\n     * If cell type is not provided, it will default to the type of the\n     * currently active cell.\n     *\n     * Similar to insert_above, but index parameter is mandatory.\n     *\n     * Index will be brought back into the accessible range [0,n].\n     *\n     * @param {string} [type] - in ['code','markdown', 'raw'], defaults to 'code'\n     * @param {integer} [index] - a valid index where to insert cell\n     * @return {Cell|null} created cell or null\n     */\n    Notebook.prototype.insert_cell_at_index = function(type, index){\n\n        var ncells = this.ncells();\n        index = Math.min(index, ncells);\n        index = Math.max(index, 0);\n        var cell = null;\n        type = type || this.class_config.get_sync('default_cell_type');\n        if (type === 'above') {\n            if (index > 0) {\n                type = this.get_cell(index-1).cell_type;\n            } else {\n                type = 'code';\n            }\n        } else if (type === 'below') {\n            if (index < ncells) {\n                type = this.get_cell(index).cell_type;\n            } else {\n                type = 'code';\n            }\n        } else if (type === 'selected') {\n            type = this.get_selected_cell().cell_type;\n        }\n\n        if (ncells === 0 || this.is_valid_cell_index(index) || index === ncells) {\n            var cell_options = {\n                events: this.events, \n                config: this.config, \n                keyboard_manager: this.keyboard_manager, \n                notebook: this,\n                tooltip: this.tooltip\n            };\n            switch(type) {\n            case 'code':\n                cell = new codecell.CodeCell(this.kernel, cell_options);\n                cell.set_input_prompt();\n                break;\n            case 'markdown':\n                cell = new textcell.MarkdownCell(cell_options);\n                break;\n            case 'raw':\n                cell = new textcell.RawCell(cell_options);\n                break;\n            default:\n                console.log(\"Unrecognized cell type: \", type, cellmod);\n                cell = new cellmod.UnrecognizedCell(cell_options);\n            }\n\n            if(this._insert_element_at_index(cell.element,index)) {\n                cell.render();\n                this.events.trigger('create.Cell', {'cell': cell, 'index': index});\n                cell.refresh();\n                // We used to select the cell after we refresh it, but there\n                // are now cases were this method is called where select is\n                // not appropriate. The selection logic should be handled by the\n                // caller of the the top level insert_cell methods.\n                this.set_dirty(true);\n            }\n        }\n        return cell;\n\n    };\n\n    /**\n     * Insert an element at given cell index.\n     *\n     * @param {HTMLElement} element - a cell element\n     * @param {integer}     [index] - a valid index where to inser cell\n     * @returns {boolean}   success\n     */\n    Notebook.prototype._insert_element_at_index = function(element, index){\n        if (element === undefined){\n            return false;\n        }\n\n        var ncells = this.ncells();\n\n        if (ncells === 0) {\n            // special case append if empty\n            this.container.append(element);\n        } else if ( ncells === index ) {\n            // special case append it the end, but not empty\n            this.get_cell_element(index-1).after(element);\n        } else if (this.is_valid_cell_index(index)) {\n            // otherwise always somewhere to append to\n            this.get_cell_element(index).before(element);\n        } else {\n            return false;\n        }\n        \n        this.undelete_backup_stack.map(function (undelete_backup) {\n            if (index < undelete_backup.index) {\n                undelete_backup.index += 1;\n            }\n        });\n        this.set_dirty(true);\n        return true;\n    };\n\n    /**\n     * Insert a cell of given type above given index, or at top\n     * of notebook if index smaller than 0.\n     *\n     * @param {string}     [type] - cell type\n     * @param {integer}    [index] - defaults to the currently selected cell\n     * @return {Cell|null} handle to created cell or null\n     */\n    Notebook.prototype.insert_cell_above = function (type, index) {\n        if (index === null || index === undefined) {\n            index = Math.min(this.get_selected_index(index), this.get_anchor_index());\n        }\n        return this.insert_cell_at_index(type, index);\n    };\n\n    /**\n     * Insert a cell of given type below given index, or at bottom\n     * of notebook if index greater than number of cells\n     *\n     * @param {string}     [type] - cell type\n     * @param {integer}    [index] - defaults to the currently selected cell\n     * @return {Cell|null} handle to created cell or null\n     */\n    Notebook.prototype.insert_cell_below = function (type, index) {\n        if (index === null || index === undefined) {            \n            index = Math.max(this.get_selected_index(index), this.get_anchor_index());\n        }\n        return this.insert_cell_at_index(type, index+1);\n    };\n\n\n    /**\n     * Insert cell at end of notebook\n     *\n     * @param {string} type - cell type\n     * @return {Cell|null} handle to created cell or null\n     */\n    Notebook.prototype.insert_cell_at_bottom = function (type){\n        var len = this.ncells();\n        return this.insert_cell_below(type,len-1);\n    };\n    \n    /**\n     * Turn one or more cells into code.\n     *\n     * @param {Array} indices - cell indices to convert\n     */\n    Notebook.prototype.cells_to_code = function (indices) {\n        if (indices === undefined){\n            indices = this.get_selected_cells_indices();\n        }\n        \n        for (var i=0; i <indices.length; i++){\n            this.to_code(indices[i]);\n        }\n    };\n\n    /**\n     * Turn a cell into a code cell.\n     * \n     * @param {integer} [index] - cell index\n     */\n    Notebook.prototype.to_code = function (index) {\n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i)) {\n            var source_cell = this.get_cell(i);\n            if (!(source_cell instanceof codecell.CodeCell)) {\n                var target_cell = this.insert_cell_below('code',i);\n                var text = source_cell.get_text();\n                if (text === source_cell.placeholder) {\n                    text = '';\n                }\n                //metadata\n                target_cell.metadata = source_cell.metadata;\n                // attachments (we transfer them so they aren't lost if the\n                // cell is turned back into markdown)\n                target_cell.attachments = source_cell.attachments;\n\n                target_cell.set_text(text);\n                // make this value the starting point, so that we can only undo\n                // to this state, instead of a blank cell\n                target_cell.code_mirror.clearHistory();\n                source_cell.element.remove();\n                this.select(i);\n                var cursor = source_cell.code_mirror.getCursor();\n                target_cell.code_mirror.setCursor(cursor);\n                this.set_dirty(true);\n            }\n        }\n    };\n\n    /**\n     * Turn one or more cells into Markdown.\n     *\n     * @param {Array} indices - cell indices to convert\n     */\n     Notebook.prototype.cells_to_markdown = function (indices) {\n        if (indices === undefined) {\n            indices = this.get_selected_cells_indices();\n        }\n\n        for(var i=0; i < indices.length; i++) {\n            this.to_markdown(indices[i]);\n        }\n     };\n\n    /**\n     * Turn a cell into a Markdown cell.\n     * \n     * @param {integer} [index] - cell index\n     */\n    Notebook.prototype.to_markdown = function (index) {\n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i)) {\n            var source_cell = this.get_cell(i);\n\n            if (!(source_cell instanceof textcell.MarkdownCell)) {\n                var target_cell = this.insert_cell_below('markdown',i);\n                var text = source_cell.get_text();\n\n                if (text === source_cell.placeholder) {\n                    text = '';\n                }\n                // metadata\n                target_cell.metadata = source_cell.metadata;\n                target_cell.attachments = source_cell.attachments;\n\n                // We must show the editor before setting its contents\n                target_cell.unrender();\n                target_cell.set_text(text);\n                // make this value the starting point, so that we can only undo\n                // to this state, instead of a blank cell\n                target_cell.code_mirror.clearHistory();\n                source_cell.element.remove();\n                this.select(i);\n                if ((source_cell instanceof textcell.TextCell) && source_cell.rendered) {\n                    target_cell.render();\n                }\n                var cursor = source_cell.code_mirror.getCursor();\n                target_cell.code_mirror.setCursor(cursor);\n                this.set_dirty(true);\n            }\n        }\n    };\n\n    /**\n     * Turn one or more cells into a raw text cell.\n     *\n     * @param {Array} indices - cell indices to convert\n     */\n     Notebook.prototype.cells_to_raw = function (indices) {\n        if (indices === undefined) {\n            indices = this.get_selected_cells_indices();\n        }\n\n        for(var i=0; i < indices.length; i++) {\n            this.to_raw(indices[i]);\n        }\n     };\n\n    /**\n     * Turn a cell into a raw text cell.\n     * \n     * @param {integer} [index] - cell index\n     */\n    Notebook.prototype.to_raw = function (index) {\n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i)) {\n            var target_cell = null;\n            var source_cell = this.get_cell(i);\n\n            if (!(source_cell instanceof textcell.RawCell)) {\n                target_cell = this.insert_cell_below('raw',i);\n                var text = source_cell.get_text();\n                if (text === source_cell.placeholder) {\n                    text = '';\n                }\n                //metadata\n                target_cell.metadata = source_cell.metadata;\n                // attachments (we transfer them so they aren't lost if the\n                // cell is turned back into markdown)\n                target_cell.attachments = source_cell.attachments;\n\n                // We must show the editor before setting its contents\n                target_cell.unrender();\n                target_cell.set_text(text);\n                // make this value the starting point, so that we can only undo\n                // to this state, instead of a blank cell\n                target_cell.code_mirror.clearHistory();\n                source_cell.element.remove();\n                this.select(i);\n                var cursor = source_cell.code_mirror.getCursor();\n                target_cell.code_mirror.setCursor(cursor);\n                this.set_dirty(true);\n            }\n        }\n    };\n    \n    /**\n     * Warn about heading cell support removal.\n     */\n    Notebook.prototype._warn_heading = function () {\n        dialog.modal({\n            notebook: this,\n            keyboard_manager: this.keyboard_manager,\n            title : i18n.msg._(\"Use markdown headings\"),\n            body : $(\"<p/>\").text(\n                i18n.msg._('Jupyter no longer uses special heading cells. ' + \n                'Instead, write your headings in Markdown cells using # characters:')\n            ).append($('<pre/>').text(\n                i18n.msg._('## This is a level 2 heading')\n            )),\n            buttons : {\n                \"OK\" : {}\n            }\n        });\n    };\n    \n    /**\n     * Turn a cell into a heading containing markdown cell.\n     * \n     * @param {integer} [index] - cell index\n     * @param {integer} [level] - heading level (e.g., 1 for h1)\n     */\n    Notebook.prototype.to_heading = function (index, level) {\n        this.to_markdown(index);\n        level = level || 1;\n        var i = this.index_or_selected(index);\n        if (this.is_valid_cell_index(i)) {\n            var cell = this.get_cell(i);\n            cell.set_heading_level(level);\n            this.set_dirty(true);\n        }\n    };\n\n\n    // Cut/Copy/Paste\n\n    /**\n     * Enable the UI elements for pasting cells.\n     */\n    Notebook.prototype.enable_paste = function () {\n        var that = this;\n        if (!this.paste_enabled) {\n            $('#paste_cell_replace').removeClass('disabled')\n                .on('click', function () {that.keyboard_manager.actions.call(\n                    'jupyter-notebook:paste-cell-replace');});\n            $('#paste_cell_above').removeClass('disabled')\n                .on('click', function () {that.keyboard_manager.actions.call(\n                    'jupyter-notebook:paste-cell-above');});\n            $('#paste_cell_below').removeClass('disabled')\n                .on('click', function () {that.keyboard_manager.actions.call(\n                    'jupyter-notebook:paste-cell-below');});\n            this.paste_enabled = true;\n        }\n    };\n\n    /**\n     * Disable the UI elements for pasting cells.\n     */\n    Notebook.prototype.disable_paste = function () {\n        if (this.paste_enabled) {\n            $('#paste_cell_replace').addClass('disabled').off('click');\n            $('#paste_cell_above').addClass('disabled').off('click');\n            $('#paste_cell_below').addClass('disabled').off('click');\n            this.paste_enabled = false;\n        }\n    };\n\n    /**\n     * Cut a cell.\n     */\n    Notebook.prototype.cut_cell = function () {\n        this.copy_cell();\n        this.delete_cell();\n    };\n\n    /**\n     * Copy cells.\n     */\n    Notebook.prototype.copy_cell = function () {\n        var cells = this.get_selected_cells();\n        if (cells.length === 0) {\n            cells = [this.get_selected_cell()];\n        }\n        \n        this.clipboard = [];\n        var cell_json;\n        for (var i=0; i < cells.length; i++) {\n            cell_json = cells[i].toJSON();\n            if (cell_json.metadata.deletable !== undefined) {\n                delete cell_json.metadata.deletable;\n            }\n            this.clipboard.push(cell_json);\n        }\n        this.enable_paste();\n    };\n\n    /**\n     * Replace the selected cell with the cells in the clipboard.\n     */\n    Notebook.prototype.paste_cell_replace = function () {\n\n        if (!(this.clipboard !== null && this.paste_enabled)) {\n            return;\n        }\n\n        var selected =  this.get_selected_cells_indices();\n        var insertion_index = selected[0];\n        this.delete_cells(selected);\n\n        for (var i=this.clipboard.length-1; i >= 0; i--) {\n            var cell_data = this.clipboard[i];\n            var new_cell = this.insert_cell_at_index(cell_data.cell_type, insertion_index);\n            new_cell.fromJSON(cell_data);\n        }\n\n        this.select(insertion_index+this.clipboard.length-1);\n    };\n\n    /**\n     * Paste cells from the clipboard above the selected cell.\n     */\n    Notebook.prototype.paste_cell_above = function () {\n        if (this.clipboard !== null && this.paste_enabled) {\n            var first_inserted = null;\n            for (var i=0; i < this.clipboard.length; i++) {\n                var cell_data = this.clipboard[i];\n                var new_cell = this.insert_cell_above(cell_data.cell_type);\n                new_cell.fromJSON(cell_data);\n                if (first_inserted === null) {\n                    first_inserted = new_cell;\n                }\n            }\n            first_inserted.focus_cell();\n        }\n    };\n\n    /**\n     * Paste cells from the clipboard below the selected cell.\n     */\n    Notebook.prototype.paste_cell_below = function () {\n        if (this.clipboard !== null && this.paste_enabled) {\n            var first_inserted = null;\n            for (var i = this.clipboard.length-1; i >= 0; i--) {\n                var cell_data = this.clipboard[i];\n                var new_cell = this.insert_cell_below(cell_data.cell_type);\n                new_cell.fromJSON(cell_data);\n                if (first_inserted === null) {\n                    first_inserted = new_cell;\n                }\n            }\n            first_inserted.focus_cell();\n        }\n    };\n    \n    /**\n     * Re-render the output of a CodeCell.\n     */\n    Notebook.prototype.render_cell_output = function (code_cell) {\n        var cell_data = code_cell.toJSON();\n        var cell_index = this.find_cell_index(code_cell);\n        var trusted = code_cell.output_area.trusted;\n        this.clear_output(cell_index);\n        code_cell.output_area.trusted = trusted;\n        code_cell.fromJSON(cell_data);\n    };\n\n    // Split/merge\n\n    /**\n     * Split the selected cell into two cells.\n     */\n    Notebook.prototype.split_cell = function () {\n        var cell = this.get_selected_cell();\n        if (cell.is_splittable()) {\n            var texta = cell.get_pre_cursor();\n            var textb = cell.get_post_cursor();\n            // current cell becomes the second one\n            // so we don't need to worry about selection\n            cell.set_text(textb);\n            // create new cell with same type\n            var new_cell = this.insert_cell_above(cell.cell_type);\n            // Unrender the new cell so we can call set_text.\n            new_cell.unrender();\n            new_cell.set_text(texta);\n            // duplicate metadata\n            new_cell.metadata = JSON.parse(JSON.stringify(cell.metadata));\n        }\n    };\n\n    /**\n     * Merge a series of cells into one\n     *\n     * @param {Array} indices - the numeric indices of the cells to be merged\n     * @param {bool} into_last - merge into the last cell instead of the first\n     */\n    Notebook.prototype.merge_cells = function(indices, into_last) {\n        if (indices.length <= 1) {\n            return;\n        }\n\n        // Check if trying to merge above on topmost cell or wrap around\n        // when merging above, see #330\n        if (indices.filter(function(item) {return item < 0;}).length > 0) {\n            return;\n        }\n\n        for (var i=0; i < indices.length; i++) {\n            if (!this.get_cell(indices[i]).is_mergeable()) {\n                return;\n            }\n        }\n        var target = this.get_cell(into_last ? indices.pop() : indices.shift());\n\n        // Get all the cells' contents\n        var contents = [];\n        for (i=0; i < indices.length; i++) {\n            contents.push(this.get_cell(indices[i]).get_text());\n        }\n        if (into_last) {\n            contents.push(target.get_text());\n        } else {\n            contents.unshift(target.get_text());\n        }\n\n        // Update the contents of the target cell\n        if (target instanceof codecell.CodeCell) {\n            target.set_text(contents.join('\\n\\n'));\n        } else {\n            var was_rendered = target.rendered;\n            target.unrender(); // Must unrender before we set_text.\n            target.set_text(contents.join('\\n\\n'));\n            if (was_rendered) {\n                // The rendered state of the final cell should match\n                // that of the original selected cell;\n                target.render();\n            }\n        }\n\n        // Delete the other cells\n        this.delete_cells(indices);\n        \n        // Reset the target cell's undo history\n        target.code_mirror.clearHistory();\n\n        this.select(this.find_cell_index(target));\n    };\n\n    /**\n     * Merge the selected range of cells\n     */\n    Notebook.prototype.merge_selected_cells = function() {\n        this.merge_cells(this.get_selected_cells_indices());\n    };\n\n    /**\n     * Merge the selected cell into the cell above it.\n     */\n    Notebook.prototype.merge_cell_above = function () {\n        var index = this.get_selected_index();\n        this.merge_cells([index-1, index], true);\n    };\n\n    /**\n     * Merge the selected cell into the cell below it.\n     */\n    Notebook.prototype.merge_cell_below = function () {\n        var index = this.get_selected_index();\n        this.merge_cells([index, index+1], false);\n    };\n\n    // Attachments handling\n\n    /**\n     * Shows a dialog letting the user pick an image from her computer and\n     * insert it into the edited markdown cell\n     */\n    Notebook.prototype.insert_image = function () {\n        var that = this;\n        var cell = this.get_selected_cell();\n        // The following should not happen as the menu item is greyed out\n        // when those conditions are not fullfilled (see MarkdownCell\n        // unselect/select/unrender handlers)\n        if (cell.cell_type != 'markdown') {\n            console.log('Error: insert_image called on non-markdown cell');\n            return;\n        }\n        if (cell.rendered) {\n            console.log('Error: insert_image called on rendered cell');\n            return;\n        }\n        dialog.insert_image({\n            callback: function(file) {\n                cell.edit_mode();\n                cell.insert_inline_image_from_blob(file);\n            },\n            notebook: this,\n            keyboard_manager: this.keyboard_manager\n        });\n    };\n\n    /**\n     * Cut the attachments of a cell\n     */\n    Notebook.prototype.cut_cell_attachments = function() {\n        var cell = this.get_selected_cell();\n        if (cell.attachments !== undefined) {\n            this.clipboard_attachments = cell.attachments;\n            this.enable_attachments_paste();\n            delete cell.attachments;\n            cell.unrender();\n            cell.render();\n        }\n    };\n\n    /**\n     * Copy the attachments of a cell\n     */\n    Notebook.prototype.copy_cell_attachments = function() {\n        var cell = this.get_selected_cell();\n        if (cell.attachments !== undefined) {\n          // Do a deep copy of attachments to avoid subsequent modification\n          // to the cell to modify the clipboard\n          this.clipboard_attachments = $.extend(true, {}, cell.attachments);\n          this.enable_attachments_paste();\n        }\n    };\n\n    /**\n     * Paste the attachments in the clipboard into the currently selected\n     * cell\n     */\n    Notebook.prototype.paste_cell_attachments = function() {\n        if (this.clipboard_attachments !== null &&\n            this.paste_attachments_enabled) {\n            var cell = this.get_selected_cell();\n            if (cell.attachments === undefined) {\n              cell.attachments = {};\n            }\n            // Do a deep copy so we can paste multiple times\n            $.extend(true, cell.attachments, this.clipboard_attachments);\n            cell.unrender();\n            cell.render();\n        }\n    };\n\n    /**\n     * Disable the \"Paste Cell Attachments\" menu item\n     */\n    Notebook.prototype.disable_attachments_paste = function () {\n        if (this.paste_attachments_enabled) {\n            $('#paste_cell_attachments').addClass('disabled');\n            this.paste_attachments_enabled = false;\n        }\n    };\n\n    /**\n     * Enable the \"Paste Cell Attachments\" menu item\n     */\n    Notebook.prototype.enable_attachments_paste = function () {\n        var that = this;\n        if (!this.paste_attachments_enabled) {\n            $('#paste_cell_attachments').removeClass('disabled');\n            this.paste_attachments_enabled = true;\n        }\n    };\n\n    /**\n     * Enable/disable the \"Insert image\" menu item\n     */\n    Notebook.prototype.set_insert_image_enabled = function(enabled) {\n        if (enabled) {\n            $('#insert_image').removeClass('disabled');\n        } else {\n            $('#insert_image').addClass('disabled');\n        }\n    };\n\n    // Cell collapsing and output clearing\n\n    /**\n     * Hide a cell's output.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.collapse_output = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.collapse_output();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Hide each code cell's output area.\n     */\n    Notebook.prototype.collapse_all_output = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.collapse_output();\n            }\n        });\n        // this should not be set if the `collapse` key is removed from nbformat\n        this.set_dirty(true);\n    };\n\n    /**\n     * Show a cell's output.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.expand_output = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.expand_output();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Expand each code cell's output area, and remove scrollbars.\n     */\n    Notebook.prototype.expand_all_output = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.expand_output();\n            }\n        });\n        // this should not be set if the `collapse` key is removed from nbformat\n        this.set_dirty(true);\n    };\n\n    /**\n     * Clear the selected CodeCell's output area.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.clear_output = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.clear_output();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Clear multiple selected CodeCells' output areas.\n     *\n     */\n    Notebook.prototype.clear_cells_outputs = function(indices) {\n        if (!indices) {\n           indices = this.get_selected_cells_indices();\n        }\n\n        for (var i = 0; i < indices.length; i++){\n            this.clear_output(indices[i]);\n        }\n    };\n\n    /**\n     * Clear each code cell's output area.\n     */\n    Notebook.prototype.clear_all_output = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.clear_output();\n            }\n        });\n        this.set_dirty(true);\n    };\n\n    /**\n     * Scroll the selected CodeCell's output area.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.scroll_output = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.scroll_output();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Expand each code cell's output area and add a scrollbar for long output.\n     */\n    Notebook.prototype.scroll_all_output = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.scroll_output();\n            }\n        });\n        // this should not be set if the `collapse` key is removed from nbformat\n        this.set_dirty(true);\n    };\n\n    /** \n     * Toggle whether a cell's output is collapsed or expanded.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.toggle_output = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.toggle_output();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Toggle whether all selected cells' outputs are collapsed or expanded.\n     *\n     * @param {integer} indices - the indices of the cells to toggle\n     */\n    Notebook.prototype.toggle_cells_outputs = function(indices) {\n        if (!indices) {\n            indices = this.get_selected_cells_indices();\n        }\n\n        for (var i = 0; i < indices.length; i++){\n            this.toggle_output(indices[i]);\n        }\n    };\n\n    /**\n     * Toggle the output of all cells.\n     */\n    Notebook.prototype.toggle_all_output = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.toggle_output();\n            }\n        });\n        // this should not be set if the `collapse` key is removed from nbformat\n        this.set_dirty(true);\n    };\n\n    /**\n     * Toggle a scrollbar for long cell outputs.\n     * \n     * @param {integer} index - cell index\n     */\n    Notebook.prototype.toggle_output_scroll = function (index) {\n        var i = this.index_or_selected(index);\n        var cell = this.get_cell(i);\n        if (cell !== null && (cell instanceof codecell.CodeCell)) {\n            cell.toggle_output_scroll();\n            this.set_dirty(true);\n        }\n    };\n\n    /**\n     * Toggle a scrollbar for selected long cells' outputs.\n     *\n     * @param {integer} indices - the indices of the cells to toggle\n     */\n    Notebook.prototype.toggle_cells_outputs_scroll = function(indices) {\n        if (!indices) {\n            indices = this.get_selected_cells_indices();\n        }\n\n        for (var i = 0; i < indices.length; i++){\n            this.toggle_output_scroll(indices[i]);\n        }\n    };\n\n    /**\n     * Toggle the scrolling of long output on all cells.\n     */\n    Notebook.prototype.toggle_all_output_scroll = function () {\n        this.get_cells().map(function (cell, i) {\n            if (cell instanceof codecell.CodeCell) {\n                cell.toggle_output_scroll();\n            }\n        });\n        // this should not be set if the `collapse` key is removed from nbformat\n        this.set_dirty(true);\n    };\n\n    // Other cell functions: line numbers, ...\n\n    /**\n     * Toggle line numbers in the selected cell's input area.\n     */\n    Notebook.prototype.cell_toggle_line_numbers = function() {\n        this.get_selected_cells().map(function(cell, i){cell.toggle_line_numbers();});\n    };\n\n\n    //dispatch codemirror mode to all cells.\n    Notebook.prototype._dispatch_mode = function(spec, newmode){\n        this.codemirror_mode = newmode;\n        codecell.CodeCell.options_default.cm_config.mode = newmode;\n        this.get_cells().map(function(cell, i) {\n            if (cell.cell_type === 'code'){\n                cell.code_mirror.setOption('mode', spec);\n                // This is currently redundant, because cm_config ends up as\n                // codemirror's own .options object, but I don't want to\n                // rely on that.\n                cell._options.cm_config.mode = spec;\n            }\n        });\n\n    };\n\n    // roughly try to check mode equality\n    var _mode_equal = function(mode1, mode2){\n        return ((mode1||{}).name||mode1)===((mode2||{}).name||mode2);\n    };\n    \n    /**\n     * Set the codemirror mode for all code cells, including the default for\n     * new code cells.\n     * Set the mode to 'null' (no highlighting) if it can't be found.\n     */\n    Notebook.prototype.set_codemirror_mode = function(newmode){\n        // if mode is the same don't reset,\n        // to avoid n-time re-highlighting.\n        if (_mode_equal(newmode, this.codemirror_mode)) {\n            return;\n        }\n        \n        var that = this;\n        utils.requireCodeMirrorMode(newmode, function (spec) {\n            that._dispatch_mode(spec, newmode);\n        }, function(){\n            // on error don't dispatch the new mode as re-setting it later will not work.\n            // don't either set to null mode if it has been changed in the meantime\n            if( _mode_equal(newmode, this.codemirror_mode) ){\n                that._dispatch_mode('null','null');\n            }\n        });\n    };\n\n    // Session related things\n\n    /**\n     * Start a new session and set it on each code cell.\n     */\n    Notebook.prototype.start_session = function (kernel_name) {\n        if (this._session_starting) {\n            throw new session.SessionAlreadyStarting();\n        }\n        this._session_starting = true;\n\n        var options = {\n            base_url: this.base_url,\n            ws_url: this.ws_url,\n            notebook_path: this.notebook_path,\n            notebook_name: this.notebook_name,\n            kernel_name: kernel_name,\n            notebook: this\n        };\n\n        var success = $.proxy(this._session_started, this);\n        var failure = $.proxy(this._session_start_failed, this);\n\n        if (this.session && this.session.kernel) {\n            this.session.restart(options, success, failure);\n        } else {\n            this.session = new session.Session(options);\n            this.session.start(success, failure);\n        }\n    };\n\n\n    /**\n     * Once a session is started, link the code cells to the kernel and pass the \n     * comm manager to the widget manager.\n     */\n    Notebook.prototype._session_started = function (){\n        this._session_starting = false;\n        this.kernel = this.session.kernel;\n        var ncells = this.ncells();\n        for (var i=0; i<ncells; i++) {\n            var cell = this.get_cell(i);\n            if (cell instanceof codecell.CodeCell) {\n                cell.set_kernel(this.session.kernel);\n            }\n        }\n    };\n\n    /**\n     * Called when the session fails to start.\n     */\n    Notebook.prototype._session_start_failed = function(jqxhr, status, error){\n        this._session_starting = false;\n        utils.log_ajax_error(jqxhr, status, error);\n    };\n    \n    /**\n     * Prompt the user to restart the kernel and re-run everything.\n     * if options.confirm === false, no confirmation dialog is shown.\n     */\n    Notebook.prototype.restart_run_all = function (options) {\n        var that = this;\n        var restart_options = {};\n        restart_options.confirm = (options || {}).confirm;\n        restart_options.dialog = {\n            notebook: that,\n            keyboard_manager: that.keyboard_manager,\n            title : i18n.msg._(\"Restart kernel and re-run the whole notebook?\"),\n            body : $(\"<p/>\").text(\n                i18n.msg._('Are you sure you want to restart the current kernel and re-execute the whole notebook?  All variables and outputs will be lost.')\n            ),\n            buttons : {\n                \"Restart and Run All Cells\" : {\n                    \"class\" : \"btn-danger\",\n                    \"click\" : function () {\n                        that.execute_all_cells();\n                    },\n                },\n            }\n        };\n        return this._restart_kernel(restart_options);\n    };\n\n    /**\n     * Prompt the user to restart the kernel and clear output.\n     * if options.confirm === false, no confirmation dialog is shown.\n     */\n    Notebook.prototype.restart_clear_output = function (options) {\n        var that = this;\n        var restart_options = {};\n        restart_options.confirm = (options || {}).confirm;\n        restart_options.dialog = {\n            notebook: that,\n            keyboard_manager: that.keyboard_manager,\n            title : i18n.msg._(\"Restart kernel and clear all output?\"),\n            body : $(\"<p/>\").text(\n                i18n.msg._('Do you want to restart the current kernel and clear all output?  All variables and outputs will be lost.')\n            ),\n            buttons : {\n                \"Restart and Clear All Outputs\" : {\n                    \"class\" : \"btn-danger\",\n                    \"click\" : function (){\n                        that.clear_all_output();\n                    },\n                },\n            }\n        };\n        return this._restart_kernel(restart_options);\n    };\n\n    /**\n     * Prompt the user to restart the kernel.\n     * if options.confirm === false, no confirmation dialog is shown.\n     */\n    Notebook.prototype.shutdown_kernel = function (options) {\n        var that = this;\n        var shutdown_options = {};\n        shutdown_options.confirm = (options || {}).confirm;\n        shutdown_options.dialog = {\n            title : \"Shutdown kernel?\",\n            body : $(\"<p/>\").text(\n                'Do you want to shutdown the current kernel?  All variables will be lost.'\n            ),\n            buttons : {\n                \"Shutdown\" : {\n                    \"class\" : \"btn-danger\",\n                    \"click\" : function () {},\n                },\n            }\n        };\n        shutdown_options.kernel_action = function() {\n            that.session.delete();\n        };\n        return this._restart_kernel(shutdown_options);\n    };\n\n    Notebook.prototype.restart_kernel = function (options) {\n        var that = this;\n        var restart_options = {};\n        restart_options.confirm = (options || {}).confirm;\n        restart_options.dialog = {\n            title : i18n.msg._(\"Restart kernel?\"),\n            body : $(\"<p/>\").text(\n                i18n.msg._('Do you want to restart the current kernel?  All variables will be lost.')\n            ),\n            buttons : {\n                \"Restart\" : {\n                    \"class\" : \"btn-danger\",\n                    \"click\" : function () {},\n                },\n            }\n        };\n        return this._restart_kernel(restart_options);\n    };\n    \n    // inner implementation of restart dialog & promise\n    Notebook.prototype._restart_kernel = function (options) {\n        var that = this;\n        options = options || {};\n        var resolve_promise, reject_promise;\n        var promise = new Promise(function (resolve, reject){\n            resolve_promise = resolve;\n            reject_promise = reject;\n        });\n        \n        function restart_and_resolve () {\n            that.kernel.restart(function () {\n                // resolve when the kernel is *ready* not just started\n                that.events.one('kernel_ready.Kernel', resolve_promise);\n            }, reject_promise);\n        }\n\n        var do_kernel_action = options.kernel_action || restart_and_resolve;\n       \n        // no need to confirm if the kernel is not connected\n        if (options.confirm === false || !that.kernel.is_connected()) {\n            var default_button = options.dialog.buttons[Object.keys(options.dialog.buttons)[0]];\n            promise.then(default_button.click);\n            do_kernel_action();\n            return promise;\n        }\n        options.dialog.notebook = this;\n        options.dialog.keyboard_manager = this.keyboard_manager;\n        // add 'Continue running' cancel button\n        var buttons = {\n            \"Continue Running\": {},\n        };\n        // hook up button.click actions after restart promise resolves\n        Object.keys(options.dialog.buttons).map(function (key) {\n            var button = buttons[key] = options.dialog.buttons[key];\n            var click = button.click;\n            button.click = function () {\n                promise.then(click);\n                do_kernel_action();\n            };\n        });\n        options.dialog.buttons = buttons;\n        dialog.modal(options.dialog);\n        return promise;\n    };\n\n    /**\n     * Execute cells corresponding to the given indices.\n     *\n     * @param {list} indices - indices of the cells to execute\n     */\n    Notebook.prototype.execute_cells = function (indices) {\n        if (indices.length === 0) {\n            return;\n        }\n\n        var cell;\n        for (var i = 0; i < indices.length; i++) {\n            cell = this.get_cell(indices[i]);\n            cell.execute();\n        }\n\n        this.select(indices[indices.length - 1]);\n        this.command_mode();\n        this.set_dirty(true);\n    };\n\n    /**\n     * Execute or render cell outputs and go into command mode.\n     */\n    Notebook.prototype.execute_selected_cells = function () {\n        this.execute_cells(this.get_selected_cells_indices());\n    };\n\n    \n    /**\n     * Alias for execute_selected_cells, for backwards compatibility --\n     * previously, doing \"Run Cell\" would only ever run a single cell (hence\n     * `execute_cell`), but now it runs all marked cells, so that's the\n     * preferable function to use. But it is good to keep this function to avoid\n     * breaking existing extensions, etc.\n     */\n    Notebook.prototype.execute_cell = function () {\n        this.execute_selected_cells();\n    };\n\n    /**\n     * Execute or render cell outputs and insert a new cell below.\n     */\n    Notebook.prototype.execute_cell_and_insert_below = function () {\n        var indices = this.get_selected_cells_indices();\n        var cell_index;\n        if (indices.length > 1) {\n            this.execute_cells(indices);\n            cell_index = Math.max.apply(Math, indices);\n        } else {\n            var cell = this.get_selected_cell();\n            cell_index = this.find_cell_index(cell);\n            cell.execute();\n        }\n\n        // If we are at the end always insert a new cell and return\n        if (cell_index === (this.ncells()-1)) {\n            this.command_mode();\n            this.insert_cell_below();\n            this.select(cell_index+1);\n            this.edit_mode();\n            this.scroll_to_bottom();\n            this.set_dirty(true);\n            return;\n        }\n\n        this.command_mode();\n        this.insert_cell_below();\n        this.select(cell_index+1);\n        this.edit_mode();\n        this.set_dirty(true);\n    };\n\n    /**\n     * Execute or render cell outputs and select the next cell.\n     */\n    Notebook.prototype.execute_cell_and_select_below = function () {\n        var indices = this.get_selected_cells_indices();\n        var cell_index;\n        if (indices.length > 1) {\n            this.execute_cells(indices);\n            cell_index = Math.max.apply(Math, indices);\n        } else {\n            var cell = this.get_selected_cell();\n            cell_index = this.find_cell_index(cell);\n            cell.execute();\n        }\n\n        // If we are at the end always insert a new cell and return\n        if (cell_index === (this.ncells()-1)) {\n            this.command_mode();\n            this.insert_cell_below();\n            this.select(cell_index+1);\n            this.edit_mode();\n            this.scroll_to_bottom();\n            this.set_dirty(true);\n            return;\n        }\n\n        this.command_mode();\n        this.select(cell_index+1);\n        this.focus_cell();\n        this.set_dirty(true);\n    };\n\n    /**\n     * Execute all cells below the selected cell.\n     */\n    Notebook.prototype.execute_cells_below = function () {\n        this.execute_cell_range(this.get_selected_index(), this.ncells());\n        this.scroll_to_bottom();\n    };\n\n    /**\n     * Execute all cells above the selected cell.\n     */\n    Notebook.prototype.execute_cells_above = function () {\n        this.execute_cell_range(0, this.get_selected_index());\n    };\n\n    /**\n     * Execute all cells.\n     */\n    Notebook.prototype.execute_all_cells = function () {\n        this.execute_cell_range(0, this.ncells());\n        this.scroll_to_bottom();\n    };\n\n    /**\n     * Execute a contiguous range of cells.\n     * \n     * @param {integer} start - index of the first cell to execute (inclusive)\n     * @param {integer} end - index of the last cell to execute (exclusive)\n     */\n    Notebook.prototype.execute_cell_range = function (start, end) {\n        this.command_mode();\n        var indices = [];\n        for (var i=start; i<end; i++) {\n            indices.push(i);\n        }\n        this.execute_cells(indices);\n    };\n\n    // Persistance and loading\n\n    /**\n     * Getter method for this notebook's name.\n     * \n     * @return {string} This notebook's name (excluding file extension)\n     */\n    Notebook.prototype.get_notebook_name = function () {\n        var nbname = utils.splitext(this.notebook_name)[0];\n        return nbname;\n    };\n\n    /**\n     * Setter method for this notebook's name.\n     *\n     * @param {string} name\n     */\n    Notebook.prototype.set_notebook_name = function (name) {\n        var parent = utils.url_path_split(this.notebook_path)[0];\n        this.notebook_name = name;\n        this.notebook_path = utils.url_path_join(parent, name);\n    };\n\n    /**\n     * Check that a notebook's name is valid.\n     * \n     * @param {string} nbname - A name for this notebook\n     * @return {boolean} True if the name is valid, false if invalid\n     */\n    Notebook.prototype.test_notebook_name = function (nbname) {\n        nbname = nbname || '';\n        if (nbname.length>0 && !this.notebook_name_blacklist_re.test(nbname)) {\n            return true;\n        } else {\n            return false;\n        }\n    };\n\n    /**\n     Move the unused attachments garbage collection logic to TextCell.toJSON.\n     * Load a notebook from JSON (.ipynb).\n     *\n     * @param {object} data - JSON representation of a notebook\n     */\n    Notebook.prototype.fromJSON = function (data) {\n\n        var content = data.content;\n        var ncells = this.ncells();\n        var i;\n        for (i=0; i<ncells; i++) {\n            // Always delete cell 0 as they get renumbered as they are deleted.\n            this._unsafe_delete_cell(0);\n        }\n        // Save the metadata and name.\n        this.metadata = content.metadata;\n        this.notebook_name = data.name;\n        this.notebook_path = data.path;\n        var trusted = true;\n        \n        // Set the codemirror mode from language_info metadata\n        if (this.metadata.language_info !== undefined) {\n            var langinfo = this.metadata.language_info;\n            // Mode 'null' should be plain, unhighlighted text.\n            var cm_mode = langinfo.codemirror_mode || langinfo.name || 'null';\n            this.set_codemirror_mode(cm_mode);\n        }\n        \n        var new_cells = content.cells;\n        ncells = new_cells.length;\n        var cell_data = null;\n        var new_cell = null;\n        for (i=0; i<ncells; i++) {\n            cell_data = new_cells[i];\n            new_cell = this.insert_cell_at_index(cell_data.cell_type, i);\n            new_cell.fromJSON(cell_data);\n            if (new_cell.cell_type === 'code' && !new_cell.output_area.trusted) {\n                trusted = false;\n            }\n        }\n        if (trusted !== this.trusted) {\n            this.trusted = trusted;\n            this.events.trigger(\"trust_changed.Notebook\", trusted);\n        }\n    };\n\n    /**\n     * Dump this notebook into a JSON-friendly object.\n     * \n     * @return {object} A JSON-friendly representation of this notebook.\n     */\n    Notebook.prototype.toJSON = function () {\n        // remove the conversion indicator, which only belongs in-memory\n        delete this.metadata.orig_nbformat;\n        delete this.metadata.orig_nbformat_minor;\n\n        var cells = this.get_cells();\n        var ncells = cells.length;\n        var cell_array = new Array(ncells);\n        var trusted = true;\n        for (var i=0; i<ncells; i++) {\n            var cell = cells[i];\n            if (cell.cell_type === 'code' && !cell.output_area.trusted) {\n                trusted = false;\n            }\n            cell_array[i] = cell.toJSON(true);\n        }\n        var data = {\n            cells: cell_array,\n            metadata: this.metadata,\n            nbformat: this.nbformat,\n            nbformat_minor: this.nbformat_minor\n        };\n        if (trusted !== this.trusted) {\n            this.trusted = trusted;\n            this.events.trigger(\"trust_changed.Notebook\", trusted);\n        }\n        return data;\n    };\n\n    /**\n     * Start an autosave timer which periodically saves the notebook.\n     * \n     * @param {integer} interval - the autosave interval in milliseconds\n     */\n    Notebook.prototype.set_autosave_interval = function (interval) {\n        var that = this;\n        // clear previous interval, so we don't get simultaneous timers\n        if (this.autosave_timer) {\n            clearInterval(this.autosave_timer);\n        }\n        if (!this.writable) {\n            // disable autosave if not writable\n            interval = 0;\n        }\n        \n        this.autosave_interval = this.minimum_autosave_interval = interval;\n        if (interval) {\n            this.autosave_timer = setInterval(function() {\n                if (that.dirty) {\n                    that.save_notebook();\n                }\n            }, interval);\n            this.events.trigger(\"autosave_enabled.Notebook\", interval);\n        } else {\n            this.autosave_timer = null;\n            this.events.trigger(\"autosave_disabled.Notebook\");\n        }\n    };\n    \n    /**\n     * Save this notebook on the server. This becomes a notebook instance's\n     * .save_notebook method *after* the entire notebook has been loaded.\n     *\n     */\n    Notebook.prototype.save_notebook = function (check_last_modified) {\n        if (check_last_modified === undefined) {\n            check_last_modified = true;\n        }\n\n        var error;\n        if (!this._fully_loaded) {\n            error = new Error(\"Load failed, save is disabled\");\n            this.events.trigger('notebook_save_failed.Notebook', error);\n            return Promise.reject(error);\n        } else if (!this.writable) {\n            error = new Error(\"Notebook is read-only\");\n            this.events.trigger('notebook_save_failed.Notebook', error);\n            return Promise.reject(error);\n        }\n\n        // Trigger an event before save, which allows listeners to modify\n        // the notebook as needed.\n        this.events.trigger('before_save.Notebook');\n\n        // Create a JSON model to be sent to the server.\n        var model = {\n            type : \"notebook\",\n            content : this.toJSON()\n        };\n        // time the ajax call for autosave tuning purposes.\n        var start =  new Date().getTime();\n\n        var that = this;\n        var _save = function () {\n            return that.contents.save(that.notebook_path, model).then(\n                $.proxy(that.save_notebook_success, that, start),\n                function (error) {\n                    that.events.trigger('notebook_save_failed.Notebook', error);\n                }\n            );\n        };\n\n        if (check_last_modified) {\n            return this.contents.get(this.notebook_path, {content: false}).then(\n                function (data) {\n                    var last_modified = new Date(data.last_modified);\n                    // We want to check last_modified (disk) > that.last_modified (our last save)\n                    // In some cases the filesystem reports an inconsistent time,\n                    // so we allow 0.5 seconds difference before complaining.\n                    if ((last_modified.getTime() - that.last_modified.getTime()) > 500) {  // 500 ms\n                        console.warn(\"Last saving was done on `\"+that.last_modified+\"`(\"+that._last_modified+\"), \"+\n                                    \"while the current file seem to have been saved on `\"+data.last_modified+\"`\");\n                        if (that._changed_on_disk_dialog !== null) {\n                            // update save callback on the confirmation button\n                            that._changed_on_disk_dialog.find('.save-confirm-btn').click(_save);\n                            // redisplay existing dialog\n                            that._changed_on_disk_dialog.modal('show');\n                        } else {\n                          // create new dialog\n                          that._changed_on_disk_dialog = dialog.modal({\n                            notebook: that,\n                            keyboard_manager: that.keyboard_manager,\n                            title: i18n.msg._(\"Notebook changed\"),\n                            body: i18n.msg._(\"The notebook file has changed on disk since the last time we opened or saved it. \"\n                                  + \"Do you want to overwrite the file on disk with the version open here, or load \"\n                                  + \"the version on disk (reload the page)?\"),\n                            buttons: {\n                                Reload: {\n                                    class: 'btn-warning',\n                                    click: function() {\n                                        window.location.reload();\n                                    }\n                                },\n                                Cancel: {},\n                                Overwrite: {\n                                    class: 'btn-danger save-confirm-btn',\n                                    click: function () {\n                                        _save();\n                                    }\n                                },\n                            }\n                          });\n                        }\n                    } else {\n                        return _save();\n                    }\n                }, function (error) {\n                    // maybe it has been deleted or renamed? Go ahead and save.\n                    return _save();\n                }\n            );\n        } else {\n            return _save();\n        }\n    };\n    \n    /**\n     * Success callback for saving a notebook.\n     * \n     * @param {integer} start - Time when the save request start\n     * @param {object}  data - JSON representation of a notebook\n     */\n    Notebook.prototype.save_notebook_success = function (start, data) {\n        this.set_dirty(false);\n        this.last_modified = new Date(data.last_modified);\n        // debug 484\n        this._last_modified = 'save-success:'+data.last_modified;\n        if (data.message) {\n            // save succeeded, but validation failed.\n            var body = $(\"<div>\");\n            var title = i18n.msg._(\"Notebook validation failed\");\n\n            body.append($(\"<p>\").text(\n                i18n.msg._(\"The save operation succeeded,\" +\n                \" but the notebook does not appear to be valid.\" +\n                \" The validation error was:\")\n            )).append($(\"<div>\").addClass(\"validation-error\").append(\n                $(\"<pre>\").text(data.message)\n            ));\n            dialog.modal({\n                notebook: this,\n                keyboard_manager: this.keyboard_manager,\n                title: title,\n                body: body,\n                buttons : {\n                    OK : {\n                        \"class\" : \"btn-primary\"\n                    }\n                }\n            });\n        }\n        this.events.trigger('notebook_saved.Notebook');\n        this._update_autosave_interval(start);\n        if (this._checkpoint_after_save) {\n            this.create_checkpoint();\n            this._checkpoint_after_save = false;\n        }\n    };\n    \n    /**\n     * Update the autosave interval based on the duration of the last save.\n     * \n     * @param {integer} timestamp - when the save request started\n     */\n    Notebook.prototype._update_autosave_interval = function (start) {\n        var duration = (new Date().getTime() - start);\n        if (this.autosave_interval) {\n            // new save interval: higher of 10x save duration or parameter (default 30 seconds)\n            var interval = Math.max(10 * duration, this.minimum_autosave_interval);\n            // ceil to 10 seconds, otherwise we will be setting a new interval too often\n            // do not round or anything below 5000ms will desactivate saving.\n            interval = 10000 * Math.ceil(interval / 10000);\n            // set new interval, if it's changed\n            if (interval !== this.autosave_interval) {\n                this.set_autosave_interval(interval);\n            }\n        }\n    };\n\n    /**\n     * Explicitly trust the output of this notebook.\n     */\n    Notebook.prototype.trust_notebook = function () {\n        var body = $(\"<div>\").append($(\"<p>\")\n            .text(i18n.msg._(\"A trusted Jupyter notebook may execute hidden malicious code when you open it. \" +\n                    \"Selecting trust will immediately reload this notebook in a trusted state. \" +\n                    \"For more information, see the Jupyter security documentation: \"))\n            .append($(\"<a>\").attr(\"href\", \"https://jupyter-notebook.readthedocs.io/en/latest/security.html\")\n                .text(i18n.msg._(\"here\"))\n            )\n        );\n\n        var nb = this;\n        dialog.modal({\n            notebook: this,\n            keyboard_manager: this.keyboard_manager,\n            title: i18n.msg._(\"Trust this notebook?\"),\n            body: body,\n\n            buttons: {\n                Cancel : {},\n                Trust : {\n                    class : \"btn-danger\",\n                    click : function () {\n                        var cells = nb.get_cells();\n                        for (var i = 0; i < cells.length; i++) {\n                            var cell = cells[i];\n                            if (cell.cell_type === 'code') {\n                                cell.output_area.trusted = true;\n                            }\n                        }\n                        // If its write only and dirty, save before \n                        // trusting\n                        var pr;\n                        if(nb.writable && nb.dirty) {\n                            pr = nb.save_notebook();\n                        }\n                        else {\n                            pr = Promise.resolve();\n                        }\n                        return pr.then(function() {                            \n                            nb.contents.trust(nb.notebook_path)\n                            .then(function(res) {\n                                nb.events.trigger(\"trust_changed.Notebook\", true);\n                                window.location.reload();\n                            }, function(err) {\n                                console.log(err);\n                            });\n                        });\n                    }\n                }\n            }\n        });\n    };\n\n    /**\n     * Make a copy of the current notebook.\n     * If the notebook has unsaved changes, it is saved first.\n     */\n    Notebook.prototype.copy_notebook = function () {\n        var that = this;\n        var base_url = this.base_url;\n        var w = window.open('', IPython._target);\n        var parent = utils.url_path_split(this.notebook_path)[0];\n        var p;\n        if (this.dirty && this.writable) {\n            p = this.save_notebook(true);\n        } else {\n            p = Promise.resolve();\n        }\n        return p.then(function () {\n            return that.contents.copy(that.notebook_path, parent).then(\n                function (data) {\n                    w.location = utils.url_path_join(\n                        base_url, 'notebooks', utils.encode_uri_components(data.path)\n                    );\n                },\n                function(error) {\n                    w.close();\n                    that.events.trigger('notebook_copy_failed', error);\n                }\n            );\n        });\n    };\n    \n    /**\n     * Ensure a filename has the right extension\n     * Returns the filename with the appropriate extension, appending if necessary.\n     */\n    Notebook.prototype.ensure_extension = function (name) {\n        var ext = utils.splitext(this.notebook_path)[1];\n        if (ext.length && name.slice(-ext.length) !== ext) {\n            name = name + ext;\n        }\n        return name;\n    };\n\n    /**\n     * Rename the notebook.\n     * @param  {string} new_name\n     * @return {Promise} promise that resolves when the notebook is renamed.\n     */\n    Notebook.prototype.rename = function (new_name) {\n        new_name = this.ensure_extension(new_name);\n\n        var that = this;\n        var parent = utils.url_path_split(this.notebook_path)[0];\n        var new_path = utils.url_path_join(parent, new_name);\n        return this.contents.rename(this.notebook_path, new_path).then(\n            function (json) {\n                that.notebook_name = json.name;\n                that.notebook_path = json.path;\n                that.last_modified = new Date(json.last_modified);\n                // debug 484\n                that._last_modified = json.last_modified;\n                that.session.rename_notebook(json.path);\n                that.events.trigger('notebook_renamed.Notebook', json);\n            }\n        );\n    };\n\n    /**\n     * Delete this notebook\n     */\n    Notebook.prototype.delete = function () {\n        this.contents.delete(this.notebook_path);\n    };\n\n    /**\n     * Request a notebook's data from the server.\n     * \n     * @param {string} notebook_path - A notebook to load\n     */\n    Notebook.prototype.load_notebook = function (notebook_path) {\n        this.notebook_path = notebook_path;\n        this.notebook_name = utils.url_path_split(this.notebook_path)[1];\n        this.events.trigger('notebook_loading.Notebook');\n        this.contents.get(notebook_path, {type: 'notebook'}).then(\n            $.proxy(this.load_notebook_success, this),\n            $.proxy(this.load_notebook_error, this)\n        );\n    };\n\n    /**\n     * Success callback for loading a notebook from the server.\n     * \n     * Load notebook data from the JSON response.\n     * \n     * @param {object} data JSON representation of a notebook\n     */\n    Notebook.prototype.load_notebook_success = function (data) {\n        var failed, msg;\n        try {\n            this.fromJSON(data);\n        } catch (e) {\n            failed = e;\n            console.error(\"Notebook failed to load from JSON:\", e);\n        }\n        if (failed || data.message) {\n            // *either* fromJSON failed or validation failed\n            var body = $(\"<div>\");\n            var title;\n            if (failed) {\n                title = i18n.msg._(\"Notebook failed to load\");\n                body.append($(\"<p>\").text(\n                    i18n.msg._(\"The error was: \")\n                )).append($(\"<div>\").addClass(\"js-error\").text(\n                    failed.toString()\n                )).append($(\"<p>\").text(\n                    i18n.msg._(\"See the error console for details.\")\n                ));\n            } else {\n                title = i18n.msg._(\"Notebook validation failed\");\n            }\n\n            if (data.message) {\n                if (failed) {\n                    msg = i18n.msg._(\"The notebook also failed validation:\");\n                } else {\n                    msg = i18n.msg._(\"An invalid notebook may not function properly.\" +\n                    \" The validation error was:\");\n                }\n                body.append($(\"<p>\").text(\n                    msg\n                )).append($(\"<div>\").addClass(\"validation-error\").append(\n                    $(\"<pre>\").text(data.message)\n                ));\n            }\n\n            dialog.modal({\n                notebook: this,\n                keyboard_manager: this.keyboard_manager,\n                title: title,\n                body: body,\n                buttons : {\n                    OK : {\n                        \"class\" : \"btn-primary\"\n                    }\n                }\n            });\n        }\n        if (this.ncells() === 0) {\n            this.insert_cell_below('code');\n            this.edit_mode(0);\n        } else {\n            this.select(0);\n            this.handle_command_mode(this.get_cell(0));\n        }\n        this.set_dirty(false);\n        this.scroll_to_top();\n        this.writable = data.writable || false;\n        this.last_modified = new Date(data.last_modified);\n        // debug 484\n        this._last_modified = 'load-success:'+data.last_modified;\n        var nbmodel = data.content;\n        var orig_nbformat = nbmodel.metadata.orig_nbformat;\n        var orig_nbformat_minor = nbmodel.metadata.orig_nbformat_minor;\n        if (orig_nbformat !== undefined && nbmodel.nbformat !== orig_nbformat) {\n            var oldmsg = i18n.msg._(\"This notebook has been converted from an older notebook format\" +\n            \" to the current notebook format v(%s).\");\n            var newmsg = i18n.msg._(\"This notebook has been converted from a newer notebook format\" +\n            \" to the current notebook format v(%s).\");\n            if (nbmodel.nbformat > orig_nbformat) {\n                msg = i18n.msg.sprintf(oldmsg,nbmodel.nbformat);\n            } else {\n                msg = i18n.msg.sprintf(newmsg,nbmodel.nbformat);\n            }\n            msg += \" \";\n            msg += i18n.msg._(\"The next time you save this notebook, the \" +\n            \"current notebook format will be used.\");\n            \n            msg += \" \";\n            if (nbmodel.nbformat > orig_nbformat) {\n                msg += i18n.msg._(\"Older versions of Jupyter may not be able to read the new format.\");\n            } else {\n                msg += i18n.msg._(\"Some features of the original notebook may not be available.\");\n            }\n            msg += \" \";\n            msg += i18n.msg._(\"To preserve the original version, close the \" +\n                \"notebook without saving it.\");\n            dialog.modal({\n                notebook: this,\n                keyboard_manager: this.keyboard_manager,\n                title : i18n.msg._(\"Notebook converted\"),\n                body : msg,\n                buttons : {\n                    OK : {\n                        class : \"btn-primary\"\n                    }\n                }\n            });\n        } else if (this.nbformat_minor < nbmodel.nbformat_minor) {\n            this.nbformat_minor = nbmodel.nbformat_minor;\n        }\n\n        if (this.session === null) {\n            var kernel_name = utils.get_url_param('kernel_name');\n            if (kernel_name) {\n                this.kernel_selector.set_kernel(kernel_name);\n            } else if (this.metadata.kernelspec) {\n                this.kernel_selector.set_kernel(this.metadata.kernelspec);\n            } else if (this.metadata.language) {\n                // compat with IJulia, IHaskell, and other early kernels\n                // adopters that where setting a language metadata.\n                this.kernel_selector.set_kernel({\n                    name: i18n.msg._(\"(No name)\"),\n                    language: this.metadata.language\n                  });\n                // this should be stored in kspec now, delete it.\n                // remove once we do not support notebook v3 anymore.\n                delete this.metadata.language;\n            } else {\n                // setting kernel via set_kernel above triggers start_session,\n                // otherwise start a new session with the server's default kernel\n                // spec_changed events will fire after kernel is loaded\n                this.start_session();\n            }\n        }\n        // load our checkpoint list\n        this.list_checkpoints();\n        \n        // load toolbar state\n        if (this.metadata.celltoolbar) {\n            celltoolbar.CellToolbar.global_show();\n            celltoolbar.CellToolbar.activate_preset(this.metadata.celltoolbar);\n        } else {\n            celltoolbar.CellToolbar.global_hide();\n        }\n        \n        if (!this.writable) {\n            this.set_autosave_interval(0);\n            this.events.trigger('notebook_read_only.Notebook');\n        }\n        \n        // now that we're fully loaded, it is safe to restore save functionality\n        this._fully_loaded = true;\n        this.events.trigger('notebook_loaded.Notebook');\n    };\n\n    Notebook.prototype.set_kernelselector = function(k_selector){\n        this.kernel_selector = k_selector;\n    };\n\n    /**\n     * Failure callback for loading a notebook from the server.\n     * \n     * @param {Error} error\n     */\n    Notebook.prototype.load_notebook_error = function (error) {\n        this.events.trigger('notebook_load_failed.Notebook', error);\n        var msg;\n        if (error.name === utils.XHR_ERROR && error.xhr.status === 500) {\n            utils.log_ajax_error(error.xhr, error.xhr_status, error.xhr_error);\n            msg = i18n.msg.sprintf(i18n.msg._(\"An unknown error occurred while loading this notebook. \" +\n            \"This version can load notebook formats %s or earlier. See the server log for details.\",\n            \"v\" + this.nbformat));\n        } else {\n            msg = error.message;\n            console.warn('Error stack trace while loading notebook was:');\n            console.warn(error.stack);\n        }\n        dialog.modal({\n            notebook: this,\n            keyboard_manager: this.keyboard_manager,\n            title: i18n.msg._(\"Error loading notebook\"),\n            body : msg,\n            buttons : {\n                \"OK\": {}\n            }\n        });\n    };\n\n    /*********************  checkpoint-related  ********************/\n    \n    /**\n     * Save the notebook then immediately create a checkpoint.\n     */\n    Notebook.prototype.save_checkpoint = function () {\n        this._checkpoint_after_save = true;\n        this.save_notebook(true);\n    };\n    \n    /**\n     * Add a checkpoint for this notebook.\n     */\n    Notebook.prototype.add_checkpoint = function (checkpoint) {\n        var found = false;\n        for (var i = 0; i < this.checkpoints.length; i++) {\n            var existing = this.checkpoints[i];\n            if (existing.id === checkpoint.id) {\n                found = true;\n                this.checkpoints[i] = checkpoint;\n                break;\n            }\n        }\n        if (!found) {\n            this.checkpoints.push(checkpoint);\n        }\n        this.last_checkpoint = this.checkpoints[this.checkpoints.length - 1];\n    };\n    \n    /**\n     * List checkpoints for this notebook.\n     */\n    Notebook.prototype.list_checkpoints = function () {\n        var that = this;\n        this.contents.list_checkpoints(this.notebook_path).then(\n            $.proxy(this.list_checkpoints_success, this),\n            function(error) {\n                that.events.trigger('list_checkpoints_failed.Notebook', error);\n            }\n        );\n    };\n\n    /**\n     * Success callback for listing checkpoints.\n     * \n     * @param {object} data - JSON representation of a checkpoint\n     */\n    Notebook.prototype.list_checkpoints_success = function (data) {\n        this.checkpoints = data;\n        if (data.length) {\n            this.last_checkpoint = data[data.length - 1];\n        } else {\n            this.last_checkpoint = null;\n        }\n        this.events.trigger('checkpoints_listed.Notebook', [data]);\n    };\n\n    /**\n     * Create a checkpoint of this notebook on the server from the most recent save.\n     */\n    Notebook.prototype.create_checkpoint = function () {\n        var that = this;\n        this.contents.create_checkpoint(this.notebook_path).then(\n            $.proxy(this.create_checkpoint_success, this),\n            function (error) {\n                that.events.trigger('checkpoint_failed.Notebook', error);\n            }\n        );\n    };\n\n    /**\n     * Success callback for creating a checkpoint.\n     * \n     * @param {object} data - JSON representation of a checkpoint\n     */\n    Notebook.prototype.create_checkpoint_success = function (data) {\n        this.add_checkpoint(data);\n        this.events.trigger('checkpoint_created.Notebook', data);\n    };\n\n    /**\n     * Display the restore checkpoint dialog\n     * @param  {string} checkpoint ID\n     */\n    Notebook.prototype.restore_checkpoint_dialog = function (checkpoint) {\n        var that = this;\n        checkpoint = checkpoint || this.last_checkpoint;\n        if ( ! checkpoint ) {\n            console.log(\"restore dialog, but no checkpoint to restore to!\");\n            return;\n        }\n        var body = $('<div/>').append(\n            $('<p/>').addClass(\"p-space\").text(\n                i18n.msg._(\"Are you sure you want to revert the notebook to \" +\n                \"the latest checkpoint?\")\n            ).append(\n                $(\"<strong/>\").text(\" \"+i18n.msg._(\"This cannot be undone.\"))\n            )\n        ).append(\n            $('<p/>').addClass(\"p-space\").text(i18n.msg._(\"The checkpoint was last updated at:\"))\n        ).append(\n            $('<p/>').addClass(\"p-space\").text(\n                moment(checkpoint.last_modified).format('LLLL') +\n                ' ('+moment(checkpoint.last_modified).fromNow()+')'// Long form:  Tuesday, January 27, 2015 12:15 PM\n            ).css(\"text-align\", \"center\")\n        );\n        \n        dialog.modal({\n            notebook: this,\n            keyboard_manager: this.keyboard_manager,\n            title : i18n.msg._(\"Revert notebook to checkpoint\"),\n            body : body,\n            default_button: \"Cancel\",\n            buttons : {\n                Cancel: {},\n                Revert : {\n                    class : \"btn-danger\",\n                    click : function () {\n                        that.restore_checkpoint(checkpoint.id);\n                    }\n                }\n            }\n        });\n    };\n    \n    /**\n     * Restore the notebook to a checkpoint state.\n     * \n     * @param {string} checkpoint ID\n     */\n    Notebook.prototype.restore_checkpoint = function (checkpoint) {\n        this.events.trigger('notebook_restoring.Notebook', checkpoint);\n        var that = this;\n        this.contents.restore_checkpoint(this.notebook_path, checkpoint).then(\n            $.proxy(this.restore_checkpoint_success, this),\n            function (error) {\n                that.events.trigger('checkpoint_restore_failed.Notebook', error);\n            }\n        );\n    };\n    \n    /**\n     * Success callback for restoring a notebook to a checkpoint.\n     */\n    Notebook.prototype.restore_checkpoint_success = function () {\n        this.events.trigger('checkpoint_restored.Notebook');\n        this.load_notebook(this.notebook_path);\n    };\n\n    /**\n     * Delete a notebook checkpoint.\n     * \n     * @param {string} checkpoint ID\n     */\n    Notebook.prototype.delete_checkpoint = function (checkpoint) {\n        this.events.trigger('notebook_restoring.Notebook', checkpoint);\n        var that = this;\n        this.contents.delete_checkpoint(this.notebook_path, checkpoint).then(\n            $.proxy(this.delete_checkpoint_success, this),\n            function (error) {\n                that.events.trigger('checkpoint_delete_failed.Notebook', error);\n            }\n        );\n    };\n    \n    /**\n     * Success callback for deleting a notebook checkpoint.\n     */\n    Notebook.prototype.delete_checkpoint_success = function () {\n        this.events.trigger('checkpoint_deleted.Notebook');\n        this.load_notebook(this.notebook_path);\n    };\n\n    return {Notebook: Notebook};\n})\n;\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/page',[\n    'jquery',\n    'base/js/events',\n], function($, events){\n    \"use strict\";\n\n    var Page = function (header_div_selector, site_div_selector) {\n        /**\n        * Constructor\n        *\n        * Parameters\n        * header_div_selector: string\n        * site_div_selector: string\n        */\n        this.header_div_element = $(header_div_selector || 'div#header');\n        this.site_div_element = $(site_div_selector || 'div#site');\n\n        this.bind_events();\n    };\n\n    Page.prototype.bind_events = function () {\n        // resize site on:\n        // - window resize\n        // - header change\n        // - page load\n        var _handle_resize = $.proxy(this._resize_site, this);\n        \n        $(window).resize(_handle_resize);\n\n        // On document ready, resize codemirror.\n        $(document).ready(_handle_resize);\n        events.on('resize-header.Page', _handle_resize);\n    };\n\n    Page.prototype.show = function () {\n        /**\n         * The header and site divs start out hidden to prevent FLOUC.\n         * Main scripts should call this method after styling everything.\n         */\n        this.show_header();\n        this.show_site();\n    };\n\n    Page.prototype.show_header = function () {\n        /**\n         * The header and site divs start out hidden to prevent FLOUC.\n         * Main scripts should call this method after styling everything.\n         */\n        this.header_div_element.css('display','block');\n    };\n\n    Page.prototype.show_site = function () {\n        /**\n         * The header and site divs start out hidden to prevent FLOUC.\n         * Main scripts should call this method after styling everything.\n         */\n        this.site_div_element.css('display', 'block');\n        this._resize_site();\n    };\n\n\n\n    Page.prototype._resize_site = function(e) {\n        /**\n         * Update the site's size.\n         */\n\n        // In the case an event is passed in, only trigger if the event does\n        // *not* have a target DOM node (i.e., it is not bubbling up). See\n        // https://bugs.jquery.com/ticket/9841#comment:8\n        if (!(e && e.target && e.target.tagName)) {\n            $('div#site').height($(window).height() - $('#header').height());\n        }\n    };\n\n    return {'Page': Page};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Define an object to attach promises to for one-time events.\n\ndefine('base/js/promises',['base/js/events', 'base/js/namespace'], function(events, Jupyter) {\n    \"use strict\";\n\n    // Promise to be resolved when the application is initialized.\n    // The value is the name of the app on the current page.\n    var app_initialized = new Promise(function(resolve, reject) {\n        events.on('app_initialized.NotebookApp', function() {\n            resolve('NotebookApp');\n        });\n        events.on('app_initialized.DashboardApp', function() {\n            resolve('DashboardApp');\n        });\n    });\n\n    var promises = {\n        app_initialized: app_initialized\n    };\n    Jupyter.promises = promises;\n\n    return promises;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('auth/js/loginwidget',[\n    'jquery',\n    'base/js/utils',\n], function($, utils){\n    \"use strict\";\n\n    var LoginWidget = function (selector, options) {\n        options = options || {};\n        this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n        this.selector = selector;\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.bind_events();\n        }\n    };\n\n\n    LoginWidget.prototype.bind_events = function () {\n        var that = this;\n        this.element.find(\"button#logout\").click(function () {\n            window.location = utils.url_path_join(\n                that.base_url,\n                \"logout\"\n            );\n        });\n        this.element.find(\"button#login\").click(function () {\n            window.location = utils.url_path_join(\n                that.base_url,\n                \"login\"\n            );\n        });\n    };\n\n    return {'LoginWidget': LoginWidget};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/toolbar',['jquery','base/js/i18n'], function($, i18n) {\n    \"use strict\";\n\n    /**\n     * A generic toolbar on which one can add button\n     * @class ToolBar\n     * @constructor\n     * @param {Dom_object} selector\n     */\n    var ToolBar = function (selector, options) {\n        this.selector = selector;\n        this.actions = (options||{}).actions;\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.style();\n        }\n    };\n\n    ToolBar.prototype._pseudo_actions={};\n\n\n    ToolBar.prototype.construct = function (config) {\n        for(var k=0; k<config.length; k++) {\n            this.add_buttons_group(config[k][0],config[k][1]);\n        }\n    };\n\n    /**\n     *  Add a group of button into the current toolbar.\n     *\n     *  Use a [dict of [list of action name]] to trigger\n     *  on click to the button\n     *\n     *  @example\n     *\n     *      ... todo, maybe use a list of  list to keep ordering.\n     *\n     *      [\n     *          [\n     *            [\n     *              action_name_1,\n     *              action_name_2,\n     *              action_name_3,\n     *            ],\n     *            optional_group_name\n     *          ],\n     *          ...\n     *      ]\n     *\n     *  @param list {List}\n     *      List of button of the group, with the following paramter for each :\n     *      @param list.label {string} text to show on button hover\n     *      @param list.icon {string} icon to choose from [Font Awesome](http://fortawesome.github.io/Font-Awesome)\n     *      @param list.callback {function} function to be called on button click\n     *      @param [list.id] {String} id to give to the button\n     *  @param [group_id] {String} optionnal id to give to the group\n     *\n     *\n     *  for private usage, the key can also be strings starting with '<' and ending with '>' to inject custom element that cannot\n     *  be bound to an action.\n     *\n     */\n    // TODO JUPYTER:\n    // get rid of legacy code that handle things that are not actions.\n    ToolBar.prototype.add_buttons_group = function (list, group_id) {\n        // handle custom call of pseudoaction binding.\n        if(typeof(list) === 'string' && list.slice(0,1) === '<' && list.slice(-1) === '>'){\n            var _pseudo_action;\n            try{\n                _pseudo_action = list.slice(1,-1);\n                this.element.append(this._pseudo_actions[_pseudo_action].call(this));\n            } catch (e) {\n                console.warn('ouch, calling ', _pseudo_action, 'does not seem to work...:', e);\n            }\n            return ;\n        }\n        var that = this;\n        var btn_group = $('<div/>').addClass(\"btn-group\");\n        if( group_id !== undefined ) {\n            btn_group.attr('id',group_id);\n        }\n        list.forEach(function(el) {\n                var action_name;\n                var action;\n                if(typeof(el) === 'string'){\n                    action = that.actions.get(el);\n                    action_name = el;\n                } else if (el.action) {\n                    action = that.actions.get(el.action);\n                    action_name = el.action\n                }\n                var button  = $('<button/>')\n                    .addClass('btn btn-default')\n                    .attr(\"title\", el.label||i18n.msg._(action.help))\n                    .append(\n                        $(\"<i/>\").addClass(el.icon||(action||{icon:'fa-exclamation-triangle'}).icon).addClass('fa')\n                    );\n                if (el.label) {\n                    var label = $('<span/>').text(i18n.msg._(el.label)).addClass('toolbar-btn-label');\n                    button.append(label);\n                }\n                var id = el.id;\n                if( id !== undefined ){\n                    button.attr('id',id);\n                }\n                button.attr('data-jupyter-action', action_name);\n                var fun = el.callback|| function(){\n                    that.actions.call(action_name);\n                };\n                button.click(fun);\n                btn_group.append(button);\n        });\n        $(this.selector).append(btn_group);\n        return btn_group;\n    };\n\n    ToolBar.prototype.style = function () {\n        this.element.addClass('toolbar');\n    };\n\n    /**\n     * Show and hide toolbar\n     * @method toggle\n     */\n    ToolBar.prototype.toggle = function () {\n        this.element.toggle();\n    };\n\n    /**\n     * A simple class to hold information defining one toolbar button.\n     * @class ToolBar\n     * @constructor\n     * @param action {String} name of a Jupyter action taken when pressed\n     * @param options.label {String} short label to display on the button\n     */\n    var Button = function(action, options) {\n        this.action = action;\n        this.label = (options||{}).label;\n    };\n\n    return {\n        'ToolBar': ToolBar,\n        'Button': Button\n    };\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/maintoolbar',[\n    'jquery',\n    'require',\n    './toolbar',\n    './celltoolbar',\n    'base/js/i18n'\n], function($, require, toolbar, celltoolbar, i18n) {\n    \"use strict\";\n\n    var MainToolBar = function (selector, options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  selector: string\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance\n         *          notebook: Notebook instance\n         **/\n        toolbar.ToolBar.apply(this, [selector, options] );\n        this.events = options.events;\n        this.notebook = options.notebook;\n        this._make();\n        Object.seal(this);\n    };\n\n    MainToolBar.prototype = Object.create(toolbar.ToolBar.prototype);\n\n    MainToolBar.prototype._make = function () {\n        var grps = [\n          [\n            ['jupyter-notebook:save-notebook'],\n            'save-notbook'\n          ],\n          [\n            ['jupyter-notebook:insert-cell-below'],\n            'insert_above_below'],\n          [\n            ['jupyter-notebook:cut-cell',\n             'jupyter-notebook:copy-cell',\n             'jupyter-notebook:paste-cell-below'\n            ] ,\n            'cut_copy_paste'],\n          [\n            ['jupyter-notebook:move-cell-up',\n             'jupyter-notebook:move-cell-down'\n            ],\n            'move_up_down'],\n          [ [new toolbar.Button('jupyter-notebook:run-cell-and-select-next',\n                {label: i18n.msg._('Run')}),\n             'jupyter-notebook:interrupt-kernel',\n             'jupyter-notebook:confirm-restart-kernel'\n            ],\n            'run_int'],\n         ['<add_celltype_list>'],\n         [['jupyter-notebook:show-command-palette']]\n        ];\n        this.construct(grps);\n    };\n   \n    MainToolBar.prototype._pseudo_actions = {};\n\n    // add a cell type drop down to the maintoolbar.\n    // triggered when the pseudo action `<add_celltype_list>` is\n    // encountered when building a toolbar.\n    MainToolBar.prototype._pseudo_actions.add_celltype_list = function () {\n        var that = this;\n        var multiselect = $('<option/>').attr('value','multiselect').attr('disabled','').text('-');\n        var sel = $('<select/>')\n            .attr('id','cell_type')\n            .addClass('form-control select-xs')\n            .append($('<option/>').attr('value','code').text(i18n.msg._('Code')))\n            .append($('<option/>').attr('value','markdown').text(i18n.msg._('Markdown')))\n            .append($('<option/>').attr('value','raw').text(i18n.msg._('Raw NBConvert')))\n            .append($('<option/>').attr('value','heading').text(i18n.msg._('Heading')))\n            .append(multiselect);\n        this.notebook.keyboard_manager.register_events(sel);\n        this.events.on('selected_cell_type_changed.Notebook', function (event, data) {\n            if ( that.notebook.get_selected_cells_indices().length > 1) {\n                multiselect.show();\n                sel.val('multiselect');\n            } else {\n                multiselect.hide()\n                if (data.cell_type === 'heading') {\n                    sel.val('Markdown');\n                } else {\n                    sel.val(data.cell_type);\n                }\n            }\n        });\n        sel.change(function () {\n            var cell_type = $(this).val();\n            switch (cell_type) {\n            case 'code':\n                that.notebook.cells_to_code();\n                break;\n            case 'markdown':\n                that.notebook.cells_to_markdown();\n                break;\n            case 'raw':\n                that.notebook.cells_to_raw();\n                break;\n            case 'heading':\n                that.notebook._warn_heading();\n                that.notebook.to_heading();\n                sel.val('markdown');\n                break;\n            case 'multiselect':\n                break;\n            default:\n                console.log(i18n.msg._(\"unrecognized cell type:\"), cell_type);\n            }\n            that.notebook.focus_cell();\n        });\n        return sel;\n\n    };\n\n    return {'MainToolBar': MainToolBar};\n});\n\n",
    "!function(factory){\"function\"==typeof define&&define.amd?define('jquery-ui',[\"jquery\"],factory):factory(jQuery)}(function($){function visible(element){for(var visibility=element.css(\"visibility\");\"inherit\"===visibility;)element=element.parent(),visibility=element.css(\"visibility\");return\"hidden\"!==visibility}function datepicker_getZindex(elem){for(var position,value;elem.length&&elem[0]!==document;){if((\"absolute\"===(position=elem.css(\"position\"))||\"relative\"===position||\"fixed\"===position)&&(value=parseInt(elem.css(\"zIndex\"),10),!isNaN(value)&&0!==value))return value;elem=elem.parent()}return 0}function Datepicker(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[\"\"]),this.regional.en=$.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=$.extend(!0,{},this.regional.en),this.dpDiv=datepicker_bindHover($(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}function datepicker_bindHover(dpDiv){var selector=\"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";return dpDiv.on(\"mouseout\",selector,function(){$(this).removeClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&$(this).removeClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&$(this).removeClass(\"ui-datepicker-next-hover\")}).on(\"mouseover\",selector,datepicker_handleMouseover)}function datepicker_handleMouseover(){$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])||($(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\"),$(this).addClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&$(this).addClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&$(this).addClass(\"ui-datepicker-next-hover\"))}function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props)null==props[name]&&(target[name]=props[name]);return target}function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments),this._refresh(),previous!==this.element.val()&&this._trigger(\"change\")}}$.ui=$.ui||{};var widgetUuid=($.ui.version=\"1.12.1\",0),widgetSlice=Array.prototype.slice;$.cleanData=function(orig){return function(elems){var events,elem,i;for(i=0;null!=(elem=elems[i]);i++)try{events=$._data(elem,\"events\"),events&&events.remove&&$(elem).triggerHandler(\"remove\")}catch(e){}orig(elems)}}($.cleanData),$.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(\".\")[0];name=name.split(\".\")[1];var fullName=namespace+\"-\"+name;return prototype||(prototype=base,base=$.Widget),$.isArray(prototype)&&(prototype=$.extend.apply(null,[{}].concat(prototype))),$.expr[\":\"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)},$[namespace]=$[namespace]||{},existingConstructor=$[namespace][name],constructor=$[namespace][name]=function(options,element){if(!this._createWidget)return new constructor(options,element);arguments.length&&this._createWidget(options,element)},$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]}),basePrototype=new base,basePrototype.options=$.widget.extend({},basePrototype.options),$.each(prototype,function(prop,value){if(!$.isFunction(value))return void(proxiedPrototype[prop]=value);proxiedPrototype[prop]=function(){function _super(){return base.prototype[prop].apply(this,arguments)}function _superApply(args){return base.prototype[prop].apply(this,args)}return function(){var returnValue,__super=this._super,__superApply=this._superApply;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}}()}),constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix||name:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName}),existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+\".\"+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor),$.widget.bridge(name,constructor),constructor},$.widget.extend=function(target){for(var key,value,input=widgetSlice.call(arguments,1),inputIndex=0,inputLength=input.length;inputIndex<inputLength;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&void 0!==value&&($.isPlainObject(value)?target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):target[key]=value);return target},$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall=\"string\"==typeof options,args=widgetSlice.call(arguments,1),returnValue=this;return isMethodCall?this.length||\"instance\"!==options?this.each(function(){var methodValue,instance=$.data(this,fullName);return\"instance\"===options?(returnValue=instance,!1):instance?$.isFunction(instance[options])&&\"_\"!==options.charAt(0)?(methodValue=instance[options].apply(instance,args),methodValue!==instance&&void 0!==methodValue?(returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue,!1):void 0):$.error(\"no such method '\"+options+\"' for \"+name+\" widget instance\"):$.error(\"cannot call methods on \"+name+\" prior to initialization; attempted to call method '\"+options+\"'\")}):returnValue=void 0:(args.length&&(options=$.widget.extend.apply(null,[options].concat(args))),this.each(function(){var instance=$.data(this,fullName);instance?(instance.option(options||{}),instance._init&&instance._init()):$.data(this,fullName,new object(options,this))})),returnValue}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{classes:{},disabled:!1,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0],this.element=$(element),this.uuid=widgetUuid++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),this.classesElementLookup={},element!==this&&($.data(element,this.widgetFullName,this),this._on(!0,this.element,{remove:function(event){event.target===element&&this.destroy()}}),this.document=$(element.style?element.ownerDocument:element.document||element),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),options),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var that=this;this._destroy(),$.each(this.classesElementLookup,function(key,value){that._removeClass(value,key)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr(\"aria-disabled\"),this.bindings.off(this.eventNamespace)},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var parts,curOption,i,options=key;if(0===arguments.length)return $.widget.extend({},this.options);if(\"string\"==typeof key)if(options={},parts=key.split(\".\"),key=parts.shift(),parts.length){for(curOption=options[key]=$.widget.extend({},this.options[key]),i=0;i<parts.length-1;i++)curOption[parts[i]]=curOption[parts[i]]||{},curOption=curOption[parts[i]];if(key=parts.pop(),1===arguments.length)return void 0===curOption[key]?null:curOption[key];curOption[key]=value}else{if(1===arguments.length)return void 0===this.options[key]?null:this.options[key];options[key]=value}return this._setOptions(options),this},_setOptions:function(options){var key;for(key in options)this._setOption(key,options[key]);return this},_setOption:function(key,value){return\"classes\"===key&&this._setOptionClasses(value),this.options[key]=value,\"disabled\"===key&&this._setOptionDisabled(value),this},_setOptionClasses:function(value){var classKey,elements,currentElements;for(classKey in value)currentElements=this.classesElementLookup[classKey],value[classKey]!==this.options.classes[classKey]&&currentElements&&currentElements.length&&(elements=$(currentElements.get()),this._removeClass(currentElements,classKey),elements.addClass(this._classes({element:elements,keys:classKey,classes:value,add:!0})))},_setOptionDisabled:function(value){this._toggleClass(this.widget(),this.widgetFullName+\"-disabled\",null,!!value),value&&(this._removeClass(this.hoverable,null,\"ui-state-hover\"),this._removeClass(this.focusable,null,\"ui-state-focus\"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(options){function processClassString(classes,checkOption){var current,i;for(i=0;i<classes.length;i++)current=that.classesElementLookup[classes[i]]||$(),current=$(options.add?$.unique(current.get().concat(options.element.get())):current.not(options.element).get()),that.classesElementLookup[classes[i]]=current,full.push(classes[i]),checkOption&&options.classes[classes[i]]&&full.push(options.classes[classes[i]])}var full=[],that=this;return options=$.extend({element:this.element,classes:this.options.classes||{}},options),this._on(options.element,{remove:\"_untrackClassesElement\"}),options.keys&&processClassString(options.keys.match(/\\S+/g)||[],!0),options.extra&&processClassString(options.extra.match(/\\S+/g)||[]),full.join(\" \")},_untrackClassesElement:function(event){var that=this;$.each(that.classesElementLookup,function(key,value){-1!==$.inArray(event.target,value)&&(that.classesElementLookup[key]=$(value.not(event.target).get()))})},_removeClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!1)},_addClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!0)},_toggleClass:function(element,keys,extra,add){add=\"boolean\"==typeof add?add:extra;var shift=\"string\"==typeof element||null===element,options={extra:shift?keys:extra,keys:shift?element:keys,element:shift?this.element:element,add:add};return options.element.toggleClass(this._classes(options),add),this},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;\"boolean\"!=typeof suppressDisabledCheck&&(handlers=element,element=suppressDisabledCheck,suppressDisabledCheck=!1),handlers?(element=delegateElement=$(element),this.bindings=this.bindings.add(element)):(handlers=element,element=this.element,delegateElement=this.widget()),$.each(handlers,function(event,handler){function handlerProxy(){if(suppressDisabledCheck||!0!==instance.options.disabled&&!$(this).hasClass(\"ui-state-disabled\"))return(\"string\"==typeof handler?instance[handler]:handler).apply(instance,arguments)}\"string\"!=typeof handler&&(handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++);var match=event.match(/^([\\w:-]*)\\s*(.*)$/),eventName=match[1]+instance.eventNamespace,selector=match[2];selector?delegateElement.on(eventName,selector,handlerProxy):element.on(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,element.off(eventName).off(eventName),this.bindings=$(this.bindings.not(element).get()),this.focusable=$(this.focusable.not(element).get()),this.hoverable=$(this.hoverable.not(element).get())},_delay:function(handler,delay){function handlerProxy(){return(\"string\"==typeof handler?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element),this._on(element,{mouseenter:function(event){this._addClass($(event.currentTarget),null,\"ui-state-hover\")},mouseleave:function(event){this._removeClass($(event.currentTarget),null,\"ui-state-hover\")}})},_focusable:function(element){this.focusable=this.focusable.add(element),this._on(element,{focusin:function(event){this._addClass($(event.currentTarget),null,\"ui-state-focus\")},focusout:function(event){this._removeClass($(event.currentTarget),null,\"ui-state-focus\")}})},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];if(data=data||{},event=$.Event(event),event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase(),event.target=this.element[0],orig=event.originalEvent)for(prop in orig)prop in event||(event[prop]=orig[prop]);return this.element.trigger(event,data),!($.isFunction(callback)&&!1===callback.apply(this.element[0],[event].concat(data))||event.isDefaultPrevented())}},$.each({show:\"fadeIn\",hide:\"fadeOut\"},function(method,defaultEffect){$.Widget.prototype[\"_\"+method]=function(element,options,callback){\"string\"==typeof options&&(options={effect:options});var hasOptions,effectName=options?!0===options||\"number\"==typeof options?defaultEffect:options.effect||defaultEffect:method;options=options||{},\"number\"==typeof options&&(options={duration:options}),hasOptions=!$.isEmptyObject(options),options.complete=callback,options.delay&&element.delay(options.delay),hasOptions&&$.effects&&$.effects.effect[effectName]?element[method](options):effectName!==method&&element[effectName]?element[effectName](options.duration,options.easing,callback):element.queue(function(next){$(this)[method](),callback&&callback.call(element[0]),next()})}});$.widget;!function(){function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($.css(element,property),10)||0}function getDimensions(elem){var raw=elem[0];return 9===raw.nodeType?{width:elem.width(),height:elem.height(),offset:{top:0,left:0}}:$.isWindow(raw)?{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}}:raw.preventDefault?{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}}:{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()}}var cachedScrollbarWidth,max=Math.max,abs=Math.abs,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\\+\\-]\\d+(\\.[\\d]+)?%?/,rposition=/^\\w+/,rpercent=/%$/,_position=$.fn.position;$.position={scrollbarWidth:function(){if(void 0!==cachedScrollbarWidth)return cachedScrollbarWidth;var w1,w2,div=$(\"<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\"),innerDiv=div.children()[0];return $(\"body\").append(div),w1=innerDiv.offsetWidth,div.css(\"overflow\",\"scroll\"),w2=innerDiv.offsetWidth,w1===w2&&(w2=div[0].clientWidth),div.remove(),cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?\"\":within.element.css(\"overflow-x\"),overflowY=within.isWindow||within.isDocument?\"\":within.element.css(\"overflow-y\"),hasOverflowX=\"scroll\"===overflowX||\"auto\"===overflowX&&within.width<within.element[0].scrollWidth;return{width:\"scroll\"===overflowY||\"auto\"===overflowY&&within.height<within.element[0].scrollHeight?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&9===withinElement[0].nodeType;return{element:withinElement,isWindow:isWindow,isDocument:isDocument,offset:isWindow||isDocument?{left:0,top:0}:$(element).offset(),scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()}}},$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||\"flip\").split(\" \"),offsets={};return dimensions=getDimensions(target),target[0].preventDefault&&(options.at=\"left top\"),targetWidth=dimensions.width,targetHeight=dimensions.height,targetOffset=dimensions.offset,basePosition=$.extend({},targetOffset),$.each([\"my\",\"at\"],function(){var horizontalOffset,verticalOffset,pos=(options[this]||\"\").split(\" \");1===pos.length&&(pos=rhorizontal.test(pos[0])?pos.concat([\"center\"]):rvertical.test(pos[0])?[\"center\"].concat(pos):[\"center\",\"center\"]),pos[0]=rhorizontal.test(pos[0])?pos[0]:\"center\",pos[1]=rvertical.test(pos[1])?pos[1]:\"center\",horizontalOffset=roffset.exec(pos[0]),verticalOffset=roffset.exec(pos[1]),offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0],options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]}),1===collision.length&&(collision[1]=collision[0]),\"right\"===options.at[0]?basePosition.left+=targetWidth:\"center\"===options.at[0]&&(basePosition.left+=targetWidth/2),\"bottom\"===options.at[1]?basePosition.top+=targetHeight:\"center\"===options.at[1]&&(basePosition.top+=targetHeight/2),atOffset=getOffsets(offsets.at,targetWidth,targetHeight),basePosition.left+=atOffset[0],basePosition.top+=atOffset[1],this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,\"marginLeft\"),marginTop=parseCss(this,\"marginTop\"),collisionWidth=elemWidth+marginLeft+parseCss(this,\"marginRight\")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,\"marginBottom\")+scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());\"right\"===options.my[0]?position.left-=elemWidth:\"center\"===options.my[0]&&(position.left-=elemWidth/2),\"bottom\"===options.my[1]?position.top-=elemHeight:\"center\"===options.my[1]&&(position.top-=elemHeight/2),position.left+=myOffset[0],position.top+=myOffset[1],collisionPosition={marginLeft:marginLeft,marginTop:marginTop},$.each([\"left\",\"top\"],function(i,dir){$.ui.position[collision[i]]&&$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem})}),options.using&&(using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?\"left\":left>0?\"right\":\"center\",vertical:bottom<0?\"top\":top>0?\"bottom\":\"middle\"};targetWidth<elemWidth&&abs(left+right)<targetWidth&&(feedback.horizontal=\"center\"),targetHeight<elemHeight&&abs(top+bottom)<targetHeight&&(feedback.vertical=\"middle\"),max(abs(left),abs(right))>max(abs(top),abs(bottom))?feedback.important=\"horizontal\":feedback.important=\"vertical\",options.using.call(this,props,feedback)}),elem.offset($.extend(position,{using:using}))})},$.ui.position={fit:{left:function(position,data){var newOverRight,within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;data.collisionWidth>outerWidth?overLeft>0&&overRight<=0?(newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset,position.left+=overLeft-newOverRight):position.left=overRight>0&&overLeft<=0?withinOffset:overLeft>overRight?withinOffset+outerWidth-data.collisionWidth:withinOffset:overLeft>0?position.left+=overLeft:overRight>0?position.left-=overRight:position.left=max(position.left-collisionPosLeft,position.left)},top:function(position,data){var newOverBottom,within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;data.collisionHeight>outerHeight?overTop>0&&overBottom<=0?(newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset,position.top+=overTop-newOverBottom):position.top=overBottom>0&&overTop<=0?withinOffset:overTop>overBottom?withinOffset+outerHeight-data.collisionHeight:withinOffset:overTop>0?position.top+=overTop:overBottom>0?position.top-=overBottom:position.top=max(position.top-collisionPosTop,position.top)}},flip:{left:function(position,data){var newOverRight,newOverLeft,within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=\"left\"===data.my[0]?-data.elemWidth:\"right\"===data.my[0]?data.elemWidth:0,atOffset=\"left\"===data.at[0]?data.targetWidth:\"right\"===data.at[0]?-data.targetWidth:0,offset=-2*data.offset[0];overLeft<0?((newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset)<0||newOverRight<abs(overLeft))&&(position.left+=myOffset+atOffset+offset):overRight>0&&((newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft)>0||abs(newOverLeft)<overRight)&&(position.left+=myOffset+atOffset+offset)},top:function(position,data){var newOverTop,newOverBottom,within=data.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,top=\"top\"===data.my[1],myOffset=top?-data.elemHeight:\"bottom\"===data.my[1]?data.elemHeight:0,atOffset=\"top\"===data.at[1]?data.targetHeight:\"bottom\"===data.at[1]?-data.targetHeight:0,offset=-2*data.offset[1];overTop<0?((newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset)<0||newOverBottom<abs(overTop))&&(position.top+=myOffset+atOffset+offset):overBottom>0&&((newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop)>0||abs(newOverTop)<overBottom)&&(position.top+=myOffset+atOffset+offset)}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments),$.ui.position.fit.left.apply(this,arguments)},top:function(){$.ui.position.flip.top.apply(this,arguments),$.ui.position.fit.top.apply(this,arguments)}}}}();var dataSpaceAnimated=($.ui.position,$.extend($.expr[\":\"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem,match[3])}}),$.fn.extend({disableSelection:function(){var eventType=\"onselectstart\"in document.createElement(\"div\")?\"selectstart\":\"mousedown\";return function(){return this.on(eventType+\".ui-disableSelection\",function(event){event.preventDefault()})}}(),enableSelection:function(){return this.off(\".ui-disableSelection\")}}),\"ui-effects-animated\"),jQuery=$;$.effects={effect:{}},function(jQuery,undefined){function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};return null==value?allowEmpty||!prop.def?null:prop.def:(value=type.floor?~~value:parseFloat(value),isNaN(value)?prop.def:type.mod?(value+type.mod)%type.mod:0>value?0:type.max<value?type.max:value)}function stringParse(string){var inst=color(),rgba=inst._rgba=[];return string=string.toLowerCase(),each(stringParsers,function(i,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||\"rgba\";if(values)return parsed=inst[spaceName](values),inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache],rgba=inst._rgba=parsed._rgba,!1}),rgba.length?(\"0,0,0,0\"===rgba.join()&&jQuery.extend(rgba,colors.transparent),inst):colors[string]}function hue2rgb(p,q,h){return h=(h+1)%1,6*h<1?p+(q-p)*h*6:2*h<1?q:3*h<2?p+(q-p)*(2/3-h)*6:p}var colors,rplusequals=/^([\\-+])=\\s*(\\d+\\.?\\d*)/,stringParsers=[{re:/rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,space:\"hsla\",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)},spaces={rgba:{props:{red:{idx:0,type:\"byte\"},green:{idx:1,type:\"byte\"},blue:{idx:2,type:\"byte\"}}},hsla:{props:{hue:{idx:0,type:\"degrees\"},saturation:{idx:1,type:\"percent\"},lightness:{idx:2,type:\"percent\"}}}},propTypes={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},support=color.support={},supportElem=jQuery(\"<p>\")[0],each=jQuery.each;supportElem.style.cssText=\"background-color:rgba(1,1,1,.5)\",support.rgba=supportElem.style.backgroundColor.indexOf(\"rgba\")>-1,each(spaces,function(spaceName,space){space.cache=\"_\"+spaceName,space.props.alpha={idx:3,type:\"percent\",def:1}}),color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(void 0===red)return this._rgba=[null,null,null,null],this;(red.jquery||red.nodeType)&&(red=jQuery(red).css(green),green=void 0);var inst=this,type=jQuery.type(red),rgba=this._rgba=[];return void 0!==green&&(red=[red,green,blue,alpha],type=\"array\"),\"string\"===type?this.parse(stringParse(red)||colors._default):\"array\"===type?(each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop)}),this):\"object\"===type?(red instanceof color?each(spaces,function(spaceName,space){red[space.cache]&&(inst[space.cache]=red[space.cache].slice())}):each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if(\"alpha\"===key||null==red[key])return;inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key],prop,!0)}),inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0&&(inst[cache][3]=1,space.from&&(inst._rgba=space.from(inst[cache])))}),this):void 0},is:function(compare){var is=color(compare),same=!0,inst=this;return each(spaces,function(_,space){var localCache,isCache=is[space.cache];return isCache&&(localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[],each(space.props,function(_,prop){if(null!=isCache[prop.idx])return same=isCache[prop.idx]===localCache[prop.idx]})),same}),same},_space:function(){var used=[],inst=this;return each(spaces,function(spaceName,space){inst[space.cache]&&used.push(spaceName)}),used.pop()},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=0===this.alpha()?color(\"transparent\"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();return end=end[space.cache],each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};null!==endValue&&(null===startValue?result[index]=endValue:(type.mod&&(endValue-startValue>type.mod/2?startValue+=type.mod:startValue-endValue>type.mod/2&&(startValue-=type.mod)),result[index]=clamp((endValue-startValue)*distance+startValue,prop)))}),this[spaceName](result)},blend:function(opaque){if(1===this._rgba[3])return this;var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix=\"rgba(\",rgba=jQuery.map(this._rgba,function(v,i){return null==v?i>2?1:0:v});return 1===rgba[3]&&(rgba.pop(),prefix=\"rgb(\"),prefix+rgba.join()+\")\"},toHslaString:function(){var prefix=\"hsla(\",hsla=jQuery.map(this.hsla(),function(v,i){return null==v&&(v=i>2?1:0),i&&i<3&&(v=Math.round(100*v)+\"%\"),v});return 1===hsla[3]&&(hsla.pop(),prefix=\"hsl(\"),prefix+hsla.join()+\")\"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();return includeAlpha&&rgba.push(~~(255*alpha)),\"#\"+jQuery.map(rgba,function(v){return v=(v||0).toString(16),1===v.length?\"0\"+v:v}).join(\"\")},toString:function(){return 0===this._rgba[3]?\"transparent\":this.toRgbaString()}}),color.fn.parse.prototype=color.fn,spaces.hsla.to=function(rgba){if(null==rgba[0]||null==rgba[1]||null==rgba[2])return[null,null,null,rgba[3]];var h,s,r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=.5*add;return h=min===max?0:r===max?60*(g-b)/diff+360:g===max?60*(b-r)/diff+120:60*(r-g)/diff+240,s=0===diff?0:l<=.5?diff/add:diff/(2-add),[Math.round(h)%360,s,l,null==a?1:a]},spaces.hsla.from=function(hsla){\nif(null==hsla[0]||null==hsla[1]||null==hsla[2])return[null,null,null,hsla[3]];var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(255*hue2rgb(p,q,h+1/3)),Math.round(255*hue2rgb(p,q,h)),Math.round(255*hue2rgb(p,q,h-1/3)),a]},each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]&&(this[cache]=to(this._rgba)),void 0===value)return this[cache].slice();var ret,type=jQuery.type(value),arr=\"array\"===type||\"object\"===type?value:arguments,local=this[cache].slice();return each(props,function(key,prop){var val=arr[\"object\"===type?key:prop.idx];null==val&&(val=local[prop.idx]),local[prop.idx]=clamp(val,prop)}),from?(ret=color(from(local)),ret[cache]=local,ret):color(local)},each(props,function(key,prop){color.fn[key]||(color.fn[key]=function(value){var match,vtype=jQuery.type(value),fn=\"alpha\"===key?this._hsla?\"hsla\":\"rgba\":spaceName,local=this[fn](),cur=local[prop.idx];return\"undefined\"===vtype?cur:(\"function\"===vtype&&(value=value.call(this,cur),vtype=jQuery.type(value)),null==value&&prop.empty?this:(\"string\"===vtype&&(match=rplusequals.exec(value))&&(value=cur+parseFloat(match[2])*(\"+\"===match[1]?1:-1)),local[prop.idx]=value,this[fn](local)))})})}),color.hook=function(hook){var hooks=hook.split(\" \");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor=\"\";if(\"transparent\"!==value&&(\"string\"!==jQuery.type(value)||(parsed=stringParse(value)))){if(value=color(parsed||value),!support.rgba&&1!==value._rgba[3]){for(curElem=\"backgroundColor\"===hook?elem.parentNode:elem;(\"\"===backgroundColor||\"transparent\"===backgroundColor)&&curElem&&curElem.style;)try{backgroundColor=jQuery.css(curElem,\"backgroundColor\"),curElem=curElem.parentNode}catch(e){}value=value.blend(backgroundColor&&\"transparent\"!==backgroundColor?backgroundColor:\"_default\")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}},jQuery.fx.step[hook]=function(fx){fx.colorInit||(fx.start=color(fx.elem,hook),fx.end=color(fx.end),fx.colorInit=!0),jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})},color.hook(\"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\"),jQuery.cssHooks.borderColor={expand:function(value){var expanded={};return each([\"Top\",\"Right\",\"Bottom\",\"Left\"],function(i,part){expanded[\"border\"+part+\"Color\"]=value}),expanded}},colors=jQuery.Color.names={aqua:\"#00ffff\",black:\"#000000\",blue:\"#0000ff\",fuchsia:\"#ff00ff\",gray:\"#808080\",green:\"#008000\",lime:\"#00ff00\",maroon:\"#800000\",navy:\"#000080\",olive:\"#808000\",purple:\"#800080\",red:\"#ff0000\",silver:\"#c0c0c0\",teal:\"#008080\",white:\"#ffffff\",yellow:\"#ffff00\",transparent:[null,null,null,0],_default:\"#ffffff\"}}(jQuery),function(){function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]])for(len=style.length;len--;)key=style[len],\"string\"==typeof style[key]&&(styles[$.camelCase(key)]=style[key]);else for(key in style)\"string\"==typeof style[key]&&(styles[key]=style[key]);return styles}function styleDifference(oldStyle,newStyle){var name,value,diff={};for(name in newStyle)value=newStyle[name],oldStyle[name]!==value&&(shorthandStyles[name]||!$.fx.step[name]&&isNaN(parseFloat(value))||(diff[name]=value));return diff}var classAnimationActions=[\"add\",\"remove\",\"toggle\"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each([\"borderLeftStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderTopStyle\"],function(_,prop){$.fx.step[prop]=function(fx){(\"none\"!==fx.end&&!fx.setAttr||1===fx.pos&&!fx.setAttr)&&(jQuery.style(fx.elem,prop,fx.end),fx.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}),$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var applyClassChange,animated=$(this),baseClass=animated.attr(\"class\")||\"\",allAnimations=o.children?animated.find(\"*\").addBack():animated;allAnimations=allAnimations.map(function(){return{el:$(this),start:getElementStyles(this)}}),applyClassChange=function(){$.each(classAnimationActions,function(i,action){value[action]&&animated[action+\"Class\"](value[action])})},applyClassChange(),allAnimations=allAnimations.map(function(){return this.end=getElementStyles(this.el[0]),this.diff=styleDifference(this.start,this.end),this}),animated.attr(\"class\",baseClass),allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:!1,complete:function(){dfd.resolve(styleInfo)}});return this.el.animate(this.diff,opts),dfd.promise()}),$.when.apply($,allAnimations.get()).done(function(){applyClassChange(),$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,\"\")})}),o.complete.call(animated[0])})})},$.fn.extend({addClass:function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.addClass),removeClass:function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.removeClass),toggleClass:function(orig){return function(classNames,force,speed,easing,callback){return\"boolean\"==typeof force||void 0===force?speed?$.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback):orig.apply(this,arguments):$.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})}(),function(){function _normalizeArguments(effect,options,speed,callback){return $.isPlainObject(effect)&&(options=effect,effect=effect.effect),effect={effect:effect},null==options&&(options={}),$.isFunction(options)&&(callback=options,speed=null,options={}),(\"number\"==typeof options||$.fx.speeds[options])&&(callback=speed,speed=options,options={}),$.isFunction(speed)&&(callback=speed,speed=null),options&&$.extend(effect,options),speed=speed||options.duration,effect.duration=$.fx.off?0:\"number\"==typeof speed?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default,effect.complete=callback||options.complete,effect}function standardAnimationOption(option){return!(option&&\"number\"!=typeof option&&!$.fx.speeds[option])||(\"string\"==typeof option&&!$.effects.effect[option]||(!!$.isFunction(option)||\"object\"==typeof option&&!option.effect))}function parseClip(str,element){var outerWidth=element.outerWidth(),outerHeight=element.outerHeight(),clipRegex=/^rect\\((-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto)\\)$/,values=clipRegex.exec(str)||[\"\",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:\"auto\"===values[2]?outerWidth:parseFloat(values[2]),bottom:\"auto\"===values[3]?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0}}$.expr&&$.expr.filters&&$.expr.filters.animated&&($.expr.filters.animated=function(orig){return function(elem){return!!$(elem).data(dataSpaceAnimated)||orig(elem)}}($.expr.filters.animated)),!1!==$.uiBackCompat&&$.extend($.effects,{save:function(element,set){for(var i=0,length=set.length;i<length;i++)null!==set[i]&&element.data(\"ui-effects-\"+set[i],element[0].style[set[i]])},restore:function(element,set){for(var val,i=0,length=set.length;i<length;i++)null!==set[i]&&(val=element.data(\"ui-effects-\"+set[i]),element.css(set[i],val))},setMode:function(el,mode){return\"toggle\"===mode&&(mode=el.is(\":hidden\")?\"show\":\"hide\"),mode},createWrapper:function(element){if(element.parent().is(\".ui-effects-wrapper\"))return element.parent();var props={width:element.outerWidth(!0),height:element.outerHeight(!0),float:element.css(\"float\")},wrapper=$(\"<div></div>\").addClass(\"ui-effects-wrapper\").css({fontSize:\"100%\",background:\"transparent\",border:\"none\",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}return element.wrap(wrapper),(element[0]===active||$.contains(element[0],active))&&$(active).trigger(\"focus\"),wrapper=element.parent(),\"static\"===element.css(\"position\")?(wrapper.css({position:\"relative\"}),element.css({position:\"relative\"})):($.extend(props,{position:element.css(\"position\"),zIndex:element.css(\"z-index\")}),$.each([\"top\",\"left\",\"bottom\",\"right\"],function(i,pos){props[pos]=element.css(pos),isNaN(parseInt(props[pos],10))&&(props[pos]=\"auto\")}),element.css({position:\"relative\",top:0,left:0,right:\"auto\",bottom:\"auto\"})),element.css(size),wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;return element.parent().is(\".ui-effects-wrapper\")&&(element.parent().replaceWith(element),(element[0]===active||$.contains(element[0],active))&&$(active).trigger(\"focus\")),element}}),$.extend($.effects,{version:\"1.12.1\",define:function(name,mode,effect){return effect||(effect=mode,mode=\"effect\"),$.effects.effect[name]=effect,$.effects.effect[name].mode=mode,effect},scaledDimensions:function(element,percent,direction){if(0===percent)return{height:0,width:0,outerHeight:0,outerWidth:0};var x=\"horizontal\"!==direction?(percent||100)/100:1,y=\"vertical\"!==direction?(percent||100)/100:1;return{height:element.height()*y,width:element.width()*x,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x}},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top}},unshift:function(element,queueLength,count){var queue=element.queue();queueLength>1&&queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count))),element.dequeue()},saveStyle:function(element){element.data(\"ui-effects-style\",element[0].style.cssText)},restoreStyle:function(element){element[0].style.cssText=element.data(\"ui-effects-style\")||\"\",element.removeData(\"ui-effects-style\")},mode:function(element,mode){var hidden=element.is(\":hidden\");return\"toggle\"===mode&&(mode=hidden?\"show\":\"hide\"),(hidden?\"hide\"===mode:\"show\"===mode)&&(mode=\"none\"),mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case\"top\":y=0;break;case\"middle\":y=.5;break;case\"bottom\":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case\"left\":x=0;break;case\"center\":x=.5;break;case\"right\":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createPlaceholder:function(element){var placeholder,cssPosition=element.css(\"position\"),position=element.position();return element.css({marginTop:element.css(\"marginTop\"),marginBottom:element.css(\"marginBottom\"),marginLeft:element.css(\"marginLeft\"),marginRight:element.css(\"marginRight\")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()),/^(static|relative)/.test(cssPosition)&&(cssPosition=\"absolute\",placeholder=$(\"<\"+element[0].nodeName+\">\").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css(\"display\"))?\"inline-block\":\"block\",visibility:\"hidden\",marginTop:element.css(\"marginTop\"),marginBottom:element.css(\"marginBottom\"),marginLeft:element.css(\"marginLeft\"),marginRight:element.css(\"marginRight\"),float:element.css(\"float\")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass(\"ui-effects-placeholder\"),element.data(\"ui-effects-placeholder\",placeholder)),element.css({position:cssPosition,left:position.left,top:position.top}),placeholder},removePlaceholder:function(element){var dataKey=\"ui-effects-placeholder\",placeholder=element.data(dataKey);placeholder&&(placeholder.remove(),element.removeData(dataKey))},cleanUp:function(element){$.effects.restoreStyle(element),$.effects.removePlaceholder(element)},setTransition:function(element,list,factor,value){return value=value||{},$.each(list,function(i,x){var unit=element.cssUnit(x);unit[0]>0&&(value[x]=unit[0]*factor+unit[1])}),value}}),$.fn.extend({effect:function(){function run(next){function cleanup(){elem.removeData(dataSpaceAnimated),$.effects.cleanUp(elem),\"hide\"===args.mode&&elem.hide(),done()}function done(){$.isFunction(complete)&&complete.call(elem[0]),$.isFunction(next)&&next()}var elem=$(this);args.mode=modes.shift(),!1===$.uiBackCompat||defaultMode?\"none\"===args.mode?(elem[mode](),done()):effectMethod.call(elem[0],args,cleanup):(elem.is(\":hidden\")?\"hide\"===mode:\"show\"===mode)?(elem[mode](),done()):effectMethod.call(elem[0],args,done)}var args=_normalizeArguments.apply(this,arguments),effectMethod=$.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||\"fx\",complete=args.complete,mode=args.mode,modes=[],prefilter=function(next){var el=$(this),normalizedMode=$.effects.mode(el,mode)||defaultMode;el.data(dataSpaceAnimated,!0),modes.push(normalizedMode),defaultMode&&(\"show\"===normalizedMode||normalizedMode===defaultMode&&\"hide\"===normalizedMode)&&el.show(),defaultMode&&\"none\"===normalizedMode||$.effects.saveStyle(el),$.isFunction(next)&&next()};return $.fx.off||!effectMethod?mode?this[mode](args.duration,complete):this.each(function(){complete&&complete.call(this)}):!1===queue?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run)},show:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode=\"show\",this.effect.call(this,args)}}($.fn.show),hide:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode=\"hide\",this.effect.call(this,args)}}($.fn.hide),toggle:function(orig){return function(option){if(standardAnimationOption(option)||\"boolean\"==typeof option)return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode=\"toggle\",this.effect.call(this,args)}}($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];return $.each([\"em\",\"px\",\"%\",\"pt\"],function(i,unit){style.indexOf(unit)>0&&(val=[parseFloat(style),unit])}),val},cssClip:function(clipObj){return clipObj?this.css(\"clip\",\"rect(\"+clipObj.top+\"px \"+clipObj.right+\"px \"+clipObj.bottom+\"px \"+clipObj.left+\"px)\"):parseClip(this.css(\"clip\"),this)},transfer:function(options,done){var element=$(this),target=$(options.to),targetFixed=\"fixed\"===target.css(\"position\"),body=$(\"body\"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=element.offset(),transfer=$(\"<div class='ui-effects-transfer'></div>\").appendTo(\"body\").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?\"fixed\":\"absolute\"}).animate(animation,options.duration,options.easing,function(){transfer.remove(),$.isFunction(done)&&done()})}}),$.fx.step.clip=function(fx){fx.clipInit||(fx.start=$(fx.elem).cssClip(),\"string\"==typeof fx.end&&(fx.end=parseClip(fx.end,fx.elem)),fx.clipInit=!0),$(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left})}}(),function(){var baseEasings={};$.each([\"Quad\",\"Cubic\",\"Quart\",\"Quint\",\"Expo\"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}}),$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return 0===p||1===p?p:-Math.pow(2,8*(p-1))*Math.sin((80*(p-1)-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){for(var pow2,bounce=4;p<((pow2=Math.pow(2,--bounce))-1)/11;);return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((3*pow2-2)/22-p,2)}}),$.each(baseEasings,function(name,easeIn){$.easing[\"easeIn\"+name]=easeIn,$.easing[\"easeOut\"+name]=function(p){return 1-easeIn(1-p)},$.easing[\"easeInOut\"+name]=function(p){return p<.5?easeIn(2*p)/2:1-easeIn(-2*p+2)/2}})}();$.effects,$.effects.define(\"blind\",\"hide\",function(options,done){var map={up:[\"bottom\",\"top\"],vertical:[\"bottom\",\"top\"],down:[\"top\",\"bottom\"],left:[\"right\",\"left\"],horizontal:[\"right\",\"left\"],right:[\"left\",\"right\"]},element=$(this),direction=options.direction||\"up\",start=element.cssClip(),animate={clip:$.extend({},start)},placeholder=$.effects.createPlaceholder(element);animate.clip[map[direction][0]]=animate.clip[map[direction][1]],\"show\"===options.mode&&(element.cssClip(animate.clip),placeholder&&placeholder.css($.effects.clipToBox(animate)),animate.clip=start),placeholder&&placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define(\"bounce\",function(options,done){var upAnim,downAnim,refValue,element=$(this),mode=options.mode,hide=\"hide\"===mode,show=\"show\"===mode,direction=options.direction||\"up\",distance=options.distance,times=options.times||5,anims=2*times+(show||hide?1:0),speed=options.duration/anims,easing=options.easing,ref=\"up\"===direction||\"down\"===direction?\"top\":\"left\",motion=\"up\"===direction||\"left\"===direction,i=0,queuelen=element.queue().length;for($.effects.createPlaceholder(element),refValue=element.css(ref),distance||(distance=element[\"top\"===ref?\"outerHeight\":\"outerWidth\"]()/3),show&&(downAnim={opacity:1},downAnim[ref]=refValue,element.css(\"opacity\",0).css(ref,motion?2*-distance:2*distance).animate(downAnim,speed,easing)),hide&&(distance/=Math.pow(2,times-1)),downAnim={},downAnim[ref]=refValue;i<times;i++)upAnim={},upAnim[ref]=(motion?\"-=\":\"+=\")+distance,element.animate(upAnim,speed,easing).animate(downAnim,speed,easing),distance=hide?2*distance:distance/2;hide&&(upAnim={opacity:0},upAnim[ref]=(motion?\"-=\":\"+=\")+distance,element.animate(upAnim,speed,easing)),element.queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define(\"clip\",\"hide\",function(options,done){var start,animate={},element=$(this),direction=options.direction||\"vertical\",both=\"both\"===direction,horizontal=both||\"horizontal\"===direction,vertical=both||\"vertical\"===direction;start=element.cssClip(),animate.clip={top:vertical?(start.bottom-start.top)/2:start.top,right:horizontal?(start.right-start.left)/2:start.right,bottom:vertical?(start.bottom-start.top)/2:start.bottom,left:horizontal?(start.right-start.left)/2:start.left},$.effects.createPlaceholder(element),\"show\"===options.mode&&(element.cssClip(animate.clip),animate.clip=start),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define(\"drop\",\"hide\",function(options,done){var distance,element=$(this),mode=options.mode,show=\"show\"===mode,direction=options.direction||\"left\",ref=\"up\"===direction||\"down\"===direction?\"top\":\"left\",motion=\"up\"===direction||\"left\"===direction?\"-=\":\"+=\",oppositeMotion=\"+=\"===motion?\"-=\":\"+=\",animation={opacity:0};$.effects.createPlaceholder(element),distance=options.distance||element[\"top\"===ref?\"outerHeight\":\"outerWidth\"](!0)/2,animation[ref]=motion+distance,show&&(element.css(animation),animation[ref]=oppositeMotion+distance,animation.opacity=1),element.animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define(\"explode\",\"hide\",function(options,done){function childComplete(){pieces.push(this),pieces.length===rows*cells&&animComplete()}function animComplete(){element.css({visibility:\"visible\"}),$(pieces).remove(),done()}var i,j,left,top,mx,my,rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,cells=rows,element=$(this),mode=options.mode,show=\"show\"===mode,offset=element.show().css(\"visibility\",\"hidden\").offset(),width=Math.ceil(element.outerWidth()/cells),height=Math.ceil(element.outerHeight()/rows),pieces=[];for(i=0;i<rows;i++)for(top=offset.top+i*height,my=i-(rows-1)/2,j=0;j<cells;j++)left=offset.left+j*width,mx=j-(cells-1)/2,element.clone().appendTo(\"body\").wrap(\"<div></div>\").css({position:\"absolute\",visibility:\"visible\",left:-j*width,top:-i*height}).parent().addClass(\"ui-effects-explode\").css({position:\"absolute\",overflow:\"hidden\",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},options.duration||500,options.easing,childComplete)}),$.effects.define(\"fade\",\"toggle\",function(options,done){var show=\"show\"===options.mode;$(this).css(\"opacity\",show?0:1).animate({opacity:show?1:0},{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define(\"fold\",\"hide\",function(options,done){var element=$(this),mode=options.mode,show=\"show\"===mode,hide=\"hide\"===mode,size=options.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!options.horizFirst,ref=horizFirst?[\"right\",\"bottom\"]:[\"bottom\",\"right\"],duration=options.duration/2,placeholder=$.effects.createPlaceholder(element),start=element.cssClip(),animation1={clip:$.extend({},start)},animation2={clip:$.extend({},start)},distance=[start[ref[0]],start[ref[1]]],queuelen=element.queue().length;percent&&(size=parseInt(percent[1],10)/100*distance[hide?0:1]),animation1.clip[ref[0]]=size,animation2.clip[ref[0]]=size,animation2.clip[ref[1]]=0,show&&(element.cssClip(animation2.clip),placeholder&&placeholder.css($.effects.clipToBox(animation2)),animation2.clip=start),element.queue(function(next){placeholder&&placeholder.animate($.effects.clipToBox(animation1),duration,options.easing).animate($.effects.clipToBox(animation2),duration,options.easing),next()}).animate(animation1,duration,options.easing).animate(animation2,duration,options.easing).queue(done),$.effects.unshift(element,queuelen,4)}),$.effects.define(\"highlight\",\"show\",function(options,done){var element=$(this),animation={backgroundColor:element.css(\"backgroundColor\")};\"hide\"===options.mode&&(animation.opacity=0),$.effects.saveStyle(element),element.css({backgroundImage:\"none\",backgroundColor:options.color||\"#ffff99\"}).animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define(\"size\",function(options,done){var baseline,factor,temp,element=$(this),cProps=[\"fontSize\"],vProps=[\"borderTopWidth\",\"borderBottomWidth\",\"paddingTop\",\"paddingBottom\"],hProps=[\"borderLeftWidth\",\"borderRightWidth\",\"paddingLeft\",\"paddingRight\"],mode=options.mode,restore=\"effect\"!==mode,scale=options.scale||\"both\",origin=options.origin||[\"middle\",\"center\"],position=element.css(\"position\"),pos=element.position(),original=$.effects.scaledDimensions(element),from=options.from||original,to=options.to||$.effects.scaledDimensions(element,0);$.effects.createPlaceholder(element),\"show\"===mode&&(temp=from,from=to,to=temp),factor={from:{y:from.height/original.height,x:from.width/original.width},to:{y:to.height/original.height,x:to.width/original.width}},\"box\"!==scale&&\"both\"!==scale||(factor.from.y!==factor.to.y&&(from=$.effects.setTransition(element,vProps,factor.from.y,from),to=$.effects.setTransition(element,vProps,factor.to.y,to)),factor.from.x!==factor.to.x&&(from=$.effects.setTransition(element,hProps,factor.from.x,from),to=$.effects.setTransition(element,hProps,factor.to.x,to))),\"content\"!==scale&&\"both\"!==scale||factor.from.y!==factor.to.y&&(from=$.effects.setTransition(element,cProps,factor.from.y,from),to=$.effects.setTransition(element,cProps,factor.to.y,to)),origin&&(baseline=$.effects.getBaseline(origin,original),from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top,from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left,to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top,to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left),element.css(from),\"content\"!==scale&&\"both\"!==scale||(vProps=vProps.concat([\"marginTop\",\"marginBottom\"]).concat(cProps),hProps=hProps.concat([\"marginLeft\",\"marginRight\"]),element.find(\"*[width]\").each(function(){var child=$(this),childOriginal=$.effects.scaledDimensions(child),childFrom={height:childOriginal.height*factor.from.y,width:childOriginal.width*factor.from.x,outerHeight:childOriginal.outerHeight*factor.from.y,outerWidth:childOriginal.outerWidth*factor.from.x},childTo={height:childOriginal.height*factor.to.y,width:childOriginal.width*factor.to.x,outerHeight:childOriginal.height*factor.to.y,outerWidth:childOriginal.width*factor.to.x};factor.from.y!==factor.to.y&&(childFrom=$.effects.setTransition(child,vProps,factor.from.y,childFrom),childTo=$.effects.setTransition(child,vProps,factor.to.y,childTo)),factor.from.x!==factor.to.x&&(childFrom=$.effects.setTransition(child,hProps,factor.from.x,childFrom),childTo=$.effects.setTransition(child,hProps,factor.to.x,childTo)),restore&&$.effects.saveStyle(child),child.css(childFrom),child.animate(childTo,options.duration,options.easing,function(){restore&&$.effects.restoreStyle(child)})})),element.animate(to,{queue:!1,duration:options.duration,easing:options.easing,complete:function(){var offset=element.offset();0===to.opacity&&element.css(\"opacity\",from.opacity),restore||(element.css(\"position\",\"static\"===position?\"relative\":position).offset(offset),$.effects.saveStyle(element)),done()}})}),$.effects.define(\"scale\",function(options,done){var el=$(this),mode=options.mode,percent=parseInt(options.percent,10)||(0===parseInt(options.percent,10)?0:\"effect\"!==mode?0:100),newOptions=$.extend(!0,{from:$.effects.scaledDimensions(el),to:$.effects.scaledDimensions(el,percent,options.direction||\"both\"),origin:options.origin||[\"middle\",\"center\"]},options);options.fade&&(newOptions.from.opacity=1,newOptions.to.opacity=0),$.effects.effect.size.call(this,newOptions,done)}),$.effects.define(\"puff\",\"hide\",function(options,done){var newOptions=$.extend(!0,{},options,{fade:!0,percent:parseInt(options.percent,10)||150});$.effects.effect.scale.call(this,newOptions,done)}),$.effects.define(\"pulsate\",\"show\",function(options,done){var element=$(this),mode=options.mode,show=\"show\"===mode,hide=\"hide\"===mode,showhide=show||hide,anims=2*(options.times||5)+(showhide?1:0),duration=options.duration/anims,animateTo=0,i=1,queuelen=element.queue().length;for(!show&&element.is(\":visible\")||(element.css(\"opacity\",0).show(),animateTo=1);i<anims;i++)element.animate({opacity:animateTo},duration,options.easing),animateTo=1-animateTo;element.animate({opacity:animateTo},duration,options.easing),element.queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define(\"shake\",function(options,done){var i=1,element=$(this),direction=options.direction||\"left\",distance=options.distance||20,times=options.times||3,anims=2*times+1,speed=Math.round(options.duration/anims),ref=\"up\"===direction||\"down\"===direction?\"top\":\"left\",positiveMotion=\"up\"===direction||\"left\"===direction,animation={},animation1={},animation2={},queuelen=element.queue().length;for($.effects.createPlaceholder(element),animation[ref]=(positiveMotion?\"-=\":\"+=\")+distance,animation1[ref]=(positiveMotion?\"+=\":\"-=\")+2*distance,animation2[ref]=(positiveMotion?\"-=\":\"+=\")+2*distance,element.animate(animation,speed,options.easing);i<times;i++)element.animate(animation1,speed,options.easing).animate(animation2,speed,options.easing);element.animate(animation1,speed,options.easing).animate(animation,speed/2,options.easing).queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define(\"slide\",\"show\",function(options,done){var startClip,startRef,element=$(this),map={up:[\"bottom\",\"top\"],down:[\"top\",\"bottom\"],left:[\"right\",\"left\"],right:[\"left\",\"right\"]},mode=options.mode,direction=options.direction||\"left\",ref=\"up\"===direction||\"down\"===direction?\"top\":\"left\",positiveMotion=\"up\"===direction||\"left\"===direction,distance=options.distance||element[\"top\"===ref?\"outerHeight\":\"outerWidth\"](!0),animation={};$.effects.createPlaceholder(element),startClip=element.cssClip(),startRef=element.position()[ref],animation[ref]=(positiveMotion?-1:1)*distance+startRef,animation.clip=element.cssClip(),animation.clip[map[direction][1]]=animation.clip[map[direction][0]],\"show\"===mode&&(element.cssClip(animation.clip),element.css(ref,animation[ref]),animation.clip=startClip,animation[ref]=startRef),element.animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})});!1!==$.uiBackCompat&&$.effects.define(\"transfer\",function(options,done){$(this).transfer(options,done)});$.ui.focusable=function(element,hasTabindex){var map,mapName,img,focusableIfVisible,fieldset,nodeName=element.nodeName.toLowerCase();return\"area\"===nodeName?(map=element.parentNode,mapName=map.name,!(!element.href||!mapName||\"map\"!==map.nodeName.toLowerCase())&&(img=$(\"img[usemap='#\"+mapName+\"']\"),img.length>0&&img.is(\":visible\"))):(/^(input|select|textarea|button|object)$/.test(nodeName)?(focusableIfVisible=!element.disabled)&&(fieldset=$(element).closest(\"fieldset\")[0])&&(focusableIfVisible=!fieldset.disabled):focusableIfVisible=\"a\"===nodeName?element.href||hasTabindex:hasTabindex,focusableIfVisible&&$(element).is(\":visible\")&&visible($(element)))},$.extend($.expr[\":\"],{focusable:function(element){return $.ui.focusable(element,null!=$.attr(element,\"tabindex\"))}});$.ui.focusable,$.fn.form=function(){return\"string\"==typeof this[0].form?this.closest(\"form\"):$(this[0].form)},$.ui.formResetMixin={_formResetHandler:function(){var form=$(this);setTimeout(function(){var instances=form.data(\"ui-form-reset-instances\");$.each(instances,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var instances=this.form.data(\"ui-form-reset-instances\")||[];instances.length||this.form.on(\"reset.ui-form-reset\",this._formResetHandler),instances.push(this),this.form.data(\"ui-form-reset-instances\",instances)}},_unbindFormResetHandler:function(){if(this.form.length){var instances=this.form.data(\"ui-form-reset-instances\");instances.splice($.inArray(this,instances),1),instances.length?this.form.data(\"ui-form-reset-instances\",instances):this.form.removeData(\"ui-form-reset-instances\").off(\"reset.ui-form-reset\")}}};\"1.7\"===$.fn.jquery.substring(0,3)&&($.each([\"Width\",\"Height\"],function(i,name){function reduce(elem,size,border,margin){return $.each(side,function(){size-=parseFloat($.css(elem,\"padding\"+this))||0,border&&(size-=parseFloat($.css(elem,\"border\"+this+\"Width\"))||0),margin&&(size-=parseFloat($.css(elem,\"margin\"+this))||0)}),size}var side=\"Width\"===name?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};$.fn[\"inner\"+name]=function(size){return void 0===size?orig[\"inner\"+name].call(this):this.each(function(){$(this).css(type,reduce(this,size)+\"px\")})},$.fn[\"outer\"+name]=function(size,margin){return\"number\"!=typeof size?orig[\"outer\"+name].call(this,size):this.each(function(){$(this).css(type,reduce(this,size,!0,margin)+\"px\")})}}),$.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))});$.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},$.ui.escapeSelector=function(){\nvar selectorEscape=/([!\"#$%&'()*+,.\\/:;<=>?@[\\]^`{|}~])/g;return function(selector){return selector.replace(selectorEscape,\"\\\\$1\")}}(),$.fn.labels=function(){var ancestor,selector,id,labels,ancestors;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(labels=this.eq(0).parents(\"label\"),id=this.attr(\"id\"),id&&(ancestor=this.eq(0).parents().last(),ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings()),selector=\"label[for='\"+$.ui.escapeSelector(id)+\"']\",labels=labels.add(ancestors.find(selector).addBack(selector))),this.pushStack(labels))},$.fn.scrollParent=function(includeHidden){var position=this.css(\"position\"),excludeStaticParent=\"absolute\"===position,overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,scrollParent=this.parents().filter(function(){var parent=$(this);return(!excludeStaticParent||\"static\"!==parent.css(\"position\"))&&overflowRegex.test(parent.css(\"overflow\")+parent.css(\"overflow-y\")+parent.css(\"overflow-x\"))}).eq(0);return\"fixed\"!==position&&scrollParent.length?scrollParent:$(this[0].ownerDocument||document)},$.extend($.expr[\":\"],{tabbable:function(element){var tabIndex=$.attr(element,\"tabindex\"),hasTabindex=null!=tabIndex;return(!hasTabindex||tabIndex>=0)&&$.ui.focusable(element,hasTabindex)}}),$.fn.extend({uniqueId:function(){var uuid=0;return function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++uuid)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\\d+$/.test(this.id)&&$(this).removeAttr(\"id\")})}}),$.widget(\"ui.accordion\",{version:\"1.12.1\",options:{active:0,animate:{},classes:{\"ui-accordion-header\":\"ui-corner-top\",\"ui-accordion-header-collapsed\":\"ui-corner-all\",\"ui-accordion-content\":\"ui-corner-bottom\"},collapsible:!1,event:\"click\",header:\"> li > :first-child, > :not(li):even\",heightStyle:\"auto\",icons:{activeHeader:\"ui-icon-triangle-1-s\",header:\"ui-icon-triangle-1-e\"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:\"hide\",borderBottomWidth:\"hide\",paddingTop:\"hide\",paddingBottom:\"hide\",height:\"hide\"},showProps:{borderTopWidth:\"show\",borderBottomWidth:\"show\",paddingTop:\"show\",paddingBottom:\"show\",height:\"show\"},_create:function(){var options=this.options;this.prevShow=this.prevHide=$(),this._addClass(\"ui-accordion\",\"ui-widget ui-helper-reset\"),this.element.attr(\"role\",\"tablist\"),options.collapsible||!1!==options.active&&null!=options.active||(options.active=0),this._processPanels(),options.active<0&&(options.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():$()}},_createIcons:function(){var icon,children,icons=this.options.icons;icons&&(icon=$(\"<span>\"),this._addClass(icon,\"ui-accordion-header-icon\",\"ui-icon \"+icons.header),icon.prependTo(this.headers),children=this.active.children(\".ui-accordion-header-icon\"),this._removeClass(children,icons.header)._addClass(children,null,icons.activeHeader)._addClass(this.headers,\"ui-accordion-icons\"))},_destroyIcons:function(){this._removeClass(this.headers,\"ui-accordion-icons\"),this.headers.children(\".ui-accordion-header-icon\").remove()},_destroy:function(){var contents;this.element.removeAttr(\"role\"),this.headers.removeAttr(\"role aria-expanded aria-selected aria-controls tabIndex\").removeUniqueId(),this._destroyIcons(),contents=this.headers.next().css(\"display\",\"\").removeAttr(\"role aria-hidden aria-labelledby\").removeUniqueId(),\"content\"!==this.options.heightStyle&&contents.css(\"height\",\"\")},_setOption:function(key,value){if(\"active\"===key)return void this._activate(value);\"event\"===key&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(value)),this._super(key,value),\"collapsible\"!==key||value||!1!==this.options.active||this._activate(0),\"icons\"===key&&(this._destroyIcons(),value&&this._createIcons())},_setOptionDisabled:function(value){this._super(value),this.element.attr(\"aria-disabled\",value),this._toggleClass(null,\"ui-state-disabled\",!!value),this._toggleClass(this.headers.add(this.headers.next()),null,\"ui-state-disabled\",!!value)},_keydown:function(event){if(!event.altKey&&!event.ctrlKey){var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=!1;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1]}toFocus&&($(event.target).attr(\"tabIndex\",-1),$(toFocus).attr(\"tabIndex\",0),$(toFocus).trigger(\"focus\"),event.preventDefault())}},_panelKeyDown:function(event){event.keyCode===$.ui.keyCode.UP&&event.ctrlKey&&$(event.currentTarget).prev().trigger(\"focus\")},refresh:function(){var options=this.options;this._processPanels(),!1===options.active&&!0===options.collapsible||!this.headers.length?(options.active=!1,this.active=$()):!1===options.active?this._activate(0):this.active.length&&!$.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(\".ui-state-disabled\").length?(options.active=!1,this.active=$()):this._activate(Math.max(0,options.active-1)):options.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var prevHeaders=this.headers,prevPanels=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,\"ui-accordion-header ui-accordion-header-collapsed\",\"ui-state-default\"),this.panels=this.headers.next().filter(\":not(.ui-accordion-content-active)\").hide(),this._addClass(this.panels,\"ui-accordion-content\",\"ui-helper-reset ui-widget-content\"),prevPanels&&(this._off(prevHeaders.not(this.headers)),this._off(prevPanels.not(this.panels)))},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent();this.active=this._findActive(options.active),this._addClass(this.active,\"ui-accordion-header-active\",\"ui-state-active\")._removeClass(this.active,\"ui-accordion-header-collapsed\"),this._addClass(this.active.next(),\"ui-accordion-content-active\"),this.active.next().show(),this.headers.attr(\"role\",\"tab\").each(function(){var header=$(this),headerId=header.uniqueId().attr(\"id\"),panel=header.next(),panelId=panel.uniqueId().attr(\"id\");header.attr(\"aria-controls\",panelId),panel.attr(\"aria-labelledby\",headerId)}).next().attr(\"role\",\"tabpanel\"),this.headers.not(this.active).attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\",tabIndex:-1}).next().attr({\"aria-hidden\":\"true\"}).hide(),this.active.length?this.active.attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0}).next().attr({\"aria-hidden\":\"false\"}):this.headers.eq(0).attr(\"tabIndex\",0),this._createIcons(),this._setupEvents(options.event),\"fill\"===heightStyle?(maxHeight=parent.height(),this.element.siblings(\":visible\").each(function(){var elem=$(this),position=elem.css(\"position\");\"absolute\"!==position&&\"fixed\"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.headers.each(function(){maxHeight-=$(this).outerHeight(!0)}),this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css(\"overflow\",\"auto\")):\"auto\"===heightStyle&&(maxHeight=0,this.headers.next().each(function(){var isVisible=$(this).is(\":visible\");isVisible||$(this).show(),maxHeight=Math.max(maxHeight,$(this).css(\"height\",\"\").height()),isVisible||$(this).hide()}).height(maxHeight))},_activate:function(index){var active=this._findActive(index)[0];active!==this.active[0]&&(active=active||this.active[0],this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop}))},_findActive:function(selector){return\"number\"==typeof selector?this.headers.eq(selector):$()},_setupEvents:function(event){var events={keydown:\"_keydown\"};event&&$.each(event.split(\" \"),function(index,eventName){events[eventName]=\"_eventHandler\"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,events),this._on(this.headers.next(),{keydown:\"_panelKeyDown\"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(event){var activeChildren,clickedChildren,options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault(),clickedIsActive&&!options.collapsible||!1===this._trigger(\"beforeActivate\",event,eventData)||(options.active=!collapsing&&this.headers.index(clicked),this.active=clickedIsActive?$():clicked,this._toggle(eventData),this._removeClass(active,\"ui-accordion-header-active\",\"ui-state-active\"),options.icons&&(activeChildren=active.children(\".ui-accordion-header-icon\"),this._removeClass(activeChildren,null,options.icons.activeHeader)._addClass(activeChildren,null,options.icons.header)),clickedIsActive||(this._removeClass(clicked,\"ui-accordion-header-collapsed\")._addClass(clicked,\"ui-accordion-header-active\",\"ui-state-active\"),options.icons&&(clickedChildren=clicked.children(\".ui-accordion-header-icon\"),this._removeClass(clickedChildren,null,options.icons.header)._addClass(clickedChildren,null,options.icons.activeHeader)),this._addClass(clicked.next(),\"ui-accordion-content-active\")))},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=toShow,this.prevHide=toHide,this.options.animate?this._animate(toShow,toHide,data):(toHide.hide(),toShow.show(),this._toggleComplete(data)),toHide.attr({\"aria-hidden\":\"true\"}),toHide.prev().attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\"}),toShow.length&&toHide.length?toHide.prev().attr({tabIndex:-1,\"aria-expanded\":\"false\"}):toShow.length&&this.headers.filter(function(){return 0===parseInt($(this).attr(\"tabIndex\"),10)}).attr(\"tabIndex\",-1),toShow.attr(\"aria-hidden\",\"false\").prev().attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,boxSizing=toShow.css(\"box-sizing\"),down=toShow.length&&(!toHide.length||toShow.index()<toHide.index()),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data)};return\"number\"==typeof options&&(duration=options),\"string\"==typeof options&&(easing=options),easing=easing||options.easing||animate.easing,duration=duration||options.duration||animate.duration,toHide.length?toShow.length?(total=toShow.show().outerHeight(),toHide.animate(this.hideProps,{duration:duration,easing:easing,step:function(now,fx){fx.now=Math.round(now)}}),void toShow.hide().animate(this.showProps,{duration:duration,easing:easing,complete:complete,step:function(now,fx){fx.now=Math.round(now),\"height\"!==fx.prop?\"content-box\"===boxSizing&&(adjust+=fx.now):\"content\"!==that.options.heightStyle&&(fx.now=Math.round(total-toHide.outerHeight()-adjust),adjust=0)}})):toHide.animate(this.hideProps,duration,easing,complete):toShow.animate(this.showProps,duration,easing,complete)},_toggleComplete:function(data){var toHide=data.oldPanel,prev=toHide.prev();this._removeClass(toHide,\"ui-accordion-content-active\"),this._removeClass(prev,\"ui-accordion-header-active\")._addClass(prev,\"ui-accordion-header-collapsed\"),toHide.length&&(toHide.parent()[0].className=toHide.parent()[0].className),this._trigger(\"activate\",null,data)}}),$.ui.safeActiveElement=function(document){var activeElement;try{activeElement=document.activeElement}catch(error){activeElement=document.body}return activeElement||(activeElement=document.body),activeElement.nodeName||(activeElement=document.body),activeElement},$.widget(\"ui.menu\",{version:\"1.12.1\",defaultElement:\"<ul>\",delay:300,options:{icons:{submenu:\"ui-icon-caret-1-e\"},items:\"> *\",menus:\"ul\",position:{my:\"left top\",at:\"right top\"},role:\"menu\",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass(\"ui-menu\",\"ui-widget ui-widget-content\"),this._on({\"mousedown .ui-menu-item\":function(event){event.preventDefault()},\"click .ui-menu-item\":function(event){var target=$(event.target),active=$($.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&target.not(\".ui-state-disabled\").length&&(this.select(event),event.isPropagationStopped()||(this.mouseHandled=!0),target.has(\".ui-menu\").length?this.expand(event):!this.element.is(\":focus\")&&active.closest(\".ui-menu\").length&&(this.element.trigger(\"focus\",[!0]),this.active&&1===this.active.parents(\".ui-menu\").length&&clearTimeout(this.timer)))},\"mouseenter .ui-menu-item\":function(event){if(!this.previousFilter){var actualTarget=$(event.target).closest(\".ui-menu-item\"),target=$(event.currentTarget);actualTarget[0]===target[0]&&(this._removeClass(target.siblings().children(\".ui-state-active\"),null,\"ui-state-active\"),this.focus(event,target))}},mouseleave:\"collapseAll\",\"mouseleave .ui-menu\":\"collapseAll\",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);keepActiveItem||this.focus(event,item)},blur:function(event){this._delay(function(){!$.contains(this.element[0],$.ui.safeActiveElement(this.document[0]))&&this.collapseAll(event)})},keydown:\"_keydown\"}),this.refresh(),this._on(this.document,{click:function(event){this._closeOnDocumentClick(event)&&this.collapseAll(event),this.mouseHandled=!1}})},_destroy:function(){var items=this.element.find(\".ui-menu-item\").removeAttr(\"role aria-disabled\"),submenus=items.children(\".ui-menu-item-wrapper\").removeUniqueId().removeAttr(\"tabIndex role aria-haspopup\");this.element.removeAttr(\"aria-activedescendant\").find(\".ui-menu\").addBack().removeAttr(\"role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex\").removeUniqueId().show(),submenus.children().each(function(){var elem=$(this);elem.data(\"ui-menu-submenu-caret\")&&elem.remove()})},_keydown:function(event){var match,prev,character,skip,preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move(\"first\",\"first\",event);break;case $.ui.keyCode.END:this._move(\"last\",\"last\",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:this.active&&!this.active.is(\".ui-state-disabled\")&&this.expand(event);break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=!1,prev=this.previousFilter||\"\",skip=!1,character=event.keyCode>=96&&event.keyCode<=105?(event.keyCode-96).toString():String.fromCharCode(event.keyCode),clearTimeout(this.filterTimer),character===prev?skip=!0:character=prev+character,match=this._filterMenuItems(character),match=skip&&-1!==match.index(this.active.next())?this.active.nextAll(\".ui-menu-item\"):match,match.length||(character=String.fromCharCode(event.keyCode),match=this._filterMenuItems(character)),match.length?(this.focus(event,match),this.previousFilter=character,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}preventDefault&&event.preventDefault()},_activate:function(event){this.active&&!this.active.is(\".ui-state-disabled\")&&(this.active.children(\"[aria-haspopup='true']\").length?this.expand(event):this.select(event))},refresh:function(){var menus,items,newSubmenus,newItems,newWrappers,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this._toggleClass(\"ui-menu-icons\",null,!!this.element.find(\".ui-icon\").length),newSubmenus=submenus.filter(\":not(.ui-menu)\").hide().attr({role:this.options.role,\"aria-hidden\":\"true\",\"aria-expanded\":\"false\"}).each(function(){var menu=$(this),item=menu.prev(),submenuCaret=$(\"<span>\").data(\"ui-menu-submenu-caret\",!0);that._addClass(submenuCaret,\"ui-menu-icon\",\"ui-icon \"+icon),item.attr(\"aria-haspopup\",\"true\").prepend(submenuCaret),menu.attr(\"aria-labelledby\",item.attr(\"id\"))}),this._addClass(newSubmenus,\"ui-menu\",\"ui-widget ui-widget-content ui-front\"),menus=submenus.add(this.element),items=menus.find(this.options.items),items.not(\".ui-menu-item\").each(function(){var item=$(this);that._isDivider(item)&&that._addClass(item,\"ui-menu-divider\",\"ui-widget-content\")}),newItems=items.not(\".ui-menu-item, .ui-menu-divider\"),newWrappers=newItems.children().not(\".ui-menu\").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(newItems,\"ui-menu-item\")._addClass(newWrappers,\"ui-menu-item-wrapper\"),items.filter(\".ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this.active&&!$.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:\"menuitem\",listbox:\"option\"}[this.options.role]},_setOption:function(key,value){if(\"icons\"===key){var icons=this.element.find(\".ui-menu-icon\");this._removeClass(icons,null,this.options.icons.submenu)._addClass(icons,null,value.submenu)}this._super(key,value)},_setOptionDisabled:function(value){this._super(value),this.element.attr(\"aria-disabled\",String(value)),this._toggleClass(null,\"ui-state-disabled\",!!value)},focus:function(event,item){var nested,focused,activeParent;this.blur(event,event&&\"focus\"===event.type),this._scrollIntoView(item),this.active=item.first(),focused=this.active.children(\".ui-menu-item-wrapper\"),this._addClass(focused,null,\"ui-state-active\"),this.options.role&&this.element.attr(\"aria-activedescendant\",focused.attr(\"id\")),activeParent=this.active.parent().closest(\".ui-menu-item\").children(\".ui-menu-item-wrapper\"),this._addClass(activeParent,null,\"ui-state-active\"),event&&\"keydown\"===event.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),nested=item.children(\".ui-menu\"),nested.length&&event&&/^mouse/.test(event.type)&&this._startOpening(nested),this.activeMenu=item.parent(),this._trigger(\"focus\",event,{item:item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;this._hasScroll()&&(borderTop=parseFloat($.css(this.activeMenu[0],\"borderTopWidth\"))||0,paddingTop=parseFloat($.css(this.activeMenu[0],\"paddingTop\"))||0,offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop,scroll=this.activeMenu.scrollTop(),elementHeight=this.activeMenu.height(),itemHeight=item.outerHeight(),offset<0?this.activeMenu.scrollTop(scroll+offset):offset+itemHeight>elementHeight&&this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight))},blur:function(event,fromFocus){fromFocus||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(\".ui-menu-item-wrapper\"),null,\"ui-state-active\"),this._trigger(\"blur\",event,{item:this.active}),this.active=null)},_startOpening:function(submenu){clearTimeout(this.timer),\"true\"===submenu.attr(\"aria-hidden\")&&(this.timer=this._delay(function(){this._close(),this._open(submenu)},this.delay))},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(\".ui-menu\").not(submenu.parents(\".ui-menu\")).hide().attr(\"aria-hidden\",\"true\"),submenu.show().removeAttr(\"aria-hidden\").attr(\"aria-expanded\",\"true\").position(position)},collapseAll:function(event,all){clearTimeout(this.timer),this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(\".ui-menu\"));currentMenu.length||(currentMenu=this.element),this._close(currentMenu),this.blur(event),this._removeClass(currentMenu.find(\".ui-state-active\"),null,\"ui-state-active\"),this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){startMenu||(startMenu=this.active?this.active.parent():this.element),startMenu.find(\".ui-menu\").hide().attr(\"aria-hidden\",\"true\").attr(\"aria-expanded\",\"false\")},_closeOnDocumentClick:function(event){return!$(event.target).closest(\".ui-menu\").length},_isDivider:function(item){return!/[^\\-\\u2014\\u2013\\s]/.test(item.text())},collapse:function(event){var newItem=this.active&&this.active.parent().closest(\".ui-menu-item\",this.element);newItem&&newItem.length&&(this._close(),this.focus(event,newItem))},expand:function(event){var newItem=this.active&&this.active.children(\".ui-menu \").find(this.options.items).first();newItem&&newItem.length&&(this._open(newItem.parent()),this._delay(function(){this.focus(event,newItem)}))},next:function(event){this._move(\"next\",\"first\",event)},previous:function(event){this._move(\"prev\",\"last\",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(\".ui-menu-item\").length},isLastItem:function(){return this.active&&!this.active.nextAll(\".ui-menu-item\").length},_move:function(direction,filter,event){var next;this.active&&(next=\"first\"===direction||\"last\"===direction?this.active[\"first\"===direction?\"prevAll\":\"nextAll\"](\".ui-menu-item\").eq(-1):this.active[direction+\"All\"](\".ui-menu-item\").eq(0)),next&&next.length&&this.active||(next=this.activeMenu.find(this.options.items)[filter]()),this.focus(event,next)},nextPage:function(event){var item,base,height;if(!this.active)return void this.next(event);this.isLastItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.nextAll(\".ui-menu-item\").each(function(){return item=$(this),item.offset().top-base-height<0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items)[this.active?\"last\":\"first\"]()))},previousPage:function(event){var item,base,height;if(!this.active)return void this.next(event);this.isFirstItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.prevAll(\".ui-menu-item\").each(function(){return item=$(this),item.offset().top-base+height>0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop(\"scrollHeight\")},select:function(event){this.active=this.active||$(event.target).closest(\".ui-menu-item\");var ui={item:this.active};this.active.has(\".ui-menu\").length||this.collapseAll(event,!0),this._trigger(\"select\",event,ui)},_filterMenuItems:function(character){var escapedCharacter=character.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\"),regex=new RegExp(\"^\"+escapedCharacter,\"i\");return this.activeMenu.find(this.options.items).filter(\".ui-menu-item\").filter(function(){return regex.test($.trim($(this).children(\".ui-menu-item-wrapper\").text()))})}});$.widget(\"ui.autocomplete\",{version:\"1.12.1\",defaultElement:\"<input>\",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=\"textarea\"===nodeName,isInput=\"input\"===nodeName;this.isMultiLine=isTextarea||!isInput&&this._isContentEditable(this.element),this.valueMethod=this.element[isTextarea||isInput?\"val\":\"text\"],this.isNewMenu=!0,this._addClass(\"ui-autocomplete-input\"),this.element.attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(event){if(this.element.prop(\"readOnly\"))return suppressKeyPress=!0,suppressInput=!0,void(suppressKeyPressRepeat=!0);suppressKeyPress=!1,suppressInput=!1,suppressKeyPressRepeat=!1;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=!0,this._move(\"previousPage\",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=!0,this._move(\"nextPage\",event);break;case keyCode.UP:suppressKeyPress=!0,this._keyEvent(\"previous\",event);break;case keyCode.DOWN:suppressKeyPress=!0,this._keyEvent(\"next\",event);break;case keyCode.ENTER:this.menu.active&&(suppressKeyPress=!0,event.preventDefault(),this.menu.select(event));break;case keyCode.TAB:this.menu.active&&this.menu.select(event);break;case keyCode.ESCAPE:this.menu.element.is(\":visible\")&&(this.isMultiLine||this._value(this.term),this.close(event),event.preventDefault());break;default:suppressKeyPressRepeat=!0,this._searchTimeout(event)}},keypress:function(event){if(suppressKeyPress)return suppressKeyPress=!1,void(this.isMultiLine&&!this.menu.element.is(\":visible\")||event.preventDefault());if(!suppressKeyPressRepeat){var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move(\"previousPage\",event);break;case keyCode.PAGE_DOWN:this._move(\"nextPage\",event);break;case keyCode.UP:this._keyEvent(\"previous\",event);break;case keyCode.DOWN:this._keyEvent(\"next\",event)}}},input:function(event){if(suppressInput)return suppressInput=!1,void event.preventDefault();this._searchTimeout(event)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(event){if(this.cancelBlur)return void delete this.cancelBlur;clearTimeout(this.searching),this.close(event),this._change(event)}}),this._initSource(),this.menu=$(\"<ul>\").appendTo(this._appendTo()).menu({role:null}).hide().menu(\"instance\"),this._addClass(this.menu.element,\"ui-autocomplete\",\"ui-front\"),this._on(this.menu.element,{mousedown:function(event){event.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==$.ui.safeActiveElement(this.document[0])&&this.element.trigger(\"focus\")})},menufocus:function(event,ui){var label,item;if(this.isNewMenu&&(this.isNewMenu=!1,event.originalEvent&&/^mouse/.test(event.originalEvent.type)))return this.menu.blur(),void this.document.one(\"mousemove\",function(){$(event.target).trigger(event.originalEvent)});item=ui.item.data(\"ui-autocomplete-item\"),!1!==this._trigger(\"focus\",event,{item:item})&&event.originalEvent&&/^key/.test(event.originalEvent.type)&&this._value(item.value),(label=ui.item.attr(\"aria-label\")||item.value)&&$.trim(label).length&&(this.liveRegion.children().hide(),$(\"<div>\").text(label).appendTo(this.liveRegion))},menuselect:function(event,ui){var item=ui.item.data(\"ui-autocomplete-item\"),previous=this.previous;this.element[0]!==$.ui.safeActiveElement(this.document[0])&&(this.element.trigger(\"focus\"),this.previous=previous,this._delay(function(){this.previous=previous,this.selectedItem=item})),!1!==this._trigger(\"select\",event,{item:item})&&this._value(item.value),this.term=this._value(),this.close(event),this.selectedItem=item}}),this.liveRegion=$(\"<div>\",{role:\"status\",\"aria-live\":\"assertive\",\"aria-relevant\":\"additions\"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,\"ui-helper-hidden-accessible\"),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value),\"source\"===key&&this._initSource(),\"appendTo\"===key&&this.menu.element.appendTo(this._appendTo()),\"disabled\"===key&&value&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(event){var menuElement=this.menu.element[0];return event.target===this.element[0]||event.target===menuElement||$.contains(menuElement,event.target)},_closeOnClickOutside:function(event){this._isEventTargetInWidget(event)||this.close()},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(\".ui-front, dialog\")),element.length||(element=this.document[0].body),element},_initSource:function(){var array,url,that=this;$.isArray(this.options.source)?(array=this.options.source,this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}):\"string\"==typeof this.options.source?(url=this.options.source,this.source=function(request,response){that.xhr&&that.xhr.abort(),that.xhr=$.ajax({url:url,data:request,dataType:\"json\",success:function(data){response(data)},error:function(){response([])}})}):this.source=this.options.source},_searchTimeout:function(event){clearTimeout(this.searching),this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(\":visible\"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;equalValues&&(!equalValues||menuVisible||modifierKey)||(this.selectedItem=null,this.search(null,event))},this.options.delay)},search:function(value,event){return value=null!=value?value:this._value(),this.term=this._value(),value.length<this.options.minLength?this.close(event):!1!==this._trigger(\"search\",event)?this._search(value):void 0},_search:function(value){this.pending++,this._addClass(\"ui-autocomplete-loading\"),this.cancelSearch=!1,this.source({term:value},this._response())},_response:function(){var index=++this.requestIndex;return $.proxy(function(content){index===this.requestIndex&&this.__response(content),--this.pending||this._removeClass(\"ui-autocomplete-loading\")},this)},__response:function(content){content&&(content=this._normalize(content)),this._trigger(\"response\",null,{content:content}),!this.options.disabled&&content&&content.length&&!this.cancelSearch?(this._suggest(content),this._trigger(\"open\")):this._close()},close:function(event){this.cancelSearch=!0,this._close(event)},_close:function(event){this._off(this.document,\"mousedown\"),this.menu.element.is(\":visible\")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger(\"close\",event))},_change:function(event){this.previous!==this._value()&&this._trigger(\"change\",event,{item:this.selectedItem})},_normalize:function(items){return items.length&&items[0].label&&items[0].value?items:$.map(items,function(item){return\"string\"==typeof item?{label:item,value:item}:$.extend({},item,{label:item.label||item.value,value:item.value||item.label})})},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items),this.isNewMenu=!0,this.menu.refresh(),ul.show(),this._resizeMenu(),ul.position($.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:\"_closeOnClickOutside\"})},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width(\"\").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data(\"ui-autocomplete-item\",item)},_renderItem:function(ul,item){return $(\"<li>\").append($(\"<div>\").text(item.label)).appendTo(ul)},_move:function(direction,event){return this.menu.element.is(\":visible\")?this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[direction](event):void this.search(null,event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){this.isMultiLine&&!this.menu.element.is(\":visible\")||(this._move(keyEvent,event),event.preventDefault())},_isContentEditable:function(element){if(!element.length)return!1;var editable=element.prop(\"contentEditable\");return\"inherit\"===editable?this._isContentEditable(element.parent()):\"true\"===editable}}),$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),\"i\");return $.grep(array,function(value){\nreturn matcher.test(value.label||value.value||value)})}}),$.widget(\"ui.autocomplete\",$.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(amount){return amount+(amount>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(content){var message;this._superApply(arguments),this.options.disabled||this.cancelSearch||(message=content&&content.length?this.options.messages.results(content.length):this.options.messages.noResults,this.liveRegion.children().hide(),$(\"<div>\").text(message).appendTo(this.liveRegion))}});var controlgroupCornerRegex=($.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);$.widget(\"ui.controlgroup\",{version:\"1.12.1\",defaultElement:\"<div>\",options:{direction:\"horizontal\",disabled:null,onlyVisible:!0,items:{button:\"input[type=button], input[type=submit], input[type=reset], button, a\",controlgroupLabel:\".ui-controlgroup-label\",checkboxradio:\"input[type='checkbox'], input[type='radio']\",selectmenu:\"select\",spinner:\".ui-spinner-input\"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr(\"role\",\"toolbar\"),this.refresh()},_destroy:function(){this._callChildMethod(\"destroy\"),this.childWidgets.removeData(\"ui-controlgroup-data\"),this.element.removeAttr(\"role\"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(\".ui-controlgroup-label-contents\").contents().unwrap()},_initWidgets:function(){var that=this,childWidgets=[];$.each(this.options.items,function(widget,selector){var labels,options={};if(selector)return\"controlgroupLabel\"===widget?(labels=that.element.find(selector),labels.each(function(){var element=$(this);element.children(\".ui-controlgroup-label-contents\").length||element.contents().wrapAll(\"<span class='ui-controlgroup-label-contents'></span>\")}),that._addClass(labels,null,\"ui-widget ui-widget-content ui-state-default\"),void(childWidgets=childWidgets.concat(labels.get()))):void($.fn[widget]&&(options=that[\"_\"+widget+\"Options\"]?that[\"_\"+widget+\"Options\"](\"middle\"):{classes:{}},that.element.find(selector).each(function(){var element=$(this),instance=element[widget](\"instance\"),instanceOptions=$.widget.extend({},options);if(\"button\"!==widget||!element.parent(\".ui-spinner\").length){instance||(instance=element[widget]()[widget](\"instance\")),instance&&(instanceOptions.classes=that._resolveClassesValues(instanceOptions.classes,instance)),element[widget](instanceOptions);var widgetElement=element[widget](\"widget\");$.data(widgetElement[0],\"ui-controlgroup-data\",instance||element[widget](\"instance\")),childWidgets.push(widgetElement[0])}})))}),this.childWidgets=$($.unique(childWidgets)),this._addClass(this.childWidgets,\"ui-controlgroup-item\")},_callChildMethod:function(method){this.childWidgets.each(function(){var element=$(this),data=element.data(\"ui-controlgroup-data\");data&&data[method]&&data[method]()})},_updateCornerClass:function(element,position){var add=this._buildSimpleOptions(position,\"label\").classes.label;this._removeClass(element,null,\"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all\"),this._addClass(element,null,add)},_buildSimpleOptions:function(position,key){var direction=\"vertical\"===this.options.direction,result={classes:{}};return result.classes[key]={middle:\"\",first:\"ui-corner-\"+(direction?\"top\":\"left\"),last:\"ui-corner-\"+(direction?\"bottom\":\"right\"),only:\"ui-corner-all\"}[position],result},_spinnerOptions:function(position){var options=this._buildSimpleOptions(position,\"ui-spinner\");return options.classes[\"ui-spinner-up\"]=\"\",options.classes[\"ui-spinner-down\"]=\"\",options},_buttonOptions:function(position){return this._buildSimpleOptions(position,\"ui-button\")},_checkboxradioOptions:function(position){return this._buildSimpleOptions(position,\"ui-checkboxradio-label\")},_selectmenuOptions:function(position){var direction=\"vertical\"===this.options.direction;return{width:!!direction&&\"auto\",classes:{middle:{\"ui-selectmenu-button-open\":\"\",\"ui-selectmenu-button-closed\":\"\"},first:{\"ui-selectmenu-button-open\":\"ui-corner-\"+(direction?\"top\":\"tl\"),\"ui-selectmenu-button-closed\":\"ui-corner-\"+(direction?\"top\":\"left\")},last:{\"ui-selectmenu-button-open\":direction?\"\":\"ui-corner-tr\",\"ui-selectmenu-button-closed\":\"ui-corner-\"+(direction?\"bottom\":\"right\")},only:{\"ui-selectmenu-button-open\":\"ui-corner-top\",\"ui-selectmenu-button-closed\":\"ui-corner-all\"}}[position]}},_resolveClassesValues:function(classes,instance){var result={};return $.each(classes,function(key){var current=instance.options.classes[key]||\"\";current=$.trim(current.replace(controlgroupCornerRegex,\"\")),result[key]=(current+\" \"+classes[key]).replace(/\\s+/g,\" \")}),result},_setOption:function(key,value){if(\"direction\"===key&&this._removeClass(\"ui-controlgroup-\"+this.options.direction),this._super(key,value),\"disabled\"===key)return void this._callChildMethod(value?\"disable\":\"enable\");this.refresh()},refresh:function(){var children,that=this;this._addClass(\"ui-controlgroup ui-controlgroup-\"+this.options.direction),\"horizontal\"===this.options.direction&&this._addClass(null,\"ui-helper-clearfix\"),this._initWidgets(),children=this.childWidgets,this.options.onlyVisible&&(children=children.filter(\":visible\")),children.length&&($.each([\"first\",\"last\"],function(index,value){var instance=children[value]().data(\"ui-controlgroup-data\");if(instance&&that[\"_\"+instance.widgetName+\"Options\"]){var options=that[\"_\"+instance.widgetName+\"Options\"](1===children.length?\"only\":value);options.classes=that._resolveClassesValues(options.classes,instance),instance.element[instance.widgetName](options)}else that._updateCornerClass(children[value](),value)}),this._callChildMethod(\"refresh\"))}});$.widget(\"ui.checkboxradio\",[$.ui.formResetMixin,{version:\"1.12.1\",options:{disabled:null,label:null,icon:!0,classes:{\"ui-checkboxradio-label\":\"ui-corner-all\",\"ui-checkboxradio-icon\":\"ui-corner-all\"}},_getCreateOptions:function(){var disabled,labels,that=this,options=this._super()||{};return this._readType(),labels=this.element.labels(),this.label=$(labels[labels.length-1]),this.label.length||$.error(\"No label found for checkboxradio widget\"),this.originalLabel=\"\",this.label.contents().not(this.element[0]).each(function(){that.originalLabel+=3===this.nodeType?$(this).text():this.outerHTML}),this.originalLabel&&(options.label=this.originalLabel),disabled=this.element[0].disabled,null!=disabled&&(options.disabled=disabled),options},_create:function(){var checked=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption(\"disabled\",this.options.disabled),this._addClass(\"ui-checkboxradio\",\"ui-helper-hidden-accessible\"),this._addClass(this.label,\"ui-checkboxradio-label\",\"ui-button ui-widget\"),\"radio\"===this.type&&this._addClass(this.label,\"ui-checkboxradio-radio-label\"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),checked&&(this._addClass(this.label,\"ui-checkboxradio-checked\",\"ui-state-active\"),this.icon&&this._addClass(this.icon,null,\"ui-state-hover\")),this._on({change:\"_toggleClasses\",focus:function(){this._addClass(this.label,null,\"ui-state-focus ui-visual-focus\")},blur:function(){this._removeClass(this.label,null,\"ui-state-focus ui-visual-focus\")}})},_readType:function(){var nodeName=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,\"input\"===nodeName&&/radio|checkbox/.test(this.type)||$.error(\"Can't create checkboxradio on element.nodeName=\"+nodeName+\" and element.type=\"+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var group,name=this.element[0].name,nameSelector=\"input[name='\"+$.ui.escapeSelector(name)+\"']\";return name?(group=this.form.length?$(this.form[0].elements).filter(nameSelector):$(nameSelector).filter(function(){return 0===$(this).form().length}),group.not(this.element)):$([])},_toggleClasses:function(){var checked=this.element[0].checked;this._toggleClass(this.label,\"ui-checkboxradio-checked\",\"ui-state-active\",checked),this.options.icon&&\"checkbox\"===this.type&&this._toggleClass(this.icon,null,\"ui-icon-check ui-state-checked\",checked)._toggleClass(this.icon,null,\"ui-icon-blank\",!checked),\"radio\"===this.type&&this._getRadioGroup().each(function(){var instance=$(this).checkboxradio(\"instance\");instance&&instance._removeClass(instance.label,\"ui-checkboxradio-checked\",\"ui-state-active\")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(key,value){if(\"label\"!==key||value){if(this._super(key,value),\"disabled\"===key)return this._toggleClass(this.label,null,\"ui-state-disabled\",value),void(this.element[0].disabled=value);this.refresh()}},_updateIcon:function(checked){var toAdd=\"ui-icon ui-icon-background \";this.options.icon?(this.icon||(this.icon=$(\"<span>\"),this.iconSpace=$(\"<span> </span>\"),this._addClass(this.iconSpace,\"ui-checkboxradio-icon-space\")),\"checkbox\"===this.type?(toAdd+=checked?\"ui-icon-check ui-state-checked\":\"ui-icon-blank\",this._removeClass(this.icon,null,checked?\"ui-icon-blank\":\"ui-icon-check\")):toAdd+=\"ui-icon-blank\",this._addClass(this.icon,\"ui-checkboxradio-icon\",toAdd),checked||this._removeClass(this.icon,null,\"ui-icon-check ui-state-checked\"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var contents=this.label.contents().not(this.element[0]);this.icon&&(contents=contents.not(this.icon[0])),this.iconSpace&&(contents=contents.not(this.iconSpace[0])),contents.remove(),this.label.append(this.options.label)},refresh:function(){var checked=this.element[0].checked,isDisabled=this.element[0].disabled;this._updateIcon(checked),this._toggleClass(this.label,\"ui-checkboxradio-checked\",\"ui-state-active\",checked),null!==this.options.label&&this._updateLabel(),isDisabled!==this.options.disabled&&this._setOptions({disabled:isDisabled})}}]);$.ui.checkboxradio;$.widget(\"ui.button\",{version:\"1.12.1\",defaultElement:\"<button>\",options:{classes:{\"ui-button\":\"ui-corner-all\"},disabled:null,icon:null,iconPosition:\"beginning\",label:null,showLabel:!0},_getCreateOptions:function(){var disabled,options=this._super()||{};return this.isInput=this.element.is(\"input\"),disabled=this.element[0].disabled,null!=disabled&&(options.disabled=disabled),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(options.label=this.originalLabel),options},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr(\"title\"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass(\"ui-button\",\"ui-widget\"),this._setOption(\"disabled\",this.options.disabled),this._enhance(),this.element.is(\"a\")&&this._on({keyup:function(event){event.keyCode===$.ui.keyCode.SPACE&&(event.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger(\"click\"))}})},_enhance:function(){this.element.is(\"button\")||this.element.attr(\"role\",\"button\"),this.options.icon&&(this._updateIcon(\"icon\",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr(\"title\"),this.options.showLabel||this.title||this.element.attr(\"title\",this.options.label)},_updateIcon:function(option,value){var icon=\"iconPosition\"!==option,position=icon?this.options.iconPosition:value,displayBlock=\"top\"===position||\"bottom\"===position;this.icon?icon&&this._removeClass(this.icon,null,this.options.icon):(this.icon=$(\"<span>\"),this._addClass(this.icon,\"ui-button-icon\",\"ui-icon\"),this.options.showLabel||this._addClass(\"ui-button-icon-only\")),icon&&this._addClass(this.icon,null,value),this._attachIcon(position),displayBlock?(this._addClass(this.icon,null,\"ui-widget-icon-block\"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=$(\"<span> </span>\"),this._addClass(this.iconSpace,\"ui-button-icon-space\")),this._removeClass(this.icon,null,\"ui-wiget-icon-block\"),this._attachIconSpace(position))},_destroy:function(){this.element.removeAttr(\"role\"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr(\"title\")},_attachIconSpace:function(iconPosition){this.icon[/^(?:end|bottom)/.test(iconPosition)?\"before\":\"after\"](this.iconSpace)},_attachIcon:function(iconPosition){this.element[/^(?:end|bottom)/.test(iconPosition)?\"append\":\"prepend\"](this.icon)},_setOptions:function(options){var newShowLabel=void 0===options.showLabel?this.options.showLabel:options.showLabel,newIcon=void 0===options.icon?this.options.icon:options.icon;newShowLabel||newIcon||(options.showLabel=!0),this._super(options)},_setOption:function(key,value){\"icon\"===key&&(value?this._updateIcon(key,value):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),\"iconPosition\"===key&&this._updateIcon(key,value),\"showLabel\"===key&&(this._toggleClass(\"ui-button-icon-only\",null,!value),this._updateTooltip()),\"label\"===key&&(this.isInput?this.element.val(value):(this.element.html(value),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(key,value),\"disabled\"===key&&(this._toggleClass(null,\"ui-state-disabled\",value),this.element[0].disabled=value,value&&this.element.blur())},refresh:function(){var isDisabled=this.element.is(\"input, button\")?this.element[0].disabled:this.element.hasClass(\"ui-button-disabled\");isDisabled!==this.options.disabled&&this._setOptions({disabled:isDisabled}),this._updateTooltip()}}),!1!==$.uiBackCompat&&($.widget(\"ui.button\",$.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition=\"end\"),this._super()},_setOption:function(key,value){if(\"text\"===key)return void this._super(\"showLabel\",value);\"showLabel\"===key&&(this.options.text=value),\"icon\"===key&&(this.options.icons.primary=value),\"icons\"===key&&(value.primary?(this._super(\"icon\",value.primary),this._super(\"iconPosition\",\"beginning\")):value.secondary&&(this._super(\"icon\",value.secondary),this._super(\"iconPosition\",\"end\"))),this._superApply(arguments)}}),$.fn.button=function(orig){return function(){return!this.length||this.length&&\"INPUT\"!==this[0].tagName||this.length&&\"INPUT\"===this[0].tagName&&\"checkbox\"!==this.attr(\"type\")&&\"radio\"!==this.attr(\"type\")?orig.apply(this,arguments):($.ui.checkboxradio||$.error(\"Checkboxradio widget missing\"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}($.fn.button),$.fn.buttonset=function(){return $.ui.controlgroup||$.error(\"Controlgroup widget missing\"),\"option\"===arguments[0]&&\"items\"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],\"items.button\",arguments[2]]):\"option\"===arguments[0]&&\"items\"===arguments[1]?this.controlgroup.apply(this,[arguments[0],\"items.button\"]):(\"object\"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});$.ui.button;$.extend($.ui,{datepicker:{version:\"1.12.1\"}});var datepicker_instActive;$.extend(Datepicker.prototype,{markerClassName:\"hasDatepicker\",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){return datepicker_extendRemove(this._defaults,settings||{}),this},_attachDatepicker:function(target,settings){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase(),inline=\"div\"===nodeName||\"span\"===nodeName,target.id||(this.uuid+=1,target.id=\"dp\"+this.uuid),inst=this._newInst($(target),inline),inst.settings=$.extend({},settings||{}),\"input\"===nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(target,inline){return{id:target[0].id.replace(/([^A-Za-z0-9_\\-])/g,\"\\\\\\\\$1\"),input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:inline?datepicker_bindHover($(\"<div class='\"+this._inlineClass+\" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")):this.dpDiv}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]),inst.trigger=$([]),input.hasClass(this.markerClassName)||(this._attachments(input,inst),input.addClass(this.markerClassName).on(\"keydown\",this._doKeyDown).on(\"keypress\",this._doKeyPress).on(\"keyup\",this._doKeyUp),this._autoSize(inst),$.data(target,\"datepicker\",inst),inst.settings.disabled&&this._disableDatepicker(target))},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,\"appendText\"),isRTL=this._get(inst,\"isRTL\");inst.append&&inst.append.remove(),appendText&&(inst.append=$(\"<span class='\"+this._appendClass+\"'>\"+appendText+\"</span>\"),input[isRTL?\"before\":\"after\"](inst.append)),input.off(\"focus\",this._showDatepicker),inst.trigger&&inst.trigger.remove(),showOn=this._get(inst,\"showOn\"),\"focus\"!==showOn&&\"both\"!==showOn||input.on(\"focus\",this._showDatepicker),\"button\"!==showOn&&\"both\"!==showOn||(buttonText=this._get(inst,\"buttonText\"),buttonImage=this._get(inst,\"buttonImage\"),inst.trigger=$(this._get(inst,\"buttonImageOnly\")?$(\"<img/>\").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$(\"<button type='button'></button>\").addClass(this._triggerClass).html(buttonImage?$(\"<img/>\").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText)),input[isRTL?\"before\":\"after\"](inst.trigger),inst.trigger.on(\"click\",function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(input[0])):$.datepicker._showDatepicker(input[0]),!1}))},_autoSize:function(inst){if(this._get(inst,\"autoSize\")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,11,20),dateFormat=this._get(inst,\"dateFormat\");dateFormat.match(/[DM]/)&&(findMax=function(names){for(max=0,maxI=0,i=0;i<names.length;i++)names[i].length>max&&(max=names[i].length,maxI=i);return maxI},date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?\"monthNames\":\"monthNamesShort\"))),date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?\"dayNames\":\"dayNamesShort\"))+20-date.getDay())),inst.input.attr(\"size\",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);divSpan.hasClass(this.markerClassName)||(divSpan.addClass(this.markerClassName).append(inst.dpDiv),$.data(target,\"datepicker\",inst),this._setDate(inst,this._getDefaultDate(inst),!0),this._updateDatepicker(inst),this._updateAlternate(inst),inst.settings.disabled&&this._disableDatepicker(target),inst.dpDiv.css(\"display\",\"block\"))},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;return inst||(this.uuid+=1,id=\"dp\"+this.uuid,this._dialogInput=$(\"<input type='text' id='\"+id+\"' style='position: absolute; top: -100px; width: 0px;'/>\"),this._dialogInput.on(\"keydown\",this._doKeyDown),$(\"body\").append(this._dialogInput),inst=this._dialogInst=this._newInst(this._dialogInput,!1),inst.settings={},$.data(this._dialogInput[0],\"datepicker\",inst)),datepicker_extendRemove(inst.settings,settings||{}),date=date&&date.constructor===Date?this._formatDate(inst,date):date,this._dialogInput.val(date),this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null,this._pos||(browserWidth=document.documentElement.clientWidth,browserHeight=document.documentElement.clientHeight,scrollX=document.documentElement.scrollLeft||document.body.scrollLeft,scrollY=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]),this._dialogInput.css(\"left\",this._pos[0]+20+\"px\").css(\"top\",this._pos[1]+\"px\"),inst.settings.onSelect=onSelect,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],\"datepicker\",inst),this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,\"datepicker\");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),$.removeData(target,\"datepicker\"),\"input\"===nodeName?(inst.append.remove(),inst.trigger.remove(),$target.removeClass(this.markerClassName).off(\"focus\",this._showDatepicker).off(\"keydown\",this._doKeyDown).off(\"keypress\",this._doKeyPress).off(\"keyup\",this._doKeyUp)):\"div\"!==nodeName&&\"span\"!==nodeName||$target.removeClass(this.markerClassName).empty(),datepicker_instActive===inst&&(datepicker_instActive=null))},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,\"datepicker\");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),\"input\"===nodeName?(target.disabled=!1,inst.trigger.filter(\"button\").each(function(){this.disabled=!1}).end().filter(\"img\").css({opacity:\"1.0\",cursor:\"\"})):\"div\"!==nodeName&&\"span\"!==nodeName||(inline=$target.children(\".\"+this._inlineClass),inline.children().removeClass(\"ui-state-disabled\"),inline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!1)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}))},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,\"datepicker\");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),\"input\"===nodeName?(target.disabled=!0,inst.trigger.filter(\"button\").each(function(){this.disabled=!0}).end().filter(\"img\").css({opacity:\"0.5\",cursor:\"default\"})):\"div\"!==nodeName&&\"span\"!==nodeName||(inline=$target.children(\".\"+this._inlineClass),inline.children().addClass(\"ui-state-disabled\"),inline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!0)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}),this._disabledInputs[this._disabledInputs.length]=target)},_isDisabledDatepicker:function(target){if(!target)return!1;for(var i=0;i<this._disabledInputs.length;i++)if(this._disabledInputs[i]===target)return!0;return!1},_getInst:function(target){try{return $.data(target,\"datepicker\")}catch(err){throw\"Missing instance data for this datepicker\"}},_optionDatepicker:function(target,name,value){var settings,date,minDate,maxDate,inst=this._getInst(target);if(2===arguments.length&&\"string\"==typeof name)return\"defaults\"===name?$.extend({},$.datepicker._defaults):inst?\"all\"===name?$.extend({},inst.settings):this._get(inst,name):null;settings=name||{},\"string\"==typeof name&&(settings={},settings[name]=value),inst&&(this._curInst===inst&&this._hideDatepicker(),date=this._getDateDatepicker(target,!0),minDate=this._getMinMaxDate(inst,\"min\"),maxDate=this._getMinMaxDate(inst,\"max\"),datepicker_extendRemove(inst.settings,settings),null!==minDate&&void 0!==settings.dateFormat&&void 0===settings.minDate&&(inst.settings.minDate=this._formatDate(inst,minDate)),null!==maxDate&&void 0!==settings.dateFormat&&void 0===settings.maxDate&&(inst.settings.maxDate=this._formatDate(inst,maxDate)),\"disabled\"in settings&&(settings.disabled?this._disableDatepicker(target):this._enableDatepicker(target)),this._attachments($(target),inst),this._autoSize(inst),this._setDate(inst,date),this._updateAlternate(inst),this._updateDatepicker(inst))},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);inst&&this._updateDatepicker(inst)},_setDateDatepicker:function(target,date){var inst=this._getInst(target);inst&&(this._setDate(inst,date),this._updateDatepicker(inst),this._updateAlternate(inst))},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);return inst&&!inst.inline&&this._setDateFromField(inst,noDefault),inst?this._getDate(inst):null},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$.datepicker._getInst(event.target),handled=!0,isRTL=inst.dpDiv.is(\".ui-datepicker-rtl\");if(inst._keyEvent=!0,$.datepicker._datepickerShowing)switch(event.keyCode){case 9:$.datepicker._hideDatepicker(),handled=!1;break;case 13:return sel=$(\"td.\"+$.datepicker._dayOverClass+\":not(.\"+$.datepicker._currentClass+\")\",inst.dpDiv),sel[0]&&$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]),onSelect=$.datepicker._get(inst,\"onSelect\"),onSelect?(dateStr=$.datepicker._formatDate(inst),onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])):$.datepicker._hideDatepicker(),!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,\"stepBigMonths\"):-$.datepicker._get(inst,\"stepMonths\"),\"M\");break;case 34:$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,\"stepBigMonths\"):+$.datepicker._get(inst,\"stepMonths\"),\"M\");break;case 35:(event.ctrlKey||event.metaKey)&&$.datepicker._clearDate(event.target),handled=event.ctrlKey||event.metaKey;break;case 36:(event.ctrlKey||event.metaKey)&&$.datepicker._gotoToday(event.target),handled=event.ctrlKey||event.metaKey;break;case 37:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?1:-1,\"D\"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,\"stepBigMonths\"):-$.datepicker._get(inst,\"stepMonths\"),\"M\");break;case 38:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,-7,\"D\"),handled=event.ctrlKey||event.metaKey;break;case 39:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?-1:1,\"D\"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,\"stepBigMonths\"):+$.datepicker._get(inst,\"stepMonths\"),\"M\");break;case 40:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,7,\"D\"),handled=event.ctrlKey||event.metaKey;break;default:handled=!1}else 36===event.keyCode&&event.ctrlKey?$.datepicker._showDatepicker(this):handled=!1;handled&&(event.preventDefault(),event.stopPropagation())},_doKeyPress:function(event){var chars,chr,inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,\"constrainInput\"))return chars=$.datepicker._possibleChars($.datepicker._get(inst,\"dateFormat\")),chr=String.fromCharCode(null==event.charCode?event.keyCode:event.charCode),event.ctrlKey||event.metaKey||chr<\" \"||!chars||chars.indexOf(chr)>-1},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal)try{date=$.datepicker.parseDate($.datepicker._get(inst,\"dateFormat\"),inst.input?inst.input.val():null,$.datepicker._getFormatConfig(inst)),date&&($.datepicker._setDateFromField(inst),$.datepicker._updateAlternate(inst),$.datepicker._updateDatepicker(inst))}catch(err){}return!0},_showDatepicker:function(input){if(input=input.target||input,\"input\"!==input.nodeName.toLowerCase()&&(input=$(\"input\",input.parentNode)[0]),!$.datepicker._isDisabledDatepicker(input)&&$.datepicker._lastInput!==input){var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input),$.datepicker._curInst&&$.datepicker._curInst!==inst&&($.datepicker._curInst.dpDiv.stop(!0,!0),inst&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0])),beforeShow=$.datepicker._get(inst,\"beforeShow\"),beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{},!1!==beforeShowSettings&&(datepicker_extendRemove(inst.settings,beforeShowSettings),inst.lastVal=null,$.datepicker._lastInput=input,$.datepicker._setDateFromField(inst),$.datepicker._inDialog&&(input.value=\"\"),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(input),$.datepicker._pos[1]+=input.offsetHeight),isFixed=!1,$(input).parents().each(function(){return!(isFixed|=\"fixed\"===$(this).css(\"position\"))}),offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]},$.datepicker._pos=null,inst.dpDiv.empty(),inst.dpDiv.css({position:\"absolute\",display:\"block\",top:\"-1000px\"}),$.datepicker._updateDatepicker(inst),offset=$.datepicker._checkOffset(inst,offset,isFixed),inst.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?\"static\":isFixed?\"fixed\":\"absolute\",display:\"none\",left:offset.left+\"px\",top:offset.top+\"px\"}),inst.inline||(showAnim=$.datepicker._get(inst,\"showAnim\"),duration=$.datepicker._get(inst,\"duration\"),inst.dpDiv.css(\"z-index\",datepicker_getZindex($(input))+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects.effect[showAnim]?inst.dpDiv.show(showAnim,$.datepicker._get(inst,\"showOptions\"),duration):inst.dpDiv[showAnim||\"show\"](showAnim?duration:null),$.datepicker._shouldFocusInput(inst)&&inst.input.trigger(\"focus\"),$.datepicker._curInst=inst))}},_updateDatepicker:function(inst){this.maxRows=4,datepicker_instActive=inst,inst.dpDiv.empty().append(this._generateHTML(inst)),this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],activeCell=inst.dpDiv.find(\".\"+this._dayOverClass+\" a\");activeCell.length>0&&datepicker_handleMouseover.apply(activeCell.get(0)),inst.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"),cols>1&&inst.dpDiv.addClass(\"ui-datepicker-multi-\"+cols).css(\"width\",17*cols+\"em\"),inst.dpDiv[(1!==numMonths[0]||1!==numMonths[1]?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-multi\"),inst.dpDiv[(this._get(inst,\"isRTL\")?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-rtl\"),inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)&&inst.input.trigger(\"focus\"),inst.yearshtml&&(origyearshtml=inst.yearshtml,setTimeout(function(){origyearshtml===inst.yearshtml&&inst.yearshtml&&inst.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(inst.yearshtml),origyearshtml=inst.yearshtml=null},0))},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(\":visible\")&&!inst.input.is(\":disabled\")&&!inst.input.is(\":focus\")},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());return offset.left-=this._get(inst,\"isRTL\")?dpWidth-inputWidth:0,offset.left-=isFixed&&offset.left===inst.input.offset().left?$(document).scrollLeft():0,offset.top-=isFixed&&offset.top===inst.input.offset().top+inputHeight?$(document).scrollTop():0,offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0),offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight):0),offset},_findPos:function(obj){for(var position,inst=this._getInst(obj),isRTL=this._get(inst,\"isRTL\");obj&&(\"hidden\"===obj.type||1!==obj.nodeType||$.expr.filters.hidden(obj));)obj=obj[isRTL?\"previousSibling\":\"nextSibling\"]\n;return position=$(obj).offset(),[position.left,position.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;!inst||input&&inst!==$.data(input,\"datepicker\")||this._datepickerShowing&&(showAnim=this._get(inst,\"showAnim\"),duration=this._get(inst,\"duration\"),postProcess=function(){$.datepicker._tidyDialog(inst)},$.effects&&($.effects.effect[showAnim]||$.effects[showAnim])?inst.dpDiv.hide(showAnim,$.datepicker._get(inst,\"showOptions\"),duration,postProcess):inst.dpDiv[\"slideDown\"===showAnim?\"slideUp\":\"fadeIn\"===showAnim?\"fadeOut\":\"hide\"](showAnim?duration:null,postProcess),showAnim||postProcess(),this._datepickerShowing=!1,onClose=this._get(inst,\"onClose\"),onClose&&onClose.apply(inst.input?inst.input[0]:null,[inst.input?inst.input.val():\"\",inst]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:\"absolute\",left:\"0\",top:\"-100px\"}),$.blockUI&&($.unblockUI(),$(\"body\").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).off(\".ui-datepicker-calendar\")},_checkExternalClick:function(event){if($.datepicker._curInst){var $target=$(event.target),inst=$.datepicker._getInst($target[0]);($target[0].id===$.datepicker._mainDivId||0!==$target.parents(\"#\"+$.datepicker._mainDivId).length||$target.hasClass($.datepicker.markerClassName)||$target.closest(\".\"+$.datepicker._triggerClass).length||!$.datepicker._datepickerShowing||$.datepicker._inDialog&&$.blockUI)&&(!$target.hasClass($.datepicker.markerClassName)||$.datepicker._curInst===inst)||$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);this._isDisabledDatepicker(target[0])||(this._adjustInstDate(inst,offset+(\"M\"===period?this._get(inst,\"showCurrentAtPos\"):0),period),this._updateDatepicker(inst))},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);this._get(inst,\"gotoCurrent\")&&inst.currentDay?(inst.selectedDay=inst.currentDay,inst.drawMonth=inst.selectedMonth=inst.currentMonth,inst.drawYear=inst.selectedYear=inst.currentYear):(date=new Date,inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear()),this._notifyChange(inst),this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst[\"selected\"+(\"M\"===period?\"Month\":\"Year\")]=inst[\"draw\"+(\"M\"===period?\"Month\":\"Year\")]=parseInt(select.options[select.selectedIndex].value,10),this._notifyChange(inst),this._adjustDate(target)},_selectDay:function(id,month,year,td){var inst,target=$(id);$(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])||(inst=this._getInst(target[0]),inst.selectedDay=inst.currentDay=$(\"a\",td).html(),inst.selectedMonth=inst.currentMonth=month,inst.selectedYear=inst.currentYear=year,this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear)))},_clearDate:function(id){var target=$(id);this._selectDate(target,\"\")},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=null!=dateStr?dateStr:this._formatDate(inst),inst.input&&inst.input.val(dateStr),this._updateAlternate(inst),onSelect=this._get(inst,\"onSelect\"),onSelect?onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst]):inst.input&&inst.input.trigger(\"change\"),inst.inline?this._updateDatepicker(inst):(this._hideDatepicker(),this._lastInput=inst.input[0],\"object\"!=typeof inst.input[0]&&inst.input.trigger(\"focus\"),this._lastInput=null)},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,\"altField\");altField&&(altFormat=this._get(inst,\"altFormat\")||this._get(inst,\"dateFormat\"),date=this._getDate(inst),dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst)),$(altField).val(dateStr))},noWeekends:function(date){var day=date.getDay();return[day>0&&day<6,\"\"]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());return checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7)),time=checkDate.getTime(),checkDate.setMonth(0),checkDate.setDate(1),Math.floor(Math.round((time-checkDate)/864e5)/7)+1},parseDate:function(format,value,settings){if(null==format||null==value)throw\"Invalid arguments\";if(\"\"===(value=\"object\"==typeof value?value.toString():value+\"\"))return null;var iFormat,dim,extra,date,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=\"string\"!=typeof shortYearCutoffTemp?shortYearCutoffTemp:(new Date).getFullYear()%100+parseInt(shortYearCutoffTemp,10),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},getNumber=function(match){var isDoubled=lookAhead(match),size=\"@\"===match?14:\"!\"===match?20:\"y\"===match&&isDoubled?4:\"o\"===match?3:2,minSize=\"y\"===match?size:1,digits=new RegExp(\"^\\\\d{\"+minSize+\",\"+size+\"}\"),num=value.substring(iValue).match(digits);if(!num)throw\"Missing number at position \"+iValue;return iValue+=num[0].length,parseInt(num[0],10)},getName=function(match,shortNames,longNames){var index=-1,names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if($.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase())return index=pair[0],iValue+=name.length,!1}),-1!==index)return index+1;throw\"Unknown name at position \"+iValue},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat))throw\"Unexpected literal at position \"+iValue;iValue++};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)\"'\"!==format.charAt(iFormat)||lookAhead(\"'\")?checkLiteral():literal=!1;else switch(format.charAt(iFormat)){case\"d\":day=getNumber(\"d\");break;case\"D\":getName(\"D\",dayNamesShort,dayNames);break;case\"o\":doy=getNumber(\"o\");break;case\"m\":month=getNumber(\"m\");break;case\"M\":month=getName(\"M\",monthNamesShort,monthNames);break;case\"y\":year=getNumber(\"y\");break;case\"@\":date=new Date(getNumber(\"@\")),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case\"!\":date=new Date((getNumber(\"!\")-this._ticksTo1970)/1e4),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case\"'\":lookAhead(\"'\")?checkLiteral():literal=!0;break;default:checkLiteral()}if(iValue<value.length&&(extra=value.substr(iValue),!/^\\s+/.test(extra)))throw\"Extra/unparsed characters found in date: \"+extra;if(-1===year?year=(new Date).getFullYear():year<100&&(year+=(new Date).getFullYear()-(new Date).getFullYear()%100+(year<=shortYearCutoff?0:-100)),doy>-1)for(month=1,day=doy;;){if(dim=this._getDaysInMonth(year,month-1),day<=dim)break;month++,day-=dim}if(date=this._daylightSavingAdjust(new Date(year,month-1,day)),date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day)throw\"Invalid date\";return date},ATOM:\"yy-mm-dd\",COOKIE:\"D, dd M yy\",ISO_8601:\"yy-mm-dd\",RFC_822:\"D, d M y\",RFC_850:\"DD, dd-M-y\",RFC_1036:\"D, d M y\",RFC_1123:\"D, d M yy\",RFC_2822:\"D, d M yy\",RSS:\"D, d M y\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yy-mm-dd\",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(format,date,settings){if(!date)return\"\";var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},formatNumber=function(match,value,len){var num=\"\"+value;if(lookAhead(match))for(;num.length<len;)num=\"0\"+num;return num},formatName=function(match,value,shortNames,longNames){return lookAhead(match)?longNames[value]:shortNames[value]},output=\"\",literal=!1;if(date)for(iFormat=0;iFormat<format.length;iFormat++)if(literal)\"'\"!==format.charAt(iFormat)||lookAhead(\"'\")?output+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case\"d\":output+=formatNumber(\"d\",date.getDate(),2);break;case\"D\":output+=formatName(\"D\",date.getDay(),dayNamesShort,dayNames);break;case\"o\":output+=formatNumber(\"o\",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/864e5),3);break;case\"m\":output+=formatNumber(\"m\",date.getMonth()+1,2);break;case\"M\":output+=formatName(\"M\",date.getMonth(),monthNamesShort,monthNames);break;case\"y\":output+=lookAhead(\"y\")?date.getFullYear():(date.getFullYear()%100<10?\"0\":\"\")+date.getFullYear()%100;break;case\"@\":output+=date.getTime();break;case\"!\":output+=1e4*date.getTime()+this._ticksTo1970;break;case\"'\":lookAhead(\"'\")?output+=\"'\":literal=!0;break;default:output+=format.charAt(iFormat)}return output},_possibleChars:function(format){var iFormat,chars=\"\",literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)\"'\"!==format.charAt(iFormat)||lookAhead(\"'\")?chars+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case\"d\":case\"m\":case\"y\":case\"@\":chars+=\"0123456789\";break;case\"D\":case\"M\":return null;case\"'\":lookAhead(\"'\")?chars+=\"'\":literal=!0;break;default:chars+=format.charAt(iFormat)}return chars},_get:function(inst,name){return void 0!==inst.settings[name]?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()!==inst.lastVal){var dateFormat=this._get(inst,\"dateFormat\"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){dates=noDefault?\"\":dates}inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),inst.currentDay=dates?date.getDate():0,inst.currentMonth=dates?date.getMonth():0,inst.currentYear=dates?date.getFullYear():0,this._adjustInstDate(inst)}},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,\"defaultDate\"),new Date))},_determineDate:function(inst,date,defaultDate){var newDate=null==date||\"\"===date?defaultDate:\"string\"==typeof date?function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,\"dateFormat\"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}for(var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date,year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),pattern=/([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);matches;){switch(matches[2]||\"d\"){case\"d\":case\"D\":day+=parseInt(matches[1],10);break;case\"w\":case\"W\":day+=7*parseInt(matches[1],10);break;case\"m\":case\"M\":month+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case\"y\":case\"Y\":year+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month))}matches=pattern.exec(offset)}return new Date(year,month,day)}(date):\"number\"==typeof date?isNaN(date)?defaultDate:function(offset){var date=new Date;return date.setDate(date.getDate()+offset),date}(date):new Date(date.getTime());return newDate=newDate&&\"Invalid Date\"===newDate.toString()?defaultDate:newDate,newDate&&(newDate.setHours(0),newDate.setMinutes(0),newDate.setSeconds(0),newDate.setMilliseconds(0)),this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){return date?(date.setHours(date.getHours()>12?date.getHours()+2:0),date):null},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date));inst.selectedDay=inst.currentDay=newDate.getDate(),inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth(),inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear(),origMonth===inst.selectedMonth&&origYear===inst.selectedYear||noChange||this._notifyChange(inst),this._adjustInstDate(inst),inst.input&&inst.input.val(clear?\"\":this._formatDate(inst))},_getDate:function(inst){return!inst.currentYear||inst.input&&\"\"===inst.input.val()?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay))},_attachHandlers:function(inst){var stepMonths=this._get(inst,\"stepMonths\"),id=\"#\"+inst.id.replace(/\\\\\\\\/g,\"\\\\\");inst.dpDiv.find(\"[data-handler]\").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,\"M\")},next:function(){$.datepicker._adjustDate(id,+stepMonths,\"M\")},hide:function(){$.datepicker._hideDatepicker()},today:function(){$.datepicker._gotoToday(id)},selectDay:function(){return $.datepicker._selectDay(id,+this.getAttribute(\"data-month\"),+this.getAttribute(\"data-year\"),this),!1},selectMonth:function(){return $.datepicker._selectMonthYear(id,this,\"M\"),!1},selectYear:function(){return $.datepicker._selectMonthYear(id,this,\"Y\"),!1}};$(this).on(this.getAttribute(\"data-event\"),handler[this.getAttribute(\"data-handler\")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date,today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,\"isRTL\"),showButtonPanel=this._get(inst,\"showButtonPanel\"),hideIfNoPrevNext=this._get(inst,\"hideIfNoPrevNext\"),navigationAsDateFormat=this._get(inst,\"navigationAsDateFormat\"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,\"showCurrentAtPos\"),stepMonths=this._get(inst,\"stepMonths\"),isMultiMonth=1!==numMonths[0]||1!==numMonths[1],currentDate=this._daylightSavingAdjust(inst.currentDay?new Date(inst.currentYear,inst.currentMonth,inst.currentDay):new Date(9999,9,9)),minDate=this._getMinMaxDate(inst,\"min\"),maxDate=this._getMinMaxDate(inst,\"max\"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0&&(drawMonth+=12,drawYear--),maxDate)for(maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate())),maxDraw=minDate&&maxDraw<minDate?minDate:maxDraw;this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw;)--drawMonth<0&&(drawMonth=11,drawYear--);for(inst.drawMonth=drawMonth,inst.drawYear=drawYear,prevText=this._get(inst,\"prevText\"),prevText=navigationAsDateFormat?this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)):prevText,prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='\"+prevText+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(isRTL?\"e\":\"w\")+\"'>\"+prevText+\"</span></a>\":hideIfNoPrevNext?\"\":\"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+prevText+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(isRTL?\"e\":\"w\")+\"'>\"+prevText+\"</span></a>\",nextText=this._get(inst,\"nextText\"),nextText=navigationAsDateFormat?this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)):nextText,next=this._canAdjustMonth(inst,1,drawYear,drawMonth)?\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='\"+nextText+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(isRTL?\"w\":\"e\")+\"'>\"+nextText+\"</span></a>\":hideIfNoPrevNext?\"\":\"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+nextText+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(isRTL?\"w\":\"e\")+\"'>\"+nextText+\"</span></a>\",currentText=this._get(inst,\"currentText\"),gotoDate=this._get(inst,\"gotoCurrent\")&&inst.currentDay?currentDate:today,currentText=navigationAsDateFormat?this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)):currentText,controls=inst.inline?\"\":\"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\"+this._get(inst,\"closeText\")+\"</button>\",buttonPanel=showButtonPanel?\"<div class='ui-datepicker-buttonpane ui-widget-content'>\"+(isRTL?controls:\"\")+(this._isInRange(inst,gotoDate)?\"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>\"+currentText+\"</button>\":\"\")+(isRTL?\"\":controls)+\"</div>\":\"\",firstDay=parseInt(this._get(inst,\"firstDay\"),10),firstDay=isNaN(firstDay)?0:firstDay,showWeek=this._get(inst,\"showWeek\"),dayNames=this._get(inst,\"dayNames\"),dayNamesMin=this._get(inst,\"dayNamesMin\"),monthNames=this._get(inst,\"monthNames\"),monthNamesShort=this._get(inst,\"monthNamesShort\"),beforeShowDay=this._get(inst,\"beforeShowDay\"),showOtherMonths=this._get(inst,\"showOtherMonths\"),selectOtherMonths=this._get(inst,\"selectOtherMonths\"),defaultDate=this._getDefaultDate(inst),html=\"\",row=0;row<numMonths[0];row++){for(group=\"\",this.maxRows=4,col=0;col<numMonths[1];col++){if(selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay)),cornerClass=\" ui-corner-all\",calender=\"\",isMultiMonth){if(calender+=\"<div class='ui-datepicker-group\",numMonths[1]>1)switch(col){case 0:calender+=\" ui-datepicker-group-first\",cornerClass=\" ui-corner-\"+(isRTL?\"right\":\"left\");break;case numMonths[1]-1:calender+=\" ui-datepicker-group-last\",cornerClass=\" ui-corner-\"+(isRTL?\"left\":\"right\");break;default:calender+=\" ui-datepicker-group-middle\",cornerClass=\"\"}calender+=\"'>\"}for(calender+=\"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\"+cornerClass+\"'>\"+(/all|left/.test(cornerClass)&&0===row?isRTL?next:prev:\"\")+(/all|right/.test(cornerClass)&&0===row?isRTL?prev:next:\"\")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+\"</div><table class='ui-datepicker-calendar'><thead><tr>\",thead=showWeek?\"<th class='ui-datepicker-week-col'>\"+this._get(inst,\"weekHeader\")+\"</th>\":\"\",dow=0;dow<7;dow++)day=(dow+firstDay)%7,thead+=\"<th scope='col'\"+((dow+firstDay+6)%7>=5?\" class='ui-datepicker-week-end'\":\"\")+\"><span title='\"+dayNames[day]+\"'>\"+dayNamesMin[day]+\"</span></th>\";for(calender+=thead+\"</tr></thead><tbody>\",daysInMonth=this._getDaysInMonth(drawYear,drawMonth),drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth&&(inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)),leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7,curRows=Math.ceil((leadDays+daysInMonth)/7),numRows=isMultiMonth&&this.maxRows>curRows?this.maxRows:curRows,this.maxRows=numRows,printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays)),dRow=0;dRow<numRows;dRow++){for(calender+=\"<tr>\",tbody=showWeek?\"<td class='ui-datepicker-week-col'>\"+this._get(inst,\"calculateWeek\")(printDate)+\"</td>\":\"\",dow=0;dow<7;dow++)daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[!0,\"\"],otherMonth=printDate.getMonth()!==drawMonth,unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&printDate<minDate||maxDate&&printDate>maxDate,tbody+=\"<td class='\"+((dow+firstDay+6)%7>=5?\" ui-datepicker-week-end\":\"\")+(otherMonth?\" ui-datepicker-other-month\":\"\")+(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?\" \"+this._dayOverClass:\"\")+(unselectable?\" \"+this._unselectableClass+\" ui-state-disabled\":\"\")+(otherMonth&&!showOtherMonths?\"\":\" \"+daySettings[1]+(printDate.getTime()===currentDate.getTime()?\" \"+this._currentClass:\"\")+(printDate.getTime()===today.getTime()?\" ui-datepicker-today\":\"\"))+\"'\"+(otherMonth&&!showOtherMonths||!daySettings[2]?\"\":\" title='\"+daySettings[2].replace(/'/g,\"&#39;\")+\"'\")+(unselectable?\"\":\" data-handler='selectDay' data-event='click' data-month='\"+printDate.getMonth()+\"' data-year='\"+printDate.getFullYear()+\"'\")+\">\"+(otherMonth&&!showOtherMonths?\"&#xa0;\":unselectable?\"<span class='ui-state-default'>\"+printDate.getDate()+\"</span>\":\"<a class='ui-state-default\"+(printDate.getTime()===today.getTime()?\" ui-state-highlight\":\"\")+(printDate.getTime()===currentDate.getTime()?\" ui-state-active\":\"\")+(otherMonth?\" ui-priority-secondary\":\"\")+\"' href='#'>\"+printDate.getDate()+\"</a>\")+\"</td>\",printDate.setDate(printDate.getDate()+1),printDate=this._daylightSavingAdjust(printDate);calender+=tbody+\"</tr>\"}drawMonth++,drawMonth>11&&(drawMonth=0,drawYear++),calender+=\"</tbody></table>\"+(isMultiMonth?\"</div>\"+(numMonths[0]>0&&col===numMonths[1]-1?\"<div class='ui-datepicker-row-break'></div>\":\"\"):\"\"),group+=calender}html+=group}return html+=buttonPanel,inst._keyEvent=!1,html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,\"changeMonth\"),changeYear=this._get(inst,\"changeYear\"),showMonthAfterYear=this._get(inst,\"showMonthAfterYear\"),html=\"<div class='ui-datepicker-title'>\",monthHtml=\"\";if(secondary||!changeMonth)monthHtml+=\"<span class='ui-datepicker-month'>\"+monthNames[drawMonth]+\"</span>\";else{for(inMinYear=minDate&&minDate.getFullYear()===drawYear,inMaxYear=maxDate&&maxDate.getFullYear()===drawYear,monthHtml+=\"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\",month=0;month<12;month++)(!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())&&(monthHtml+=\"<option value='\"+month+\"'\"+(month===drawMonth?\" selected='selected'\":\"\")+\">\"+monthNamesShort[month]+\"</option>\");monthHtml+=\"</select>\"}if(showMonthAfterYear||(html+=monthHtml+(!secondary&&changeMonth&&changeYear?\"\":\"&#xa0;\")),!inst.yearshtml)if(inst.yearshtml=\"\",secondary||!changeYear)html+=\"<span class='ui-datepicker-year'>\"+drawYear+\"</span>\";else{for(years=this._get(inst,\"yearRange\").split(\":\"),thisYear=(new Date).getFullYear(),determineYear=function(value){var year=value.match(/c[+\\-].*/)?drawYear+parseInt(value.substring(1),10):value.match(/[+\\-].*/)?thisYear+parseInt(value,10):parseInt(value,10);return isNaN(year)?thisYear:year},year=determineYear(years[0]),endYear=Math.max(year,determineYear(years[1]||\"\")),year=minDate?Math.max(year,minDate.getFullYear()):year,endYear=maxDate?Math.min(endYear,maxDate.getFullYear()):endYear,inst.yearshtml+=\"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";year<=endYear;year++)inst.yearshtml+=\"<option value='\"+year+\"'\"+(year===drawYear?\" selected='selected'\":\"\")+\">\"+year+\"</option>\";inst.yearshtml+=\"</select>\",html+=inst.yearshtml,inst.yearshtml=null}return html+=this._get(inst,\"yearSuffix\"),showMonthAfterYear&&(html+=(!secondary&&changeMonth&&changeYear?\"\":\"&#xa0;\")+monthHtml),html+=\"</div>\"},_adjustInstDate:function(inst,offset,period){var year=inst.selectedYear+(\"Y\"===period?offset:0),month=inst.selectedMonth+(\"M\"===period?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(\"D\"===period?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),\"M\"!==period&&\"Y\"!==period||this._notifyChange(inst)},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,\"min\"),maxDate=this._getMinMaxDate(inst,\"max\"),newDate=minDate&&date<minDate?minDate:date;return maxDate&&newDate>maxDate?maxDate:newDate},_notifyChange:function(inst){var onChange=this._get(inst,\"onChangeMonthYear\");onChange&&onChange.apply(inst.input?inst.input[0]:null,[inst.selectedYear,inst.selectedMonth+1,inst])},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,\"numberOfMonths\");return null==numMonths?[1,1]:\"number\"==typeof numMonths?[1,numMonths]:numMonths},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+\"Date\"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));return offset<0&&date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth())),this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,\"min\"),maxDate=this._getMinMaxDate(inst,\"max\"),minYear=null,maxYear=null,years=this._get(inst,\"yearRange\");return years&&(yearSplit=years.split(\":\"),currentYear=(new Date).getFullYear(),minYear=parseInt(yearSplit[0],10),maxYear=parseInt(yearSplit[1],10),yearSplit[0].match(/[+\\-].*/)&&(minYear+=currentYear),yearSplit[1].match(/[+\\-].*/)&&(maxYear+=currentYear)),(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear)},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,\"shortYearCutoff\");return shortYearCutoff=\"string\"!=typeof shortYearCutoff?shortYearCutoff:(new Date).getFullYear()%100+parseInt(shortYearCutoff,10),{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,\"dayNamesShort\"),dayNames:this._get(inst,\"dayNames\"),monthNamesShort:this._get(inst,\"monthNamesShort\"),monthNames:this._get(inst,\"monthNames\")}},_formatDate:function(inst,day,month,year){day||(inst.currentDay=inst.selectedDay,inst.currentMonth=inst.selectedMonth,inst.currentYear=inst.selectedYear);var date=day?\"object\"==typeof day?day:this._daylightSavingAdjust(new Date(year,month,day)):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,\"dateFormat\"),date,this._getFormatConfig(inst))}}),$.fn.datepicker=function(options){if(!this.length)return this;$.datepicker.initialized||($(document).on(\"mousedown\",$.datepicker._checkExternalClick),$.datepicker.initialized=!0),0===$(\"#\"+$.datepicker._mainDivId).length&&$(\"body\").append($.datepicker.dpDiv);var otherArgs=Array.prototype.slice.call(arguments,1);return\"string\"!=typeof options||\"isDisabled\"!==options&&\"getDate\"!==options&&\"widget\"!==options?\"option\"===options&&2===arguments.length&&\"string\"==typeof arguments[1]?$.datepicker[\"_\"+options+\"Datepicker\"].apply($.datepicker,[this[0]].concat(otherArgs)):this.each(function(){\"string\"==typeof options?$.datepicker[\"_\"+options+\"Datepicker\"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)}):$.datepicker[\"_\"+options+\"Datepicker\"].apply($.datepicker,[this[0]].concat(otherArgs))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version=\"1.12.1\";var mouseHandled=($.datepicker,$.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);$(document).on(\"mouseup\",function(){mouseHandled=!1});$.widget(\"ui.mouse\",{version:\"1.12.1\",options:{cancel:\"input, textarea, button, select, option\",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.on(\"mousedown.\"+this.widgetName,function(event){return that._mouseDown(event)}).on(\"click.\"+this.widgetName,function(event){if(!0===$.data(event.target,that.widgetName+\".preventClickEvent\"))return $.removeData(event.target,that.widgetName+\".preventClickEvent\"),event.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off(\".\"+this.widgetName),this._mouseMoveDelegate&&this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(event){if(!mouseHandled){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(event),this._mouseDownEvent=event;var that=this,btnIsLeft=1===event.which,elIsCancel=!(\"string\"!=typeof this.options.cancel||!event.target.nodeName)&&$(event.target).closest(this.options.cancel).length;return!(btnIsLeft&&!elIsCancel&&this._mouseCapture(event))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=!1!==this._mouseStart(event),!this._mouseStarted)?(event.preventDefault(),!0):(!0===$.data(event.target,this.widgetName+\".preventClickEvent\")&&$.removeData(event.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(event){return that._mouseMove(event)},this._mouseUpDelegate=function(event){return that._mouseUp(event)},this.document.on(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).on(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),event.preventDefault(),mouseHandled=!0,!0))}},_mouseMove:function(event){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button)return this._mouseUp(event);if(!event.which)if(event.originalEvent.altKey||event.originalEvent.ctrlKey||event.originalEvent.metaKey||event.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(event)}return(event.which||event.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(event),event.preventDefault()):(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,event),this._mouseStarted?this._mouseDrag(event):this._mouseUp(event)),!this._mouseStarted)},_mouseUp:function(event){this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,event.target===this._mouseDownEvent.target&&$.data(event.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(event)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,mouseHandled=!1,event.preventDefault()},_mouseDistanceMet:function(event){return Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),$.ui.plugin={add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set)proto.plugins[i]=proto.plugins[i]||[],proto.plugins[i].push([option,set[i]])},call:function(instance,name,args,allowDisconnected){var i,set=instance.plugins[name];if(set&&(allowDisconnected||instance.element[0].parentNode&&11!==instance.element[0].parentNode.nodeType))for(i=0;i<set.length;i++)instance.options[set[i][0]]&&set[i][1].apply(instance.element,args)}},$.ui.safeBlur=function(element){element&&\"body\"!==element.nodeName.toLowerCase()&&$(element).trigger(\"blur\")};$.widget(\"ui.draggable\",$.ui.mouse,{version:\"1.12.1\",\nwidgetEventPrefix:\"drag\",options:{addClasses:!0,appendTo:\"parent\",axis:!1,connectToSortable:!1,containment:!1,cursor:\"auto\",cursorAt:!1,grid:!1,handle:!1,helper:\"original\",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:\"default\",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:\"both\",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){\"original\"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass(\"ui-draggable\"),this._setHandleClassName(),this._mouseInit()},_setOption:function(key,value){this._super(key,value),\"handle\"===key&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(\".ui-draggable-dragging\"))return void(this.destroyOnClear=!0);this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;return!(this.helper||o.disabled||$(event.target).closest(\".ui-resizable-handle\").length>0)&&(this.handle=this._getHandle(event),!!this.handle&&(this._blurActiveElement(event),this._blockFrames(!0===o.iframeFix?\"iframe\":o.iframeFix),!0))},_blockFrames:function(selector){this.iframeBlocks=this.document.find(selector).map(function(){var iframe=$(this);return $(\"<div>\").css(\"position\",\"absolute\").appendTo(iframe.parent()).outerWidth(iframe.outerWidth()).outerHeight(iframe.outerHeight()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(event){var activeElement=$.ui.safeActiveElement(this.document[0]);$(event.target).closest(activeElement).length||$.ui.safeBlur(activeElement)},_mouseStart:function(event){var o=this.options;return this.helper=this._createHelper(event),this._addClass(this.helper,\"ui-draggable-dragging\"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css(\"position\"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return\"fixed\"===$(this).css(\"position\")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(event),this.originalPosition=this.position=this._generatePosition(event,!1),this.originalPageX=event.pageX,this.originalPageY=event.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this._setContainment(),!1===this._trigger(\"start\",event)?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this._mouseDrag(event,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,event),!0)},_refreshOffsets:function(event){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:event.pageX-this.offset.left,top:event.pageY-this.offset.top}},_mouseDrag:function(event,noPropagation){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(event,!0),this.positionAbs=this._convertPositionTo(\"absolute\"),!noPropagation){var ui=this._uiHash();if(!1===this._trigger(\"drag\",event,ui))return this._mouseUp(new $.Event(\"mouseup\",event)),!1;this.position=ui.position}return this.helper[0].style.left=this.position.left+\"px\",this.helper[0].style.top=this.position.top+\"px\",$.ui.ddmanager&&$.ui.ddmanager.drag(this,event),!1},_mouseStop:function(event){var that=this,dropped=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(dropped=$.ui.ddmanager.drop(this,event)),this.dropped&&(dropped=this.dropped,this.dropped=!1),\"invalid\"===this.options.revert&&!dropped||\"valid\"===this.options.revert&&dropped||!0===this.options.revert||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==that._trigger(\"stop\",event)&&that._clear()}):!1!==this._trigger(\"stop\",event)&&this._clear(),!1},_mouseUp:function(event){return this._unblockFrames(),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,event),this.handleElement.is(event.target)&&this.element.trigger(\"focus\"),$.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){return this.helper.is(\".ui-draggable-dragging\")?this._mouseUp(new $.Event(\"mouseup\",{target:this.element[0]})):this._clear(),this},_getHandle:function(event){return!this.options.handle||!!$(event.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,\"ui-draggable-handle\")},_removeHandleClassName:function(){this._removeClass(this.handleElement,\"ui-draggable-handle\")},_createHelper:function(event){var o=this.options,helperIsFunction=$.isFunction(o.helper),helper=helperIsFunction?$(o.helper.apply(this.element[0],[event])):\"clone\"===o.helper?this.element.clone().removeAttr(\"id\"):this.element;return helper.parents(\"body\").length||helper.appendTo(\"parent\"===o.appendTo?this.element[0].parentNode:o.appendTo),helperIsFunction&&helper[0]===this.element[0]&&this._setPositionRelative(),helper[0]===this.element[0]||/(fixed|absolute)/.test(helper.css(\"position\"))||helper.css(\"position\",\"absolute\"),helper},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css(\"position\"))||(this.element[0].style.position=\"relative\")},_adjustOffsetFromHelper:function(obj){\"string\"==typeof obj&&(obj=obj.split(\" \")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),\"left\"in obj&&(this.offset.click.left=obj.left+this.margins.left),\"right\"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),\"top\"in obj&&(this.offset.click.top=obj.top+this.margins.top),\"bottom\"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_isRootNode:function(element){return/(html|body)/i.test(element.tagName)||element===this.document[0]},_getParentOffset:function(){var po=this.offsetParent.offset(),document=this.document[0];return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:po.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"!==this.cssPosition)return{top:0,left:0};var p=this.element.position(),scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:p.top-(parseInt(this.helper.css(\"top\"),10)||0)+(scrollIsRootNode?0:this.scrollParent.scrollTop()),left:p.left-(parseInt(this.helper.css(\"left\"),10)||0)+(scrollIsRootNode?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css(\"marginLeft\"),10)||0,top:parseInt(this.element.css(\"marginTop\"),10)||0,right:parseInt(this.element.css(\"marginRight\"),10)||0,bottom:parseInt(this.element.css(\"marginBottom\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var isUserScrollable,c,ce,o=this.options,document=this.document[0];return this.relativeContainer=null,o.containment?\"window\"===o.containment?void(this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):\"document\"===o.containment?void(this.containment=[0,0,$(document).width()-this.helperProportions.width-this.margins.left,($(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):(\"parent\"===o.containment&&(o.containment=this.helper[0].parentNode),c=$(o.containment),void((ce=c[0])&&(isUserScrollable=/(scroll|auto)/.test(c.css(\"overflow\")),this.containment=[(parseInt(c.css(\"borderLeftWidth\"),10)||0)+(parseInt(c.css(\"paddingLeft\"),10)||0),(parseInt(c.css(\"borderTopWidth\"),10)||0)+(parseInt(c.css(\"paddingTop\"),10)||0),(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(c.css(\"borderRightWidth\"),10)||0)-(parseInt(c.css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(c.css(\"borderBottomWidth\"),10)||0)-(parseInt(c.css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod=\"absolute\"===d?1:-1,scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(\"fixed\"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top)*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-(\"fixed\"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)*mod}},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,scrollIsRootNode=this._isRootNode(this.scrollParent[0]),pageX=event.pageX,pageY=event.pageY;return scrollIsRootNode&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),constrainPosition&&(this.containment&&(this.relativeContainer?(co=this.relativeContainer.offset(),containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]):containment=this.containment,event.pageX-this.offset.click.left<containment[0]&&(pageX=containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<containment[1]&&(pageY=containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>containment[2]&&(pageX=containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>containment[3]&&(pageY=containment[3]+this.offset.click.top)),o.grid&&(top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,pageY=containment?top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3]?top:top-this.offset.click.top>=containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,pageX=containment?left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2]?left:left-this.offset.click.left>=containment[0]?left-o.grid[0]:left+o.grid[0]:left),\"y\"===o.axis&&(pageX=this.originalPageX),\"x\"===o.axis&&(pageY=this.originalPageY)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,\"ui-draggable-dragging\"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(type,event,ui){return ui=ui||this._uiHash(),$.ui.plugin.call(this,type,[event,ui,this],!0),/^(drag|start|stop)/.test(type)&&(this.positionAbs=this._convertPositionTo(\"absolute\"),ui.offset=this.positionAbs),$.Widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add(\"draggable\",\"connectToSortable\",{start:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.sortables=[],$(draggable.options.connectToSortable).each(function(){var sortable=$(this).sortable(\"instance\");sortable&&!sortable.options.disabled&&(draggable.sortables.push(sortable),sortable.refreshPositions(),sortable._trigger(\"activate\",event,uiSortable))})},stop:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.cancelHelperRemoval=!1,$.each(draggable.sortables,function(){var sortable=this;sortable.isOver?(sortable.isOver=0,draggable.cancelHelperRemoval=!0,sortable.cancelHelperRemoval=!1,sortable._storedCSS={position:sortable.placeholder.css(\"position\"),top:sortable.placeholder.css(\"top\"),left:sortable.placeholder.css(\"left\")},sortable._mouseStop(event),sortable.options.helper=sortable.options._helper):(sortable.cancelHelperRemoval=!0,sortable._trigger(\"deactivate\",event,uiSortable))})},drag:function(event,ui,draggable){$.each(draggable.sortables,function(){var innermostIntersecting=!1,sortable=this;sortable.positionAbs=draggable.positionAbs,sortable.helperProportions=draggable.helperProportions,sortable.offset.click=draggable.offset.click,sortable._intersectsWith(sortable.containerCache)&&(innermostIntersecting=!0,$.each(draggable.sortables,function(){return this.positionAbs=draggable.positionAbs,this.helperProportions=draggable.helperProportions,this.offset.click=draggable.offset.click,this!==sortable&&this._intersectsWith(this.containerCache)&&$.contains(sortable.element[0],this.element[0])&&(innermostIntersecting=!1),innermostIntersecting})),innermostIntersecting?(sortable.isOver||(sortable.isOver=1,draggable._parent=ui.helper.parent(),sortable.currentItem=ui.helper.appendTo(sortable.element).data(\"ui-sortable-item\",!0),sortable.options._helper=sortable.options.helper,sortable.options.helper=function(){return ui.helper[0]},event.target=sortable.currentItem[0],sortable._mouseCapture(event,!0),sortable._mouseStart(event,!0,!0),sortable.offset.click.top=draggable.offset.click.top,sortable.offset.click.left=draggable.offset.click.left,sortable.offset.parent.left-=draggable.offset.parent.left-sortable.offset.parent.left,sortable.offset.parent.top-=draggable.offset.parent.top-sortable.offset.parent.top,draggable._trigger(\"toSortable\",event),draggable.dropped=sortable.element,$.each(draggable.sortables,function(){this.refreshPositions()}),draggable.currentItem=draggable.element,sortable.fromOutside=draggable),sortable.currentItem&&(sortable._mouseDrag(event),ui.position=sortable.position)):sortable.isOver&&(sortable.isOver=0,sortable.cancelHelperRemoval=!0,sortable.options._revert=sortable.options.revert,sortable.options.revert=!1,sortable._trigger(\"out\",event,sortable._uiHash(sortable)),sortable._mouseStop(event,!0),sortable.options.revert=sortable.options._revert,sortable.options.helper=sortable.options._helper,sortable.placeholder&&sortable.placeholder.remove(),ui.helper.appendTo(draggable._parent),draggable._refreshOffsets(event),ui.position=draggable._generatePosition(event,!0),draggable._trigger(\"fromSortable\",event),draggable.dropped=!1,$.each(draggable.sortables,function(){this.refreshPositions()}))})}}),$.ui.plugin.add(\"draggable\",\"cursor\",{start:function(event,ui,instance){var t=$(\"body\"),o=instance.options;t.css(\"cursor\")&&(o._cursor=t.css(\"cursor\")),t.css(\"cursor\",o.cursor)},stop:function(event,ui,instance){var o=instance.options;o._cursor&&$(\"body\").css(\"cursor\",o._cursor)}}),$.ui.plugin.add(\"draggable\",\"opacity\",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css(\"opacity\")&&(o._opacity=t.css(\"opacity\")),t.css(\"opacity\",o.opacity)},stop:function(event,ui,instance){var o=instance.options;o._opacity&&$(ui.helper).css(\"opacity\",o._opacity)}}),$.ui.plugin.add(\"draggable\",\"scroll\",{start:function(event,ui,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&\"HTML\"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(event,ui,i){var o=i.options,scrolled=!1,scrollParent=i.scrollParentNotHidden[0],document=i.document[0];scrollParent!==document&&\"HTML\"!==scrollParent.tagName?(o.axis&&\"x\"===o.axis||(i.overflowOffset.top+scrollParent.offsetHeight-event.pageY<o.scrollSensitivity?scrollParent.scrollTop=scrolled=scrollParent.scrollTop+o.scrollSpeed:event.pageY-i.overflowOffset.top<o.scrollSensitivity&&(scrollParent.scrollTop=scrolled=scrollParent.scrollTop-o.scrollSpeed)),o.axis&&\"y\"===o.axis||(i.overflowOffset.left+scrollParent.offsetWidth-event.pageX<o.scrollSensitivity?scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft+o.scrollSpeed:event.pageX-i.overflowOffset.left<o.scrollSensitivity&&(scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft-o.scrollSpeed))):(o.axis&&\"x\"===o.axis||(event.pageY-$(document).scrollTop()<o.scrollSensitivity?scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed):$(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity&&(scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed))),o.axis&&\"y\"===o.axis||(event.pageX-$(document).scrollLeft()<o.scrollSensitivity?scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed):$(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity&&(scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)))),!1!==scrolled&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(i,event)}}),$.ui.plugin.add(\"draggable\",\"snap\",{start:function(event,ui,i){var o=i.options;i.snapElements=[],$(o.snap.constructor!==String?o.snap.items||\":data(ui-draggable)\":o.snap).each(function(){var $t=$(this),$o=$t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})})},drag:function(event,ui,inst){var ts,bs,ls,rs,l,r,t,b,i,first,o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i=inst.snapElements.length-1;i>=0;i--)l=inst.snapElements[i].left-inst.margins.left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top-inst.margins.top,b=t+inst.snapElements[i].height,x2<l-d||x1>r+d||y2<t-d||y1>b+d||!$.contains(inst.snapElements[i].item.ownerDocument,inst.snapElements[i].item)?(inst.snapElements[i].snapping&&inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=!1):(\"inner\"!==o.snapMode&&(ts=Math.abs(t-y2)<=d,bs=Math.abs(b-y1)<=d,ls=Math.abs(l-x2)<=d,rs=Math.abs(r-x1)<=d,ts&&(ui.position.top=inst._convertPositionTo(\"relative\",{top:t-inst.helperProportions.height,left:0}).top),bs&&(ui.position.top=inst._convertPositionTo(\"relative\",{top:b,left:0}).top),ls&&(ui.position.left=inst._convertPositionTo(\"relative\",{top:0,left:l-inst.helperProportions.width}).left),rs&&(ui.position.left=inst._convertPositionTo(\"relative\",{top:0,left:r}).left)),first=ts||bs||ls||rs,\"outer\"!==o.snapMode&&(ts=Math.abs(t-y1)<=d,bs=Math.abs(b-y2)<=d,ls=Math.abs(l-x1)<=d,rs=Math.abs(r-x2)<=d,ts&&(ui.position.top=inst._convertPositionTo(\"relative\",{top:t,left:0}).top),bs&&(ui.position.top=inst._convertPositionTo(\"relative\",{top:b-inst.helperProportions.height,left:0}).top),ls&&(ui.position.left=inst._convertPositionTo(\"relative\",{top:0,left:l}).left),rs&&(ui.position.left=inst._convertPositionTo(\"relative\",{top:0,left:r-inst.helperProportions.width}).left)),!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)&&inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=ts||bs||ls||rs||first)}}),$.ui.plugin.add(\"draggable\",\"stack\",{start:function(event,ui,instance){var min,o=instance.options,group=$.makeArray($(o.stack)).sort(function(a,b){return(parseInt($(a).css(\"zIndex\"),10)||0)-(parseInt($(b).css(\"zIndex\"),10)||0)});group.length&&(min=parseInt($(group[0]).css(\"zIndex\"),10)||0,$(group).each(function(i){$(this).css(\"zIndex\",min+i)}),this.css(\"zIndex\",min+group.length))}}),$.ui.plugin.add(\"draggable\",\"zIndex\",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css(\"zIndex\")&&(o._zIndex=t.css(\"zIndex\")),t.css(\"zIndex\",o.zIndex)},stop:function(event,ui,instance){var o=instance.options;o._zIndex&&$(ui.helper).css(\"zIndex\",o._zIndex)}});$.ui.draggable;$.widget(\"ui.resizable\",$.ui.mouse,{version:\"1.12.1\",widgetEventPrefix:\"resize\",options:{alsoResize:!1,animate:!1,animateDuration:\"slow\",animateEasing:\"swing\",aspectRatio:!1,autoHide:!1,classes:{\"ui-resizable-se\":\"ui-icon ui-icon-gripsmall-diagonal-se\"},containment:!1,ghost:!1,grid:!1,handles:\"e,s,se\",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(value){return parseFloat(value)||0},_isNumber:function(value){return!isNaN(parseFloat(value))},_hasScroll:function(el,a){if(\"hidden\"===$(el).css(\"overflow\"))return!1;var scroll=a&&\"left\"===a?\"scrollLeft\":\"scrollTop\",has=!1;return el[scroll]>0||(el[scroll]=1,has=el[scroll]>0,el[scroll]=0,has)},_create:function(){var margins,o=this.options,that=this;this._addClass(\"ui-resizable\"),$.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||\"ui-resizable-helper\":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap($(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({position:this.element.css(\"position\"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(\"top\"),left:this.element.css(\"left\")})),this.element=this.element.parent().data(\"ui-resizable\",this.element.resizable(\"instance\")),this.elementIsWrapper=!0,margins={marginTop:this.originalElement.css(\"marginTop\"),marginRight:this.originalElement.css(\"marginRight\"),marginBottom:this.originalElement.css(\"marginBottom\"),marginLeft:this.originalElement.css(\"marginLeft\")},this.element.css(margins),this.originalElement.css(\"margin\",0),this.originalResizeStyle=this.originalElement.css(\"resize\"),this.originalElement.css(\"resize\",\"none\"),this._proportionallyResizeElements.push(this.originalElement.css({position:\"static\",zoom:1,display:\"block\"})),this.originalElement.css(margins),this._proportionallyResize()),this._setupHandles(),o.autoHide&&$(this.element).on(\"mouseenter\",function(){o.disabled||(that._removeClass(\"ui-resizable-autohide\"),that._handles.show())}).on(\"mouseleave\",function(){o.disabled||that.resizing||(that._addClass(\"ui-resizable-autohide\"),that._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeData(\"resizable\").removeData(\"ui-resizable\").off(\".resizable\").find(\".ui-resizable-handle\").remove()};return this.elementIsWrapper&&(_destroy(this.element),wrapper=this.element,this.originalElement.css({position:wrapper.css(\"position\"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css(\"top\"),left:wrapper.css(\"left\")}).insertAfter(wrapper),wrapper.remove()),this.originalElement.css(\"resize\",this.originalResizeStyle),_destroy(this.originalElement),this},_setOption:function(key,value){switch(this._super(key,value),key){case\"handles\":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var handle,i,n,hname,axis,o=this.options,that=this;if(this.handles=o.handles||($(\".ui-resizable-handle\",this.element).length?{n:\".ui-resizable-n\",e:\".ui-resizable-e\",s:\".ui-resizable-s\",w:\".ui-resizable-w\",se:\".ui-resizable-se\",sw:\".ui-resizable-sw\",ne:\".ui-resizable-ne\",nw:\".ui-resizable-nw\"}:\"e,s,se\"),this._handles=$(),this.handles.constructor===String)for(\"all\"===this.handles&&(this.handles=\"n,e,s,w,se,sw,ne,nw\"),n=this.handles.split(\",\"),this.handles={},i=0;i<n.length;i++)handle=$.trim(n[i]),hname=\"ui-resizable-\"+handle,axis=$(\"<div>\"),this._addClass(axis,\"ui-resizable-handle \"+hname),axis.css({zIndex:o.zIndex}),this.handles[handle]=\".ui-resizable-\"+handle,this.element.append(axis);this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=$(this.handles[i]),this._on(this.handles[i],{mousedown:that._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(axis=$(this.handles[i],this.element),padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth(),padPos=[\"padding\",/ne|nw|n/.test(i)?\"Top\":/se|sw|s/.test(i)?\"Bottom\":/^e$/.test(i)?\"Right\":\"Left\"].join(\"\"),target.css(padPos,padWrapper),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(\".ui-resizable-handle\")),this._handles.disableSelection(),this._handles.on(\"mouseover\",function(){that.resizing||(this.className&&(axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),that.axis=axis&&axis[1]?axis[1]:\"se\")}),o.autoHide&&(this._handles.hide(),this._addClass(\"ui-resizable-autohide\"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(event){var i,handle,capture=!1;for(i in this.handles)((handle=$(this.handles[i])[0])===event.target||$.contains(handle,event.target))&&(capture=!0);return!this.options.disabled&&capture},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,el=this.element;return this.resizing=!0,this._renderProxy(),curleft=this._num(this.helper.css(\"left\")),curtop=this._num(this.helper.css(\"top\")),o.containment&&(curleft+=$(o.containment).scrollLeft()||0,curtop+=$(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:curleft,top:curtop},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:el.width(),height:el.height()},this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()},this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()},this.originalPosition={left:curleft,top:curtop},this.originalMousePosition={left:event.pageX,top:event.pageY},this.aspectRatio=\"number\"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,cursor=$(\".ui-resizable-\"+this.axis).css(\"cursor\"),$(\"body\").css(\"cursor\",\"auto\"===cursor?this.axis+\"-resize\":cursor),this._addClass(\"ui-resizable-resizing\"),this._propagate(\"start\",event),!0},_mouseDrag:function(event){var data,props,smp=this.originalMousePosition,a=this.axis,dx=event.pageX-smp.left||0,dy=event.pageY-smp.top||0,trigger=this._change[a];return this._updatePrevProperties(),!!trigger&&(data=trigger.apply(this,[event,dx,dy]),this._updateVirtualBoundaries(event.shiftKey),(this._aspectRatio||event.shiftKey)&&(data=this._updateRatio(data,event)),data=this._respectSize(data,event),this._updateCache(data),this._propagate(\"resize\",event),props=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),$.isEmptyObject(props)||(this._updatePrevProperties(),this._trigger(\"resize\",event,this.ui()),this._applyChanges()),!1)},_mouseStop:function(event){this.resizing=!1;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;return this._helper&&(pr=this._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&this._hasScroll(pr[0],\"left\")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,s={width:that.helper.width()-soffsetw,height:that.helper.height()-soffseth},left=parseFloat(that.element.css(\"left\"))+(that.position.left-that.originalPosition.left)||null,top=parseFloat(that.element.css(\"top\"))+(that.position.top-that.originalPosition.top)||null,o.animate||this.element.css($.extend(s,{top:top,left:left})),that.helper.height(that.size.height),that.helper.width(that.size.width),this._helper&&!o.animate&&this._proportionallyResize()),$(\"body\").css(\"cursor\",\"auto\"),this._removeClass(\"ui-resizable-resizing\"),this._propagate(\"stop\",event),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var props={};return this.position.top!==this.prevPosition.top&&(props.top=this.position.top+\"px\"),this.position.left!==this.prevPosition.left&&(props.left=this.position.left+\"px\"),this.size.width!==this.prevSize.width&&(props.width=this.size.width+\"px\"),this.size.height!==this.prevSize.height&&(props.height=this.size.height+\"px\"),this.helper.css(props),props},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||forceAspectRatio)&&(pMinWidth=b.minHeight*this.aspectRatio,pMinHeight=b.minWidth/this.aspectRatio,pMaxWidth=b.maxHeight*this.aspectRatio,pMaxHeight=b.maxWidth/this.aspectRatio,pMinWidth>b.minWidth&&(b.minWidth=pMinWidth),pMinHeight>b.minHeight&&(b.minHeight=pMinHeight),pMaxWidth<b.maxWidth&&(b.maxWidth=pMaxWidth),pMaxHeight<b.maxHeight&&(b.maxHeight=pMaxHeight)),this._vBoundaries=b},_updateCache:function(data){this.offset=this.helper.offset(),this._isNumber(data.left)&&(this.position.left=data.left),this._isNumber(data.top)&&(this.position.top=data.top),this._isNumber(data.height)&&(this.size.height=data.height),this._isNumber(data.width)&&(this.size.width=data.width)},_updateRatio:function(data){var cpos=this.position,csize=this.size,a=this.axis;return this._isNumber(data.height)?data.width=data.height*this.aspectRatio:this._isNumber(data.width)&&(data.height=data.width/this.aspectRatio),\"sw\"===a&&(data.left=cpos.left+(csize.width-data.width),data.top=null),\"nw\"===a&&(data.top=cpos.top+(csize.height-data.height),data.left=cpos.left+(csize.width-data.width)),data},_respectSize:function(data){var o=this._vBoundaries,a=this.axis,ismaxw=this._isNumber(data.width)&&o.maxWidth&&o.maxWidth<data.width,ismaxh=this._isNumber(data.height)&&o.maxHeight&&o.maxHeight<data.height,isminw=this._isNumber(data.width)&&o.minWidth&&o.minWidth>data.width,isminh=this._isNumber(data.height)&&o.minHeight&&o.minHeight>data.height,dw=this.originalPosition.left+this.originalSize.width,dh=this.originalPosition.top+this.originalSize.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);return isminw&&(data.width=o.minWidth),isminh&&(data.height=o.minHeight),ismaxw&&(data.width=o.maxWidth),ismaxh&&(data.height=o.maxHeight),isminw&&cw&&(data.left=dw-o.minWidth),ismaxw&&cw&&(data.left=dw-o.maxWidth),isminh&&ch&&(data.top=dh-o.minHeight),ismaxh&&ch&&(data.top=dh-o.maxHeight),data.width||data.height||data.left||!data.top?data.width||data.height||data.top||!data.left||(data.left=null):data.top=null,data},_getPaddingPlusBorderDimensions:function(element){\nfor(var i=0,widths=[],borders=[element.css(\"borderTopWidth\"),element.css(\"borderRightWidth\"),element.css(\"borderBottomWidth\"),element.css(\"borderLeftWidth\")],paddings=[element.css(\"paddingTop\"),element.css(\"paddingRight\"),element.css(\"paddingBottom\"),element.css(\"paddingLeft\")];i<4;i++)widths[i]=parseFloat(borders[i])||0,widths[i]+=parseFloat(paddings[i])||0;return{height:widths[0]+widths[2],width:widths[1]+widths[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var prel,i=0,element=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)prel=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(prel)),prel.css({height:element.height()-this.outerDimensions.height||0,width:element.width()-this.outerDimensions.width||0})},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset(),this._helper?(this.helper=this.helper||$(\"<div style='overflow:hidden;'></div>\"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:\"absolute\",left:this.elementOffset.left+\"px\",top:this.elementOffset.top+\"px\",zIndex:++o.zIndex}),this.helper.appendTo(\"body\").disableSelection()):this.helper=this.element},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize;return{left:this.originalPosition.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize;return{top:this.originalPosition.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]),\"resize\"!==n&&this._trigger(n,event,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),$.ui.plugin.add(\"resizable\",\"animate\",{stop:function(event){var that=$(this).resizable(\"instance\"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],\"left\")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:that.size.width-soffsetw,height:that.size.height-soffseth},left=parseFloat(that.element.css(\"left\"))+(that.position.left-that.originalPosition.left)||null,top=parseFloat(that.element.css(\"top\"))+(that.position.top-that.originalPosition.top)||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseFloat(that.element.css(\"width\")),height:parseFloat(that.element.css(\"height\")),top:parseFloat(that.element.css(\"top\")),left:parseFloat(that.element.css(\"left\"))};pr&&pr.length&&$(pr[0]).css({width:data.width,height:data.height}),that._updateCache(data),that._propagate(\"resize\",event)}})}}),$.ui.plugin.add(\"resizable\",\"containment\",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).resizable(\"instance\"),o=that.options,el=that.element,oc=o.containment,ce=oc instanceof $?oc.get(0):/parent/.test(oc)?el.parent().get(0):oc;ce&&(that.containerElement=$(ce),/document/.test(oc)||oc===document?(that.containerOffset={left:0,top:0},that.containerPosition={left:0,top:0},that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}):(element=$(ce),p=[],$([\"Top\",\"Right\",\"Left\",\"Bottom\"]).each(function(i,name){p[i]=that._num(element.css(\"padding\"+name))}),that.containerOffset=element.offset(),that.containerPosition=element.position(),that.containerSize={height:element.innerHeight()-p[3],width:element.innerWidth()-p[1]},co=that.containerOffset,ch=that.containerSize.height,cw=that.containerSize.width,width=that._hasScroll(ce,\"left\")?ce.scrollWidth:cw,height=that._hasScroll(ce)?ce.scrollHeight:ch,that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}))},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).resizable(\"instance\"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=!0;ce[0]!==document&&/static/.test(ce.css(\"position\"))&&(cop=co),cp.left<(that._helper?co.left:0)&&(that.size.width=that.size.width+(that._helper?that.position.left-co.left:that.position.left-cop.left),pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1),that.position.left=o.helper?co.left:0),cp.top<(that._helper?co.top:0)&&(that.size.height=that.size.height+(that._helper?that.position.top-co.top:that.position.top),pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1),that.position.top=that._helper?co.top:0),isParent=that.containerElement.get(0)===that.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(that.containerElement.css(\"position\")),isParent&&isOffsetRelative?(that.offset.left=that.parentData.left+that.position.left,that.offset.top=that.parentData.top+that.position.top):(that.offset.left=that.element.offset().left,that.offset.top=that.element.offset().top),woset=Math.abs(that.sizeDiff.width+(that._helper?that.offset.left-cop.left:that.offset.left-co.left)),hoset=Math.abs(that.sizeDiff.height+(that._helper?that.offset.top-cop.top:that.offset.top-co.top)),woset+that.size.width>=that.parentData.width&&(that.size.width=that.parentData.width-woset,pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1)),hoset+that.size.height>=that.parentData.height&&(that.size.height=that.parentData.height-hoset,pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1)),continueResize||(that.position.left=that.prevPosition.left,that.position.top=that.prevPosition.top,that.size.width=that.prevSize.width,that.size.height=that.prevSize.height)},stop:function(){var that=$(this).resizable(\"instance\"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;that._helper&&!o.animate&&/relative/.test(ce.css(\"position\"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h}),that._helper&&!o.animate&&/static/.test(ce.css(\"position\"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}),$.ui.plugin.add(\"resizable\",\"alsoResize\",{start:function(){var that=$(this).resizable(\"instance\"),o=that.options;$(o.alsoResize).each(function(){var el=$(this);el.data(\"ui-resizable-alsoresize\",{width:parseFloat(el.width()),height:parseFloat(el.height()),left:parseFloat(el.css(\"left\")),top:parseFloat(el.css(\"top\"))})})},resize:function(event,ui){var that=$(this).resizable(\"instance\"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:that.size.height-os.height||0,width:that.size.width-os.width||0,top:that.position.top-op.top||0,left:that.position.left-op.left||0};$(o.alsoResize).each(function(){var el=$(this),start=$(this).data(\"ui-resizable-alsoresize\"),style={},css=el.parents(ui.originalElement[0]).length?[\"width\",\"height\"]:[\"width\",\"height\",\"top\",\"left\"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);sum&&sum>=0&&(style[prop]=sum||null)}),el.css(style)})},stop:function(){$(this).removeData(\"ui-resizable-alsoresize\")}}),$.ui.plugin.add(\"resizable\",\"ghost\",{start:function(){var that=$(this).resizable(\"instance\"),cs=that.size;that.ghost=that.originalElement.clone(),that.ghost.css({opacity:.25,display:\"block\",position:\"relative\",height:cs.height,width:cs.width,margin:0,left:0,top:0}),that._addClass(that.ghost,\"ui-resizable-ghost\"),!1!==$.uiBackCompat&&\"string\"==typeof that.options.ghost&&that.ghost.addClass(this.options.ghost),that.ghost.appendTo(that.helper)},resize:function(){var that=$(this).resizable(\"instance\");that.ghost&&that.ghost.css({position:\"relative\",height:that.size.height,width:that.size.width})},stop:function(){var that=$(this).resizable(\"instance\");that.ghost&&that.helper&&that.helper.get(0).removeChild(that.ghost.get(0))}}),$.ui.plugin.add(\"resizable\",\"grid\",{resize:function(){var outerDimensions,that=$(this).resizable(\"instance\"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=\"number\"==typeof o.grid?[o.grid,o.grid]:o.grid,gridX=grid[0]||1,gridY=grid[1]||1,ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&o.maxWidth<newWidth,isMaxHeight=o.maxHeight&&o.maxHeight<newHeight,isMinWidth=o.minWidth&&o.minWidth>newWidth,isMinHeight=o.minHeight&&o.minHeight>newHeight;o.grid=grid,isMinWidth&&(newWidth+=gridX),isMinHeight&&(newHeight+=gridY),isMaxWidth&&(newWidth-=gridX),isMaxHeight&&(newHeight-=gridY),/^(se|s|e)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight):/^(ne)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.top=op.top-oy):/^(sw)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.left=op.left-ox):((newHeight-gridY<=0||newWidth-gridX<=0)&&(outerDimensions=that._getPaddingPlusBorderDimensions(this)),newHeight-gridY>0?(that.size.height=newHeight,that.position.top=op.top-oy):(newHeight=gridY-outerDimensions.height,that.size.height=newHeight,that.position.top=op.top+os.height-newHeight),newWidth-gridX>0?(that.size.width=newWidth,that.position.left=op.left-ox):(newWidth=gridX-outerDimensions.width,that.size.width=newWidth,that.position.left=op.left+os.width-newWidth))}});$.ui.resizable;$.widget(\"ui.dialog\",{version:\"1.12.1\",options:{appendTo:\"body\",autoOpen:!0,buttons:[],classes:{\"ui-dialog\":\"ui-corner-all\",\"ui-dialog-titlebar\":\"ui-corner-all\"},closeOnEscape:!0,closeText:\"Close\",draggable:!0,hide:null,height:\"auto\",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:\"center\",at:\"center\",of:window,collision:\"fit\",using:function(pos){var topOffset=$(this).css(pos).offset().top;topOffset<0&&$(this).css(\"top\",pos.top-topOffset)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr(\"title\"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr(\"title\").appendTo(this.uiDialog),this._addClass(\"ui-dialog-content\",\"ui-widget-content\"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&$.fn.draggable&&this._makeDraggable(),this.options.resizable&&$.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var element=this.options.appendTo;return element&&(element.jquery||element.nodeType)?$(element):this.document.find(element||\"body\").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr(\"title\",this.originalTitle),next=originalPosition.parent.children().eq(originalPosition.index),next.length&&next[0]!==this.element[0]?next.before(this.element):originalPosition.parent.append(this.element)},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(event){var that=this;this._isOpen&&!1!==this._trigger(\"beforeClose\",event)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(\":focusable\").trigger(\"focus\").length||$.ui.safeBlur($.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){that._trigger(\"close\",event)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=!1,zIndices=this.uiDialog.siblings(\".ui-front:visible\").map(function(){return+$(this).css(\"z-index\")}).get(),zIndexMax=Math.max.apply(null,zIndices);return zIndexMax>=+this.uiDialog.css(\"z-index\")&&(this.uiDialog.css(\"z-index\",zIndexMax+1),moved=!0),moved&&!silent&&this._trigger(\"focus\",event),moved},open:function(){var that=this;if(this._isOpen)return void(this._moveToTop()&&this._focusTabbable());this._isOpen=!0,this.opener=$($.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css(\"z-index\",this.uiDialog.css(\"z-index\")-1),this._show(this.uiDialog,this.options.show,function(){that._focusTabbable(),that._trigger(\"focus\")}),this._makeFocusTarget(),this._trigger(\"open\")},_focusTabbable:function(){var hasFocus=this._focusedElement;hasFocus||(hasFocus=this.element.find(\"[autofocus]\")),hasFocus.length||(hasFocus=this.element.find(\":tabbable\")),hasFocus.length||(hasFocus=this.uiDialogButtonPane.find(\":tabbable\")),hasFocus.length||(hasFocus=this.uiDialogTitlebarClose.filter(\":tabbable\")),hasFocus.length||(hasFocus=this.uiDialog),hasFocus.eq(0).trigger(\"focus\")},_keepFocus:function(event){function checkFocus(){var activeElement=$.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement)||this._focusTabbable()}event.preventDefault(),checkFocus.call(this),this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$(\"<div>\").hide().attr({tabIndex:-1,role:\"dialog\"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,\"ui-dialog\",\"ui-widget ui-widget-content ui-front\"),this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE)return event.preventDefault(),void this.close(event);if(event.keyCode===$.ui.keyCode.TAB&&!event.isDefaultPrevented()){var tabbables=this.uiDialog.find(\":tabbable\"),first=tabbables.filter(\":first\"),last=tabbables.filter(\":last\");event.target!==last[0]&&event.target!==this.uiDialog[0]||event.shiftKey?event.target!==first[0]&&event.target!==this.uiDialog[0]||!event.shiftKey||(this._delay(function(){last.trigger(\"focus\")}),event.preventDefault()):(this._delay(function(){first.trigger(\"focus\")}),event.preventDefault())}},mousedown:function(event){this._moveToTop(event)&&this._focusTabbable()}}),this.element.find(\"[aria-describedby]\").length||this.uiDialog.attr({\"aria-describedby\":this.element.uniqueId().attr(\"id\")})},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$(\"<div>\"),this._addClass(this.uiDialogTitlebar,\"ui-dialog-titlebar\",\"ui-widget-header ui-helper-clearfix\"),this._on(this.uiDialogTitlebar,{mousedown:function(event){$(event.target).closest(\".ui-dialog-titlebar-close\")||this.uiDialog.trigger(\"focus\")}}),this.uiDialogTitlebarClose=$(\"<button type='button'></button>\").button({label:$(\"<a>\").text(this.options.closeText).html(),icon:\"ui-icon-closethick\",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,\"ui-dialog-titlebar-close\"),this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault(),this.close(event)}}),uiDialogTitle=$(\"<span>\").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(uiDialogTitle,\"ui-dialog-title\"),this._title(uiDialogTitle),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({\"aria-labelledby\":uiDialogTitle.attr(\"id\")})},_title:function(title){this.options.title?title.text(this.options.title):title.html(\"&#160;\")},_createButtonPane:function(){this.uiDialogButtonPane=$(\"<div>\"),this._addClass(this.uiDialogButtonPane,\"ui-dialog-buttonpane\",\"ui-widget-content ui-helper-clearfix\"),this.uiButtonSet=$(\"<div>\").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,\"ui-dialog-buttonset\"),this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),$.isEmptyObject(buttons)||$.isArray(buttons)&&!buttons.length)return void this._removeClass(this.uiDialog,\"ui-dialog-buttons\");$.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props,props=$.extend({type:\"button\"},props),click=props.click,buttonOptions={icon:props.icon,iconPosition:props.iconPosition,showLabel:props.showLabel,icons:props.icons,text:props.text},delete props.click,delete props.icon,delete props.iconPosition,delete props.showLabel,delete props.icons,\"boolean\"==typeof props.text&&delete props.text,$(\"<button></button>\",props).button(buttonOptions).appendTo(that.uiButtonSet).on(\"click\",function(){click.apply(that.element[0],arguments)})}),this._addClass(this.uiDialog,\"ui-dialog-buttons\"),this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function filteredUi(ui){return{position:ui.position,offset:ui.offset}}var that=this,options=this.options;this.uiDialog.draggable({cancel:\".ui-dialog-content, .ui-dialog-titlebar-close\",handle:\".ui-dialog-titlebar\",containment:\"document\",start:function(event,ui){that._addClass($(this),\"ui-dialog-dragging\"),that._blockFrames(),that._trigger(\"dragStart\",event,filteredUi(ui))},drag:function(event,ui){that._trigger(\"drag\",event,filteredUi(ui))},stop:function(event,ui){var left=ui.offset.left-that.document.scrollLeft(),top=ui.offset.top-that.document.scrollTop();options.position={my:\"left top\",at:\"left\"+(left>=0?\"+\":\"\")+left+\" top\"+(top>=0?\"+\":\"\")+top,of:that.window},that._removeClass($(this),\"ui-dialog-dragging\"),that._unblockFrames(),that._trigger(\"dragStop\",event,filteredUi(ui))}})},_makeResizable:function(){function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css(\"position\"),resizeHandles=\"string\"==typeof handles?handles:\"n,e,s,w,se,sw,ne,nw\";this.uiDialog.resizable({cancel:\".ui-dialog-content\",containment:\"document\",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){that._addClass($(this),\"ui-dialog-resizing\"),that._blockFrames(),that._trigger(\"resizeStart\",event,filteredUi(ui))},resize:function(event,ui){that._trigger(\"resize\",event,filteredUi(ui))},stop:function(event,ui){var offset=that.uiDialog.offset(),left=offset.left-that.document.scrollLeft(),top=offset.top-that.document.scrollTop();options.height=that.uiDialog.height(),options.width=that.uiDialog.width(),options.position={my:\"left top\",at:\"left\"+(left>=0?\"+\":\"\")+left+\" top\"+(top>=0?\"+\":\"\")+top,of:that.window},that._removeClass($(this),\"ui-dialog-resizing\"),that._unblockFrames(),that._trigger(\"resizeStop\",event,filteredUi(ui))}}).css(\"position\",position)},_trackFocus:function(){this._on(this.widget(),{focusin:function(event){this._makeFocusTarget(),this._focusedElement=$(event.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var instances=this._trackingInstances(),exists=$.inArray(this,instances);-1!==exists&&instances.splice(exists,1)},_trackingInstances:function(){var instances=this.document.data(\"ui-dialog-instances\");return instances||(instances=[],this.document.data(\"ui-dialog-instances\",instances)),instances},_minHeight:function(){var options=this.options;return\"auto\"===options.height?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(\":visible\");isVisible||this.uiDialog.show(),this.uiDialog.position(this.options.position),isVisible||this.uiDialog.hide()},_setOptions:function(options){var that=this,resize=!1,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value),key in that.sizeRelatedOptions&&(resize=!0),key in that.resizableRelatedOptions&&(resizableOptions[key]=value)}),resize&&(this._size(),this._position()),this.uiDialog.is(\":data(ui-resizable)\")&&this.uiDialog.resizable(\"option\",resizableOptions)},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;\"disabled\"!==key&&(this._super(key,value),\"appendTo\"===key&&this.uiDialog.appendTo(this._appendTo()),\"buttons\"===key&&this._createButtons(),\"closeText\"===key&&this.uiDialogTitlebarClose.button({label:$(\"<a>\").text(\"\"+this.options.closeText).html()}),\"draggable\"===key&&(isDraggable=uiDialog.is(\":data(ui-draggable)\"),isDraggable&&!value&&uiDialog.draggable(\"destroy\"),!isDraggable&&value&&this._makeDraggable()),\"position\"===key&&this._position(),\"resizable\"===key&&(isResizable=uiDialog.is(\":data(ui-resizable)\"),isResizable&&!value&&uiDialog.resizable(\"destroy\"),isResizable&&\"string\"==typeof value&&uiDialog.resizable(\"option\",\"handles\",value),isResizable||!1===value||this._makeResizable()),\"title\"===key&&this._title(this.uiDialogTitlebar.find(\".ui-dialog-title\")))},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:\"auto\",minHeight:0,maxHeight:\"none\",height:0}),options.minWidth>options.width&&(options.width=options.minWidth),nonContentHeight=this.uiDialog.css({height:\"auto\",width:options.width}).outerHeight(),minContentHeight=Math.max(0,options.minHeight-nonContentHeight),maxContentHeight=\"number\"==typeof options.maxHeight?Math.max(0,options.maxHeight-nonContentHeight):\"none\",\"auto\"===options.height?this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:\"auto\"}):this.element.height(Math.max(0,options.height-nonContentHeight)),this.uiDialog.is(\":data(ui-resizable)\")&&this.uiDialog.resizable(\"option\",\"minHeight\",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find(\"iframe\").map(function(){var iframe=$(this);return $(\"<div>\").css({position:\"absolute\",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(event){return!!$(event.target).closest(\".ui-dialog\").length||!!$(event.target).closest(\".ui-datepicker\").length},_createOverlay:function(){if(this.options.modal){var isOpening=!0;this._delay(function(){isOpening=!1}),this.document.data(\"ui-dialog-overlays\")||this._on(this.document,{focusin:function(event){isOpening||this._allowInteraction(event)||(event.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=$(\"<div>\").appendTo(this._appendTo()),this._addClass(this.overlay,null,\"ui-widget-overlay ui-front\"),this._on(this.overlay,{mousedown:\"_keepFocus\"}),this.document.data(\"ui-dialog-overlays\",(this.document.data(\"ui-dialog-overlays\")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var overlays=this.document.data(\"ui-dialog-overlays\")-1;overlays?this.document.data(\"ui-dialog-overlays\",overlays):(this._off(this.document,\"focusin\"),this.document.removeData(\"ui-dialog-overlays\")),this.overlay.remove(),this.overlay=null}}}),!1!==$.uiBackCompat&&$.widget(\"ui.dialog\",$.ui.dialog,{options:{dialogClass:\"\"},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(key,value){\"dialogClass\"===key&&this.uiDialog.removeClass(this.options.dialogClass).addClass(value),this._superApply(arguments)}});$.ui.dialog;$.widget(\"ui.droppable\",{version:\"1.12.1\",widgetEventPrefix:\"drop\",options:{accept:\"*\",addClasses:!0,greedy:!1,scope:\"default\",tolerance:\"intersect\",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=!1,this.isout=!0,this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)},this.proportions=function(){if(!arguments.length)return proportions||(proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});proportions=arguments[0]},this._addToManager(o.scope),o.addClasses&&this._addClass(\"ui-droppable\")},_addToManager:function(scope){$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[],$.ui.ddmanager.droppables[scope].push(this)},_splice:function(drop){for(var i=0;i<drop.length;i++)drop[i]===this&&drop.splice(i,1)},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop)},_setOption:function(key,value){if(\"accept\"===key)this.accept=$.isFunction(value)?value:function(d){return d.is(value)};else if(\"scope\"===key){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this._addToManager(value)}this._super(key,value)},_activate:function(event){var draggable=$.ui.ddmanager.current;this._addActiveClass(),draggable&&this._trigger(\"activate\",event,this.ui(draggable))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;this._removeActiveClass(),draggable&&this._trigger(\"deactivate\",event,this.ui(draggable))},_over:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._addHoverClass(),this._trigger(\"over\",event,this.ui(draggable)))},_out:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._removeHoverClass(),this._trigger(\"out\",event,this.ui(draggable)))},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current,childrenIntersection=!1;return!(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0])&&(this.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function(){var inst=$(this).droppable(\"instance\");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],draggable.currentItem||draggable.element)&&intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance,event))return childrenIntersection=!0,!1}),!childrenIntersection&&(!!this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger(\"drop\",event,this.ui(draggable)),this.element)))},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}},_addHoverClass:function(){this._addClass(\"ui-droppable-hover\")},_removeHoverClass:function(){this._removeClass(\"ui-droppable-hover\")},_addActiveClass:function(){this._addClass(\"ui-droppable-active\")},_removeActiveClass:function(){this._removeClass(\"ui-droppable-active\")}});var intersect=$.ui.intersect=function(){function isOverAxis(x,reference,size){return x>=reference&&x<reference+size}return function(draggable,droppable,toleranceMode,event){if(!droppable.offset)return!1;var x1=(draggable.positionAbs||draggable.position.absolute).left+draggable.margins.left,y1=(draggable.positionAbs||draggable.position.absolute).top+draggable.margins.top,x2=x1+draggable.helperProportions.width,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,t=droppable.offset.top,r=l+droppable.proportions().width,b=t+droppable.proportions().height;switch(toleranceMode){case\"fit\":return l<=x1&&x2<=r&&t<=y1&&y2<=b;case\"intersect\":return l<x1+draggable.helperProportions.width/2&&x2-draggable.helperProportions.width/2<r&&t<y1+draggable.helperProportions.height/2&&y2-draggable.helperProportions.height/2<b;case\"pointer\":return isOverAxis(event.pageY,t,droppable.proportions().height)&&isOverAxis(event.pageX,l,droppable.proportions().width);case\"touch\":return(y1>=t&&y1<=b||y2>=t&&y2<=b||y1<t&&y2>b)&&(x1>=l&&x1<=r||x2>=l&&x2<=r||x1<l&&x2>r);default:return!1}}}();$.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(\":data(ui-droppable)\").addBack();droppablesLoop:for(i=0;i<m.length;i++)if(!(m[i].options.disabled||t&&!m[i].accept.call(m[i].element[0],t.currentItem||t.element))){for(j=0;j<list.length;j++)if(list[j]===m[i].element[0]){m[i].proportions().height=0;continue droppablesLoop}m[i].visible=\"none\"!==m[i].element.css(\"display\"),m[i].visible&&(\"mousedown\"===type&&m[i]._activate.call(m[i],event),m[i].offset=m[i].element.offset(),m[i].proportions({width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight}))}},drop:function(draggable,event){var dropped=!1;return $.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&intersect(draggable,this,this.options.tolerance,event)&&(dropped=this._drop.call(this,event)||dropped),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,event)))}),dropped},dragStart:function(draggable,event){draggable.element.parentsUntil(\"body\").on(\"scroll.droppable\",function(){draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)})},drag:function(draggable,event){draggable.options.refreshPositions&&$.ui.ddmanager.prepareOffsets(draggable,event),$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var parentInstance,scope,parent,intersects=intersect(draggable,this,this.options.tolerance,event),c=!intersects&&this.isover?\"isout\":intersects&&!this.isover?\"isover\":null;c&&(this.options.greedy&&(scope=this.options.scope,parent=this.element.parents(\":data(ui-droppable)\").filter(function(){return $(this).droppable(\"instance\").options.scope===scope}),parent.length&&(parentInstance=$(parent[0]).droppable(\"instance\"),parentInstance.greedyChild=\"isover\"===c)),parentInstance&&\"isover\"===c&&(parentInstance.isover=!1,parentInstance.isout=!0,parentInstance._out.call(parentInstance,event)),this[c]=!0,this[\"isout\"===c?\"isover\":\"isout\"]=!1,this[\"isover\"===c?\"_over\":\"_out\"].call(this,event),parentInstance&&\"isout\"===c&&(parentInstance.isout=!1,parentInstance.isover=!0,parentInstance._over.call(parentInstance,event)))}})},dragStop:function(draggable,event){draggable.element.parentsUntil(\"body\").off(\"scroll.droppable\"),draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)}},!1!==$.uiBackCompat&&$.widget(\"ui.droppable\",$.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),\nthis.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});$.ui.droppable,$.widget(\"ui.progressbar\",{version:\"1.12.1\",options:{classes:{\"ui-progressbar\":\"ui-corner-all\",\"ui-progressbar-value\":\"ui-corner-left\",\"ui-progressbar-complete\":\"ui-corner-right\"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:\"progressbar\",\"aria-valuemin\":this.min}),this._addClass(\"ui-progressbar\",\"ui-widget ui-widget-content\"),this.valueDiv=$(\"<div>\").appendTo(this.element),this._addClass(this.valueDiv,\"ui-progressbar-value\",\"ui-widget-header\"),this._refreshValue()},_destroy:function(){this.element.removeAttr(\"role aria-valuemin aria-valuemax aria-valuenow\"),this.valueDiv.remove()},value:function(newValue){if(void 0===newValue)return this.options.value;this.options.value=this._constrainedValue(newValue),this._refreshValue()},_constrainedValue:function(newValue){return void 0===newValue&&(newValue=this.options.value),this.indeterminate=!1===newValue,\"number\"!=typeof newValue&&(newValue=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,newValue))},_setOptions:function(options){var value=options.value;delete options.value,this._super(options),this.options.value=this._constrainedValue(value),this._refreshValue()},_setOption:function(key,value){\"max\"===key&&(value=Math.max(this.min,value)),this._super(key,value)},_setOptionDisabled:function(value){this._super(value),this.element.attr(\"aria-disabled\",value),this._toggleClass(null,\"ui-state-disabled\",!!value)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).width(percentage.toFixed(0)+\"%\"),this._toggleClass(this.valueDiv,\"ui-progressbar-complete\",null,value===this.options.max)._toggleClass(\"ui-progressbar-indeterminate\",null,this.indeterminate),this.indeterminate?(this.element.removeAttr(\"aria-valuenow\"),this.overlayDiv||(this.overlayDiv=$(\"<div>\").appendTo(this.valueDiv),this._addClass(this.overlayDiv,\"ui-progressbar-overlay\"))):(this.element.attr({\"aria-valuemax\":this.options.max,\"aria-valuenow\":value}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==value&&(this.oldValue=value,this._trigger(\"change\")),value===this.options.max&&this._trigger(\"complete\")}}),$.widget(\"ui.selectable\",$.ui.mouse,{version:\"1.12.1\",options:{appendTo:\"body\",autoRefresh:!0,distance:0,filter:\"*\",tolerance:\"touch\",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var that=this;this._addClass(\"ui-selectable\"),this.dragged=!1,this.refresh=function(){that.elementPos=$(that.element[0]).offset(),that.selectees=$(that.options.filter,that.element[0]),that._addClass(that.selectees,\"ui-selectee\"),that.selectees.each(function(){var $this=$(this),selecteeOffset=$this.offset(),pos={left:selecteeOffset.left-that.elementPos.left,top:selecteeOffset.top-that.elementPos.top};$.data(this,\"selectable-item\",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:!1,selected:$this.hasClass(\"ui-selected\"),selecting:$this.hasClass(\"ui-selecting\"),unselecting:$this.hasClass(\"ui-unselecting\")})})},this.refresh(),this._mouseInit(),this.helper=$(\"<div>\"),this._addClass(this.helper,\"ui-selectable-helper\")},_destroy:function(){this.selectees.removeData(\"selectable-item\"),this._mouseDestroy()},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY],this.elementPos=$(this.element[0]).offset(),this.options.disabled||(this.selectees=$(options.filter,this.element[0]),this._trigger(\"start\",event),$(options.appendTo).append(this.helper),this.helper.css({left:event.pageX,top:event.pageY,width:0,height:0}),options.autoRefresh&&this.refresh(),this.selectees.filter(\".ui-selected\").each(function(){var selectee=$.data(this,\"selectable-item\");selectee.startselected=!0,event.metaKey||event.ctrlKey||(that._removeClass(selectee.$element,\"ui-selected\"),selectee.selected=!1,that._addClass(selectee.$element,\"ui-unselecting\"),selectee.unselecting=!0,that._trigger(\"unselecting\",event,{unselecting:selectee.element}))}),$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,\"selectable-item\");if(selectee)return doSelect=!event.metaKey&&!event.ctrlKey||!selectee.$element.hasClass(\"ui-selected\"),that._removeClass(selectee.$element,doSelect?\"ui-unselecting\":\"ui-selected\")._addClass(selectee.$element,doSelect?\"ui-selecting\":\"ui-unselecting\"),selectee.unselecting=!doSelect,selectee.selecting=doSelect,selectee.selected=doSelect,doSelect?that._trigger(\"selecting\",event,{selecting:selectee.element}):that._trigger(\"unselecting\",event,{unselecting:selectee.element}),!1}))},_mouseDrag:function(event){if(this.dragged=!0,!this.options.disabled){var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;return x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this.selectees.each(function(){var selectee=$.data(this,\"selectable-item\"),hit=!1,offset={};selectee&&selectee.element!==that.element[0]&&(offset.left=selectee.left+that.elementPos.left,offset.right=selectee.right+that.elementPos.left,offset.top=selectee.top+that.elementPos.top,offset.bottom=selectee.bottom+that.elementPos.top,\"touch\"===options.tolerance?hit=!(offset.left>x2||offset.right<x1||offset.top>y2||offset.bottom<y1):\"fit\"===options.tolerance&&(hit=offset.left>x1&&offset.right<x2&&offset.top>y1&&offset.bottom<y2),hit?(selectee.selected&&(that._removeClass(selectee.$element,\"ui-selected\"),selectee.selected=!1),selectee.unselecting&&(that._removeClass(selectee.$element,\"ui-unselecting\"),selectee.unselecting=!1),selectee.selecting||(that._addClass(selectee.$element,\"ui-selecting\"),selectee.selecting=!0,that._trigger(\"selecting\",event,{selecting:selectee.element}))):(selectee.selecting&&((event.metaKey||event.ctrlKey)&&selectee.startselected?(that._removeClass(selectee.$element,\"ui-selecting\"),selectee.selecting=!1,that._addClass(selectee.$element,\"ui-selected\"),selectee.selected=!0):(that._removeClass(selectee.$element,\"ui-selecting\"),selectee.selecting=!1,selectee.startselected&&(that._addClass(selectee.$element,\"ui-unselecting\"),selectee.unselecting=!0),that._trigger(\"unselecting\",event,{unselecting:selectee.element}))),selectee.selected&&(event.metaKey||event.ctrlKey||selectee.startselected||(that._removeClass(selectee.$element,\"ui-selected\"),selectee.selected=!1,that._addClass(selectee.$element,\"ui-unselecting\"),selectee.unselecting=!0,that._trigger(\"unselecting\",event,{unselecting:selectee.element})))))}),!1}},_mouseStop:function(event){var that=this;return this.dragged=!1,$(\".ui-unselecting\",this.element[0]).each(function(){var selectee=$.data(this,\"selectable-item\");that._removeClass(selectee.$element,\"ui-unselecting\"),selectee.unselecting=!1,selectee.startselected=!1,that._trigger(\"unselected\",event,{unselected:selectee.element})}),$(\".ui-selecting\",this.element[0]).each(function(){var selectee=$.data(this,\"selectable-item\");that._removeClass(selectee.$element,\"ui-selecting\")._addClass(selectee.$element,\"ui-selected\"),selectee.selecting=!1,selectee.selected=!0,selectee.startselected=!0,that._trigger(\"selected\",event,{selected:selectee.element})}),this._trigger(\"stop\",event),this.helper.remove(),!1}}),$.widget(\"ui.selectmenu\",[$.ui.formResetMixin,{version:\"1.12.1\",defaultElement:\"<select>\",options:{appendTo:null,classes:{\"ui-selectmenu-button-open\":\"ui-corner-top\",\"ui-selectmenu-button-closed\":\"ui-corner-all\"},disabled:null,icons:{button:\"ui-icon-triangle-1-s\"},position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var selectmenuId=this.element.uniqueId().attr(\"id\");this.ids={element:selectmenuId,button:selectmenuId+\"-button\",menu:selectmenuId+\"-menu\"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=$()},_drawButton:function(){var icon,that=this,item=this._parseOption(this.element.find(\"option:selected\"),this.element[0].selectedIndex);this.labels=this.element.labels().attr(\"for\",this.ids.button),this._on(this.labels,{click:function(event){this.button.focus(),event.preventDefault()}}),this.element.hide(),this.button=$(\"<span>\",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:\"combobox\",\"aria-expanded\":\"false\",\"aria-autocomplete\":\"list\",\"aria-owns\":this.ids.menu,\"aria-haspopup\":\"true\",title:this.element.attr(\"title\")}).insertAfter(this.element),this._addClass(this.button,\"ui-selectmenu-button ui-selectmenu-button-closed\",\"ui-button ui-widget\"),icon=$(\"<span>\").appendTo(this.button),this._addClass(icon,\"ui-selectmenu-icon\",\"ui-icon \"+this.options.icons.button),this.buttonItem=this._renderButtonItem(item).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one(\"focusin\",function(){that._rendered||that._refreshMenu()})},_drawMenu:function(){var that=this;this.menu=$(\"<ul>\",{\"aria-hidden\":\"true\",\"aria-labelledby\":this.ids.button,id:this.ids.menu}),this.menuWrap=$(\"<div>\").append(this.menu),this._addClass(this.menuWrap,\"ui-selectmenu-menu\",\"ui-front\"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{\"ui-menu\":\"ui-corner-bottom\"},role:\"listbox\",select:function(event,ui){event.preventDefault(),that._setSelection(),that._select(ui.item.data(\"ui-selectmenu-item\"),event)},focus:function(event,ui){var item=ui.item.data(\"ui-selectmenu-item\");null!=that.focusIndex&&item.index!==that.focusIndex&&(that._trigger(\"focus\",event,{item:item}),that.isOpen||that._select(item,event)),that.focusIndex=item.index,that.button.attr(\"aria-activedescendant\",that.menuItems.eq(item.index).attr(\"id\"))}}).menu(\"instance\"),this.menuInstance._off(this.menu,\"mouseleave\"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data(\"ui-selectmenu-item\")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var item,options=this.element.find(\"option\");this.menu.empty(),this._parseOptions(options),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find(\"li\").not(\".ui-selectmenu-optgroup\").find(\".ui-menu-item-wrapper\"),this._rendered=!0,options.length&&(item=this._getSelectedItem(),this.menuInstance.focus(null,item),this._setAria(item.data(\"ui-selectmenu-item\")),this._setOption(\"disabled\",this.element.prop(\"disabled\")))},open:function(event){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(\".ui-state-active\"),null,\"ui-state-active\"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger(\"open\",event)))},_position:function(){this.menuWrap.position($.extend({of:this.button},this.options.position))},close:function(event){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger(\"close\",event))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(item){var buttonItem=$(\"<span>\");return this._setText(buttonItem,item.label),this._addClass(buttonItem,\"ui-selectmenu-text\"),buttonItem},_renderMenu:function(ul,items){var that=this,currentOptgroup=\"\";$.each(items,function(index,item){var li;item.optgroup!==currentOptgroup&&(li=$(\"<li>\",{text:item.optgroup}),that._addClass(li,\"ui-selectmenu-optgroup\",\"ui-menu-divider\"+(item.element.parent(\"optgroup\").prop(\"disabled\")?\" ui-state-disabled\":\"\")),li.appendTo(ul),currentOptgroup=item.optgroup),that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data(\"ui-selectmenu-item\",item)},_renderItem:function(ul,item){var li=$(\"<li>\"),wrapper=$(\"<div>\",{title:item.element.attr(\"title\")});return item.disabled&&this._addClass(li,null,\"ui-state-disabled\"),this._setText(wrapper,item.label),li.append(wrapper).appendTo(ul)},_setText:function(element,value){value?element.text(value):element.html(\"&#160;\")},_move:function(direction,event){var item,next,filter=\".ui-menu-item\";this.isOpen?item=this.menuItems.eq(this.focusIndex).parent(\"li\"):(item=this.menuItems.eq(this.element[0].selectedIndex).parent(\"li\"),filter+=\":not(.ui-state-disabled)\"),next=\"first\"===direction||\"last\"===direction?item[\"first\"===direction?\"prevAll\":\"nextAll\"](filter).eq(-1):item[direction+\"All\"](filter).eq(0),next.length&&this.menuInstance.focus(event,next)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent(\"li\")},_toggle:function(event){this[this.isOpen?\"close\":\"open\"](event)},_setSelection:function(){var selection;this.range&&(window.getSelection?(selection=window.getSelection(),selection.removeAllRanges(),selection.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(event){this.isOpen&&($(event.target).closest(\".ui-selectmenu-menu, #\"+$.ui.escapeSelector(this.ids.button)).length||this.close(event))}},_buttonEvents:{mousedown:function(){var selection;window.getSelection?(selection=window.getSelection(),selection.rangeCount&&(this.range=selection.getRangeAt(0))):this.range=document.selection.createRange()},click:function(event){this._setSelection(),this._toggle(event)},keydown:function(event){var preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.TAB:case $.ui.keyCode.ESCAPE:this.close(event),preventDefault=!1;break;case $.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(event);break;case $.ui.keyCode.UP:event.altKey?this._toggle(event):this._move(\"prev\",event);break;case $.ui.keyCode.DOWN:event.altKey?this._toggle(event):this._move(\"next\",event);break;case $.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(event):this._toggle(event);break;case $.ui.keyCode.LEFT:this._move(\"prev\",event);break;case $.ui.keyCode.RIGHT:this._move(\"next\",event);break;case $.ui.keyCode.HOME:case $.ui.keyCode.PAGE_UP:this._move(\"first\",event);break;case $.ui.keyCode.END:case $.ui.keyCode.PAGE_DOWN:this._move(\"last\",event);break;default:this.menu.trigger(event),preventDefault=!1}preventDefault&&event.preventDefault()}},_selectFocusedItem:function(event){var item=this.menuItems.eq(this.focusIndex).parent(\"li\");item.hasClass(\"ui-state-disabled\")||this._select(item.data(\"ui-selectmenu-item\"),event)},_select:function(item,event){var oldIndex=this.element[0].selectedIndex;this.element[0].selectedIndex=item.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item)),this._setAria(item),this._trigger(\"select\",event,{item:item}),item.index!==oldIndex&&this._trigger(\"change\",event,{item:item}),this.close(event)},_setAria:function(item){var id=this.menuItems.eq(item.index).attr(\"id\");this.button.attr({\"aria-labelledby\":id,\"aria-activedescendant\":id}),this.menu.attr(\"aria-activedescendant\",id)},_setOption:function(key,value){if(\"icons\"===key){var icon=this.button.find(\"span.ui-icon\");this._removeClass(icon,null,this.options.icons.button)._addClass(icon,null,value.button)}this._super(key,value),\"appendTo\"===key&&this.menuWrap.appendTo(this._appendTo()),\"width\"===key&&this._resizeButton()},_setOptionDisabled:function(value){this._super(value),this.menuInstance.option(\"disabled\",value),this.button.attr(\"aria-disabled\",value),this._toggleClass(this.button,null,\"ui-state-disabled\",value),this.element.prop(\"disabled\",value),value?(this.button.attr(\"tabindex\",-1),this.close()):this.button.attr(\"tabindex\",0)},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(\".ui-front, dialog\")),element.length||(element=this.document[0].body),element},_toggleAttr:function(){this.button.attr(\"aria-expanded\",this.isOpen),this._removeClass(this.button,\"ui-selectmenu-button-\"+(this.isOpen?\"closed\":\"open\"))._addClass(this.button,\"ui-selectmenu-button-\"+(this.isOpen?\"open\":\"closed\"))._toggleClass(this.menuWrap,\"ui-selectmenu-open\",null,this.isOpen),this.menu.attr(\"aria-hidden\",!this.isOpen)},_resizeButton:function(){var width=this.options.width;if(!1===width)return void this.button.css(\"width\",\"\");null===width&&(width=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(width)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width(\"\").outerWidth()+1))},_getCreateOptions:function(){var options=this._super();return options.disabled=this.element.prop(\"disabled\"),options},_parseOptions:function(options){var that=this,data=[];options.each(function(index,item){data.push(that._parseOption($(item),index))}),this.items=data},_parseOption:function(option,index){var optgroup=option.parent(\"optgroup\");return{element:option,index:index,value:option.val(),label:option.text(),optgroup:optgroup.attr(\"label\")||\"\",disabled:optgroup.prop(\"disabled\")||option.prop(\"disabled\")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr(\"for\",this.ids.element)}}]),$.widget(\"ui.slider\",$.ui.mouse,{version:\"1.12.1\",widgetEventPrefix:\"slide\",options:{animate:!1,classes:{\"ui-slider\":\"ui-corner-all\",\"ui-slider-handle\":\"ui-corner-all\",\"ui-slider-range\":\"ui-corner-all ui-widget-header\"},distance:0,max:100,min:0,orientation:\"horizontal\",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass(\"ui-slider ui-slider-\"+this.orientation,\"ui-widget ui-widget-content\"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(\".ui-slider-handle\"),handles=[];for(handleCount=options.values&&options.values.length||1,existingHandles.length>handleCount&&(existingHandles.slice(handleCount).remove(),existingHandles=existingHandles.slice(0,handleCount)),i=existingHandles.length;i<handleCount;i++)handles.push(\"<span tabindex='0'></span>\");this.handles=existingHandles.add($(handles.join(\"\")).appendTo(this.element)),this._addClass(this.handles,\"ui-slider-handle\",\"ui-state-default\"),this.handle=this.handles.eq(0),this.handles.each(function(i){$(this).data(\"ui-slider-handle-index\",i).attr(\"tabIndex\",0)})},_createRange:function(){var options=this.options;options.range?(!0===options.range&&(options.values?options.values.length&&2!==options.values.length?options.values=[options.values[0],options.values[0]]:$.isArray(options.values)&&(options.values=options.values.slice(0)):options.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,\"ui-slider-range-min ui-slider-range-max\"),this.range.css({left:\"\",bottom:\"\"})):(this.range=$(\"<div>\").appendTo(this.element),this._addClass(this.range,\"ui-slider-range\")),\"min\"!==options.range&&\"max\"!==options.range||this._addClass(this.range,\"ui-slider-range-\"+options.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,offset,mouseOverHandle,that=this,o=this.options;return!o.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position),distance=this._valueMax()-this._valueMin()+1,this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));(distance>thisDistance||distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))&&(distance=thisDistance,closestHandle=$(this),index=i)}),!1!==this._start(event,index)&&(this._mouseSliding=!0,this._handleIndex=index,this._addClass(closestHandle,null,\"ui-state-active\"),closestHandle.trigger(\"focus\"),offset=closestHandle.offset(),mouseOverHandle=!$(event.target).parents().addBack().is(\".ui-slider-handle\"),this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-closestHandle.width()/2,top:event.pageY-offset.top-closestHandle.height()/2-(parseInt(closestHandle.css(\"borderTopWidth\"),10)||0)-(parseInt(closestHandle.css(\"borderBottomWidth\"),10)||0)+(parseInt(closestHandle.css(\"marginTop\"),10)||0)},this.handles.hasClass(\"ui-state-hover\")||this._slide(event,index,normValue),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);return this._slide(event,this._handleIndex,normValue),!1},_mouseStop:function(event){return this._removeClass(this.handles,null,\"ui-state-active\"),this._mouseSliding=!1,this._stop(event,this._handleIndex),this._change(event,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=\"vertical\"===this.options.orientation?\"vertical\":\"horizontal\"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;return\"horizontal\"===this.orientation?(pixelTotal=this.elementSize.width,pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(pixelTotal=this.elementSize.height,pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),percentMouse=pixelMouse/pixelTotal,percentMouse>1&&(percentMouse=1),percentMouse<0&&(percentMouse=0),\"vertical\"===this.orientation&&(percentMouse=1-percentMouse),valueTotal=this._valueMax()-this._valueMin(),valueMouse=this._valueMin()+percentMouse*valueTotal,this._trimAlignValue(valueMouse)},_uiHash:function(index,value,values){var uiHash={handle:this.handles[index],handleIndex:index,value:void 0!==value?value:this.value()};return this._hasMultipleValues()&&(uiHash.value=void 0!==value?value:this.values(index),uiHash.values=values||this.values()),uiHash},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(event,index){return this._trigger(\"start\",event,this._uiHash(index))},_slide:function(event,index,newVal){var otherVal,currentValue=this.value(),newValues=this.values();this._hasMultipleValues()&&(otherVal=this.values(index?0:1),currentValue=this.values(index),2===this.options.values.length&&!0===this.options.range&&(newVal=0===index?Math.min(otherVal,newVal):Math.max(otherVal,newVal)),newValues[index]=newVal),newVal!==currentValue&&!1!==this._trigger(\"slide\",event,this._uiHash(index,newVal,newValues))&&(this._hasMultipleValues()?this.values(index,newVal):this.value(newVal))},_stop:function(event,index){this._trigger(\"stop\",event,this._uiHash(index))},_change:function(event,index){this._keySliding||this._mouseSliding||(this._lastChangedValue=index,this._trigger(\"change\",event,this._uiHash(index)))},value:function(newValue){return arguments.length?(this.options.value=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,0)):this._value()},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1)return this.options.values[index]=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,index);if(!arguments.length)return this._values();if(!$.isArray(arguments[0]))return this._hasMultipleValues()?this._values(index):this.value();for(vals=this.options.values,newValues=arguments[0],i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(newValues[i]),this._change(null,i);this._refreshValue()},_setOption:function(key,value){var i,valsLength=0;switch(\"range\"===key&&!0===this.options.range&&(\"min\"===value?(this.options.value=this._values(0),this.options.values=null):\"max\"===value&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),$.isArray(this.options.values)&&(valsLength=this.options.values.length),this._super(key,value),key){case\"orientation\":this._detectOrientation(),this._removeClass(\"ui-slider-horizontal ui-slider-vertical\")._addClass(\"ui-slider-\"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(value),this.handles.css(\"horizontal\"===value?\"bottom\":\"left\",\"\");break;case\"value\":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case\"values\":for(this._animateOff=!0,this._refreshValue(),i=valsLength-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case\"step\":case\"min\":case\"max\":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case\"range\":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(value){this._super(value),this._toggleClass(null,\"ui-state-disabled\",!!value)},_value:function(){var val=this.options.value;return val=this._trimAlignValue(val)},_values:function(index){var val,vals,i;if(arguments.length)return val=this.options.values[index],val=this._trimAlignValue(val);if(this._hasMultipleValues()){for(vals=this.options.values.slice(),i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(vals[i]);return vals}return[]},_trimAlignValue:function(val){if(val<=this._valueMin())return this._valueMin();if(val>=this._valueMax())return this._valueMax();var step=this.options.step>0?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;return 2*Math.abs(valModStep)>=step&&(alignValue+=valModStep>0?step:-step),parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var max=this.options.max,min=this._valueMin(),step=this.options.step;max=Math.round((max-min)/step)*step+min,max>this.options.max&&(max-=step),this.max=parseFloat(max.toFixed(this._precision()))},_precision:function(){var precision=this._precisionOf(this.options.step);return null!==this.options.min&&(precision=Math.max(precision,this._precisionOf(this.options.min))),precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(\".\");return-1===decimal?0:str.length-decimal-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(orientation){\"vertical\"===orientation&&this.range.css({width:\"\",left:\"\"}),\"horizontal\"===orientation&&this.range.css({height:\"\",bottom:\"\"})},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=!this._animateOff&&o.animate,_set={};this._hasMultipleValues()?this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100,_set[\"horizontal\"===that.orientation?\"left\":\"bottom\"]=valPercent+\"%\",$(this).stop(1,1)[animate?\"animate\":\"css\"](_set,o.animate),!0===that.options.range&&(\"horizontal\"===that.orientation?(0===i&&that.range.stop(1,1)[animate?\"animate\":\"css\"]({left:valPercent+\"%\"},o.animate),1===i&&that.range[animate?\"animate\":\"css\"]({width:valPercent-lastValPercent+\"%\"},{queue:!1,duration:o.animate})):(0===i&&that.range.stop(1,1)[animate?\"animate\":\"css\"]({bottom:valPercent+\"%\"},o.animate),1===i&&that.range[animate?\"animate\":\"css\"]({height:valPercent-lastValPercent+\"%\"},{queue:!1,duration:o.animate}))),lastValPercent=valPercent}):(value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0,_set[\"horizontal\"===this.orientation?\"left\":\"bottom\"]=valPercent+\"%\",this.handle.stop(1,1)[animate?\"animate\":\"css\"](_set,o.animate),\"min\"===oRange&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[animate?\"animate\":\"css\"]({width:valPercent+\"%\"},o.animate),\"max\"===oRange&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[animate?\"animate\":\"css\"]({width:100-valPercent+\"%\"},o.animate),\"min\"===oRange&&\"vertical\"===this.orientation&&this.range.stop(1,1)[animate?\"animate\":\"css\"]({height:valPercent+\"%\"},o.animate),\"max\"===oRange&&\"vertical\"===this.orientation&&this.range.stop(1,1)[animate?\"animate\":\"css\"]({height:100-valPercent+\"%\"},o.animate))},_handleEvents:{keydown:function(event){var curVal,newVal,step,index=$(event.target).data(\"ui-slider-handle-index\");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(event.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass($(event.target),null,\"ui-state-active\"),!1===this._start(event,index)))return}switch(step=this.options.step,curVal=newVal=this._hasMultipleValues()?this.values(index):this.value(),event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax())return;newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin())return;newVal=this._trimAlignValue(curVal-step)}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data(\"ui-slider-handle-index\");this._keySliding&&(this._keySliding=!1,this._stop(event,index),this._change(event,index),this._removeClass($(event.target),null,\"ui-state-active\"))}}}),$.widget(\"ui.sortable\",$.ui.mouse,{version:\"1.12.1\",widgetEventPrefix:\"sort\",ready:!1,options:{appendTo:\"parent\",axis:!1,connectWith:!1,containment:!1,cursor:\"auto\",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:\"original\",items:\"> *\",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:\"default\",tolerance:\"intersect\",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(x,reference,size){return x>=reference&&x<reference+size},_isFloating:function(item){return/left|right/.test(item.css(\"float\"))||/inline|table-cell/.test(item.css(\"display\"))},_create:function(){this.containerCache={},this._addClass(\"ui-sortable\"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(key,value){this._super(key,value),\"handle\"===key&&this._setHandleClassName()},_setHandleClassName:function(){var that=this;this._removeClass(this.element.find(\".ui-sortable-handle\"),\"ui-sortable-handle\"),$.each(this.items,function(){that._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,\"ui-sortable-handle\")})},_destroy:function(){this._mouseDestroy()\n;for(var i=this.items.length-1;i>=0;i--)this.items[i].item.removeData(this.widgetName+\"-item\");return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=!1,that=this;return!this.reverting&&(!this.options.disabled&&\"static\"!==this.options.type&&(this._refreshItems(event),$(event.target).parents().each(function(){if($.data(this,that.widgetName+\"-item\")===that)return currentItem=$(this),!1}),$.data(event.target,that.widgetName+\"-item\")===that&&(currentItem=$(event.target)),!!currentItem&&(!(this.options.handle&&!overrideHandle&&($(this.options.handle,currentItem).find(\"*\").addBack().each(function(){this===event.target&&(validHandle=!0)}),!validHandle))&&(this.currentItem=currentItem,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(event),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css(\"position\",\"absolute\"),this.cssPosition=this.helper.css(\"position\"),this.originalPosition=this._generatePosition(event),this.originalPageX=event.pageX,this.originalPageY=event.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&\"auto\"!==o.cursor&&(body=this.document.find(\"body\"),this.storedCursor=body.css(\"cursor\"),body.css(\"cursor\",o.cursor),this.storedStylesheet=$(\"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\").appendTo(body)),o.opacity&&(this.helper.css(\"opacity\")&&(this._storedOpacity=this.helper.css(\"opacity\")),this.helper.css(\"opacity\",o.opacity)),o.zIndex&&(this.helper.css(\"zIndex\")&&(this._storedZIndex=this.helper.css(\"zIndex\")),this.helper.css(\"zIndex\",o.zIndex)),this.scrollParent[0]!==this.document[0]&&\"HTML\"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger(\"start\",event,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!noActivation)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger(\"activate\",event,this._uiHash(this));return $.ui.ddmanager&&($.ui.ddmanager.current=this),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this.dragging=!0,this._addClass(this.helper,\"ui-sortable-helper\"),this._mouseDrag(event),!0},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=!1;for(this.position=this._generatePosition(event),this.positionAbs=this._convertPositionTo(\"absolute\"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&\"HTML\"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed:event.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed:event.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(event.pageY-this.document.scrollTop()<o.scrollSensitivity?scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(event.pageY-this.document.scrollTop())<o.scrollSensitivity&&(scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),event.pageX-this.document.scrollLeft()<o.scrollSensitivity?scrolled=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(event.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(scrolled=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==scrolled&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event)),this.positionAbs=this._convertPositionTo(\"absolute\"),this.options.axis&&\"y\"===this.options.axis||(this.helper[0].style.left=this.position.left+\"px\"),this.options.axis&&\"x\"===this.options.axis||(this.helper[0].style.top=this.position.top+\"px\"),i=this.items.length-1;i>=0;i--)if(item=this.items[i],itemElement=item.item[0],(intersection=this._intersectsWithPointer(item))&&item.instance===this.currentContainer&&!(itemElement===this.currentItem[0]||this.placeholder[1===intersection?\"next\":\"prev\"]()[0]===itemElement||$.contains(this.placeholder[0],itemElement)||\"semi-dynamic\"===this.options.type&&$.contains(this.element[0],itemElement))){if(this.direction=1===intersection?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(item))break;this._rearrange(event,item),this._trigger(\"change\",event,this._uiHash());break}return this._contactContainers(event),$.ui.ddmanager&&$.ui.ddmanager.drag(this,event),this._trigger(\"sort\",event,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(event,noPropagation){if(event){if($.ui.ddmanager&&!this.options.dropBehaviour&&$.ui.ddmanager.drop(this,event),this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};axis&&\"x\"!==axis||(animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),axis&&\"y\"!==axis||(animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else this._clear(event,noPropagation);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new $.Event(\"mouseup\",{target:null})),\"original\"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,\"ui-sortable-helper\")):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger(\"out\",null,this._uiHash(this)),this.containers[i].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),\"original\"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),$.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?$(this.domPosition.prev).after(this.currentItem):$(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];return o=o||{},$(items).each(function(){var res=($(o.item||this).attr(o.attribute||\"id\")||\"\").match(o.expression||/(.+)[\\-=_](.+)/);res&&str.push((o.key||res[1]+\"[]\")+\"=\"+(o.key&&o.expression?res[1]:res[2]))}),!str.length&&o.key&&str.push(o.key+\"=\"),str.join(\"&\")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];return o=o||{},items.each(function(){ret.push($(o.item||this).attr(o.attribute||\"id\")||\"\")}),ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight=\"x\"===this.options.axis||y1+dyClick>t&&y1+dyClick<b,isOverElementWidth=\"y\"===this.options.axis||x1+dxClick>l&&x1+dxClick<r,isOverElement=isOverElementHeight&&isOverElementWidth;return\"pointer\"===this.options.tolerance||this.options.forcePointerForContainers||\"pointer\"!==this.options.tolerance&&this.helperProportions[this.floating?\"width\":\"height\"]>item[this.floating?\"width\":\"height\"]?isOverElement:l<x1+this.helperProportions.width/2&&x2-this.helperProportions.width/2<r&&t<y1+this.helperProportions.height/2&&y2-this.helperProportions.height/2<b},_intersectsWithPointer:function(item){var verticalDirection,horizontalDirection,isOverElementHeight=\"x\"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=\"y\"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width);return!(!isOverElementHeight||!isOverElementWidth)&&(verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection(),this.floating?\"right\"===horizontalDirection||\"down\"===verticalDirection?2:1:verticalDirection&&(\"down\"===verticalDirection?2:1))},_intersectsWithSides:function(item){var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+item.height/2,item.height),isOverRightHalf=this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();return this.floating&&horizontalDirection?\"right\"===horizontalDirection&&isOverRightHalf||\"left\"===horizontalDirection&&!isOverRightHalf:verticalDirection&&(\"down\"===verticalDirection&&isOverBottomHalf||\"up\"===verticalDirection&&!isOverBottomHalf)},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return 0!==delta&&(delta>0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return 0!==delta&&(delta>0?\"right\":\"left\")},refresh:function(event){return this._refreshItems(event),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){function addItems(){items.push(this)}var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i],this.document[0]),j=cur.length-1;j>=0;j--)(inst=$.data(cur[j],this.widgetFullName))&&inst!==this&&!inst.options.disabled&&queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),inst]);for(queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),this]),i=queries.length-1;i>=0;i--)queries[i][0].each(addItems);return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=$.grep(this.items,function(item){for(var j=0;j<list.length;j++)if(list[j]===item.item[0])return!1;return!0})},_refreshItems:function(event){this.items=[],this.containers=[this];var i,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i],this.document[0]),j=cur.length-1;j>=0;j--)(inst=$.data(cur[j],this.widgetFullName))&&inst!==this&&!inst.options.disabled&&(queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]),this.containers.push(inst));for(i=queries.length-1;i>=0;i--)for(targetData=queries[i][1],_queries=queries[i][0],j=0,queriesLength=_queries.length;j<queriesLength;j++)item=$(_queries[j]),item.data(this.widgetName+\"-item\",targetData),items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})},refreshPositions:function(fast){this.floating=!!this.items.length&&(\"x\"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,item,t,p;for(i=this.items.length-1;i>=0;i--)item=this.items[i],item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]||(t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item,fast||(item.width=t.outerWidth(),item.height=t.outerHeight()),p=t.offset(),item.left=p.left,item.top=p.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)p=this.containers[i].element.offset(),this.containers[i].containerCache.left=p.left,this.containers[i].containerCache.top=p.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;o.placeholder&&o.placeholder.constructor!==String||(className=o.placeholder,o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$(\"<\"+nodeName+\">\",that.document[0]);return that._addClass(element,\"ui-sortable-placeholder\",className||that.currentItem[0].className)._removeClass(element,\"ui-sortable-helper\"),\"tbody\"===nodeName?that._createTrPlaceholder(that.currentItem.find(\"tr\").eq(0),$(\"<tr>\",that.document[0]).appendTo(element)):\"tr\"===nodeName?that._createTrPlaceholder(that.currentItem,element):\"img\"===nodeName&&element.attr(\"src\",that.currentItem.attr(\"src\")),className||element.css(\"visibility\",\"hidden\"),element},update:function(container,p){className&&!o.forcePlaceholderSize||(p.height()||p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css(\"paddingTop\")||0,10)-parseInt(that.currentItem.css(\"paddingBottom\")||0,10)),p.width()||p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css(\"paddingLeft\")||0,10)-parseInt(that.currentItem.css(\"paddingRight\")||0,10)))}}),that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem)),that.currentItem.after(that.placeholder),o.placeholder.update(that,that.placeholder)},_createTrPlaceholder:function(sourceTr,targetTr){var that=this;sourceTr.children().each(function(){$(\"<td>&#160;</td>\",that.document[0]).attr(\"colspan\",$(this).attr(\"colspan\")||1).appendTo(targetTr)})},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--)if(!$.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0]))continue;innermostContainer=this.containers[i],innermostIndex=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger(\"out\",event,this._uiHash(this)),this.containers[i].containerCache.over=0);if(innermostContainer)if(1===this.containers.length)this.containers[innermostIndex].containerCache.over||(this.containers[innermostIndex]._trigger(\"over\",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1);else{for(dist=1e4,itemWithLeastDistance=null,floating=innermostContainer.floating||this._isFloating(this.currentItem),posProperty=floating?\"left\":\"top\",sizeProperty=floating?\"width\":\"height\",axis=floating?\"pageX\":\"pageY\",j=this.items.length-1;j>=0;j--)$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])&&this.items[j].item[0]!==this.currentItem[0]&&(cur=this.items[j].item.offset()[posProperty],nearBottom=!1,event[axis]-cur>this.items[j][sizeProperty]/2&&(nearBottom=!0),Math.abs(event[axis]-cur)<dist&&(dist=Math.abs(event[axis]-cur),itemWithLeastDistance=this.items[j],this.direction=nearBottom?\"up\":\"down\"));if(!itemWithLeastDistance&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[innermostIndex])return void(this.currentContainer.containerCache.over||(this.containers[innermostIndex]._trigger(\"over\",event,this._uiHash()),this.currentContainer.containerCache.over=1));itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,!0):this._rearrange(event,null,this.containers[innermostIndex].element,!0),this._trigger(\"change\",event,this._uiHash()),this.containers[innermostIndex]._trigger(\"change\",event,this._uiHash(this)),this.currentContainer=this.containers[innermostIndex],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[innermostIndex]._trigger(\"over\",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1}},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):\"clone\"===o.helper?this.currentItem.clone():this.currentItem;return helper.parents(\"body\").length||$(\"parent\"!==o.appendTo?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]),helper[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(\"position\"),top:this.currentItem.css(\"top\"),left:this.currentItem.css(\"left\")}),helper[0].style.width&&!o.forceHelperSize||helper.width(this.currentItem.width()),helper[0].style.height&&!o.forceHelperSize||helper.height(this.currentItem.height()),helper},_adjustOffsetFromHelper:function(obj){\"string\"==typeof obj&&(obj=obj.split(\" \")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),\"left\"in obj&&(this.offset.click.left=obj.left+this.margins.left),\"right\"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),\"top\"in obj&&(this.offset.click.top=obj.top+this.margins.top),\"bottom\"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&\"html\"===this.offsetParent[0].tagName.toLowerCase()&&$.ui.ie)&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:po.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"===this.cssPosition){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css(\"top\"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css(\"left\"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css(\"marginLeft\"),10)||0,top:parseInt(this.currentItem.css(\"marginTop\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var ce,co,over,o=this.options;\"parent\"===o.containment&&(o.containment=this.helper[0].parentNode),\"document\"!==o.containment&&\"window\"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,\"document\"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,(\"document\"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(ce=$(o.containment)[0],co=$(o.containment).offset(),over=\"hidden\"!==$(ce).css(\"overflow\"),this.containment=[co.left+(parseInt($(ce).css(\"borderLeftWidth\"),10)||0)+(parseInt($(ce).css(\"paddingLeft\"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css(\"borderTopWidth\"),10)||0)+(parseInt($(ce).css(\"paddingTop\"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css(\"borderLeftWidth\"),10)||0)-(parseInt($(ce).css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css(\"borderTopWidth\"),10)||0)-(parseInt($(ce).css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod=\"absolute\"===d?1:-1,scroll=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var top,left,o=this.options,pageX=event.pageX,pageY=event.pageY,scroll=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return\"relative\"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(event.pageX-this.offset.click.left<this.containment[0]&&(pageX=this.containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<this.containment[1]&&(pageY=this.containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>this.containment[2]&&(pageX=this.containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>this.containment[3]&&(pageY=this.containment[3]+this.offset.click.top)),o.grid&&(top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1],pageY=this.containment?top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3]?top:top-this.offset.click.top>=this.containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0],pageX=this.containment?left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2]?left:left-this.offset.click.left>=this.containment[0]?left-o.grid[0]:left+o.grid[0]:left)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?i.item[0]:i.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){counter===this.counter&&this.refreshPositions(!hardRefresh)})},_clear:function(event,noPropagation){function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance))}}this.reverting=!1;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)\"auto\"!==this._storedCSS[i]&&\"static\"!==this._storedCSS[i]||(this._storedCSS[i]=\"\");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,\"ui-sortable-helper\")}else this.currentItem.show();for(this.fromOutside&&!noPropagation&&delayedTriggers.push(function(event){this._trigger(\"receive\",event,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||noPropagation||delayedTriggers.push(function(event){this._trigger(\"update\",event,this._uiHash())}),this!==this.currentContainer&&(noPropagation||(delayedTriggers.push(function(event){this._trigger(\"remove\",event,this._uiHash())}),delayedTriggers.push(function(c){return function(event){c._trigger(\"receive\",event,this._uiHash(this))}}.call(this,this.currentContainer)),delayedTriggers.push(function(c){return function(event){c._trigger(\"update\",event,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)noPropagation||delayedTriggers.push(delayEvent(\"deactivate\",this,this.containers[i])),this.containers[i].containerCache.over&&(delayedTriggers.push(delayEvent(\"out\",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find(\"body\").css(\"cursor\",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css(\"opacity\",this._storedOpacity),this._storedZIndex&&this.helper.css(\"zIndex\",\"auto\"===this._storedZIndex?\"\":this._storedZIndex),this.dragging=!1,noPropagation||this._trigger(\"beforeStop\",event,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!noPropagation){for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event);this._trigger(\"stop\",event,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===$.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}});$.widget(\"ui.spinner\",{version:\"1.12.1\",defaultElement:\"<input>\",widgetEventPrefix:\"spin\",options:{classes:{\"ui-spinner\":\"ui-corner-all\",\"ui-spinner-down\":\"ui-corner-br\",\"ui-spinner-up\":\"ui-corner-tr\"},culture:null,icons:{down:\"ui-icon-triangle-1-s\",up:\"ui-icon-triangle-1-n\"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption(\"max\",this.options.max),this._setOption(\"min\",this.options.min),this._setOption(\"step\",this.options.step),\"\"!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_getCreateOptions:function(){var options=this._super(),element=this.element;return $.each([\"min\",\"max\",\"step\"],function(i,option){var value=element.attr(option);null!=value&&value.length&&(options[option]=value)}),options},_events:{keydown:function(event){this._start(event)&&this._keydown(event)&&event.preventDefault()},keyup:\"_stop\",focus:function(){this.previous=this.element.val()},blur:function(event){if(this.cancelBlur)return void delete this.cancelBlur;this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger(\"change\",event)},mousewheel:function(event,delta){if(delta){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}},\"mousedown .ui-spinner-button\":function(event){function checkFocus(){this.element[0]===$.ui.safeActiveElement(this.document[0])||(this.element.trigger(\"focus\"),this.previous=previous,this._delay(function(){this.previous=previous}))}var previous;previous=this.element[0]===$.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),event.preventDefault(),checkFocus.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,checkFocus.call(this)}),!1!==this._start(event)&&this._repeat(null,$(event.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,event)},\"mouseup .ui-spinner-button\":\"_stop\",\"mouseenter .ui-spinner-button\":function(event){if($(event.currentTarget).hasClass(\"ui-state-active\"))return!1!==this._start(event)&&void this._repeat(null,$(event.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,event)},\"mouseleave .ui-spinner-button\":\"_stop\"},_enhance:function(){this.uiSpinner=this.element.attr(\"autocomplete\",\"off\").wrap(\"<span>\").parent().append(\"<a></a><a></a>\")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,\"ui-spinner\",\"ui-widget ui-widget-content\"),this._addClass(\"ui-spinner-input\"),this.element.attr(\"role\",\"spinbutton\"),this.buttons=this.uiSpinner.children(\"a\").attr(\"tabIndex\",-1).attr(\"aria-hidden\",!0).button({classes:{\"ui-button\":\"\"}}),this._removeClass(this.buttons,\"ui-corner-all\"),this._addClass(this.buttons.first(),\"ui-spinner-button ui-spinner-up\"),this._addClass(this.buttons.last(),\"ui-spinner-button ui-spinner-down\"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(event){var options=this.options,keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.UP:return this._repeat(null,1,event),!0;case keyCode.DOWN:return this._repeat(null,-1,event),!0;case keyCode.PAGE_UP:return this._repeat(null,options.page,event),!0;case keyCode.PAGE_DOWN:return this._repeat(null,-options.page,event),!0}return!1},_start:function(event){return!(!this.spinning&&!1===this._trigger(\"start\",event))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(i,steps,event){i=i||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,steps,event)},i),this._spin(steps*this.options.step,event)},_spin:function(step,event){var value=this.value()||0;this.counter||(this.counter=1),value=this._adjustValue(value+step*this._increment(this.counter)),this.spinning&&!1===this._trigger(\"spin\",event,{value:value})||(this._value(value),this.counter++)},_increment:function(i){var incremental=this.options.incremental;return incremental?$.isFunction(incremental)?incremental(i):Math.floor(i*i*i/5e4-i*i/500+17*i/200+1):1},_precision:function(){var precision=this._precisionOf(this.options.step);return null!==this.options.min&&(precision=Math.max(precision,this._precisionOf(this.options.min))),precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(\".\");return-1===decimal?0:str.length-decimal-1},_adjustValue:function(value){var base,aboveMin,options=this.options;return base=null!==options.min?options.min:0,aboveMin=value-base,aboveMin=Math.round(aboveMin/options.step)*options.step,value=base+aboveMin,value=parseFloat(value.toFixed(this._precision())),null!==options.max&&value>options.max?options.max:null!==options.min&&value<options.min?options.min:value},_stop:function(event){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger(\"stop\",event))},\n_setOption:function(key,value){var prevValue,first,last;if(\"culture\"===key||\"numberFormat\"===key)return prevValue=this._parse(this.element.val()),this.options[key]=value,void this.element.val(this._format(prevValue));\"max\"!==key&&\"min\"!==key&&\"step\"!==key||\"string\"==typeof value&&(value=this._parse(value)),\"icons\"===key&&(first=this.buttons.first().find(\".ui-icon\"),this._removeClass(first,null,this.options.icons.up),this._addClass(first,null,value.up),last=this.buttons.last().find(\".ui-icon\"),this._removeClass(last,null,this.options.icons.down),this._addClass(last,null,value.down)),this._super(key,value)},_setOptionDisabled:function(value){this._super(value),this._toggleClass(this.uiSpinner,null,\"ui-state-disabled\",!!value),this.element.prop(\"disabled\",!!value),this.buttons.button(value?\"disable\":\"enable\")},_setOptions:spinnerModifer(function(options){this._super(options)}),_parse:function(val){return\"string\"==typeof val&&\"\"!==val&&(val=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(val,10,this.options.culture):+val),\"\"===val||isNaN(val)?null:val},_format:function(value){return\"\"===value?\"\":window.Globalize&&this.options.numberFormat?Globalize.format(value,this.options.numberFormat,this.options.culture):value},_refresh:function(){this.element.attr({\"aria-valuemin\":this.options.min,\"aria-valuemax\":this.options.max,\"aria-valuenow\":this._parse(this.element.val())})},isValid:function(){var value=this.value();return null!==value&&value===this._adjustValue(value)},_value:function(value,allowAny){var parsed;\"\"!==value&&null!==(parsed=this._parse(value))&&(allowAny||(parsed=this._adjustValue(parsed)),value=this._format(parsed)),this.element.val(value),this._refresh()},_destroy:function(){this.element.prop(\"disabled\",!1).removeAttr(\"autocomplete role aria-valuemin aria-valuemax aria-valuenow\"),this.uiSpinner.replaceWith(this.element)},stepUp:spinnerModifer(function(steps){this._stepUp(steps)}),_stepUp:function(steps){this._start()&&(this._spin((steps||1)*this.options.step),this._stop())},stepDown:spinnerModifer(function(steps){this._stepDown(steps)}),_stepDown:function(steps){this._start()&&(this._spin((steps||1)*-this.options.step),this._stop())},pageUp:spinnerModifer(function(pages){this._stepUp((pages||1)*this.options.page)}),pageDown:spinnerModifer(function(pages){this._stepDown((pages||1)*this.options.page)}),value:function(newVal){if(!arguments.length)return this._parse(this.element.val());spinnerModifer(this._value).call(this,newVal)},widget:function(){return this.uiSpinner}}),!1!==$.uiBackCompat&&$.widget(\"ui.spinner\",$.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr(\"autocomplete\",\"off\").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return\"<span>\"},_buttonHtml:function(){return\"<a></a><a></a>\"}});$.ui.spinner;$.widget(\"ui.tabs\",{version:\"1.12.1\",delay:300,options:{active:null,classes:{\"ui-tabs\":\"ui-corner-all\",\"ui-tabs-nav\":\"ui-corner-all\",\"ui-tabs-panel\":\"ui-corner-bottom\",\"ui-tabs-tab\":\"ui-corner-top\"},collapsible:!1,event:\"click\",heightStyle:\"content\",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var rhash=/#.*$/;return function(anchor){var anchorUrl,locationUrl;anchorUrl=anchor.href.replace(rhash,\"\"),locationUrl=location.href.replace(rhash,\"\");try{anchorUrl=decodeURIComponent(anchorUrl)}catch(error){}try{locationUrl=decodeURIComponent(locationUrl)}catch(error){}return anchor.hash.length>1&&anchorUrl===locationUrl}}(),_create:function(){var that=this,options=this.options;this.running=!1,this._addClass(\"ui-tabs\",\"ui-widget ui-widget-content\"),this._toggleClass(\"ui-tabs-collapsible\",null,options.collapsible),this._processTabs(),options.active=this._initialActive(),$.isArray(options.disabled)&&(options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(\".ui-state-disabled\"),function(li){return that.tabs.index(li)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(options.active):this.active=$(),this._refresh(),this.active.length&&this.load(options.active)},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);return null===active&&(locationHash&&this.tabs.each(function(i,tab){if($(tab).attr(\"aria-controls\")===locationHash)return active=i,!1}),null===active&&(active=this.tabs.index(this.tabs.filter(\".ui-tabs-active\"))),null!==active&&-1!==active||(active=!!this.tabs.length&&0)),!1!==active&&-1===(active=this.tabs.index(this.tabs.eq(active)))&&(active=!collapsible&&0),!collapsible&&!1===active&&this.anchors.length&&(active=0),active},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):$()}},_tabKeydown:function(event){var focusedTab=$($.ui.safeActiveElement(this.document[0])).closest(\"li\"),selectedIndex=this.tabs.index(focusedTab),goingForward=!0;if(!this._handlePageNav(event)){switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=!1,selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex);case $.ui.keyCode.ENTER:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex!==this.options.active&&selectedIndex);default:return}event.preventDefault(),clearTimeout(this.activating),selectedIndex=this._focusNextTab(selectedIndex,goingForward),event.ctrlKey||event.metaKey||(focusedTab.attr(\"aria-selected\",\"false\"),this.tabs.eq(selectedIndex).attr(\"aria-selected\",\"true\"),this.activating=this._delay(function(){this.option(\"active\",selectedIndex)},this.delay))}},_panelKeydown:function(event){this._handlePageNav(event)||event.ctrlKey&&event.keyCode===$.ui.keyCode.UP&&(event.preventDefault(),this.active.trigger(\"focus\"))},_handlePageNav:function(event){return event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(index,goingForward){for(var lastTabIndex=this.tabs.length-1;-1!==$.inArray(function(){return index>lastTabIndex&&(index=0),index<0&&(index=lastTabIndex),index}(),this.options.disabled);)index=goingForward?index+1:index-1;return index},_focusNextTab:function(index,goingForward){return index=this._findNextTab(index,goingForward),this.tabs.eq(index).trigger(\"focus\"),index},_setOption:function(key,value){if(\"active\"===key)return void this._activate(value);this._super(key,value),\"collapsible\"===key&&(this._toggleClass(\"ui-tabs-collapsible\",null,value),value||!1!==this.options.active||this._activate(0)),\"event\"===key&&this._setupEvents(value),\"heightStyle\"===key&&this._setupHeightStyle(value)},_sanitizeSelector:function(hash){return hash?hash.replace(/[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g,\"\\\\$&\"):\"\"},refresh:function(){var options=this.options,lis=this.tablist.children(\":has(a[href])\");options.disabled=$.map(lis.filter(\".ui-state-disabled\"),function(tab){return lis.index(tab)}),this._processTabs(),!1!==options.active&&this.anchors.length?this.active.length&&!$.contains(this.tablist[0],this.active[0])?this.tabs.length===options.disabled.length?(options.active=!1,this.active=$()):this._activate(this._findNextTab(Math.max(0,options.active-1),!1)):options.active=this.tabs.index(this.active):(options.active=!1,this.active=$()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({\"aria-hidden\":\"true\"}),this.active.length?(this.active.attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0}),this._addClass(this.active,\"ui-tabs-active\",\"ui-state-active\"),this._getPanelForTab(this.active).show().attr({\"aria-hidden\":\"false\"})):this.tabs.eq(0).attr(\"tabIndex\",0)},_processTabs:function(){var that=this,prevTabs=this.tabs,prevAnchors=this.anchors,prevPanels=this.panels;this.tablist=this._getList().attr(\"role\",\"tablist\"),this._addClass(this.tablist,\"ui-tabs-nav\",\"ui-helper-reset ui-helper-clearfix ui-widget-header\"),this.tablist.on(\"mousedown\"+this.eventNamespace,\"> li\",function(event){$(this).is(\".ui-state-disabled\")&&event.preventDefault()}).on(\"focus\"+this.eventNamespace,\".ui-tabs-anchor\",function(){$(this).closest(\"li\").is(\".ui-state-disabled\")&&this.blur()}),this.tabs=this.tablist.find(\"> li:has(a[href])\").attr({role:\"tab\",tabIndex:-1}),this._addClass(this.tabs,\"ui-tabs-tab\",\"ui-state-default\"),this.anchors=this.tabs.map(function(){return $(\"a\",this)[0]}).attr({role:\"presentation\",tabIndex:-1}),this._addClass(this.anchors,\"ui-tabs-anchor\"),this.panels=$(),this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr(\"id\"),tab=$(anchor).closest(\"li\"),originalAriaControls=tab.attr(\"aria-controls\");that._isLocal(anchor)?(selector=anchor.hash,panelId=selector.substring(1),panel=that.element.find(that._sanitizeSelector(selector))):(panelId=tab.attr(\"aria-controls\")||$({}).uniqueId()[0].id,selector=\"#\"+panelId,panel=that.element.find(selector),panel.length||(panel=that._createPanel(panelId),panel.insertAfter(that.panels[i-1]||that.tablist)),panel.attr(\"aria-live\",\"polite\")),panel.length&&(that.panels=that.panels.add(panel)),originalAriaControls&&tab.data(\"ui-tabs-aria-controls\",originalAriaControls),tab.attr({\"aria-controls\":panelId,\"aria-labelledby\":anchorId}),panel.attr(\"aria-labelledby\",anchorId)}),this.panels.attr(\"role\",\"tabpanel\"),this._addClass(this.panels,\"ui-tabs-panel\",\"ui-widget-content\"),prevTabs&&(this._off(prevTabs.not(this.tabs)),this._off(prevAnchors.not(this.anchors)),this._off(prevPanels.not(this.panels)))},_getList:function(){return this.tablist||this.element.find(\"ol, ul\").eq(0)},_createPanel:function(id){return $(\"<div>\").attr(\"id\",id).data(\"ui-tabs-destroy\",!0)},_setOptionDisabled:function(disabled){var currentItem,li,i;for($.isArray(disabled)&&(disabled.length?disabled.length===this.anchors.length&&(disabled=!0):disabled=!1),i=0;li=this.tabs[i];i++)currentItem=$(li),!0===disabled||-1!==$.inArray(i,disabled)?(currentItem.attr(\"aria-disabled\",\"true\"),this._addClass(currentItem,null,\"ui-state-disabled\")):(currentItem.removeAttr(\"aria-disabled\"),this._removeClass(currentItem,null,\"ui-state-disabled\"));this.options.disabled=disabled,this._toggleClass(this.widget(),this.widgetFullName+\"-disabled\",null,!0===disabled)},_setupEvents:function(event){var events={};event&&$.each(event.split(\" \"),function(index,eventName){events[eventName]=\"_eventHandler\"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(event){event.preventDefault()}}),this._on(this.anchors,events),this._on(this.tabs,{keydown:\"_tabKeydown\"}),this._on(this.panels,{keydown:\"_panelKeydown\"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();\"fill\"===heightStyle?(maxHeight=parent.height(),maxHeight-=this.element.outerHeight()-this.element.height(),this.element.siblings(\":visible\").each(function(){var elem=$(this),position=elem.css(\"position\");\"absolute\"!==position&&\"fixed\"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(!0)}),this.panels.each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css(\"overflow\",\"auto\")):\"auto\"===heightStyle&&(maxHeight=0,this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height(\"\").height())}).height(maxHeight))},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest(\"li\"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=active.length?this._getPanelForTab(active):$(),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault(),tab.hasClass(\"ui-state-disabled\")||tab.hasClass(\"ui-tabs-loading\")||this.running||clickedIsActive&&!options.collapsible||!1===this._trigger(\"beforeActivate\",event,eventData)||(options.active=!collapsing&&this.tabs.index(tab),this.active=clickedIsActive?$():tab,this.xhr&&this.xhr.abort(),toHide.length||toShow.length||$.error(\"jQuery UI Tabs: Mismatching fragment identifier.\"),toShow.length&&this.load(this.tabs.index(tab),event),this._toggle(event,eventData))},_toggle:function(event,eventData){function complete(){that.running=!1,that._trigger(\"activate\",event,eventData)}function show(){that._addClass(eventData.newTab.closest(\"li\"),\"ui-tabs-active\",\"ui-state-active\"),toShow.length&&that.options.show?that._show(toShow,that.options.show,complete):(toShow.show(),complete())}var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=!0,toHide.length&&this.options.hide?this._hide(toHide,this.options.hide,function(){that._removeClass(eventData.oldTab.closest(\"li\"),\"ui-tabs-active\",\"ui-state-active\"),show()}):(this._removeClass(eventData.oldTab.closest(\"li\"),\"ui-tabs-active\",\"ui-state-active\"),toHide.hide(),show()),toHide.attr(\"aria-hidden\",\"true\"),eventData.oldTab.attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\"}),toShow.length&&toHide.length?eventData.oldTab.attr(\"tabIndex\",-1):toShow.length&&this.tabs.filter(function(){return 0===$(this).attr(\"tabIndex\")}).attr(\"tabIndex\",-1),toShow.attr(\"aria-hidden\",\"false\"),eventData.newTab.attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0})},_activate:function(index){var anchor,active=this._findActive(index);active[0]!==this.active[0]&&(active.length||(active=this.active),anchor=active.find(\".ui-tabs-anchor\")[0],this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop}))},_findActive:function(index){return!1===index?$():this.tabs.eq(index)},_getIndex:function(index){return\"string\"==typeof index&&(index=this.anchors.index(this.anchors.filter(\"[href$='\"+$.ui.escapeSelector(index)+\"']\"))),index},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr(\"role\").off(this.eventNamespace),this.anchors.removeAttr(\"role tabIndex\").removeUniqueId(),this.tabs.add(this.panels).each(function(){$.data(this,\"ui-tabs-destroy\")?$(this).remove():$(this).removeAttr(\"role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded\")}),this.tabs.each(function(){var li=$(this),prev=li.data(\"ui-tabs-aria-controls\");prev?li.attr(\"aria-controls\",prev).removeData(\"ui-tabs-aria-controls\"):li.removeAttr(\"aria-controls\")}),this.panels.show(),\"content\"!==this.options.heightStyle&&this.panels.css(\"height\",\"\")},enable:function(index){var disabled=this.options.disabled;!1!==disabled&&(void 0===index?disabled=!1:(index=this._getIndex(index),disabled=$.isArray(disabled)?$.map(disabled,function(num){return num!==index?num:null}):$.map(this.tabs,function(li,num){return num!==index?num:null})),this._setOptionDisabled(disabled))},disable:function(index){var disabled=this.options.disabled;if(!0!==disabled){if(void 0===index)disabled=!0;else{if(index=this._getIndex(index),-1!==$.inArray(index,disabled))return;disabled=$.isArray(disabled)?$.merge([index],disabled).sort():[index]}this._setOptionDisabled(disabled)}},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(\".ui-tabs-anchor\"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel},complete=function(jqXHR,status){\"abort\"===status&&that.panels.stop(!1,!0),that._removeClass(tab,\"ui-tabs-loading\"),panel.removeAttr(\"aria-busy\"),jqXHR===that.xhr&&delete that.xhr};this._isLocal(anchor[0])||(this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData)),this.xhr&&\"canceled\"!==this.xhr.statusText&&(this._addClass(tab,\"ui-tabs-loading\"),panel.attr(\"aria-busy\",\"true\"),this.xhr.done(function(response,status,jqXHR){setTimeout(function(){panel.html(response),that._trigger(\"load\",event,eventData),complete(jqXHR,status)},1)}).fail(function(jqXHR,status){setTimeout(function(){complete(jqXHR,status)},1)})))},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr(\"href\").replace(/#.*$/,\"\"),beforeSend:function(jqXHR,settings){return that._trigger(\"beforeLoad\",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData))}}},_getPanelForTab:function(tab){var id=$(tab).attr(\"aria-controls\");return this.element.find(this._sanitizeSelector(\"#\"+id))}}),!1!==$.uiBackCompat&&$.widget(\"ui.tabs\",$.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,\"ui-tab\")}});$.ui.tabs;$.widget(\"ui.tooltip\",{version:\"1.12.1\",options:{classes:{\"ui-tooltip\":\"ui-corner-all ui-widget-shadow\"},content:function(){var title=$(this).attr(\"title\")||\"\";return $(\"<a>\").text(title).html()},hide:!0,items:\"[title]:not([disabled])\",position:{my:\"left top+15\",at:\"left bottom\",collision:\"flipfit flip\"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(elem,id){var describedby=(elem.attr(\"aria-describedby\")||\"\").split(/\\s+/);describedby.push(id),elem.data(\"ui-tooltip-id\",id).attr(\"aria-describedby\",$.trim(describedby.join(\" \")))},_removeDescribedBy:function(elem){var id=elem.data(\"ui-tooltip-id\"),describedby=(elem.attr(\"aria-describedby\")||\"\").split(/\\s+/),index=$.inArray(id,describedby);-1!==index&&describedby.splice(index,1),elem.removeData(\"ui-tooltip-id\"),describedby=$.trim(describedby.join(\" \")),describedby?elem.attr(\"aria-describedby\",describedby):elem.removeAttr(\"aria-describedby\")},_create:function(){this._on({mouseover:\"open\",focusin:\"open\"}),this.tooltips={},this.parents={},this.liveRegion=$(\"<div>\").attr({role:\"log\",\"aria-live\":\"assertive\",\"aria-relevant\":\"additions\"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,\"ui-helper-hidden-accessible\"),this.disabledTitles=$([])},_setOption:function(key,value){var that=this;this._super(key,value),\"content\"===key&&$.each(this.tooltips,function(id,tooltipData){that._updateContent(tooltipData.element)})},_setOptionDisabled:function(value){this[value?\"_disable\":\"_enable\"]()},_disable:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event(\"blur\");event.target=event.currentTarget=tooltipData.element[0],that.close(event,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var element=$(this);if(element.is(\"[title]\"))return element.data(\"ui-tooltip-title\",element.attr(\"title\")).removeAttr(\"title\")}))},_enable:function(){this.disabledTitles.each(function(){var element=$(this);element.data(\"ui-tooltip-title\")&&element.attr(\"title\",element.data(\"ui-tooltip-title\"))}),this.disabledTitles=$([])},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);target.length&&!target.data(\"ui-tooltip-id\")&&(target.attr(\"title\")&&target.data(\"ui-tooltip-title\",target.attr(\"title\")),target.data(\"ui-tooltip-open\",!0),event&&\"mouseover\"===event.type&&target.parents().each(function(){var blurEvent,parent=$(this);parent.data(\"ui-tooltip-open\")&&(blurEvent=$.Event(\"blur\"),blurEvent.target=blurEvent.currentTarget=this,that.close(blurEvent,!0)),parent.attr(\"title\")&&(parent.uniqueId(),that.parents[this.id]={element:this,title:parent.attr(\"title\")},parent.attr(\"title\",\"\"))}),this._registerCloseHandlers(event,target),this._updateContent(target,event))},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;if(\"string\"==typeof contentOption||contentOption.nodeType||contentOption.jquery)return this._open(event,target,contentOption);(content=contentOption.call(target[0],function(response){that._delay(function(){target.data(\"ui-tooltip-open\")&&(event&&(event.type=eventType),this._open(event,target,response))})}))&&this._open(event,target,content)},_open:function(event,target,content){function position(event){positionOption.of=event,tooltip.is(\":hidden\")||tooltip.position(positionOption)}var tooltipData,tooltip,delayedShow,a11yContent,positionOption=$.extend({},this.options.position);if(content){if(tooltipData=this._find(target))return void tooltipData.tooltip.find(\".ui-tooltip-content\").html(content);target.is(\"[title]\")&&(event&&\"mouseover\"===event.type?target.attr(\"title\",\"\"):target.removeAttr(\"title\")),tooltipData=this._tooltip(target),tooltip=tooltipData.tooltip,this._addDescribedBy(target,tooltip.attr(\"id\")),tooltip.find(\".ui-tooltip-content\").html(content),this.liveRegion.children().hide(),a11yContent=$(\"<div>\").html(tooltip.find(\".ui-tooltip-content\").html()),a11yContent.removeAttr(\"name\").find(\"[name]\").removeAttr(\"name\"),a11yContent.removeAttr(\"id\").find(\"[id]\").removeAttr(\"id\"),a11yContent.appendTo(this.liveRegion),this.options.track&&event&&/^mouse/.test(event.type)?(this._on(this.document,{mousemove:position}),position(event)):tooltip.position($.extend({of:target},this.options.position)),tooltip.hide(),this._show(tooltip,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(delayedShow=this.delayedShow=setInterval(function(){tooltip.is(\":visible\")&&(position(positionOption.of),clearInterval(delayedShow))},$.fx.interval)),this._trigger(\"open\",event,{tooltip:tooltip})}},_registerCloseHandlers:function(event,target){var events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0],this.close(fakeEvent,!0)}}};target[0]!==this.element[0]&&(events.remove=function(){this._removeTooltip(this._find(target).tooltip)}),event&&\"mouseover\"!==event.type||(events.mouseleave=\"close\"),event&&\"focusin\"!==event.type||(events.focusout=\"close\"),this._on(!0,target,events)},close:function(event){var tooltip,that=this,target=$(event?event.currentTarget:this.element),tooltipData=this._find(target);if(!tooltipData)return void target.removeData(\"ui-tooltip-open\");tooltip=tooltipData.tooltip,tooltipData.closing||(clearInterval(this.delayedShow),target.data(\"ui-tooltip-title\")&&!target.attr(\"title\")&&target.attr(\"title\",target.data(\"ui-tooltip-title\")),this._removeDescribedBy(target),tooltipData.hiding=!0,tooltip.stop(!0),this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this))}),target.removeData(\"ui-tooltip-open\"),this._off(target,\"mouseleave focusout keyup\"),target[0]!==this.element[0]&&this._off(target,\"remove\"),this._off(this.document,\"mousemove\"),event&&\"mouseleave\"===event.type&&$.each(this.parents,function(id,parent){$(parent.element).attr(\"title\",parent.title),delete that.parents[id]}),tooltipData.closing=!0,this._trigger(\"close\",event,{tooltip:tooltip}),tooltipData.hiding||(tooltipData.closing=!1))},_tooltip:function(element){var tooltip=$(\"<div>\").attr(\"role\",\"tooltip\"),content=$(\"<div>\").appendTo(tooltip),id=tooltip.uniqueId().attr(\"id\");return this._addClass(content,\"ui-tooltip-content\"),this._addClass(tooltip,\"ui-tooltip\",\"ui-widget ui-widget-content\"),tooltip.appendTo(this._appendTo(element)),this.tooltips[id]={element:element,tooltip:tooltip}},_find:function(target){var id=target.data(\"ui-tooltip-id\");return id?this.tooltips[id]:null},_removeTooltip:function(tooltip){tooltip.remove(),delete this.tooltips[tooltip.attr(\"id\")]},_appendTo:function(target){var element=target.closest(\".ui-front, dialog\");return element.length||(element=this.document[0].body),element},_destroy:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event(\"blur\"),element=tooltipData.element;event.target=event.currentTarget=element[0],that.close(event,!0),$(\"#\"+id).remove(),element.data(\"ui-tooltip-title\")&&(element.attr(\"title\")||element.attr(\"title\",element.data(\"ui-tooltip-title\")),element.removeData(\"ui-tooltip-title\"))}),this.liveRegion.remove()}}),!1!==$.uiBackCompat&&$.widget(\"ui.tooltip\",$.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var tooltipData=this._superApply(arguments);return this.options.tooltipClass&&tooltipData.tooltip.addClass(this.options.tooltipClass),tooltipData}});$.ui.tooltip});\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/pager',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'jquery-ui'\n], function($, utils, i18n) {\n    \"use strict\";\n\n    var Pager = function (pager_selector, options) {\n        /**\n         * Constructor\n         *\n         * Parameters:\n         *  pager_selector: string\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          events: $(Events) instance\n         */\n        this.events = options.events;\n        this.pager_element = $(pager_selector);\n        this.pager_button_area = $('#pager-button-area');\n        this._default_end_space = 100;\n        this.pager_element.resizable({handles: 'n', resize: $.proxy(this._resize, this)});\n        this.expanded = false;\n        this.create_button_area();\n        this.bind_events();\n    };\n\n    Pager.prototype.create_button_area = function(){\n        var that = this;\n        this.pager_button_area.append(\n            $('<a>').attr('role', \"button\")\n                    .attr('title',i18n.msg._(\"Open the pager in an external window\"))\n                    .addClass('ui-button')\n                    .click(function(){that.detach();})\n                    .append(\n                        $('<span>').addClass(\"ui-icon ui-icon-extlink\")\n                    )\n        );\n        this.pager_button_area.append(\n            $('<a>').attr('role', \"button\")\n                    .attr('title',i18n.msg._(\"Close the pager\"))\n                    .addClass('ui-button')\n                    .click(function(){that.collapse();})\n                    .append(\n                        $('<span>').addClass(\"ui-icon ui-icon-close\")\n                    )\n        );\n    };\n\n\n    Pager.prototype.bind_events = function () {\n        var that = this;\n\n        this.pager_element.bind('collapse_pager', function (event, extrap) {\n            // Animate hiding of the pager.\n            var time = (extrap && extrap.duration) ? extrap.duration : 'fast';\n            that.pager_element.animate({\n                height: 'toggle'\n            }, {\n                duration: time,\n                done: function() {\n                    $('.end_space').css('height', that._default_end_space);\n                }\n            });\n        });\n\n        this.pager_element.bind('expand_pager', function (event, extrap) {\n            // Clear the pager's height attr if it's set.  This allows the\n            // pager to size itself according to its contents.\n            that.pager_element.height('initial');\n\n            // Animate the showing of the pager\n            var time = (extrap && extrap.duration) ? extrap.duration : 'fast';\n            that.pager_element.show(time, function() {\n                // Explicitly set pager height once the pager has shown itself.\n                // This allows the pager-contents div to use percentage sizing.\n                that.pager_element.height(that.pager_element.height());\n                that._resize();\n                \n                // HACK: Less horrible, but still horrible hack to force the\n                // pager to show it's scrollbars on FireFox. ipython/ipython/#8853\n                that.pager_element.css('position', 'relative');\n                window.requestAnimationFrame(function() { /* Wait one frame */                    \n                    that.pager_element.css('position', '');\n                });\n            });\n        });\n\n        this.events.on('open_with_text.Pager', function (event, payload) {\n            // FIXME: support other mime types with generic mimebundle display\n            // mechanism\n            if (payload.data['text/html'] && payload.data['text/html'] !== \"\") {\n                that.clear();\n                that.expand();\n                that.append(payload.data['text/html']);\n            } else if (payload.data['text/plain'] && payload.data['text/plain'] !== \"\") {\n                that.clear();\n                that.expand();\n                that.append_text(payload.data['text/plain']);\n            }\n        });\n    };\n\n\n    Pager.prototype.collapse = function (extrap) {\n        if (this.expanded === true) {\n            this.expanded = false;\n            this.pager_element.trigger('collapse_pager', extrap);\n        }\n    };\n\n\n    Pager.prototype.expand = function (extrap) {\n        if (this.expanded !== true) {\n            this.expanded = true;\n            this.pager_element.trigger('expand_pager', extrap);\n        }\n    };\n\n\n    Pager.prototype.toggle = function () {\n        if (this.expanded === true) {\n            this.collapse();\n        } else {\n            this.expand();\n        }\n    };\n\n\n    Pager.prototype.clear = function (text) {\n        this.pager_element.find(\".container\").empty();\n    };\n\n    Pager.prototype.detach = function(){\n        var w = window.open(\"\",\"_blank\");\n        $(w.document.head)\n        .append(\n                $('<link>')\n                .attr('rel',\"stylesheet\")\n                .attr('href', utils.url_path_join(utils.get_body_data('baseUrl'), \"static/style/style.min.css\"))\n                .attr('type',\"text/css\")\n        )\n        .append(\n                $('<title>').text(i18n.msg._(\"Jupyter Pager\"))\n        );\n        var pager_body = $(w.document.body);\n        pager_body.css('overflow','scroll');\n\n        pager_body.append(this.pager_element.clone().children());\n        w.document.close();\n        this.collapse();\n    };\n\n    Pager.prototype.append_text = function (text) {\n        /**\n         * The only user content injected with this HTML call is escaped by\n         * the fixConsole() method.\n         */\n        this.pager_element.find(\".container\").append($('<pre/>').html(utils.fixConsole(utils.fixOverwrittenChars(text))));\n    };\n\n    Pager.prototype.append = function (htm) {\n        /**\n         * The only user content injected with this HTML call is escaped by\n         * the fixConsole() method.\n         */\n        this.pager_element.find(\".container\").append(htm);\n    };\n\n\n    Pager.prototype._resize = function() {\n        /**\n         * Update document based on pager size.\n         */\n        \n        // Make sure the padding at the end of the notebook is large\n        // enough that the user can scroll to the bottom of the \n        // notebook.\n        $('.end_space').css('height', Math.max(this.pager_element.height(), this._default_end_space));\n    };\n\n    return {'Pager': Pager};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Define promises for notebook events.\n\ndefine('notebook/js/promises',['base/js/events', 'base/js/promises'], function(events, promises) {\n    \"use strict\";\n\n    // Promise to be resolved when the notebook is *initially* loaded.\n    // The event may fire again if the notebook is reloaded later, but this\n    // promise only tracks the initial load.\n    promises.notebook_loaded = new Promise(function(resolve, reject) {\n        events.one('notebook_loaded.Notebook', function() {\n            resolve();\n        });\n        events.one('notebook_load_failed.Notebook', function() {\n            reject();\n        });\n    });\n\n    return promises;\n});\n\n",
    "(function(){var bind=function(fn,me){return function(){return fn.apply(me,arguments)}};(function(window,factory){if(typeof define===\"function\"&&define.amd){return define('bootstraptour',[\"jquery\"],function(jQuery){return window.Tour=factory(jQuery)})}else if(typeof exports===\"object\"){return module.exports=factory(require(\"jquery\"))}else{return window.Tour=factory(window.jQuery)}})(window,function($){var Tour,document;document=window.document;Tour=function(){function Tour(options){this._showPopoverAndOverlay=bind(this._showPopoverAndOverlay,this);var storage;try{storage=window.localStorage}catch(error){storage=false}this._options=$.extend({name:\"tour\",steps:[],container:\"body\",autoscroll:true,keyboard:true,storage:storage,debug:false,backdrop:false,backdropContainer:\"body\",backdropPadding:0,redirect:true,orphan:false,duration:false,delay:false,basePath:\"\",template:'<div class=\"popover\" role=\"tooltip\"> <div class=\"arrow\"></div> <h3 class=\"popover-title\"></h3> <div class=\"popover-content\"></div> <div class=\"popover-navigation\"> <div class=\"btn-group\"> <button class=\"btn btn-sm btn-default\" data-role=\"prev\">&laquo; Prev</button> <button class=\"btn btn-sm btn-default\" data-role=\"next\">Next &raquo;</button> <button class=\"btn btn-sm btn-default\" data-role=\"pause-resume\" data-pause-text=\"Pause\" data-resume-text=\"Resume\">Pause</button> </div> <button class=\"btn btn-sm btn-default\" data-role=\"end\">End tour</button> </div> </div>',afterSetState:function(key,value){},afterGetState:function(key,value){},afterRemoveState:function(key){},onStart:function(tour){},onEnd:function(tour){},onShow:function(tour){},onShown:function(tour){},onHide:function(tour){},onHidden:function(tour){},onNext:function(tour){},onPrev:function(tour){},onPause:function(tour,duration){},onResume:function(tour,duration){},onRedirectError:function(tour){}},options);this._force=false;this._inited=false;this._current=null;this.backdrops=[];this}Tour.prototype.addSteps=function(steps){var j,len,step;for(j=0,len=steps.length;j<len;j++){step=steps[j];this.addStep(step)}return this};Tour.prototype.addStep=function(step){this._options.steps.push(step);return this};Tour.prototype.getStep=function(i){if(this._options.steps[i]!=null){return $.extend({id:\"step-\"+i,path:\"\",host:\"\",placement:\"right\",title:\"\",content:\"<p></p>\",next:i===this._options.steps.length-1?-1:i+1,prev:i-1,animation:true,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[i].element,backdropElement:this._options.steps[i].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[i])}};Tour.prototype.init=function(force){this._force=force;if(this.ended()){this._debug(\"Tour ended, init prevented.\");return this}this.setCurrentStep();this._initMouseNavigation();this._initKeyboardNavigation();this._onResize(function(_this){return function(){return _this.showStep(_this._current)}}(this));this._onScroll(function(_this){return function(){return _this._showPopoverAndOverlay(_this._current)}}(this));if(this._current!==null){this.showStep(this._current)}this._inited=true;return this};Tour.prototype.start=function(force){var promise;if(force==null){force=false}if(!this._inited){this.init(force)}if(this._current===null){promise=this._makePromise(this._options.onStart!=null?this._options.onStart(this):void 0);this._callOnPromiseDone(promise,this.showStep,0)}return this};Tour.prototype.next=function(){var promise;promise=this.hideStep(this._current,this._current+1);return this._callOnPromiseDone(promise,this._showNextStep)};Tour.prototype.prev=function(){var promise;promise=this.hideStep(this._current,this._current-1);return this._callOnPromiseDone(promise,this._showPrevStep)};Tour.prototype.goTo=function(i){var promise;promise=this.hideStep(this._current,i);return this._callOnPromiseDone(promise,this.showStep,i)};Tour.prototype.end=function(){var endHelper,promise;endHelper=function(_this){return function(e){$(document).off(\"click.tour-\"+_this._options.name);$(document).off(\"keyup.tour-\"+_this._options.name);$(window).off(\"resize.tour-\"+_this._options.name);$(window).off(\"scroll.tour-\"+_this._options.name);_this._setState(\"end\",\"yes\");_this._inited=false;_this._force=false;_this._clearTimer();if(_this._options.onEnd!=null){return _this._options.onEnd(_this)}}}(this);promise=this.hideStep(this._current);return this._callOnPromiseDone(promise,endHelper)};Tour.prototype.ended=function(){return!this._force&&!!this._getState(\"end\")};Tour.prototype.restart=function(){this._removeState(\"current_step\");this._removeState(\"end\");this._removeState(\"redirect_to\");return this.start()};Tour.prototype.pause=function(){var step;step=this.getStep(this._current);if(!(step&&step.duration)){return this}this._paused=true;this._duration-=(new Date).getTime()-this._start;window.clearTimeout(this._timer);this._debug(\"Paused/Stopped step \"+(this._current+1)+\" timer (\"+this._duration+\" remaining).\");if(step.onPause!=null){return step.onPause(this,this._duration)}};Tour.prototype.resume=function(){var step;step=this.getStep(this._current);if(!(step&&step.duration)){return this}this._paused=false;this._start=(new Date).getTime();this._duration=this._duration||step.duration;this._timer=window.setTimeout(function(_this){return function(){if(_this._isLast()){return _this.next()}else{return _this.end()}}}(this),this._duration);this._debug(\"Started step \"+(this._current+1)+\" timer with duration \"+this._duration);if(step.onResume!=null&&this._duration!==step.duration){return step.onResume(this,this._duration)}};Tour.prototype.hideStep=function(i,iNext){var hideDelay,hideStepHelper,promise,step;step=this.getStep(i);if(!step){return}this._clearTimer();promise=this._makePromise(step.onHide!=null?step.onHide(this,i):void 0);hideStepHelper=function(_this){return function(e){var $element,next_step;$element=$(step.element);if(!($element.data(\"bs.popover\")||$element.data(\"popover\"))){$element=$(\"body\")}$element.popover(\"destroy\").removeClass(\"tour-\"+_this._options.name+\"-element tour-\"+_this._options.name+\"-\"+i+\"-element\").removeData(\"bs.popover\");if(step.reflex){$(step.reflexElement).removeClass(\"tour-step-element-reflex\").off(_this._reflexEvent(step.reflex)+\".tour-\"+_this._options.name)}if(step.backdrop){next_step=iNext!=null&&_this.getStep(iNext);if(!next_step||!next_step.backdrop||next_step.backdropElement!==step.backdropElement){_this._hideOverlayElement(step)}}if(step.onHidden!=null){return step.onHidden(_this)}}}(this);hideDelay=step.delay.hide||step.delay;if({}.toString.call(hideDelay)===\"[object Number]\"&&hideDelay>0){this._debug(\"Wait \"+hideDelay+\" milliseconds to hide the step \"+(this._current+1));window.setTimeout(function(_this){return function(){return _this._callOnPromiseDone(promise,hideStepHelper)}}(this),hideDelay)}else{this._callOnPromiseDone(promise,hideStepHelper)}return promise};Tour.prototype.showStep=function(i){var path,promise,showDelay,showStepHelper,skipToPrevious,step;if(this.ended()){this._debug(\"Tour ended, showStep prevented.\");return this}step=this.getStep(i);if(!step){return}skipToPrevious=i<this._current;promise=this._makePromise(step.onShow!=null?step.onShow(this,i):void 0);this.setCurrentStep(i);path=function(){switch({}.toString.call(step.path)){case\"[object Function]\":return step.path();case\"[object String]\":return this._options.basePath+step.path;default:return step.path}}.call(this);if(step.redirect&&this._isRedirect(step.host,path,document.location)){this._redirect(step,i,path);if(!this._isJustPathHashDifferent(step.host,path,document.location)){return}}showStepHelper=function(_this){return function(e){if(_this._isOrphan(step)){if(step.orphan===false){_this._debug(\"Skip the orphan step \"+(_this._current+1)+\".\\nOrphan option is false and the element does not exist or is hidden.\");if(skipToPrevious){_this._showPrevStep()}else{_this._showNextStep()}return}_this._debug(\"Show the orphan step \"+(_this._current+1)+\". Orphans option is true.\")}if(step.autoscroll){_this._scrollIntoView(i)}else{_this._showPopoverAndOverlay(i)}if(step.duration){return _this.resume()}}}(this);showDelay=step.delay.show||step.delay;if({}.toString.call(showDelay)===\"[object Number]\"&&showDelay>0){this._debug(\"Wait \"+showDelay+\" milliseconds to show the step \"+(this._current+1));window.setTimeout(function(_this){return function(){return _this._callOnPromiseDone(promise,showStepHelper)}}(this),showDelay)}else{this._callOnPromiseDone(promise,showStepHelper)}return promise};Tour.prototype.getCurrentStep=function(){return this._current};Tour.prototype.setCurrentStep=function(value){if(value!=null){this._current=value;this._setState(\"current_step\",value)}else{this._current=this._getState(\"current_step\");this._current=this._current===null?null:parseInt(this._current,10)}return this};Tour.prototype.redraw=function(){return this._showOverlayElement(this.getStep(this.getCurrentStep()))};Tour.prototype._setState=function(key,value){var e,keyName;if(this._options.storage){keyName=this._options.name+\"_\"+key;try{this._options.storage.setItem(keyName,value)}catch(error){e=error;if(e.code===DOMException.QUOTA_EXCEEDED_ERR){this._debug(\"LocalStorage quota exceeded. State storage failed.\")}}return this._options.afterSetState(keyName,value)}else{if(this._state==null){this._state={}}return this._state[key]=value}};Tour.prototype._removeState=function(key){var keyName;if(this._options.storage){keyName=this._options.name+\"_\"+key;this._options.storage.removeItem(keyName);return this._options.afterRemoveState(keyName)}else{if(this._state!=null){return delete this._state[key]}}};Tour.prototype._getState=function(key){var keyName,value;if(this._options.storage){keyName=this._options.name+\"_\"+key;value=this._options.storage.getItem(keyName)}else{if(this._state!=null){value=this._state[key]}}if(value===void 0||value===\"null\"){value=null}this._options.afterGetState(key,value);return value};Tour.prototype._showNextStep=function(){var promise,showNextStepHelper,step;step=this.getStep(this._current);showNextStepHelper=function(_this){return function(e){return _this.showStep(step.next)}}(this);promise=this._makePromise(step.onNext!=null?step.onNext(this):void 0);return this._callOnPromiseDone(promise,showNextStepHelper)};Tour.prototype._showPrevStep=function(){var promise,showPrevStepHelper,step;step=this.getStep(this._current);showPrevStepHelper=function(_this){return function(e){return _this.showStep(step.prev)}}(this);promise=this._makePromise(step.onPrev!=null?step.onPrev(this):void 0);return this._callOnPromiseDone(promise,showPrevStepHelper)};Tour.prototype._debug=function(text){if(this._options.debug){return window.console.log(\"Bootstrap Tour '\"+this._options.name+\"' | \"+text)}};Tour.prototype._isRedirect=function(host,path,location){var currentPath;if(host!=null&&host!==\"\"&&({}.toString.call(host)===\"[object RegExp]\"&&!host.test(location.origin)||{}.toString.call(host)===\"[object String]\"&&this._isHostDifferent(host,location))){return true}currentPath=[location.pathname,location.search,location.hash].join(\"\");return path!=null&&path!==\"\"&&({}.toString.call(path)===\"[object RegExp]\"&&!path.test(currentPath)||{}.toString.call(path)===\"[object String]\"&&this._isPathDifferent(path,currentPath))};Tour.prototype._isHostDifferent=function(host,location){switch({}.toString.call(host)){case\"[object RegExp]\":return!host.test(location.origin);case\"[object String]\":return this._getProtocol(host)!==this._getProtocol(location.href)||this._getHost(host)!==this._getHost(location.href);default:return true}};Tour.prototype._isPathDifferent=function(path,currentPath){return this._getPath(path)!==this._getPath(currentPath)||!this._equal(this._getQuery(path),this._getQuery(currentPath))||!this._equal(this._getHash(path),this._getHash(currentPath))};Tour.prototype._isJustPathHashDifferent=function(host,path,location){var currentPath;if(host!=null&&host!==\"\"){if(this._isHostDifferent(host,location)){return false}}currentPath=[location.pathname,location.search,location.hash].join(\"\");if({}.toString.call(path)===\"[object String]\"){return this._getPath(path)===this._getPath(currentPath)&&this._equal(this._getQuery(path),this._getQuery(currentPath))&&!this._equal(this._getHash(path),this._getHash(currentPath))}return false};Tour.prototype._redirect=function(step,i,path){var href;if($.isFunction(step.redirect)){return step.redirect.call(this,path)}else{href={}.toString.call(step.host)===\"[object String]\"?\"\"+step.host+path:path;this._debug(\"Redirect to \"+href);if(this._getState(\"redirect_to\")===\"\"+i){this._debug(\"Error redirection loop to \"+path);this._removeState(\"redirect_to\");if(step.onRedirectError!=null){return step.onRedirectError(this)}}else{this._setState(\"redirect_to\",\"\"+i);return document.location.href=href}}};Tour.prototype._isOrphan=function(step){return step.element==null||!$(step.element).length||$(step.element).is(\":hidden\")&&$(step.element)[0].namespaceURI!==\"http://www.w3.org/2000/svg\"};Tour.prototype._isLast=function(){return this._current<this._options.steps.length-1};Tour.prototype._showPopoverAndOverlay=function(i){var step;if(this.getCurrentStep()!==i||this.ended()){return}step=this.getStep(i);if(step.backdrop){this._showOverlayElement(step)}this._showPopover(step,i);if(step.onShown!=null){step.onShown(this)}return this._debug(\"Step \"+(this._current+1)+\" of \"+this._options.steps.length)};Tour.prototype._showPopover=function(step,i){var $element,$tip,isOrphan,options,shouldAddSmart;$(\".tour-\"+this._options.name).remove();options=$.extend({},this._options);isOrphan=this._isOrphan(step);step.template=this._template(step,i);if(isOrphan){step.element=\"body\";step.placement=\"top\"}$element=$(step.element);$element.addClass(\"tour-\"+this._options.name+\"-element tour-\"+this._options.name+\"-\"+i+\"-element\");if(step.options){$.extend(options,step.options)}if(step.reflex&&!isOrphan){$(step.reflexElement).addClass(\"tour-step-element-reflex\").off(this._reflexEvent(step.reflex)+\".tour-\"+this._options.name).on(this._reflexEvent(step.reflex)+\".tour-\"+this._options.name,function(_this){return function(){if(_this._isLast()){return _this.next()}else{return _this.end()}}}(this))}shouldAddSmart=step.smartPlacement===true&&step.placement.search(/auto/i)===-1;$element.popover({placement:shouldAddSmart?\"auto \"+step.placement:step.placement,trigger:\"manual\",title:step.title,content:step.content,html:true,animation:step.animation,container:step.container,template:step.template,selector:step.element}).popover(\"show\");$tip=$element.data(\"bs.popover\")?$element.data(\"bs.popover\").tip():$element.data(\"popover\").tip();$tip.attr(\"id\",step.id);if($element.css(\"position\")===\"fixed\"){$tip.css(\"position\",\"fixed\")}this._reposition($tip,step);if(isOrphan){return this._center($tip)}};Tour.prototype._template=function(step,i){var $navigation,$next,$prev,$resume,$template,template;template=step.template;if(this._isOrphan(step)&&{}.toString.call(step.orphan)!==\"[object Boolean]\"){template=step.orphan}$template=$.isFunction(template)?$(template(i,step)):$(template);$navigation=$template.find(\".popover-navigation\");$prev=$navigation.find('[data-role=\"prev\"]');$next=$navigation.find('[data-role=\"next\"]');$resume=$navigation.find('[data-role=\"pause-resume\"]');if(this._isOrphan(step)){$template.addClass(\"orphan\")}$template.addClass(\"tour-\"+this._options.name+\" tour-\"+this._options.name+\"-\"+i);if(step.reflex){$template.addClass(\"tour-\"+this._options.name+\"-reflex\")}if(step.prev<0){$prev.addClass(\"disabled\").prop(\"disabled\",true).prop(\"tabindex\",-1)}if(step.next<0){$next.addClass(\"disabled\").prop(\"disabled\",true).prop(\"tabindex\",-1)}if(!step.duration){$resume.remove()}return $template.clone().wrap(\"<div>\").parent().html()};Tour.prototype._reflexEvent=function(reflex){if({}.toString.call(reflex)===\"[object Boolean]\"){return\"click\"}else{return reflex}};Tour.prototype._reposition=function($tip,step){var offsetBottom,offsetHeight,offsetRight,offsetWidth,originalLeft,originalTop,tipOffset;offsetWidth=$tip[0].offsetWidth;offsetHeight=$tip[0].offsetHeight;tipOffset=$tip.offset();originalLeft=tipOffset.left;originalTop=tipOffset.top;offsetBottom=$(document).outerHeight()-tipOffset.top-$tip.outerHeight();if(offsetBottom<0){tipOffset.top=tipOffset.top+offsetBottom}offsetRight=$(\"html\").outerWidth()-tipOffset.left-$tip.outerWidth();if(offsetRight<0){tipOffset.left=tipOffset.left+offsetRight}if(tipOffset.top<0){tipOffset.top=0}if(tipOffset.left<0){tipOffset.left=0}$tip.offset(tipOffset);if(step.placement===\"bottom\"||step.placement===\"top\"){if(originalLeft!==tipOffset.left){return this._replaceArrow($tip,(tipOffset.left-originalLeft)*2,offsetWidth,\"left\")}}else{if(originalTop!==tipOffset.top){return this._replaceArrow($tip,(tipOffset.top-originalTop)*2,offsetHeight,\"top\")}}};Tour.prototype._center=function($tip){return $tip.css(\"top\",$(window).outerHeight()/2-$tip.outerHeight()/2)};Tour.prototype._replaceArrow=function($tip,delta,dimension,position){return $tip.find(\".arrow\").css(position,delta?50*(1-delta/dimension)+\"%\":\"\")};Tour.prototype._scrollIntoView=function(i){var $element,$window,counter,height,offsetTop,scrollTop,step,windowHeight;step=this.getStep(i);$element=$(step.element);if(!$element.length){return this._showPopoverAndOverlay(i)}$window=$(window);offsetTop=$element.offset().top;height=$element.outerHeight();windowHeight=$window.height();scrollTop=0;switch(step.placement){case\"top\":scrollTop=Math.max(0,offsetTop-windowHeight/2);break;case\"left\":case\"right\":scrollTop=Math.max(0,offsetTop+height/2-windowHeight/2);break;case\"bottom\":scrollTop=Math.max(0,offsetTop+height-windowHeight/2)}this._debug(\"Scroll into view. ScrollTop: \"+scrollTop+\". Element offset: \"+offsetTop+\". Window height: \"+windowHeight+\".\");counter=0;return $(\"body, html\").stop(true,true).animate({scrollTop:Math.ceil(scrollTop)},function(_this){return function(){if(++counter===2){_this._showPopoverAndOverlay(i);return _this._debug(\"Scroll into view.\\nAnimation end element offset: \"+$element.offset().top+\".\\nWindow height: \"+$window.height()+\".\")}}}(this))};Tour.prototype._onResize=function(callback,timeout){return $(window).on(\"resize.tour-\"+this._options.name,function(){clearTimeout(timeout);return timeout=setTimeout(callback,100)})};Tour.prototype._onScroll=function(callback,timeout){return $(window).on(\"scroll.tour-\"+this._options.name,function(){clearTimeout(timeout);return timeout=setTimeout(callback,100)})};Tour.prototype._initMouseNavigation=function(){var _this;_this=this;return $(document).off(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='prev']\").off(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='next']\").off(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='end']\").off(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='pause-resume']\").on(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='next']\",function(_this){return function(e){e.preventDefault();return _this.next()}}(this)).on(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='prev']\",function(_this){return function(e){e.preventDefault();if(_this._current>0){return _this.prev()}}}(this)).on(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='end']\",function(_this){return function(e){e.preventDefault();return _this.end()}}(this)).on(\"click.tour-\"+this._options.name,\".popover.tour-\"+this._options.name+\" *[data-role='pause-resume']\",function(e){var $this;e.preventDefault();$this=$(this);$this.text(_this._paused?$this.data(\"pause-text\"):$this.data(\"resume-text\"));if(_this._paused){return _this.resume()}else{return _this.pause()}})};Tour.prototype._initKeyboardNavigation=function(){if(!this._options.keyboard){return}return $(document).on(\"keyup.tour-\"+this._options.name,function(_this){return function(e){if(!e.which){return}switch(e.which){case 39:e.preventDefault();if(_this._isLast()){return _this.next()}else{return _this.end()}break;case 37:e.preventDefault();if(_this._current>0){return _this.prev()}}}}(this))};Tour.prototype._makePromise=function(result){if(result&&$.isFunction(result.then)){return result}else{return null}};Tour.prototype._callOnPromiseDone=function(promise,cb,arg){if(promise){return promise.then(function(_this){return function(e){return cb.call(_this,arg)}}(this))}else{return cb.call(this,arg)}};Tour.prototype._showBackground=function(step,data){var $backdrop,base,height,j,len,pos,ref,results,width;height=$(document).height();width=$(document).width();ref=[\"top\",\"bottom\",\"left\",\"right\"];results=[];for(j=0,len=ref.length;j<len;j++){pos=ref[j];$backdrop=(base=this.backdrops)[pos]!=null?base[pos]:base[pos]=$(\"<div>\",{class:\"tour-backdrop \"+pos});$(step.backdropContainer).append($backdrop);switch(pos){case\"top\":results.push($backdrop.height(data.offset.top>0?data.offset.top:0).width(width).offset({top:0,left:0}));break;case\"bottom\":results.push($backdrop.offset({top:data.offset.top+data.height,left:0}).height(height-(data.offset.top+data.height)).width(width));break;case\"left\":results.push($backdrop.offset({top:data.offset.top,left:0}).height(data.height).width(data.offset.left>0?data.offset.left:0));break;case\"right\":results.push($backdrop.offset({top:data.offset.top,left:data.offset.left+data.width}).height(data.height).width(width-(data.offset.left+data.width)));break;default:results.push(void 0)}}return results};Tour.prototype._showOverlayElement=function(step){var $backdropElement,elementData;$backdropElement=$(step.backdropElement);if($backdropElement.length===0){elementData={width:0,height:0,offset:{top:0,left:0}}}else{elementData={width:$backdropElement.innerWidth(),height:$backdropElement.innerHeight(),offset:$backdropElement.offset()};$backdropElement.addClass(\"tour-step-backdrop\");if(step.backdropPadding){elementData=this._applyBackdropPadding(step.backdropPadding,elementData)}}return this._showBackground(step,elementData)};Tour.prototype._hideOverlayElement=function(step){var $backdrop,pos,ref;$(step.backdropElement).removeClass(\"tour-step-backdrop\");ref=this.backdrops;for(pos in ref){$backdrop=ref[pos];if($backdrop&&$backdrop.remove!==void 0){$backdrop.remove()}}return this.backdrops=[]};Tour.prototype._applyBackdropPadding=function(padding,data){if(typeof padding===\"object\"){if(padding.top==null){padding.top=0}if(padding.right==null){padding.right=0}if(padding.bottom==null){padding.bottom=0}if(padding.left==null){padding.left=0}data.offset.top=data.offset.top-padding.top;data.offset.left=data.offset.left-padding.left;data.width=data.width+padding.left+padding.right;data.height=data.height+padding.top+padding.bottom}else{data.offset.top=data.offset.top-padding;data.offset.left=data.offset.left-padding;data.width=data.width+padding*2;data.height=data.height+padding*2}return data};Tour.prototype._clearTimer=function(){window.clearTimeout(this._timer);this._timer=null;return this._duration=null};Tour.prototype._getProtocol=function(url){url=url.split(\"://\");if(url.length>1){return url[0]}else{return\"http\"}};Tour.prototype._getHost=function(url){url=url.split(\"//\");url=url.length>1?url[1]:url[0];return url.split(\"/\")[0]};Tour.prototype._getPath=function(path){return path.replace(/\\/?$/,\"\").split(\"?\")[0].split(\"#\")[0]};Tour.prototype._getQuery=function(path){return this._getParams(path,\"?\")};Tour.prototype._getHash=function(path){return this._getParams(path,\"#\")};Tour.prototype._getParams=function(path,start){var j,len,param,params,paramsObject;params=path.split(start);if(params.length===1){return{}}params=params[1].split(\"&\");paramsObject={};for(j=0,len=params.length;j<len;j++){param=params[j];param=param.split(\"=\");paramsObject[param[0]]=param[1]||\"\"}return paramsObject};Tour.prototype._equal=function(obj1,obj2){var j,k,len,obj1Keys,obj2Keys,v;if({}.toString.call(obj1)===\"[object Object]\"&&{}.toString.call(obj2)===\"[object Object]\"){obj1Keys=Object.keys(obj1);obj2Keys=Object.keys(obj2);if(obj1Keys.length!==obj2Keys.length){return false}for(k in obj1){v=obj1[k];if(!this._equal(obj2[k],v)){return false}}return true}else if({}.toString.call(obj1)===\"[object Array]\"&&{}.toString.call(obj2)===\"[object Array]\"){if(obj1.length!==obj2.length){return false}for(k=j=0,len=obj1.length;j<len;k=++j){v=obj1[k];if(!this._equal(v,obj2[k])){return false}}return true}else{return obj1===obj2}};return Tour}();return Tour})}).call(this);\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/tour',['jquery', 'bootstraptour', 'base/js/i18n'], function($, Tour, i18n) {\n    \"use strict\";\n\n    var tour_style = \"<div class='popover tour'>\\n\" +\n        \"<div class='arrow'></div>\\n\" +\n        \"<div style='position:absolute; top:7px; right:7px'>\\n\" +\n            \"<button class='btn btn-default btn-sm fa fa-times' data-role='end'></button>\\n\" +\n        \"</div><h3 class='popover-title'></h3>\\n\" +\n        \"<div class='popover-content'></div>\\n\" +\n        \"<div class='popover-navigation'>\\n\" +\n            \"<button class='btn btn-default fa fa-step-backward' data-role='prev'></button>\\n\" +\n            \"<button class='btn btn-default fa fa-step-forward pull-right' data-role='next'></button>\\n\" +\n            \"<button id='tour-pause' class='btn btn-sm btn-default fa fa-pause' data-resume-text='' data-pause-text='' data-role='pause-resume'></button>\\n\" +\n        \"</div>\\n\" +\n    \"</div>\";\n\n    var NotebookTour = function (notebook, events) {\n        var that = this;\n        this.notebook = notebook;\n        this.step_duration = 0;\n        this.events = events;\n        this.tour_steps = [\n            { \n                title: i18n.msg._(\"Welcome to the Notebook Tour\"),\n                placement: 'bottom',\n                orphan: true,\n                content: i18n.msg._(\"You can use the left and right arrow keys to go backwards and forwards.\")\n            }, {\n                element: \"#notebook_name\",\n                title: i18n.msg._(\"Filename\"),\n                placement: 'bottom',\n                content: i18n.msg._(\"Click here to change the filename for this notebook.\")\n            }, {\n                element: $(\"#menus\").parent(),\n                placement: 'bottom',\n                title: i18n.msg._(\"Notebook Menubar\"),\n                content: i18n.msg._(\"The menubar has menus for actions on the notebook, its cells, and the kernel it communicates with.\")\n            }, {\n                element: \"#maintoolbar\",\n                placement: 'bottom',\n                title: i18n.msg._(\"Notebook Toolbar\"),\n                content: i18n.msg._(\"The toolbar has buttons for the most common actions. Hover your mouse over each button for more information.\")\n            }, {\n                element: \"#modal_indicator\",\n                title: i18n.msg._(\"Mode Indicator\"),\n                placement: 'bottom',\n                content: i18n.msg._(\"The Notebook has two modes: Edit Mode and Command Mode. In this area, an indicator can appear to tell you which mode you are in.\"),\n                onShow: function(tour) { that.command_icon_hack(); }\n            }, {\n                element: \"#modal_indicator\",\n                title: i18n.msg._(\"Command Mode\"),\n                placement: 'bottom',\n                onShow: function(tour) { notebook.command_mode(); that.command_icon_hack(); },\n                onNext: function(tour) { that.edit_mode(); },\n                content: i18n.msg._(\"Right now you are in Command Mode, and many keyboard shortcuts are available. In this mode, no icon is displayed in the indicator area.\")\n            }, {\n                element: \"#modal_indicator\",\n                title: i18n.msg._(\"Edit Mode\"),\n                placement: 'bottom',\n                onShow: function(tour) { that.edit_mode(); },\n                content: i18n.msg._(\"Pressing <code>Enter</code> or clicking in the input text area of the cell switches to Edit Mode.\")\n            }, {\n                element: '.selected',\n                title: i18n.msg._(\"Edit Mode\"),\n                placement: 'bottom',\n                onShow: function(tour) { that.edit_mode(); },\n                content: i18n.msg._(\"Notice that the border around the currently active cell changed color. Typing will insert text into the currently active cell.\")\n            }, {\n                element: '.selected',\n                title: i18n.msg._(\"Back to Command Mode\"),\n                placement: 'bottom',\n                onShow: function(tour) { notebook.command_mode(); },\n                content: i18n.msg._(\"Pressing <code>Esc</code> or clicking outside of the input text area takes you back to Command Mode.\")\n            }, {\n                element: '#keyboard_shortcuts',\n                title: i18n.msg._(\"Keyboard Shortcuts\"),\n                placement: 'bottom',\n                onShow: function(tour) {\n                    /** need to add `open` and `pulse` classes in 2 calls */\n                    $('#help_menu').parent().addClass('open');\n                    $('#help_menu').parent().addClass('pulse');\n                    $('#keyboard_shortcuts').addClass('pulse');\n                  },\n                onHide: function(tour) { \n                    $('#help_menu').parent().removeClass('open pulse');\n                    $('#keyboard_shortcuts').removeClass('pulse');\n                  },\n                content: i18n.msg._(\"You can click here to get a list of all of the keyboard shortcuts.\")\n            }, {\n                element: \"#kernel_indicator_icon\",\n                title: i18n.msg._(\"Kernel Indicator\"),\n                placement: 'bottom',\n                onShow: function(tour) { events.trigger('kernel_idle.Kernel');},\n                content: i18n.msg._(\"This is the Kernel indicator. It looks like this when the Kernel is idle.\")\n            }, {\n                element: \"#kernel_indicator_icon\",\n                title: i18n.msg._(\"Kernel Indicator\"),\n                placement: 'bottom',\n                onShow: function(tour) { events.trigger('kernel_busy.Kernel'); },\n                content: i18n.msg._(\"The Kernel indicator looks like this when the Kernel is busy.\")\n            }, {\n                element: \".fa-stop\",\n                placement: 'bottom',\n                title: i18n.msg._(\"Interrupting the Kernel\"),\n                onHide: function(tour) { events.trigger('kernel_idle.Kernel'); },\n                content: i18n.msg._(\"To cancel a computation in progress, you can click here.\")\n            }, {\n                element: \"#notification_kernel\",\n                placement: 'bottom',\n                onShow: function(tour) { $('.fa-stop').click(); },\n                title: i18n.msg._(\"Notification Area\"),\n                content: i18n.msg._(\"Messages in response to user actions (Save, Interrupt, etc.) appear here.\")\n            }, {\n                title: i18n.msg._(\"End of Tour\"),\n                placement: 'bottom',\n                orphan: true,\n                content: i18n.msg._(\"This concludes the Jupyter Notebook User Interface Tour.\")\n            }\n        ];\n\n        this.tour = new Tour({\n            storage: false, // start tour from beginning every time\n            debug: true,\n            reflex: true, // click on element to continue tour\n            animation: false,\n            duration: this.step_duration,\n            onStart: function() { console.log('tour started'); },\n            // TODO: remove the onPause/onResume logic once pi's patch has been\n            // merged upstream to make this work via data-resume-class and \n            // data-resume-text attributes.\n            onPause: this.toggle_pause_play,\n            onResume: this.toggle_pause_play,\n            steps: this.tour_steps,\n            template: tour_style,\n            orphan: true\n        });\n        \n    };\n\n    NotebookTour.prototype.start = function () {\n        console.log(\"let's start the tour\");\n        this.tour.init();\n        this.tour.start();\n        if (this.tour.ended())\n        {\n            this.tour.restart();\n        }\n    };\n\n    NotebookTour.prototype.command_icon_hack =  function() {\n        $('#modal_indicator').css('min-height', '18px');\n    };\n    \n    NotebookTour.prototype.toggle_pause_play = function () { \n        $('#tour-pause').toggleClass('fa-pause fa-play'); \n    };\n    \n    NotebookTour.prototype.edit_mode = function() { \n        this.notebook.focus_cell(); \n        this.notebook.edit_mode();\n    };\n\n    return {'Tour': NotebookTour};\n\n});\n\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/menubar',[\n    'jquery',\n    'base/js/namespace',\n    'base/js/dialog',\n    'base/js/utils',\n    'base/js/i18n',\n    './celltoolbar',\n    './tour',\n    'moment',\n], function($, IPython, dialog, utils, i18n, celltoolbar, tour, moment) {\n    \"use strict\";\n\n    var MenuBar = function (selector, options) {\n        /**\n         * Constructor\n         *\n         * A MenuBar Class to generate the menubar of Jupyter notebook\n         *\n         * Parameters:\n         *  selector: string\n         *  options: dictionary\n         *      Dictionary of keyword arguments.\n         *          notebook: Notebook instance\n         *          contents: ContentManager instance\n         *          events: $(Events) instance\n         *          save_widget: SaveWidget instance\n         *          quick_help: QuickHelp instance\n         *          base_url : string\n         *          notebook_path : string\n         *          notebook_name : string\n         *          config: ConfigSection instance\n         */\n        options = options || {};\n        this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n        this.selector = selector;\n        this.notebook = options.notebook;\n        this.actions = this.notebook.keyboard_manager.actions;\n        this.contents = options.contents;\n        this.events = options.events;\n        this.save_widget = options.save_widget;\n        this.quick_help = options.quick_help;\n        this.actions = options.actions;\n        this.config = options.config;\n\n        try {\n            this.tour = new tour.Tour(this.notebook, this.events);\n        } catch (e) {\n            this.tour = undefined;\n            console.log(\"Failed to instantiate Notebook Tour\", e);\n        }\n\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.style();\n            this.add_bundler_items();\n            this.bind_events();\n        }\n    };\n\n    // TODO: This has definitively nothing to do with style ...\n    MenuBar.prototype.style = function () {\n        var that = this;\n        this.element.find(\"li\").click(function (event, ui) {\n                // The selected cell loses focus when the menu is entered, so we\n                // re-select it upon selection.\n                var i = that.notebook.get_selected_index();\n                that.notebook.select(i, false);\n            }\n        );\n    };\n    \n    MenuBar.prototype.add_bundler_items = function() {\n        var that = this;\n        this.config.loaded.then(function() {\n            var bundlers = that.config.data.bundlerextensions;\n            if(bundlers) {\n                // Stable sort the keys to ensure menu items don't hop around\n                var ids = Object.keys(bundlers).sort()\n                ids.forEach(function(bundler_id) {\n                    var bundler = bundlers[bundler_id];\n                    var group = that.element.find('#'+bundler.group+'_menu')\n                    \n                    // Validate menu item metadata\n                    if(!group.length) {\n                        console.warn('unknown group', bundler.group, 'for bundler ID', bundler_id, '; skipping');\n                        return;\n                    } else if(!bundler.label) {\n                        console.warn('no label for bundler ID', bundler_id, '; skipping');\n                        return;\n                    }\n                    \n                    // Insert menu item into correct group, click handler\n                    group.parent().removeClass('hidden');\n                    var $li = $('<li>')\n                        .appendTo(group);\n                    $('<a>')\n                        .attr('href', '#')\n                        .text(bundler.label)\n                        .appendTo($li)\n                        .on('click', that._bundle.bind(that, bundler_id))\n                        .appendTo($li);\n                });\n            }\n        });\n    };\n\n    MenuBar.prototype._new_window = function(url) {\n        var w = window.open('', IPython._target);\n        if (this.notebook.dirty && this.notebook.writable) {\n            this.notebook.save_notebook().then(function() {\n                w.location = url;\n            });\n        } else {\n            w.location = url;\n        }\n    };\n    \n    MenuBar.prototype._bundle = function(bundler_id) {\n        // Read notebook path and base url here in case they change\n        var notebook_path = utils.encode_uri_components(this.notebook.notebook_path);\n        var url = utils.url_path_join(\n            this.base_url,\n            'bundle',\n            notebook_path\n        ) + '?bundler=' + utils.encode_uri_components(bundler_id);\n\n        this._new_window(url);\n    };\n\n    MenuBar.prototype._nbconvert = function (format, download) {\n        download = download || false;\n        var notebook_path = utils.encode_uri_components(this.notebook.notebook_path);\n        var url = utils.url_path_join(\n            this.base_url,\n            'nbconvert',\n            format,\n            notebook_path\n        ) + \"?download=\" + download.toString();\n        \n        this._new_window(url);\n    };\n\n    MenuBar.prototype._size_header = function() {\n        /** \n         * Update header spacer size.\n         */\n        console.warn('`_size_header` is deprecated and will be removed in future versions.'+\n                     ' Please trigger the `resize-header.Page` manually if you rely on it.');\n        this.events.trigger('resize-header.Page');\n    };\n\n    MenuBar.prototype.bind_events = function () {\n        /**\n         *  File\n         */\n        var that = this;\n        \n        this.element.find('#open_notebook').click(function () {\n            var parent = utils.url_path_split(that.notebook.notebook_path)[0];\n            window.open(\n                utils.url_path_join(\n                    that.base_url, 'tree',\n                    utils.encode_uri_components(parent)\n                ), IPython._target);\n        });\n        this.element.find('#copy_notebook').click(function () {\n            that.notebook.copy_notebook();\n            return false;\n        });\n        this.element.find('#download_ipynb').click(function () {\n            var base_url = that.notebook.base_url;\n            var notebook_path = utils.encode_uri_components(that.notebook.notebook_path);\n            var url = utils.url_path_join(\n                base_url, 'files', notebook_path\n            ) + '?download=1';\n            if (that.notebook.dirty && that.notebook.writable) {\n                that.notebook.save_notebook().then(function() {\n                    that._new_window(url);\n                });\n            } else {\n                that._new_window(url);\n            }\n        });\n        \n        this.element.find('#print_preview').click(function () {\n            that._nbconvert('html', false);\n        });\n\n        this.element.find('#download_html').click(function () {\n            that._nbconvert('html', true);\n        });\n\n        this.element.find('#download_markdown').click(function () {\n            that._nbconvert('markdown', true);\n        });\n\n        this.element.find('#download_rst').click(function () {\n            that._nbconvert('rst', true);\n        });\n\n        this.element.find('#download_pdf').click(function () {\n            that._nbconvert('pdf', true);\n        });\n        \n        this.element.find('#download_latex').click(function () {\n            that._nbconvert('latex', true);\n        });\n\n        this.element.find('#download_script').click(function () {\n            that._nbconvert('script', true);\n        });\n\n        this.events.on('trust_changed.Notebook', function (event, trusted) {\n            if (trusted) {\n                that.element.find('#trust_notebook')\n                    .addClass(\"disabled\").off('click')\n                    .find(\"a\").text(i18n.msg._(\"Trusted Notebook\"));\n            } else {\n                that.element.find('#trust_notebook')\n                    .removeClass(\"disabled\").on('click', function () {\n                        that.notebook.trust_notebook();\n                    })\n                    .find(\"a\").text(i18n.msg._(\"Trust Notebook\"));\n            }\n        });\n\n        this.element.find('#kill_and_exit').click(function () {\n            var close_window = function () {\n                /**\n                 * allow closing of new tabs in Chromium, impossible in FF\n                 */\n                window.open('', '_self', '');\n                window.close();\n            };\n            // finish with close on success or failure\n            that.notebook.session.delete(close_window, close_window);\n        });\n\n        // View\n        this._add_celltoolbar_list();\n\n        // Edit\n        this.element.find('#edit_nb_metadata').click(function () {\n            that.notebook.edit_metadata({\n                notebook: that.notebook,\n                keyboard_manager: that.notebook.keyboard_manager});\n        });\n             \n        var id_actions_dict = {\n            '#trust_notebook' : 'trust-notebook',\n            '#rename_notebook' : 'rename-notebook',\n            '#find_and_replace' : 'find-and-replace',\n            '#save_checkpoint': 'save-notebook',\n            '#shutdown_kernel': 'confirm-shutdown-kernel',\n            '#restart_kernel': 'confirm-restart-kernel',\n            '#restart_clear_output': 'confirm-restart-kernel-and-clear-output',\n            '#restart_run_all': 'confirm-restart-kernel-and-run-all-cells',\n            '#int_kernel': 'interrupt-kernel',\n            '#cut_cell': 'cut-cell',\n            '#copy_cell': 'copy-cell',\n            '#delete_cell': 'delete-cell',\n            '#undelete_cell': 'undo-cell-deletion',\n            '#split_cell': 'split-cell-at-cursor',\n            '#merge_cell_above': 'merge-cell-with-previous-cell',\n            '#merge_cell_below': 'merge-cell-with-next-cell',\n            '#move_cell_up': 'move-cell-up',\n            '#move_cell_down': 'move-cell-down',\n            '#toggle_header': 'toggle-header',\n            '#toggle_toolbar': 'toggle-toolbar',\n            '#toggle_line_numbers': 'toggle-all-line-numbers',\n            '#insert_cell_above': 'insert-cell-above',\n            '#insert_cell_below': 'insert-cell-below',\n            '#run_cell': 'run-cell',\n            '#run_cell_select_below': 'run-cell-and-select-next',\n            '#run_cell_insert_below': 'run-cell-and-insert-below',\n            '#run_all_cells': 'run-all-cells',\n            '#run_all_cells_above': 'run-all-cells-above',\n            '#run_all_cells_below': 'run-all-cells-below',\n            '#to_code': 'change-cell-to-code',\n            '#to_markdown': 'change-cell-to-markdown',\n            '#to_raw': 'change-cell-to-raw',\n            '#toggle_current_output': 'toggle-cell-output-collapsed',\n            '#toggle_current_output_scroll': 'toggle-cell-output-scrolled',\n            '#clear_current_output': 'clear-cell-output',\n            '#toggle_all_output': 'toggle-all-cells-output-collapsed',\n            '#toggle_all_output_scroll': 'toggle-all-cells-output-scrolled',\n            '#clear_all_output': 'clear-all-cells-output',\n            '#cut_cell_attachments': 'cut-cell-attachments',\n            '#copy_cell_attachments': 'copy-cell-attachments',\n            '#paste_cell_attachments': 'paste-cell-attachments',\n            '#insert_image': 'insert-image',\n            '#edit_keyboard_shortcuts' : 'edit-command-mode-keyboard-shortcuts',\n        };\n\n        for(var idx in id_actions_dict){\n            if (!id_actions_dict.hasOwnProperty(idx)){\n                continue;\n            }\n            var id_act = 'jupyter-notebook:'+id_actions_dict[idx];\n            if(!that.actions.exists(id_act)){\n                console.warn('actions', id_act, 'does not exist, still binding it in case it will be defined later...');\n            }\n            // Immediately-Invoked Function Expression cause JS.\n            (function(that, id_act, idx){\n                that.element.find(idx).click(function(event){\n                    that.actions.call(id_act, event);\n                });\n            })(that, id_act, idx);\n        }\n\n        \n        // Kernel\n        this.element.find('#reconnect_kernel').click(function () {\n            that.notebook.kernel.reconnect();\n        });\n        // Help\n        if (this.tour) {\n            this.element.find('#notebook_tour').click(function () {\n                that.tour.start();\n            });\n        } else {\n            this.element.find('#notebook_tour').addClass(\"disabled\");\n        }\n        this.element.find('#keyboard_shortcuts').click(function () {\n            that.quick_help.show_keyboard_shortcuts();\n        });\n        \n        this.update_restore_checkpoint(null);\n        \n        this.events.on('checkpoints_listed.Notebook', function (event, data) {\n            that.update_restore_checkpoint(that.notebook.checkpoints);\n        });\n        \n        this.events.on('checkpoint_created.Notebook', function (event, data) {\n            that.update_restore_checkpoint(that.notebook.checkpoints);\n        });\n        \n        this.events.on('notebook_loaded.Notebook', function() {\n            var langinfo = that.notebook.metadata.language_info || {};\n            that.update_nbconvert_script(langinfo);\n        });\n        \n        this.events.on('kernel_ready.Kernel', function(event, data) {\n            var langinfo = data.kernel.info_reply.language_info || {};\n            that.update_nbconvert_script(langinfo);\n            that.add_kernel_help_links(data.kernel.info_reply.help_links || []);\n        });\n    };\n    \n    MenuBar.prototype._add_celltoolbar_list = function () {\n        var that = this;\n        var submenu = $(\"#menu-cell-toolbar-submenu\");\n        \n        function preset_added(event, data) {\n            var name = data.name;\n            submenu.append(\n                $(\"<li/>\")\n                .attr('data-name', encodeURIComponent(name))\n                .append(\n                    $(\"<a/>\")\n                    .attr('href', '#')\n                    .text(name)\n                    .click(function () {\n                        if (name ==='None') {\n                            celltoolbar.CellToolbar.global_hide();\n                            delete that.notebook.metadata.celltoolbar;\n                        } else {\n                            celltoolbar.CellToolbar.global_show();\n                            celltoolbar.CellToolbar.activate_preset(name, that.events);\n                            that.notebook.metadata.celltoolbar = name;\n                        }\n                        that.notebook.focus_cell();\n                    })\n                )\n            );\n        }\n        \n        // Setup the existing presets\n        var presets = celltoolbar.CellToolbar.list_presets();\n        preset_added(null, {name: i18n.msg._(\"None\")});\n        presets.map(function (name) {\n            preset_added(null, {name: name});\n        });\n\n        // Setup future preset registrations\n        this.events.on('preset_added.CellToolbar', preset_added);\n        \n        // Handle unregistered presets\n        this.events.on('unregistered_preset.CellToolbar', function (event, data) {\n            submenu.find(\"li[data-name='\" + encodeURIComponent(data.name) + \"']\").remove();\n        });\n    };\n\n    MenuBar.prototype.update_restore_checkpoint = function(checkpoints) {\n        var ul = this.element.find(\"#restore_checkpoint\").find(\"ul\");\n        ul.empty();\n        if (!checkpoints || checkpoints.length === 0) {\n            ul.append(\n                $(\"<li/>\")\n                .addClass(\"disabled\")\n                .append(\n                    $(\"<a/>\")\n                    .text(i18n.msg._(\"No checkpoints\"))\n                )\n            );\n            return;\n        }\n        \n        var that = this;\n        checkpoints.map(function (checkpoint) {\n            var d = new Date(checkpoint.last_modified);\n            ul.append(\n                $(\"<li/>\").append(\n                    $(\"<a/>\")\n                    .attr(\"href\", \"#\")\n                    .text(moment(d).format(\"LLLL\"))\n                    .click(function () {\n                        that.notebook.restore_checkpoint_dialog(checkpoint);\n                    })\n                )\n            );\n        });\n    };\n    \n    MenuBar.prototype.update_nbconvert_script = function(langinfo) {\n        /**\n         * Set the 'Download as foo' menu option for the relevant language.\n         */\n        var el = this.element.find('#download_script');\n        \n        // Set menu entry text to e.g. \"Python (.py)\"\n        var langname = (langinfo.name || 'Script');\n        langname = langname.charAt(0).toUpperCase()+langname.substr(1); // Capitalise\n        el.find('a').text(langname + ' ('+(langinfo.file_extension || 'txt')+')');\n    };\n\n    MenuBar.prototype.add_kernel_help_links = function(help_links) {\n        /** add links from kernel_info to the help menu */\n        var divider = $(\"#kernel-help-links\");\n        if (divider.length === 0) {\n            // insert kernel help section above about link\n            var about = $(\"#notebook_about\").parent();\n            divider = $(\"<li>\")\n                .attr('id', \"kernel-help-links\")\n                .addClass('divider');\n            about.prev().before(divider);\n        }\n        // remove previous entries\n        while (!divider.next().hasClass('divider')) {\n            divider.next().remove();\n        }\n        if (help_links.length === 0) {\n            // no help links, remove the divider\n            divider.remove();\n            return;\n        }\n        var cursor = divider;\n        help_links.map(function (link) {\n            cursor.after($(\"<li>\")\n                .append($(\"<a>\")\n                    .attr('target', '_blank')\n                    .attr('title', i18n.msg._('Opens in a new window'))\n                    .attr('href', requirejs.toUrl(link.url))\n                    .append($(\"<i>\")\n                        .addClass(\"fa fa-external-link menu-icon pull-right\")\n                    )\n                    .append($(\"<span>\")\n                        .text(link.text)\n                    )\n                )\n            );\n            cursor = cursor.next();\n        });\n        \n    };\n\n    return {'MenuBar': MenuBar};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/notificationwidget',['jquery'], function($) {\n    \"use strict\";\n\n    /**\n     * Construct a NotificationWidget object.\n     *\n     * @constructor\n     * @param {string} selector - a jQuery selector string for the\n     * notification widget element\n     */\n    var NotificationWidget = function (selector) {\n        this.selector = selector;\n        this.timeout = null;\n        this.busy = false;\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.style();\n        }\n        this.element.hide();\n        this.inner = $('<span/>');\n        this.element.append(this.inner);\n    };\n\n    /**\n     * Add the 'notification_widget' CSS class to the widget element.\n     *\n     * @method style\n     */\n    NotificationWidget.prototype.style = function () {\n        // use explicit bootstrap classes here,\n        // because multiple inheritance in LESS doesn't work\n        // for this particular combination\n        this.element.addClass('notification_widget btn btn-xs navbar-btn');\n    };\n   \n    /**\n     * hide the widget and empty the text\n     **/\n    NotificationWidget.prototype.hide = function () {\n        var that = this;\n        this.element.fadeOut(100, function(){that.inner.text('');});\n    };\n\n    /**\n     * Set the notification widget message to display for a certain\n     * amount of time (timeout).  The widget will be shown forever if\n     * timeout is <= 0 or undefined. If the widget is clicked while it\n     * is still displayed, execute an optional callback\n     * (click_callback). If the callback returns false, it will\n     * prevent the notification from being dismissed.\n     *\n     * Options:\n     *    class - CSS class name for styling\n     *    icon - CSS class name for the widget icon\n     *    title - HTML title attribute for the widget\n     *\n     * @method set_message\n     * @param {string} msg - The notification to display\n     * @param {integer} [timeout] - The amount of time in milliseconds to display the widget\n     * @param {function} [click_callback] - The function to run when the widget is clicked\n     * @param {Object} [options] - Additional options\n     */\n    NotificationWidget.prototype.set_message = function (msg, timeout, click_callback, options) {\n        options = options || {};\n\n        // unbind potential previous callback\n        this.element.unbind('click');\n        this.inner.attr('class', options.icon);\n        this.inner.attr('title', options.title);\n        this.inner.text(msg);\n        this.element.fadeIn(100);\n\n        // reset previous set style\n        this.element.removeClass();\n        this.style();\n        if (options.class) {\n            this.element.addClass(options.class);\n        }\n\n        // clear previous timer\n        if (this.timeout !== null) {\n            clearTimeout(this.timeout);\n            this.timeout = null;\n        }\n\n        // set the timer if a timeout is given\n        var that = this;\n        if (timeout !== undefined && timeout >= 0) {\n            this.timeout = setTimeout(function () {\n                that.element.fadeOut(100, function () {that.inner.text('');});\n                that.element.unbind('click');\n                that.timeout = null;\n            }, timeout);\n        }\n\n        // if no click callback assume we will just dismiss the notification\n        if (click_callback === undefined) {\n            click_callback = function(){return true};\n        }\n        // on click, remove widget if click callback say so\n        // and unbind click event.\n        this.element.click(function () {\n            if (click_callback() !== false) {\n                that.element.fadeOut(100, function () {that.inner.text('');});\n                that.element.unbind('click');\n            }\n            if (that.timeout !== null) {\n                clearTimeout(that.timeout);\n                that.timeout = null;\n            }\n        });\n    };\n\n    /**\n     * Display an information message (styled with the 'info'\n     * class). Arguments are the same as in set_message. Default\n     * timeout is 3500 milliseconds.\n     *\n     * @method info\n     */\n    NotificationWidget.prototype.info = function (msg, timeout, click_callback, options) {\n        options = options || {};\n        options.class = options.class + ' info';\n        timeout = timeout || 3500;\n        this.set_message(msg, timeout, click_callback, options);\n    };\n\n    /**\n     * Display a warning message (styled with the 'warning'\n     * class). Arguments are the same as in set_message. Messages are\n     * sticky by default.\n     *\n     * @method warning\n     */\n    NotificationWidget.prototype.warning = function (msg, timeout, click_callback, options) {\n        options = options || {};\n        options.class = options.class + ' warning';\n        this.set_message(msg, timeout, click_callback, options);\n    };\n\n    /**\n     * Display a danger message (styled with the 'danger'\n     * class). Arguments are the same as in set_message. Messages are\n     * sticky by default.\n     *\n     * @method danger\n     */\n    NotificationWidget.prototype.danger = function (msg, timeout, click_callback, options) {\n        options = options || {};\n        options.class = options.class + ' danger';\n        this.set_message(msg, timeout, click_callback, options);\n    };\n\n    /**\n     * Get the text of the widget message.\n     *\n     * @method get_message\n     * @return {string} - the message text\n     */\n    NotificationWidget.prototype.get_message = function () {\n        return this.inner.html();\n    };\n\n    return {'NotificationWidget': NotificationWidget};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/notificationarea',[\n    'jquery',\n    'base/js/notificationwidget',\n], function($, notificationwidget) {\n    \"use strict\";\n\n    // store reference to the NotificationWidget class\n    var NotificationWidget = notificationwidget.NotificationWidget;\n\n    /**\n     * Construct the NotificationArea object. Options are:\n     *     events: $(Events) instance\n     *     save_widget: SaveWidget instance\n     *     notebook: Notebook instance\n     *     keyboard_manager: KeyboardManager instance\n     *\n     * @constructor\n     * @param {string} selector - a jQuery selector string for the\n     * notification area element\n     * @param {Object} [options] - a dictionary of keyword arguments.\n     */\n    var NotificationArea = function (selector, options) {\n        this.selector = selector;\n        this.events = options.events;\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n        }\n        this.widget_dict = {};\n    };\n\n    /**\n     * Get a widget by name, creating it if it doesn't exist.\n     *\n     * @method widget\n     * @param {string} name - the widget name\n     */\n    NotificationArea.prototype.widget = function (name) {\n        if (this.widget_dict[name] === undefined) {\n            return this.new_notification_widget(name);\n        }\n        return this.get_widget(name);\n    };\n\n    /**\n     * Get a widget by name, throwing an error if it doesn't exist.\n     *\n     * @method get_widget\n     * @param {string} name - the widget name\n     */\n    NotificationArea.prototype.get_widget = function (name) {\n        if(this.widget_dict[name] === undefined) {\n            throw new Error('no widgets with this name');\n        }\n        return this.widget_dict[name];\n    };\n\n    /**\n     * Create a new notification widget with the given name. The\n     * widget must not already exist.\n     *\n     * @method new_notification_widget\n     * @param {string} name - the widget name\n     */\n    NotificationArea.prototype.new_notification_widget = function (name) {\n        if (this.widget_dict[name] !== undefined) {\n            throw new Error('widget with that name already exists!');\n        }\n\n        // create the element for the notification widget and add it\n        // to the notification aread element\n        var div = $('<div/>').attr('id', 'notification_' + name);\n        $(this.selector).append(div);\n\n        // create the widget object and return it\n        this.widget_dict[name] = new NotificationWidget('#notification_' + name);\n        return this.widget_dict[name];\n    };\n\n    return {'NotificationArea': NotificationArea};\n});\n\n",
    "define('notebook/js/notificationarea',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog',\n    'base/js/notificationarea',\n    'moment'\n], function($, utils, i18n, dialog, notificationarea, moment) {\n    \"use strict\";\n\n    var NotificationArea = notificationarea.NotificationArea;\n    \n    var NotebookNotificationArea = function(selector, options) {\n        NotificationArea.apply(this, [selector, options]);\n        this.save_widget = options.save_widget;\n        this.notebook = options.notebook;\n        this.keyboard_manager = options.keyboard_manager;\n    };\n    \n    NotebookNotificationArea.prototype = Object.create(NotificationArea.prototype);\n    \n    /**\n     * Initialize the default set of notification widgets.\n     *\n     * @method init_notification_widgets\n     */\n    NotebookNotificationArea.prototype.init_notification_widgets = function () {\n        this.init_kernel_notification_widget();\n        this.init_notebook_notification_widget();\n        this.init_trusted_notebook_notification_widget();\n    };\n\n    /**\n     * Initialize the notification widget for kernel status messages.\n     *\n     * @method init_kernel_notification_widget\n     */\n    NotebookNotificationArea.prototype.init_kernel_notification_widget = function () {\n        var that = this;\n        var knw = this.widget('kernel');\n        var $kernel_ind_icon = $(\"#kernel_indicator_icon\");\n        var $modal_ind_icon = $(\"#modal_indicator\");\n        var $readonly_ind_icon = $('#readonly-indicator');\n        var $body = $('body');\n        var busy_favicon_timer = -1;\n        \n        var set_busy_favicon = function(on) {\n            if (on) {\n                // Only show the busy icon if execution lasts > 1s\n                // This is to avoid rapidly switching icons and making lots of\n                // HTTP requests.\n                clearTimeout(busy_favicon_timer);\n                busy_favicon_timer = setTimeout(function() {\n                    utils.change_favicon('/static/base/images/favicon-busy-1.ico');\n                }, 1000);\n            } else {\n                clearTimeout(busy_favicon_timer);\n                utils.change_favicon('/static/base/images/favicon-notebook.ico');\n            }\n        };\n\n        // Listen for the notebook loaded event.  Set readonly indicator.\n        this.events.on('notebook_loaded.Notebook', function() {\n            if (that.notebook.writable) {\n                $readonly_ind_icon.hide();\n            } else {\n                $readonly_ind_icon.show();\n            }\n        });\n\n        // Command/Edit mode\n        this.events.on('edit_mode.Notebook', function () {\n            that.save_widget.update_document_title();\n            $body.addClass('edit_mode');\n            $body.removeClass('command_mode');\n            $modal_ind_icon.attr('title',i18n.msg._('Edit Mode'));\n        });\n\n        this.events.on('command_mode.Notebook', function () {\n            that.save_widget.update_document_title();\n            $body.removeClass('edit_mode');\n            $body.addClass('command_mode');\n            $modal_ind_icon.attr('title',i18n.msg._('Command Mode'));\n        });\n\n        // Implicitly start off in Command mode, switching to Edit mode will trigger event\n        $modal_ind_icon.addClass('modal_indicator').attr('title',i18n.msg._('Command Mode'));\n        $body.addClass('command_mode');\n\n        // Kernel events\n\n        // this can be either kernel_created.Kernel or kernel_created.Session\n        this.events.on('kernel_created.Kernel kernel_created.Session', function () {\n            knw.info(i18n.msg._(\"Kernel Created\"), 500);\n        });\n\n        this.events.on('kernel_reconnecting.Kernel', function () {\n            knw.warning(i18n.msg._(\"Connecting to kernel\"));\n        });\n\n        this.events.on('kernel_connection_dead.Kernel', function (evt, info) {\n            knw.danger(i18n.msg._(\"Not Connected\"), undefined, function () {\n                // schedule reconnect a short time in the future, don't reconnect immediately\n                setTimeout($.proxy(info.kernel.reconnect, info.kernel), 500);\n            }, {title: i18n.msg._('click to reconnect')});\n        });\n\n        this.events.on('kernel_connected.Kernel', function () {\n            knw.info(\"Connected\", 500);\n            // trigger busy in the status to clear broken-link state immediately\n            // a kernel_ready event will come when the kernel becomes responsive.\n            $kernel_ind_icon\n                .attr('class', 'kernel_busy_icon')\n                .attr('title', i18n.msg._('Kernel Connected'));\n        });\n\n        this.events.on('kernel_restarting.Kernel', function () {\n            that.save_widget.update_document_title();\n            knw.set_message(i18n.msg._(\"Restarting kernel\"), 2000);\n        });\n\n        this.events.on('kernel_autorestarting.Kernel', function (evt, info) {\n            // Only show the dialog on the first restart attempt. This\n            // number gets tracked by the `Kernel` object and passed\n            // along here, because we don't want to show the user 5\n            // dialogs saying the same thing (which is the number of\n            // times it tries restarting).\n            if (info.attempt === 1) {\n\n                dialog.kernel_modal({\n                    notebook: that.notebook,\n                    keyboard_manager: that.keyboard_manager,\n                    title: i18n.msg._(\"Kernel Restarting\"),\n                    body: i18n.msg._(\"The kernel appears to have died. It will restart automatically.\"),\n                    buttons: {\n                        OK : {\n                            class : \"btn-primary\"\n                        }\n                    }\n                });\n            }\n\n            that.save_widget.update_document_title();\n            knw.danger(i18n.msg._(\"Dead kernel\"));\n            $kernel_ind_icon.attr('class','kernel_dead_icon').attr('title',i18n.msg._('Kernel Dead'));\n        });\n\n        this.events.on('kernel_interrupting.Kernel', function () {\n            knw.set_message(i18n.msg._(\"Interrupting kernel\"), 2000);\n        });\n\n        this.events.on('kernel_disconnected.Kernel', function () {\n            $kernel_ind_icon\n                .attr('class', 'kernel_disconnected_icon')\n                .attr('title', i18n.msg._('No Connection to Kernel'));\n        });\n\n        this.events.on('kernel_connection_failed.Kernel', function (evt, info) {\n            // only show the dialog if this is the first failed\n            // connect attempt, because the kernel will continue\n            // trying to reconnect and we don't want to spam the user\n            // with messages\n            if (info.attempt === 1) {\n\n                var msg = i18n.msg._(\"A connection to the notebook server could not be established.\" +\n                        \" The notebook will continue trying to reconnect. Check your\" +\n                        \" network connection or notebook server configuration.\");\n\n                var the_dialog = dialog.kernel_modal({\n                    title: i18n.msg._(\"Connection failed\"),\n                    body: msg,\n                    keyboard_manager: that.keyboard_manager,\n                    notebook: that.notebook,\n                    buttons : {\n                        \"OK\": {}\n                    }\n                });\n\n                // hide the dialog on reconnect if it's still visible\n                var dismiss = function () {\n                    the_dialog.modal('hide');\n                }\n                that.events.on(\"kernel_connected.Kernel\", dismiss);\n                the_dialog.on(\"hidden.bs.modal\", function () {\n                    // clear handler on dismiss\n                    that.events.off(\"kernel_connected.Kernel\", dismiss);\n                });\n            }\n        });\n\n        this.events.on('kernel_killed.Kernel kernel_killed.Session', function () {\n            that.save_widget.update_document_title();\n            knw.warning(i18n.msg._(\"No kernel\"));\n            $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title',i18n.msg._('Kernel is not running'));\n        });\n\n        this.events.on('kernel_dead.Kernel', function () {\n        // This statement is used simply so that message extraction\n        // will pick up the strings.  The actual setting of the text\n        // for the button is in dialog.js.\n        var button_labels = [ i18n.msg._(\"Don't Restart\"), i18n.msg._(\"Try Restarting Now\"), i18n.msg._(\"OK\")];\n\n            var showMsg = function () {\n\n                var msg = i18n.msg._('The kernel has died, and the automatic restart has failed.' +\n                        ' It is possible the kernel cannot be restarted. ' +\n                        'If you are not able to restart the kernel, you will still be able to save' +\n                        ' the notebook, but running code will no longer work until the notebook' +\n                        ' is reopened.');\n\n                dialog.kernel_modal({\n                    title: i18n.msg._(\"Dead kernel\"),\n                    body : msg,\n                    keyboard_manager: that.keyboard_manager,\n                    notebook: that.notebook,\n                    default_button: \"Don't Restart\",\n                    buttons : {\n                        \"Don't Restart\": {},\n                        \"Try Restarting Now\": {\n                            class: \"btn-danger\",\n                            click: function () {\n                                that.notebook.start_session();\n                            }\n                        }\n                    }\n                });\n\n                return false;\n            };\n\n            that.save_widget.update_document_title();\n            knw.danger(i18n.msg._(\"Dead kernel\"), undefined, showMsg);\n            $kernel_ind_icon.attr('class','kernel_dead_icon').attr('title',i18n.msg._('Kernel Dead'));\n\n            showMsg();\n        });\n        \n        this.events.on(\"no_kernel.Kernel\", function (evt, data) {\n            $(\"#kernel_indicator\").find('.kernel_indicator_name').text(i18n.msg._(\"No Kernel\"));\n        });\n\n        this.events.on('kernel_dead.Session', function (evt, info) {\n            var full = info.xhr.responseJSON.message;\n            var short = info.xhr.responseJSON.short_message || 'Kernel error';\n            var traceback = info.xhr.responseJSON.traceback;\n\n            var showMsg = function () {\n                var msg = $('<div/>').append($('<p/>').text(full));\n                var cm, cm_elem, cm_open;\n\n                if (traceback) {\n                    cm_elem = $('<div/>')\n                        .css('margin-top', '1em')\n                        .css('padding', '1em')\n                        .addClass('output_scroll');\n                    msg.append(cm_elem);\n                    cm = new CodeMirror(cm_elem.get(0), {\n                        mode:  \"python\",\n                        readOnly : true\n                    });\n                    cm.setValue(traceback);\n                    cm_open = $.proxy(cm.refresh, cm);\n                }\n\n                dialog.kernel_modal({\n                    title: i18n.msg._(\"Failed to start the kernel\"),\n                    body : msg,\n                    keyboard_manager: that.keyboard_manager,\n                    notebook: that.notebook,\n                    open: cm_open,\n                    buttons : {\n                        \"OK\": { class: 'btn-primary' }\n                    }\n                });\n\n                return false;\n            };\n\n            that.save_widget.update_document_title();\n            $kernel_ind_icon.attr('class','kernel_dead_icon').attr('title',i18n.msg._('Kernel Dead'));\n            knw.danger(short, undefined, showMsg);\n        });\n        \n        this.events.on('kernel_starting.Kernel kernel_created.Session', function () {\n            // window.document.title='(Starting) '+window.document.title;\n            $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title',i18n.msg._('Kernel Busy'));\n            knw.set_message(i18n.msg._(\"Kernel starting, please wait...\"));\n            set_busy_favicon(true);\n        });\n\n        this.events.on('kernel_ready.Kernel', function () {\n            // that.save_widget.update_document_title();\n            $kernel_ind_icon.attr('class','kernel_idle_icon').attr('title',i18n.msg._('Kernel Idle'));\n            knw.info(i18n.msg._(\"Kernel ready\"), 500);\n            set_busy_favicon(false);\n        });\n\n        this.events.on('kernel_idle.Kernel', function () {\n            // that.save_widget.update_document_title();\n            $kernel_ind_icon.attr('class','kernel_idle_icon').attr('title',i18n.msg._('Kernel Idle'));\n            set_busy_favicon(false);\n        });\n\n        this.events.on('kernel_busy.Kernel', function () {\n            // window.document.title='(Busy) '+window.document.title;\n            $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title',i18n.msg._('Kernel Busy'));\n            set_busy_favicon(true);\n        });\n\n        this.events.on('spec_match_found.Kernel', function (evt, data) {\n            that.widget('kernelspec').info(i18n.msg._(\"Using kernel: \") + data.found.spec.display_name, 3000, undefined, {\n                title: i18n.msg.sprintf(i18n.msg._(\"Only candidate for language: %1$s was %2$s.\"),\n                        data.selected.language, data.found.spec.display_name)\n            });\n        });\n\n        \n        // Start the kernel indicator in the busy state, and send a kernel_info request.\n        // When the kernel_info reply arrives, the kernel is idle.\n        $kernel_ind_icon.attr('class','kernel_busy_icon').attr('title',i18n.msg._('Kernel Busy'));\n    };\n\n    /**\n     * Initialize the notification widget for notebook status messages.\n     *\n     * @method init_notebook_notification_widget\n     */\n    NotebookNotificationArea.prototype.init_notebook_notification_widget = function () {\n        var nnw = this.widget('notebook');\n\n        // Notebook events\n        this.events.on('notebook_loading.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Loading notebook\"),500);\n        });\n        this.events.on('notebook_loaded.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Notebook loaded\"),500);\n        });\n        this.events.on('notebook_saving.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Saving notebook\"),500);\n        });\n        this.events.on('notebook_saved.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Notebook saved\"),2000);\n        });\n        this.events.on('notebook_save_failed.Notebook', function (evt, error) {\n            nnw.warning(error.message || i18n.msg._(\"Notebook save failed\"));\n        });\n        this.events.on('notebook_copy_failed.Notebook', function (evt, error) {\n            nnw.warning(error.message || i18n.msg._(\"Notebook copy failed\"));\n        });\n        \n        // Checkpoint events\n        this.events.on('checkpoint_created.Notebook', function (evt, data) {\n            var msg = i18n.msg._(\"Checkpoint created\");\n            if (data.last_modified) {\n                var d = new Date(data.last_modified);\n                msg = msg + \": \" + moment(d).format(\"HH:mm:ss\");\n            }\n            nnw.set_message(msg, 2000);\n        });\n        this.events.on('checkpoint_failed.Notebook', function () {\n            nnw.warning(i18n.msg._(\"Checkpoint failed\"));\n        });\n        this.events.on('checkpoint_deleted.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Checkpoint deleted\"), 500);\n        });\n        this.events.on('checkpoint_delete_failed.Notebook', function () {\n            nnw.warning(i18n.msg._(\"Checkpoint delete failed\"));\n        });\n        this.events.on('checkpoint_restoring.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Restoring to checkpoint...\"), 500);\n        });\n        this.events.on('checkpoint_restore_failed.Notebook', function () {\n            nnw.warning(i18n.msg._(\"Checkpoint restore failed\"));\n        });\n\n        // Autosave events\n        this.events.on('autosave_disabled.Notebook', function () {\n            nnw.set_message(i18n.msg._(\"Autosave disabled\"), 2000);\n        });\n        this.events.on('autosave_enabled.Notebook', function (evt, interval) {\n            nnw.set_message(i18n.msg.sprintf(i18n.msg._(\"Saving every %d sec.\"), interval / 1000) , 1000);\n        });\n    };\n\n    /**\n     * Initialize the notification widget for trusted notebook messages.\n     *\n     * @method init_trusted_notebook_notification_widget\n     */\n    NotebookNotificationArea.prototype.init_trusted_notebook_notification_widget = function () {\n        var that = this;\n        var tnw = this.widget('trusted');\n\n        // Notebook trust events\n        this.events.on('trust_changed.Notebook', function (event, trusted) {\n            if (trusted) {\n                tnw.set_message(i18n.msg._(\"Trusted\"));\n            } else {\n                tnw.set_message(i18n.msg._(\"Not Trusted\"), undefined, function() {\n                  that.notebook.trust_notebook();\n                  return false;\n                });\n            }\n        });\n    };\n\n    return {'NotebookNotificationArea': NotebookNotificationArea};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('bidi/numericshaping',[],\n    function(bidi) {\n    \"use strict\";\n\t\n    var regex = /([0-9])|([\\u0660-\\u0669])|([\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FF\\u0750-\\u077F\\u08A0-\\u08E3\\u200F\\u202B\\u202E\\u2067\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFEFE]+)|([^0-9\\u0660-\\u0669\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FF\\u0750-\\u077F\\u08A0-\\u08E3\\u200F\\u202B\\u202E\\u2067\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFEFE\\u0600-\\u0607\\u0609-\\u060A\\u060C\\u060E-\\u061A\\u064B-\\u066C\\u0670\\u06D6-\\u06E4\\u06E7-\\u06ED\\u06F0-\\u06F9\\u08E4-\\u08FF\\uFD3E-\\uFD3F\\uFDD0-\\uFDEF\\uFDFD\\uFEFF\\u0000-\\u0040\\u005B-\\u0060\\u007B-\\u007F\\u0080-\\u00A9\\u00AB-\\u00B4\\u00B6-\\u00B9\\u00BB-\\u00BF\\u00D7\\u00F7\\u02B9-\\u02BA\\u02C2-\\u02CF\\u02D2-\\u02DF\\u02E5-\\u02ED\\u02EF-\\u02FF\\u2070\\u2074-\\u207E\\u2080-\\u208E\\u2100-\\u2101\\u2103-\\u2106\\u2108-\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A-\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u2150-\\u215F\\u2189\\uA720-\\uA721\\uA788\\uFF01-\\uFF20\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE]+)/g;\n\t\n    var shape = function(text, shaperType) {\n        text = text.toString();\n        if (!text) { \n            return text;\n        }\n        switch (shaperType) {\n            case \"defaultNumeral\":\n                return _shapeEuropean(text);\n            case \"national\":\n                return _shapeArabic(text);\n            default:\n                return text;\n        }\n    };\n    \n    var _shapeEuropean = function(text) {\n        return text.replace(/[\\u0660-\\u0669]/g, function(c) {\n            return c.charCodeAt(0) - 1632;\n        });\n    };\n\n    var _shapeArabic = function(text) {\n        return text.replace(/[0-9]/g, function(c) {\n            return String.fromCharCode(parseInt(c) + 1632);\n        });\n    };\n   \n    var numericshaping = {\n        shapeNumerals : shape\n    };\n           \n    return numericshaping;       \n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('bidi/bidi',['bidi/numericshaping'], function(numericshaping) {\n  'use strict';\n\n  var shaperType = '';\n  var textDir = '';\n\n  var _uiLang = function() {\n    return navigator.language.toLowerCase();\n  };\n\n  var _loadLocale = function() {\n    if (_isMirroringEnabled()) {\n      $('body').attr('dir', 'rtl');\n    }\n    var uiLang = _uiLang();\n\n    if (uiLang !== 'en' && uiLang !== 'en-us') {\n      // moment does not ship with a separate file for locale/en or locale/en-us\n      // so we must skip dynamically requiring it\n      requirejs(['components/moment/locale/' + _uiLang()], function(err) {\n        console.warn('Error loading the required locale');\n        console.warn(err);\n      });\n    }\n\n    shaperType = _uiLang() == 'ar' ? 'national' : 'defaultNumeral';\n  };\n\n  var _isMirroringEnabled = function() {\n    return new RegExp('^(ar|he)').test(_uiLang());\n  };\n\n  /**\n     * NS :  for digit Shaping.\n     * BTD : for future work in case of Base Text Direction Addition.\n     */\n\n  /**\n     * @param value : the string to apply the bidi-support on it.\n     * @param flag :indicates the type of bidi-support (Numeric-shaping ,Base-text-dir ).\n     */\n  var _applyBidi = function(value /*, flag*/) {\n    value = numericshaping.shapeNumerals(value, shaperType);\n    return value;\n  };\n\n  var bidi = {\n    applyBidi: _applyBidi,\n    isMirroringEnabled: _isMirroringEnabled,\n    loadLocale: _loadLocale,\n  };\n\n  return bidi;\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/savewidget',[\n    'jquery',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog',\n    'base/js/keyboard',\n    'moment',\n    'bidi/bidi',\n], function($, utils, i18n, dialog, keyboard, moment, bidi) {\n    \"use strict\";\n\n    var SaveWidget = function (selector, options) {\n        /**\n         * TODO: Remove circular ref.\n         */\n        this.notebook = undefined;\n        this.selector = selector;\n        this.events = options.events;\n        this._checkpoint_date = undefined;\n        this.keyboard_manager = options.keyboard_manager;\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.bind_events();\n        }\n    };\n\n\n    SaveWidget.prototype.bind_events = function () {\n        var that = this;\n        this.element.find('span.filename').click(function () {\n            that.rename_notebook({notebook: that.notebook});\n        });\n        this.events.on('notebook_loaded.Notebook', function () {\n            that.update_notebook_name();\n            that.update_document_title();\n        });\n        this.events.on('notebook_saved.Notebook', function () {\n            that.update_notebook_name();\n            that.update_document_title();\n        });\n        this.events.on('notebook_renamed.Notebook', function () {\n            that.update_notebook_name();\n            that.update_document_title();\n            that.update_address_bar();\n        });\n        this.events.on('notebook_save_failed.Notebook', function () {\n            that.set_save_status(i18n.msg._('Autosave Failed!'));\n        });\n        this.events.on('notebook_read_only.Notebook', function () {\n            that.set_save_status('(read only)');\n            // disable future set_save_status\n            that.set_save_status = function () {};\n        });\n        this.events.on('checkpoints_listed.Notebook', function (event, data) {\n            that._set_last_checkpoint(data[0]);\n        });\n\n        this.events.on('checkpoint_created.Notebook', function (event, data) {\n            that._set_last_checkpoint(data);\n        });\n        this.events.on('set_dirty.Notebook', function (event, data) {\n            that.set_autosaved(data.value);\n        });\n    };\n\n    // This statement is used simply so that message extraction\n    // will pick up the strings.  The actual setting of the text\n    // for the button is in dialog.js.\n    var button_labels = [ i18n.msg._(\"Cancel\"), i18n.msg._(\"Rename\"), i18n.msg._(\"OK\")];\n\n    SaveWidget.prototype.rename_notebook = function (options) {\n        options = options || {};\n        var that = this;\n        var dialog_body = $('<div/>').append(\n            $(\"<p/>\").addClass(\"rename-message\")\n                .text(i18n.msg._('Enter a new notebook name:'))\n        ).append(\n            $(\"<br/>\")\n        ).append(\n            $('<input/>').attr('type','text').attr('size','25').addClass('form-control')\n            .val(options.notebook.get_notebook_name())\n        );\n        var d = dialog.modal({\n            title: i18n.msg._(\"Rename Notebook\"),\n            body: dialog_body,\n            notebook: options.notebook,\n            keyboard_manager: this.keyboard_manager,\n            default_button: \"Cancel\",\n            buttons : {\n                \"Cancel\": {},\n                \"Rename\": {\n                    class: \"btn-primary\",\n                    click: function () {\n                        var new_name = d.find('input').val();\n                        if (!options.notebook.test_notebook_name(new_name)) {\n                            d.find('.rename-message').text(i18n.msg._(\n                                \"Invalid notebook name. Notebook names must have 1 or more characters and can contain any characters except :/\\\\. Please enter a new notebook name:\")\n                            );\n                            return false;\n                        } else {\n                            d.find('.rename-message').text(i18n.msg._(\"Renaming...\"));\n                            d.find('input[type=\"text\"]').prop('disabled', true);\n                            that.notebook.rename(new_name).then(\n                                function () {\n                                    d.modal('hide');\n                                }, function (error) {\n                                    d.find('.rename-message').text(error.message || i18n.msg._('Unknown error'));\n                                    d.find('input[type=\"text\"]').prop('disabled', false).focus().select();\n                                }\n                            );\n                            return false;\n                        }\n                    }\n                }\n            },\n            open : function () {\n                /**\n                 * Upon ENTER, click the OK button.\n                 */\n                d.find('input[type=\"text\"]').keydown(function (event) {\n                    if (event.which === keyboard.keycodes.enter) {\n                        d.find('.btn-primary').first().click();\n                        return false;\n                    }\n                });\n                d.find('input[type=\"text\"]').focus().select();\n            }\n        });\n    };\n\n\n    SaveWidget.prototype.update_notebook_name = function () {\n        var nbname = this.notebook.get_notebook_name();\n        nbname = bidi.applyBidi(nbname);\n        this.element.find('span.filename').text(nbname);\n    };\n\n\n    SaveWidget.prototype.update_document_title = function () {\n        var nbname = this.notebook.get_notebook_name();\n        document.title = nbname;\n    };\n\n    SaveWidget.prototype.update_address_bar = function(){\n        var base_url = this.notebook.base_url;\n        var path = this.notebook.notebook_path;\n        var state = {path : path};\n        window.history.replaceState(state, \"\", utils.url_path_join(\n            base_url,\n            \"notebooks\",\n            utils.encode_uri_components(path))\n        );\n    };\n\n\n    SaveWidget.prototype.set_save_status = function (msg) {\n        this.element.find('span.autosave_status').text(msg);\n    };\n\n    SaveWidget.prototype._set_last_checkpoint = function (checkpoint) {\n        if (checkpoint) {\n            this._checkpoint_date = new Date(checkpoint.last_modified);\n        } else {\n            this._checkpoint_date = null;\n        }\n        this._render_checkpoint();\n    };\n    \n    SaveWidget.prototype._render_checkpoint = function () {\n        /** actually set the text in the element, from our _checkpoint value\n        \n        called directly, and periodically in timeouts.\n        */\n        this._schedule_render_checkpoint();\n        var el = this.element.find('span.checkpoint_status');\n        if (!this._checkpoint_date) {\n            el.text('').attr('title', i18n.msg._('no checkpoint'));\n            return;\n        }\n        var chkd = moment(this._checkpoint_date);\n        var long_date = chkd.format('llll');\n        var human_date;\n        var tdelta = Math.ceil(new Date() - this._checkpoint_date);\n        if (tdelta < utils.time.milliseconds.d){\n            // less than 24 hours old, use relative date\n            human_date = chkd.fromNow();\n        } else {\n            // otherwise show calendar\n            // <Today | yesterday|...> at hh,mm,ss\n            human_date = chkd.calendar();\n        }\n        \n        el.text(i18n.msg.sprintf(i18n.msg._('Last Checkpoint: %s'),human_date)).attr('title', long_date);\n    };\n\n    \n    SaveWidget.prototype._schedule_render_checkpoint = function () {\n        /** schedule the next update to relative date\n        \n        periodically updated, so short values like 'a few seconds ago' don't get stale.\n        */\n        if (!this._checkpoint_date) {\n            return;\n        }\n        if ((this._checkpoint_timeout)) {\n            clearTimeout(this._checkpoint_timeout);\n        }\n        var dt = Math.ceil(new Date() - this._checkpoint_date);\n        this._checkpoint_timeout = setTimeout(\n            $.proxy(this._render_checkpoint, this),\n            utils.time.timeout_from_dt(dt)\n        );\n    };\n\n    SaveWidget.prototype.set_autosaved = function (dirty) {\n        if (dirty) {\n            this.set_save_status(i18n.msg._(\"(unsaved changes)\"));\n        } else {\n            this.set_save_status(i18n.msg._(\"(autosaved)\"));\n        }\n    };\n\n    return {'SaveWidget': SaveWidget};\n\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// How to pick action names:\n//\n// * First pick a noun and a verb for the action. For example, if the action is \"restart kernel,\" the verb is\n//   \"restart\" and the noun is \"kernel\".\n// * Omit terms like \"selected\" and \"active\" by default, so \"delete-cell\", rather than \"delete-selected-cell\".\n//   Only provide a scope like \"-all-\" if it is other than the default \"selected\" or \"active\" scope.\n// * If an action has a secondary action, separate the secondary action with \"-and-\", so\n//   \"restart-kernel-and-clear-output\".\n// * Don't ever use before/after as they have a temporal connotation that is confusing when used in a spatial\n//   context.\n// * Use above/below or previous/next to indicate spacial and sequential relationships.\n// * For dialogs, use a verb that indicates what the dialog will accomplish, such as \"confirm-restart-kernel\".\n\n\ndefine('notebook/js/actions',[\n    'base/js/i18n',\n    ], function(i18n){\n    \"use strict\";\n\n    var warn_bad_name = function(name){\n        if(name !== \"\" && !name.match(/:/)){\n            console.warn('You are trying to use an action/command name, where the separator between prefix and name is not `:`\\n'+\n                         '\"'+name+'\"\\n'+\n                         'You are likely to not use the API in a correct way. Typically use the following:\\n'+\n                         '`var key = actions.register(<object>, \"<name>\", \"<prefix>\");` and reuse the `key` variable'+\n                         'instead of re-generating the key yourself.'\n                    );\n        }\n    };\n\n    var ActionHandler = function (env) {\n        this.env = env || {};\n        Object.seal(this);\n    };\n\n    var $ = require('jquery');\n    var events =  require('base/js/events');\n\n    /**\n     *  A bunch of predefined `Simple Actions` used by Jupyter.\n     *  `Simple Actions` have the following keys:\n     *  help (optional): a short string the describe the action.\n     *      will be used in various context, like as menu name, tool tips on buttons,\n     *      and short description in help menu.\n     *  help_index (optional): a string used to sort action in help menu.\n     *  icon (optional): a short string that represent the icon that have to be used with this\n     *  action. this should mainly correspond to a Font_awesome class.\n     *  handler : a function which is called when the action is activated. It will receive at first parameter\n     *      a dictionary containing various handle to element of the notebook.\n     *\n     *  action need to be registered with a **name** that can be use to refer to this action.\n     *\n     *  if `help` is not provided it will be derived by replacing any dash by space\n     *  in the **name** of the action. It is advised to provide a prefix to action name to\n     *  avoid conflict the prefix should be all lowercase and end with a dot `.`\n     *  in the absence of a prefix the behavior of the action is undefined.\n     *\n     *  All action provided by the Jupyter notebook are prefixed with `jupyter-notebook:`.\n     *\n     *  One can register extra actions or replace an existing action with another one is possible\n     *  but is considered undefined behavior.\n     *\n     **/\n    var _actions = {\n        'toggle-rtl-layout': {\n            cmd: i18n.msg._('toggle rtl layout'),\n            help: i18n.msg._('Toggle the screen directionality between left-to-right and right-to-left'),\n            handler: function () {\n              (document.body.getAttribute('dir')=='rtl') ? document.body.setAttribute('dir','ltr') : document.body.setAttribute('dir','rtl');\n            }\n        },\n        'edit-command-mode-keyboard-shortcuts': {\n            cmd: i18n.msg._('edit command mode keyboard shortcuts'),\n            help: i18n.msg._('Open a dialog to edit the command mode keyboard shortcuts'),\n            handler: function (env) {\n                env.notebook.show_shortcuts_editor();\n            }\n        },\n        'shutdown-kernel': {\n            help: 'Shutdown the kernel (no confirmation dialog)',\n            handler: function (env) {\n                env.notebook.shutdown_kernel({confirm: false});\n            }\n        },\n        'confirm-shutdown-kernel':{\n            icon: 'fa-repeat',\n            help_index : 'hb',\n            help: 'Shutdown the kernel (with confirmation dialog)',\n            handler : function (env) {\n                env.notebook.shutdown_kernel();\n            }\n        },\n        'restart-kernel': {\n            cmd: i18n.msg._('restart kernel'),\n            help: i18n.msg._('restart the kernel (no confirmation dialog)'),\n            handler: function (env) {\n                env.notebook.restart_kernel({confirm: false});\n            },\n        },\n        'confirm-restart-kernel':{\n            icon: 'fa-repeat',\n            help_index : 'hb',\n            cmd: i18n.msg._('confirm restart kernel'),\n            help: i18n.msg._('restart the kernel (with dialog)'),\n            handler : function (env) {\n                env.notebook.restart_kernel();\n            }\n        },\n        'restart-kernel-and-run-all-cells': {\n            cmd: i18n.msg._('restart kernel and run all cells'),\n            help: i18n.msg._('restart the kernel, then re-run the whole notebook (no confirmation dialog)'),\n            handler: function (env) {\n                env.notebook.restart_run_all({confirm: false});\n            }\n        },\n        'confirm-restart-kernel-and-run-all-cells': {\n            cmd: i18n.msg._('confirm restart kernel and run all cells'),\n            help: i18n.msg._('restart the kernel, then re-run the whole notebook (with dialog)'),\n            handler: function (env) {\n                env.notebook.restart_run_all();\n            }\n        },\n        'restart-kernel-and-clear-output': {\n            cmd: i18n.msg._('restart kernel and clear output'),\n            help: i18n.msg._('restart the kernel and clear all output (no confirmation dialog)'),\n            handler: function (env) {\n                env.notebook.restart_clear_output({confirm: false});\n            }\n        },\n        'confirm-restart-kernel-and-clear-output': {\n            cmd: i18n.msg._('confirm restart kernel and clear output'),\n            help: i18n.msg._('restart the kernel and clear all output (with dialog)'),\n            handler: function (env) {\n                env.notebook.restart_clear_output();\n            }\n        },\n        'interrupt-kernel':{\n            icon: 'fa-stop',\n            cmd: i18n.msg._('interrupt the kernel'),\n            help: i18n.msg._('interrupt the kernel'),\n            help_index : 'ha',\n            handler : function (env) {\n                env.notebook.kernel.interrupt();\n            }\n        },\n        'run-cell-and-select-next': {\n            cmd: i18n.msg._('run cell and select next'),\n            icon: 'fa-step-forward',\n            help: i18n.msg._('run cell, select below'),\n            help_index : 'ba',\n            handler : function (env) {\n                env.notebook.execute_cell_and_select_below();\n            }\n        },\n        'run-cell':{\n            cmd: i18n.msg._('run selected cells'),\n            help    : i18n.msg._('run selected cells'),\n            help_index : 'bb',\n            handler : function (env) {\n                env.notebook.execute_selected_cells();\n            }\n        },\n        'run-cell-and-insert-below':{\n            cmd: i18n.msg._('run cell and insert below'),\n            help    : i18n.msg._('run cell and insert below'),\n            help_index : 'bc',\n            handler : function (env) {\n                env.notebook.execute_cell_and_insert_below();\n            }\n        },\n        'run-all-cells': {\n            cmd: i18n.msg._('run all cells'),\n            help: i18n.msg._('run all cells'),\n            help_index: 'bd',\n            handler: function (env) {\n                env.notebook.execute_all_cells();\n            }\n        },\n        'run-all-cells-above':{\n            cmd: i18n.msg._('run all cells above'),\n            help: i18n.msg._('run all cells above'),\n            handler : function (env) {\n                env.notebook.execute_cells_above();\n            }\n        },\n        'run-all-cells-below':{\n            cmd: i18n.msg._('run all cells below'),\n            help: i18n.msg._('run all cells below'),\n            handler : function (env) {\n                env.notebook.execute_cells_below();\n            }\n        },\n        'enter-command-mode': {\n            cmd: i18n.msg._('enter command mode'),\n            help    : i18n.msg._('enter command mode'),\n            help_index : 'aa',\n            handler : function (env) {\n                env.notebook.command_mode();\n            }\n        },\n        'insert-image': {\n            cmd: i18n.msg._('insert image'),\n            help      : i18n.msg._('insert image'),\n            help_index : 'dz',\n            handler : function (env) {\n                env.notebook.insert_image();\n            }\n        },\n        'cut-cell-attachments': {\n            cmd: i18n.msg._('cut cell attachments'),\n            help    : i18n.msg._('cut cell attachments'),\n            help_index : 'dza',\n            handler: function (env) {\n                env.notebook.cut_cell_attachments();\n            }\n        },\n        'copy-cell-attachments': {\n            cmd: i18n.msg._('copy cell attachments'),\n            help    : i18n.msg._('copy cell attachments'),\n            help_index: 'dzb',\n            handler: function (env) {\n                env.notebook.copy_cell_attachments();\n            }\n        },\n        'paste-cell-attachments': {\n            cmd: i18n.msg._('paste cell attachments'),\n            help    : i18n.msg._('paste cell attachments'),\n            help_index: 'dzc',\n            handler: function (env) {\n                env.notebook.paste_cell_attachments();\n            }\n        },\n        'split-cell-at-cursor': {\n            cmd: i18n.msg._('split cell at cursor'),\n            help    : i18n.msg._('split cell at cursor'),\n            help_index : 'ea',\n            handler : function (env) {\n                env.notebook.split_cell();\n            }\n        },\n        'enter-edit-mode' : {\n            cmd: i18n.msg._('enter edit mode'),\n            help : i18n.msg._('enter edit mode'),\n            help_index : 'aa',\n            handler : function (env) {\n                env.notebook.edit_mode();\n            }\n        },\n        'select-previous-cell' : {\n            cmd: i18n.msg._('select previous cell'),\n            help: i18n.msg._('select cell above'),\n            help_index : 'da',\n            handler : function (env) {\n                var index = env.notebook.get_selected_index();\n                if (index !== 0 && index !== null) {\n                    env.notebook.select_prev(true);\n                    env.notebook.focus_cell();\n                }\n            }\n        },\n        'select-next-cell' : {\n            cmd: i18n.msg._('select next cell'),\n            help: i18n.msg._('select cell below'),\n            help_index : 'db',\n            handler : function (env) {\n                var index = env.notebook.get_selected_index();\n                if (index !== (env.notebook.ncells()-1) && index !== null) {\n                    env.notebook.select_next(true);\n                    env.notebook.focus_cell();\n                }\n            }\n        },\n        'extend-selection-above' : {\n            cmd: i18n.msg._('extend selection above'),\n            help: i18n.msg._('extend selected cells above'),\n            help_index : 'dc',\n            handler : function (env) {\n                env.notebook.extend_selection_by(-1);\n                // scroll into view,\n                // do not call notebook.focus_cell(), or\n                // all the selection get thrown away\n                env.notebook.get_selected_cell().element.focus();\n            }\n        },\n        'extend-selection-below' : {\n            cmd: i18n.msg._('extend selection below'),\n            help: i18n.msg._('extend selected cells below'),\n            help_index : 'dd',\n            handler : function (env) {\n                env.notebook.extend_selection_by(1);\n                // scroll into view,\n                // do not call notebook.focus_cell(), or\n                // all the selection get thrown away\n                env.notebook.get_selected_cell().element.focus();\n            }\n        },\n        'cut-cell' : {\n            cmd: i18n.msg._('cut selected cells'),\n            help: i18n.msg._('cut selected cells'),\n            icon: 'fa-cut',\n            help_index : 'ee',\n            handler : function (env) {\n                var index = env.notebook.get_selected_index();\n                env.notebook.cut_cell();\n                env.notebook.select(index);\n            }\n        },\n        'copy-cell' : {\n            cmd: i18n.msg._('copy selected cells'),\n            help: i18n.msg._('copy selected cells'),\n            icon: 'fa-copy',\n            help_index : 'ef',\n            handler : function (env) {\n                env.notebook.copy_cell();\n            }\n        },\n        'paste-cell-replace' : {\n            help: 'paste cells replace',\n            handler : function (env) {\n                env.notebook.paste_cell_replace();\n            }\n        },\n        'paste-cell-above' : {\n            cmd: i18n.msg._('paste cells above'),\n            help: i18n.msg._('paste cells above'),\n            help_index : 'eg',\n            handler : function (env) {\n                env.notebook.paste_cell_above();\n            }\n        },\n        'paste-cell-below' : {\n            cmd: i18n.msg._('paste cells below'),\n            help: i18n.msg._('paste cells below'),\n            icon: 'fa-paste',\n            help_index : 'eh',\n            handler : function (env) {\n                env.notebook.paste_cell_below();\n            }\n        },\n        'insert-cell-above' : {\n            cmd: i18n.msg._('insert cell above'),\n            help: i18n.msg._('insert cell above'),\n            help_index : 'ec',\n            handler : function (env) {\n                env.notebook.insert_cell_above();\n                env.notebook.select_prev(true);\n                env.notebook.focus_cell();\n            }\n        },\n        'insert-cell-below' : {\n            cmd: i18n.msg._('insert cell below'),\n            help: i18n.msg._('insert cell below'),\n            icon : 'fa-plus',\n            help_index : 'ed',\n            handler : function (env) {\n                env.notebook.insert_cell_below();\n                env.notebook.select_next(true);\n                env.notebook.focus_cell();\n            }\n        },\n        'change-cell-to-code' : {\n            cmd: i18n.msg._('change cell to code'),\n            help    : i18n.msg._('change cell to code'),\n            help_index : 'ca',\n            handler : function (env) {\n                env.notebook.cells_to_code();\n            }\n        },\n        'change-cell-to-markdown' : {\n            cmd: i18n.msg._('change cell to markdown'),\n            help    : i18n.msg._('change cell to markdown'),\n            help_index : 'cb',\n            handler : function (env) {\n                env.notebook.cells_to_markdown();\n            }\n        },\n        'change-cell-to-raw' : {\n            cmd: i18n.msg._('change cell to raw'),\n            help    : i18n.msg._('change cell to raw'),\n            help_index : 'cc',\n            handler : function (env) {\n                env.notebook.cells_to_raw();\n            }\n        },\n        'change-cell-to-heading-1' : {\n            cmd: i18n.msg._('change cell to heading 1'),\n            help    : i18n.msg._('change cell to heading 1'),\n            help_index : 'cd',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 1);\n            }\n        },\n        'change-cell-to-heading-2' : {\n            cmd: i18n.msg._('change cell to heading 2'),\n            help    : i18n.msg._('change cell to heading 2'),\n            help_index : 'ce',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 2);\n            }\n        },\n        'change-cell-to-heading-3' : {\n            cmd: i18n.msg._('change cell to heading 3'),\n            help    : i18n.msg._('change cell to heading 3'),\n            help_index : 'cf',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 3);\n            }\n        },\n        'change-cell-to-heading-4' : {\n            cmd: i18n.msg._('change cell to heading 4'),\n            help    : i18n.msg._('change cell to heading 4'),\n            help_index : 'cg',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 4);\n            }\n        },\n        'change-cell-to-heading-5' : {\n            cmd: i18n.msg._('change cell to heading 5'),\n            help    : i18n.msg._('change cell to heading 5'),\n            help_index : 'ch',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 5);\n            }\n        },\n        'change-cell-to-heading-6' : {\n            cmd: i18n.msg._('change cell to heading 6'),\n            help    : i18n.msg._('change cell to heading 6'),\n            help_index : 'ci',\n            handler : function (env) {\n                env.notebook.to_heading(undefined, 6);\n            }\n        },\n        'toggle-cell-output-collapsed' : {\n            cmd: i18n.msg._('toggle cell output'),\n            help    : i18n.msg._('toggle output of selected cells'),\n            help_index : 'gb',\n            handler : function (env) {\n                env.notebook.toggle_cells_outputs();\n            }\n        },\n        'toggle-cell-output-scrolled' : {\n            cmd: i18n.msg._('toggle cell scrolling'),\n            help    : i18n.msg._('toggle output scrolling of selected cells'),\n            help_index : 'gc',\n            handler : function (env) {\n                env.notebook.toggle_cells_outputs_scroll();\n            }\n        },\n        'clear-cell-output' : {\n            cmd: i18n.msg._('clear cell output'),\n            help    : i18n.msg._('clear output of selected cells'),\n            handler : function (env) {\n                env.notebook.clear_cells_outputs();\n            }\n        },\n        'move-cell-down' : {\n            cmd: i18n.msg._('move cells down'),\n            help: i18n.msg._('move selected cells down'),\n            icon: 'fa-arrow-down',\n            help_index : 'eb',\n            handler : function (env) {\n                env.notebook.move_cell_down();\n            }\n        },\n        'move-cell-up' : {\n            cmd: i18n.msg._('move cells up'),\n            help: i18n.msg._('move selected cells up'),\n            icon: 'fa-arrow-up',\n            help_index : 'ea',\n            handler : function (env) {\n                env.notebook.move_cell_up();\n            }\n        },\n        'toggle-cell-line-numbers' : {\n            cmd: i18n.msg._('toggle line numbers'),\n            help    : i18n.msg._('toggle line numbers'),\n            help_index : 'ga',\n            handler : function (env) {\n                env.notebook.cell_toggle_line_numbers();\n            }\n        },\n        'show-keyboard-shortcuts' : {\n            cmd: i18n.msg._('show keyboard shortcuts'),\n            help    : i18n.msg._('show keyboard shortcuts'),\n            help_index : 'ge',\n            handler : function (env) {\n                env.quick_help.show_keyboard_shortcuts();\n            }\n        },\n        'delete-cell': {\n            cmd: i18n.msg._('delete cells'),\n            help: i18n.msg._('delete selected cells'),\n            help_index : 'ej',\n            handler : function (env) {\n                env.notebook.delete_cell();\n            }\n        },\n        'undo-cell-deletion' : {\n            cmd: i18n.msg._('undo cell deletion'),\n            help: i18n.msg._('undo cell deletion'),\n            help_index : 'ei',\n            handler : function (env) {\n                env.notebook.undelete_cell();\n            }\n        },\n        // TODO reminder\n        // open an issue, merge with above merge with last cell of notebook if at top.\n        'merge-cell-with-previous-cell' : {\n            cmd: i18n.msg._('merge cell with previous cell'),\n            help    : i18n.msg._('merge cell above'),\n            handler : function (env) {\n                env.notebook.merge_cell_above();\n            }\n        },\n        'merge-cell-with-next-cell' : {\n            cmd: i18n.msg._('merge cell with next cell'),\n            help    : i18n.msg._('merge cell below'),\n            help_index : 'ek',\n            handler : function (env) {\n                env.notebook.merge_cell_below();\n            }\n        },\n        'merge-selected-cells' : {\n            cmd: i18n.msg._('merge selected cells'),\n            help : i18n.msg._('merge selected cells'),\n            help_index: 'el',\n            handler: function(env) {\n                env.notebook.merge_selected_cells();\n            }\n        },\n        'merge-cells' : {\n            cmd: i18n.msg._('merge cells'),\n            help : i18n.msg._('merge selected cells, or current cell with cell below if only one cell is selected'),\n            help_index: 'el',\n            handler: function(env) {\n                var l = env.notebook.get_selected_cells_indices().length;\n                if(l == 1){\n                    env.notebook.merge_cell_below();\n                } else {\n                    env.notebook.merge_selected_cells();\n                }\n            }\n        },\n        'show-command-palette': {\n            help_index : 'aa',\n            cmd: i18n.msg._('show command pallette'),\n            help: i18n.msg._('open the command palette'),\n            icon: 'fa-keyboard-o',\n            handler : function(env){\n                env.notebook.show_command_palette();\n            }\n        },\n        'toggle-all-line-numbers': {\n            cmd: i18n.msg._('toggle all line numbers'),\n            help : i18n.msg._('toggles line numbers in all cells, and persist the setting'),\n            icon: 'fa-list-ol',\n            handler: function(env) {\n                var value = !env.notebook.line_numbers;\n                env.notebook.get_cells().map(function(c) {\n                    c.code_mirror.setOption('lineNumbers', value);\n                });\n                env.notebook.line_numbers = value;\n            }\n        },\n        'show-all-line-numbers': {\n            cmd: i18n.msg._('show all line numbers'),\n            help : i18n.msg._('show line numbers in all cells, and persist the setting'),\n            handler: function(env) {\n                env.notebook.get_cells().map(function(c) {\n                    c.code_mirror.setOption('lineNumbers', true);\n                });\n                env.notebook.line_numbers = true;\n            }\n        },\n        'hide-all-line-numbers': {\n            cmd: i18n.msg._('hide all line numbers'),\n            help : i18n.msg._('hide line numbers in all cells, and persist the setting'),\n            handler: function(env) {\n                env.notebook.get_cells().map(function(c) {\n                    c.code_mirror.setOption('lineNumbers', false);\n                });\n                env.notebook.line_numbers = false;\n            }\n        },\n        'toggle-header':{\n            cmd: i18n.msg._('toggle header'),\n            help: i18n.msg._('switch between showing and hiding the header'),\n            handler : function(env) {\n                var value = !env.notebook.header;\n                if (value === true) {\n                    $('#header-container').show();\n                    $('.header-bar').show();\n                } else if (value === false) {\n                    $('#header-container').hide();\n                    $('.header-bar').hide();\n                }\n                events.trigger('resize-header.Page');\n                env.notebook.header = value;\n            }\n        },\n        'show-header':{\n            cmd: i18n.msg._('show the header'),\n            help: i18n.msg._('show the header'),\n            handler : function(env) {\n                $('#header-container').show();\n                $('.header-bar').show();\n                events.trigger('resize-header.Page');\n                env.notebook.header = true;\n            }\n        },\n        'hide-header':{\n            cmd: i18n.msg._('hide the header'),\n            help: i18n.msg._('hide the header'),\n            handler : function(env) {\n                $('#header-container').hide();\n                $('.header-bar').hide();\n                events.trigger('resize-header.Page');\n                env.notebook.header = false;\n            }\n        },\n        'toggle-menubar':{\n            help: 'hide/show the menu bar',\n            handler : function(env) {\n                $('#menubar-container').toggle();\n                events.trigger('resize-header.Page');\n            }\n        },\n        'show-menubar':{\n            help: 'show the menu bar',\n            handler : function(env) {\n                $('#menubar-container').show();\n                events.trigger('resize-header.Page');\n            }\n        },\n        'hide-menubar':{\n            help: 'hide the menu bar',\n            handler : function(env) {\n                $('#menubar-container').hide();\n                events.trigger('resize-header.Page');\n            }\n        },\n        'toggle-toolbar':{\n            cmd: i18n.msg._('toggle toolbar'),\n            help: i18n.msg._('switch between showing and hiding the toolbar'),\n            handler : function(env) {\n                var value = !env.notebook.toolbar;\n                if (value === true) {\n                    $('div#maintoolbar').show();\n                } else if (value === false) {\n                    $('div#maintoolbar').hide();\n                }\n                events.trigger('resize-header.Page');\n                env.notebook.toolbar = value;\n            }\n        },\n        'show-toolbar':{\n            cmd: i18n.msg._('show the toolbar'),\n            help: i18n.msg._('show the toolbar'),\n            handler : function(env) {\n                $('div#maintoolbar').show();\n                events.trigger('resize-header.Page');\n                env.notebook.toolbar = true;\n            }\n        },\n        'hide-toolbar':{\n            cmd: i18n.msg._('hide the toolbar'),\n            help: i18n.msg._('hide the toolbar'),\n            handler : function(env) {\n                $('div#maintoolbar').hide();\n                events.trigger('resize-header.Page');\n                env.notebook.toolbar = false;\n            }\n        },\n        'close-pager': {\n            cmd: i18n.msg._('close the pager'),\n            help : i18n.msg._('close the pager'),\n            handler : function(env) {\n                // Collapse the page if it is open\n                if (env.pager && env.pager.expanded) {\n                    env.pager.collapse();\n                }\n            }\n        },\n    };\n\n    /**\n     * A bunch of `Advance actions` for Jupyter.\n     * Cf `Simple Action` plus the following properties.\n     *\n     * handler: first argument of the handler is the event that triggerd the action\n     *      (typically keypress). The handler is responsible for any modification of the\n     *      event and event propagation.\n     *      Is also responsible for returning false if the event have to be further ignored,\n     *      true, to tell keyboard manager that it ignored the event.\n     *\n     *      the second parameter of the handler is the environemnt passed to Simple Actions\n     *\n     **/\n    var custom_ignore = {\n        'ignore':{\n            cmd: i18n.msg._('ignore'),\n            handler : function () {\n                return true;\n            }\n        },\n        'move-cursor-up':{\n            cmd: i18n.msg._('move cursor up'),\n            help: i18n.msg._(\"move cursor up\"),\n            handler : function (env, event) {\n                var index = env.notebook.get_selected_index();\n                var cell = env.notebook.get_cell(index);\n                var cm = env.notebook.get_selected_cell().code_mirror;\n                var cur = cm.getCursor();\n                if (cell && cell.at_top() && index !== 0 && cur.ch === 0) {\n                    if(event){\n                        event.preventDefault();\n                    }\n                    env.notebook.command_mode();\n                    env.notebook.select_prev(true);\n                    env.notebook.edit_mode();\n                    cm = env.notebook.get_selected_cell().code_mirror;\n                    cm.setCursor(cm.lastLine(), 0);\n                }\n                return false;\n            }\n        },\n        'move-cursor-down':{\n            cmd: i18n.msg._('move cursor down'),\n            help: i18n.msg._(\"move cursor down\"),\n            handler : function (env, event) {\n                var index = env.notebook.get_selected_index();\n                var cell = env.notebook.get_cell(index);\n                if (cell.at_bottom() && index !== (env.notebook.ncells()-1)) {\n                    if(event){\n                        event.preventDefault();\n                    }\n                    env.notebook.command_mode();\n                    env.notebook.select_next(true);\n                    env.notebook.edit_mode();\n                    var cm = env.notebook.get_selected_cell().code_mirror;\n                    cm.setCursor(0, 0);\n                }\n                return false;\n            }\n        },\n        'scroll-notebook-down': {\n            cmd: i18n.msg._('scroll notebook down'),\n            help: i18n.msg._(\"scroll notebook down\"),\n            handler: function(env, event) {\n                if(event){\n                    event.preventDefault();\n                }\n                return env.notebook.scroll_manager.scroll(1);\n            },\n        },\n        'scroll-notebook-up': {\n            cmd: i18n.msg._('scroll notebook up'),\n            help: i18n.msg._(\"scroll notebook up\"),\n            handler: function(env, event) {\n                if(event){\n                    event.preventDefault();\n                }\n                return env.notebook.scroll_manager.scroll(-1);\n            },\n        },\n        'scroll-cell-center': {\n            cmd: i18n.msg._('scroll cell center'),\n            help: i18n.msg._(\"Scroll the current cell to the center\"),\n            handler: function (env, event) {\n                if(event){\n                    event.preventDefault();\n                }\n                var cell = env.notebook.get_selected_index();\n                return env.notebook.scroll_cell_percent(cell, 50, 0);\n            }\n        },\n        'scroll-cell-top': {\n            cmd: i18n.msg._('scroll cell top'),\n            help: i18n.msg._(\"Scroll the current cell to the top\"),\n            handler: function (env, event) {\n                if(event){\n                    event.preventDefault();\n                }\n                var cell = env.notebook.get_selected_index();\n                return env.notebook.scroll_cell_percent(cell, 0, 0);\n            }\n        },\n        'duplicate-notebook':{\n            cmd: i18n.msg._('duplicate notebook'),\n            help: i18n.msg._(\"Create and open a copy of the current notebook\"),\n            handler : function (env, event) {\n                env.notebook.copy_notebook();\n            }\n        },\n        'trust-notebook':{\n            cmd: i18n.msg._('trust notebook'),\n            help: i18n.msg._(\"Trust the current notebook\"),\n            handler : function (env, event) {\n                env.notebook.trust_notebook();\n            }\n        },\n        'rename-notebook':{\n            cmd: i18n.msg._('rename notebook'),\n            help: i18n.msg._(\"Rename the current notebook\"),\n            handler : function (env, event) {\n                env.notebook.save_widget.rename_notebook({notebook: env.notebook});\n            }\n        },\n        'toggle-all-cells-output-collapsed':{\n            cmd: i18n.msg._('toggle all cells output collapsed'),\n            help: i18n.msg._(\"Toggle the hidden state of all output areas\"),\n            handler : function (env, event) {\n                env.notebook.toggle_all_output();\n            }\n        },\n        'toggle-all-cells-output-scrolled':{\n            cmd: i18n.msg._('toggle all cells output scrolled'),\n            help: i18n.msg._(\"Toggle the scrolling state of all output areas\"),\n            handler : function (env, event) {\n                env.notebook.toggle_all_output_scroll();\n            }\n        },\n\n        'clear-all-cells-output':{\n            cmd: i18n.msg._('clear all cells output'),\n            help: i18n.msg._(\"Clear the content of all the outputs\"),\n            handler : function (env, event) {\n                env.notebook.clear_all_output();\n            }\n        },\n        'save-notebook':{\n            cmd: i18n.msg._('save notebook'),\n            help: i18n.msg._(\"Save and Checkpoint\"),\n            help_index : 'fb',\n            icon: 'fa-save',\n            handler : function (env, event) {\n                env.notebook.save_checkpoint();\n                if(event){\n                    event.preventDefault();\n                }\n                return false;\n            }\n        },\n    };\n\n    // private stuff that prepend `jupyter-notebook:` to actions names\n    // and uniformize/fill in missing pieces in of an action.\n    var _prepare_handler = function(registry, subkey, source){\n        registry['jupyter-notebook:'+subkey] = {};\n        registry['jupyter-notebook:'+subkey].cmd = source[subkey].cmd;\n        registry['jupyter-notebook:'+subkey].help = source[subkey].help||subkey.replace(/-/g,' ');\n        registry['jupyter-notebook:'+subkey].help_index = source[subkey].help_index;\n        registry['jupyter-notebook:'+subkey].icon = source[subkey].icon;\n        return source[subkey].handler;\n    };\n\n    // Will actually generate/register all the Jupyter actions\n    var fun = function(){\n        var final_actions = {};\n        var k;\n        for(k in _actions){\n            if(_actions.hasOwnProperty(k)){\n                // Js closure are function level not block level need to wrap in a IIFE\n                // and append jupyter-notebook: to event name these things do intercept event so are wrapped\n                // in a function that return false.\n                var handler = _prepare_handler(final_actions, k, _actions);\n                (function(key, handler){\n                    final_actions['jupyter-notebook:'+key].handler = function(env, event){\n                        handler(env);\n                        if(event){\n                            event.preventDefault();\n                        }\n                        return false;\n                    };\n                })(k, handler);\n            }\n        }\n\n        for(k in custom_ignore){\n            // Js closure are function level not block level need to wrap in a IIFE\n            // same as above, but decide for themselves whether or not they intercept events.\n            if(custom_ignore.hasOwnProperty(k)){\n                handler = _prepare_handler(final_actions, k, custom_ignore);\n                (function(key, handler){\n                    final_actions['jupyter-notebook:'+key].handler = function(env, event){\n                        return handler(env, event);\n                    };\n                })(k, handler);\n            }\n        }\n\n        return final_actions;\n    };\n    ActionHandler.prototype._actions = fun();\n\n\n    /**\n     *  extend the environment variable that will be pass to handlers\n     **/\n    ActionHandler.prototype.extend_env = function(env){\n        for(var k in env){\n            this.env[k] = env[k];\n        }\n    };\n\n    ActionHandler.prototype.register = function(action, name, prefix){\n        /**\n         * Register an `action` with an optional name and prefix.\n         *\n         * if name and prefix are not given they will be determined automatically.\n         * if action if just a `function` it will be wrapped in an anonymous action.\n         *\n         * @return the full name to access this action .\n         **/\n        action = this.normalise(action);\n        if( !name ){\n            name = 'autogenerated-'+String(action.handler);\n        }\n        prefix = prefix || 'auto';\n        var full_name = prefix+':'+name;\n        this._actions[full_name] = action;\n        return full_name;\n\n    };\n\n\n    ActionHandler.prototype.normalise = function(data){\n        /**\n         * given an `action` or `function`, return a normalised `action`\n         * by setting all known attributes and removing unknown attributes;\n         **/\n        if(typeof(data) === 'function'){\n            data = {handler:data};\n        }\n        if(typeof(data.handler) !== 'function'){\n            throw new Error('unknown datatype, cannot register');\n        }\n        var _data = data;\n        data = {};\n        data.handler = _data.handler;\n        data.help = _data.help || '';\n        data.icon = _data.icon || '';\n        data.help_index = _data.help_index || '';\n        return data;\n    };\n\n    ActionHandler.prototype.get_name = function(name_or_data){\n        /**\n         * given an `action` or `name` of a action, return the name attached to this action.\n         * if given the name of and corresponding actions does not exist in registry, return `null`.\n         **/\n\n        if(typeof(name_or_data) === 'string'){\n            warn_bad_name(name);\n            if(this.exists(name_or_data)){\n                return name_or_data;\n            } else {\n                return null;\n            }\n        } else {\n            return this.register(name_or_data);\n        }\n    };\n\n    ActionHandler.prototype.get = function(name){\n        warn_bad_name(name);\n        return this._actions[name];\n    };\n\n    ActionHandler.prototype.call = function(name, event, env){\n        return this._actions[name].handler(env|| this.env, event);\n    };\n\n    ActionHandler.prototype.exists = function(name){\n        return (typeof(this._actions[name]) !== 'undefined');\n    };\n\n    return {init:ActionHandler};\n\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n *\n *\n * @module keyboardmanager\n * @namespace keyboardmanager\n * @class KeyboardManager\n */\n\ndefine('notebook/js/keyboardmanager',[\n    'jquery',\n    'base/js/utils',\n    'base/js/keyboard',\n], function($, utils, keyboard) {\n    \"use strict\";\n    \n    // Main keyboard manager for the notebook\n    var keycodes = keyboard.keycodes;\n\n    var KeyboardManager = function (options) {\n        /**\n         * A class to deal with keyboard event and shortcut\n         *\n         * @class KeyboardManager\n         * @constructor\n         * @param options {dict} Dictionary of keyword arguments :\n         *    @param options.events {$(Events)} instance \n         *    @param options.pager: {Pager}  pager instance\n         */\n        this.mode = 'command';\n        this.enabled = true;\n        this.pager = options.pager;\n        this.quick_help = undefined;\n        this.notebook = undefined;\n        this.last_mode = undefined;\n        this.bind_events();\n        this.env = {pager:this.pager};\n        this.actions = options.actions;\n        this.command_shortcuts = new keyboard.ShortcutManager(undefined, options.events, this.actions, this.env, options.config, 'command');\n        this.command_shortcuts._add_default_shortcuts(this.get_default_common_shortcuts());\n        this.command_shortcuts._add_default_shortcuts(this.get_default_command_shortcuts());\n        this.edit_shortcuts = new keyboard.ShortcutManager(undefined, options.events, this.actions, this.env);\n        this.edit_shortcuts._add_default_shortcuts(this.get_default_common_shortcuts());\n        this.edit_shortcuts._add_default_shortcuts(this.get_default_edit_shortcuts());\n\n\n        this.config = options.config;\n        var that = this;\n\n        this.config.loaded.then(function(){ \n            var edit_unbind;\n\n            try {\n                edit_unbind = that.config.data.keys.edit.unbind||[];\n            } catch (e) {\n                if (e instanceof TypeError) {\n                    edit_unbind = [];\n                } else {\n                    throw e;\n                }\n            }\n\n            edit_unbind.forEach(function(u){that.edit_shortcuts.remove_shortcut(u);});\n\n            var command_unbind;\n\n            try {\n                command_unbind = that.config.data.keys.command.unbind||[];\n            } catch (e) {\n                if (e instanceof TypeError) {\n                    command_unbind = [];\n                } else {\n                    throw e;\n                }\n            }\n\n            command_unbind.forEach(function(u){that.command_shortcuts.remove_shortcut(u);});\n\n            that.command_shortcuts.add_shortcuts( ((that.config.data.keys||{}).command||{}).bind);\n            that.edit_shortcuts.add_shortcuts(    ((that.config.data.keys||{}).edit   ||{}).bind);\n\n            }\n        );\n\n        Object.seal(this);\n    };\n\n\n\n\n    /**\n     * Return a dict of common shortcut\n     * @method get_default_common_shortcuts\n     *\n     * @example Example of returned shortcut\n     * ```\n     * 'shortcut-key': 'action-name'\n     * // a string representing the shortcut as dash separated value.\n     * // e.g. 'shift' , 'shift-enter', 'cmd-t'\n     *```\n     */\n    KeyboardManager.prototype.get_default_common_shortcuts = function() {\n        return {\n            'shift'       : 'jupyter-notebook:ignore',\n            'shift-enter' : 'jupyter-notebook:run-cell-and-select-next',\n            'ctrl-enter'  : 'jupyter-notebook:run-cell',\n            'alt-enter'   : 'jupyter-notebook:run-cell-and-insert-below',\n            // cmd on mac, ctrl otherwise\n            'cmdtrl-s'    : 'jupyter-notebook:save-notebook'\n        };\n    };\n\n    KeyboardManager.prototype.get_default_edit_shortcuts = function() {\n        return {\n            'cmdtrl-shift-p'      : 'jupyter-notebook:show-command-palette',\n            'cmdtrl-shift-f'      : 'jupyter-notebook:show-command-palette',\n            'esc'                 : 'jupyter-notebook:enter-command-mode',\n            'ctrl-m'              : 'jupyter-notebook:enter-command-mode',\n            'up'                  : 'jupyter-notebook:move-cursor-up',\n            'down'                : 'jupyter-notebook:move-cursor-down',\n            'ctrl-shift--'        : 'jupyter-notebook:split-cell-at-cursor',\n        };\n    };\n\n    KeyboardManager.prototype.get_default_command_shortcuts = function() {\n        return {\n            'cmdtrl-shift-p': 'jupyter-notebook:show-command-palette',\n            'cmdtrl-shift-f': 'jupyter-notebook:show-command-palette',\n            'shift-space': 'jupyter-notebook:scroll-notebook-up',\n            'shift-v' : 'jupyter-notebook:paste-cell-above',\n            'shift-m' : 'jupyter-notebook:merge-cells',\n            'shift-o' : 'jupyter-notebook:toggle-cell-output-scrolled',\n            'enter' : 'jupyter-notebook:enter-edit-mode',\n            'space' : 'jupyter-notebook:scroll-notebook-down',\n            'down' : 'jupyter-notebook:select-next-cell',\n            'i,i' : 'jupyter-notebook:interrupt-kernel',\n            '0,0' : 'jupyter-notebook:confirm-restart-kernel',\n            'd,d' : 'jupyter-notebook:delete-cell',\n            'esc': 'jupyter-notebook:close-pager',\n            'up' : 'jupyter-notebook:select-previous-cell',\n            'k' : 'jupyter-notebook:select-previous-cell',\n            'j' : 'jupyter-notebook:select-next-cell',\n            'shift-k': 'jupyter-notebook:extend-selection-above',\n            'shift-j': 'jupyter-notebook:extend-selection-below',\n            'shift-up': 'jupyter-notebook:extend-selection-above',\n            'shift-down': 'jupyter-notebook:extend-selection-below',\n            'x' : 'jupyter-notebook:cut-cell',\n            'c' : 'jupyter-notebook:copy-cell',\n            'v' : 'jupyter-notebook:paste-cell-below',\n            'a' : 'jupyter-notebook:insert-cell-above',\n            'b' : 'jupyter-notebook:insert-cell-below',\n            'y' : 'jupyter-notebook:change-cell-to-code',\n            'm' : 'jupyter-notebook:change-cell-to-markdown',\n            'r' : 'jupyter-notebook:change-cell-to-raw',\n            '1' : 'jupyter-notebook:change-cell-to-heading-1',\n            '2' : 'jupyter-notebook:change-cell-to-heading-2',\n            '3' : 'jupyter-notebook:change-cell-to-heading-3',\n            '4' : 'jupyter-notebook:change-cell-to-heading-4',\n            '5' : 'jupyter-notebook:change-cell-to-heading-5',\n            '6' : 'jupyter-notebook:change-cell-to-heading-6',\n            'o' : 'jupyter-notebook:toggle-cell-output-collapsed',\n            's' : 'jupyter-notebook:save-notebook',\n            'l' : 'jupyter-notebook:toggle-cell-line-numbers',\n            'shift-l' : 'jupyter-notebook:toggle-all-line-numbers',\n            'h' : 'jupyter-notebook:show-keyboard-shortcuts',\n            'z' : 'jupyter-notebook:undo-cell-deletion',\n            'q' : 'jupyter-notebook:close-pager',\n            'p' : 'jupyter-notebook:show-command-palette',\n        };\n    };\n\n    KeyboardManager.prototype.bind_events = function () {\n        var that = this;\n        $(document).keydown(function (event) {\n            if(event._ipkmIgnore===true||(event.originalEvent||{})._ipkmIgnore===true){\n                return false;\n            }\n            return that.handle_keydown(event);\n        });\n    };\n\n    KeyboardManager.prototype.set_notebook = function (notebook) {\n        this.notebook = notebook;\n        this.actions.extend_env({notebook:notebook});\n    };\n    \n    KeyboardManager.prototype.set_quickhelp = function (notebook) {\n        this.actions.extend_env({quick_help:notebook});\n    };\n\n\n    KeyboardManager.prototype.handle_keydown = function (event) {\n        /**\n         *  returning false from this will stop event propagation\n         **/\n\n        if (event.which === keycodes.esc) {\n            // Intercept escape at highest level to avoid closing\n            // websocket connection with firefox\n            event.preventDefault();\n        }\n        \n        if (!this.enabled) {\n            if (event.which === keycodes.esc) {\n                this.notebook.command_mode();\n                return false;\n            }\n            return true;\n        }\n        \n        if (this.mode === 'edit') {\n            return this.edit_shortcuts.call_handler(event);\n        } else if (this.mode === 'command') {\n            return this.command_shortcuts.call_handler(event);\n        }\n        return true;\n    };\n\n    KeyboardManager.prototype.edit_mode = function () {\n        this.last_mode = this.mode;\n        this.mode = 'edit';\n    };\n\n    KeyboardManager.prototype.command_mode = function () {\n        this.last_mode = this.mode;\n        this.mode = 'command';\n    };\n\n    KeyboardManager.prototype.enable = function () {\n        this.enabled = true;\n    };\n\n    KeyboardManager.prototype.disable = function () {\n        this.enabled = false;\n    };\n\n    KeyboardManager.prototype.register_events = function (e) {\n        e = $(e);\n        var that = this;\n        var handle_focus = function () {\n            that.disable();\n        };\n        var handle_blur = function () {\n            that.enable();\n        };\n        e.on('focusin', handle_focus);\n        e.on('focusout', handle_blur);\n        // TODO: Very strange. The focusout event does not seem fire for the \n        // bootstrap textboxes on FF25&26...  This works around that by \n        // registering focus and blur events recursively on all inputs within\n        // registered element.\n        e.find('input').blur(handle_blur);\n        e.on('DOMNodeInserted', function (event) {\n            var target = $(event.target);\n            if (target.is('input')) {\n                target.blur(handle_blur);\n            } else {\n                target.find('input').blur(handle_blur);    \n            }\n          });\n        // There are times (raw_input) where we remove the element from the DOM before\n        // focusout is called. In this case we bind to the remove event of jQueryUI,\n        // which gets triggered upon removal, iff it is focused at the time.\n        // is_focused must be used to check for the case where an element within\n        // the element being removed is focused.\n        e.on('remove', function () {\n            if (utils.is_focused(e[0])) {\n                that.enable();\n            }\n        });\n    };\n\n    return {'KeyboardManager': KeyboardManager};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/kernelselector',[\n    'jquery',\n    'base/js/namespace',\n    'base/js/dialog',\n    'base/js/utils',\n    'base/js/i18n'\n], function($, IPython, dialog, utils, i18n) {\n    \"use strict\";\n    \n    var KernelSelector = function(selector, notebook) {\n        var that = this;\n        this.selector = selector;\n        this.notebook = notebook;\n        this.notebook.set_kernelselector(this);\n        this.events = notebook.events;\n        this.current_selection = null;\n        this.kernelspecs = {};\n        if (this.selector !== undefined) {\n            this.element = $(selector);\n            this.request_kernelspecs();\n        }\n        this.bind_events();\n        // Make the object globally available for user convenience & inspection\n        IPython.kernelselector = this;\n        this._finish_load = null;\n        this._loaded = false;\n        this.loaded = new Promise(function(resolve) {\n            that._finish_load = resolve;\n        });\n        \n        Object.seal(this);\n    };\n    \n    KernelSelector.prototype.request_kernelspecs = function() {\n        // Preliminary documentation for kernelspecs api is at \n        // https://github.com/ipython/ipython/wiki/IPEP-25%3A-Registry-of-installed-kernels#rest-api\n        var url = utils.url_path_join(this.notebook.base_url, 'api/kernelspecs');\n        utils.promising_ajax(url).then($.proxy(this._got_kernelspecs, this));\n    };\n    \n    var _sorted_names = function(kernelspecs) {\n        // sort kernel names\n        return Object.keys(kernelspecs).sort(function (a, b) {\n            // sort by display_name\n            var da = kernelspecs[a].spec.display_name;\n            var db = kernelspecs[b].spec.display_name;\n            if (da === db) {\n                return 0;\n            } else if (da > db) {\n                return 1;\n            } else {\n                return -1;\n            }\n        });\n    };\n    \n    KernelSelector.prototype._got_kernelspecs = function(data) {\n        var that = this;\n        this.kernelspecs = data.kernelspecs;\n        var change_kernel_submenu = $(\"#menu-change-kernel-submenu\");\n        var new_notebook_submenu = $(\"#menu-new-notebook-submenu\");\n        var keys = _sorted_names(data.kernelspecs);\n        \n        keys.map(function (key) {\n            // Create the Kernel > Change kernel submenu\n            var ks = data.kernelspecs[key];\n            change_kernel_submenu.append(\n                $(\"<li>\").attr(\"id\", \"kernel-submenu-\"+ks.name).append(\n                    $('<a>')\n                        .attr('href', '#')\n                        .click( function () {\n                            that.set_kernel(ks.name);\n                        })\n                        .text(ks.spec.display_name)\n                )\n            );\n            // Create the File > New Notebook submenu\n            new_notebook_submenu.append(\n                $(\"<li>\").attr(\"id\", \"new-notebook-submenu-\"+ks.name).append(\n                    $('<a>')\n                        .attr('href', '#')\n                        .click( function () {\n                            that.new_notebook(ks.name);\n                        })\n                        .text(ks.spec.display_name)\n                )\n            );\n\n        });\n        // trigger loaded promise\n        this._loaded = true;\n        this._finish_load();\n    };\n    \n    KernelSelector.prototype._spec_changed = function (event, ks) {\n        /** event handler for spec_changed */\n        var that = this;\n        \n        // update selection\n        this.current_selection = ks.name;\n        \n        // put the current kernel at the top of File > New Notebook\n        var cur_kernel_entry = $(\"#new-notebook-submenu-\" + ks.name);\n        var parent = cur_kernel_entry.parent();\n        // do something only if there is more than one kernel\n        if (parent.children().length > 1) {\n            // first, sort back the submenu\n            parent.append(\n                parent.children(\"li[class!='divider']\").sort(\n                    function (a,b) {\n                        var da = $(\"a\",a).text();\n                        var db = $(\"a\",b).text();\n                        if (da === db) {\n                            return 0;\n                        } else if (da > db) {\n                            return 1;\n                        } else {\n                            return -1;\n                        }}));\n            // then, if there is no divider yet, add one\n            if (!parent.children(\"li[class='divider']\").length) {\n                parent.prepend($(\"<li>\").attr(\"class\",\"divider\"));\n            } \n            // finally, put the current kernel at the top\n            parent.prepend(cur_kernel_entry);\n        }\n        \n        // load logo\n        var logo_img = this.element.find(\"img.current_kernel_logo\");\n        $(\"#kernel_indicator\").find('.kernel_indicator_name').text(ks.spec.display_name);\n        if (ks.resources['logo-64x64']) {\n            logo_img.attr(\"src\", ks.resources['logo-64x64']);\n            logo_img.attr(\"title\", ks.spec.display_name);\n            logo_img.show();\n        } else {\n            logo_img.hide();\n        }\n        \n        // load kernel css\n        var css_url = ks.resources['kernel.css'];\n        if (css_url) {\n            $('#kernel-css').attr('href', css_url);\n        } else {\n            $('#kernel-css').attr('href', '');\n        }\n        \n        // load kernel js\n        if (ks.resources['kernel.js']) {\n\n            // Debug added for Notebook 4.2, please remove at some point in the\n            // future if the following does not append anymore when kernels\n            // have kernel.js\n            //\n            // > Uncaught (in promise) TypeError: require is not a function\n            // \n            console.info('Dynamically requiring kernel.js, `requirejs` is ', requirejs);\n            requirejs([ks.resources['kernel.js']],\n                function (kernel_mod) {\n                    if (kernel_mod && kernel_mod.onload) {\n                        kernel_mod.onload();\n                    } else {\n                        console.warn(\"Kernel \" + ks.name + \" has a kernel.js file that does not contain \"+\n                                     \"any asynchronous module definition. This is undefined behavior \"+\n                                     \"and not recommended.\");\n                    }\n                }, function (err) {\n                    console.warn(\"Failed to load kernel.js from \", ks.resources['kernel.js'], err);\n                }\n            );\n            this.events.on('spec_changed.Kernel', function (evt, new_ks) {\n                if (ks.name != new_ks.name) {\n                    console.warn(\"kernelspec %s had custom kernel.js. Forcing page reload for %s.\",\n                        ks.name, new_ks.name);\n                    that.notebook.save_notebook().then(function () {\n                        window.location.reload();\n                    });\n                }\n            });\n        }\n    };\n\n    KernelSelector.prototype.set_kernel = function (selected) {\n        /** set the kernel by name, ensuring kernelspecs have been loaded, first \n        \n        kernel can be just a kernel name, or a notebook kernelspec metadata\n        (name, language, display_name).\n        */\n        var that = this;\n        if (typeof selected === 'string') {\n            selected = {\n                name: selected\n            };\n        }\n        if (this._loaded) {\n            this._set_kernel(selected);\n        } else {\n            return this.loaded.then(function () {\n                that._set_kernel(selected);\n            });\n        }\n    };\n\n    KernelSelector.prototype._set_kernel = function (selected) {\n        /** Actually set the kernel (kernelspecs have been loaded) */\n        if (selected.name === this.current_selection) {\n            // only trigger event if value changed\n            return;\n        }\n        var kernelspecs = this.kernelspecs;\n        var ks = kernelspecs[selected.name];\n        if (ks === undefined) {\n            var available = _sorted_names(kernelspecs);\n            var matches = [];\n            if (selected.language && selected.language.length > 0) {\n                available.map(function (name) {\n                    if (kernelspecs[name].spec.language.toLowerCase() === selected.language.toLowerCase()) {\n                        matches.push(name);\n                    }\n                });\n            }\n            if (matches.length === 1) {\n                ks = kernelspecs[matches[0]];\n                console.log(\"No exact match found for \" + selected.name +\n                    \", using only kernel that matches language=\" + selected.language, ks);\n                this.events.trigger(\"spec_match_found.Kernel\", {\n                    selected: selected,\n                    found: ks,\n                });\n            }\n            // if still undefined, trigger failure event\n            if (ks === undefined) {\n                this.events.trigger(\"spec_not_found.Kernel\", {\n                    selected: selected,\n                    matches: matches,\n                    available: available,\n                });\n                return;\n            }\n        }\n        if (this.notebook._session_starting &&\n            this.notebook.session.kernel.name !== ks.name) {\n            console.error(\"Cannot change kernel while waiting for pending session start.\");\n            return;\n        }\n        this.current_selection = ks.name;\n        this.events.trigger('spec_changed.Kernel', ks);\n    };\n    \n    KernelSelector.prototype._spec_not_found = function (event, data) {\n        var that = this;\n        var select = $(\"<select>\").addClass('form-control');\n        console.warn(\"Kernelspec not found:\", data);\n        var names;\n        if (data.matches.length > 1) {\n            names = data.matches;\n        } else {\n            names = data.available;\n        }\n        names.map(function (name) {\n            var ks = that.kernelspecs[name];\n            select.append(\n                $('<option/>').attr('value', ks.name).text(ks.spec.display_name || ks.name)\n            );\n        });\n        \n        var no_kernel_msg = i18n.msg.sprintf(i18n.msg._(\"Could not find a kernel matching %s. Please select a kernel:\"),\n                (data.selected.display_name || data.selected.name))\n        var body = $(\"<form>\").addClass(\"form-inline\").append(\n            $(\"<span>\").text(no_kernel_msg)\n        ).append(select);\n\n        // This statement is used simply so that message extraction\n        // will pick up the strings.  The actual setting of the text\n        // for the button is in dialog.js.\n        var button_labels = [ i18n.msg._(\"Continue Without Kernel\"), i18n.msg._(\"Set Kernel\"), i18n.msg._(\"OK\") ];\n        \n        dialog.modal({\n            title : i18n.msg._('Kernel not found'),\n            body : body,\n            buttons : {\n                'Continue Without Kernel' : {\n                    class : 'btn-danger',\n                    click : function () {\n                        that.events.trigger('no_kernel.Kernel');\n                    }\n                },\n                'Set Kernel' : {\n                    class : 'btn-primary',\n                    click : function () {\n                        that.set_kernel(select.val());\n                    }\n                }\n            }\n        });\n    };\n\n    KernelSelector.prototype.new_notebook = function (kernel_name) {\n        \n        var w = window.open('', IPython._target);\n        // Create a new notebook in the same path as the current\n        // notebook's path.\n        var that = this;\n        var parent = utils.url_path_split(that.notebook.notebook_path)[0];\n        that.notebook.contents.new_untitled(parent, {type: \"notebook\"}).then(\n            function (data) {\n                var url = utils.url_path_join(\n                    that.notebook.base_url, 'notebooks',\n                    utils.encode_uri_components(data.path)\n                );\n                url += \"?kernel_name=\" + kernel_name;\n                w.location = url;\n            },\n            function(error) {\n                w.close();\n                dialog.modal({\n                    title : i18n.msg._('Creating Notebook Failed'),\n                    body : i18n.msg.sprintf(i18n.msg._(\"The error was: %s\"), error.message),\n                    buttons : {'OK' : {'class' : 'btn-primary'}}\n                });\n            }\n        );\n    };\n\n    KernelSelector.prototype.lock_switch = function() {\n        // should set a flag and display warning+reload if user want to\n        // re-change kernel. As UI discussion never finish\n        // making that a separate PR.\n        console.warn('switching kernel is not guaranteed to work !');\n    };\n\n    KernelSelector.prototype.bind_events = function() {\n        var that = this;\n        this.events.on('spec_changed.Kernel', $.proxy(this._spec_changed, this));\n        this.events.on('spec_not_found.Kernel', $.proxy(this._spec_not_found, this));\n        this.events.on('kernel_created.Session', function (event, data) {\n            that.set_kernel(data.kernel.name);\n        });\n        \n        var logo_img = this.element.find(\"img.current_kernel_logo\");\n        logo_img.on(\"load\", function() {\n            logo_img.show();\n        });\n        logo_img.on(\"error\", function() {\n            logo_img.hide();\n        });\n    };\n\n    return {'KernelSelector': KernelSelector};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nrequire([\n    'jquery',\n    'base/js/dialog',\n    'base/js/i18n',\n    'underscore',\n    'base/js/namespace'\n], function ($, dialog, i18n, _, IPython) {\n    'use strict';\n    $('#notebook_about').click(function () {\n        // use underscore template to auto html escape\n        if (sys_info) {\n          var text = i18n.msg._('You are using Jupyter notebook.');\n          text = text + '<br/><br/>';\n          text = text + i18n.msg._('The version of the notebook server is: ');\n          text = text + _.template('<b><%- version %></b>')({ version: sys_info.notebook_version });\n          if (sys_info.commit_hash) {\n              text = text + _.template('-<%- hash %>')({ hash: sys_info.commit_hash });\n          }\n         text = text + '<br/>';\n         text = text + i18n.msg._('The server is running on this version of Python:');\n          text = text + _.template('<br/><pre>Python <%- pyver %></pre>')({ \n            pyver: sys_info.sys_version });\n          var kinfo = $('<div/>').attr('id', '#about-kinfo').text(i18n.msg._('Waiting for kernel to be available...'));\n          var body = $('<div/>');\n          body.append($('<h4/>').text(i18n.msg._('Server Information:')));\n          body.append($('<p/>').html(text));\n          body.append($('<h4/>').text(i18n.msg._('Current Kernel Information:')));\n          body.append(kinfo);\n        } else {\n          var text = i18n.msg._('Could not access sys_info variable for version information.');\n          var body = $('<div/>');\n          body.append($('<h4/>').text(i18n.msg._('Cannot find sys_info!')));\n          body.append($('<p/>').html(text));\n        }\n        dialog.modal({\n            title: i18n.msg._('About Jupyter Notebook'),\n            body: body,\n            buttons: { 'OK': {} }\n        });\n        try {\n            IPython.notebook.session.kernel.kernel_info(function (data) {\n                kinfo.html($('<pre/>').text(data.content.banner));\n            });\n        } catch (e) {\n            kinfo.html($('<p/>').text(i18n.msg._('unable to contact kernel')));\n        }\n    });\n});\n\ndefine(\"notebook/js/about\", function(){});\n\n",
    "define('notebook/js/searchandreplace',[\n    'jquery',\n    'base/js/dialog',\n    'base/js/i18n'\n], function($, dialog, i18n){\n  \"use strict\";\n\n  /**\n   * escape a Regular expression to act as  a pure search string.\n   * though it will still have the case sensitivity options and all\n   * the benefits\n   **/\n  function escapeRegExp(string){\n    return string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n  }\n\n  /**\n   * Compute the model of the preview for the search and replace.\n   * It might not be perfectly accurate if matches overlap...\n   * Parameter:\n   *   sre: the string that will become the Search Regular Expression\n   *   arr: a list of string on which the match will be applied.\n   *   isCaseSensitive: should the match be CaseSensitive\n   *   RegExOrNot: a `RegExOrNot` object.\n   *   replace: the replacement string for the matching `sre`\n   * Return: a tuple of 2 value:\n   *   1) array of [before match, match, replacement, after match]\n   *      where before and after match are cut to a reasonable length after the match.\n   *   2) Boolean, whether the matching has been aborted because one of the element of\n   *      arr have too many matches.\n   **/\n  var compute_preview_model = function(sre, arr, isCaseSensitive, RegExpOrNot, replace){\n    var html = [];\n    // and create an array of\n    // before_match, match , replacement, after_match\n    var aborted = false;\n    var replacer_reg = new RegExpOrNot(sre);\n    for(var r=0; r < arr.length; r++){\n      var current_line = arr[r];\n      var match_abort = getMatches(sre, current_line, isCaseSensitive, RegExpOrNot);\n      aborted = aborted || match_abort[1];\n      var matches = match_abort[0];\n      for(var mindex=0; mindex < matches.length ; mindex++){\n        var start = matches[mindex][0];\n        var stop = matches[mindex][1];\n        var initial = current_line.slice(start, stop);\n        var replaced = initial.replace(replacer_reg, replace);\n        // that might be better as a dictionary\n        html.push([cutBefore(current_line.slice(0, start)),\n                   initial,\n                   replaced,\n                   cutAfter(current_line.slice(stop), 30-(stop-start))]);\n      }\n    }\n    return [html, aborted];\n  };\n\n  /**\n   * Build the preview model where things matched and their replacement values\n   * are wrapped in tags with correct CSS classes.\n   * Parameter:\n   *   body: jQuery element into which the preview will be build\n   *   aborted : have the model been aborted (Boolean) use to tell the user\n   *      that the preview might not show all the replacements\n   *   html: array of model created by compute_preview_model\n   *   replace: Boolean: whether we are actually replacing with something or just matching.\n   **/\n  var build_preview = function(body, aborted, html, replace){\n    body.empty();\n    if(aborted){\n      var warnmsg = i18n.msg.sprintf(i18n.msg._(\"Warning: too many matches (%d). Some changes might not be shown or applied.\"),html.length);\n      body.append($('<p/>').addClass('bg-warning').text(warnmsg));\n    } else {\n      var matchmsg = i18n.msg.sprintf(i18n.msg.ngettext(\"%d match\",\"%d matches\",html.length),html.length);\n      body.append($('<p/>').text(matchmsg));\n    }\n    for(var rindex=0; rindex<html.length; rindex++){\n      var pre = $('<pre/>')\n        .append(html[rindex][0])\n        .append($('<span/>').addClass('match').text(html[rindex][1]));\n      if(replace){\n        pre.append($('<span/>').addClass('insert').text(html[rindex][2]));\n        pre.addClass('replace');\n      }\n      pre.append(html[rindex][3]);\n      body.append(pre);\n    }\n  };\n\n  /**\n   * Given a string, return only the beginning, with potentially an ellipsis\n   * at the end.\n   **/\n  var cutAfter = function(string, n){\n    n=n||10;\n    while(n<10){\n      n+=15;\n    }\n    if(string.length > n+3){\n        return string.slice(0, n)+'...';\n    }\n    return string;\n  };\n\n  /**\n   * Given a string, return only the end, with potentially an ellipsis\n   * at the beginning.\n   **/\n  var cutBefore = function(string){\n    if(string.length > 33){\n        return '...'+string.slice(-30);\n    }\n    return string;\n  };\n\n  /**\n   * Find all occurrences of `re` in `string`, match in a `caseSensitive`\n   * manner or not, and determine whether `re` is a RegExp or not depending of\n   * the type of object passed as `r`.\n   *\n   * Return a tuple\n   *  1) list of matches [start, stop] indexes in the string.\n   *  2) abort Boolean, if more that 100 matches and the matches were aborted.\n   **/\n  var getMatches = function(re, string, caseSensitive, r){\n    var extra = caseSensitive ? '':'i';\n    extra = '';\n    try {\n      re = r(re, 'g'+extra);// have to global or infinite loop\n    } catch (e){\n      return [[], false];\n    }\n    var res = [];\n    var match;\n    var escape_hatch = 0;\n    var abort = false;\n    while((match = re.exec(string)) !== null) {\n        res.push([match.index, match.index+match[0].length]);\n        escape_hatch++;\n        if(escape_hatch > 100){\n          console.warn(i18n.msg._(\"More than 100 matches, aborting\"));\n          abort = true;\n          break;\n        }\n    }\n    return [res, abort];\n  };\n\n  // main function\n  /**\n   * Search N' Replace action handler.\n   **/\n  var snr = function(env, event) {\n      \n    var isRegExpButton = $('<button/>')\n      .attr('type', 'button')\n      .attr('id', 'isreg')\n      .addClass(\"btn btn-default btn-sm\")\n      .attr('data-toggle','button')\n      .css('font-weight', 'bold')\n      .attr('title', i18n.msg._('Use regex (JavaScript regex syntax)'))\n      .text('.*');\n\n      var allCellsButton = $('<button/>')\n      .append($('<i/>').addClass('fa fa-arrows-v'))\n      .attr('type', 'button')\n      .addClass(\"btn btn-default btn-sm\")\n      .attr('data-toggle','button')\n      .attr('title', i18n.msg._('Replace in selected cells'));\n\n    var isCaseSensitiveButton = $('<button/>')\n      .attr('type', 'button')\n      .addClass(\"btn btn-default btn-sm\")\n      .attr('data-toggle','button')\n      .attr('tabindex', '0')\n      .attr('title', i18n.msg._('Match case'))\n      .css('font-weight', 'bold')\n      .text('Aa');\n     \n    var search  = $(\"<input/>\")\n      .addClass('form-control input-sm')\n      .attr('placeholder',i18n.msg._('Find'));\n\n    var findFormGroup = $('<div/>').addClass('form-group');\n    findFormGroup.append(\n        $('<div/>').addClass('input-group')\n        .append(\n            $('<div/>').addClass('input-group-btn')\n                .append(isCaseSensitiveButton)\n                .append(isRegExpButton)\n                .append(allCellsButton)\n        )\n        .append(search)\n    )\n\n    var replace = $(\"<input/>\")\n      .addClass('form-control input-sm')\n      .attr('placeholder',i18n.msg._('Replace'));\n    var replaceFormGroup = $('<div/>').addClass('form-group');\n    replaceFormGroup.append(replace);\n\n    var body = $('<div/>').attr('id', 'replace-preview');\n     \n    var form = $('<form/>').attr('id', 'find-and-replace')\n    form.append(findFormGroup);\n    form.append(replaceFormGroup);\n    form.append(body);\n\n    // return whether the search is case sensitive\n    var isCaseSensitive = function(){\n      var value =  isCaseSensitiveButton.attr('aria-pressed') == 'true';\n      return value;\n    };\n\n    // return whether the search is RegExp based, or\n    // plain string matching.\n    var isReg = function(){\n      var value =  isRegExpButton.attr('aria-pressed') == 'true';\n      return value;\n    };\n\n    var allCells = function(){\n      return (allCellsButton.attr('aria-pressed') == 'true');\n    };\n\n\n    // return a Pseudo RegExp object that acts\n    // either as a plain RegExp Object, or as a pure string matching.\n    // automatically set the flags for case sensitivity from the UI\n    var RegExpOrNot = function(str, flags){\n      if (!isCaseSensitive()){\n        flags = (flags || '')+'i';\n      }\n      if (isRegExpButton.attr('aria-pressed') === 'true'){\n        return new RegExp(str, flags);\n      } else {\n        return new RegExp(escapeRegExp(str), flags);\n      }\n    };\n\n\n    var onError = function(body){\n      body.empty();\n      body.append($('<p/>').text(i18n.msg._('No matches, invalid or empty regular expression')));\n    };\n\n    var get_cells = function(env){\n      if(allCells()){\n        return env.notebook.get_cells();\n      } else {\n        return env.notebook.get_selected_cells();\n      }\n    };\n\n    var get_all_text = function(cells) {\n      var arr = [];\n      for (var c = 0; c < cells.length; c++) {\n        arr = arr.concat(cells[c].code_mirror.getValue().split('\\n'));\n      }\n      return arr;\n    };\n    /**\n     * callback triggered anytime a change is made to the\n     * request, case sensitivity, isregex, search or replace\n     * modification.\n     **/\n    var onChange = function(){\n\n      var sre = search.val();\n      // abort on invalid RE\n      if (!sre) {\n        return onError(body);\n      }\n      try {\n        new RegExpOrNot(sre);\n      } catch (e) {\n        return onError(body);\n      }\n\n      // might want to warn if replace is empty\n      var replaceValue = replace.val();\n      var lines = get_all_text(get_cells(env));\n\n      var _hb = compute_preview_model(sre, lines, isCaseSensitive(), RegExpOrNot, replaceValue);\n      var html = _hb[0];\n      var aborted = _hb[1];\n\n      build_preview(body, aborted, html, replaceValue);\n\n      // done on type return false not to submit form\n      return false;\n    };\n\n    var onsubmit = function(event) {\n      var sre = search.val();\n      var replaceValue = replace.val();\n      if (!sre) {\n        return false;\n      }\n      // should abort on invalid RegExp.\n\n      // need to be multi line if we want to directly replace in codemirror.\n      // or need to split/replace/join\n      var reg = RegExpOrNot(sre, 'gm');\n      var cells = get_cells(env);\n      for (var c = 0; c < cells.length; c++) {\n        var cell = cells[c];\n        var oldvalue = cell.code_mirror.getValue();\n        var newvalue = oldvalue.replace(reg , replaceValue);\n        cell.code_mirror.setValue(newvalue);\n        if (cell.cell_type === 'markdown') {\n          cell.rendered = false;\n          cell.render();\n        }\n      }\n    };\n\n    // wire-up the UI\n\n    isRegExpButton.click(function(){\n      search.focus();\n      setTimeout(function(){onChange();}, 100);\n    });\n\n    isCaseSensitiveButton.click(function(){\n      search.focus();\n      setTimeout(function(){onChange();}, 100);\n    });\n\n    allCellsButton.click(function(){\n      replace.focus();\n      setTimeout(function(){onChange();}, 100);\n    });\n\n\n    search.keypress(function (e) {\n      if (e.which == 13) {//enter\n        replace.focus();\n      }\n    });\n\n    search.on('input', onChange);\n    replace.on('input',  onChange);\n\n    // This statement is used simply so that message extraction\n    // will pick up the strings.  The actual setting of the text\n    // for the button is in dialog.js.\n    var button_labels = [ i18n.msg._(\"Replace All\")];\n\n    var mod = dialog.modal({\n      show: false,\n      title: i18n.msg._(\"Find and Replace\"),\n      body:form,\n      keyboard_manager: env.notebook.keyboard_manager,\n      buttons:{\n        'Replace All':{ class: \"btn-primary\",\n            click: function(event){onsubmit(event); return true;}\n        }\n      },\n      open: function(){\n        search.focus();\n      }\n    });\n\n    replace.keypress(function (e) {\n      if (e.which == 13) {//enter\n        onsubmit();\n        mod.modal('hide');\n      }\n    });\n    mod.modal('show');\n  };\n\n\n  var load = function(keyboard_manager){\n    var action_all = {\n        cmd: i18n.msg._('find and replace'),\n        help: i18n.msg._('find and replace'),\n        handler: function(env, event){\n          snr(env, event);\n        }\n    };\n\n    var act_all = keyboard_manager.actions.register(action_all, 'find-and-replace', 'jupyter-notebook');\n\n    keyboard_manager.command_shortcuts.add_shortcuts({\n        'f': 'jupyter-notebook:find-and-replace'\n    });\n  };\n\n\n  return {load:load};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('notebook/js/clipboard',[\n    'jquery',\n    'base/js/namespace',\n    'base/js/utils',\n    'base/js/i18n',\n    'base/js/dialog'\n], function($, Jupyter, utils, i18n, dialog) {\n\nvar jcbprefix = '<pre class=\"jupyter-nb-cells-json\">';\nvar jcbsuffix = '</pre>';\n\nfunction store_json(cells, clipboard) {\n  // Firefox ignores application/json mime type, so put it in HTML as well.\n  // We also copy a text version so you can paste cell sources into a text editor\n  var j = JSON.stringify(cells);\n  var t = cells.map(function(c) {return c.source;}).join('\\n\\n');\n  clipboard.setData('text/plain', t);\n  clipboard.setData('text/html', jcbprefix + j + jcbsuffix);\n  clipboard.setData('application/json', j);\n}\n\nfunction load_json(clipboard) {\n  var s = clipboard.getData('text/html');\n  // System/browsers may add some more stuff before/after our content, so\n  // find where our prefix and suffix are.\n  var pix = s.indexOf(jcbprefix);\n  var six = s.lastIndexOf(jcbsuffix);\n  if (pix === -1 || six === -1) {\n    return null;\n  }\n  return JSON.parse(s.slice(pix + jcbprefix.length, six));\n}\n\nfunction copy(event) {\n  if ((Jupyter.notebook.mode !== 'command') ||\n        // window.getSelection checks if text is selected, e.g. in output\n        !window.getSelection().isCollapsed) {\n    return;\n  }\n  var selecn = Jupyter.notebook.get_selected_cells().map(\n    function(c) { return c.toJSON();});\n  store_json(selecn, event.clipboardData);\n  event.preventDefault();\n}\n\nfunction paste(event) {\n  if (Jupyter.notebook.mode !== 'command') {\n    return;\n  }\n  console.log(i18n.msg.sprintf(i18n.msg._('Clipboard types: %s'),event.clipboardData.types));\n  cells = load_json(event.clipboardData);\n  // console.log(cells);\n  // Does this JSON look like cells?\n  if (Array.isArray(cells) && (cells.length > 0) &&\n      cells[0].cell_type && cells[0].source) {\n    var first_inserted = null;\n    for (var i=0; i < cells.length; i++) {\n        var cell_data = cells[i];\n        var new_cell = Jupyter.notebook.insert_cell_above(cell_data.cell_type);\n        new_cell.fromJSON(cell_data);\n        if (first_inserted === null) {\n            first_inserted = new_cell;\n        }\n    }\n    first_inserted.focus_cell();\n  }\n  event.preventDefault();\n}\n\nfunction notebookOnlyEvent(callback) {\n    // Only call the callback to redirect the event if the notebook should be\n    // handling the events, at the descretion of the keyboard manager.\n    // If the focus is in a text widget or something (kbmanager disabled),\n    // allow the default event.\n    return function() {\n        if (Jupyter.keyboard_manager.enabled) {\n            callback.apply(this, arguments);\n        }\n    };\n}\n\nfunction needs_text_box_for_paste_event() {\n  // I know this is bad, but I don't know a better way to check this\n  return navigator.userAgent.indexOf('Firefox') !== -1;\n}\n\nfunction setup_paste_dialog() {\n  // Firefox only fires a paste event if the cursor is in a text input. So, on\n  // Ctrl-V, bring up a dialog with an invisible text box and catch the\n  // second Ctrl-V\n  var action = {\n      icon: 'fa-clipboard', // a font-awesome class used on buttons, etc\n      help    : i18n.msg._('Dialog for paste from system clipboard'),\n      help_index : 'zz',\n      handler : function () {\n        var entry_box = $('<input type=\"text\"/>');\n        entry_box.css('opacity', 0);\n        function paste_close_dlg(e) {\n          paste(e);\n          // There must be a better way to do this, but it's not any of:\n          // .hide(), .remove() or .dialog('close')\n          paste_dlg.find('.close').click();\n          document.removeEventListener('paste', paste_close_dlg);\n        }\n        document.addEventListener('paste', paste_close_dlg);\n        var cmdtrl = i18n.msg._('Ctrl-V');\n        if (utils.platform === 'MacOS') {\n            cmdtrl = i18n.msg._('Cmd-V');\n        }\n        var dialog_body = $(\"<div/>\").append(\"<p>\").append(i18n.msg.sprintf(i18n.msg._(\"Press %s again to paste\"),cmdtrl))\n            .append(\"<br/>\")\n            .append(\"<p><b>\")\n            .append(i18n.msg._(\"Why is this needed? \"))\n            .append(\"</b>\")\n            .append(i18n.msg._(\"We can't get paste events in this browser without a text box. \"))\n            .append(i18n.msg._(\"There's an invisible text box focused in this dialog.\"))\n            .append($(\"<form/>\").append(entry_box));\n\n        var paste_dlg = dialog.modal({\n            notebook: Jupyter.notebook,\n            keyboard_manager: Jupyter.keyboard_manager,\n            title : i18n.msg.sprintf(i18n.msg._(\"%s to paste\"),cmdtrl),\n            body : dialog_body,\n            open: function() {\n                entry_box.focus();\n            },\n            buttons : {\n                \"Cancel\" : {\n                    // click : function() { reject(\"Dialog cancelled\"); },\n                }\n            }\n        });\n      }\n  };\n  var full_action_name = Jupyter.actions.register(action, 'paste-dialog', 'system-clipboard');\n  Jupyter.keyboard_manager.command_shortcuts.add_shortcut('Cmdtrl-V', full_action_name);\n}\n\n// Set clipboard event listeners on the document.\nreturn {setup_clipboard_events: function() {\n  document.addEventListener('copy', notebookOnlyEvent(copy));\n  if (needs_text_box_for_paste_event()) {\n    setup_paste_dialog();\n  } else {\n    document.addEventListener('paste', notebookOnlyEvent(paste));\n  }\n}};\n});\n\n",
    "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// adapted from Mozilla Developer Network example at\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\n// shim `bind` for testing under casper.js\nvar bind = function bind(obj) {\n  var slice = [].slice;\n  var args = slice.call(arguments, 1),\n    self = this,\n    nop = function() {\n    },\n    bound = function() {\n      return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments)));\n    };\n  nop.prototype = this.prototype || {}; // Firefox cries sometimes if prototype is undefined\n  bound.prototype = new nop();\n  return bound;\n};\nFunction.prototype.bind = Function.prototype.bind || bind ;\n\n\nrequire([\n    'jquery',\n    'contents',\n    'base/js/namespace',\n    'notebook/js/notebook',\n    'services/config',\n    'base/js/utils',\n    'base/js/page',\n    'base/js/events',\n    'base/js/promises',\n    'auth/js/loginwidget',\n    'notebook/js/maintoolbar',\n    'notebook/js/pager',\n    'notebook/js/promises',\n    'notebook/js/quickhelp',\n    'notebook/js/menubar',\n    'notebook/js/notificationarea',\n    'notebook/js/savewidget',\n    'notebook/js/actions',\n    'notebook/js/keyboardmanager',\n    'notebook/js/kernelselector',\n    'codemirror/lib/codemirror',\n    'notebook/js/about',\n    'notebook/js/searchandreplace',\n    'notebook/js/clipboard',\n    'bidi/bidi'\n], function(\n    $,\n    contents_service,\n    IPython,\n    notebook,\n    configmod,\n    utils,\n    page,\n    events,\n    promises,\n    loginwidget,\n    maintoolbar,\n    pager,\n    nb_promises,\n    quickhelp,\n    menubar,\n    notificationarea,\n    savewidget,\n    actions,\n    keyboardmanager,\n    kernelselector,\n    CodeMirror,\n    about,\n    searchandreplace,\n    clipboard,\n    bidi\n    ) {\n    \"use strict\";\n\n    // Pull typeahead from the global jquery object\n    var typeahead = $.typeahead;\n    \n    try{\n        requirejs(['custom/custom'], function() {});\n        bidi.loadLocale();\n    } catch(err) {\n        console.log(\"Error processing custom.js. Logging and continuing\");\n        console.warn(err);\n    }\n\n    // compat with old IPython, remove for IPython > 3.0\n    window.CodeMirror = CodeMirror;\n\n    // Setup all of the config related things\n    \n\n    var common_options = {\n        ws_url : utils.get_body_data(\"wsUrl\"),\n        base_url : utils.get_body_data(\"baseUrl\"),\n        notebook_path : utils.get_body_data(\"notebookPath\"),\n        notebook_name : utils.get_body_data('notebookName')\n    };\n\n    var config_section = new configmod.ConfigSection('notebook', common_options);\n    config_section.load();\n    var common_config = new configmod.ConfigSection('common', common_options);\n    common_config.load();\n\n    // Instantiate the main objects\n    \n    var page = new page.Page('div#header', 'div#site');\n    var pager = new pager.Pager('div#pager', {\n        events: events});\n    var acts = new actions.init();\n    var keyboard_manager = new keyboardmanager.KeyboardManager({\n        pager: pager,\n        events: events,\n        actions: acts, \n        config: config_section,\n    });\n    var save_widget = new savewidget.SaveWidget('span#save_widget', {\n        events: events,\n        keyboard_manager: keyboard_manager});\n    acts.extend_env({save_widget:save_widget});\n    var contents = new contents_service.Contents({\n          base_url: common_options.base_url,\n          common_config: common_config\n        });\n    var notebook = new notebook.Notebook('div#notebook', $.extend({\n        events: events,\n        keyboard_manager: keyboard_manager,\n        save_widget: save_widget,\n        contents: contents,\n        config: config_section},\n        common_options));\n    var login_widget = new loginwidget.LoginWidget('span#login_widget', common_options);\n    var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', {\n        notebook: notebook,\n        events: events,\n        actions: acts});\n    var quick_help = new quickhelp.QuickHelp({\n        keyboard_manager: keyboard_manager,\n        events: events,\n        notebook: notebook});\n    keyboard_manager.set_notebook(notebook);\n    keyboard_manager.set_quickhelp(quick_help);\n    var menubar = new menubar.MenuBar('#menubar', $.extend({\n        notebook: notebook,\n        contents: contents,\n        events: events,\n        save_widget: save_widget,\n        quick_help: quick_help,\n        actions: acts,\n        config: config_section},\n        common_options));\n    var notification_area = new notificationarea.NotebookNotificationArea(\n        '#notification_area', {\n        events: events,\n        save_widget: save_widget,\n        notebook: notebook,\n        keyboard_manager: keyboard_manager});\n    notification_area.init_notification_widgets();\n    var kernel_selector = new kernelselector.KernelSelector(\n        '#kernel_logo_widget', notebook);\n    searchandreplace.load(keyboard_manager);\n\n    $('body').append('<div id=\"fonttest\"><pre><span id=\"test1\">x</span>'+\n                     '<span id=\"test2\" style=\"font-weight: bold;\">x</span>'+\n                     '<span id=\"test3\" style=\"font-style: italic;\">x</span></pre></div>');\n    var nh = $('#test1').innerHeight();\n    var bh = $('#test2').innerHeight();\n    var ih = $('#test3').innerHeight();\n    if(nh != bh || nh != ih) {\n        $('head').append('<style>.CodeMirror span { vertical-align: bottom; }</style>');\n    }\n    $('#fonttest').remove();\n\n    page.show();\n\n    events.one('notebook_loaded.Notebook', function () {\n        var hash = document.location.hash;\n        if (hash) {\n            document.location.hash = '';\n            document.location.hash = hash;\n        }\n        notebook.set_autosave_interval(notebook.minimum_autosave_interval);\n    });\n\n    IPython.page = page;\n    IPython.notebook = notebook;\n    IPython.contents = contents;\n    IPython.pager = pager;\n    IPython.quick_help = quick_help;\n    IPython.login_widget = login_widget;\n    IPython.menubar = menubar;\n    IPython.toolbar = toolbar;\n    IPython.notification_area = notification_area;\n    IPython.keyboard_manager = keyboard_manager;\n    IPython.save_widget = save_widget;\n    IPython.tooltip = notebook.tooltip;\n\n    try {\n        events.trigger('app_initialized.NotebookApp');\n    } catch (e) {\n        console.error(\"Error in app_initialized callback\", e);\n    }\n\n    Object.defineProperty( IPython, 'actions', {\n      get: function() {\n          console.warn('accessing \"actions\" on the global IPython/Jupyter is not recommended. Pass it to your objects contructors at creation time');\n          return acts;\n      },\n      enumerable: true,\n      configurable: false\n    });\n\n    clipboard.setup_clipboard_events();\n    \n    // Now actually load nbextensionsload_extensions_from_config\n    Promise.all([\n        utils.load_extensions_from_config(config_section),\n        utils.load_extensions_from_config(common_config),\n    ])\n    .catch(function(error) {\n        console.error('Could not load nbextensions from user config files', error);\n    })\n    // BEGIN HARDCODED WIDGETS HACK\n    .then(function() {\n        if (!utils.is_loaded('jupyter-js-widgets/extension')) {\n            // Fallback to the ipywidgets extension\n            utils.load_extension('widgets/notebook/js/extension').catch(function () {\n                console.warn('Widgets are not available.  Please install widgetsnbextension or ipywidgets 4.0');\n            });\n        }\n    })\n    .catch(function(error) {\n        console.error('Could not load ipywidgets', error);\n    });\n    // END HARDCODED WIDGETS HACK\n\n    notebook.load_notebook(common_options.notebook_path);\n\n});\n\ndefine(\"notebook/js/main\", function(){});\n\n"
  ]
}